SM4M / SM16M
Storage Module
User Guide
Issued 14.02.00
Copyright
Copied under licence by Campbell Scientific Ltd.
2000 Campbell Scientific, Inc.
Guarantee
This equipment is guaranteed against defects in materials and
workmanship. This guarantee applies for thirty-six months from date of
delivery. We will repair or replace products which prove to be defective
during the guarantee period 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 Companys 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 Refer-
ence 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 re-
pairs can be given on request.
When returning equipment, the Repair Reference Number must be clearly
marked on the outside of the package.
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,
Campbell Park, 80 Hathern Road,
Shepshed, Leicestershire, LE12 9RP UK
Tel: +44 (0) 1509 601141
Fax: +44 (0) 1509 601091
Email: support@campbellsci.co.uk
http://www.campbellsci.co.uk
Contents
Section 1. SM4M/SM16M Storage Module
Overview.................................................................. 1-1
1.1 Specifications........................................................................................ 1-1
1.2 Physical Description .............................................................................1-2
1.3 Power....................................................................................................1-3
1.3.1 Primary Power ............................................................................. 1-3
1.3.2 Backup Power and Data Retention .............................................. 1-3
1.4 Function................................................................................................1-3
1.4.1 Operation with Current Dataloggers ........................................... 1-3
1.4.2 Operation with Dataloggers with Older Operating Systems ....... 1-4
1.4.3 Data Retrieval/Telecommunication Command State .................. 1-4
1.4.4 Memory Configuration ............................................................... 1-5
1.4.5 Baud Rates .................................................................................. 1-5
1.4.6 File Marks ................................................................................... 1-5
1.4.7 Power-up Status Indication ......................................................... 1-5
1.5 Quick Start-Up Procedure..................................................................... 1-6
1.5.1 Preparation .................................................................................. 1-6
1.5.2 Programming the Datalogger to Send Data to the SM ................ 1-6
1.5.3 Manual Dump ............................................................................. 1-7
1.5.4 Data Retrieval .............................................................................. 1-7
Section 2. Storing Data from Current Datal oggers .. .2-1
2.1 Instruction 96 – Output Data Under Program Control.......................... 2-1
2.1.1 Multiple Storage Modules with the CR500/510, CR10/10X
or CR23X .................................................................................. 2-2
2.1.2 Use of Two Storage Modules with the 21X or CR7 ................... 2-3
2.2 *8 and *9 Mode – Keyboard-Initiated Data Transfer........................... 2-3
2.2.1 *8 Mode CR500/510, CR23X, CR10/10X ............................... 2-3
2.2.2 *9 Mode 21X or CR7 ............................................................... 2-3
2.3 Storing Burst Measurement Data from the CR10/10X, CR23X
or 21X.................................................................................................. 2-3
2.3.1 Burst Data with CR10/10X, CR23X Dataloggers ....................... 2-4
2.3.2 Burst Data with 21X Dataloggers ............................................... 2-4
Section 3. The Printer Enable Method of
Data Storage............................................................3-1
3.1 Baud Rates............................................................................................ 3-1
3.2 Storing Data from the 21X and CR7.....................................................3-1
3.2.1 Instruction 96 Output Under Program Control ........................ 3-1
3.2.2 *4 Mode Output Device Enable ............................................... 3-2
3.2.3 *9 Mode Keyboard-Initiated Data Transfer ............................. 3-2
3.3 Special Data Storage Operations...........................................................3-2
3.3.1 DSP4 Heads Up Display ............................................................. 3-2
3.3.2 Storing Burst Measurement Data from the 21X .......................... 3-2
i
SM4M/SM16M Storage Module User Guide
Section 4. Storage Module Memory:
Details of Data Storage...........................................4-1
4.1 File Marks............................................................................................. 4-1
4.2 Pointers................................................................................................. 4-1
4.3 Data Formats – Space Requirements.................................................... 4-2
4.4 Available Storage.................................................................................. 4-2
4.5 Bad Data ............................................................................................... 4-3
Section 5. Data Retrieval.............................................5-1
5.1 Hardware............................................................................................... 5-1
5.1.1 SC532 Interface .......................................................................... 5-1
5.1.2 Via Datalogger ............................................................................ 5-2
5.1.3 Via Remote Datalogger and Modem ........................................... 5-2
5.2 Datalogger Support Software................................................................5-3
5.2.1 SMS ............................................................................................. 5-3
5.3 Data Retrieval Steps.............................................................................. 5-3
5.3.1 Windows/NT PCs ........................................................................ 5-3
5.3.2 CR500/510, CR10/10X and CR23X
Telecommunications Interface ...................................................... 5-3
Section 6. Storing and Retrieving
Datalogger Programs..............................................6-1
6.1 SMS Storage Module Support Software............................................... 6-1
6.2 *D Mode – with Datalogger ................................................................. 6 -1
6.3 Using DSP4 Heads Up Display to Store and
Retrieve Datalogger Programs............................................................. 6-2
Appendix A. *9 Mode—Storage Module Commands A-1
Appendix B. Telecommunications Commands........B-1
Appendix C. Storage Module 9-Pin Connector.........C-1
Appendix D. Upgrading the Operating System.........D-1
Figures
1- 1 Storage Module and SC12 Cable .......................................................... 1-2
1- 2 Operation with Current Dataloggers ..................................................... 1-3
1- 3 Pin-Enable Operations .......................................................................... 1-4
1- 4 Telecommunications Command State .................................................. 1-4
5- 1 Storage Module Connected to a Portable PC via an SC532 Interface .. 5-1
5- 2 Communication Via the CR500/510, CR10/10X or CR23X ................ 5-2
5- 3 Communication Via the CR23X ........................................................... 5-2
5- 4 Typical Setup for Remote Collection of Data Via Datalogger
and Modem .......................................................................................... 5-2
Tables
4- 1 Ring-Memory Effective Memory Capacity .......................................... 4-2
6-1 *D Mode Keyboard Commands ........................................................... 6-1
A-1 *9 Mode Commands for Storage Module .......................................... A-2
ii
Section 1. SM4M / SM16M Storage
Module Overview
Campbell Scientifics SM4M and SM16M Storage Modules expand on-site data storage for
users of Campbell Scientific dataloggers. They also provide the user with a convenient
method of transporting data from the field back to the office. The SM4M and SM16M are
compatible with the CR500/510, CR10/10X, 21X, CR23X and CR7 dataloggers as well as the
DSP4 Heads Up Display.
This manual contains two broad divisions. The Overview surveys the Storage Modules and
their function. It also explains how to quickly begin using an SM for straightforward data
storage operations. The remainder of the manual is a technical reference which describes in
detail such operations as: storing data from current dataloggers, storing data from older
dataloggers, data retrieval, and datalogger program storage and retrieval.
The Overview should be read by all users, as should Section 5 (Data Retrieval). Users with
the CR500/510, CR10/10X, CR23X or with the 21X or CR7 with recent operating systems (i.e.
current dataloggers) should read Section 2, while users of Campbell Scientifics older
dataloggers should read Section 3. Section 6 (Storing and Retrieving Datalogger Programs)
and Appendix B (Telecommunication Commands) may be used as needed.
SMS (Storage Module Software) simplifies communication procedures between dataloggers
and storage modules. SMS is part of Campbell Scientifics PC208W Windows-based
datalogger support software. Contact Campbell Scientific for further information.
1.1 Specifications
Storage Capacity:
SM4M: 2 Million low-resolution data values
SM16M: 8 Million low-resolution data values
Program storage: stores up to eight programs with a total capacity
of 128 kbytes (including labels)
Dimensions: 135 x 7 5 x 2 0 m m
Weight: 200 g
Canister: Sealed
Processor: Hitachi H8S
Operating system: 64 kbytes, flash memory based, user
downloadable.
Operating Temp. Range: -35 °Ct o+ 6 5 °C (-55 °Ct o+ 8 5 °C optional)
Baud Rates for data storage: 9600, 76800 baud
Baud Rates for
telecommunications: 1200, 2400, 4800, 9600, 19200, 38400, 57600,
76800, 115200.
Memory Configuration: User selectable for either ring style (defau lt) or fill
and stop.
1-1
SM4M/SM16M Storage Module User Guide
Power Requirements: 5 ±0.3V DC @ 100mA (max.)
Current drain:
Active, processing,
e.g. memory test: 3040mA (avg.)
Active, but waiting,
e.g. communications mode: 10mA (avg.)
Typical current during data
storage from a datalogger: 1 5mA (avg.)
Low Power Standby State: less than 200
Peak current (flash erase): 60mA
A.
Maintenance: There are no user-serviceable parts inside the
Storage Module.
Logan, UT
L
O
S
D
I
SN:
SM4M
A
T
S
O
T
S
E
T
MADE IN USA
E
L
U
D
O
M
E
G
A
R
1.2 Physical Description
The Storage Module is housed in a sealed canister with a single, 9- pin
D-connector. The Storage Module is connected to a datalogger via the SC12
9-conductor ribbon cable.
There are two LEDs (light emitting diodes) adjacent to the connector. A red status
LED indicates the operational status of the module at power-up (see section 1.4)
and a green LED lights when data is being stored in the module.
The SM4M and SM16M are identical except for the amount of memory they
contain. The internal memory is split into 64kb blocks. There are 64 blocks of
STATUS
W
R
ITE
Figure 1-1 Storage Module and SC12 Cable
1-2
1.3 Power
1.3.1 Primary Power
1.3.2 Backup Power and Data Retention
Section 1. SM4M/SM16M Storage Module Overview
memory in an SM4M and 256 blocks in an SM16M. This equates to a capacity of
more than 2 million low-resolution storage values for the SM4M and more than 8
million low-resolution values for the SM16M See Section 4.
The Storage Module is powered by 5V DC received from the datalogger or from
data retrieval interfaces such as the SC532 9-pin Peripheral to RS232 Interface.
Pin 1 o f the 9-pin D-connector supplies the 5V DC. Pin 2 i s both the power
ground and signal ground.
The modules use non-volatile flash EEPROM memory, which does not require
power to retain data. There is no internal battery.
The flash memory will retain stored data for approximately 10 years. Typically,
the flash memory can be erased and rewritten a minimum of 100,000 times.
1.4 Function
1.4.1 Operation with Current Datal ogger s
STORE DATA W/ INSTRUCT ION 96
The SM4M and SM16M Storage Modules supplement the storage capacity in a
datalogger. The Storage Modules can store data from Campbell Scientific
dataloggers and from other devices which properly enable them.
All Storage Module operations occur in one of three basic operational modes:
1. Interactive communication with the datalogger for data and program storage
and retrieval.
2. The Printer-Enable Method for data storage with the 21X and CR7 which
have older operating systems, and also with the DSP4.
3. The Telecommunications Command State for data retrieval and other
miscellaneous operations.
The Storage Module uses an interactive command structure with handshaking
when connected to the CR500/510, the CR10/10X, CR23X, or to the 21X or CR7
fitted with recent software (see Figure 1-2). If the SM is not connected the
datalogger does not send data. The datalogger detects when the SM is connected
and sends the backlogged data the next time it executes Instruction 96.
Datalogger
STORE DATA W/ *8 MODE CR500/CR510/CR10/CR10X/CR23X
STORE DATA W/ *9 MODE 21X, CR7
UPLOAD AND DOWNLO AD PROGRAMS W/ *D MODE
*9 MODE COMMANDS CR500/CR510/CR10/CR10X/CR23X
Figure 1-2 Operation with Current Dataloggers
SM4M/
16M
1-3
SM4M/SM16M Storage Module User Guide
The SM can store data either under program control (Instruction 96) or under user
control (*8 Mode with CR500/510, CR10/10X and CR23X, *9 Mode with 21X
and CR7). Datalogger programs can be stored in and retrieved from the Storage
Module using the *D Mode. The CR500/510, CR10/10X and CR23X *9 Mode
enables the user to directly execute commands such as: change address, view data,
etc. (See your datalogger manual for full details.)
1.4.2 Operation with Dataloggers with Ol der Operating Systems
(Printer-Enable Method)
In the Printer-Enable Method (see Figure 1-3), the Storage Module stores all data
received (on pin 9) while the printer enable line (pin 6) is high. The Storage
Module automatically detects the baud rate from the sending device (9600 or
76800 only). The datalogger cannot detect if the SM is connected. Data is sent
whether or not the SM is connected.
21X
CR7X
CR7
CR21
DSP4
SM4M/
16M
Figure 1-3 Pin-Enable Operations
Data can be stored in the SM under program control (Instruction 96 or *4 Mode)
or under user control (*9 Mode). Operations with the DSP4 Heads Up Displays
also use the Printer-Enable Method. (See Section 3).
1.4.3 Data Retrieval / Telecommunication Command State
Data retrieval and other interactive operations with a computer take place in the
Telecommunications command state see Figure 1-4. PC208W uses the
Telecommunications Commands for data retrieval. Direct telecommunication
commands can also be sent from SMS (part of PC208W) in the Terminal
Emulator mode. A list of direct telecommunication commands is shown in
Appendix B.
Computer/
Terminal
SM4M/
16M
1-4
Figure 1-4 Telecommunications Command State
1.4.4 Memory Configuration
The Storage Modules memory can be configured as either Fill and Stop or Ring
memory. In the Fill and Stop configuration, the Storage Module stops accepting
data when its memory is full. No data write-over occurs with this configuration. In
the Ring Memory configuration (the default setting), new data continues to be
stored even after the memory is full. Once full, new data is written over the oldest
data. The Storage Modules memory configuration can be changed using SMS or
with command 4 o f the CR500/510, CR10/10X and CR23X *9 Mode.
1.4.5 Baud Rates
The Storage Module automatically detects the baud rate of data sent to it.
When using the telecommunications commands, sending several carriage returns
will cause the Storage Module to match the computers baud rate (see
specifications above).
1.4.6 File Marks
File Marks are used to separate data in the Storage Module. A File Mark is
automatically placed in the SMs 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 also be inserted under program control.
Section 1. SM4M/SM16M Storage Module Overview
CAUTION
The SM must be disconnected from power for a minimum of
10 seconds to be certain it places a File Mark in the SM when
reconnected.
A File Mark can be placed in the data by using SMS or the CR500/510,
CR10/10X or CR23X *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.
1.4.7 Power-up Status Indication
When power is applied to the Storage Module by plugging it into a datalogger or
SC532, the red Status LED will flash to indicate the status of the module.
CAUTION
The SM must be disconnected from power for a minimum of
10 seconds to ensure it powers down and performs the status
check when reconnected.
After connection there will be a short delay when neither LED is illuminated. The
length of the delay is variable and is partly determined by the address of the
module. This delay avoids excessive power consumption during power-up, when
several modules are connected to the datalogger. For a module at address 1 the
initial delay will be up to 2 seconds. The delay increases by approximately one
second for each increase in the address number.
1-5
SM4M/SM16M Storage Module User Guide
The first flash after the delay will last from 1 t o 2 seconds, depending on the last
use of the module. Further flashes follow with a 0 .5 second OFF and 0.5 second
ON spacing.
The total number of flashes indicates the status of the module, as follows:
Module OK 1 flash
Module operating system corrupted 2 flashes
OK and Program area full 3 flashes
Flash memory corrupted 4 flashes
OK - has wrapped around at least once 5 flashes
Storage module full 7 flashes
Previous operating system load failed 10 flashes
If the module is connected to a datalogger which has data to send, the green
Write LED may start to flash shortly after the end of the Status flash, as the
module becomes available to receive data and store it.
The module will only receive data if the status is OK, is OK and program area full
or OK and has wrapped around at least once. For any of the other status
conditions the module will not accept any further data until the fault has been
corrected.
1.5 Quick Start-Up Procedure
This Section describes the basics of storing and retrieving datalogger data. These
operations are discussed in detail in Sections 3, 4 and 5 o f this manual.
1.5.1 Preparation
Before putting the Storage Module into service, connect it to a computer and use
SMS to reset the SM and test the memory.
If it is not possible to use a P C and SMS, you must establish communication
between the SM, the available computer or terminal (see Section 5), and reset the
SM using the telecommunications commands (see Appendix B) or use the *9
Mode in the CR500/510, CR10/10X or CR23X.
There are two possible reset mechanisms. A full reset and test (command 1248K),
which erases the memory and then carries out a thorough test of the storage
memory, and the quick reset (command 1249K). While the 1248K command
thoroughly checks the module, it can take some time to perform this test (over 20
minutes for larger modules). A quick reset, resets all the memory pointers and
erases the flash chips. It also does a less rigorous test of the flash memory, but the
test is adequate for most purposes. An SM16M will take around 3 minutes to
perform a quick reset.
1.5.2 Programming the Datalogger to Send Data to the SM
1-6
Instruction 96 is used in the datalogger program to send data to the Storage
Module. The SM is connected to the datalogger with the SC12 cable. Each time
Instruction 96 is executed, Final Storage data accumulated since the last transfer is
sent to the Storage Module.
Section 1. SM4M/SM16M Storage Module Overview
For the CR7 and 21X
data to the storage module. The Output Enable code should be set to X1, Printer
Enabled ASCII.
The DSP4 outputs data to a storage module when the storage module function (or,
for older versions of software, the printer function) is enabled.
1.5.3 Manual Dump
The *8 Mode in the CR500/510, CR10/10X, CR23X or the *9 Mode in the 21X
and CR7 can be used to transfer data to the SM under keyboard control (See
Section 4).
1.5.4 Data Retrieval
The simplest method of retrieving data from the Storage Module is to use SMS
which is part of the PC208W support package. If you have a computer which
cannot run this software, the SM telecommunications commands can be used to
retrieve the data. Data retrieval (including interface devices) is discussed in
Section 5.
without
Instruction 96, the *4 Mode can be used to send
1-7
Section 2. Storing Data from Current
Dataloggers
This section covers data storage from the CR500/510, CR10/10X, CR23X and from the 21X
and CR7 with current software. See Section 3 for the 21X and CR7 with early operating
systems.
2.1 Instruction 96 — Output Data Under Program
Control
Instruction 96 is used to send Final Storage data to a Storage Module under
program control. Instruction 96 should be entered into the program table
following the Output Processing Instructions. Instruction 96 should be executed
each time the table is executed (i.e. the program should not branch around or skip
over Instruction 96). Instruction 96 can also be used to insert a file mark into the
data under program control. To do this, the option code entered for parameter 1 i s
7X (where X equals the storage module address) and the parameter is indexed.
Instruction:
Parameter:
When output to the Storage Module is enabled with Instruction 96, the Storage
Module(s) may either be left on-site and periodically exchanged, or brought to the
site to extract the data from the datalogger.
The datalogger is capable of recognising whether or not the Storage Module is
connected. Each time Instruction 96 is executed and there is data to output, the
datalogger checks for the presence of the Storage Module. If one is not present, no
data is sent; the datalogger continues its other operations without advancing its
Storage Module Pointer.
When you finally connect the Storage Module to the datalogger, two things
happen:
1. Immediately on con nection, a File Mark is placed in the Storage Module
memory at the position of the Modules Storage Reference Pointer ( SRP).
The File Mark allows the operator to distinguish blocks of data from
different dataloggers or from different visits to the field.
96
01:
7X CR500/510, CR10/10X, CR23X uses option 7X to send
the data to the Storage Module with address X.
X=18
30 21X and CR7 use option code 30 to send data to the
Storage Module.
2. During the next execution of Instruction 96, the datalogger recognises that
the Storage Module is present, outputs all of the data stored since the
previous output, and updates the Storage Module Pointer to the DSP
location. This transfer occurs in binary at 9600 baud.
Under optimum conditions, the datalogger outputs 480 low resolution data points
per second. For example, a full 128K CR10X takes over two minutes to complete
2-1
SM4M/SM16M Storage Module User Guide
the data transfer. If the execution interval is less than two minutes, the data
transfer will be interrupted and will take longer to complete.
CAUTION
Be sure to complete the data transfer
changes in the datalogger program. Changing a program and
then compiling it will advance the datalogger’s Storage Module
Pointer to the position of the DSP. If this is done before
connecting the Storage Module to allow the datalogger to
transfer the data, the old data will
transferred to the Storage Module. Also, the Instruction 96
data transfer will not take place while the datalogger is in
communication with another device, e.g. a computer or an
active CR10KD.
To be certain that the SM has been connected during an execution of Instruction
96, you can observe the green WRITE LED of the SM which indicates data is
being stored in the module. Connect the SM to the datalogger and wait for the
LED to light.
disconnected.
To avoid data loss, data must be retrieved before the dataloggers ring memory
wraps around and begins to write over the oldest data.
When the LED goes off
, data transfer is complete and the SM can be
before
making any
not
be automatically
2.1.1 Multiple Storage Modules with the CR500/510, CR10/10X or
CR23X
CAUTION
These dataloggers use synchronous addressing to communicate with multiple
peripherals. The CR23X must have OS1.7 or later to work with multiple modules.
Up to four SM4M/SM16M Storage Modules can be connected reliably to a single
datalogger. Each is assigned an address, 1 t o 8 . Addresses are assigned in the *9
Mode (command 10), using SMS or in the Telecommunications Command State
(the L command). These are discussed in the datalogger manuals and Appendix B
respectively. The default Storage Module address on reset (as sent from the
factory) is #1. This will be sufficient for most users.
While eight Storage Modules can be addressed,
communication may be unreliable if more than four SM4M or
SM16M modules are connected to a datalogger. Contact
Campbell Scientific if you need to connect more than four
modules.
At a given time, only one Storage Module will accept commands directed to SM
#1. If there is no Storage Module with address #1, the Storage Module with the
lowest numbered address will accept the commands sent to SM #1. Commands
directed to addresses other than #1 can be accepted
correct address. Do
datalogger at the same time.
If only one Storage Module is used with the datalogger, its address should be #1.
When multiple Storage Modules are used in a datalogger system, each should be
assigned its own address and set to Fill and Stop. Instruction 96 is used in the
datalogger program to send data to Storage Module address #1. The lowest
numbered Storage Module will fill up first, followed by the next lowest address,
and so on. Alternatively, data can be sent to specific Storage Modules via direct
addressing by the datalogger (using a separate Instruction 96 for each SM).
not
connect Storage Modules with the same address to a
only
by the SM with the
2-2
Section 2. Storing Data from Current Dataloggers
Instruction 96 can be entered two or more times in a program to sort data to
specific Storage Modules. Three important considerations are:
1. All Storage Modules to be used must be connected to the datalogger with
SC12 cables.
2. Time must be allowed between the execution of multiple instances of
Instruction 96 to Storage Modules. Add 5ms to the time it takes to store the
number of bytes to be transmitted (1ms per byte) before executing the next
Instruction 96 which addresses a different Storage Module.
3. Use of the keyboard or telecommunications during the execution of
Instruction 96 may backlog the data to be sent to the Storage Modules. In
this event, during the next execution of Instruction 96, all backlogged data
will be sent to the Storage Module addressed in that instruction.
2.1.2 Use of Two Storage Modules with the 21X or CR7
For large volumes of data, two SMs can be connected to the 21X or CR7. Use
SMS to set one SM as Fill and Stop, and the other as Ring Memory.
2.2 *8 and *9 Mode — Keyboard-Initiated Data Transfer
2.2.1 *8 Mode — CR500/510, CR23X, CR10/10X
The *8 Mode is used to manually initiate a Final Storage data transfer from the
datalogger to an external peripheral. Data transfer rate is 9600 baud. Refer to the
discussion of the *8 Mode in the datalogger Operators Manual for full details.
2.2.2 *9 Mode — 21X or CR7
The *9 Mode in the 21X and CR7 dataloggers is used to transfer a specified block
of data from Final Storage to the Storage Module. Consult the appropriate
datalogger manual for details.
NOTE
This function is different from the *9 Mode in the CR500/510,
CR10/10X or CR23X.
2.3 Storing Burst Measurement Data from the
CR10/10X, CR23X or 21X
Burst Measurement (Instruction 23) is a special datalogger instruction used to
make fast analogue voltage measurements. Two options are available for data
retrieval with this instruction:
1. Data is stored in the datalogger Input Storage Locations
or
2. Raw data is output from the datalogger serial port.
In option 2, the Storage Module can capture the data at 76,800 baud. Burst data is
output by the datalogger in a unique format which includes calibration
measurements at the beginning and end of the series of measurements. Split (part
of the PC208/PC208W software packages) will translate this Burst data.
2-3
SM4M/SM16M Storage Module User Guide
2.3.1 Burst Data with CR10/10X, CR23X Dataloggers
Entering a 3 for the third digit in parameter 4 o f Instruction 23 selects the
Storage Module as the destination for the Burst data. All SMs connected should be
set to Fill and Stop and have consecutive addresses. The Burst data will be sent to
the first available (lowest addressed) Storage Module, followed by the next lowest
addressed, and so on.
2.3.2 Burst Data with 21X Dataloggers
To send Burst Measurement (Instruction 23) data to the Storage Module from the
21X, set the Destination option (parameter 4) to 2 for serial port output at 76,800
baud.
2-4
Section 3. The Printer Enable Method of
Data Storage
Data from the 21X and CR7 with PROMs older than the OSX and OS7 series PROMs (and
from the CR21 and DSP4) are stored in the Storage Module via the Printer Enable Method,
i.e. data on the TD line (pin 9) are stored while the PE line (pin 6) is high. The Storage
Module defaults to the Printer Enable Method each time it is powered up by 5V DC applied
to pin 1 o f its 9-pin D connector. Up to two Storage Modules can be connected to the 21X
or CR7 dataloggers at one time. If two are connected, one should be set to Fill and Stop and
the other configured as Ring Memory.
CAUTION
If the PE line is high when power is applied, the SM will not
store data until the next time PE goes high. Also, if power to
the SM is interrupted during transmission, data stored since
the last time PE went high will be lost.
3.1 Baud Rates
In the Printer Enable Method, you must ensure that the baud rates of the Storage
Module and the datalogger are matched. The SM4M/SM16M will only accept
data at 9600 or 76800 baud. There is no user configuration for this setting in the
module as it automatically detects the speed of the data sent to it.
Baud rate errors (i.e. baud rate mismatches between the datalogger and the
Storage Module) cause the Storage Module to increment its error counter and
enter a low power standby state.
3.2 Storing Data from the 21X and CR7 (All Versions
Prior to OSX and OS7 Release)
Instruction 96 is the recommended method for the CR7 and the 21X with
Extended Software. The *4 Mode could also be used to transmit data in ASCII
format but Instruction 96 is more efficient as data is transferred in the most
compact binary format therefore *4 Mode is not recommended.
For large volumes of data two SMs can be connected to the datalogger. Use SMS
to set one as Fill and Stop, and the other as Ring Memory.
3.2.1 Instruction 96 — Output Under Program Control
Instruction 96, available in the CR7X and in the Extended Software PROMs for
the earlier versions of the 21X, is used to send Final Storage data to the Storage
Module under program control. Instruction 96 should follow the Output
Processing Instructions in the program table. Consult the datalogger instruction
manual for details about using Instruction 96. Do
Instruction 96 to activate a device in a datalogger program.
Instruction:
Parameter:
96
01:22
not
use both the *4 Mode and
3-1
SM4M/SM16M Storage Module User Guide
Explanation:
Option 22 selects binary printer output at 9600 baud. The left
digit specifies the device option and the right, the baud rate.
Refer to the datalogger manual for further details.
3.2.2 *4 Mode — Output Device Enable
The *4 Mode is used to enable the output of Final Storage data to a printer. The
Storage Module will capture this printer output.
Select option X1 in window 1, and set the baud rate to 9600 (option 02) in
window 2 (to match the Storage Modules default setting). Data is written to the
Storage Module each time data is sent to Final Storage.
CAUTION
While the module will work with *4, data is stored in the
module in ASCII format which requires up to 5 times more
memory space than binary format. Consider buying an
operating system upgrade if you are using dataloggers that do
not allow binary data storage with Instruction P96.
3.2.3 *9 Mode — Keyboard-Initiated Data Transfer
The *9 Mode in the 21X and CR7 dataloggers is used to transfer a specified block
of data from Final Storage to the Storage Module. Consult the appropriate
datalogger manual for details. This function is different from the *9 Mode in the
CR10/10X/CR23X.
3.3 Special Data Storage Operations
3.3.1 DSP4 Heads Up Display
In addition to real-time monitoring of datalogger measurements, the DSP4 Heads
Up Display can be used with the CR10/10X, CR23X, 21X and CR7 dataloggers to
store and retrieve data and programs. With the DSP4 storage module function
enabled, datalogger Final Storage data can be sent to the Storage Module. Refer to
the DSP4 Instruction Manual for more details regarding use with Storage
modules.
3.3.2 Storing Burst Measurement Data from the 21X
Burst Measurement (Instruction 23) is a special datalogger instruction available
for the 21X and which makes fast analogue voltage measurements. Two options
are available for data retrieval with this instruction:
1. Data is stored in datalogger Input Storage locations
or
2. Raw data is sent out of the datalogger serial port.
In the second case, the Storage Module can capture data at 76,800 baud.
When the Burst Measurement (Instruction 23) is used with the 21X, select the
destination (parameter 4) option as 2 for serial port output at 76,800 baud to send
data to the Storage Module. Burst data is output by the datalogger in a unique
format which includes calibration measurements at the beginning and end of the
series of measurements. Split (part of PC208W) will translate Burst data.
3-2
Section 4. Storage Module Memory:
Details of Data Storage
Detailed knowledge of the way data is stored in the storage module is not normally necessary
for day-to-day use. However, if you ever need to calculate and utilise the exact memory
available, or try to extract corrupted data, it may be helpful to know these details.
4.1 File Marks
File Marks are used to separate data in the Storage Module. A File Mark is
automatically placed in the SMs 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 you retrieve data from one
datalogger, disconnect the SM and then connect 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 also be inserted under program control.
CAUTION
4.2 Pointers
The SM must be disconnected from power for a minimum of
10 seconds to be certain it places a File Mark in the SM when
reconnected.
A File Mark can be placed in the data by using SMS (part of PC208W), the *9
Mode command 3 (not in 21X or CR7) or from a special P96 command in the
datalogger program.
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.
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)
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 (see Appendix B). Data can then be dumped
to the user device using one of the appropriate commands ( nnnnC or nnnnF). The
dump will begin at the DLP and continue until it reaches the
Pointer ( SRP)
or until the next File Mark.
is used to display Storage Module data.
Storage Reference
The
Storage Reference Pointer ( SRP)
in the Storage Module. It will always be at the end of data in the Storage Module.
The
Dump Pointer
of the current start-of-dump for Storage Module to Storage Module data dumps
and for the data retrieval options of the SMS program. The user can move the
Dump Pointer with the 4H command (see Appendix B). 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.
is an internal Storage Module pointer used for keeping track
indicates the next location to be written to
4-1
SM4M/SM16M Storage Module User Guide
4.3 Data Formats – Space Requirements
The modules store data in the format in which it is sent to them. There is no
conversion or encoding of the data received before it is stored.
Data can be sent to the module in either the Campbell Scientific Final Storage
Format (binary) or in the Printable ASCII format. One low resolution data point
requires two bytes in binary format. Since storing ASCII data requires 10 bytes
per data point, the binary option should be used whenever possible.
Bytes from the Storage Module input buffer are permanently stored in byte-pairs.
The Campbell Scientific dataloggers Final Storage Format data is always grouped
in pairs. Printable ASCII may have a single byte left in the input buffer when the
PE line drops. In this case the byte will be stored with a null character (ASCII
Code 0) as the second byte.
4.4 Available Storage
The flash memory used within the modules is divided into 64 Kbytes blocks,
within the memory chips themselves. One limitation of flash memory is that it
must be erased before it is possible to write data to it. It is only possible to erase
entire blocks of memory i n this case, 64 Kbytes at a time.
If the module is being used as Fill and Stop, this is of no consequence as the
memory will have been entirely erased before use. The module will store data
until every memory block has been filled.
However, when used as Ring Memory, once the module has filled it must erase
the next block of memory before it can continue writing around the ring. Erasing
a block takes approximately one second, and so, if data is still streaming into the
module, the erase process must take place in advance of writing to that block.
The consequence of this process is that the module must erase blocks of the oldest
data in advance. The modules initiate the erase process 24,000 bytes before the
end of the current block. In the worst case the size of the erased section of the
module will be 64 Kbytes plus 24,000 bytes. Table 4-1 lists effective capacity for
the SM4M and SM16M configured as ring memory. The effective size of the
memory can be calculated by taking the storage module size minus 4 bytes per
block (used for internal marking purposes), MINUS the worst case erased data
size.
Table 4-1 Ring-Memory Effective Memory Capacity
Module Bytes Low-Res Data Values
SM4M 4104516 2052258
SM16M 16686660 8343330
4-2
The amount of storage available for fill and stop memory is 89524 bytes or 44762
low-resolution data values greater than the above (the last eight bytes of memory
can not be written to).
The module will only store data up to the end of the last complete block of data
transmitted before the module becomes full. This means that if data is sent in large
blocks and the module becomes full just before receipt of the end of the last block,
then the effective capacity will be the above figures minus almost the block size.
4.5 Bad Data
Section 4. Storage Module Memory: Details of Data Storage
The storage module has mechanisms that detect corrupted data being received
from the datalogger. When bad data is received the module will immediately stop
storing the data. The datalogger will detect this and retransmit the entire data from
the last point that the storage module had confirmed receiving the data.
This process does have some consequence for memory use. Data is stored as
received. With flash memory it is not possible to overwrite the previously
received data transmission without erasing a complete block of memory. Instead a
marker system is used which marks the previously written data as bad. When the
data is collected, the bad data is skipped so a continuous stream of good data is
output. However, the amount of good data that can be stored in the module is
reduced by the size of the bad data blocks.
Bad data can also be stored if the module is unplugged while receiving data
from the datalogger or if the module resets due to an electrical transient occurring
while data is being stored.
In most cases bad data will be rare and the reduction in storage small. The
likelihood of significant loss of available storage increases if the length of data
transmissions to the module are long, and/or the module is unplugged frequently
without taking care to wait until the end of transmission.
The areas with bad data are freed for normal storage again either when the
module is erased or when the area is erased prior to writing new data.
The only other instances when you might encounter bad data are:
•
The start of dump pointer is manually positioned in the module prior to
requesting data, and that position is in the middle of an area of bad data.
•
An SM in ring-mode has filled the memory and wrapped around the ring and
erased the block containing the start of the bad data marker (an area of bad
data which straddles flash blocks). The next block containing the remainder
of the bad data will not have been erased.
In both cases the bad data will be read out as normal data and written to file.
However, when the end of bad data marker is encountered, it will be treated as if
it is a file mark and the data that follows will be written into a new file. You will
then find a small file usually containing a partial duplicate of data that is also
written to the following larger file.
4-3
Section 5. Data Retrieval
Data retrieval is accomplished on PCs using SMS (part of the PC208W datalogger support
software package). Other computers require a software program which makes use of the
Storage Module telecommunications commands (see Appendix B). This process requires both
a hardware interface and a software program.
5.1 Hardware
There are two interfaces which enable communication between a computer and
the Storage Module:
1. the SC532 Peripheral to RS232 Interface
2. the CR500/510, CR10/10X or CR23X with a suitable cable and interface
(not possible with other dataloggers)
The SC532 can function with any computer that has an RS232 port. A software
program is required to raise the DTR and RTS (pins 20 and 4, respectively) to
activate the SM (see Section 5.2). SMS performs this function automatically.
External Power from AC/DC Power
Adapter or 12V DC supply
9227
SN:
Logan, UT
SM4M
SOLID STATE STORAGE MODULE
PERIPHERAL
SC532
MADE IN USA
9 PIN PERIPHERAL TO RS232 INTERFACE
MADE IN USA
RS232
Figure 5-1 Storage Module Connected to a Portable PC via an SC532 Interface
5.1.1 SC532 Interface
A standard 25-pin ribbon cable (e.g. Campbell Scientific SC25AT) links the
SC532 to the computers serial port. The SC12 9-pin ribbon cable links the
Storage Module to the SC532 (see Figure 5-1).
The SC532 requires 12V DC (nominal) which is usually provided by plugging the
AC/DC adaptor unit into a standard AC outlet. The use of battery power is
possible and is described in the SC532 manual.
5.1.2 Via Datalogger
The Storage Module is linked to the CR500/510, CR10/10X or CR23X by the
SC12 cable. The computer connection is via an SC32A (see Figure 5-2), SC929 or
SC532/RAD modem interface. With this configuration on the CR23X connect all
devices to the 9 pin CS I/O port. Select the Via Datalogger option in SMS and
select the appropriate datalogger and baud rate.
Please note that communication in this mode is limited to a maximum speed of
9600 baud (19200 on the CR23X), which can make the transfer of large volumes
5-1
SM4M/SM16M Storage Module User Guide
of data a lengthy process, compared to direct connection to a PC, where baud rates
up to 115200 are supported.
The SC32A internal SDM blocking jumper should be in place. Without the
jumper in place (and sometimes with the SC929), Windows may report a framing
error after correctly collecting data with SMS.
PC
Data-
logger
SM4M/16M
Figure 5-2 Communication Via the CR500/510, CR10/10X or CR23X
Communication between a P C and storage module can also take place via the
CR23X when the computer RS232 is connected to the CR23X RS232 and the
storage module is connected to the CS I/O port (Figure 5-3). This configuration
allows baud rates of 19200 and 38400.
CR23X
PC
9-Pin
RS232
Cable
SM4M/16M
SC12
9-Pin
CS I/O
Cable
5.1.3 Via Remote Datalogger and Modem
Computer
Running PC208W
Figure 5-4 Typical Setup for Remote Collection of Data Via Datalogger and Modem
Modem
Cable
Hayes Compatible
Modem
Figure 5-3 Communication Via the CR23X
The data can be collected from a module connected to one of the above
dataloggers via other telecommunication interfaces (e.g. phone lines). A typical
arrangement is show in Figure 5-4, below.
Standard Phone
Lines
COM200E
Modem
Surge
Protector
SC12
9-pin Cable
CR10X
Datalogger
SM4M/
16M
5-2
The telecommunications part of the PC208W datalogger support software package
is used to schedule and make data collection from the datalogger or storage
module. Please refer to the PC208W manual for further details.
5.2 Datalogger Support Software
5.2.1 SMS
SMS (part of the PC208W software package) is a Windows-based program which
provides a simple and efficient way of communicating with the SM4M/SM16M,
as well as Campbell Scientifics Card Storage Module (CSM1), Card Reader
(MCR1) and PC (PCMCIA) Cards. SMS normally requires the SC532 interface
as shown in Figure 5-1 for direct connection. For communication via the
CR500/510, CR10/10X or CR23X the setup shown in Figure 5-2 is required.
SMS also has a terminal emulator for manual execution of telecommunication
commands. See the PC208W manual for full details of SMS.
For the most rapid data transfer, use a P C capable of supporting data transfer at
115,200 baud in a Windows environment. This will normally require that the
serial ports of the PC are fitted with buffered UARTs, which is the case for most
modern machines. Within SMS you should increase the baud rate to 115,200.
Section 5. Data Retrieval
5.3 Data Retrieval Steps
5.3.1 Windows/NT PCs
1. Use an SC532 Interface.
2. Make the appropriate connections (see Section 5.1).
3. Run SMS (see the PC208W manual).
5.3.2 CR500/510, CR10/10X and CR23X Telecommunications
Interface
Make the connections (see Figures 5-2 and 5-3) and establish communications
with the datalogger. Send the command XM ,CR to the datalogger (where X i s
the Storage Module address 1...8). If the connections are correctly made and the
Storage Module is properly addressed, it will send back CR, LF, %. If the
attempt to establish communications fails, the datalogger will return *.
Once the % is received, the Storage Module telecommunications commands (see
Appendix B) may be used. SMS can be used when the connection to the
datalogger is through the SC32A Optically Isolated RS232 Interface as shown in
Figure 5-2.
5-3
Section 6. Storing and Retrieving
Datalogger Programs
CR500/510, CR10/10X, CR23X, 21X and CR7 programs can be uploaded and downloaded
between the datalogger and the Storage Module in the *D Mode. (OSX and OS7 series
PROMs are required for the 21X and CR7.) Campbell Scientifics SMS software allows
programs to be transferred between the computer and the SM. Using these capabilities, a
program can be developed in the computer, stored in the SM and then carried to the field and
downloaded to the datalogger.
The SM can store up to eight programs, numbered 1 t o 8 . These are stored in an area of
memory separate from that used for data storage.
With the release of the OS series PROMs (OS10, OSX, OS7), the dataloggers were given the
capability of automatically loading program 8 i f a Storage Module is connected to the
datalogger when the datalogger is powered up. This feature is standard in the CR500/510,
CR10/10X and CR23X dataloggers.
21X and CR7 PROMs before the current OSX and OS7 versions do
store and directly load programs from the SM. For these dataloggers, programs may be
transferred via the DSP4 Heads Up Display (see Section 6.3).
not
have the capability to
6.1 SMS Storage Module Support Software
Select the Program tab in SMS. Refer to the PC208W manual for more
information.
6.2 *D Mode — With Datalogger
The *D Mode is used to transfer programs between the datalogger and Storage
Module. The general commands in Table 6-1 are used to save, retrieve or clear
programs from the Storage Module. Refer to the appropriate datalogger manual
for instructions on using the *D Mode.
Table 6-1 *D Mode Keyboard Commands
Key Display Description
*D 13:00 Enter *D Mode
7XA 7X :00 Address Storage Module X
1YA Store Program in SM as Y (Y=1 ..8)
2YA Load Program Y from SM
3YA Erase Program Y from SM
13:0000 command completed
The program is stored, retrieved, or erased by referring to a program number
(1...8) in the Storage Module. If the program to be retrieved does not exist in the
Storage Module, the error message E99 will be displayed.
There are 128 kbytes of memory available for program storage. For example, you
can store one 128 kbyte DLD file o r 8 x 16kbyte files. Flash memory technology
affects the use of memory when storing and erasing programs.
6-1
SM4M/SM16M Storage Module User Guide
When a program is erased, the space it occupied is not freed until the entire
program storage area is erased. Thus, when you erase a program, the amount of
free space in the storage module program area does not increase. However, you
can reuse the program number to store another program.
The program storage area can be erased either by issuing one of the module
erase/reformat/test commands or by manually deleting all of the programs in the
module. In the latter case the module will erase and tidy-up the program storage
area when the last program is erased.
NOTE
The 21X or CR7 must have only one Storage Module connected
when storing and retrieving programs.
6.3 Using DSP4 Heads Up Display to Store and
Retrieve Datalogger Programs
In addition to real-time monitoring of datalogger measurements, the DSP4 Heads
Up Display can be used with the CR10/10X, CR23X, 21X (including pre-OSX
versions with Extended Software) and the CR7 dataloggers to store and retrieve
data and programs. The DSP4 Load and Save program commands allow loading
and saving CR10/10X, CR23X, 21X, and CR7 datalogger programs in the Storage
Module.
The DSP4 Flag buttons 1...8 execute the Load or Save command using the
Storage Module as the medium. Up to eight datalogger programs can be saved in
the Storage Module. The program to be saved or loaded is selected by pressing the
appropriate push button switch. Refer to the DSP4 Instruction Manual for more
details.
6-2
Appendix A. *9 Mode – Storage Module
Commands
The *9 Mode is used to issue commands to the Storage Module using the
Keyboard/Display or a terminal/computer with all dataloggers except the 21X and
CR7. These commands are analogous in many respects to the datalogger
functional (*) Modes.
The key sequences for the *9 Mode commands have a generalized format. Using
command 1 a s a n example:
Key Display Explanation
*9 09:01 Enter *9 Mode
X 09:X Key in the address (x=1 to 8) of the SM to be given the
command.
A 9 X :00 Enter the SM address, x; ready to accept a command.
1 9 X : 1 Key in command 1. Reset SM.
A 01:0000 Enter command 1. Ready for instruction to effect
command 1.
248 01:248 Key in 248 to effect command 1.
A 01: Execute SM Reset.
The module then executes the equivalent of the 1249K telecommunications
command (see Appendix B). Note that this is not a full 1248K reset as some older
modules perform in response to this command which would take too long for field
use. After about one minute for the SM4M, or three minutes for the SM16M, the
number of megabytes of available data storage is displayed:
01:04 4 for an SM4M
01:16 16 for an SM16M
Most commands have at least one response. Advance through the responses and
return to 9X :00 (ready to accept another *9 command) by keying A.
Exit the *9 Mode by keying * and the character of the mode you want to switch
to (e.g. *0 to go to the log mode).
A-1
SM4M/SM16M Storage Module User Guide
Command Display Description
1 01:0000 RESET: enter 248 to eras e all data and
4 04:XX DISPLAY/SET MEMORY
5 DISPLAY STATUS (A to advance to each window):
6 06:00 No t used
7 07:00 Not used
8 08:00 Not used
9 DISPLAY ADDRESSES OF CONNECTED STORAGE
10 CHANGE ADDRESS
Table A-1 *9 Mode Commands for Storage Module
programs and reset pointers. While erasing,
the SM does a simple check of the memory.
The time required to reset an SM4M is
approximately 1 minute; the SM16M takes
nearly 3 minutes.
01:XX The number of megabytes of data storage
(4 for SM4M, 16 for SM16M).
03:01 INSERT FILE MARK at the position of the
SRP if a file mark wasnt the last thing placed
in the data. 1 indicates that the mark was
inserted, 0 indicates that it was not.
CONFIGURATION: enter the appropriate
code to change configuration: 0=ring, 1=fill
and stop.
01:ABCD Window 1:
AB Not used
CD Total number of megabytes
02:ABCD Window 2:
ABC Not used
D No. of Programs stored (Max=8)
03:ABCD Window 3:
A Errors logged (up to 9)
B Not Used
C Memory Config. (0=ring, 1=fill & stop)
D Memory Status (0=not full, 1=full)
04:XXXXX OS signature (0 if bad OS)
MODULES:
XXXXXXXX 1 = occupied , 0 = unoccupied
87654321 (Addresses 8-1 from left to right)
10:0X X i s current address, enter yA to change and
then display address (where y=1...8).
A-2
Appendix B. Telecommunications
Commands
The SM telecommunications commands can be issued to an SM either via a direct
SC532 connection to the Storage Module or via a remote connection where the
SM is connected to a datalogger.
Establishing communication between the Storage Module and a
computer/terminal is discussed in Section 5. The commands permit data storage
and retrieval, switch setting, status checks and other functions.
The Storage Module is ready for a command when it sends its prompt,
<CR><LF> %. The successful execution of a command is also indicated by the
SM returning a <CR><LF> %. If just a % is returned, the command was in
CTRL - S
error.
commands.
The descriptions of some commands refer to the Storage Module pointers (see
Section 4). The
Module data. The
to be written to in the Storage Module. The
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
SMS program.
(XOFF) temporarily halts Storage Module responses to
CTRL - C
aborts the response.
Display Location Pointer (DLP)
Storage Reference Pointer (SRP )
is used to display Storage
, indicates the next location
Dump Pointer
is an internal Storage
A
Status
Storage Module telecommunications commands are similar to datalogger
telecommunications commands and consist of numbers and CAPITAL letters. In
the following list telecommunications commands are on the left and their
descriptions on the right.
Returns V ersion number, S witch settings, number of P rograms stored, number
of good Data M emory blocks, number of E rrors logged (max. = 255), number
of A vailable storage locations, number of locations F ull, Storage R eference
Pointer, Display L ocation Pointer, D ump Pointer and C hecksum (sum of all
transmitted ASCII characters since last %; wraps around at 8192).
The number of Errors logged is a count of bad characters received from the
logger and/or the number of times the module has reset itself as a result of
some unknown cause. Contact Campbell Scientific for advice if this counter
increments regularly. Unlike previous modules this counter does not increment
if corrupted characters are received in telecommunications mode.
Example: V1 S1400 P0 M64 E0 A2052258 F1 R2 L2 D2 C2226 is the
expected response to the A command after an SM4M has been reset.
NOTE:- in Ring mode, when data storage has gone around the memory more
than once the Number of Locations Full will fluctuate. This is because memory
is erased in 64 Kbyte blocks and filled an output array at a time (Section 4).
NOTE
Refer to the L command for a discussion of the switch settings.
B-1
SM4M/SM16M Storage Module User Guide
AA
Advanced Status
nnnnB
nnnnC
Comma Delineated
ASCII Dump
nnnnF
Binary Dump
Data Flash B lock size in bytes, T otal Data Flash in bytes, Largest U nused
program space in bytes, Total P rogram storage area in bytes, A ctive programs
stored (A10005008 means programs 1,5 and 8 are stored), F Number of
locations left until oldest data will be overwritten, W rap status flag (00 = not
wrapped around, 01 = some oldest data has been erased, 11 = wrapped around
and some data erased) and C hecksum (sum of all transmitted ASCII characters
since last %; wraps around at 8192 bytes).
Example:
B
65536 T 4194304 U 131068 P 131072 A 00000000 F 2097019 W 00 C 2379
is the expected response to the AA command after a SM4M has been reset.
Move the DLP back nnnn output arrays from its current position. If it is fewer
arrays to the beginning of the file (File Mark), the DLP will be placed at the
beginning of the file. B i s the same as 1B. Status is displayed following
execution of command. This command may take some time to complete.
Dump nnnn output arrays from the location of the DLP. The dump stops if the
next file mark or the Storage Reference Pointer is reached. C is the same as
1C. 0C means dump continuously. Status is displayed following execution
of command.
Dump nnnn locations (two bytes each) until the next File Mark from the
location of the DLP. The dump stops if the Storage Reference Pointer is
reached, followed by two bytes displaying the signature of the transmitted data.
No data conversion is made. F is the same as 1F. 0F means dump
continuously. The status is not displayed following command execution.
nnnnnnG
Go To Location nnnnnn
OD
Go To the Oldest Data
01G
Go To Last File
08G
Go To Dump Pointer
09G
Go To Next File
09GG
Go To Next File, with
Progress indicator
0H
Store
Use this command to position the Display Location Pointer to any location in
the Storage Module. The Status is then displayed.
The Display Location Pointer ( DLP) is moved to the start of the oldest data in
the module. (Note: Command is letter OD, NOT zero D).
This command causes the Display Location Pointer (DLP) to move to the
beginning of the current file. The status is then displayed.
The Display Location Pointer (DLP) is advanced to the Dump Pointer position.
The Dump Pointer is set to the beginning of memory when the SM is reset. It is
advanced only by the CR10/10X (*9) Storage Module-to-Storage Module
Dump command, the 4H command, and by SMS.
The Display Location Pointer (DLP) is advanced to the beginning of the next
file. The DLP is advanced as the SM reads through the data until a File Mark or
the Storage Reference Pointer is encountered. For long files, the delay involved
could be noticeable. The status is displayed following command execution.
This command can be used to locate every file in the Storage Module.
As 09G, but outputs the value of the DLP every second as it is moved through
memory, as the module searches for the next file mark.
The Storage Module will store all data received on the Transmit Data line (TD)
until the SM is deactivated when the PE (Pin 6) and CLK/HS (Pin 7) lines go
low. External power must remain applied for at least 5ms following deactivating
PE and CLK/HS for housekeeping. The SM stores two bytes at a time. If the
total number of bytes transmitted is an odd number, a NULL character will be
added at the end of the transmission. This command is not available in
telecommunications through the CR500/510, CR10/10X or CR23X.
B-2
Appendix B. Telecommunications Commands
4H
Move Dump Pointer To
Display Location
Pointer
9H
Store File Mark in Data
nl
Dump Program n
(n = 1…8)
nJ
Store Program n
(n = 1…8)
nJJ
Store Program n, with
Checksum Signature
The Dump Pointer is moved to the current position of the Display Location
Pointer. Refer to command 08G regarding the Dump Pointer. This command
is not intended for general use.
Used to designate a new area of memory in the Storage Module. File Marks are
automatically placed in the data upon application of external power
(5V DC) or when a CR500/510, CR10/10X or CR23X program with
Instruction 96 is compiled. A File mark can also be inserted under program
control. Status is displayed following command execution.
If program n is found, the Storage Module dumps it to the user device,
otherwise it sends a null program (30 05 05 HEX) followed by a prompt
without a carriage return and line feed.
The Storage Module responds with < after which the SM stores program data
received on its TD line, recording its start position in the program directory.
Subsequent data does not write over stored datalogger programs unless the
directory entry is cleared or modified. Programs
character (7D HEX) and end with two
CTRL - E
must
start with the Start ASCII
(05 05 HEX) characters. Status
is displayed following command execution. This command is not available
when communicating with the Storage Module using an RF Modem.
As nJ, but the module output s a 2 byte CSI checksum signature in response to
the 05 05 HEX termination characters, which allows easy validation that the
program has been received correctly.
n0nJ
Clear Program n
(n = 1…8)
1243K
Reset Error Counter
1248K
Reset Storage Module
CAUTION
Clears directory entry for program n and frees the memory space for data
storage this only becomes available for further program storage if all
programs are deleted.
Example: To clear program 7, the command is 707J. Status is displayed
following command execution.
This command resets the communications error counter (the number beginning
with E) to zero, then displays the status line. Neither the programs nor the
data stored in the module are affected by this command.
Erases all data and programs, resets all pointers, tests memory and places a File
Mark at the beginning of memory.
ALL DATA IS LOST IN THE STORAGE MODULE. If a bad flash
memory block is encountered, the Storage Module will use only
the good memory up to the bad block. The number of good flash
memory blocks is indicated in the Status. During Reset, a plus
(+) for each block written to, and a minus (-) for each block
successfully read is output by the Storage Module. An ‘X’ is
output for each memory block which cannot be read
successfully. The status is displayed following command
execution. If, for any reason, memory fails, the relevant pointer
will be zero.
B-3
SM4M/SM16M Storage Module User Guide
1249K
Quick Reset
abfeL
Switch Settings
This command is similar to the 1248K command i t also erases all data and
programs. However, it does not do a complete memory test, it simply resets the
memory pointers and instructs the flash memory to erase itself. This is much
faster than the 1248K command and is designed for routine erasure of the
module. If the module has been corrupted, use the 1248K command instead. A
module with damaged memory requires a full memory test to determine how
much good memory remains intact. The switches are
default settings.
a is the Storage Module Address Switch. When used with a CR500/510,
CR10/10X or CR23X, this switch can be set to 1...8. The address has no effect
when used with other Campbell Scientific dataloggers.
address defaults to 1.
b is the Baud Rate Switch this is not currently used in the modules . This
switch always defaults to a value of 4, for compatibility with older modules.
f is the Fill and Stop/Ring Memory Status Switch . If set to 0, the memory is
ring type . If 1, the memory is set to Fill and Stop and once memory is full,
further efforts to write to the SM are aborted
defaults to 0 (ring memory) following SM Reset.
e is the Encode ASCII Switch . This switch is not currently supported in the
module, it defaults to a value of zero indicating data is stored without any
encoding.
. The memory status switch
not
changed to their
Following reset, the SM
M or *
Disconnect
N
OS Signature
Entering 9 for switch settings leaves the switch setting unchanged . Example:
9990L would only disable the Encode ASCII function . Since position is
important, the 9s are used to fill the first 3 spaces without changing the
settings.
The Storage Module is deactivated to a low power standby mode . If the
communications interface is the CR500/510, CR10/10X, CR23X the logger *
prompt will be returned.
Returns the Storage Module operating system signature . If this command
returns 0, the operating system is bad.
B-4
Appendix C. Storage Module 9-Pin
Connector
The pins on the 9-pin sub-miniature D connector on the Storage Module are
numbered 1 t o 9 . A general description of the function of each pin follows:
Pin 1 (Input) 5V DC Supply provides power to the Storage Modul e.
5 ±0.3V DC @ 100mA. Processor is held in reset when external power
falls below 4V DC. Damage to SM hardware can occur if input on Pin 1
exceeds 5.5V DC. Low power standby mode current drain is less than
200 µA.
Pin 2 (Input) Power and signal GROUND.
Pin 3 RING LINE. Not used.
Pin 4 (Output) RECEIVE DATA (RD) line. The SM transmits its responses to
Telecommunications commands asynchronously (0 to 5V DC) on this line.
Data format is 8-bit, 1 start bit and 1 stop bit. Refer to Section 3.1 for baud
rate options. This line is held high while the SM is active in the Printer
Enable Method (data storage).
Pin 5 (Input) MODEM ENABLE line. Not used.
Pin 6 (Input) PRINTER ENABLE (PE) in Printer Enable Method or
SYNCHRONOUS DEVICE ENABLE (SDE) line in SDC Method. If the
SM is externally powered, the PE line is high (5V DC) and Pin 7
(CLK/HS) is low (0V DC), the processor is set to receive data asynchro-
nously on Pin 9 (TD). When the PE line is dropped, data remaining in the
input buffer is stored and the location pointers are saved. The processor
then enters an inactive, low power, standby state.
If the processor is still active from a previous transmission of data and the
PE line is raised again, the data from the current transmission will be
ignored. Normal operation will return with the next low to high PE
transition. Switch bounce on the PE line can cause the processor to go
inactive after the PE line stabilises in its high state.
Pin 7 (Input) CLOCK/HANDSHAKE (CLK/HS) line. For data storage, CLK/HS
must be low. For data retrieval using Telecommunications Commands (see
Appendix B) CLK/HS must be high when the processor is activated by the
PE line going high. CLK/HS must remain high during
Telecommunications. To exit the Telecommunications Command State,
lower both the PE and CLK/HS lines.
Pin 8 (Input) TAPE ENABLE /12V power line. Not used.
Pin 9 (Input) TRANSMIT DATA (TD) Data is received by the SM on this line.
Data is received asynchronously (0 to 5V DC) 8-bit, 1 start and 1 stop bit.
The idle state (stop bits) on this line is 0V DC. The first byte transmitted to
the SM should be more than 200 µs after the PE line has activated the
processor.
C-1
Appendix D. Upgrading the Operating
System
The storage module operating system is stored in flash memory. (It is NOT
deleted when the storage module is reset.) It is possible to upgrade the operating
system using Campbell Scientifics CSOS download utility. Please contact
Campbell Scientific for a copy of this utility compatible with the SM4M and
SM16M if you need to change the module operating system.
CAUTION
NOTE
Collect any data stored in the module before upgrading the
operating system, as any data held in memory is irreversibly
erased during the upgrade process.
To load the operating system you will need to connect the module to a P C running
Windows, via an SC532 interface. Please follow the instructions supplied with
CSOS.
Do not attempt to load any operating system other than that designed for these
storage modules. Do not disconnect the power supply to the module during the
upgrade process, otherwise the module memory may be corrupted requiring a
factory repair.
After CSOS indicates the download is complete, wait until the green
LED on the SM goes out before using the SM. The green LED is on
while the SM completes the OS upgrade.
D-1