01-10-2017 11:56 AM
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.
Solved! Go to Solution.
01-10-2017 02:18 PM
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,
01-10-2017 03:05 PM
Thank you jigg.
01-19-2017 04:47 PM - edited 01-19-2017 04:48 PM
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.
01-24-2017 10:05 AM
What version of TestStand are you using?
01-24-2017 10:37 AM
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."
01-24-2017 01:39 PM
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,
01-24-2017 02:41 PM
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!