NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom looping step option breaks on fail

I have a step set up with a custom loop to retry on a failure if the operator is prompted to. In my code I prompt the user whether to retry or not. I then return a variable Locals.Retry.

 

I have the following custom loop parameters set

 

Init: Locals.Retry=True

Increment: 0

Loop while expr: Locals.Retry

Loop Status Expression: Step.Result.Status

When it fails and the operator selects retry, the program breaks first. How can I set it so it does not break at that point?

0 Kudos
Message 1 of 2
(2,945 Views)

Steve,

 

When you say the program "breaks" first is this due to a breakpoint, where the execution is suspended, or is this where the code quits functioning due to an error? If you are referring to the second option, are you recieving any error messages, and what happens to the program after the error occurs. Does it continue to loop, does execution stop, do you get an error message, or does something else happen? Is your operator selecting the value of Locals.Retry through a message step? If so, is the message visable every time the loop iterates, or are you using an if statement to only show if the test failed?

Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 2 of 2
(2,912 Views)