3 inserting comments into program, 2 programming sequence – Campbell Scientific CR5000 Measurement and Control Module User Manual
Page 78

Section 4. CRBasic - Native Language Programming
4-2
PanelTemp is the keyword name of the instruction. The two parameters
associated with PanelTemp are: Destination, the name of the variable in which
to put the temperature; and Integration, the length of time to integrate the
measurement. To place the panel temperature in the variable RefTemp (using
a 250 microsecond measurement integration time) the code is:
PanelTemp(RefTemp, 250)
The use of these instructions should become clearer as we go through an
introductory example.
4.1.3 Inserting Comments Into Program
Comments can be inserted into a program by preceding the comment with a
single quote ('). Comments can be entered either as independent lines or
following CR5000 code. When the CR5000 compiler sees the ' it ignores the
rest of the line.
' The declaration of variables starts here.
Public Start(6)
'Declare the start time array
4.2 Programming Sequence
The following table describes the structure of a typical CR5000 program:
Declarations
Make a list of what to measure and calculate.
Declare constants
Within this list, include the fixed constants used,
Declare Public variables
indicate the values that the user is able to view
while the program is running,
Dimension variables
the number of each measurement that will be
made,
Define Aliases
and specific names for any of the measurements.
Define data tables.
Describe, in detail, tables of data that will be
saved from the experiment.
Process/store trigger
Set when the data should be stored. Are they
stored when some condition is met? Are data
stored on a fixed interval? Are they stored on
a fixed interval only while some condition is
met?
Table size
Set the size of the table in CR5000 RAM
Other on-line storage
devices
Should the data also be sent to the PC card?
Processing of Data
What data are to be output (current value,
average, maximum, minimum, etc.)