NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Test Slot Execution Order in Batch Process

Using TS4.0 with the batch model and have noticed that when a step is locked to allow only 1 slot to execute at a time,  sometimes the slots do not execute tests in order. i.e slot 4 may execute before slot 2 and so on.
 
I am writing a new subsequence to test a communications link between boards in seperate test slots. In this test the steps are also locked to allow only 1 slot to execute at a time. In addition, the slots must execute in order - slot 0, slot 1, slot 2, etc.
 
How can I make sure that the slots execute in order instead of first come, first serve?
 
Thanks,
Steve S.
0 Kudos
Message 1 of 4
(3,558 Views)
By default the order should be based on the testsocket index so things should be behaving the way you want. The only thing I can think of is maybe your slot numbers do not always correspond directly to the testsocket index of the thread. How are you getting the slot numbers? You can see the testsocket index for a thread by looking at the "RunState.TestSockets.MyIndex" property. If you base your slot number off of this you should be getting the order you are expecting.

The way the order is determined is as follows:
If you look in the "Add TestSocket Threads to Batch" sequence in the batch process model you will see the "Add To Batch" step is using the testsocket index as the order number for the batch which is what is used to determine which testsocket enters a section first.

If your slot numbers do correpsond directly to the testsocket indices then please attach an example sequence to reproduce the problem if possible and I will try to figure out why it's not working.

Hope this helps,
-Doug
0 Kudos
Message 2 of 4
(3,554 Views)
I just reread your post and I think I see what the problem might be now. Are you using Locking or Batch synchronization? If you are just using a simple Lock then the behavior is first in first out. To get the behavior you want you should use serial batch synchronization instead. If you need help on how to do this please let me know.

Hope this helps,
-Doug


Message Edited by dug9000 on 11-09-2007 04:12 PM

Message Edited by dug9000 on 11-09-2007 04:12 PM
0 Kudos
Message 3 of 4
(3,551 Views)

Hi Doug,

You're right, I was just using the simple lock. I will try the serial batch sync.

Thanks,

Steve S.

0 Kudos
Message 4 of 4
(3,547 Views)