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 />

Table 13. Typical Data Table<br />

TOA5 <strong>CR1000</strong> <strong>CR1000</strong> 1048 <strong>CR1000</strong>.Std.13.06 CPU:Data.cr1 35723 OneMin<br />

TIMESTAMP RECORD BattVolt_Avg PTempC_Avg TempC_Avg(1) TempC_Avg(2)<br />

TS RN Volts Deg C Deg C Deg C<br />

Avg Avg Avg Avg<br />

7/11/2007 16:10 0 13.18 23.5 23.54 25.12<br />

7/11/2007 16:20 1 13.18 23.5 23.54 25.51<br />

7/11/2007 16:30 2 13.19 23.51 23.05 25.73<br />

7/11/2007 16:40 3 13.19 23.54 23.61 25.95<br />

7/11/2007 16:50 4 13.19 23.55 23.09 26.05<br />

7/11/2007 17:00 5 13.19 23.55 23.05 26.05<br />

7/11/2007 17:10 6 13.18 23.55 23.06 25.04<br />

The third header line identifies engineering units for that field of data. These<br />

units are declared at the beginning of a CRBasic program, as shown in CRBasic<br />

example Definition and Use of a Data Table (p. 127). Units are strictly for<br />

documentation. The <strong>CR1000</strong> does not make use of declared units, nor does it<br />

check their accuracy.<br />

The fourth line of the header reports the data process used to produce the field of<br />

data, e.g., avg (average), his (historgram), etc.<br />

Subsequent lines are observed data and associated record keeping. The first field<br />

being a time stamp, the second the record (data line) number.<br />

Read More! See table Abbreviations of Names of Data Processes (p. 148) for a list<br />

of default field names.<br />

As shown in CRBasic example Definition and Use of a Data Table (p. 127), data<br />

table declaration begins with the DataTable() instruction and ends with the<br />

EndTable() instruction. Between DataTable() and EndTable() are instructions<br />

that define what data to store and under what conditions data are stored. A data<br />

table must be called by the CRBasic program for data storage processing to occur.<br />

Typically, data tables are called by the CallTable() instruction once each Scan.<br />

CRBasic Example 14.<br />

'Declare Variables<br />

Public Batt_Volt<br />

Public PTemp_C<br />

Public Temp_C(2)<br />

Definition and Use of a Data Table<br />

'Define Units<br />

Units Batt_Volt=Volts<br />

Units PTemp_C=Deg C<br />

Units Temp_C(2)=Deg C<br />

127

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

Saved successfully!

Ooh no, something went wrong!