Chapter 14
Arrays, Clusters, and Graphs
14-16
©
National Instruments Corporation
Block Diagram
7.
Place a Build Array function (Functions»Array) on the block
diagram. Expand it with the Positioning tool to have five inputs.
8.
Pop up on the first input in the Build Array node and select Change to
Array. Do the same for the fourth input.
9.
Wire the arrays and scalars to the node. The output array is a 1D array
composed of the elements of
array 1
followed by
scalar 1
,
scalar 2
, and the elements of
array 2
and
scalar 3
, as the
following illustration shows.
10. Run the VI. You can see the values in
scalar 1
,
scalar 2
,
scalar 3
,
array 1
, and
array 2
appear in a single 1D array.
11. Save the VI as
Build Array.vi
in the
BridgeVIEW\Activity
directory.
End of Activity 14-3.
Efficient Memory Usage: Minimizing Data Copies
To save memory, you can use single-precision arrays instead of
double-precision arrays. For information about how memory is allocated,
see the section Monitoring Memory Usage in Chapter 28, Performance
Issues, in the G Programming Reference Manual.