Summary: In this section, you will learn about clusters.
Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.
Clusters group data elements of mixed types, such as a bundle of wires, as in a telephone cable, where each wire in the cable represents a different element of the cluster. A cluster is similar to a record or a struct in text-based programming languages.
Bundling several data elements into clusters eliminates wire
clutter on the block diagram and reduces the number of
connector pane terminals that subVIs need. The connector pane
has, at most,
Although cluster and array elements are both ordered, you must
unbundle all cluster elements at once rather than index one
element at a time. You also can use the Unbundle By
Name function to access specific cluster elements.
To create a cluster control or indicator,
select a cluster on the Controls>>All Controls>>Array
& Cluster palette, place it on the front panel,
and drag controls or indicators into the cluster
shell. Resize the cluster shell by dragging the
cursor while you place the cluster shell.
The example in Figure 1 is a cluster of three controls.
![]() |
Create a cluster constant on the block diagram
by selecting a cluster constant on the
Cluster palette, placing it on the block
diagram, and dragging a constant into the
cluster shell.
If you have a cluster control or indicator on
the front panel and you want to create a cluster
constant containing the same elements on the block
diagram, you can either drag that cluster from the front
panel to the block diagram or right-click the cluster on the
front panel and select Create>>Constant from
the shortcut menu.
Cluster elements have a logical order unrelated to their
position in the shell. The first object you place in the
cluster is element
The cluster order determines the order in which the elements
appear as terminals on the Bundle and
Unbundle functions on the block diagram.
You can view and modify the cluster order by right-clicking
the cluster border and selecting Reorder Controls In
Cluster from the shortcut menu. The toolbar and
cluster change, as shown in Figure 2.
![]() |
The white box on each element shows its current place in the
cluster order. The black box shows the new place in the
order for an element. To set the order of a cluster element,
type the new order number in the Click to set
to text box and click the element. The cluster order
of the element changes, and the cluster order of other
elements adjusts. Save the changes by clicking the
Confirm button on the toolbar. Revert to the
original order by clicking the Cancel button.
Corresponding elements, determined by the cluster order,
must have compatible data types. For example, in one
cluster, element
However, if you change the cluster order of the indicator so
the string is element
"A full introductory course on programming with LabVIEW."