Controlling Repetitive Operations Using Loops
- Updated2025-08-15
- 1 minute(s) read
Use the For Loop and the While Loop to repeat blocks of code or operations on the block diagram.
Note If you open a
refnum
inside a For Loop or While Loop, close that refnum for each iteration of the loop. Otherwise, LabVIEW repeatedly allocates memory for the refnum and does not free the memory until the VI finishes running.
Related Topics
- Specifying the number of times a For Loop executes
- Specifying conditions for While Loops
- Processing individual elements in an array or a collection with a loop
- Handling errors using conditional terminals on loops
- Transferring values between loop iterations
- Configuring a Timed Loop
Related Information
- For Loops: Repeating Operations a Set Number of Times
- While Loops: Repeating Operations Until a Condition Occurs
- Refnum Controls and Indicators
- Specifying the Number of Times Operations in For Loops Execute
- Specifying Conditions for While Loops
- Processing Individual Elements in an Array or a Collection with a Loop
- Handling Errors Using Conditional Terminals on Loops
- Transferring Values between Loop Iterations
- Configuring Settings of a Timed Structure (Real-Time, Windows)