Executes its subdiagram n times. The iteration terminal provides the current loop iteration count, which ranges from 0 to n-1.
Current loop iteration count. The loop count always starts at zero for the first iteration. If the iteration count exceeds 2,147,483,647, or 231-1, the iteration terminal remains at 2,147,483,647 for all further iterations. If you need to keep count of more than 2,147,483,647 iterations, you can use shift registers with a greater integer range.
Number of times to execute the code inside the For Loop. The count terminal outputs the number of times the loop executes. If you wire 0 or a negative number to the count terminal, the loop does not execute. This terminal is displayed by default.
Point through which data enters or exits a structure.
In addition to this basic purpose, tunnels can assume the following functionalities:
Member of a pair of terminals that passes a value from one iteration of a loop to the next iteration. After the initial loop iteration, the left shift register in the pair returns the value it receives from the right shift register from the previous iteration. Refer to Accessing Data from the Previous Loop Iteration for more information about passing values from the previous iteration to the current iteration.
Refer to Loop Timing for more information about controlling the execution speed of a loop.
Refer to Accessing Data from the Previous Loop Iteration for more information about passing values from the previous iteration to the current iteration.
When you wire data directly through a For Loop that iterates zero times, all indicators wired to output tunnels display the default value for the data type. All indicators wired to output shift registers display the data wired to the input shift register.
By not wiring a value to the count terminal when auto-indexing is enabled, you allow LabVIEW to set the count terminal to the array size, ensuring that the loop iterates once for each element in the array.
Wiring a value to the count terminal while auto-indexing is enabled causes the For Loop to use the smallest of the choices between the count terminal and the input array size to determine the number of loop iterations. For example, if an auto-indexed array enters the loop with 10 elements and you wire a value of 15 to the count terminal, the loop executes 10 times.
A For Loop can process multiple arrays one element at a time using multiple auto-indexing input tunnels. In this situation, the loop uses the smallest array size to determine the number of loop iterations. For example, if two auto-indexed arrays enter the loop with 10 and 20 elements respectively, the loop executes 10 times, processing all elements of the first array but only the first 10 elements of the second array.
Installed By: LabVIEW Communications System Design Suite (introduced in 1.0)
Where This Node Can Run:
Desktop OS: Windows
FPGA: All devices (only within an FPGA Algorithm)
This site uses cookies to offer you a better browsing experience. Learn more about our privacy policy.