NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Model step features -

I am using TestStand to run four units under test at a time, I used the batch model where you can customize some steps that you want your application to run only once during the execution (batch one thread only),
Now I'm changing to parallel model and want my application to run independently for any UUT, however I still need to have the ability to run some of the steps just once as I had when using the batch model (one thread only) Is there any variable or feature in TS that I don't know that can help me do this? running some of the steps just once while executing in parallel model fashion
 
thanks 
0 Kudos
Message 1 of 5
(3,525 Views)
Vamador,

As you probably realize, the Batch Synchronization is only available for the Batch Process Model.  You can simulate items such as run only once by checking the current TestSocket Index of an execution.  This property is stored in RunState.TestSocket.MyIndex.  You can use a Precondition on specific steps or setup an If/Then conditional section so that only certain sockets execute specific steps.  For instance "RunState.TestSocket.MyIndex == 0".

Let me know if you have specific questions.

Thanks,

Tyler T.
0 Kudos
Message 2 of 5
(3,513 Views)
Which can get tricky though because an operator may start testing with UUT 3 instead of UUT 1 for example and then when UUT 3 is still running, might start UUT 1. I have a system that can test up to 8 UUTs with the parallel model and every 2 UUTs share a common instrument. I was able to handle initialization of each instrument with setting flags in a series of station globals.
0 Kudos
Message 3 of 5
(3,507 Views)
Tyler
 
I thought about that, however Dennis is right, the thing is that I can start UUT3 or UUT1 at the beginning and I want to perform certain steps taking into accout the thread rather than the socket number, for instance, I want to open or to create a session of an instrument with whichever socket started the first, it could be UUT3, UUT4 etc. At the end I want to do the opposite, the last UUT performing the test has to tell the sequence it is time to close sessions, windows, etc
0 Kudos
Message 4 of 5
(3,497 Views)
You are correct.  For this case it makes sense to follow the suggestion of Dennis and use some global variables as flags.  You would have to have some flags for determining when instruments are in use, initialized, and shutting down.  Each socket would have to check the flags to determine if they need to initialize their instrument before they can use it.

Regards,

Tyler T.
0 Kudos
Message 5 of 5
(3,483 Views)