09-28-2023 05:10 AM
Hi,
Working on a BatchModel and I am trying to get clear the difference between PreBatch and PreBatchLoop
I understand if I want to use my own Batch and UUT Serial system I create a callback in PreBatch, within which I can assess TestSocket data and enable / disable Test Sockets, unlike the PreUUT which runs for each enabled TestSocket.
How is PreBatchLoop intended to be used, is it simply If I'm happy to use the default PreBatch but I want a couple of extra bits I place them in PreBatchLoop, but if I replace PreBatch with my own serial number system I can just but the extra bits in my own PreBatch and ignore PreBatchLoop ? or is there more to it.
Solved! Go to Solution.
10-02-2023 02:14 PM
PreBatch - this callback is called each time you go through the Batch Loop. When you execute a test by entering an Execution Entry Point (Like TestUUTs), your execution will enter what's called the Batch Loop, then display the default UUT Entry Pop Up for the user to enter in the DUT serial numbers and configure the test sockets. When that test finishes, the execution will go back to the top of the Batch Loop, show the UUT Entry Pop Up again, and allow the user to either start another test run (with the same or different UUTs), or exit - after which the execution will finish and display the report.
Inside the PreBatch override, you have access to read/write the ModelData and ModelPluginConfiguration objects before the batch run starts. You can use these to configure logging (Model Plugins), set data on your test sockets, etc.
PreBatchLoop - this callback is only called once per execution, it happens before the execution enters the Batch Loop. If you take a look at the BatchModel sequence file, you'll see when each of these callbacks is called by the process model
In PreBatchLoop, you also have access to the ModelPluginConfiguration object to configure result processing/recording, On-The-Fly settings, RunTimeVariables (just as in PreBatch), but you don't have access to the ModelData object.
In my experience, the vast majority of projects don't use the PreBatchLoop callback and just use the PreBatch callback. I would say that you would use the PreBatchLoop callback if you wanted to set up some model plugin information or configurations just once and have that information/configurations be shared across all batches run during the execution, as opposed to those configurations happening each time the Batch Loop iterates.