10 available help information, 4 crbasic programming, 1 programming sequence – Campbell Scientific PC400 Datalogger Support Software User Manual

Page 182: 10 available help information -20, 4 crbasic, Programming -20, 1 programming, Sequence -20

Advertising
background image

Section 9. Datalogger Program Creation with CRBasic Editor

9.3.10 Available Help Information

Pressing the Help button of the Parameter dialog box will bring up a detailed
help topic for the instruction being edited. Pressing F1 when your cursor is
within a parameter field will bring up help only on that parameter. Some fields
also have text in the Comments column, which provides a short description of
the option that has been selected for the parameter.

9.4 CRBasic Programming

CRBasic is a programming language that has some similarities to a structured
BASIC. There are special instructions for making measurements and for
creating tables of output data. The results of all measurements are assigned
variables (given names). Mathematical operations are written out much as they
would be algebraically. This section provides a summary of a program, its
syntax, structure, and sequence. Refer to the datalogger users manual or the
on-line help for detailed information on program instructions.

9.4.1 Programming Sequence

The structure of a datalogger program requires that variables, data tables, and
subroutines be declared before they can be used. The best way to do this is to
put all the variable declarations and output table definitions at the beginning,
followed by the subroutines, and then the program. Below is the typical layout
of a program. Note that the online help has example code for each instruction
to demonstrate the use of the instruction in a 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 RAM.

Other on-line storage

devices

Should the data also be sent to the external

storage?

Processing of Data

What data are to be output (current value,

average, maximum, minimum, etc.).

9-20

Advertising