NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Test Socket Execution Order

I need to test 6 UUTs using the batch model.  There are times where I will need to specify the order in which  the UUTs will be tested.  For example, Initially test the sockets sequentially.  Socket #0, socket #1, ..., socket #6.  The the next iteration of testing would need to be socket #1, socket #2, ..., socket #0, etc.

 

I did not see anything posted regarding this or if it is even possible.

 

Thanks!

0 Kudos
Message 1 of 3
(5,552 Views)

Hi,

 

Since its a batch model all the UUT will start and stop at the same time.(though it runs in parallel).

However if you want to delay the starting between the sockets you can programatically do it.

You need to play around the variable RunState.TestSockets.MyIndex which contains the current executing socket number.

In the code sample below i have tried to add a delay of 1 second between the executing sockets.This delay will shift after each run as you required.

 

 

global variables  required run = 0

 

In your main sequence ------------


if (run ==RunState.TestSockets.MyIndex)
{

do not wait.
}

else if (run < RunState.TestSockets.MyIndex)
{

wait step type with a wait condition is (RunState.TestSockets.MyIndex - run)
}

else
{

wait step type with a wait condition is ((RunState.TestSockets.MyIndex +noofsockets) - run)
}

run++;
if(run >5)
{
run =0;
}

 

This will start the socket 0 with 0 second delay,loop 1 with 1 second delay for the first time.
Second time socket 1 will start first...

 

Hope this helps.

 

Ravi

0 Kudos
Message 2 of 3
(5,532 Views)

Do you mean when using Serial batch synchronization? That order is controlled by the order number specified when the thread is added to the batch by the process model. The batch process model uses the test socket index. You might be able to modify the process model or use the Batch Specification step type to remove and re-add your threads with different order numbers. There isn't currently an API to change the order number once a thread has been added. If you think that would be generally useful, you might want to post to the idea exchange requesting this: http://forums.ni.com/t5/NI-TestStand-Idea-Exchange/idb-p/teststandideas

 

Hope this helps,

-Doug

0 Kudos
Message 3 of 3
(5,406 Views)