USB host (USB: drive)
USB host provides portable data storage on a USB thumb drive. A FAT32-formatted USB thumb drive can be inserted into the host port and will show up as a drive (USB:) in file-related operations. Measurement data is stored on USB: as discrete files by using the TableFile()
instruction. Files on USB: can be collected by inserting the thumb drive into a computer and copying the files.
USB: can be used in all CRBasic file-access-related instructions. Because of data reliability concerns in non-industrial rated drives, this drive is not intended for long-term unattended data storage. Rather, configure Tablefile()
for milking (plug-and-pull) to periodically collect data. Files on USB: are not affected by program recompilation or formatting of other drives.
See the CRBasic Editor help for detailed instruction information and program examples:
USB host precautions
Observe the following precaution
-
When the data logger is powered and a USB thumb drive is connected for plug and pull data-collection mode, the Power LED will flash red during read/write activity.
-
Do not remove a USB drive while the drive is active, or data corruption and damage to the USB drive may result.
LED indicator
When the data logger is powered and a USB thumb drive is connected for data collection, the Power LED will rapidly flash red indicating read/write activity. It is safe to remove the USB flash drive when the LED flashing returns to normal power indication mode (see Power LED indicator). The data logger will write new data files to the USB flash drive again once it is removed and reinserted. Do not leave the USB flash drive attached long term.
Data type collection speed
File type declared in the Tablefile()
TFOption
parameter can affect plug and pull data-collection speed. Data is buffered in the data logger as binary. While data is collected, the data logger converts the binary data to the declared data type. TOB1 options are binary and require very little processor overhead to convert from the binary buffer. TOA5, CSIXML, and JSON are ASCII options and are much slower since they consume significant processor overhead to convert to ASCII from the binary buffer. CSIXML is especially slow. The effects on collection time will be particularly noticeable if the data logger is running a long or complex program. In short, if large files need collection, using the TOB1 format may save considerable time. Consult the Loggernet manual for options available to convert TOB1 data files on the computer to easier-to-read formats.
Skipped scans
CR350 programs run in sequential mode A CRBasic program execution mode wherein each statement is evaluated in the order it is listed in the program.. In sequential mode, the
Tablefile()
instruction must finish before continuing to the next instruction, resulting in skipped scans unless the scan interval is long enough to complete all communications, measurement processing, and Tablefile()
tasks. Sequential mode ignores any scan buffers that may be assigned.
To avoid skipped scans, ensure the scan interval in the data logger program is long enough to include writing to the USB thumb drive. We recommend adding at least 100 ms to the program scan interval for each instance of the Tablefile()
instruction to allow sufficient time to execute and process each Tablefile()
instruction.
Formatting drives 32 GB or larger
Windows does not support creating a FAT32 partition on a 32 GB or greater drive. The work-around is to use a Windows computer to format the drive as NTFS (NT file system). Then use the data logger to format the drive as FAT32.