SC115 CS I/O 2G Flash Memory Drive with USB Interface
12
10.1.8 LastFileName Parameter
Set to 0 (no last file name) if desired. The
LastFileName
parameter is a
variable that contains the name of the last file written.
LastFileName
is updated
the next time
CallTable()
instruction is executed.
TableFile()
has been designed to permit the data logger to continue program
execution while data is baled by a separate process into the table file. The up-
side is that
TableFile()
does not slow program execution. The down-side is
that notification is delayed that the
TableFile()
task is complete. This situation
is manifest as follows.
If writing a new file takes longer than the
CallTable()
interval (the interval of
the
Scan() / NextScan
construct wherein the
CallTable()
instruction resides),
then the
LastFileName
variable will not be updated. In other words, if the table
file is large, and the scan rate is short,
LastFileName
may not be updated.
10.2 CardFlush Instruction
If a program
Scan()
/
NextScan
Count
parameter is non-zero, the latest data
may fail to write to the SC115 unless the
CardFlush
instruction is used. For
example, with a scan count of 600, a scan interval of 100 ms, and writing a file
with
TableFile()
after every 10 seconds (every 100 records), only 400–575
records may be written to the SC115 due to the program ending at the 600
th
scan prior to transferring all the records to the SC115. To transfer the
remaining data to the SC115, place the
CardFlush
instruction between the
NextScan
and
EndProg
(p. 15)
.
10.3 CardOut Instruction
A data logger that supports external memory cards can be programmed to
simultaneously store data to internal memory, an external memory card, and an
SC115. The data logger program needs to include a
CardOut()
instruction in
the
DataTable()
declaration. By including
CardOut()
, the data logger can
write data to the SC115 that is present only on the external memory card. See
External Memory Card and Collection
(p. 18)
, for more
information on SC115 and external memory card interactions. See Section
(p. 16)
.
10.4 Powerup.ini
The SC115 supports the use of a powerup.ini file, which allows the host data
logger to be sent a specific program or operating system at data logger power-
up. Consult the powerup.ini section in the data logger manual for more
information.
10.5 Example Programs
10.5.1 Data-Collection Mode Examples
Use “CS9” as the drive name for GRANITE-series data loggers.
Use “USB” as the drive name for all other CRBasic data loggers.
NOTE