NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not abort VI from TestStand after called asynchronously

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

Start UIStart UIStop UIStop UI

0 Kudos
Message 1 of 8
(2,942 Views)

Use the "Store an Object Reference to the New Thread(optional)" control in the Step Settings for the Run VI Asynchronously.

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 8
(2,918 Views)

image.png

Thank you. but I did not use the sequence Call. I used the Action like this. Any other solutions?

0 Kudos
Message 3 of 8
(2,899 Views)

Why didn't you use the 'Run VI Asynchronously' StepType, which is what I thought you had used?

Regards
Ray Farmer
0 Kudos
Message 4 of 8
(2,895 Views)

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.

0 Kudos
Message 5 of 8
(2,889 Views)

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.

 

 

 

Regards
Ray Farmer
0 Kudos
Message 6 of 8
(2,886 Views)

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

0 Kudos
Message 7 of 8
(2,880 Views)

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.

 

 

 

Regards
Ray Farmer
0 Kudos
Message 8 of 8
(2,873 Views)