Creating For Loops

A For Loop repeatedly executes the subdiagram inside it the number of times you wire to the count terminal.

Complete the following steps to create a For Loop.

  1. Place a Functions»Structures»For Loop on the block diagram.
  2. Add block diagram nodes inside the For Loop to create a subdiagram that the For Loop repeats.
  3. Wire a numeric value to the count terminal to determine how many times the For Loop iterates.

    A VI will not run if it contains a For Loop that does not have a numeric value wired to the count terminal or an auto-indexing input tunnel in which the size of the array determines the iteration count.