NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SequenceFilePostStep callback failures

Solved!
Go to solution

I'm using the TestStand "SequenceFilePostStep" engine callback to run several short subsequences. If any of these short subsequences in this callback fail, I want the main sequence to detect this and also fail.

 

I can detect the sequence failure when stepping inside the "SequenceFilePostStep" callback by reading RunState.SequenceFailed. However when I'm returned to MainSequence this variable is set to False. I've also tried searching the knowledge base and used the alternatives "ThisContext.RunState.SequenceFailed" and "RunState.Main.RunState.SequenceFailed" - all are set to false.  Is there a variable that remembers the status of the engine callback "SequenceFilePostStep", or do I need to setup a file global to pass this status back to the main sequence?

0 Kudos
Message 1 of 3
(2,998 Views)
Solution
Accepted by topic author bilby42

Place a statement step as the last step in SequenceFilePostStep (very bottom of Cleanup). 

Give it a precondition of: RunState.SequenceFailed

Set the Expression to: RunState.Caller.RunState.SequenceFailed = True

 

If you want to see what failed on the report you will have to do additional steps.

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

Thanks JiggaWax. Works perfectly.

0 Kudos
Message 3 of 3
(2,991 Views)