CR200/CR200X Series Dataloggers - Campbell Scientific
CR200/CR200X Series Dataloggers - Campbell Scientific
CR200/CR200X Series Dataloggers - Campbell Scientific
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 />
in the LoggerNet / PC400 datalogger support software suites. Programs can be<br />
up to 19.6 KBytes in size although typical programs are smaller.<br />
9.3.1 Short Cut Editor and Program Generator<br />
Short Cut is easy-to-use menu-driven software that presents the user with lists of<br />
predefined measurement, processing, and control algorithms from which to<br />
choose. The user makes choices and Short Cut writes the CRBASIC code<br />
required to perform the tasks. Short Cut creates a wiring diagram to simplify<br />
connection of sensors and external devices. Quickstart Tutorial (p. 3) works<br />
through a measurement example using Short Cut.<br />
For many complex applications, Short Cut is still a good place to start. When as<br />
much information as possible is entered, Short Cut will create a program<br />
template from which to work, already formatted with most of the proper<br />
structure, measurement routines, and variables. The program can then be edited<br />
further using CRBASIC Program Editor.<br />
9.3.2 CRBASIC Editor<br />
<strong>CR200</strong>(X) application programs are written in a variation of BASIC (Beginner's<br />
All-purpose Symbolic Instruction Code) computer language, CRBASIC<br />
(<strong>Campbell</strong> Recorder BASIC). CRBASIC Editor is a text editor that facilitates<br />
creation and modification of the ASCII text file that constitutes the <strong>CR200</strong>(X)<br />
application program. CRBASIC Editor is available as part of LoggerNet /<br />
PC400 / RTDAQ datalogger support software packages.<br />
Fundamental elements of CRBASIC include:<br />
• Variables - named packets of <strong>CR200</strong>(X) memory into which are stored<br />
values that normally vary during program execution. Values are typically<br />
the result of measurements and processing. Variables are given an<br />
alphanumeric name and can be dimensioned into arrays of related data.<br />
• Constants - discrete packets of <strong>CR200</strong>(X) memory into which are stored<br />
specific values that do not vary during program executions. Constants are<br />
given alphanumeric names and assigned values at the beginning<br />
declarations of a CRBASIC program.<br />
Note Keywords and predefined constants are reserved for internal <strong>CR200</strong>(X)<br />
use. If a user programmed variable happens to be a keyword or predefined<br />
constant, a runtime or compile error will occur. To correct the error, simply<br />
change the variable name by adding or deleting one or more letters, numbers, or<br />
the underscore (_) from the variable name, then recompile and resend the<br />
program. CRBASIC Help provides a list of keywords and pre-defined constants.<br />
• Common instructions - Instructions and operators used in most BASIC<br />
languages, including program control statements, and logic and<br />
mathematical operators.<br />
• Special instructions - Instructions unique to CRBASIC, including<br />
measurement instructions that access measurement channels, and<br />
70