To download NI software, including the products shown below, visit ni.com/downloads.
This example shows how to check the state of the execution, and change the behavior based on whether the execution is terminating.
When you terminate a TestStand execution, the Cleanup step group for each executing sequence is still run in order to ensure that any shutdown code that may be present is executed. In some cases, you may need to change the behavior of the shutdown code based on whether the execution is terminating or running normally. To accomplish this, check the value of the following property:
RunState.Execution.GetStates (runState, termState)
The termState out parameter returns the current termination state of the execution. the TestStand API Help provides detailed information of the possible values for each parameter:
TestStand API Reference Help: GetStates Method
Determining Termination Status - TS2012.seq
TestStand 2012 or Compatible
Determining Termination Status - TS2017.seq
TestStand 2017 or Compatible
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
How to do the similar thing but in PostBatch callback?