User`s guide
Storing and Retrieving Test Results Chapter 5
VEE User’s Guide 223
Lab 5-4: Using Records
This exercise describes how to use the Record datatype. You
will learn how to build a record, how to retrieve a particular
field in that record, how to set a chosen field, and how to
unbuild the entire record in a single step. This exercise also
uses the time stamp function now() in a different way.
Building a Record
Build a Record with three fields: the name of a test stored as a
String, a time stamp stored as a Real Scalar, and simulated test
results stored as a four element Array of Reals. When you
retrieve these fields in the next exercise, you will see that you
can convert the time stamp into a number of different formats
for display.
Create the test name by selecting Data ⇒ Constant ⇒ Te xt and
entering Test1 in the input field. Rename the object Text
Constant. Iconize Text Constant.
9 Select Device ⇒ Function & Object Browser. Click Built- in
Functions under Type, Time & Date under Category, select
now under Functions, and click Create Formula. Place the
object below Text Constant.
10 Select Data ⇒ Constant ⇒ Real64 and place it below now().
11 You can turn this Scalar Real64 into an Array 1D by clicking
Properties... in the Real64 object menu and choosing 1D
Array.
12 Open the Constant Properties box by double- clicking on the
Real64 title bar. Select 1D Array under Configuration, change
the Size to 4, then click OK.
Enter four values into this array by double- clicking next to
element 0000 to highlight the first entry, then input the
values 2.2, 3.3, 4.4, 5.5 using the Tab key between
each entry. Iconize Real64.
13 Select Data ⇒ Build Data ⇒ Record and place it to the right
of the three other objects. Add a third data input terminal so
you can input three fields. Open each terminal by