From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-04-2017 07:14 PM
Using LabView I created the attached .vi. What I am trying to do is that when I run the program I get 0 reading and speed 1 and 2 are disabled until I click switch to turn ON the voltage reading. If I don't switch to ON nothing will happen until I press switch. When switch is on, I can click either speed 1 or speed 2 while one of the other is off. How would I do this?
Solved! Go to Solution.
12-04-2017 08:48 PM
You can change the disabled property using property nodes as a function of program state.
I also would recommend to use "value change" event instead of "mouse up", eliminating these silly inner case structures.
12-04-2017 08:50 PM
When you have events where you want to know if a button has been pressed, use Value Change to detect when the value of the button has been changed, not Mouse Up. Then you can get rid of the "Button" node to know whether it was a left or right mouse click.
When you want to enable or disable controls, then use property nodes for those controls for with the "Disabled" property. Set it to Write and right click on it to create a constant. The you can set it for 1 of the 3 types, Enabled, Disabled, or Disabled and Grey.
12-04-2017 10:43 PM - edited 12-04-2017 10:45 PM
I tried and it's not working. Here is what I have. This is my first time using event structure. I am not sure how things work.
12-04-2017 11:14 PM
You fixed it to be Value Change.
But you didn't do anything with property nodes.
12-05-2017 12:16 AM
Should speed 1 and speed 2 be independent or can only one (or none) be on at the same time? If so, use a radiobutton control.
In any case, here's a quick draft that might get you started.
12-05-2017 12:41 AM
Excellent! Thank you very much! Now this makes a lot more sense.
12-05-2017 12:51 AM - edited 12-05-2017 01:02 AM
Thanks!