CFM100 CompactFlash
®
Module
10
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.
CRBasic Example 7-8. Ring Mode
'CR1000
Public
temp
DataTable
(Table1,1,-1)
CardOut
(0, -1)
Maximum
(1,temp,FP2,False,False)
Minimum
(1,temp,FP2,False,False)
EndTable
BeginProg
Scan
(1,SEC,3,0)
PanelTemp
(temp,250)
CallTable
Table1
NextScan
EndProg
7.2.2.2 Fill-and-Stop Mode
The following program outputs a sample of the panel temperature to the card
once a second. The first parameter of the CardOut() instruction is 1, which
sets the table on the card to fill-and-stop mode. The second parameter (1000) is
the number of records which will be written before the table is full and data