beautypg.com

4 expressions in arguments, 5 arrays of multipliers and offsets – Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual

Page 141

background image

Section 7. Installation

141

 

Table 18. Rules for Names

Name

Category

1

Maximum Length

(number of

characters)


Allowed characters

Data-table name

20

Field name

39

Field-name

description

64

and other names.

1

Variables, constants, units, aliases, station names, field names, data table names, and file names

can share identical names; that is, once a name is used, it is reserved only in that category.

 

7.7.3.8.4 Expressions in Arguments

Read More! See Expressions

(p. 142)

for more information on expressions.

Many parameters allow the entry of arguments as expressions. If an expression is
a comparison, it will return -1 if the comparison is true and 0 if it is false (Logical
Expressions

(p. 145)

). CRBasic example Use of Expressions in Parameters

(p. 141)

shows an example of the use of expressions in arguments in the DataTable()
instruction, where the trigger condition is entered as an expression. Suppose the
variable TC is a thermocouple temperature:

CRBasic Example 18. Use of Expressions in Arguments 

'DataTable(Name, TrigVar, Size)

DataTable

(Temp, TC > 100, 5000)

 

When the trigger is "TC > 100", a TC temperature > 100 will set the trigger to
true and data are stored.

7.7.3.8.5 Arrays of Multipliers and Offsets

A single measurement instruction can measure a series of sensors and apply
individual calibration factors to each sensor as shown in CRBasic example Use of
Arrays as Multipliers and Offsets

(p. 142).

Storing calibration factors in variable

arrays, and placing the array variables in the multiplier and offset parameters of
the measurement instruction, makes this possible. The measurement instruction
uses repetitions to implement this feature by stepping through the multiplier and
offset arrays as it steps through the measurement input channels. If the multiplier
and offset are not arrays, the same multiplier and offset are used for each
repetition.

Read More! More information is available in CRBasic Editor Help topic
"Multipliers and Offsets with Repetitions".