7.8.4.10 Multi-Statement Declarations
Multi-statement declarations are used to declare data tables, subroutines,
functions, and incidentals. Related instructions include the following:
• DataTable() / EndTable
• Sub() / EndSub
• Function() / EndFunction
• ShutDown / ShutdownEnd
• DialSequence() / EndDialSequence
• ModemHangup() / EndModemHangup
• WebPageBegin() / WebPageEnd
Multi-statement declarations can be located as follows:
• Prior to BeginProg,
• After EndSequence or an infinite Scan() / NextScan and before EndProg or
SlowSequence
• Immediately following SlowSequence. SlowSequence code starts executing
after any declaration sequence. Only declaration sequences can occur after
EndSequence and before SlowSequence or EndProg.
7.8.4.10.1 Declaring Data Tables
Data are stored in tables as directed by the CRBasic program. A data table is
created by a series of CRBasic instructions entered after variable declarations but
before the BeginProg instruction. These instructions include:
DataTable()
'Output Trigger Condition(s)
'Output Processing Instructions
EndTable
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 clock, or by an event, such as a high
temperature. The number of data tables declared is limited only by the available
CR1000 memory (prior to OS 28, the limit was 30 data tables). Data tables 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 (first few lines of the file) when data are downloaded to a PC.
Overhead information includes the following:
• 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."
140