LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

When a while loop is run how can the iteration value be saved so it can be used as some input value the next time the loop is run?

When a while loop is run how can the iteration value be saved so it can be used as some input value the next time the loop is run?

0 Kudos
Message 1 of 6
(3,074 Views)

Shift registers.  Put a shift register on your outer loop as well as the inner loop.

0 Kudos
Message 2 of 6
(3,068 Views)

 

Thank you for your reply. But can you elaborate by giving an example in the form of a vi.

 

Thanks

0 Kudos
Message 3 of 6
(3,027 Views)

The iteration terminal always starts at zero with every new run, so you need to make your own.

As Ravens already said, create shift registers in the inner and outer loop and connect them all. Initialize outside with zero and add a "+1" in the innermost loop. See how far you get.

0 Kudos
Message 4 of 6
(3,015 Views)

@gates123 wrote:

Is this what you are saying?


Yes, that looks about right. If you want the inner loop to also start with zero on the indicator (like any normal loop!), wire the indicator before the increment function.

0 Kudos
Message 6 of 6
(2,966 Views)