NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to control which iteration a ForEach loop should execute?

I'm using the example "SequenceFilePostStepFailure" so that the user can decide what to do when a step failes. If you choose "retry", the program returns and reruns a VI inside a ForEach loop. The problem is that the ForEach loop loads the VI with the next set of parameters.

 

Is there a way to control this? I would like the ForEach loop to not increment when the user wants to retry the step. It seems to me that the whole loop is considered 1 step, and that it is incremented because the whole loop is re run.

 

I was told that this is not the case if it's an error instead of a failure, and the user presses "retry".

 

Thanks

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

Never mind, i figuered it out. "RunState.Caller" were setting values in the wrong sequence.

0 Kudos
Message 2 of 2
(2,748 Views)