10-11-2011 02:31 AM
I have a vi constantly running in the main thread of SeqCont.seq. In this vi is a stop button to stop execution of the vi. How can a pass a reference to this stop button, so I can stop this vi from the main.seq?
I tried to pass the sequencecontext, but a value change of the context is not constantly being evaluated by this vi.
Solved! Go to Solution.
10-11-2011 01:34 PM
Here's a little demo. Let me know if you have any questions.
Regards,
10-12-2011 12:10 AM
I found this example on the web http://zone.ni.com/devzone/cda/epd/p/id/5838.
Why u need to set the fileglobal?
10-12-2011 01:56 AM
Same reason the other example uses Parameter.Stop_Thread, that is to stop the VI running.
10-12-2011 02:19 AM
When I delete the Fileglobal in the last example, the vi doesn't exit anymore.
10-12-2011 02:45 AM
Why did you delete it!! You need a teststand variable so as to communicate between Teststand and the LabVIEW VI to tell the Loop to close and hence complete the VI execution.
10-12-2011 04:06 AM - edited 10-12-2011 04:06 AM
I deleted it to test if it affects the GetProperty vi. The Fileglobals is the connection between LV and TST?
10-12-2011 05:25 AM
Ok,
The Get Property VI should return a error because the Teststand variable doesn't exist if you have deleted it. Unfortunately the VI will not close the loop because the error condition is not connected to the loop terminal.
You could include a PropertyObject.Exists and therefore you could do something different and not generate an error.
(also Jigg provided the example therefore you should credit him if you think the solution is concluded successfully)