NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to have some LabVIEW code called in a New thread exit when the testStand sequence terminates

I have a Sequence that launches a sequence in a New Thread that happens to launch some LabVIEW code.  The problem is when the LabVIEW code finishes, it will not close even when the TestStand sequence terminates. Is there a way to tell this LabVIEW code to Exit, I've tried the Quit LabVIEW function, but that causes a C++ RunTime Error.  The LabVIEW code does end though, and it is set in the VI properties to:
Checked - Show Front Panel When Called
Checked - Close Afterwardds if originally closed
 
The sequence call that the LabVIEW code is launched from has the following options:
- New Thread
Unchecked - Automatically wait for the thread to complete at the end of the current sequence
Unchecked - Initially Suspended
Unchecked - Use single threaded apartment
 
Any clues on this would be appreciated.
0 Kudos
Message 1 of 2
(2,659 Views)
Hi ADL,

Everything should close correctly if you check the checkbox "Automatically wait for the thread to complete at the end of the current sequence" in the thread settings.
With it unchecked, I am seeing the behavior you are. 

Gavin Fox
Systems Software
National Instruments
0 Kudos
Message 2 of 2
(2,642 Views)