05-05-2023 12:44 PM
It's very handy and powerful the way LabVIEW enables the programmer to change and or create more advanced objects from elementary objects of the same type. The upper left corner of the image below shows a Boolean variable and a screenshot of the "right-click" menu option that produced the new object to the right indicated by the numbered arrow. The same is shown below starting with a Boolean class specifier constant. Here's how I'd describe the purpose or benefit represented by each arrow so far as I understand it.
Please correct or elaborate on 1-5 above and explain number 6 (the strict class specifier constant including how to create it).
05-05-2023 02:36 PM
Some quick clarifications: You start with a Boolean "diagram constant", not a "variable". It help to properly name things to avoid confusion. You need a reference and property nodes if you want to operate on properties in a subVI by providing the reference to a control/indicator located in the caller. If the property node is in the same VI as the control/indicator, you can create a property node that is linked. No need for any reference.
What are you actually trying to achieve?
05-05-2023 04:01 PM - edited 05-05-2023 04:02 PM
My primary State Machine launches an Oven Controller Sub VI that ramps the oven to the next temperature and then holds that temperature to "soak" the device. I needed a way for the Oven Controller Sub VI to signal the primary state machine that the "soak time" is completed so the State Machine can return to the "Idle" state and dequeue the next task (collect data). I ended up passing a reference of a Boolean control (or indicator??) to the Oven Controller Sub VI which sets the value to True after the soak time is completed. Meanwhile the primary State Machine is just looping every few seconds to check the value of the Boolean using the same reference. Or I suppose it could check the control directly without using the reference. I looked into Callback VIs but decided against this option because the test system has absolutely nothing to do during the temperature ramp and soak so no events will be raised.
05-05-2023 06:14 PM
That While loop is incredibly crowded. I would recommend merging a large portion of the data in shift registers into one cluster rather than having a dozen separate registers.
Using a front panel control as a substitute for a messaging system or event system is not recommended. Largely (but not completely...) because this ties your messaging to the speed of your user interface thread, which can be pretty slow. It also means you can't change your user interface without risking breaking your messaging.
However, to get back to the root of it all and the question you actually asked, "strict" means that the reference in question is strictly typed. An easier example of this might be to consider a "Numeric" control. A "strict" reference means that it's a specific number type (DBL, I32, U16, etc.) while a non-strict version doesn't have that type information carried with the reference.
In the case of Boolean controls, they are not all created equally when it comes to a few things, such as how they work with events, but it matters a lot less than with other control types.
At any rate, the only way to create a "Strict" reference is to create it from something that is typed (such as the actual control) as opposed to creating it manually (which has no way to link it to a given control to get the type from it).
"Strict" with controls mostly matters when getting or setting the value. A strict reference will have the actual data type, while a non-strict one will take a Variant as input or output, which then you have to decode, which could either coerce the value or cause an error if the type you pass in isn't an exact match to the real control.
05-08-2023 01:40 AM
I would like to add one more thing to Kyle's answer, Strict types carry cosmetic information also, all the changes you make to strictly typed controls get updated by all instances of that control.
05-08-2023 11:05 AM
@bharathp10 wrote:
I would like to add one more thing to Kyle's answer, Strict types carry cosmetic information also, all the changes you make to strictly typed controls get updated by all instances of that control.
I'm pretty sure you're talking about a "Strict type definition", not a strict control reference. They are not the same thing.
05-08-2023 11:29 AM
Oh Yes, I was referring to strict typedef control.
But we can create control reference of strict type right!!?