NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to force a sequence to fail on an error as well as a fail result

Solved!
Go to solution

I want to force a sequence to fail on an error as well as a fail result.  This has come about because the only way I can find to prevent Labview error dialogues from popping up in TestStand is to use the Ignore Run Time Errors property on a step. I don't want these dialogues to occurr because operators don't know how to deal with them. The problem with using the Ignore Run Time Error property is that now that a step that had a run time error won't kill the sequence. I really want to interpret an error as a failure.

 

I found a link to this same question from years ago and the answer seems reasonable.  See http://forums.ni.com/t5/NI-TestStand/Force-TestStand-Step-to-Fail-When-Error-Occurs/td-p/435510. 

 

In that post I found the following: "Use the Callback Sequence SequenceFilePostStepRuntimeError. In this sequence, set Parameters.Step.Result.Status = "Failed" and Parameters.Step.Result.PassFail = False". But when I pull up the SequenceFilePostStepRuntimeError callback, niether of those parameters show on the parameters list. I have Parameters.Step and Parameters.Result, but nothing populated below those main categories.  I can't figure out if I have an installation error, or if the callback has been altered in the intervening years.

 

Anybody have any hints?

Thanks,

Dave

0 Kudos
Message 1 of 2
(4,787 Views)
Solution
Accepted by rimfire44

Put a breakpoint in your sequence a little after the step and check the runstate variables to see if they match up. That post was made in 2006 and there have been a lot of changes since then. Adding in the breakpoint should allow you to see what variables are created at runtime, like the passfail. You can then enter them into the expression browser. When chacking the statement though, you will get a warning saying that the syntax might be incorrect but it's fine. It also says in that message that if you know what you are doing the variable could be created at runtime and you will be fine.

Rob S
Applications Engineer
National Instruments
Message 2 of 2
(4,764 Views)