08-07-2018 07:12 AM
Hi all,
can someone please tell me what is the best way to start this vi in TestStand and close it a few steps later?
(there is a while loop in the vi).
Thanks a lot!
08-07-2018 07:53 AM
I would create a "Run VI Asychronously" step, which is under "LabVIEW Utility". Make sure to show the VI front panel so that the user can see and click the stop button. While that VI is running, you can execute any other TestStand steps. Usually, I have the checkbox checked for "Automatically wait for the thread to complete at the end of the current sequence."
08-08-2018 10:27 AM
Thanks for your answer. Sorry, my mistake, i do not want the user to click on the button, i do want to let the sequence close
the vi ((virtually like clicking the stop button)
08-08-2018 11:49 AM
There are a number of ways to do this. One idea is to make your VI poll a local boolean variable.
In the attached sequence/VI, locals.stop is reset to false. Then, the "wait for stop" VI is started asynchronously and will stop when locals.stop is set to true. Note that "Use context of calling thread" must be chosen.