NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Go to PostUUT or ProcessCleanup from SequenceFilePreStep or SequenceFilePostStep

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:

 

  • Proceed to PostUUT to display an failure message on the report (i.e. door opened or emergency stop pressed)
  • Proceed directly to the ProcessCleanup subsequence.

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

0 Kudos
Message 1 of 2
(3,789 Views)

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"

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,764 Views)