1 compile, 2 compile, save, and send, Compile -27 – Campbell Scientific LoggerNet Datalogger Support Software User Manual

Page 245: Compile, save, and send -27

Advertising
background image

Section 7. Creating and Editing Datalogger Programs

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.

7.3.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.

7.3.3.2 Compile, Save, and Send

The CRBasic Editor allows you to send a program to a datalogger that has

already been defined on the network map in LoggerNet, PC400, or RTDAQ.

This only works if LoggerNet, PC400, or RTDAQ is running at the time you

attempt to send the program.

NOTE

7-27

Advertising