NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Model - serial exectution

HI,
 
I need your help to get started with a batch model.  My objective is to run 9 cards in a batch but to test them in series...one at a time.
 
The only reason I'm using this batch is due to the long power up time.  Therefore, I want all of them to power up together and then to test them one after another.
 
I believe this is the simplest situation for a batch model and I wish to start with something simple.
 
I attach a simple seq file I'm experimenting with.  The file has 2 steps (messages).  I notice that the sequence will read the first message of each socket, only then
the second message of each socket. 
 
How do I force it to execute the two messages of one socket and only then, the 2 messages of the next socket and so on...
 
thanks
Rafi
 
0 Kudos
Message 1 of 7
(4,394 Views)

Hey Rafi,

Take a look at this sequence.  Use the Batch Synchronization step.  Configure it to Enter and serial.  Then put another one after the message popups and configure it to exit.

TIP: when using the batch model and you have a bunch of finished execution windows open.  Use ctrl-d to close them all at once.

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 7
(4,390 Views)

Hi Jigg

Thanks very much for your effort.  However, I can't open it because I'm using TS3.5 (I should have mentioned it).  Can you convert it please to 3.5?

Is ver 4 upgraded regarding the btach steps? 

 

Thanks

0 Kudos
Message 3 of 7
(4,376 Views)
Hey Rafi,
 
Tell me if this one works for you.  The Batch Synchronization sections haven't changed since TS 3.0. 
 
There are 3 different sync section for the batch/parallel models: Serial (Each thread takes a turn), parallel (each thread goes at the same time except they start and stop at the same time), one thread only (only one thread executes. the others are ignored and skip all the steps.  this one is handy if you are putting all the sockets in an oven and you only need one thread to execute or something like that). 
 
Check out the examples here: C:\Program Files\National Instruments\TestStand 3.5\Examples\Synchronization  if you want to see some cool stuff on batch testing.  It shows the proper usage of the synchronization steps.
 
I'm also adding a picture showing you where and how to add the sync steps.  Once you add them you can right click on them and configure them for different things.
 
Let me know if you have additional questions.
 
Regards,
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Download All
0 Kudos
Message 4 of 7
(4,374 Views)

One more thing Rafi,

Here's a cool test as well: C:\Program Files\National Instruments\TestStand 3.5\Examples\MultiUUT  This one demonstrates how you can set only one step to have different batch synchronization sections.  It demonstrates all three synch sections.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 7
(4,371 Views)

Jigg and thanks

Actually, I oversaw the feature Configure-->Model Options-->Sequential Batch Mode which does exactly what I wanted.

However, I tried to see what the synchronization step is doing and could not figure it out. 

1) I set Configure-->Model Options-->Default Batch Synchronization--> Parallel

2) I ran the file you fixed for me and expected the Batch Synchronization step (Serial) to override the Parallel mode I had set previously. 

3) The result was that the sequence run as Parallel.  Therfore, i don't really understand whats the Batch Synch. step is doing and when to use it.

 

Thanks in advance for your explanation

Rafi

0 Kudos
Message 6 of 7
(4,351 Views)
Hey Rafi,
 
The model option overrides any settings in the sequence file.  Therefore, since you set parallel in the model options then ALL sequences will run with a parallel synchronization.  Try setting it to One Thread Only and you will see that only one thread executes.  I assume this is expected behavior.  You want to set the model options to Don't Synchronize and uncheck the Sequential Batch Mode.  Then the Synchronization steps will work as expected.  Otherwise they get overridden.  
 
Let's assume you have a sequence that is executing 3 sockets.  The first 4 steps of your test can execute in parallel.  The next 2 you want to execute in serial (i.e. 1st socket executes both steps, then 2nd socket executes both steps, then 3rd socket executes both steps).  Then you have 4 more steps that all sockets can execute simultaneously.  Suppose each of the 10 steps takes approximately 1 minute to execute.  If you have your setting in the Model Options to be Sequential Batch Mode you will find that the total test time = 30 minutes.  This is because one socket executes the entire test then the next one takes it's turn.  If you have that setting turned off in the Model Options and you have a Synchronization section (i.e. a Batch Synchronization step that  starts a Serial section for those 2 steps that have to execute in serial) then your entire test will only take 14 minutes to execute.  4 minutes for the first 4 steps. 6 minutes for each socket to execute the 2 steps serially.  and 4 minutes for the last 2 steps.  This decreases your test time by more than half.  I'm attaching a demo of this.  Except instead of minutes it uses seconds.  Don't click the OK button on any of the dialogs that popup. They will close after they have been open for 1 second. 
 
1- Open the Sequence that's attached
2- Configure Model Options with the Sequential Batch Mode options checked.  Also set it to use 3 test sockets.
3- Run the sequence at it should take about 30 seconds.
4- Configure the Model Options with Sequential Batch Mode unchecked and the drop down set to Don't Synchronize
5- Run the sequence and it should take about approximately 14 seconds.  It may be a little more because of the multithreading.
 
The other pitfall/advantage, depending on how you look at it, to setting this option in the Model Options is that everyone using that station is forced to execute whatever you set in there. 
 
Hopefully this will help clarify a little.  This is just information only.  I'm not saying that setting the Model Options is bad.  If that's what you ultimately want as the developer then it's your decision.  It all depends on what you want.  I personally prefer the synchronized sections inside of the sequence because then it is not limiting to other sequences running on the station and if you have a whole bunch of people writing sequences then they are given more freedom.
 
If you want more info on the 3 synchronized sections look in the TestStand help under Batch Synchronization Enumeration.  Or look in the TestStand manual: http://www.ni.com/pdf/manuals/322016b.pdf  starting on page 11-56 at the bottom and go until page 11-61.  There are some caveats pointed out in there.
 
Let me know if you have any more questions or need clarification on anything.
 
Regards,
 
 
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 7 of 7
(4,344 Views)