06-25-2018 10:04 PM
Dear all,
I would like to start a VI from TestStand by calling it asynchronously as the screenshot "Start UI" below but I can not stop that VI at the last step in TestStand with VI "Stop UI". The reason is that the refnum is no longer valid.
So now how can I stop the VI within a step in TestStand?
Thank you all
06-26-2018 04:13 AM
Use the "Store an Object Reference to the New Thread(optional)" control in the Step Settings for the Run VI Asynchronously.
06-27-2018 01:34 AM
Thank you. but I did not use the sequence Call. I used the Action like this. Any other solutions?
06-27-2018 03:29 AM
Why didn't you use the 'Run VI Asynchronously' StepType, which is what I thought you had used?
06-27-2018 04:35 AM
Sorry. I am quite new with TestStand.
So, how about the VI to abort the VI called asynchronously? could you help me to program it? I try but failed.
06-27-2018 05:08 AM
You could use a TestStand Boolean which you set in your Cleanup of your Sequence.
You monitor this TestStand Boolean in your VI to exit any loops and hence close your VI.
06-27-2018 08:43 PM
How about the object reference I have stored in the first step which called VI asynchronously? Will I need to use it for aborting that VI? and how to use it?
Thank you
06-28-2018 04:34 AM
Forget that idea.
Create yourself a simple FGV which outputs a Boolean. Input to the FGV is an enum control; Initialise, Read and Stop.
Initialise set your Boolean to False
Read, returns the value of your Boolean.
Stop sets the Boolean True.
In your Parallel running VI, use the FGV set to Read to return the Boolean which will close your loop and hence close your VI.
In your Sequence (in Setup). Call your FGV set to Initialise (you could do this in your main VI).
In your Sequence (In the Cleanup). Call your FGV set to Stop. This should stop your VI.