LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re-initialize state of controls to "enabled" when vi opens

Solved!
Go to solution

Is there a way to re-initialize the state of a control (enabled vs. disabled) when the vi is re-opened? I have set a few controls to disable when an "continuous run" button is clicked while the program runs. However, if the user then stops and closes the vi, the controls remain disabled when the vi is re-opened. I would like them to be reinitialized to enabled for the next user. 

0 Kudos
Message 1 of 5
(3,475 Views)

Please put a while loop to run contineuously, do not use "Run Continuous" button.

 

As far as initializing it to required state, use property node or Invove node appropriately.

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
0 Kudos
Message 2 of 5
(3,448 Views)
Solution
Accepted by EC2014

Hello,

 

You have to just enable the control before your code execution enter in to the Main loop. As shown in below image, you have just follow the data flow of your code

 

Kudos are always Welcome... 🙂

Initialization.png

Vinal Gandhi, CLA
Message 3 of 5
(3,438 Views)
Solution
Accepted by EC2014

You can right click on control enable it then again right click and go to Data operations and select Make current value default.

PBP
Labview 6.1 - 2019
Message 4 of 5
(3,417 Views)

Thanks very much for the example. Makes sense - this is what I was trying to do but hadn't set it up quite right.

 

The solution presented by PBP also seems to work ok for my needs, although I could have sworn the same thing wasn't working for me yesterday! Anyhow, thanks to all for quick replies, much appreciated 

 

 

0 Kudos
Message 5 of 5
(3,388 Views)