NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Multithreading and sequence handling

Hi.

I need to know how the TestStand engine handles the different subsequence
in the same sequence file.
For example, i have a sequence file with a main sequence (with main, setup
and cleanup), a file load sequence, a file unload sequence, and several sub-sequences
that are sequentially called winthin the main sequence.
When i run the sequence file (using Test UUTs or Single pass), does the TS
engine create one thread for each sequence, or are all sequences within my
sequence file executed in the same thread ?
If several threads are created, does this apply to the setup and cleanup
part of a single sequence ?

Thanks.

Guillaume Iché, France.
0 Kudos
Message 1 of 3
(3,570 Views)
Guillaume,

All the sequences in a single execution use the same thread. However, you
can start separate executions where each execution runs in a separate thread.
There is an application note on our web, http://www.ni.com/teststand/, that
discusses parallel executions.

Paul Mueller
NI

"Guillaume ICHE" wrote:
>>Hi.>>I need to know how the TestStand engine handles the different subsequence>in
the same sequence file.>For example, i have a sequence file with a main sequence
(with main, setup>and cleanup), a file load sequence, a file unload sequence,
and several sub-sequences>that are sequentially called winthin the main sequence.
>When i run the sequence file (using Test UUTs or Single pass), does the
TS>engine create one thread for each
sequence, or are all sequences within
my>sequence file executed in the same thread ?>If several threads are created,
does this apply to the setup and cleanup>part of a single sequence ?>>Thanks.>>Guillaume
Iché, France.
0 Kudos
Message 2 of 3
(3,570 Views)
Some more details to add to what Paul wrote:

1) All sequences within in an execution, by default, run in the same operating system thread.

2) In teststand 1.x using the api and in teststand 2.0.x directly using a sequence call option, you can change things so that sequences are called in a new thread or a new execution (new execution is also a new thread).

3) Your load and unload callbacks, since they are separate executions from your main execution, might run in a different OS thread than your main execution.

4) setup, cleanup, and main for a particular sequence are always run in the same thread as they are all considered part of the same sequence.

Hope this helps clarify things,
Doug Melamed
NI
0 Kudos
Message 3 of 3
(3,570 Views)