• Easy retrieval of closed files with File Control (p. 515) utility, FTP, or e-mail.
7.9.11.3 TableFile() with Option 64 Programming
As shown in the following CRBasic code snip, the TableFile() instruction must
be placed inside a DataTable() / EndTable declaration. The TableFile()
instruction writes data to the memory card based on user-specified parameters that
determine the file size based on number of records to store, or an interval over
which to store data. The resulting file is saved with a suffix of X.dat, where X is a
number that is incremented each time a new file is written.
DataTable(TableName,TriggerVariable,Size)
TableFile(FileName...LastFileName)
'Output processing instructions go here
EndTable
For example, in micrometeorological applications, TableFile() with Option 64 is
used to create a new high-frequency data file once per day. The size of the file
created is a function of the datalogger scan frequency and the number of variables
saved to the data table. For a typical eddy-covariance station, this daily file is
about 50 MB large (10 Hz scan frequency and 15 IEEE4 data points). CRBasic
example Using TableFile() with Option 64 with CF Cards
(p. 207) is an example of
a micromet application.
CRBasic Example 39. Using TableFile() with Option 64 with CF Card
'This program example demonstrates the use of TableFile() with Option 64 in micrometeorology
'eddy-covariance programs. The file naming scheme used in instruction TableFile() is
'customized using variables, constants, and text.
Public Sensor(10)
DataTable(Ts_data,TRUE,-1)
'TableFile("filename",Option,MaxFiles,NumRec/TimeIntoInterval,Interval,Units,
' OutStat,LastFileName)
TableFile("CRD:"&Status.SerialNumber(1,1)&".ts_data_",64,-1,0,1,Day,0,0)
Sample(10,sensor(1),IEEE4)
EndTable
BeginProg
Scan(100,mSec,100,0)
'Measurement instructions go here.
'Processing instructions go here.
CallTable ts_data
NextScan
EndProg
7.9.11.4 Converting TOB3 Files with CardConvert
The TOB3 format that is used to write data to memory cards saves disk space.
However, the resulting binary files must be converted to another format to be read
or used by other programs. The CardConvert software, included in Campbell
Scientific datalogger support software
(p. 95), will convert data files from one
format to another. CardConvert Help has more details.
207