LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple counter within Control & Simulation Loop

Does anyone know a simple way of creating an incremental counter within the Control & Simulation Loop ? It's not possible to have a For loop within the Control & Simulation Loop hence the shift register method is out.
0 Kudos
Message 1 of 2
(2,881 Views)

The "simulation parameters" function on the utilities pallete outputs a "Timestep Index" that is incremented each step. That's the simplest option. Alternatively, you could use a sub VI that executes on major steps and contains a for loop.

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