NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand Thread Not closing

A fairly simple question with hopefully a simple answer so here goes !

I have a main sequence in Teststand 4.0 which calls a second sub sequence. This subsequence calls a third sequence in a new thread, which does a scope measurement with LV7.1 and finishes.
However the second sub sequence does not  close and return to the main sequence. I have to press the TS stop button.

I have tried setting various options about loading and unloading in the new thread options but no difference.
Also in my LV code I have initialise and close termination monitor vi's inserted but they do not help either, perhaps they are not suitable.

Am I missing something or are sub sequences not allowed to open other sequences in new threads ?

Thanks !
0 Kudos
Message 1 of 7
(4,042 Views)

Hi,

In the your second sequence are you waiting for the third sequence to complete before allowing  the second sequence to complete?

have you tried stepping through your sequences and to indentifying where the problem lies?

You have to make sure you have released any handles created by you new thread.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 7
(4,026 Views)
Hi Ray,

Thanks for the reply.
Yes, the second sequence is waiting for the third sequence to complete before it returns to the main sequence.
The third sequnce consists of a single VI which reads a scope result and completes with a close instrument handle.
I would have thought that this would be sufficient to release the thread.

Is there a Teststand close thread option ?


0 Kudos
Message 3 of 7
(4,022 Views)
Hi mike,
If the third sequence contains a single Vi call, you dont need a subsequence for it. Instead use "Run VI Asynchronously" step and deselect the "Automatically wait.." option in it. This will work similar to new thread and it will also return to the main sequence.

Regards,
Kaustubh
0 Kudos
Message 4 of 7
(4,016 Views)
Hi Kaustubh,

Good tip. I have found the
Automatically wait setting and deselected it and the sequence now runs fine and finishes.
Just one thing, where is the '
Run VI Asynchronously' setting ?, Is this for the Batch processing model only ?
If so that setting is not in there. I am using the sequential model.

Thanks
Mike
0 Kudos
Message 5 of 7
(4,011 Views)
Hi Mike,

Run VI Asynchronously is not a setting. It is a seperate Step Type located at the bottom of the Insertaion Palette under LabVIEW Utillity.

Regards,
Kaustubh
0 Kudos
Message 6 of 7
(4,009 Views)
Ah, ok.

That works also!

Thanks Kaustubh.
0 Kudos
Message 7 of 7
(4,006 Views)