10-28-2009 11:19 PM
Hi All,
I want to control the iteration count of FOR loop, is it possible? I've a FOR loop, which iterates 5 times. I'm checking a condition in FOR loop and if I get FALSE then I want to repeat the same i.e in this case iteration count (i) of FOR loop should not get incremented. Thus this FOR loop will iterate 6 time instead of 5 times.
Thanks & Regards,
Shrini
10-29-2009 12:01 AM
You can't repeat an iteration of a For loop. Then it would no longer be a For Loop. A For loop iterates a fixed number of times. (Though in newer versions of LabVIEW, there is a Conditional For Loop where you can terminate the Loop early).
What you need to do is use a While Loop and maintain your iteration "counter" in a shift register. If you want the next number, add a 1 to it. If you want to repeat the number, then you don't and just feed the same number into the shift register.
10-29-2009 12:09 AM
I'm checking a condition in FOR loop and if I get FALSE then I want to repeat the same