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

Enabling Auto-Indexing for Loops

NI LabVIEW 8.6 Help
June 2008

NI Part Number:
371361E-01

»View Product Info

If you wire an array to a For Loop or While Loop, you can read and process every element in that array by enabling auto-indexing. When you wire an array from an external node to an input tunnel on the loop border and enable auto-indexing on the input tunnel, elements of that array enter the loop one at a time, starting with the first element.

Complete the following steps to enable or disable auto-indexing for a tunnel on a loop.

  1. Right-click the tunnel at the loop border.
  2. Select Enable Indexing or Disable Indexing from the shortcut menu to enable or disable auto-indexing.

To avoid default data output values when a loop does not execute, enable auto-indexing every time a For Loop has an output tunnel. Auto-indexing for While Loops is disabled by default.

Note Note  The loop indexes scalar elements from 1D arrays, 1D arrays from 2D arrays, and so on. The opposite occurs at output tunnels. Scalar elements accumulate sequentially into 1D arrays, 1D arrays accumulate into 2D arrays, and so on.

Resources


 

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