NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Thread Operation - Wait Step Configuration Dialog Box

I can't seem to find any examples on how to use the Thread Wait Step options: Specify by Sequence Call and Specify Object Reference to the Thread (see below).  Can anyone point to examples on how to use both options?  When do you use one option over the other?  Thanks.

Thread Operation

Use the Thread operation to wait for a TestStand thread to finish executing.

The Thread operation contains the following options:

  • Specify by Sequence Call—The thread to wait for by selecting a sequence call within the same sequence as the Wait step. You can only specify sequence calls that run in a new thread.
  • Specify by Object Reference to the Thread—The thread to wait for by using an ActiveX reference to the thread. When you specify the thread with a reference variable, you can refer to threads other sequences and executions create.
0 Kudos
Message 1 of 2
(998 Views)

Hi testdesign,

 

I'm not aware of any examples that really demonstrate this behavior but it basically comes down to scope. You use Specify by Sequence Call if you want to wait for a subsequence that is in the same sequence as the wait step. Say you want to wait in your MainSequence on a thread that is a subsequence of a subsequence called from MainSequence. We'll call the subsequence called by the MainSequence seq1 and the subsequence called by seq1 seq2. In this case, you wouldn't be able to use Specify by Sequence Call because it will only let you point to subsequences that are in the same sequence as the wait step. In this case, the wait step is in MainSequence and seq2 is in seq1 so no dice.

 

When you create a subsequence and set it to execute in a new thread, you can store back an object reference to that thread in the "Sequence Call Advanced Settings" on the right side of the Module settings:

DJColeslaw_0-1661367184031.png

Once you have that stored into a variable, you can use Specify by Object Reference to the Thread to point the wait step at that variable to wait on threads that aren't in the same sequence as the wait step, essentially providing a broader scope.

 

Regards,
Message 2 of 2
(967 Views)