“Products manufactured by CSI are warranted by CSI to be free from defects in materials and
workmanship under normal use and service for twelve months from the date of shipment unless
otherwise specified in the corresponding product manual. (Product manuals are available for
review online at www.campbellsci.com.) Products not manufactured by CSI, but that are resold by
CSI, are warranted only to the limits extended by the original manufacturer. Batteries, fine-wire
thermocouples, desiccant, and other consumables have no warranty. CSI’s obligation under this
warranty is limited to repairing or replacing (at CSI’s option) defective Products, which shall be
the sole and exclusive remedy under this warranty. The Customer assumes all costs of removing,
reinstalling, and shipping defective Products to CSI. CSI will return such Products by surface
carrier prepaid within the continental United States of America. To all other locations, CSI will
return such Products best way CIP (port of entry) per Incoterms ® 2010. This warranty shall not
apply to any Products which have been subjected to modification, misuse, neglect, improper
service, accidents of nature, or shipping damage. This warranty is in lieu of all other warranties,
expressed or implied. The warranty for installation services performed by CSI such as
programming to customer specifications, electrical connections to Products manufactured by CSI,
and Product specific training, is part of CSI's product warranty. CSI EXPRESSLY DISCLAIMS AND
EXCLUDES ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. CSI hereby disclaims, to the fullest extent allowed by applicable law, any and all
warranties and conditions with respect to the Products, whether express, implied or statutory,
other than those expressly provided herein.”
Assistance
Products may not be returned without prior authorization. The following contact information is
for US and international customers residing in countries served by Campbell Scientific, Inc.
directly. Affiliate companies handle repairs for customers within their territories. Please visit
www.campbellsci.com to determine which Campbell Scientific company serves your country.
To obtain a Returned Materials Authorization (RMA) number, contact CAMPBELL SCIENTIFIC,
INC., phone (435) 227-9000. Please write the issued RMA number clearly on the outside of the
shipping container. Campbell Scientific’s shipping address is:
CAMPBELL SCIENTIFIC, INC.
RMA#_____
815 West 1800 North
Logan, Utah 84321-1784
For all returns, the customer must fill out a “Statement of Product Cleanliness and
Decontamination” form and comply with the requirements specified in it. The form is available
from our website at www.campbellsci.com/repair. A completed form must be either emailed to
repair@campbellsci.com or faxed to (435) 227-9106. Campbell Scientific is unable to process any
returns until we receive this form. If the form is not received within three days of product receipt
or is incomplete, the product will be returned to the customer at the customer’s expense.
Campbell Scientific reserves the right to refuse service on products that were exposed to
contaminants that may cause health or safety concerns for our employees.
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.com or by telephoning
(435) 227-9000 (USA). 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
l Prior to performing site or installation work, obtain required approvals and permits. Comply with all governing structure-height reg-
ulations, such as those of the FAA in the USA.
l 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.
l Read all applicable instructions carefully and understand procedures thoroughly before beginning work.
l Wear a hardhat and eye protection, and take other appropriate safety precautions while working on or around tripods and towers.
l 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.
l Use only manufacturer recommended parts, materials, and tools.
Utility and Electrical
l You can be killed or sustain serious bodily injury if the tripod, tower, or attachments you are installing, constructing, using, or main-
taining, or a tool, stake, or anchor, come in contact with overhead or underground utility lines.
l Maintain a distance of at least one-and-one-half times structure height, 20 feet, or the distance required by applicable law,
whichever is greater, between overhead utility lines and the structure (tripod, tower, attachments, or tools).
l Prior to performing site or installation work, inform all utility companies and have all underground utilities marked.
l Comply with all electrical codes. Electrical equipment and related grounding devices should be installed by a licensed and qualified
electrician.
Elevated Work and Weather
l Exercise extreme caution when performing elevated work.
l Use appropriate equipment and safety practices.
l 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.
l Do not perform any work in inclement weather, including wind, rain, snow, lightning, etc.
Maintenance
l 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.
l 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.
Table of contents
1. Introduction1
2. Precautions2
3. Initial inspection2
4. Quickstart2
5. Features5
6. Specifications5
7. Installation6
7.1 Mounting6
7.1.1 Adjusting inclination angle or direction of the SDMS408
7.2 Wiring8
8. Programming10
8.1 SDI-12 programming10
8.2 RS-232 programming11
9. Operation12
9.1 SDI-12 sensor measurements12
9.2 RS-232 sensor measurements13
10. Maintenance and calibration15
10.1 Maintenance15
10.2 Calibration15
10.2.1 Automatic calibration15
10.2.2 Manual calibration16
10.3 Updating operating system16
Appendix A. Importing Short Cut code into CRBasic Editor22
C.3.1 Changing an SDI-12 address38
C.3.2 Changing an SDI-12 address — CR200(X) Series39
C.4 References40
Table of Contents - v
1. Introduction
The SDMS40 Multipoint Scanning Snowfall Sensor is a two dimensional (2D) multipointscanning snow gage, which scans its laser in a circular path on the snow’s surface and measures
the distance from each point on the path. Once it completes a set of measurements, the SDMS40
takes an intelligent average of the depths to provide a representative average snow depth of the
target area. Communications options include SDI-12 and RS-232.
FIGURE 1-1. Laser area
FIGURE 1-1 (p. 1) demonstrates the oval pattern scanned by the sensor. Sophisticated filtering
algorithms are implemented to provide reliable measurements in various weather and surface
conditions.
The size of the target area varies depending on the height and tilt angle of the SDMS40.
SDMS40 Multipoint Scanning Snowfall Sensor1
2. Precautions
l READ AND UNDERSTAND the Safety (p. iii) section at the front of this manual.
l Although the SDMS40 is rugged, it should be handled as precision scientific instrument.
l To avoid shock or damage to the instrument, never apply power while working on wiring
and connections.
l Never open the sensor when the power is turned on.
l The SDMS40 uses a Class 2 laser. Do not stare into the laser beam.
3. Initial inspection
l Upon receipt of the SDMS40, inspect the packaging and contents for damage. File any
damage claims with the shipping company.
l Immediately check package contents against the shipping documentation. Contact Camp-
bell Scientific about any discrepancies.
l Model number and cable length are printed on a label at the connection end of the cable
(if a cable was purchased). Check the model number information against the shipping documents to ensure the expected product and cable length are received.
l Shipped with 4 screws, 2 lock washers, 2 band clamps, and mounting bracket.
l Ensure that the cable has a 1-Position Terminal Connector attached to the blue wire and
another 1-Position Terminal Connector attached to the yellow wire. These connectors are
used to individually isolate unused wires.
4. Quickstart
A video that describes data logger programming using Short Cut is available at:
www.campbellsci.com/videos/cr1000x-datalogger-getting-started-program-part-3. Short Cut is
an easy way to program your data logger to measure the sensor and assign data logger wiring
terminals. Short Cut is available as a download on www.campbellsci.com. It is included in
installations of LoggerNet, PC200W, PC400, or RTDAQ.
The following procedure also shows using Short Cut to program the sensor.
1. Open Short Cut and click Create New Program.
2. Double-click the data logger model.
SDMS40 Multipoint Scanning Snowfall Sensor2
3. In the Available Sensors and Devices box, type SDMS40 or locate the sensor in the Sensors |
Miscellaneous Sensors folder. Double-click SDMS40 (SDI-12) Multipoint Scanning Snowfall
Sensor. The default average snow depth units are millimeters. This can be changed by
clicking the Snow depth average box and selecting different units. Type the correct SDI-12
Address.
4. Click the Wiring tab to see how the sensor is to be wired to the data logger. Click OK after
wiring the sensor.
5. Repeat step three for other sensors.
SDMS40 Multipoint Scanning Snowfall Sensor3
6. In Output Setup, type the scan rate, meaningful table names, and Data Output Storage
Interval.
7. Select the measurement and its associated output option.
8. Click Finish and save the program. Send the program to the data logger if the data logger
is connected to the computer.
9. If the sensor is connected to the data logger, check the output of the sensor in the data
logger support software data display in LoggerNet, PC400, RTDAQ, or PC200W to make
sure it is making reasonable measurements.
SDMS40 Multipoint Scanning Snowfall Sensor4
5. Features
l Provides representative average snow depth of the target area
l Filters out erroneous measurement data caused by noise or foreign materials
l Detects new snowfall quickly and reliably
l Operates on natural ground or snow plate
l Compact and light
l Simple installation process
l After mounting, the sensor performs a fully automatic calibration process to calculate
install angle and height
l Output data on SDI-12 or RS-232 serial data interface
l Compatible with Campbell Scientific CRBasic data loggers: CR200(X) series, CR300 series,
CR6 series, CR800 series, CR1000, CR1000X series, CR3000, and CR5000
6. Specifications
Powersupply:Requires 12 to 15 Vdc power supply capable of
providing up to 2A continuously.
Currentdraw
Standby:
Active:
Heater:
Cable:
Type:
Maximumlength:
50 mA
250 mA
1300 mA
3-Cond 20 AWG, 2 Pair 24 AWG
14 m (45 ft)
SDMS40 Multipoint Scanning Snowfall Sensor5
Sensor
Method:
Numberofscanningpoints:
Range:
Targetareadiameter:
Gagepointingangle:
Halfangle:
Resolution:
Accuracy:
Communicationsprotocols:SDI-12, RS-232
General
Operatingtemperature:
Weight:
Enclosureprotectionclass:
Multipoint laser scanning
36
1 to 5 m
30 cm to 200 cm, depending on installation height
and angle
0 to 45° from vertical
6°
1 mm
±3 mm
–40 to 50 °C (with sensor heat on)
1.8 kg (3.9 lb)
IP67
Lasersafety:
Dimensions
Height:
Length:
Width:
Compliance documents:
Class 2
12 cm (4.72 in)
28 cm (11.02 in)
10 cm (3.94 in)
View at
www.campbellsci.com/sdms40
7. Installation
If you are programming your data logger with Short Cut, skip Wiring (p. 8) and Programming (p.
10). Short Cut does this work for you. See Quickstart (p. 2) for a tutorial.
7.1Mounting
The SDMS40 is environmentally sealed for outdoor installations. The enclosure provides
protection from moisture and high humidity. It is not intended for operation under water. All that
SDMS40 Multipoint Scanning Snowfall Sensor6
is required is an appropriate mounting fixture.
Position the SDMS40 about one meter above the maximum seasonal snow depth height (FIGURE
7-1 (p. 7), FIGURE 7-2 (p. 7)). This provides adequate height for required accuracy and resolution.
Mounting procedure is provided in Table 7-1 (p. 8).
FIGURE 7-1. SDMS40 mounting holes
FIGURE 7-2. SDMS40 mounting angles
SDMS40 Multipoint Scanning Snowfall Sensor7
Table 7-1: SDMS40 mounting procedure
StepProcedure
1
2Using FIGURE 7-2 (p. 7), decide which angle your sensor is to be mounted at.
3
4
5
Attach the L-shaped mount to the flat back mount using the common hole and crescent shaped screw holes.
Bolt the L-shaped mounting piece to the underside of the sensor. The big middle
circle should line up with the cable connector.
Install sensor and mount 1 m above the maximum seasonal snow depth height. For
mounting to poles, use the provided hose clamps.
Line up the connector end of the cable to the cable connector on the sensor.
Lightly push the connector into place and screw the connector to secure.
7.1.1 Adjusting inclination angle or direction of the
SDMS40
The SDMS40 can be installed at any angle between 0 and 45 degrees from the pole. After loosely
tightening the screw on the common hole (FIGURE 7-1 (p. 7)), the inclination angle can be
adjusted in 5 degree increments by matching one of the six holes on the flat backed mount
attached to the pole (FIGURE 7-2 (p. 7)). Use the second screw to fix the inclination angle by
tightening the screw through the SDMS40 part and the bracket. Completely tighten the common
hole screw. See FIGURE 7-2 (p. 7) for mounting angle options.
7.2Wiring
The SDMS40 requires a 12 to 15 Vdc power supply capable of providing up to 2A continuously.
Ensure the power is turned off before connecting the sensor.
CAUTION:
To avoid damage to the instrument, ensure that the power is turned off while wiring.
Align markers on the male and female connectors to plug in the cable to the sensor. The cable
comes with a 1-Position Terminal Connector attached to the blue wire and another 1-Position
Terminal Connector attached to the yellow wire (FIGURE 7-3 (p. 9)).
If using RS-232, remove the connectors from the blue and yellow wires and attach the green wire
to one of the connectors (FIGURE 7-4 (p. 9)).
FIGURE 7-4. Position Terminal Connector isolates wire
not used for RS-232 measurements
Table 7-2 (p. 9) provides SDI-12 wiring and Table 7-3 (p. 10) provides RS-232 wiring. Once
mounting and wiring of the SDMS40 are complete, apply power to the SDMS40.
Table 7-2: SDI-12 sensor wire color, function, and data logger connection
Power supply
Data logger connection
Wire colorFunction
terminal
terminal
BlackPower groundG
RedPower12V
C or U1terminal configured for
GreenSDI-12 signal
SDI-12
BrownSignal ground⏚ (analog ground)
1
U or C terminals are automatically configured by the measurement instruction.
If multiple SDI-12 sensors are connected to a data logger, Campbell Scientific recommends using
separate terminals when possible. However, multiple SDI-12 sensors can connect to the same
data logger control or U terminal. Each must have a unique SDI-12 address. Valid addresses are 0
through 9, a through z, and A through Z.
SDMS40 Multipoint Scanning Snowfall Sensor9
For the CR6 and CR1000X, triggering conflicts may occur when a companion terminal is used for
a triggering instruction such as TimerInput(), PulseCount(), or WaitDigTrig(). For
example, if the SDMS40 is connected to C3 on a CR1000X, C4 cannot be used in the
TimerInput(), PulseCount(), or WaitDigTrig() instructions.
Table 7-3: RS-232 sensor wire color, function and data logger connections
Wire colorFunction
Power supply
terminal
RedPower12V
BlackPower groundG
BrownSignal ground⏚ (analog ground)
BlueRS-232 RxC (odd numbered)
YellowRS-232 TxC (even numbered)
Data logger connection
terminal
8. Programming
Short Cut is the best source for up-to-date data logger programming code. If your data
acquisition requirements are simple, you can probably create and maintain a data logger
program exclusively with Short Cut. If your data acquisition needs are more complex, the files
that Short Cut creates are a great source for programming code to start a new program or add to
an existing custom program.
NOTE:
Short Cut cannot edit programs after they are imported and edited in CRBasic Editor.
A Short Cut tutorial is available in Quickstart (p. 2). If you wish to import Short Cut code into
CRBasic Editor to create or add to a customized program, follow the procedure in Importing
Short Cut code into CRBasic Editor (p. 22). Programming basics for CRBasic data loggers are
provided in the following section. Complete program examples for select CRBasic data loggers
can be found in Example programs (p. 24).
8.1SDI-12 programming
The SDI12Recorder() instruction is used to measure an SDMS40 configured for SDI-12
measurements. This instruction sends a request to the sensor to make a measurement and then
retrieves the measurement from the sensor. See SDI-12 sensor measurements (p. 12) for more
SDMS40 Multipoint Scanning Snowfall Sensor10
information. SDI-12 program (p. 24) provides a complete CRBasic program that measures the
sensor.
For most data loggers, the SDI12Recorder() instruction has the following syntax:
For the SDIAddress, alphabetical characters need to be enclosed in quotes (for example, “A”).
Also enclose the SDICommand in quotes as shown. The Destination parameter must be an
array. The required number of values in the array depends on the command (see Table 9-1 (p.
12)).
FillNAN and WaitonTimeout are optional parameters (refer to CRBasic Help for more
information).
8.2RS-232 programming
The RS-232 instruction sequence is shown in the following table. Example programs are provided
in RS-232 program (p. 27).
Table 8-1: RS-232 instruction sequence
InstructionFunction
SerialOpen()
SerialFlush()
Scan()
SerialOut()
SerialIn()
SplitStr()
Set up a data logger terminal for serial communications.
Clears the buffer.
Establish a scan rate.
Send RS-232 command to the sensor Table 10-2 (p. 21).
Set up the COM terminal to receive the incoming serial data. Please
note that in the beginning of the CRBasic program, the variable used
in the SerialIn() instruction needs to be declared as an ASCII
string format.
Split out digital count value from the input string.
SDMS40 Multipoint Scanning Snowfall Sensor11
9. Operation
9.1SDI-12 sensor measurements
The SDMS40 responds to the SDI-12 commands shown in Table 9-1 (p. 12). When using an M!
command, the data logger waits for the time specified by the sensor, sends the D! command,
pauses its operation, and waits until either it receives the data from the sensor or the sensor
timeout expires. If the data logger receives no response, it will send the command a total of three
times, with three retries for each attempt, or until a response is received. Because of the delays
this command requires, it is only recommended in measurement scans of 10 seconds or more or
use SlowSequence.
A C! command follows the same pattern as an M! command with the exception that it does not
require the data logger to pause its operation until the values are ready. Rather, the data logger
picks up the data with the D! command on the next pass through the program. Another
measurement request is then sent so that data is ready on the next scan.
The R0! command directly reads the sensor measurements and outputs all of its values.
NOTE:
This section briefly describes using the SDI-12 commands. Additional SDI-12 information is
available in SDI-12 sensor support (p. 31), or at www.sdi-12.org.
SDI012 version, manufacturer, model, firmware
version (e.g. 013wtherpiaSDMS40v6.111-24-
2016).
B<CR><LF>Change address.
a<CR><LF>Query sensor address.
Start measurement. Average depth value will
0501<CR><LF>
be provided by aD0! following a service
request.
SDMS40 Multipoint Scanning Snowfall Sensor12
Table 9-1: SDI-12 command list
Commands
aC1!
aD0!
aD1! thru aD8!36individualsampledata Grouped in 8 packets.
aR0!
aXA!
aXTxx!
Where xx is the
desired threshold
1
ResponsesRemarks
Start concurrent measurement. Average depth
and individual depth data at each sample
05041<CR><LF>
point will be provided by aD0! through
aD8!.
depth<CR><LF>Average depth.
Similar to aD0 for continuous measurement
+depth<CR><LF>
mode.
Perform automatic calibration to determine
0601
installation angle and height.
Set the heater threshold value (default is 0 °C).
The heater will turn on when the internal temperature drops below this value and will
xx<CR><LF>
remain on until the temperature climbs above
the threshold. The allowed values range from
–40 to 10 °C.
aXHxx
Where xx is the
height in mm
aXGxx!
1
"a” refers to the address of the sensor.
xx<CR><LF>
0501
Manually set the current sensor height in mm.
This option would only be used if the automatic calibration fails due to problems in the
target area.
Reset the sensor ground level. This command
would be used with the offset if there is existing snow on the ground when the sensor is
installed.
9.2RS-232 sensor measurements
The SDMS40 measures the current snow depth at a user-programmable interval (minutes) and
transmits data on its RS-232 serial data lines to an external device, such as a data logger. By
default, the sensor is in polling mode, where measurements are triggered by request from a data
logger.
Table 9-2 (p. 14) is a list of RS-232 commands in the command mode.
SDMS40 Multipoint Scanning Snowfall Sensor13
Table 9-2: RS-232 command list
Command
usage
@v (x) ⏎1
@i (x) ⏎
@h (x)⏎2000 mm
@g (x)⏎
Where (x) is
the existing
snow depth
@m⏎n/aRun a round of measurements immediately.
@s⏎n/a
Default
value
0 (polling
mode)
n/a
Function
Set the verbose level: 0 – none/1 – show information. Keep the verbose level at 1 if using the RS-232 example program.
Set measurement interval in minutes. The sensor should be kept in
polling mode for use with the sample RS-232 data logger program.
Allowed values: 1, 2, 3, 4, 5, 6, 10, 20, 30, and 60.
Manually set the current gage height in millimeters. Use this command only if automatic calibration fails.
Reset the sensor ground level. This command would be used with
the offset if there is existing snow on the ground when the sensor is
installed.
SDMS40 status. This shows various system information such as current firmware version and installation angle and height.
@ac⏎n/a
@history⏎n/aShow measurement data from the last 24 hours.
@lowtempx⏎
Where x is the
0°C
desired
threshold
@b (x)⏎
Where x is an
0
index for the
(57,600bps)
desired baud
rate
@d⏎n/a
Perform automatic calibration to determine installation height and
angle.
To check the current threshold value, type “@lowtemp” ⏎.To
modify the heater threshold value, include the value x. The heater
will turn on when the internal temperature drops below this value
and will remain on until the temperature climbs above the
threshold. Allowed values range from -40°C to 10°C.
Check or modify the baud rate of the serial port. To check current
baud rate, type “@b”⏎. To modify the baud rate, include the
desired index that follows.
0: 57600, 1: 38400, 2: 19200, 3: 9600, 4: 4800, 5: 2400, 6: 1200.
Check and modify the current SDMS-40 date
* to modify the SDMS-40 date, type “@d” ⏎ and follow instructions.
SDMS40 Multipoint Scanning Snowfall Sensor14
Table 9-2: RS-232 command list
Command
usage
@t⏎n/a
@ct xx ⏎
Where XX is
the new
threshold
@vt⏎
Where XX is
the new
threshold
Default
Function
value
Check and modify the current SDMS-40 time
* to modify the SDMS-40 time, type “@t” ⏎ and follow the instructions.
Change Threshold CT represents the difference in depth for two
25
measurements in the same point
Variance threshold VT is the difference in depth between two adja-
15
cent points in the same measurement
10. Maintenance and calibration
10.1Maintenance
Regular cleaning and inspection is required:
l Check to make sure the target area is free from any obstacles or foreign material.
l Remove any dust or foreign deposits from the window of the SDMS40. Clean the window
glass with soft cleaning fabric or tissues, water, and soft cleaning detergents.
l Inspect the bracket and other mounting clamps for loosened screws or clamps.
10.2Calibration
Once the SDMS40 is fully installed, calibrate it for proper operation. Calibration sets the height
and angle of the sensor to ensure accurate measurements. This occurs automatically (Automatic
calibration (p. 15)) or manually (Manual calibration (p. 16)).
10.2.1 Automatic calibration
SDMS40 supports a fully automatic calibration process, which calculates the height and
inclination angle of the SDMS40. Calibration is required when you first set up the sensor and
SDMS40 Multipoint Scanning Snowfall Sensor15
when you move the sensor. This is done by issuing a calibration request command (SDI-12 aXA!
or RS-232 @ac). When using the RS-232 command, the sensor will ask to confirm the request.
Enter y to proceed.
10.2.2 Manual calibration
Manual calibration is only required if automatic calibration fails. After installation, enter the
height of the sensor and run a ground level resetting procedure.
Entering the height can be done by sending the appropriate command (SDI-12 aXHxxxx! or
RS-232 @h xxxx, where xxxx is the sensor height). When using the RS-232 command, the
sensor will ask to confirm the height. Enter y to proceed.
After entering the sensor height, initiate a ground level reset (SDI-12 aXG! or RS-232 @g). When
using the RS-232 command, the sensor will ask to confirm the request. Enter y to proceed.
10.3Updating operating system
To update the sensor operating system, download the operating system available from:
www.campbellsci.com/sdms40. A terminal emulator software such as PuTTY Portable is required
to do this update. PuTTY Portable is available at no charge from
Wire the SDMS40 sensor to a DB9 female terminal block (see Table 10-2 (p.
21)).
Connect the DB9 female to your computer RS-232 port using a standard serial
cable or to a USB port using a serial-to-USB adapter.
Extract the operating system .zip file (sdms-firmware-update-utility.zip) downloaded from the website and open PuTTYPortable.exe.
SDMS40 Multipoint Scanning Snowfall Sensor16
Table 10-1: Updating operating system procedure
StepProcedure
Select the Session Category and set the parameters to the following:
a. Select a serial line: Use the COM port assigned to your serial cable.
b. Speed (baud): 57600
c. Data bits: 8
d. Stop bits: 1
e. Parity: None
f. Flow control: None
4
SDMS40 Multipoint Scanning Snowfall Sensor17
Table 10-1: Updating operating system procedure
StepProcedure
Select the Terminal Category and select the Force on option for both the
Local echo and Local line editing parameters.
5
SDMS40 Multipoint Scanning Snowfall Sensor18
Table 10-1: Updating operating system procedure
StepProcedure
Select the Serial Category and set the parameters to the following:
a. Select a serial line: Use the COM port assigned to your serial cable.
b. Speed (baud): 57600
c. Data bits: 8
d. Stop bits: 1
e. Parity: None
f. Flow control: None
6
7Click the Open button.
8Once the PuTTY terminal emulator opens, apply power to the sensor.
9
10Type @b 0 and press the return key.
Let the sensor initialize and perform its initial measurements. Proceed to step
10 after @@systemready@ is displayed.
SDMS40 Multipoint Scanning Snowfall Sensor19
Table 10-1: Updating operating system procedure
StepProcedure
Confirm the new baud rate of 57600 bps by typing y (lower case) then
pressing the return key. If successful, the message -> confirmed. is displayed
in the terminal window.
11
Run the Xloader.exe program from the folder and set the parameters to the
following:
a. Hex file: press the … button and select the *.cpp.hex operating system
file from the folder.
b. Speed (baud): 57600
c. Device: SDMS
d. Com port: Use the COM port assigned to your serial cable.
e. Baud rate: 57600
12
13
The operating system update may take a few minutes. Upon successful completion, an XXXXXX
bytes uploaded message will appear.
Click the Upload button. The message Uploading … will appear at the bottom
of Xloader.
SDMS40 Multipoint Scanning Snowfall Sensor20
Table 10-2: Operating system update wiring
ColorFunctionConnection
White*Operating system resetPin 4
BlueRXPin 3
YellowTXPin 2
BrownGroundPin 5
*Only use when resetting the operating system.
Table 10-3: Power wiring
ColorFunctionConnection
RedPower12 V
BlackPower GroundG
SDMS40 Multipoint Scanning Snowfall Sensor21
Appendix A. Importing Short
Cut code into CRBasic Editor
This tutorial shows:
l Importing a Short Cut program into a program editor for additional refinement
l Importing a wiring diagram from Short Cut into the comments of a custom program
Short Cut creates files, which can be imported into CRBasic Editor. Assuming defaults were used
when Short Cut was installed, these files reside in the C:\campbellsci\SCWin folder:
l .DEF (wiring and memory usage information)
l .CR2 (CR200(X)-series datalogger code)
l .CR300 (CR300-series datalogger code)
l .CR6 (CR6-series datalogger code)
l .CR8 (CR800-series datalogger code)
l .CR1 (CR1000 datalogger code)
l .CR1X (CR1000X-series datalogger code)
l .CR3 (CR3000 datalogger code)
l .CR5 (CR5000 datalogger code)
Import Short Cut code and wiring diagram into CRBasic Editor:
1. Create the Short Cut program following the procedure in Quickstart (p. 2). Finish the
program. On the Advanced tab, click the CRBasic Editor button. The program opens in
CRBasic with the name noname.CR_. Provide a name and save the program.
NOTE:
Once the file is edited with CRBasic Editor, Short Cut can no longer be used to edit the
program it created.
2. The program can now be edited, saved, and sent to the data logger.
3. Import wiring information to the program by opening the associated .DEF file. By default, it
is saved in the c:\campbellsci\SCWin folder. Copy and paste the section beginning with
heading “–Wiring for CRXXX–” into the CRBasic program, usually at the head of the file.
After pasting, edit the information such that an apostrophe (') begins each line. This
character instructs the data logger compiler to ignore the line when compiling. You can
SDMS40 Multipoint Scanning Snowfall Sensor22
highlight several lines of CRBasic code then right-click and select Comment Block. (This
feature is demonstrated at about 5:10 in the CRBasic | Features video.)
SDMS40 Multipoint Scanning Snowfall Sensor23
Appendix B. Example programs
B.1SDI-12 program
Wiring for this example program is shown in Table B-1 (p. 24).
Table B-1: Wiring for SDI-12 example program
Wire colorFunctionCR1000X connection terminal
BlackPower groundG
RedPowerSW12-1
GreenSDI-12 signalC1
BrownSignal ground⏚ (analog ground)
CRBasic Example 1: CR1000X SDI-12 program to measure the SDMS40
'**************************************************************************
'SDMS40 SDI-12 Sample Program (CR1000X)
'**************************************************************************
CRBasic Example 1: CR1000X SDI-12 program to measure the SDMS40
Units Snow_Depth_Avg = mm
Dim SDI_Calibrate_Return
Public Calibrate_Flag As Boolean
Public SDMS40_Snow_Depth_Points(36)
Units SDMS40_Snow_Depth_Points() = mm
'**************************************************************************
' Diagnostic Data Table
'**************************************************************************
'Daily diagnostic data table for troubleshooting purposes
'**************************************************************************
' Subroutine: CalibrateSensors
' Description: Sends an auto-calibration command to the SDMS40.
'**************************************************************************
CRBasic Example 1: CR1000X SDI-12 program to measure the SDMS40
'**************************************************************************
' Main Program
'**************************************************************************
Public PTemp, batt_volt
Units PTemp = deg C
Units batt_volt = volts
'**************************************************************************
'Variables for WeatherPia SDMS40 Scanning Laser Sensor
'**************************************************************************
Public SDMS40_Measure_Now As Boolean
'the user can set this to TRUE to request a measurement
SDMS40 Multipoint Scanning Snowfall Sensor27
CRBasic Example 2: CR1000X RS-232 program to measure the SDMS40
Public SDMS40_Calibrate_Now As Boolean
'the user can set this to TRUE to calibrate the sensor
Public SDMS40_Install_Height
Units SDMS40_Install_Height = mm
ReadOnly SDMS40_Install_Height
Public SDMS40_Install_Angle
Units SDMS40_Install_Angle = degrees
ReadOnly SDMS40_Install_Angle
Public SDMS40_Depth_Avg
Units SDMS40_Depth_Avg = mm
Public SDMS40_Temperature(3)
Units SDMS40_Temperature () = Deg C
Alias SDMS40_Temperature (1) = SDMS40_Board_Temperature
Alias SDMS40_Temperature (2) = SDMS40_Heater_Low_Threshold_Temperature
Alias SDMS40_Temperature (3)= SDMS40_Laser_Temperature
Public Verbose_Mode
Public SDMS40_Depth_Points(36)
Units SDMS40_Depth_Points() = mm
Public SDMS40_Distance_Points(36)
Units SDMS40_Distance_Points() = mm
Dim SDMS40_string As String * 2000
'string to hold data string received from SDMS40
Dim SDMS40_string_temp As String * 2000
Dim SDMS40_Serial_Check
'**************************************************************************
'Snow depth data table
'**************************************************************************
SDI-12, Serial Data Interface at 1200 baud, is a protocol developed to simplify sensor and data
logger compatibility. Only three wires are necessary — serial data, ground, and 12 V. With unique
addresses, multiple SDI-12 sensors can connect to a single SDI-12 terminal on a Campbell
Scientific data logger.
This appendix discusses the structure of SDI-12 commands and the process of querying SDI-12
sensors. For more detailed information, refer to version 1.4 of the SDI-12 protocol, available at
www.sdi-12.org.
For additional information, refer to the SDI-12 Sensors | Transparent Mode and SDI-12 Sensors |
Watch or Sniffer Mode videos.
C.2SDI-12 command basics
SDI-12 commands have three components:
l Sensor address (a) – a single character and the first character of the command. Use the
default address of zero (0) unless multiple sensors are connected to the same port.
l Command body – an upper case letter (the “command”), optionally followed by one or
more alphanumeric qualifiers.
l Command termination (!) – an exclamation mark.
An active sensor responds to each command. Responses have several standard forms and always
terminate with <CR><LF> (carriage return and line feed). Standard SDI-12 commands are listed
in Table C-1 (p. 31).
Table C-1: Campbell Scientific sensor SDI-12 command and response set
NameCommandResponse
Acknowledge Active
Send Identification
a!
aI!
a<CR><LF>
allccccccccmmmmmmvvvxxx...xx
<CR><LF>
1
SDMS40 Multipoint Scanning Snowfall Sensor31
Table C-1: Campbell Scientific sensor SDI-12 command and response set
NameCommandResponse
Start Verification
Address Query
Change Address
Start Measurement
Start Measurement
and Request CRC
Start Concurrent Measurement
StartConcurrentMeasurement
and Request CRC
Send Data
Continuous Measurement
aV!
?!
aAb!
aM!
aM1!...aM9!
aMC!
aMC1!...aMC9!
aC!
aC1!...aC9!
aCC!
aCC1!...aCC9!
aD0!...aD9!
aR0!...aR9!
1
atttn <CR><LF>
a<CR><LF>
b<CR><LF>
atttn<CR><LF>
atttn <CR><LF>
atttnn<CR><LF>
atttnn<CR><LF>
a<values><CR><LF> or
a<values><CRC><CR><LF>
a<values><CR><LF>
Continuous Measurement
and Request CRC
Extended Commands
1
Information on each of these commands is given in the following sections.
aRC0!...aRC9!
aXNNN!
a<values><CRC><CR><LF>
a<values><CR><LF>
C.2.1 Acknowledge active command (a!)
The Acknowledge Active command (a!) is used to test a sensor on the SDI-12 bus. An active
sensor responds with its address.
C.2.2 Send identification command (al!)
Sensor identifiers are requested by issuing command aI!. The reply is defined by the sensor
manufacturer but usually includes the sensor address, SDI-12 version, manufacturer’s name, and
sensor model information. Serial number or other sensor specific information may also be
included.
aI!
aSensor SDI-12 address
allccccccccmmmmmmvvvxxx...xx<CR><LF>
SDMS40 Multipoint Scanning Snowfall Sensor32
llSDI-12 version number (indicates compatibility)
cccccccc8-character vendor identification
mmmmmm6 characters specifying the sensor model
vvv3 characters specifying the sensor version (operating system)
xxx…xx
<CR><LF>
Source: SDI-12: A Serial-Digital Interface Standard for Microprocessor-Based Sensors (see References).
Up to 13 optional characters used for a serial number or other specific
sensor information that is not relevant for operation of the data logger
Terminates the response
C.2.3 Start verification command (aV!)
The response to a Start Verification command can include hardware diagnostics, but like the aI!
command, the response is not standardized.
Command: aV!
Response: atttn<CR><LF>
a = sensor address
ttt = time, in seconds, until verification information is available
n = the number of values to be returned when one or more subsequent D! commands are issued
C.2.4 Address query command (?!)
Command ?! requests the address of the connected sensor. The sensor replies to the query with
the address, a. This command should only be used with one sensor on the SDI-12 bus at a time.
C.2.5 Change address command (aAb!)
Multiple SDI-12 sensors can connect to a single SDI-12 terminal on a data logger. Each device on
a single terminal must have a unique address.
A sensor address is changed with command aAb!, where a is the current address and b is the
new address. For example, to change an address from 0 to 2, the command is 0A2!. The sensor
responds with the new address b, which in this case is 2.
NOTE:
Only one sensor should be connected to a particular terminal at a time when changing
addresses.
SDMS40 Multipoint Scanning Snowfall Sensor33
C.2.6 Start measurement commands (aM!)
A measurement is initiated with the M! command. The response to each command has the form
atttn<CR><LF>, where
a = sensor address
ttt = time, in seconds, until measurement data is available. When the data is ready, the sensor
notifies the data logger, and the data logger begins issuing D commands.
n = the number of values returned when one or more subsequent D commands are issued. For
the aM! command, n is an integer from 0 to 9.
When the aM! is issued, the data logger pauses its operation and waits until either it receives the
data from the sensor or the time, ttt, expires. Depending on the scan interval of the data logger
program and the response time of the sensor, this may cause skipped scans to occur. In this case
make sure your scan interval is longer than the longest measurement time (ttt).
Table C-2: Example aM! sequence
0M!
00352<CR><LF>
0<CR><LF>
0D0!
0+.859+3.54<CR><LF>
The data logger makes a request to sensor 0 to start a measurement.
Sensor 0 immediately indicates that it will return two values within the
next 35 seconds.
Within 35 seconds, sensor 0 indicates that it has completed the measurement by sending a service request to the data logger.
The data logger immediately issues the first D command to collect
data from the sensor.
The sensor immediately responds with the sensor address and the two
values.
C.2.7 Start concurrent measurement commands (aC!)
A concurrent measurement (aC!) command follows the same pattern as the aM! command with
the exception that it does not require the data logger to pause its operation, and other SDI-12
sensors may take measurements at the same time. The sensor will not issue a service request to
notify the data logger that the measurement is complete. The data logger will issue the aD0!
command during the next scan after the measurement time reported by the sensor has expired.
To use this command, the scan interval should be 10 seconds or less. The response to each
command has the form atttn<CR><LF>, where
a = the sensor address
ttt = time, in seconds, until the measurement data is available
SDMS40 Multipoint Scanning Snowfall Sensor34
nn = the number of values to be returned when one or more subsequent D commands are
issued.
See the following example. A data logger has three sensors wired into terminal C1. The sensors
are addresses X, Y, and Z. The data logger will issue the following commands and receive the
following responses:
Table C-3: Example aC! sequence
XC!
X03005<CR><LF>
YC!
Y04006<CR><LF>
ZC!
Z02010<CR><LF>
ZD0!
The data logger makes a request to sensor X to start
a concurrent measurement.
Sensor X immediately indicates that it will have 5 (05)
values ready for collection within the next 30 (030)
seconds.
The data logger makes a request to sensor Y to start
a concurrent measurement.
Sensor Y immediately indicates that it will have 6 (06)
values ready for collection within the next 40 (040)
seconds.
The data logger makes a request to sensor Z to start
a concurrent measurement.
Sensor Z immediately indicates that it will have 10 values ready for collection within the next 20 (020)
seconds.
After 20 seconds have passed, the data logger starts
the process of collecting the data by issuing the first
D command to sensor Z.
Z+1+2+3+4+5+6+7+8+9+10<CR><LF>
XD0!
X+1+2+3+4+5<CR><LF>
Sensor Z immediately responds with the sensor
address and the 10 values.
10 seconds later, after a total of 30 seconds have
passed, the data logger starts the process of data
from sensor X by issuing the first D command.
The sensor immediately responds with the sensor
address and the 5 values.
SDMS40 Multipoint Scanning Snowfall Sensor35
Table C-3: Example aC! sequence
YD0!
Ten seconds later, after a total of 40 seconds have
passed, the data logger starts the process of data
from sensor Y by issuing the first D command.
Y+1+2+3+4+5+6<CR><LF>
The sensor immediately responds with the sensor
address and the 6 values.
C.2.8 Start measurement commands with cyclic redundancy check (aMC! and aCC!)
Error checking is done by using measurement commands with cyclic redundancy checks (aMC!
or aCC!). This is most commonly implemented when long cable lengths or electronic noise may
impact measurement transmission to the data logger. When these commands are used, the data
returned in response to D or R commands must have a cyclic redundancy check (CRC) code
appended to it. The CRC code is a 16-bit value encoded within 3 characters appended before the
<CR><LF>. This code is not returned in the data table but checked by the data logger as it
comes. The code returned is based on the SDI-12 protocol. See the SDI-12 communication
specification for version 1.3 available at www.sdi-12.org to learn more about how the CRC code is
developed.
C.2.9 Stopping a measurement command
A measurement command (M!) is stopped if it detects a break signal. A break signal is sent by
the data logger before most commands.
A concurrent measurement command (C!) is aborted when another valid command is sent to the
sensor before the measurement time has elapsed.
C.2.10 Send data command (aD0! … aD9!)
The Send Data command requests data from the sensor. It is issued automatically with every type
of measurement command (aM!, aMC!, aC!, aCC!). When the measurement command is aM!
or aMC!, the data logger issues the aD0! command once a service request has been received
from the sensor. When the data logger is issuing concurrent commands (aC! or aCC!), the Send
Data command is issued after the required time has elapsed (no service request will be sent by
the sensor). In transparent mode (SDI-12 transparent mode (p. 37)), the user asserts this
command to obtain data.
Depending on the type of data returned and the number of values a sensor returns, the data
logger may need to issue aD0! up to aD9! to retrieve all data. A sensor may return up to 35
characters of data in response to a D command that follows an M! or MC! command. A sensor
SDMS40 Multipoint Scanning Snowfall Sensor36
may return up to 75 characters of data in response to a D command that follows a C! or CC!
command.
Command: aD0! (aD1! … aD9!)
Response: a<values><CR><LF> or a<values><CRC><CR><LF>
where:
a = the sensor address
<values> = values returned with a polarity sign (+ or –)
<CR><LF> = terminates the response
<CRC> = 16-bit CRC code appended if data was requested with aMC! or aCC!.
Sensors that are able to continuously monitor the phenomena to be measured can be read
directly with the R commands (R0! … R9!). The response to the R commands mirrors the Send
Data command (aD0!). A maximum of 75 characters can be returned in the <values> part of the
response to the R command.
C.2.12 Extended commands
Many sensors support extended SDI-12 commands. An extended command is specific to a make
of sensor and tells the sensor to perform a specific task. They have the following structure.
Responses vary from unit to unit. See the sensor manual for specifics.
Command: aXNNNN!
The command will start with the sensor address (a), followed by an X, then a set of optional
letters, and terminate with an exclamation point.
Response: a<optional values><CR><LF>
The response will start with the sensor address and end with a carriage return/line feed.
C.3SDI-12 transparent mode
System operators can manually interrogate and enter settings in probes using transparent mode.
Transparent mode is useful in troubleshooting SDI-12 systems because it allows direct
communication with probes. Data logger security may need to be unlocked before activating the
transparent mode.
Transparent mode is entered while the PC is communicating with the data logger through a
terminal emulator program. It is accessed through Campbell Scientific data logger support
SDMS40 Multipoint Scanning Snowfall Sensor37
software or other terminal emulator programs. Data logger keyboards and displays cannot be
used.
The terminal emulator is accessed by navigating to the Datalogger list in PC200W, the Tools list
in PC400, or the Datalogger list in the Connect screen of LoggerNet.
Watch the video: SDI-12 Sensors | Transparent Mode.
The following examples show how to enter transparent mode and change the SDI-12 address of
an SDI-12 sensor. The steps shown in Changing an SDI-12 address (p. 38) are used with most
Campbell Scientific data loggers. Changing an SDI-12 address — CR200(X) Series (p. 39) lists the
steps used for CR200(X)-series dataloggers.
C.3.1 Changing an SDI-12 address
The example below was done with a CR1000, but the steps are only slightly different for CR1000Xseries, CR300-series, CR6-series, CR800-series, and CR3000 dataloggers. For CR200(X)-series
dataloggers, see Changing an SDI-12 address — CR200(X) Series (p. 39).
1. Connect an SDI-12 sensor to the CR1000.
2. In LoggerNet Connect, under Datalogger, click Terminal Emulator. The terminal emulator
window opens.
3. Under Select Device, located in the lower left side of the window, select the CR1000 station.
4. Click Open Terminal.
5. Select All Caps Mode.
6. Press Enter until the data logger responds with the CR1000> prompt.
7. Type SDI12 and press Enter.
8. At the Select SDI12 Port prompt, type the number corresponding to the control port where
the sensor is connected and press Enter. The response Entering SDI12 Terminal indicates
that the sensor is ready to accept SDI-12 commands.
9. To query the sensor for its current SDI-12 address, type ?! and press Enter. The sensor
responds with its SDI-12 address. If no characters are typed within 60 seconds, the mode is
exited. In that case, simply type SDI12 again, press Enter, and type the correct control port
number when prompted.
10. To change the SDI-12 address, type aAb!, where a is the current address from the above
step and b is the new address (see FIGURE C-1 (p. 39). Press Enter. The sensor changes its
address and responds with the new address.
11. To exit SDI-12 transparent mode, click Close Terminal.
SDMS40 Multipoint Scanning Snowfall Sensor38
FIGURE C-1. CR1000 example of using the SDI-12 transparent mode to change the SDI-12
address from 0 to 3. Sensor is connected to control port 1.
C.3.2 Changing an SDI-12 address — CR200(X) Series
1. Connect a single SDI-12 sensor to the CR200(X).
2. In LoggerNet Connect, under Datalogger, click Terminal Emulator. The terminal emulator
window opens.
3. Under Select Device, located in the lower left side of the window, select the CR200Series station.
4. Click Open Terminal.
5. Select All Caps Mode.
6. Press Enter until the data logger responds with the CR2XX> prompt.
7. Type SDI12 and press Enter.
8. The response SDI12> indicates that the sensor is ready to accept SDI-12 commands.
9. To query the sensor for its current SDI-12 address, type ?! and press Enter. The sensor
responds with its SDI-12 address. If no characters are typed within 60 seconds, the mode is
exited. In that case, simply type SDI12 again and press Enter.
10. To change the SDI-12 address, type aAb!, where a is the current address from the above
step and b is the new address (see FIGURE C-2 (p. 40). Press Enter. The sensor changes its
address and responds with the new address.
11. To exit SDI-12 transparent mode, click Close Terminal.
SDMS40 Multipoint Scanning Snowfall Sensor39
FIGURE C-2. CR200(X) example of using the SDI-12 transparent mode to change the SDI-
12 address from 0 to 1
C.4References
SDI-12 Support Group. SDI-12: A Serial-Digital Interface Standard for Microprocessor-Based
Sensors – Version 1.4. River Heights, UT: SDI-12 Support Group, 2017. http://www.sdi-