12 flags, 13 parameter types, 1 expressions in parameters – Campbell Scientific PC400 Datalogger Support Software User Manual

Page 191: 12 flags -29 9.4.13 parameter types -29, 1 expressions in parameters -29, 4. rules for names -29

Advertising
background image

Section 9. Datalogger Program Creation with CRBasic Editor

9.4.12 Flags

Any variable can be used as a flag as far as logical tests in CRBasic are
concerned. If the value of the variable is non-zero the flag is high. If the value
of the variable is 0 the flag is low. LoggerNet, PC400, or RTDAQ looks for
the variable array with the name Flag when the option to display flag status is
selected from the Connect Screen. If a Flag array is found, as many elements
of that array which can fit will be displayed in the Port and Flags dialog box.

9.4.13 Parameter Types

Instruction parameters allow different types of inputs. These types are listed
below and specifically identified in the description of the parameter in the
following sections or in CRBasic help.

Constant
Variable
Variable

or

Array

Constant, Variable, or Expression

Constant, Variable, Array, or Expression

Name

Name or list of Names

Variable, or Expression

Variable, Array, or Expression

TABLE 9-4 lists the maximum length and allowed characters for the names for
Variables, Arrays, Constants, etc.

TABLE 9-4. Rules for Names


Name for

Maximum Length
(number of characters)


Allowed characters

Variable or Array

39 (17 )

Constant

39 (16)

Alias

39 (17 )

Data Table Name

20 (8)

Field name

39 (16)

Letters A-Z, upper or
lower case, underscore
“_”, and numbers
0-12. The name must
start with a letter.
CRBasic is not case
sensitive.

Values in parentheses refer to the CR5000, CR9000 and CR9000X dataloggers.

9.4.13.1 Expressions in Parameters

Many parameters allow the entry of expressions. If an expression is a
comparison, it will return -1 if the comparison is true and 0 if it is false. An
example of the use of this is in the DataTable instruction where the trigger
condition can be entered as an expression. Suppose the variable TC(1) is a
thermocouple temperature:

9-29

Advertising