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: 

reference latched control

I have written code for a triggered acquisition. As per examples, the code arms the acquisition then sits in a loop waiting for the trigger. The loop has a disarm button (latched) in it so that the acquisition can be aborted if necessary. I now want to embed this VI in a higher level VI, which will include data validation code, etc. The problem is how to provide a disarm button to the sub VI. Passing ordinary controls is OK, but it doesn't seem to like latched controls or references to them (complains about possible race conditions). I could make the button unlatched and use an event trap to detect it changing and set a boolean indicator, but the event trap would have to be in the upper  VI and how can I pass the value to the sub VI so that it can use it? ANy ideas on how to pass the disarm signal to the lower level VI?

0 Kudos
Message 1 of 2
(2,544 Views)

There is an example for how to pass a stop button control by reference on the following forum post:

 

http://forums.ni.com/t5/LabVIEW/how-to-pass-stop-button-s-boolean-value-to-subvi-s-subvi/td-p/138284

 

Is this how you had everything set up when you were receiving race conditions?

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,505 Views)