From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I redirect execution to a specific step in the upper most sequence (Main.seq) from however deep th

e program may be in the call stack when an operator makes a selection on the LabVIEW operator interface? My goal is to allow an operator to break out of multiple nested loops, while insuring the completion of the remainder of the upper most level sequence.I cannot put these (remainder) items in the Cleanup group because they contain multiple nested loops themselves.
Thank-you
0 Kudos
Message 1 of 2
(2,565 Views)
e program may be in the call stack when an operator makes a selection on the LabVIEW operator interface? My goal is to allow an operator to break out of multiple nested loops, while insuring the completion of the remainder of the upper most level sequence.Hi Jacy,
I've done this through the PostStep Engine callback. I use a flag set at the appropriate level (in the attached example it's a file global) and I look at this, plus the name of the current sequence and the current step's step group to find out if I should set the Runstate.Caller.Runstate.NextStepIndex to the last step (actually ) in the current step group. (Make sense? - Although I have a Parameters.Step in the callback sequence, I need to find out the sequence that called it to control where that sequence goes next)
This then does a globalised "skip" on every step so that it exits back up to the top level. You could check for other flags, such as a list of critical sequence names that have to execute, or even skip out of a cleanup by modifying t
he precondition of the statement step in the SequencePostStep callback.Each of the steps have a little comment.
If you wanted to check a flag again, insert a step at the end of each sequence, and change the PostStep callback sequence's statement step to go one step less than the end of the sequence.

Hope this helps

Sacha
// it takes almost no time to rate an answer Smiley Wink
Message 2 of 2
(2,565 Views)