4 quickstart, 1 preparation – Campbell Scientific CFM100 CompactFlash Module User Manual

Page 8

Advertising
background image

CFM100 CompactFlash

®

Module

4 Quickstart

This section describes the basics of storing and retrieving datalogger data.
These operations are discussed in detail in Section 7, Operation of this manual

.

4.1 Preparation

Always power down the datalogger before installing or
removing the CFM100 to/from the datalogger.

CAUTION

After powering down the datalogger, plug the CFM100 into the datalogger
peripheral port. Restore power to the datalogger. Insert formatted CF card.
(For instructions on formatting a CF card, see Appendix A.)

4.2 Programming the Datalogger to Send Data to the CFM100

The CardOut() instruction is used in the datalogger program to send data to
the CF card. The CardOut() instruction must be entered within each
DataTable() declaration that is to store data to the CF card. The file is saved
to the card with the name stationname.tablename and a .DAT extension.

The CardOut() instruction has the following parameters:

StopRing: A constant is entered for the StopRing parameter to specify whether
the DataTable() created should be a Ring Mode table (0) or a Fill and Stop
table (1).

Size: The Size parameter is the minimum number of records that will be
included in the DataTable(). If –1000 is entered, the size of the file on the card
will be the same as the size of the internal table on the datalogger. If any other
negative number is entered, the memory that remains after creating any fixed-
size tables on the card will be allocated to this table. If multiple DataTables are
set to a negative number, the remaining memory will be divided among them.
The datalogger attempts to size the tables so that all of them will be full at the
same time

In the following example, the minimum batt_voltage and a sample of PTemp is
written to the card each time the data table is called. The StopRing parameter
is 0 for ring mode. This means that once the data table is full, new data will
begin overwriting old data. The size parameter is –1, so all available space on
the card will be allocated to the table.

DataTable(Table1,1,-1)

CardOut(0,-1)

Minimum(1,batt_volt,FP2,0,False)

Sample(1,PTemp,IEEE4)

EndTable

2

Advertising