beautypg.com

Fieldnames “list of fieldnames, Example 1, Example 2 – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 201: Example 3

background image

Section 6. Data Table Declarations and Output Processing Instructions

FieldNames “list of fieldnames”

The FieldNames instructions may be used to override the fieldnames that the
CR9000X generates for results sent to the data table. Fieldnames must
immediately follow the output instruction creating the data fields. Fieldnames
are limited to 19 characters. Individual names may be entered for each result
generated by the previous output instruction or an array may used to name
multiple fields.

When the program is compiled, the CR9000X will determine how
many fields are created. If the list of names is greater than the
number of fields the extra names are ignored. If the number of
fields is greater than the number names in the list of fieldnames,
the default names are used for the remaining fields.

NOTE

When the program is compiled, the CR9000X will determine how many fields
are created. If the list of names is greater than the number of fields the extra
names are ignored. If the number of fields is greater than the number names in
the list of fieldnames, the default names are used for the remaining fields.

Example 1
Sample(4, Temp(1), IEEE4)
FieldNames “IntakeT, CoolerT, PlenumT, ExhaustT”

The 4 values from the variable array temp are stored in the output table with the
names IntakeT, CoolerT, PlenumT, and ExhaustT.

Example 2
Sample(4, Temp(1), IEEE4)
FieldNames “IntakeT, CoolerT”

The 4 values from the variable array Temp are stored in the output table with 2
individual names and the remainder of the default array Temp:
IntakeT, CoolerT, Temp(3), and Temp(4),

Example 3
Sample(4, Temp(1), IEEE4)
FieldNames “IntakeT(2)”

The 4 values from the variable array Temp are stored in the output table with
IntakeT, an array of 2, and the remainder of the default array Temp:
IntakeT(1), IntakeT(2), Temp(3), and Temp(4),

Fieldnames can also be used to put the programmer’s description of the field
into the “Process” field. The description for each field is entered using a colon
and description following the fieldname.

FieldNames(“fieldname1:Description1,fieldname2:Description2,…”)

The ‘ : ’ character indicates the start of the description. Descriptions can have
any characters in them except commas. The description is optional.

6-17