LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to maintain the Boolean LED ON after press the OK button (Latch when released)

Solved!
Go to solution

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~!

0 Kudos
Message 1 of 10
(6,298 Views)

Hi Yumi,

 

Is this what you're trying to do?

 

Boolean.png

0 Kudos
Message 2 of 10
(6,268 Views)

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)

check.png

(You might want to initialize the shift register.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 10
(6,263 Views)

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.

0 Kudos
Message 4 of 10
(6,230 Views)

sorry for the typo, it is "program"

0 Kudos
Message 5 of 10
(6,229 Views)

No, it does not need to be in another While loop.  Just add the shift register to the current loop you have.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 10
(6,224 Views)
Solution
Accepted by topic author Yumi

@crossrulz wrote:

 Just add the shift register to the current loop you have.


... or use a feedback node instead. Shorter wires... 😄

0 Kudos
Message 7 of 10
(6,209 Views)

@altenbach wrote:

@crossrulz wrote:

 Just add the shift register to the current loop you have.


... or use a feedback node instead. Shorter wires... 😄


Spoiler
and runs faster... less distance to travel

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 10
(6,195 Views)

@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... 😄


Spoiler
and runs faster... less distance to travel

 

 

Ben


Spoiler
Yes, but it has to slow down for the tighter bends.
0 Kudos
Message 9 of 10
(6,184 Views)

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

0 Kudos
Message 10 of 10
(6,169 Views)