4 camera files, 2 programming, 1 the cardout() instruction – Campbell Scientific CFM100 CompactFlash Module User Manual

Page 16: 2 program examples, 1 ring mode

Advertising
background image

CFM100 CompactFlash

®

Module

7.1.4 Camera Files

JPEG images taken by a digital camera connected to the datalogger can be
stored to the CF card rather than CPU memory. This is done by configuring
the PakBus setting “Files Manager” for the datalogger. This can be done using
the Device Configuration Utility or PakBus Graph.

7.2 Programming

7.2.1 The CardOut() Instruction

The CardOut() Instruction is used to send data to a CF card. The CardOut()
Instruction must be entered within each DataTable declaration that is to store
data to the CF card. Data is stored to the card when a call is made to the data
table.

CardOut(StopRing, Size)

Parameter
& Data Type

Enter

StopRing

Constant

A code to specify if the Data Table on the CF card is fill and stop or ring (newest data
overwrites oldest).

Value Result

0 Ring

1

Fill and Stop

Size

Constant

The size to make the data table. The number of data sets (records) for which to allocate
memory in the CF card. Each time a variable or interval trigger occurs, a line (or row) of
data is output with the number of values determined by the Output Instructions within the
table. This data is called a record.
Note

Enter –1000 and the size of the table on the card will match the size of the
internal table on the datalogger

Enter any other negative number and all remaining memory (after creating any
fixed size data tables) will be allocated to the table or partitioned among all
tables with a negative value for size. The partitioning algorithm attempts to
have the tables full at the same time.

7.2.2 Program Examples

7.2.2.1 Ring Mode

The following program outputs the maximum and minimum of the panel
temperature to the card once a second. The first parameter of the CardOut()
instruction is 0, which sets the table on the card to ring mode. The second
parameter is negative, so all available memory on the card will be allocated to
the data table. Once all available memory is used, new data will begin
overwriting the oldest data.

10

Advertising