09-09-2012 06:04 PM
Hello Everybody,
I'm using the SequenceFilePreStep and SequenceFilePostStep callbacks to call a subsequence that monitors the state of emergency stop and safety interlock digital inputs. During a test sequence, if either of these inputs are low, I would like to either:
I've considered using RunState.Engine.TerminateAll(), but this does not run the process cleanup.
Could someone please give some guidance on how I can achieve the bulleted behaviour specified above?
Many thanks,
Cameron
09-10-2012 04:36 PM
Cameron,
It seems this question is related to general error handling in TestStand. I would recommend one of the following solutions:
1. On the step where you are checking your emergency stop and safety interlock digital inputs, throw a runtime error by setting the following properties of the step:
Step.Result.Error.Code = Your error code.
Step.Result.Error.Msg = "Your message."
Step.Result.Error.Occurred = True
Setting Step.Result.Error.Occurred to True will bring up a popup in TestStand with the Code and Msg displayed. The user can then choose the action to take to respond to this error. TestStand will then run the Cleanup section of the sequence file (and all calling sequences). PostUUT will also be executed.
You can configure the default behavior of the error handler in Configure > Station Options > Execution (Tab) > On Run-Time Error
2. Alternatively, on this step, set the following properties of the step:
Step.Result.Status = "Failed"
Step.Result.ReportText = "Your message."
This will show that the step failed in the report, and print your message to the report. The sequence will continue to execute and complete as normal.
3. Override the SequenceFilePostStepRuntimeError and StationPostStepRuntimeError callbacks. These are optional error handling sequences (empty in the Process Model) that you can modify in your sequence file.
4. Use the Post Actions > On Pass or On Fail property of the step to "Goto step" > "Cleanup"