Lesson 5 Clusters. TOPICS Introduction to Clusters Cluster Functions Error Clusters. Clusters. Data structure that groups data together Data may be of different types Analogous to struct in C or a record in Pascal Elements must be either all controls or all indicators
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Introduction to Clusters
1. Select a Cluster shell from the Array & Cluster subpalette
2. Place objects inside the shell
1. Select Cluster Constant shell from the Cluster subpalette
2. Place objects in the Cluster shell
Use clusters to pass several values to one terminal
Overcomes 28-terminal limit
Create new cluster
Modify existing cluster
Bundle By Name
Must have an existing cluster to use this function.
Unbundle By Name
Use the error in and error out clusters in each VI you use or build to handle errors in the VI.
The error clusters located on the Controls»Array & Cluster palette include the components of information shown
Use the Simple Error Handler to handle the error at the end of the execution flow.
The Simple Error Handler is located on the Functions»All Functions»Time and Dialog palette. Wire the error cluster to the Error In (no error) input.
You can wire an error cluster to the conditional terminal of a While Loop to stop the iteration of the While Loop.
Only the TRUE or FALSE value of the status parameter of the error cluster is passed to the terminal.
When an error occurs, the While Loop stops.
Waveform and XY Graphs
Selected from the Controls»Graphs and Charts palette
Right-click and select Visible Items to view the following items:
• Selected from the Graph subpalette
• Waveform Graph – Plot an array of numbers against their indices
• XY Graph – Plot one array against another
(point and line styles)
Uniform X axisInitial X = 0.0
Delta X = 1.0
Uniform X axis
you specify point
Each row is a separate plot:
Initial X = 0
Delta X = 1
Each row is a separate plot:
Bundle specifies point spacing of the X axis
Use the Context Help window with charts and graphs
Decision making with the Select function
Boolean Case Structure Example:
If Temp Scale is TRUE, execute True case; if temp scale is FALSE, execute False case.
• In the Structures subpalette of Functions palette
• Enclose nodes or drag them inside the structure
• Stacked like a deck of cards, only one case visible at a time
Wire all possible outputs of the case structure
String Case Enum Case Error Case
Two different ways of using an if-then statement in a Formula Node
Both structures produce the same result
How to create string controls and indicators
How to use several String functions
About file I/O operations
How to use the high-level File I/O VIs
How to use the low-level File I/O VIs
How to format text files for use in spreadsheets
Scan From String Function
Four Hierarchy Levels:
High-level File VIs
Intermediate File VIs and Functions
Advanced File Functions subpalette
and/orWrite to File
A spreadsheet yields:
End of Line
Can replace Format Into String and Write File with Format Into File in above example