LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event execution based on the changing direction of boolean control value

Generally an even case is executed as long as the value of a boolean control changes, no matter the change is from true to false or false to true.

However, if I want to event case1 to execute if false to true, and case2 to execute if true to false, how to implement this?

Thanks in advance.

0 Kudos
Message 1 of 7
(3,421 Views)
Set up your event case to be based on value change.  Put a case structure inside that which executes based on whether the new value of the control is true vs. false.
Message 2 of 7
(3,412 Views)
You could use a single event for "Value Change", and wire the "New Value" into a case structure.  Then, because you know a change happened and you know the result of the change, the "True" case would be that of a false -> true change, and the "False" case would be that of a true -> false change.
-Cory
Message 3 of 7
(3,410 Views)
Place the code inside the event structure inside the TRUE case of a case structure and wire the selector to either the boolean control placed inside the event case or to the "new value" event terminal. Leave the FALSE case empty so nothing much happens if the control goes off.
0 Kudos
Message 4 of 7
(3,408 Views)
Thanks a lot for all of your quick replies.

NI forum support is much more efficient than tele support!
0 Kudos
Message 5 of 7
(3,401 Views)


@Dejun wrote:
NI forum support is much more efficient than tele support!

And we don't play cheesy elevator music while you wait. 😄
0 Kudos
Message 6 of 7
(3,392 Views)


@altenbach wrote:


@Dejun wrote:
NI forum support is much more efficient than tele support!

And we don't play cheesy elevator music while you wait. 😄



Hey now, don't go speaking for everyone in regards to playing cheesy elevator music! Luckily, you just don't have to listen to what I'm playing Smiley Tongue
-Cory
0 Kudos
Message 7 of 7
(3,386 Views)