1 filename, 2 options – Campbell Scientific SC115 CS I/O 2G Flash Memory Drive with USB Interface User Manual

Page 16

Advertising
background image

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

10.1.1 FileName

The FileName parameter must be a string declared as Const, such as

Const FileName = "USB:FileName",

or as an expression that evaluates to a constant, such as

"USB:"+Variable+"FileName"

Quotation marks are required. The created file will have a suffix of X.dat,
where X is a number that increments each time a new file is written.

When using a single SC115 to collect data from several dataloggers, the
TableFile() FileName parameter must be unique for each data table being
collected. Otherwise, data may be overwritten on the SC115. Using a
TableFile() instruction with parameters as shown below creates a naming
scheme wherein the station name or serial number are part of the file name.
This allows the source of data to be easily identified during post-processing.

TableFile("USB:"+Status.SerialNumber+"Filename",8,-1,0,0,Min,0,0)

When a program is compiled with “USB:” in the file path, it searches the
attached SC115 for any file names in the series. If it finds any, it uses the
highest numbered file name, increments it by one, uses the result as the name
for a new file, and writes the new data to the new file.

When multiple SC115s are used to retrieve data from multiple dataloggers, it is
often desirable to set the interval parameter to -1. If the interval parameter is
set to 0 instead of -1, the complete set of records from a single datalogger will
likely be spread across all SC115s used to retrieve data.

If data are retrieved from a datalogger using an SC115 that
already contains files whose names match those created
by the current datalogger’s TableFile(), the old files are
likely to be overwritten. Using unique filenames for each
datalogger, such as including the station name or serial
number, is the best practice. See example in Section
10.5.1.1, Standard Data Collection Mode. A rarely used
alternative is to recompile the datalogger program with the
second SC115 connected to retrieve its directory
information. This is done by powering down the
datalogger, connecting the SC115, and then powering up
the datalogger.

CAUTION

10.1.2 Options

The Options parameter specifies the type of file to be saved and whether to
include the header information, timestamp, and/or record number. Options 0,
8, 16, and 20 correspond to Campbell Scientific formats for TOB1, TOA5,
CSIXML, and CSIJSON, respectively. Choosing an option not among these
four may make the file incompatible with Campbell Scientific software that
reads or writes data files. For example, Option 7 results in a TOB1 file that
cannot be read by CardConvert software or View Pro software. Refer to the
CRBasic Editor Help system for a complete listing of option codes.

10

Advertising