06-04-2021 06:14 PM - edited 06-04-2021 06:15 PM
Hi,
I am using disabled and grayed in property nodes of controls in a case structure.
However, I have noticed variables can only be disabled or enabled when starting the application and not at run-time. I would like to disable controls after a variable change from False to True.at runtime. The behaviour of my VI is that it does not wait the variable change to disable my controls but that is not what I want to do.
Can you help me ? (I have Labview 64 bits 2020)
Regards,
Yohann
Solved! Go to Solution.
06-04-2021 07:38 PM
I am unable to open your attachment. However, all Controls and Indicators have a "disable" property that can be programmatically set (whereever you want set it) to either "Enabled", "Disabled", or "Disabled and greyed out".
On your Block Diagram, find the Control or Indicator whose Disable property you want to alter. Right-click it, choose Create, Property Node, and choose the Disabled Property. You will notice that it looks like a "Control" -- the "Disabled" wire comes out the right side, and if you create an Indicator there (the fastest way by right-clicking and choosing "Create Indicator"), you'll get an Indicator that will take on the value of the Disabled Property. [You should probably rename this new Indicator].
But what if you want to set the Property? Right-click on the Property Node, and choose "Change to Write". Now you can right-click the input wire and choose "Create Constant". Look what LabVIEW gives you -- a Constant that is a Enum with the three values this Property can take.
Bob Schor
06-05-2021 10:20 AM
The problem is the terminal for your cmd button is before the While Loop. So it is only read once when the VI starts. Put it inside the while loop.
This is basic LabVIEW dataflow principles that are covered in the tutorials.
06-05-2021 10:25 AM
Thank you, it worked good. Yes, it was very basic. I wonder why I did not notice before !