3. Review Question 1
True or False?
1. Arrays can contain only one data type.
2. An array must contain at least one element.
3. The Bundle function can be used to add elements to a
cluster.
4. Clusters can contain both controls and indicators within the
same shell; however, arrays cannot.
5. It is possible to have clusters containing arrays as well as
arrays containing clusters.
4. Review Question 1
True or False?
1. Arrays can contain only one data type. TRUE
2. An array must contain at least one element. FALSE
3. The Bundle function can be used to add elements to a
cluster. FALSE
4. Clusters can contain both controls and indicators within the
same shell; however, arrays cannot. FALSE
5. It is possible to have clusters containing arrays as well as
arrays containing clusters. TRUE
5. Review Question 2
The Error Cluster contains which of the following?
a) Boolean
b) Array
c) String
d) Numeric
e) Cluster
6. Review Question 2
The Error Cluster contains which of the following?
a) Boolean - status
b) Array
c) String - source
d) Numeric - code
e) Cluster
7. • Cluster elements have a logical
order unrelated to their position in
the shell
• You can view and modify the
cluster order by right-clicking
the cluster border and
selecting Reorder Controls
In Cluster from
the shortcut menu
• Order determines how cluster is
unbundled
Clusters: Order
8. • Clusters differ from arrays in that they are a fixed size
• Clusters can contain mixed data types; arrays contain only
one data type
• Like an array, a cluster is either a control or an indicator
and cannot contain a mixture of controls and indicators
• You can create a cluster of clusters, cluster of arrays,
array of clusters, but NOT an array of arrays
Clusters vs. Arrays
9. Enumeration
• An enum represents a pair of values, a string and
a numeric, where the enum’s value is one of a
defined list of value pairs
• Appears as a string to you, and a number to computer
12. • Chart:
• Remembers history – new point added to end of plot
• Good for inside a loop
Graphs vs. Charts
• Graph:
• New plot of all new data
• Good for outside the loop
• Use the Context Help window
to determine how to wire multi-
plot data to Waveform Graphs
and XY Graphs
13. • Right-click the chart and select Advanced»Update
Mode from the shortcut menu
• Strip chart is the default update mode
• Scope chart and Sweep chart modes display plots
significantly faster than the strip chart mode
Chart Update Modes
Cluster are a fixed size because you cannot add an object to an existing cluster – only change the values within the object. You can create a new cluster which contains an existing cluster (cluster within a cluster), but this is still a new cluster. Great article about Arrays and clusters: http://zone.ni.com/devzone/cda/tut/p/id/7571
An enum (short for enumeration) is a data type that pairs a number with a string (ie, months of the year with the number 0-11). The list of pairings is maintained as part of the data type (this is important when it comes to type definitions and is different from a ring, which looks similar)
Right-click and select Edit Items… to bring up the window in which you can add/delete/move items on the list.
Chart can be used outside a loop and Graphs can be used inside a loop. However, because of the update methods for charts and graphs, the are often used inside and outside loops, respectively.If you place a graph inside a loop and send a new data point to it, only that data point will be plotted- not the entire history of data. You would have to build an array with each loop iteration and send the entire array to the graph in order to see the historical data with each loop iteration. This is commonly overlooked by new LabVIEW users.
Strip chart – once the right side of the plot area is reached, the next point added causes the entire plot to shift to the left, as if it were scrollingScope chart- once the right side of the plot area is reached, the next point added causes the plot to disappear and the new point is added to the far left side Sweep chart- once the right side of the plot area is reached, the next point added causes the plot to remain and the new point is added to the far left side- a red bar shows where new data is overwriting the old data a