LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Latch in Block Code

Hello

 

I am trying to make a latch boolean in my code. I want to make it so that once an indicator is true, it will stay true for the duration of the run. I also want it to restart the boolean latch to false everytime the program is ran. Is there a way to do this?

 

Thanks!

Midna

0 Kudos
Message 1 of 4
(2,898 Views)

You can try changing the Mechanical Action of boolean... Select Switch when released behaviour...!!


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 4
(2,891 Views)

I don't think you can do that for indicators in the block diagram?

 

I know you can if it is a control in the front panel but not in block diagram?

I tried right clicking on the indicator boolean but the mechanical action is disabled(transparent) and not an option.

 

Is there another way?

 

What I want to do is create a boolean latch within my code.

 

xxxMidna

0 Kudos
Message 3 of 4
(2,872 Views)

You need to be careful with terminology. The term "latch action" has a special meaning in LabVIEW and is used for controls.

 

However, you can easily achieve your desired effect using a shift register or feedback node. Here is one possible solution. SImply incorporate the logic shown before wiring to the indicator.

 

0 Kudos
Message 4 of 4
(2,867 Views)