Section 9. programming, 1 inserting comments into program, 2 sending programs – Campbell Scientific CR200/CR200X-series Dataloggers User Manual
Page 81: 3 writing programs, Crbasic example 1. inserting comments

Section 9. Programming
9.1 Inserting Comments into Program
Comments are non-functioning text placed within the body of a program to
document or clarify program algorithms.
As shown in
CRBASIC EXAMPLE. Inserting Comments
(p. 69), comments are
inserted into a program by preceding the comment with a single quote (
').
Comments can be entered either as independent lines or following CR200(X)
code. When the CR200(X) compiler sees a single quote (
'), it ignores the rest of
the line.
CRBASIC EXAMPLE 1.
Inserting Comments
'Declaration of variables starts here.
Public Start(6)
'Declare the start time array
9.2 Sending Programs
The CR200(X) requires a program be sent to its memory to direct measurement,
processing, and data storage operations. Programs are sent with LoggerNet /
PC400 / RTDAQ / PC200W datalogger support software.
Programs can also be sent from Device Configuration Utility (DevConfig). A
good practice is to always retrieve data from the CR200(X) before sending a
program, otherwise, data may be lost.
The CR200(X) does not have an on-board compiler to create the binary (.BIN)
program file required by the datalogger. Instead, the datalogger support
software creates a binary file using the appropriate compiler. The compiler is
chosen to match the version of operating system found in the CR200(X) and a
BIN file with the same filename as the selected CR2 file is created and sent to
the datalogger.
It is important that the compiler used match the operating system version in the
datalogger. If a different compiler is used, the program send will fail.
Compilers are typically stored at C:\Campbellsci\Lib\CR200(X)Compilers.
The most current CR200(X) operating system along with compiler and CRBasic
Editor support files may be obtained at www.campbellsci.com/downloads.
9.3 Writing Programs
Programs are created with either Short Cut or CRBASIC Editor. Short Cut is
available at no charge at
www.campbellsci.com
. CRBASIC Editor is a program
69