3 resident record number mode examples – Campbell Scientific SC115 CS I/O 2G Flash Memory Drive with USB Interface User Manual

Page 21

Advertising
background image

SC115 CS I/O 2G Flash Memory Drive with USB Interface

10.5.3 Resident Record Number Mode Examples

'Plug In and Leave – data baled from buffer to SC115 every 60 records

'In this example, the SC115 remains at the datalogger as resident memory.
'This program avoids data corruption by setting TableFile() NumRecs to 60
'In this case, data are written only once an hour to the SC115.

Public PanelTempC, BattVolt


DataTable (Test,1,-1)
DataInterval

(0,1,Min,0)

TableFile ("USB:Test",8,-1,60,0,Min,0,0) 'SC115 resident mode with NumRec

Sample

(1,PanelTempC,FP2)

Minimum

(1,BattVolt,FP2,0,False)

EndTable

BeginProg

Scan

(10,Sec,3,0)

PanelTemp

(PanelTempC,250)

Battery

(BattVolt)

CallTable

Test

NextScan
EndProg

'Plug In and Leave – data baled when buffer is full,

'i.e. DataTable() Size = TableFile() NumRecs (memory efficient!)

'In this example, the SC115 remains at the datalogger as resident memory.

'This program avoids data corruption by setting DataTable() Size to equal
'TableFile() NumRecs. In this case, data are written only once every two hours
'to the SC115.

Public PanelTempC, BattVolt

DataTable (Test,1,120)
DataInterval

(0,1,Min,0)

TableFile ("USB:Test",8,-1,120,0,Min,0,0) 'SC115 resident mode with NumRec

Sample

(1,PanelTempC,FP2)

Minimum

(1,BattVolt,FP2,0,False)

EndTable

BeginProg

Scan

(10,Sec,3,0)

PanelTemp

(PanelTempC,250)

Battery

(BattVolt)

CallTable

Test

NextScan
EndProg

15

Advertising