Technological Institute of The Philippines
Technological Institute of The Philippines
Technological Institute of The Philippines
LabVIEW Programming
Activity No. 8
Table of Contents
I. Introduction
II. Results
Waveform Graph
Waveform Chart
Formula Node
2
2
4
Cluster Functions
Cluster Constant
Bundle
Bundle by Name
Unbundle
Unbundle by Name
5
5
6
7
8
String Functions
String length
Concatenate Strings
String subset
Replace Substring
Search and Replace Substring
Match Pattern
Spreadsheet String to array
9
9
10
10
11
14
15
III. Conclusion
16
I. Introduction
This activity is to introduce students the basic yet frequently used functions in the
LabVIEW software by creating a new virtual instrument. This activity will use different
functions and controls to create different programs. Such programs will have to use
numeric controls to accept data and numeric indicators to display the results.
This aims to provide students' knowledge and skills on command manipulation
using the LabVIEW software. The objective is for the students to be able to accomplish
their own program and adopt basic techniques in working with the programming
software. This experiment will also enhance the ability of the students to follow
instructions and use their critical thinking ability.
This will show students the difference between Waveform chart and waveform
graph. This will also introduce new functions such as clusters, bundle, Formula node
and different types of string functions.
II. Results
Formula Node
Clusters
A cluster is a LabVIEW data type that groups data elements of mixed types. A cluster is
similar to a record or a struct in text-based programming languages. Clusters can be
stored solitarely in a ctl.
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, 28 terminals. If a front panel contains more than 28
controls and indicators that you want to use programmatically, you can group some of
them into a cluster and assign the cluster to a terminal on the connector pane. Like an
array, a cluster is either a control or an indicator. A cluster cannot contain a mixture of
controls and indicators.
Creating Cluster Constants
Cluster Functions
In the Cluster, Class & Variant subpalette on the Block Diagram we have the following
Cluster functions we may use to manipulate and get data in or out of a cluster. In this
example we will create clusters and use these functions.
Unbundle/Unbundle by Name
Strings
A string is a sequence of displayable or nondisplayable ASCII characters. Strings
provide a platform-independent format for information and data. Some of the more
common applications of strings include creating simple text messages, Controlling
instruments by sending text commands to the instrument and returning data values in
the form of either ASCII or binary strings, which you then convert to numeric values.
Storing numeric data to disk. To store numeric data in an ASCII file, you must first
convert numeric data to strings before writing the data to a disk file. Instructing or
prompting the user with dialog boxes. On the front panel, strings appear as tables, text
entry boxes, and labels. LabVIEW includes built-in VIs and functions you can use to
manipulate strings, including formatting strings, parsing strings, and other
editing. LabVIEW represents string data with the color pink.
Concatenate Strings
Replace Substring
Searches for single or more character and replaces it with a new one, this function has
two Booleans one for replacing all searched characters and the other is for switching
case sensitivity.
Match Pattern
III. Conclusion
I can conclude from the experiment that every function in labVIEW library is very
important and it can be used simultaneously as in the feature of Labview. Each function
can be used in different program structure. Each of this function has different uses and
we should not forget each function in creating this new functions from National
Instruments.
I have also learned how each of them separately works and how different they
are from each other. One example is the waveform Chart and Waveform Graph which
looks very identical and it might be very confusing for us which to use. But if we know
each function and each data type is about, we can pick on the differences in using it and
yield good results in programming what we want to make.
This activity also added to the knowledge that I know about strings, clusters,
charts and graphs, and formula node. This enhanced our critical thinking ability test and
our readiness and the problem solving skills.