Passing One Value to the Next Loop Iteration
- Updated2025-03-11
- 1 minute(s) read
Passing One Value to the Next Loop Iteration
Use shift registers on For Loops, While Loops, or (Real-Time, Windows) Timed Loops to transfer values from one loop iteration to the next.
Complete the following steps to pass values to the next loop iteration by creating shift registers.
- Add a structure to the block diagram. For example, add a While Loop to the block diagram.
- Right-click the left or right border of the loop and select Add Shift Register from the shortcut menu.
You can use multiple shift registers to remember iteration values and you can use an initialized shift register to reset the initial value of a shift register.
Note (FPGA Module)
The FPGA Module uses
groups of flip-flops
to implement shift registers.