7 parameter types, Name for, 1 expressions in parameters – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 148: 8 data tables

Section 4. CRBasic – Native Language Programming
4.2.7 Parameter Types
Many instructions have parameters that allow different types of inputs. Allowed
input types are specifically identified in the description of each instruction in
CRBASIC Editor Help and in the manual section covering that instruction.
Table 4.2.7-1 list the maximum length and allowed characters for the names for
Variables, Arrays, Constants, etc.
TABLE 4.2.7-1. Rules for Names
Name for
Maximum Length
(number of characters)
Allowed characters
Variable or Array 16
Constant
16
Alias 16
Data Table Name 8
Station Name
8
Field name
16
Letters A-Z, upper or lower
case, dollar sign “$”,
underscore “_”, and numbers
0-9. The name must start
with a letter, “$”, or “_”.
CRBasic is not case
sensitive.
4.2.7.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 (see
Section 4.2.11.4 Logical Expressions). Example 4.2.7-1 shows an example of
the use of expressions in parameters in the DataTable instruction, where the
trigger condition is entered as an expression. Suppose the variable TC is a
thermocouple temperature:
Example 4.2.7-1 Use of Expressions in Parameters
‘DataTable (Name, TrigVar, Size)
DataTable (Temp, TC > 100, 5000)
When the data table trigger variable is set as “TC > 100", then a TC temperature
> 100 will set the trigger to true and measurement data will be stored in the
Data Table.
4.2.8 Data Tables
Data Tables – Defines the data to store and the media it should be stored to
.
Data are stored in tables as directed by the CRBASIC program. A data table is
created by a series of CRBASIC instructions entered after variable declarations
but before the BeginProg instruction. These instructions include:
DataTable ()
Output Trigger Condition(s)
Optional Export Data Instructions
Output Processing Instructions
EndTable
A data table is essentially a file that resides in CR9000X memory and or
PCMCIA card. The file is written to each time the DataTable output is
triggered. The trigger that initiates data storage is tripped either by the
CR9000X’s clock, or by an event, such as a high temperature. Up to 30 data
4-20