04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - 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 7. Installation<br />

CRBasic Example 12.<br />

Using the Const Declaration<br />

Public PTempC, PTempF<br />

Const CtoF_Mult = 1.8<br />

Const CtoF_Offset = 32<br />

BeginProg<br />

Scan(1,Sec,0,0)<br />

PanelTemp(PTempC,250)<br />

PTempF = PTempC * CtoF_Mult + CtoF_Offset<br />

NextScan<br />

EndProg<br />

Predefined Contants<br />

Several words are reserved for use by CRBasic. These words cannot be used as<br />

variable or table names in a program. Predefined constants include some<br />

instruction names, as well as valid alphanumeric names for instruction<br />

parameters. In general, instruction names should not be used as variable, constant,<br />

or table names in a datalogger program, even if they are not specifically listed as a<br />

predefined constant. If a predefined constant, such as "SubScan" is used as a<br />

variable in a program, an error similar to the following may be, but is not always,<br />

displayed at CRBasic pre-compile.<br />

Compile Failed!<br />

line 8: SubScan is already is use as a predefined CONST.<br />

Table Predefined Constants and Reserved Words (p. 123) lists predefined constants.<br />

Table 11. Predefined Constants and Reserved Words<br />

_50hz _60hz Auto Autoc<br />

AutoRange AutoRangec BOOL8 BOOLEAN<br />

CAO1 CAO2 Case Com1<br />

Com2 Com3 Com310 Com4<br />

ComME ComRS232 ComSDC10 ComSDC11<br />

ComSDC7 ComSDC8 <strong>CR1000</strong> CR3000<br />

CR5000 CR800 CR9000X day<br />

DO EVENT FLOAT FOR<br />

hr FALSE If IX1<br />

IX2 IEEE4 IX4 LoggerType<br />

LONG IX3 msec mv1000<br />

mv1000C min mv1000R mv2_5<br />

mv2_5c mv1000cR mv200 mv200c<br />

mv200cR mv20 mv20c mv25<br />

mv250 mv200R mv2500c mv250c<br />

mv25c mv2500 mv500 mv5000<br />

mv5000 mv50 mv5000C mv5000cR<br />

mv5000R mv5000c mv50c mv50c<br />

123

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

Saved successfully!

Ooh no, something went wrong!