Section 12. memory and data storage, 1 data storage, 1 data table storage – Campbell Scientific CR200/CR200X-series Dataloggers User Manual
Page 141

Section 12. Memory and Data Storage
12.1 Data Storage
The CR200(X) can be programmed to store each measurement or, more
commonly, to store processed values such as averages, maxima, minima, etc.
Data are stored periodically or conditionally in data tables as directed by the
CRBASIC program (
CRBASIC EXAMPLE. Proper Program Structure
p. 73).
The DataTable () instruction allows the user to set the size of the data table. The
maximum number of tables that can be created by the program is 4 for CR200
series dataloggers and 8 for CR200(X) series dataloggers.
12.1.1 Data Table Storage
Data tables are stored in Serial Flash EEPROM. Data remain in memory when
the CR200(X) is powered down. Data are erased when a different program is
loaded and run. The Serial Flash EEPROM is good for more than 100,000 write
cycles.
Caution! If an EEPROM memory failure is detected, the datalogger
suspends running the program and red LED flashes twice every scan
interval. “Trap Code” in the Status Table will be set to 16. The
datalogger must be returned to CSI to replace the Serial Flash
EEPROM.
The CR200(X) stores the final storage data in the Serial Flash EEPROM. The
Serial Flash EEPROM also is the storage area for a file called the Table
Definition File (TDF). When a CRBASIC program is downloaded to the
CR200(X), the TDF is extracted from the compiled version of the CRBASIC
program and stored in the Serial Flash EEPROM. Any remaining memory can
be used for the final storage allocation. In the CR200, there are 128k bytes or
512k bytes of Serial Flash EEPROM (dataloggers with a 512 kbyte EEPROM
will have 512K on their label). Up to 5.12k bytes of that memory can be used
for the TDF (if the TDF is greater than the maximum, the compile will fail). If
the data table allocation or size of all or any of the tables use too much memory,
there will NOT be a compile error. The CR200(X) will force the allocation to
work by adding all the sizes for each table, checking if the sum is greater than
the Serial Flash EEPROM and dropping the allocation for each table by 90
percent. This is repeated until the sums of the allocations are below the Serial
Flash EEPROM size.
129