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 you effectively use if,for, type loops in TestStand. Do you have to use the goto command or is there a way of writing actual c type code (perhaps using the statement step in teststand) with the variables allready declared.

I assume your loop is more than just one step. You should use the 'Loop Options' for a single step.

For looping on a group of steps, you can place them all in a sub sequence and then set the 'Loop Options' for the 'SequenceCall' step to set up your looping conditions. Pass values to and from the sub-sequence by Parameters.

You can keep the loop inline with the rest of your sequence by using 'Goto' or using 'Goto destination' in the Post Actions tab of the condition step.

Using a sub sequence will keep it easier to read and maintain.
Message 2 of 2
(3,223 Views)