ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Toggle Control

Solved!
Go to solution

Please see the attached snippet.

Control is for a Thorlabs shutter which opens and closes with the same command (ens).  (ens?) queries the state of the shutter.  In order to use in a loop as shown, the user must manually switch the (latch when released) boolean rather than a switch-and-remain boolean.  Otherwise the shutter opens/closes on each loop iteration.

 

Is there a way program a front panel control standard boolean control so that I can control programmatically.  What is needed is a simple control which remains true when shutter is open and closes shutter when false?

 

Thanks for the suggestions!

Chris

 

0 Kudos
Message 1 of 3
(3,224 Views)
Solution
Accepted by topic author bonnerupc

Use an event structure with a Value Change event registered for your boolean button (switch when released).  This way, the command is only sent when a change in the boolean is detected.

aputman
0 Kudos
Message 2 of 3
(3,195 Views)

Thanks!

Don't know why I didn't see that solution - duh?  I used the Pt-by-Pt "Data Change?" vi instead; works great.

Appreciate your kick start for my programming..

 

0 Kudos
Message 3 of 3
(3,161 Views)