Specifications
Section 9. CR1000 Programming
9-12
A data table is essentially a file that resides in CR1000 memory. The file is
written to each time data are directed to that file. The trigger that initiates data
storage is tripped either by the CR1000’s clock, or by an event, such as a high
temperature. Up to 30 data tables can be created and written to by the
program. The program may store individual measurements, individual
calculated values, or summary data such as averages, maxima, or minima to
data tables.
Each data table is associated with overhead information that becomes part of
the ASCII file header when data are downloaded to a PC. Overhead
information includes:
• table format
• datalogger type and operating system version,
• name of the CRBASIC program running in the datalogger
• name of the data table (limited to 20 characters)
• alphanumeric field names to attach at the head of data columns
This information is referred to as “table definitions.”
TABLE 9.7-1. Typical Data Tableshows a
data file as it appears after the
associated data table has been downloaded from a CR1000 programmed with
the code in EXAMPLE. “TIMESTAMP”, “RECORD”, “Batt_Volt_Avg”,
“PTem
p_C_Avg”, and “TempC_Avg” are default fieldnames. Default
fieldnames are a combination of the variable names (or alias) from which data
are derived with a three letter suffix. The suffix is an abbreviation of the data
process that output the data to storage. For example, “Avg” is the abbreviation
for average. If the default fieldnames are not acceptable to the programmer,
FieldNames() instruction can be used to customized fieldnames.
The third row of the data table header lists units for the stored values. These
units are declared in the “Define Units” section of the program, as shown in
EXAMPLE 9.7-1. Units are strictly for documentation. The CR1000 makes
neither use
of units nor checks on their accuracy.
TABLE 9.7-1. Typical Data Table
TOA5 CR1000 CR1000 1048 CR1000.Std.13.06 CPU:Data.CR1 35723 OneMin
TIMESTAMP RECORD Batt_Volt_Avg PTemp_C_Avg Temp_C_Avg(1) Temp_C_Avg(2)
TS RN Volts Deg C Deg C Deg C
Avg Avg Avg Avg
7/11/2007 16:10 0 13.18 23.5 23.54 25.12
7/11/2007 16:20 1 13.18 23.5 23.54 25.51
7/11/2007 16:30 2 13.19 23.51 23.05 25.73
7/11/2007 16:40 3 13.19 23.54 23.61 25.95
7/11/2007 16:50 4 13.19 23.55 23.09 26.05
7/11/2007 17:00 5 13.19 23.55 23.05 26.05
7/11/2007 17:10 6 13.18 23.55 23.06 25.04