1 compile, 1 compile -7 – Campbell Scientific PC400 Datalogger Support Software User Manual

Page 169

Advertising
background image

Section 9. Datalogger Program Creation with CRBasic Editor

Browse Bookmarks – Displays a list of all bookmarks in the
program. When a bookmark is selected, the cursor moves to that line
in the program.

Clear Bookmarks – Erases all bookmarks from the program.

GoTo – Moves the cursor to a particular section of the program.
Choose the section type from the list box that appears.

User-Defined Functions and Subroutines – Provides a list box
containing all of the user-defined functions and subroutines.
Functions are identified with a purple F. Subroutines are marked
with a black S. Clicking on a name in the list box moves the cursor
to the start of that function or subroutine.

9.3.1 Compile

Compile is a function provided by the CRBasic Editor to help the programmer
catch problems with the datalogger program. Compile is available from the
toolbar and the Compile menu.

When the Compile function is used, the CRBasic Editor checks the program
for syntax errors and other inconsistencies. The results of the check will be
displayed in a message window at the bottom of the main window. If an error
can be traced to a specific line in the program, the line number will be listed
before the error. You can double-click an error preceded by a line number and
that line will be highlighted in the program editing window. To move the
highlight to the next error in the program, press the Next Error button or
choose Next Error from the Compile menu. To move the highlight to the
previous error in the program, press the Previous Error button or choose
Previous Error from the Compile menu.

It is important that the compilers used for checking programs match the OS
version loaded in the datalogger, otherwise errors may be returned when the
program is sent. When a CR200 program is being edited, the Pick CR200
Compiler
menu item is available. This item opens a dialog box from which a
compiler can be selected for the CR200 datalogger.

The error window can be closed by selecting the Close Message Window
menu item from the View menu, or by clicking the X in the upper right corner
of the message window.

For the CR1000, CR3000, CR800 series, CR5000 and CR9000X
dataloggers, the Compile function only verifies the integrity of
the program. Actual compilation of the program takes place in
the datalogger. When using the CR200 datalogger, however, this
function creates a binary image of the program to be loaded to
the datalogger at a later time. This function is not available for
the CR9000 datalogger.

NOTE

9-7

Advertising