NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview call in TestStand does not return to TestStand after execution

Hi Mim and Alex,

 

The most common reason for seeing this behavior is due to users closing the LabVIEW front panel while leaving the VI running in the background.  This can be addressed by detecting the PanelClose and PanelClose? events in a case structure and ensuring that these events stop the VI.  This will prevent the situation of a VI running without be shown.

 

This could also be detected by selecting File » Exit in LabVIEW once the VI assumed to have finished running and has not returned to TestStand.  If a warning appears stating that there are still VIs running, this would confirm that the problem is caused by the VI not terminated as expected. 

 

I hope that this helps. 

 

Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 11 of 16
(1,673 Views)

Thanks for the post Jessica!

 

Do you recommend calling STOP LabView VI at the end of my LabView VI that is called from TS? I have 200 plus LabView calls from my TS script. So would it be OK to exit from LabView calling the QUIT LabView VI?

 

I would appreciate your comments.

 

Thanks.

mim

0 Kudos
Message 12 of 16
(1,663 Views)

Hi Mim,

 

Yes, you want to use STOP VI .

Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 13 of 16
(1,630 Views)

Thanks Jessica!

I will give that a shot and post back in a few days regarding the status.

Mim

0 Kudos
Message 14 of 16
(1,628 Views)

I updated one of my VIs called from TS to include STOP VI at the very end. All steps within the LabView call completed successfully. However, when getting back to TestStand an error message was displayed. LabView: VI Execution terminated by server.

Adding STOP VI didnt work with TS.

Thanks.

Mim

0 Kudos
Message 15 of 16
(1,625 Views)

Hi Mim,

 

I am not sure why you must use the Stop or Quit Vi.  Typically, this issue of closing a VI comes about because of a loop that needs to be terminated.  If this is the case, all that you would need to do in the event structure is detect the PanelClose event and pass a value to stop the loop.  This will close the VI.

 

What is causing your VI to continue to run?  What will be happening in the VI when the PanelClose event is detected that will need to be terminated in order to stop the VI?

Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 16 of 16
(1,584 Views)