NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of units in batch

Solved!
Go to solution

This seems like a simple question, but I have not been able to find the answer.

 

I am considering using the batch model for a test. Where is the number of units in a batch set? My batch will need to handle from 1-12 units, but will normally use all 12 slots.

0 Kudos
Message 1 of 8
(3,669 Views)
Solution
Accepted by topic author stephenb2

During edit time you can set it by going to Configure>>Model Options...  NOTE that you need to have a sequence file that is pointed to the Batch model open.

 

During run time you can set it by overriding Model Options callback and set it via Parameters.NumTestSockets.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 8
(3,653 Views)

Thank you jigg.

0 Kudos
Message 3 of 8
(3,644 Views)

jigg, assigning a value to Parameters.ModelData.ModelOptions.NumTestSockets in the PreBatch doesn't do what I was expecting.

 

If I set Configure>>Model Options>>Number of test sockets to 1 and then assign "Parameters.ModelData.ModelOptions.NumTestSockets = 2", I will get an index error on the second unit.

 

If I set Configure>>Model Options>>Number of test sockets to 12 and then assign "Parameters.ModelData.ModelOptions.NumTestSockets = 2", I will get a bunch of leftover test sockets after the execution of the sequence for units 2-11 that are still running.

 

What I am trying to do is get the effect of Configure>>Model Options>>Number of test sockets by a dialog.

0 Kudos
Message 4 of 8
(3,567 Views)

What version of TestStand are you using?

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

I'm using 2016.

 

I wonder if it can't be done. I might need to set the model options to use the maximum number of units in a batch and let the operator disable as needed.

 

For example, I copied the "Overriding PreBatch and PostBatch Callbacks.seq" provided with 2016 as an example. I set Configure>>Model Options>>Number of test sockets to 3 but have an expression "Parameters.ModelData.ModelOptions.NumTestSockets = 2" in PreBatch. This gives me an error in "Step 'Add AsyncControllerAndSocketSynchronizationManager to AsyncModelPluginThreadReadyFlagger' of sequence 'Model Plugins - Pre UUT' in 'ModelSupport.seq'. Test Socket 2."

0 Kudos
Message 6 of 8
(3,539 Views)
Solution
Accepted by topic author stephenb2

I don't have 2016 on this bench so I can't open your file right now.  I've attached a simple sequence that shows how to do what I'm talking about.  It is in 2014 but should be the same in 2016.

 

Hope this helps,

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

Perfect! I was not aware of the ModelOptions callback but instead was assigning the value of Parameters.ModelOptions.NumTestSockets in the PreBatch. That obviously doesn't work. Thank you!

0 Kudos
Message 8 of 8
(3,528 Views)