NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Index of step where RTE occurred

Hi!
How do I retrieve the index of the step that caused a runtime error? I have a message popup in
my Cleanup with precondition 'RunState.SequenceError.Occurred == True'' and I would like it to display "RTE
caused by step ...###"
 
/Stefan
0 Kudos
Message 1 of 3
(2,966 Views)

Hi,

You could use one of the Callback sequences to obtain the step index and save this value. Some like the SequenceFilePostStepRuntimeError.

Or

The first step in the cleanup, use an extression to obtain the value of RunState.PreviousStepIndex, this should be the step that errored.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(2,959 Views)
Ray!
I tried both and was successful using the Callback, thank you very much.
 
(However, using the RunState.PreviousStepIndex in the first step of the Cleanup,
always returns -1 because the index seems to reset when moving from one step group
to another)
 
Regards,
Stefan
0 Kudos
Message 3 of 3
(2,943 Views)