Campbell SC115 User manual

SC115
CS I/O 2G Flash Memory
Drive with USB Interface
Revision: 11/19
Copyright © 2010 – 2019
Campbell Scientific
CSL I.D - 873


Guarantee
This equipment is guaranteed against defects in materials and workmanship.
We will repair or replace products which prove to be defective during the
guarantee period as detailed on your invoice, provided they are returned to us
prepaid. The guarantee will not apply to:
Equipment which has been modified or altered in any way without the
written permission of Campbell Scientific
Batteries
Any product which has been subjected to misuse, neglect, acts of God or
damage in transit.
Campbell Scientific will return guaranteed equipment by surface carrier
prepaid. Campbell Scientific will not reimburse the claimant for costs incurred
in removing and/or reinstalling equipment. This guarantee and the Company’s
obligation thereunder is in lieu of all other guarantees, expressed or implied,
including those of suitability and fitness for a particular purpose. Campbell
Scientific is not liable for consequential damage.
Please inform us before returning equipment and obtain a Repair Reference
Number whether the repair is under guarantee or not. Please state the faults as
clearly as possible, and if the product is out of the guarantee period it should
be accompanied by a purchase order. Quotations for repairs can be given on
request. It is the policy of Campbell Scientific to protect the health of its
employees and provide a safe working environment, in support of this policy a
“Declaration of Hazardous Material and Decontamination” form will be
issued for completion.
When returning equipment, the Repair Reference Number must be clearly
marked on the outside of the package. Complete the “Declaration of
Hazardous Material and Decontamination” form and ensure a completed copy
is returned with your goods. Please note your Repair may not be processed if
you do not include a copy of this form and Campbell Scientific Ltd reserves
the right to return goods at the customers’ expense.
Note that goods sent air freight are subject to Customs clearance fees which
Campbell Scientific will charge to customers. In many cases, these charges are
greater than the cost of the repair.
Campbell Scientific Ltd,
80 Hathern Road,
Shepshed, Loughborough, LE12 9GX, UK
Tel: +44 (0) 1509 601141
Fax: +44 (0) 1509 270924
Email: support@campbellsci.co.uk
www.campbellsci.co.uk


PLEASE READ FIRST
About this manual
Please note that this manual was originally produced by Campbell Scientific Inc. primarily for the North
American market. Some spellings, weights and measures may reflect this origin.
Some useful conversion factors:
Area: 1 in2(square inch) = 645 mm2
Length: 1 in. (inch) = 25.4 mm
1 ft (foot) = 304.8 mm
1 yard = 0.914 m
1 mile = 1.609 km
Mass: 1 oz. (ounce) = 28.35 g
1 lb (pound weight) = 0.454 kg
Pressure: 1 psi (lb/in2) = 68.95 mb
Volume: 1 UK pint = 568.3 ml
1 UK gallon = 4.546 litres
1 US gallon = 3.785 litres
In addition, while most of the information in the manual is correct for all countries, certain information
is specific to the North American market and so may not be applicable to European users.
Differences include the U.S standard external power supply details where some information (for
example the AC transformer input voltage) will not be applicable for British/European use. Please note,
however, that when a power supply adapter is ordered it will be suitable for use in your country.
Reference to some radio transmitters, digital cell phones and aerials may also not be applicable
according to your locality.
Some brackets, shields and enclosure options, including wiring, are not sold as standard items in the
European market; in some cases alternatives are offered. Details of the alternatives will be covered in
separate manuals.
Part numbers prefixed with a “#” symbol are special order parts for use with non-EU variants or for
special installations. Please quote the full part number with the # when ordering.
Recycling information
At the end of this product’s life it should not be put in commercial or domestic refuse but
sent for recycling. Any batteries contained within the product or used during the
products life should be removed from the product and also be sent to an appropriate
recycling facility.
Campbell Scientific Ltd can advise on the recycling of the equipment and in some cases
arrange collection and the correct disposal of it, although charges may apply for some
items or territories.
For further advice or support, please contact Campbell Scientific Ltd, or your local agent.
Campbell Scientific Ltd, 80 Hathern Road, Shepshed, Loughborough, LE12 9GX,
UK Tel: +44 (0) 1509 601141 Fax: +44 (0) 1509 270924
Email: support@campbellsci.co.uk
www.campbellsci.co.uk


Safety
DANGER —MANY HAZARDS ARE ASSOCIATED WITH INSTALLING, USING, MAINTAINING, AND WORKING ON
OR AROUND TRIPODS, TOWERS, AND ANY ATTACHMENTS TO TRIPODS AND TOWERS SUCH AS SENSORS,
CROSSARMS, ENCLOSURES, ANTENNAS, ETC. FAILURE TO PROPERLY AND COMPLETELY ASSEMBLE,
INSTALL, OPERATE, USE, AND MAINTAIN TRIPODS, TOWERS, AND ATTACHMENTS, AND FAILURE TO HEED
WARNINGS, INCREASES THE RISK OF DEATH, ACCIDENT, SERIOUS INJURY, PROPERTY DAMAGE, AND
PRODUCT FAILURE. TAKE ALL REASONABLE PRECAUTIONS TO AVOID THESE HAZARDS. CHECK WITH YOUR
ORGANIZATION'S SAFETY COORDINATOR (OR POLICY) FOR PROCEDURES AND REQUIRED PROTECTIVE
EQUIPMENT PRIOR TO PERFORMING ANY WORK.
Use tripods, towers, and attachments to tripods and towers only for purposes for which they are designed. Do not
exceed design limits. Be familiar and comply with all instructions provided in product manuals. Manuals are
available at www.campbellsci.eu or by telephoning +44(0) 1509 828 888 (UK). You are responsible for conformance
with governing codes and regulations, including safety regulations, and the integrity and location of structures or land
to which towers, tripods, and any attachments are attached. Installation sites should be evaluated and approved by a
qualified engineer. If questions or concerns arise regarding installation, use, or maintenance of tripods, towers,
attachments, or electrical connections, consult with a licensed and qualified engineer or electrician.
General
•Prior to performing site or installation work, obtain required approvals and permits. Comply with all
governing structure-height regulations, such as those of the FAA in the USA.
•Use only qualified personnel for installation, use, and maintenance of tripods and towers, and any
attachments to tripods and towers. The use of licensed and qualified contractors is highly recommended.
•Read all applicable instructions carefully and understand procedures thoroughly before beginning work.
•Wear a hardhat and eye protection, and take other appropriate safety precautions while working on or
around tripods and towers.
•Do not climb tripods or towers at any time, and prohibit climbing by other persons. Take reasonable
precautions to secure tripod and tower sites from trespassers.
•Use only manufacturer recommended parts, materials, and tools.
Utility and Electrical
•You can be killed or sustain serious bodily injury if the tripod, tower, or attachments you are installing,
constructing, using, or maintaining, or a tool, stake, or anchor, come in contact with overhead or
underground utility lines.
•Maintain a distance of at least one-and-one-half times structure height, or 20 feet, or the distance
required by applicable law, whichever is greater, between overhead utility lines and the structure (tripod,
tower, attachments, or tools).
•Prior to performing site or installation work, inform all utility companies and have all underground utilities
marked.
•Comply with all electrical codes. Electrical equipment and related grounding devices should be installed
by a licensed and qualified electrician.
Elevated Work and Weather
•Exercise extreme caution when performing elevated work.
•Use appropriate equipment and safety practices.
•During installation and maintenance, keep tower and tripod sites clear of un-trained or non-essential
personnel. Take precautions to prevent elevated tools and objects from dropping.
•Do not perform any work in inclement weather, including wind, rain, snow, lightning, etc.
Maintenance
•Periodically (at least yearly) check for wear and damage, including corrosion, stress cracks, frayed cables,
loose cable clamps, cable tightness, etc. and take necessary corrective actions.
•Periodically (at least yearly) check electrical ground connections.
WHILE EVERY ATTEMPT IS MADE TO EMBODY THE HIGHEST DEGREE OF SAFETY IN ALL CAMPBELL
SCIENTIFIC PRODUCTS, THE CUSTOMER ASSUMES ALL RISK FROM ANY INJURY RESULTING FROM IMPROPER
INSTALLATION, USE, OR MAINTENANCE OF TRIPODS, TOWERS, OR ATTACHMENTS TO TRIPODS AND TOWERS
SUCH AS SENSORS, CROSSARMS, ENCLOSURES, ANTENNAS, ETC.


i
Table of Contents
PDF viewers: These page numbers refer to the printed version of this document. Use the
PDF reader bookmarks tab for links to specific sections.
1. Introduction................................................................ 1
2. Cautionary Statements.............................................. 1
3. Initial Inspection ........................................................ 1
4. Quickstart................................................................... 1
5. Overview .................................................................... 2
5.1 Memory Drive Function.......................................................................3
5.2 Communications Interface Function ....................................................3
5.3 Features ................................................................................................3
6. Specifications ............................................................ 3
7. Setup .......................................................................... 4
7.1 Data Logger CRBasic Programming....................................................4
7.2 SC115 Settings (Optional) ...................................................................4
8. Data-Storage Modes .................................................. 4
8.1 Data-Collection Modes ........................................................................4
8.1.1 Programming for the Data-Collection Modes ...............................5
8.1.2 Multiple Data Loggers ..................................................................5
8.2 Resident Mode .....................................................................................5
8.2.1 Programming for the Resident Modes ..........................................6
9. Retrieving Data from SC115...................................... 6
10. Data Logger Programming........................................ 6
10.1 DataTable() and TableFile() Instructions .............................................7
10.1.1 FileName.......................................................................................9
10.1.2 Options..........................................................................................9
10.1.3 MaxFiles .....................................................................................10
10.1.4 NumRecs/TimeIntoInterval Parameter .......................................10
Data-Collection Modes.....................................................................10
Resident Modes ................................................................................10
10.1.5 Interval Parameter .......................................................................11
Data-Collection Modes.....................................................................11
Resident Mode..................................................................................11
10.1.6 Units Parameter...........................................................................11
10.1.7 OutStat Parameter .......................................................................11
10.1.8 LastFileName Parameter.............................................................12

Table of Contents
ii
10.2 CardFlush Instruction.........................................................................12
10.3 CardOut Instruction............................................................................12
10.4 Powerup.ini ........................................................................................12
10.5 Example Programs .............................................................................12
10.5.1 Data-Collection Mode Examples ................................................12
10.5.1.1 Standard Data-Collection Mode .......................................13
10.5.1.2 Enhanced Data-Collection Mode Example ......................13
10.5.2 Resident Interval Mode Example................................................14
10.5.3 Resident Record Number Mode Examples .................................14
10.5.4 CardFlush Example.....................................................................15
10.5.5 CardOut Example........................................................................16
11. Serial Communications Interface Function ........... 16
12. Troubleshooting Memory Drive.............................. 17
12.1 Preventing Data Corruption ...............................................................17
12.2 Skipped Scans ....................................................................................17
12.3 SC115 with Large Data Compliment .................................................18
12.4 Data Collection Speed........................................................................18
12.4.1 External Memory Card and Collection Speed.............................18
12.4.2 Data Type Collection Speed........................................................19
12.5 Slow Computer Boot-up ....................................................................19
12.6 Write Failure ......................................................................................19
13. Troubleshooting Communications Interface......... 19
13.1 Breaking the Physical Comms Link ...................................................19
14. Technical Reference................................................ 20
14.1 SDC Addressing.................................................................................20
14.2 Formatting Memory ...........................................................................20
14.3 Operating System ...............................................................................20
Tables
10-1. Function of NumRecs, Interval, and Units Parameters.........................8
10-2. Synopsis of MaxFiles Parameter Options ..........................................10

1
SC115 CS I/O 2G Flash Memory Drive
with USB Interface
1. Introduction
The SC115 is a portable 2-GB memory drive (thumb drive) compatible with
Campbell Scientific CRBasic data loggers that have a CS I/O port. It shuttles
data, OS, and program files between Campbell Scientific data loggers and a
computer, or it remains connected to the data logger to augment data memory.
It can be used in tandem with an external memory card.
The SC115 can also be used as a CS I/O to USB communications interface.
2. Cautionary Statements
•Corruption of multiple data files may occur if the SC115 is removed from
the host data logger or computer during data transfer.
•Do not disconnect the SC115 from the host while the LED is flashing or
lit. Always use the Safely Remove Hardware utility provided in the
Windows®operating system prior to removal from a computer.
•Some data-collection modes increase the risk of inadvertently
disconnecting the SC115 from the data logger during data transfer. See
Section 12.1, Preventing Data Corruption (p. 17), to assess the risk in a
particular application.
•Always click Disconnect in the data logger support software prior to
removing the SC115 when it is a communications interface. See Section
11, Serial Communications Interface Function (p. 16), for communication
interface details and precautions.
•Before the SC115 can be used as a CS I/O to USB communications
interface or be configured through the Device Configuration Utility
(DevConfig), the device driver must be installed. DevConfig is used to
install the device driver. Under Device Type, select Peripheral | SC115.
Click Install USB Driver and follow the prompts.
3. Initial Inspection
Upon receipt of the SC115, inspect the packaging and contents for damage.
File damage claims with the shipping company. Immediately check package
contents against the shipping documentation. Contact Campbell Scientific
concerning discrepancies.
4. Quickstart
The primary function of the SC115 is as a portable memory drive (thumb
drive) to collect data from compatible Campbell Scientific data loggers (see
Section 6, Specifications (p. 3), for compatibility). Simply connect the CS I/O

SC115 CS I/O 2G Flash Memory Drive with USB Interface
2
connector of the SC115 to the CS I/O connector of a properly programmed
data logger, and data is transferred automatically.
Memory drive setup (see Section 7, Setup (p. 4), for complete instructions):
•SC115 – shipped from the factory ready for use in most applications.
•Data logger – as shown in the following code example, insert the
TableFile() instruction into the data logger CRBasic program
immediately following the DataInterval() instruction. This
configuration enables the SC115 to collect the newest data in the data-
collection mode (see Section 8.1, Data-Collection Modes (p. 4)). Note
that in data-collection mode, data will only be written to the SC115
when it is first attached to a data logger. While left connected, no new
data will be written to the SC115. Additional data will not be written
to the SC115 until it is disconnected and reconnected to the data
logger. For complete programming examples, see Section 10.5,
Example Programs (p. 12).
Use “CS9” as the drive name for GRANITE-series data loggers.
Use “USB” as the drive name for all other CRBasic data loggers.
DataTable (Hourly,1,-1)
DataInterval (0,60,Min,0)
TableFile ("USB:"+Status.SerialNumber+"_Filename",8,-1,0,0,Min,0,0)
Sample (1,PanelTempC,FP2)
Minimum (1,BattVolt,FP2,0,False)
EndTable
5. Overview
The SC115 is a portable 2-GB memory drive (thumb drive) compatible with
CRBasic data loggers that have a CS I/O port. It can be used in tandem with an
external memory card. It shuttles data, OS, and program files between
Campbell Scientific data loggers and a computer, or it remains connected to the
data logger to augment data memory.
The SC115 can also be used as a CS I/O to USB communications interface.
The SC115 has a USB 2.0 compatible connector used to attach the SC115 to a
computer USB port to allow stored data files to be copies to the computer. It
also has a CS I/O 9-pin connector that attaches the SC115 to the CS I/O port of
compatible Campbell Scientific data loggers. The SC115 may be connected
directly to a computer or data logger, or connected through the supplied
extension cables.
The 5 Vdc (pin 1) of the CS I/O interface determines whether the SC115 is
used as a memory drive or as a CS I/O-to-USB communications interface. If
the 5 Vdc pin is not driven high, it acts as a memory drive. If the 5 Vdc pin is
driven high by the data logger, the SC115 will serve as a communications
interface.
NOTE

SC115 CS I/O 2G Flash Memory Drive with USB Interface
3
5.1 Memory Drive Function
As a memory drive, when the SC115 is attached to the CS I/O port of a data
logger, the LED (Light Emitting Diode) first flickers as the SC115 and data
logger negotiate communications. The data logger determines if the
TableFile() instruction is set to write to an SC115. The LED flickers as the
data logger copies data files to the SC115. The LED stops flickering when data
transfer is complete, and the SC115 can safely be disconnected.
As a memory drive, when the SC115 is attached to a computer, the LED first
lights solidly as it communicates with the computer to obtain a unique address.
Once negotiations are finished, the LED extinguishes and the SC115 appears as
a removable drive in Windows®Explorer. Data files on the SC115 can be
copied or moved to other drives. Files, such as CRBasic program files or
operating system (OS) files, can be copied or moved from computer drives to
the SC115.
5.2 Communications Interface Function
As a communication device, the SC115 provides pass-through
communications.
5.3 Features
•Portable 2-GB memory drive
•Shuttles data, OS, and program files or remains connected to data logger to
augment memory
•Can be used as a CS I/O to USB communications interface
•Mean time between failure (MTBF): >1,000,000 hrs
•Sealed, over-moulded case. No serviceable parts.
6. Specifications
Compatibility
Data loggers: GRANITE series, CR9000X, CR6, CR3000,
CR1000X, CR800 series, CR5000, CR1000
A data logger can have only one SC115 connected.
Temperature
Operating: –25 to 50 °C
Power requirement
Source: 12 Vdc from data logger CS I/O port,
or 5 Vdc through computer USB port
Load
Idle: 200 µA
Active: 35 mA
Memory
Capacity: 2 GB
Media: Flash
NOTE

SC115 CS I/O 2G Flash Memory Drive with USB Interface
4
Transfer Speed over CS I/O: Approximately 4 to 8 kBps1
Weight:
Dimensions:
Compliance information:
0.64 kg (0.14 lbs)
105 x 43 x 21 mm (4.2 x 1.7 x 0.8 in)
View the EUDeclaration ofConformity at:
www.campbellsci.eu/sc115
1This transfer speed is suitable for most environmental applications. However, high
frequency applications (for example, sub-minute TableFile() output intervals) are best
served by a CFM100 or NL116 with a compact flash card due to faster transfer speeds
across the peripheral bus compared to the CS I/O bus.
7. Setup
The data logger requires inclusion of specific code in its CRBasic program to
store data to the SC115. In rare instances, the SC115 may require a change to
its default configuration through Device Configuration Utility software v. 1.5
or higher.
7.1 Data Logger CRBasic Programming
The data logger CRBasic program needs to include a TableFile() instruction to
store data logger data on the SC115. The TableFile() instruction is entered in
the declaration of the data table after the DataInterval() instruction. The
parameters entered for the TableFile() instruction depend on the data-storage
mode used (refer to Section 8, Data-Storage Modes (p. 4)). Section 10, Data
Logger Programming (p. 6), discusses, in detail, data logger programming, and
provides several data logger programming examples.
7.2 SC115 Settings (Optional)
The default SDC addressing in the SC115 is adequate for most applications.
For exceptional circumstances, the CS I/O SDC address can be altered using
DevConfig v. 1.5 or higher (see Section 14.1, SDC Addressing (p. 20)).
Before the SC115 can be configured through DevConfig, the
device driver must be installed. DevConfig is used to install the
device driver. Under Device Type, select Peripheral | SC115.
Click Install USB Driver and follow the prompts.
8. Data-Storage Modes
The data logger CRBasic program specifies the SC115 data-storage mode
through the TableFile() instruction. The TableFile() instruction also
determines what data the SC115 will receive from the data logger. Data-
collection modes and residential modes are available.
8.1 Data-Collection Modes
Data-collection modes are sometimes referred to as ‘plug and pull’ collection.
The SC115 is plugged into the data logger then pulled from it. With these
modes, data collection is automatically initiated by connecting the SC115 to
NOTE

SC115 CS I/O 2G Flash Memory Drive with USB Interface
5
the data logger. The SC115 only collects data already contained in data logger
memory at the time of connection. Additional data will not be collected until
the SC115 is disconnected and then reconnected to the data logger.
Both standard and enhanced data-collection modes are available. With the
standard mode, the SC115 collects the newest data (data written to the data
logger memory since the last connection). With the enhanced mode, the SC115
collects all of the data stored in the data logger’s memory every time the
SC115 is reconnected.
To use the enhanced data-collection mode, the data logger must
have a newer operating system (OS 22 or higher).
8.1.1 Programming for the Data-Collection Modes
The standard mode is enabled in the TableFile() instruction by entering 0for
both the NumRecs (Number of Records) parameter and the Interval parameter.
The enhanced mode is enabled by entering 0for the NumRecs parameter and
entering –1 for the Interval parameter.
Below are examples of TableFile() instructions that enable data-collection
modes. The first TableFile() instruction enables the standard data-collection
mode. The second TableFile() instruction enables the enhanced data-collection
mode. See Section 10.5.1, Data-Collection Mode Examples (p. 12), for more
detailed program code.
Use “CS9” as the drive name for GRANITE-series data loggers.
Use “USB” as the drive name for all other CRBasic data loggers.
TableFile("USB:"+Status.SerialNumber+"_FileName",8,-1,0,0,Hr,0,0)
TableFile("USB:"+Status.SerialNumber+"_FileName",8,-1,0,-1,Hr,0,0)
8.1.2 Multiple Data Loggers
The data-collection modes allow one SC115 to be used with multiple data
loggers. When using multiple data loggers, specify a unique file name for each
instance of the TableFile() instruction (see Section 10.1.1, FileName (p. 9)). This
avoids overwriting data files from other data loggers.
8.2 Resident Mode
Resident modes increase the risk of data corruption. Review
Section 12.1, Preventing Data Corruption (p. 17), before employing
a resident mode.
In the resident modes, the SC115 remains attached to a single data logger
allowing it to be used as resident external memory. The data logger can be
programmed to bale data to the SC115 at regular intervals or at uniform bale
sizes.
NOTE
NOTE
NOTE

SC115 CS I/O 2G Flash Memory Drive with USB Interface
6
When data retrieval is required, 1) a second SC115 is swapped with the first, or
2) the SC115 is removed, milked of data (perhaps by copying or moving data
to a computer), and then reconnected to the data logger.
To avoid losing data when the SC115 is disconnected from the
data logger, the data logger must have sufficient storage memory
allocated in DataTable() / EndTable declarations in the form of
internal or external card memory to cover the period the SC115 is
not present.
8.2.1 Programming for the Resident Modes
A resident mode that collects data at regular intervals is enabled in the
TableFile() instruction by entering zero or a positive value for the
NumRecs/TimeIntoInterval parameter and entering a non-zero, positive value
for the Interval parameter. To collect data at uniform bale sizes, enter a non-
zero, positive value for the NumRecs parameter and enter zero for the Interval
parameter.
Below are TableFile() instruction examples that enable resident modes. The
first TableFile() instruction sets the data logger to bale data to the SC115 at
midnight each day. The second TableFile() instruction sets the data logger to
send bales of 24 records to the SC115. See Section 10.5.2, Resident Interval
Mode Example (p. 14), for more detailed program code.
Use “CS9” as the drive name for GRANITE-series data loggers.
Use “USB” as the drive name for all other CRBasic data loggers.
TableFile("USB:FileName",8,-1,0,24,Hr,0,0) 'Interval trigger
TableFile("USB:FileName",8,-1,24,0,Hr,0,0) 'Number of records
trigger
9. Retrieving Data from SC115
To retrieve data from the SC115, plug it into a computer USB port. The SC115
becomes a memory drive on the computer, and data files can be copied, moved,
or deleted with the common file handling functions of Windows®. Multiple
SC115s can be connected to a computer simultaneously and data passed
between them. When used as a communications interface, however, only one
SC115 should be connected to a computer.
Before disconnecting the SC115 from the computer, run the Safely Remove
Hardware utility in Windows®.
10. Data Logger Programming
When used as a memory drive, the SC115 requires a TableFile() instruction in
the data logger CRBasic program. TableFile() creates a file from data table
records, and writes the file to the SC115. The TableFile() instruction must be
within the DataTable() / EndTable declaration.
NOTE
NOTE

SC115 CS I/O 2G Flash Memory Drive with USB Interface
7
10.1 DataTable() and TableFile() Instructions
DataTable() and TableFile() instructions work together. The data table size
declared in DataTable() determines the size of the TableFile() buffer. For
instance, a programmer may attempt to conserve data logger memory by
setting DataTable() Size to 0with the thought that doing so will direct data to
only be written to the SC115 when it is attached for milking. However, such a
programming tactic will result in failure since, in setting the DataTable() size
to zero, the programmer also sets the TableFile() data buffer to zero.
At the opposing extreme, if the same memory-conscious programmer sets
DataTable() Size to auto-allocate (–1), there is a high probability that the data
logger will allocate far more memory for TableFile() buffering than is needed,
which will consume memory that may be better used elsewhere.
Memory allocated by the DataTable() instruction acts as the
buffer for TableFile() data, so the DataTable() Size
parameter must be declared large enough to buffer the
TableFile() output between collection visits with the SC115.
TableFile() syntax is reviewed below with comments specific to SC115
applications. For more detail, consult CRBasic Editor Help. TableFile() is
included in the DataTable() / EndTable declaration as shown in the
programming examples in Section 10.5, Example Programs (p. 12).
TableFile(a,b,c,d,e,f,g,h)
a= “Drive:FileName.” Drive: use “CS9” as the drive name for
GRANITE-series data loggers; use “USB” as the drive name for
all other CRBasic data loggers. Set a filename unique to each
instance of TableFile() instruction. See Section 10.1.1, FileName
(p. 9), for required syntax.
b= Options. Most common file format is code 8(TOA5). See
CRBasic Help for details.
c= MaxFiles. –1 invokes auto allocation.
d= NumRecs / Time Into Interval. Data-collection modes: enter 0.
Resident modes: enter number of records (integer > 0) or enter
time into interval (integer ≥0). See following TABLE 10-1 and
Section 10.1.4, NumRecs/TimeIntoInterval Parameter (p. 10), for
explanation.
e= Interval. Data-collection modes: enter 0to collect newest data or
enter –1 to collect all of the data logger’s data. Resident mode:
enter 0if parameter dis set to number of records, otherwise enter
time interval (integer > 0). See following TABLE 10-1 and
Section 10.1.5, Interval Parameter (p. 11), for detail.
f= Units. Enter units for time interval. Ignored at compilation if
parameter eis 0 or –1.
g= OutStat. Optional. Set to 0 or see CRBasic Help.
h= LastFileName. Optional. Set to 0 or see CRBasic Help.
CAUTION

SC115 CS I/O 2G Flash Memory Drive with USB Interface
8
TABLE 10-1. Function of NumRecs, Interval, and Units Parameters
NumRecs/
Time Into
Interval (d)
Entry
Interval (e)
Entry
Units (f)
Entry Function
0 0 N/A
(compiler
ignores)
When the SC115 is connected
to the data logger, the data
logger automatically sends to
the SC115 only the data
collected after the SC115 was
last connected. The data
logger will not send additional
data if the SC115 remains
connected to the data logger.
0 –1 N/A
(compiler
ignores)
When the SC115 is connected
to the data logger, the data
logger automatically sends to
the SC115 all of the data
contained in the data logger’s
memory. The data logger will
not send additional data if the
SC115 remains connected to
the data logger.
number of
data
records
(value > 0)
0 N/A
(compiler
ignores)
The data logger sends the
specified number of data
records to the SC115 when
the data records become
available. For example, if the
NumRecsparameter is set to
20 and Interval is set to 0, the
data logger will write twenty
records to the SC115 when
twenty records become
available.
time into
interval
(value ≥ 0)
interval
(value > 0)
mSec, uSec,
Sec, Min, Hr,
or Day
The data logger sends data to
the SC115 at the specified
interval. For example, when
the NumRecs/Time Into
Interval parameter is set to 0,
the Interval parameter is set to
60 and the Unitsparameter is
set to Min, the data logger will
write data to the SC115 every
60 minutes.
The following sections explain each TableFile() parameter in detail.

SC115 CS I/O 2G Flash Memory Drive with USB Interface
9
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 Xis a number that increments each time a new file is written.
Use “CS9” as the drive name for GRANITE-series data loggers.
Use “USB” as the drive name for all other CRBasic data loggers.
When using a single SC115 to collect data from several data loggers, 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:” or “CS9:” 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 collect data from multiple data loggers, it is
often desirable to set the interval parameter to –1. If the interval parameter is
set to 0instead of –1, the complete set of records from a single data logger will
likely be spread across all SC115s used to collect data.
If data is collected from a data logger using an SC115 that
already contains files whose names match those created by
the current data logger TableFile(), the old files are likely to
be overwritten. Using unique filenames for each data logger,
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 (p. 13). A rarely used alternative is to
recompile the data logger program with the second SC115
connected to collect its directory information. This is done
by powering down the data logger, connecting the SC115,
and then powering up the data logger.
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
NOTE
CAUTION

SC115 CS I/O 2G Flash Memory Drive with USB Interface
10
reads or writes data files. For example, Option 7results 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.1.3 MaxFiles
The MaxFiles parameter specifies the maximum number of files to retain on an
SC115. TABLE 10-2 reviews the options.
TABLE 10-2. Synopsis of MaxFiles Parameter Options
MaxFiles Entry Function
X Create Maximum of X files, ring memory (overwrite
oldest file with newest file when full).
0 The filename will remain fixed with no number
appended. The old file if it exists will be overwritten
at each output.
–1 No limit to number of files, ring memory (overwrite
oldest file with newest file when full)
–2 No limit to number of files, fill and stop memory
(data logger stops writing to SC115 when SC115 is
full)
When MaxFiles is X, SC115 memory may fill before X number of files is
reached. If this occurs, the data logger internally reduces X to the current
number of files and overwrites the oldest file with new data.
Refer to the CRBasic Help system for detailed information on this parameter.
10.1.4 NumRecs/TimeIntoInterval Parameter
Data-Collection Modes
For data-collection modes, the NumRecs/TimeIntoInterval parameter is set to
zero, and the Interval parameter is set to either 0or –1 (see Section 10.1.5,
Interval Parameter (p. 11)). With these modes, the data logger begins writing to
the SC115 as soon as it is connected to the data logger. All new records are
written to a single file. See previous TABLE 10-1 and Section 10.5.1, Data-
Collection Mode Examples (p. 12).
Resident Modes
Resident Mode increases the risk of data corruption. Review
Section 12.1, Preventing Data Corruption (p. 17), before employing
a resident mode.
For resident modes, the NumRecs/TimeIntoInterval parameter determines when
files are written to the SC115. The function of NumRecs/TimeIntoInterval is
linked to the Interval parameter. If Interval is set to 0, enter the number of
records to be included in each new file sent to the SC115. The program will
create a new file each time NumRecs is reached. If Interval is set to non-zero,
NumRecs/TimeIntoInterval becomes the time into Interval that the program
NOTE
Table of contents
Other Campbell Storage manuals