06-27-2017 08:57 AM
Hi,
I would like to exit the batch loop when at least one execution have TermState = ExecTermState_Terminating (Value: 2). When a socket is terminated with RunState.Execution.Terminate() (e.g. because of error), the sequence goes to PostBatch, and after status dialog, I would like to set ContinueTesting flag to False (if any TermState = 2) to exit the batch loop and goes to ProcessCleanup.
I tried many things: storing RunState.Execution from socket MainSequence in an array and use it in PostBatch with GetStates method, I tried Parameters.ModelData.TestSockets[0].TermState, and some other weird ideas, but everything failed...
This information is obviously stored somewhere because status dialog displays that socket is terminated, but I can't find it 😞
I would really avoid process model modifications.
An example in the attachment.
08-07-2017 07:41 AM
Hi Bienieck,
the BUUT_ShowStatus function that presents this dialog box is called from modelsupport2.dll. The source code of modelsupport2.dll is available in the C:\Program Files (x86)\National Instruments\TestStand [version]\Components\Models\TestStandModels\modelsupport2 folder, batchuutdlg.c contains the source of this function. Based on the source code the Parameters.ModelData.TestSockets[socket_index].MainSequenceResults->Status string is checked to determine termination status ("Terminated" value.)
Best regards,