NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Any way that change the number of thread for rendezvous programmally?

I want test four UUTs in batch model in TS, a power supply will be shared for four UUTs during testing and it will be turn on at the bigginning of the sequence (let's call this step "Power on") but after step "UUT detecting" . if UUT can't be detected in any thread, the corresponding thread will be stopped and the action is jump to "End group", remaining threads continue.
 
Assume that I use Rendezvous function for step "Power on" and "Create rendezvous" placed in Setup and the parameter "Number of Threads per rendezvous's setting" is 4.
 
Problem is: If "socket 1" can't detect the UUT, that " socket 1" gose to "End group", Rendezvous on step "Power on " waiting for 4 threads but here loss one. it will wait here causing "hang up".
 
Questions:
--- Can I change the number of thread for rendezvous programmally before rendezvous executed?
--- Any other way to achieve my goals described above?
 
Thank you every one.
 
0 Kudos
Message 1 of 4
(3,744 Views)
Steven,
 
It seems that you want to execute the "power on" step only once no matter how many threads you have.
In order to accomplish this you could use the batch synchronization step type instead of the rendezvous ste type.
 
1. In the setup section insert a batch synchronization step and set the operation to be 'Enter Synchronized Section' and  the section type to be 'One thread' only.
2. Insert the step that turns the power supply on.
3. Insert a batch synchronization step and set the operation to 'Exit Synchronized Section'.
 
Now only one thread will execute the 'Power on' step.
You can still use a Renzdevous to wait for all the steps to finish in order to turn the power supply off in the cleanup group.
 
Hope it helps.
Antonio Lie
 
Message 2 of 4
(3,730 Views)
This is exactly the use case for the Batch synchronization step types. Even for the cleanup case that Antonio was talking about, batch synchronization would be a better choice then a rendezvous. For all kinds of batch synchronization, the enter and exit batch synchronization steps act like automatically maintained rendezvous in that they wait for all non-terminated threads in the batch to get to the section before continuing. I recommend reading the documentation for the batch synchronization feature of TestStand for more details.

Hope this helps,
-Doug
Message 3 of 4
(3,722 Views)
Hello Antonio and Doug,
 
I got it, thanks for your help...Smiley Wink
 
Br, Steven
0 Kudos
Message 4 of 4
(3,705 Views)