02-03-2017 12:14 AM
Hi experts,
I am new to labview and I am wondering how to maintain a Boolean LED ON after press the OK button (Latch when released). As the system I designed is to press a OK button (Latch when released) to strat the temp recording, and i would like to have the LED indicator on all the time during the process untill I press the stop button to stop the process. Thanks~!
Solved! Go to Solution.
02-03-2017 01:39 AM
Hi Yumi,
Is this what you're trying to do?
02-03-2017 02:50 AM - edited 02-03-2017 02:50 AM
Hi Yumi,
press a OK button (Latch when released) to strat the temp recording, and i would like to have the LED indicator on all the time during the process untill I press the stop button
This whole sentence boils down to:
led := (led OR start) AND NOT(stop)
(You might want to initialize the shift register.)
02-03-2017 11:35 AM
Thank you guys! Do I need to create a sub-vi according to yours and place it in my existing problem which already has a while loop? I am not sure if the same vi can take two while loop at the same time.
02-03-2017 11:36 AM
sorry for the typo, it is "program"
02-03-2017 11:56 AM
No, it does not need to be in another While loop. Just add the shift register to the current loop you have.
02-03-2017 01:26 PM
@crossrulz wrote:
Just add the shift register to the current loop you have.
... or use a feedback node instead. Shorter wires... 😄
02-03-2017 02:37 PM
@altenbach wrote:
@crossrulz wrote:
Just add the shift register to the current loop you have.
... or use a feedback node instead. Shorter wires... 😄
Ben
02-03-2017 03:16 PM
@Ben wrote:
@altenbach wrote:
@crossrulz wrote:
Just add the shift register to the current loop you have.
... or use a feedback node instead. Shorter wires... 😄
Spoilerand runs faster... less distance to travel
Ben
02-04-2017 01:33 PM
The whole point of having multiple Mechanical Actions for Boolean Controls is to allow you to choose whether the Control "stays on" when pushed, "stays on" only while pushed, or appears to always "stay off", ready to push.
If you want the Control to go on and stay on when pushed, that's the Mechanical Action "Switch when Pressed" (right-click the OK Button and choose the first Mechanical Action). If you want it on only while pressed (like a "Door Bell Push Button"), select "Switch until Released" (the third Action). If you want an "always off, ready to push" button, leave it as "Latch when Released" (Action 5) and be sure to read it when it switches (it is the reading of the "True" state of the button that sends it back to the default, False, state).
The Mechanical Actions are there for you to use (without needing "code"). Choose the Action that suits your need.
Bob Schor