NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Break execution after custom run-time error handler callback

Solved!
Go to solution

I am using Teststand 2010 SP1 and have written a custom runtime error handler based on the ErrorHandlerExample example that ships with TestStand. It has been implemented as a StationPostStepRuntimeError callback in my Station Callbacks folder.  I have modified the example as follows:

(1) Added code to turn off the UUT transmitter if it was on.

(2) Added a call to an executable that sends an email to the currently logged in user.

(3) Calls the standard TestStand run-time error dialog using the Engine DisplayRunTimeErrorDialog method.

(4) Processes the user's selection, then turns on the UUT transmitter for any option other then Abort.

 

The callback also checks the status of the Break and "Don't Show again for this execution" options selected by the user.  If the user selects Break then the only option I can find is to call the API Execution.Break() method which breaks the execution right there in my callback. The user then has to single step there way out of the callback.   Is there a way of instructing TestStand to complete the callback execution and break immediately after completing the callback (i.e.at the step following the error)?  I've zipped up and attached my modified sequence.

 

Alternatively, is there a better way of doing this?

 

Regards,

 

David

0 Kudos
Message 1 of 3
(3,374 Views)
Solution
Accepted by topic author David_Jackson

Didn't have a chance to try it yet but maybe StepOut is your solution?

 

From the TS Help:

 

StepOut Method
Syntax
Execution.StepOut

Purpose
Resumes the execution from a suspended state and then suspends the execution again after execution of the current sequence completes.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(3,371 Views)

Thanks jigg.  That works just fine for me.Smiley Happy

 

Regards,

 

David

0 Kudos
Message 3 of 3
(3,364 Views)