Summary: Create clusters on the front panel and use the Cluster functions to assemble and disassemble clusters.
![]() Figure 1 |
stop button, located on the
Controls>>Buttons & Switches palette, a
numeric indicator, located on the
Controls>>Numeric Indicators palette, and a
round LED, located on the Controls>>LEDs
palette, on the front panel.
cluster, located on the
Controls>>All Controls>>Array & Cluster
palette, on the front panel.
numeric control, located on the
Controls>>Numeric Controls palette, two
vertical toggle switches, located on the
Controls>>Buttons & Switches palette,
and a horizontal fill slide, located on the
Controls>>Numeric Controls palette, in the
cluster.
Modified Cluster by duplicating
the first cluster and relabeling it. Right-click the
shell of Modified Cluster, and select
Change to Indicator from the shortcut menu.
Modified Cluster and relabel it to
create Small Cluster. Remove the second
toggle switch and horizontal fill slide
indicators. Relabel the numeric indicator
to Slide value. Resize the
cluster as shown in Figure 1.
Cluster and
Small Cluster. Modified Cluster
should have the same order as Cluster.
cluster
and select Reorder Controls in Cluster from
the shortcut menu.
![]() Figure 2 |
![]() Figure 3 |
Place the While Loop, located on the
Functions>>All Functions>>Structures
palette, on the block diagram.
Unbundle function, located on the
Functions>>All Functions>>Cluster palette,
on the block diagram. This function disassembles
Cluster. Wire the input cluster to resize
the function automatically.
Bundle function, located on the
Functions>>All Functions>>Cluster palette,
on the block diagram. This function assembles
Small Cluster.
Unbundle by Name function,
located on the Functions>>All
Functions>>Cluster palette, on the block
diagram. This function returns two elements from
Cluster. Resize this function to have two
output terminals. If a label name is not correct,
right-click the name and select the correct name from
the Select Item shortcut menu.
Increment function, located on
the Functions>>All Functions>>Numeric
palette, on the block diagram. This function adds one to
the value of Numeric.
Place the Not function, located on the
Functions>>Arithmetic & Comparison>>Express
Boolean palette, on the block diagram. This
function returns the logical opposite of the value of
the Boolean terminal of the Unbundle
by Name function.
Bundle by Name function, located
on the Functions>>All Functions>>Cluster
palette, on the block diagram. This function replaces
the values of Numeric and
Boolean Cluster and creates Modified
Cluster. Resize this function to have two input
terminals. If a label name is not correct, right-click
the name and select the correct name from the
Select Item shortcut menu.
Cluster Exercise.vi in the
C:\Exercises\LabVIEW Basics I directory.
Cluster and run the
VI again. Notice how values entered in Cluster
affect the Modified Cluster and Small
Cluster indicators. Is this the behavior you
expected?
Modified
Cluster. Run the VI. How did the changed order affect
the behavior?
Comments, questions, feedback, criticisms?
"A full introductory course on programming with LabVIEW."