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

Page 267: Flags -49, Parameter types -49, Expressions in parameters -49, 4. rules for names -49

Advertising
background image

Section 7. Creating and Editing Datalogger Programs

7.3.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.

7.3.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 7-4 lists the maximum length and allowed characters for the names for

Variables, Arrays, Constants, etc.

TABLE 7-4. Rules for Names

Name for

Maximum Length

(number of characters)

Allowed characters

Variable or Array

39 (17 )

Letters A-Z, upper or

lower case, underscore

“_”, and numbers

0-12. The name must

start with a letter.

CRBasic is not case

sensitive.

Constant

39 (16)

Alias

39 (17 )

Data Table Name

20 (8)

Field name

39 (16)

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

7.3.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:

7-49

Advertising