Professional Documents
Culture Documents
MAX MARKS
Q. No. CLOs
MARK OBTAINED
1
2
3
4
5
6
7
TOTAL MARKS
PERFORMANCE OBJECTIVES:
Upon completion of this laboratory exercise, the student technicians/engineers will be able to:
1. Perform operations related to ASCII data using strings
2. Change front panel objects programmatically using property nodes.
EQUIPMENT:
1 LABVIEW equipped PC
DISCUSSION:
STRING
Located on the Functions » String palette strings can be used in the following ways:
a. Search for, retrieve, and replace characters or substrings within a string.
b. Change all text in a string to upper case or lower case.
c. Find and retrieve matching patterns within a string.
d. Retrieve a line from a string.
e. Rotate and reverse text within a string.
f. Concatenate two or more strings.
g. Delete characters from a string.
To use data in another VI, function, or application, the data must be converted to a string and
then formatted the string in a way that the VI, function, or application can read. For example,
Microsoft Excel expects strings that include delimiters, which Excel uses to segregate numbers
or words into cells. For example, to write a 1D array of numeric to a spreadsheet using the
Write File function, the array must be formatted into a string and each numeric must be
separated with a delimiter, such as a tab. To write an array of numeric to a spreadsheet
using the Write to Spreadsheet File VI, one must format the array with the Array to
Spreadsheet String function and specify a format and a delimiter. Using the string functions
located on the Functions » String palette the following tasks can be performed:
a. Concatenate two or more strings.
b. Extract a subset of strings from a string.
c. Convert data into strings.
d. Format a string for use in a word processing or spreadsheet application.
PROPERTY NODE
TASK-1
STRING VI
Perform the following steps to build a VI that converts a numeric to a string, concatenates the
string to other strings to form a single output string, and determines the output string length. The
VI also matches a pattern in a string and converts the remaining string to a numeric.
PROCEDURE:
1. Open a new VI and build the following front panel.
a. Right-click String 2 and select ‘\’ Codes Display from the shortcut menu.
b. Change String Length and Offset Past Match to I32 representation.
j. Right-click the regular expression input terminal, select Create » Constant from the
shortcut menu, type a colon (:), and press the <Shift-Enter> keys.
k. Place the Scan from String function located on the Functions » String palette. This
function converts the string after the colon to a numeric.
TASK-2
PROPERTY NODE EXERCISE VI
In this students will build a VI that programmatically changes the position, disable color
properties of front panel objects.
REVIEW QUESTIONS
1. For each string given below, indicate the display type.
3. In the following property node, in what order will the node be executed?
FINAL CHECKLIST
All the students must make sure, before they leave the Lab:
1. Clean your equipment, materials, and work benches before you leave.
2. Return all equipment and materials to their proper storage area.
3. Submit your lab report and answers to the questions, together with your data,
calculations (if any) and results before the next laboratory sessions.