07.01.2015 Views

CR200/CR200X Series Dataloggers - Campbell Scientific

CR200/CR200X Series Dataloggers - Campbell Scientific

CR200/CR200X Series Dataloggers - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 9. Programming<br />

9.1 Inserting Comments into Program<br />

Comments are non-functioning text placed within the body of a program to<br />

document or clarify program algorithms.<br />

As shown in CRBASIC EXAMPLE. Inserting Comments (p. 69), comments are<br />

inserted into a program by preceding the comment with a single quote (').<br />

Comments can be entered either as independent lines or following <strong>CR200</strong>(X)<br />

code. When the <strong>CR200</strong>(X) compiler sees a single quote ('), it ignores the rest of<br />

the line.<br />

CRBASIC EXAMPLE 1.<br />

Inserting Comments<br />

'Declaration of variables starts here.<br />

Public Start(6)<br />

'Declare the start time array<br />

9.2 Sending Programs<br />

The <strong>CR200</strong>(X) requires a program be sent to its memory to direct measurement,<br />

processing, and data storage operations. Programs are sent with LoggerNet /<br />

PC400 / RTDAQ / PC200W datalogger support software.<br />

Programs can also be sent from Device Configuration Utility (DevConfig). A<br />

good practice is to always retrieve data from the <strong>CR200</strong>(X) before sending a<br />

program, otherwise, data may be lost.<br />

The <strong>CR200</strong>(X) does not have an on-board compiler to create the binary (.BIN)<br />

program file required by the datalogger. Instead, the datalogger support<br />

software creates a binary file using the appropriate compiler. The compiler is<br />

chosen to match the version of operating system found in the <strong>CR200</strong>(X) and a<br />

BIN file with the same filename as the selected CR2 file is created and sent to<br />

the datalogger.<br />

It is important that the compiler used match the operating system version in the<br />

datalogger. If a different compiler is used, the program send will fail.<br />

Compilers are typically stored at C:\<strong>Campbell</strong>sci\Lib\<strong>CR200</strong>(X)Compilers.<br />

The most current <strong>CR200</strong>(X) operating system along with compiler and CRBasic<br />

Editor support files may be obtained at www.campbellsci.com/downloads.<br />

9.3 Writing Programs<br />

Programs are created with either Short Cut or CRBASIC Editor. Short Cut is<br />

available at no charge at www.campbellsci.com. CRBASIC Editor is a program<br />

69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!