11-18-2013 08:51 AM
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?
11-20-2013 08:20 AM
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?