Building a Record. Agilent Technologies VEE Pro

Add to My manuals
602 Pages

advertisement

Building a Record. Agilent Technologies VEE Pro | Manualzz

VEE User’s Guide

Storing and Retrieving Test Results Chapter 5

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 ⇒ ConstantText and entering Test1 in the input field. Rename the object Text

Constant . Iconize Text Constant.

9 Select DeviceFunction & 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 DataConstantReal64 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 DataBuild DataRecord 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

223

5 Storing and Retrieving Test Results Chapter double- clicking over the terminal and rename the three input terminals to testname, time, and data.

The Output Shape on the Build Record object toggles between

Scalar and Array. The Scalar default will be the correct choice for the majority of situations. (For more information, see the VEE Pro Advanced Techniques manual.)

14 Connect the Text Constant object to the testname terminal, the now() object to the time terminal, and the Real64 object to the data terminal on the Build Record object.

15 Run the program. Double- click on the Record data output

terminal to examine the record. It should look like Figure

134.

224

Figure 134 Output Terminal Information on a Record

VEE User’s Guide

advertisement

Related manuals

advertisement

Table of contents