beautypg.com

4 converting tob3 files with cardconvert, 5 tablefile() with option 64 q & a – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 268

background image

Section 7. Installation

268 

 

 

CRBasic Example 62. Using TableFile() with Option 64 with CF Cards 

'The following CRBasic program shows how the instruction is used in micrometeorology

'eddy-covariance programs. The file naming scheme used in TableFile() in this example 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.8.20.4 Converting TOB3 Files with CardConvert

The TOB3 format that is used to write data to CF 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. 77),

will convert data files from one

format to another. CardConvert Help has more details.

7.8.20.5 TableFile() with Option 64 Q & A

Q: How does

Option 64

differ from other TableFile() options?

A: Pre-allocation of memory combines with TOB3 data format to give

Option 64

two principal advantages over other TableFile() options. These are:

• increased runtime write performance
• short card eject times

Option 64

is unique among table file options in that it pre-allocates enough

memory on the CF card to store an interval amount of data

1

. Pre-allocation allows

data to be continuously and more quickly written to the card in ≈1 KB blocks.
TOB3 binary format copies data directly from CPU memory to the CF card
without format conversion, lending additional speed and efficiency to the data
storage process.

Note Pre-allocation of CF card files significantly increases run time write
performance. It also reduces the risk of file corruption that can occur as a result
of power loss or incorrect card removal.

 

Note To avoid data corruption and loss, CF card removal must always be
initiated by pressing the initiate card removal button on the face of the NL115 or