Section 4. storage module memory and data encoding, 1 file marks, 2 pointers – Campbell Scientific SM192/SM716 Storage Modules User Manual

Page 15: 3 data format and input buffer

Advertising
background image

4-1

SECTION 4. STORAGE MODULE MEMORY AND DATA ENCODING

4.1 FILE MARKS

File Marks are used to separate data in the
Storage Module. A File Mark is automatically
placed in the SM's memory when the SM is
connected to a power source (datalogger or
retrieval interface) or when the datalogger
compiles a program containing Instruction 96.
For example, if the user has retrieved data from
one datalogger, disconnects the SM and then
connects it to a second datalogger, a File Mark
is placed in the data when the second
datalogger is connected. This mark follows the
data from the first datalogger and precedes the
data from the second.

A File Mark can be placed in the data from
SMCOM or the CR10 *9 Mode Command 3.
The Storage Module will not store back to back
file marks; if a File Mark is the last thing stored
in memory, a second file mark will not be
stored.

4.2 POINTERS

The SM has several internal pointers which are
used to keep track of data for both storage and
retrieval operations.

The Display Location Pointer (DLP) is used to
display Storage Module data. Ordinarily, when
the SM is connected to a datalogger, the DLP
will be at the beginning of the current file. The
DLP can be positioned anywhere within the
data, using the nnnnnnG command (Appendix
D). Data can then be "dumped" to the user
device using one of the appropriate commands
(nnnnC, nnnnD, or nnnnF). The dump will
begin at the DLP and continue until it reaches
the Storage Reference Pointer (SRP) or until
the next File Mark.

The Storage Reference Pointer (SRP),
indicates the next location to be written to in the
Storage Module. If not changed by user
commands, it will always be at the end of data
in the Storage Module. It can be moved
through use of the 3H command (Appendix D),
however, this can be dangerous since the next
data written to the Storage Module will write
over data at the SRP. Typically, the 3H
command is used only during testing.

The Dump Pointer is an internal Storage
Module pointer used for keeping track of the
current start-of-dump for Storage Module-to
Storage Module data dumps and for the data
retrieval options of the SMCOM program. The
user can move the Dump Pointer with the 4H
command (Appendix D). The Dump Pointer
marks the end point of the previous data dump
and thus the start-of-dump location for the next
dump. Moving this pointer "loses" this
reference point, which can cause problems with
subsequent dumps.

4.3 DATA FORMAT AND INPUT

BUFFER

Data can be stored in either the Campbell
Scientific Inc. Final Storage Format (binary) or
in the Printable ASCII format. The default
setting of the Storage Module is to encode
ASCII data into binary; one low resolution data
point requires two bytes. Storing ASCII data
requires 10 bytes per data point. The encode
option can be disabled by a software switch
(see Telecommunications Commands,
Appendix D). Each asynchronous byte is 8-bits
plus 1 start and 1 stop bit. The idle state (stop
bit) is 0 VDC. RS-232C logic levels, if applied,
are clipped to 0 and 5 VDC.

The Storage Module has a 2800 byte Input
Storage buffer. Data transmissions of any
length can be stored at 9600 baud (or slower),
allowing only 5 msec between transmissions for
"housekeeping" tasks. A transmission is
defined here as all data sent to the Storage
Module at one time while PE is high.

When sending data at 76,800 baud, a continuous
transmission must not be larger than about 7500
bytes, or the input buffer will be overrun and data
will be lost. In addition, if a second transmission
occurs before the previous transmission's data
have been processed and stored, all data in the
previous and the current transmission will be lost.

The maximum possible data storage rate is
approximately 5600 bytes each second (2800
low resolution data points). Transmissions of
data at 76,800 baud must be broken up into
segments small enough to stay within this limit.
Processing time required by the Storage
Module for each byte is 210 usec while

Advertising