![background image](http://html1.mh-extra.com/html/national-instruments/bridgeview/bridgeview_user-manual_3445534284.webp)
Chapter 14
Arrays, Clusters, and Graphs
14-2
©
National Instruments Corporation
Note
You also can create an array and its corresponding control on the front panel and
then copy or drag the array control to the block diagram to create a corresponding
constant.
For more information on how to create array controls and indicators on the
front panel, see Chapter 14, Array and Cluster Controls and Indicators, in
the G Programming Reference Manual.
There are several ways to create and initialize arrays on the block diagram.
Some block diagram functions also produce arrays, as the following
illustration shows.
Array Controls, Constants, and Indicators
You create array controls, constants, and indicators on the front panel or
block diagram by combining an array shell with a numeric, Boolean, string,
or cluster. An array element cannot be another array, chart, or graph.
For examples of arrays, see
G Examples\Examples\General\
arrays.llb
.
Auto-Indexing
For Loop and While Loop structures can index and accumulate arrays at
their boundaries automatically. These capabilities collectively are called
auto-indexing. When you enable auto-indexing and wire an array of any
dimension from an external node to an input tunnel on the loop border,
components of that array enter the loop, one at a time, starting with the first
component. The loop indexes scalar elements from 1D arrays, 1D arrays
from 2D arrays, and so on. The opposite action occurs at output tunnels—
elements accumulate sequentially into 1D arrays, 1D arrays accumulate
into 2D arrays, and so on.
Note
Auto-indexing is the default for every array wired to a For Loop. You can disable
auto-indexing by popping up on the tunnel (entry point of the input array) and
selecting Disable Indexing.
x[i]=ASCII code
of i
th
character
Sine Pattern
String to Byte Array