Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Creating For Loops

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

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 For Loop on the block diagram.
  2. Place objects inside the For Loop to create a subdiagram that the For Loop repeats.
  3. Wire a numeric value to the count terminal or wire an array to an input tunnel on the loop border 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.

You also can add a conditional terminal to a For Loop to configure the loop to stop when a Boolean condition or error occurs. A For Loop with a conditional terminal executes until the condition you define occurs or until all iterations complete, whichever happens first.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit