10-12-2021 02:14 PM
Like the Batch Model Test UUTs dialog window, but only want to see it once.
How should stop the loop?
The batch model is for a subsequence, called multiple times by the main sequence in sequential model.
Solved! Go to Solution.
01-27-2022 04:46 PM - edited 01-27-2022 04:48 PM
Hi zou,
When you say you want to see it "once" do you mean once per call of the subsequence that executes through the batch model or once during the lifetime of the execution?
If you mean once during the lifetime of the execution, that gets pretty tricky as you're then wanting calls to the same model to behave differently which requires some level of tracking between batch model executions. You could use a variable to suppress the model dialog but that would cause empty strings to be set for the UUT and batch serial numbers in the report and I would assume you want the information entered on the first instance of the dialog to persist between invocations. At that point, you'd have to handle saving back that serial information and programmatically re-applying it in the PreBatch callback to avoid empty serial info. on subsequent calls of your subsequence.
EDIT: I should preface this with you should thoroughly test this if you're going to do it. While it seems to work on my end, model modifications can be pretty difficult to vet to ensure they don't have unintended consequences. If you want to see it once per call of the subsequence, you can modify the batch model by skipping the loop steps and adding a terminate call just after the loop end to simulate the terminate that would typically come from the batch dialog (more detail coming). If you're going to modify the batch model, you should copy the existing batch model from C:\Program Files\National Instruments\TestStand <version>\Components\Models\TestStandModels\BatchModel.seq to the same location in the TestStand public directory (C:\Users\Public\Documents\National Instruments\TestStand <version> (64-bit)\Components\Models - you'll need to create a "TestStand Models" directory there to copy the model sequence to). By placing it under the same directory location in the public directory structure, any model there of the same name as a model in the TestStand main directory structure will essentially override that default TestStand model, so if you don't want all invocations of the batch model to have this modification, I would suggest re-naming the modified model sequence you copy to the public directory. This will allow you to point to either one selectively rather than always selecting the override when you select the batch model.
Once you have the model sequence copied into the public directory to ensure you preserve the default model, you can modify the model as follows:
Once you've made the modifications, you just use the path of the modified model in your subsequence call to execute that subsequence through the modified model.
01-27-2022 08:21 PM
Thank you so much for reply.
I solved the problem last year by overwrite the pre batch, post batch, etc. calls.
02-15-2022 01:27 PM
Instead of modifying the Batch process model you can just run the Single Pass execution entry point (Ctrl-F5) from the Execute menu. If running from a custom User Interface; then try the appropriate button control to the same Single Pass execution entry point. This will run the Batch test one time
02-15-2022 01:34 PM
That's not going to work for my case.
I'm using Single execution in TestStand.
The main seq is in sequential model; a subseq is in batch model, called repeatedly.