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 13.<br />

Foreign‐Language Support<br />

‘Declare a constant to concatenate six non-English characters<br />

Const PTempUnits = CHR(HexToDec ("C9"))+ CHR(HexToDec ("E3"))+ CHR(HexToDec("CA")) _<br />

+ CHR(HexToDec ("CF")) + CHR(HexToDec("B6")) + CHR(HexToDec ("C8"))<br />

‘Declare a constant to concatenate four non-English characters<br />

Const PTempAlias = CHR(HexToDec ("CE"))+ CHR(HexToDec ("C2")) + CHR(HexToDec("B6")) _<br />

+ CHR(HexToDec ("C8"))<br />

‘Declare as Alias and Units non-English words concatenated above<br />

Alias PTemp = PTempAlias<br />

Units PTemp = PTempUnits<br />

7.7.3.5 Declared Sequences<br />

Declaration sequences include DataTable() / EndTable and Sub() / EndSub.<br />

Certain sequences that may be incidental to a specific application also need to be<br />

declared. These include ShutDown / ShutdownEnd, DialSequence() /<br />

EndDialSequence, ModemHangup() / EndModemHangup, and<br />

WebPageBegin() / WebPageEnd sequences. Declaration sequences can be<br />

located:<br />

1. prior to BeginProg<br />

2. after EndSequence or an infinite Scan() / NextScan and before EndProg or<br />

SlowSequence<br />

3. immediately following SlowSequence. SlowSequence code starts executing<br />

after any declaration sequence. Only declaration sequences can occur after<br />

EndSequence and before SlowSequence or EndProg.<br />

7.7.3.5.1 Data Tables<br />

Data are stored in tables as directed by the CRBasic program. A data table is<br />

created by a series of CRBasic instructions entered after variable declarations but<br />

before the BeginProg instruction. These instructions include:<br />

DataTable()<br />

'Output Trigger Condition(s)<br />

'Output Processing Instructions<br />

EndTable<br />

A data table is essentially a file that resides in <strong>CR1000</strong> memory. The file is<br />

written to each time data are directed to that file. The trigger that initiates data<br />

storage is tripped either by the <strong>CR1000</strong>'s clock, or by an event, such as a high<br />

temperature. Up to 30 data tables can be created by the program. The data tables<br />

may store individual measurements, individual calculated values, or summary<br />

data such as averages, maxima, or minima to data tables.<br />

Each data table is associated with overhead information that becomes part of the<br />

ASCII file header (first few lines of the file) when data are downloaded to a PC.<br />

Overhead information includes:<br />

• table format<br />

• datalogger type and operating system version,<br />

125

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

Saved successfully!

Ooh no, something went wrong!