4
3.
SDI-12 Commands (Overview)
The commands to set up and operate the SDI-12 AnalogPlus module are those defined by the SDI-
12 specifications plus some extended commands defined by Sutron. The commands are in ASCII
and all the replies use printable ASCII characters followed by <CR> <LF>. The case of the letters is
important. An “A” is not the same as an “a”.
All commands have three components: the
device address
, the
command body
, and the
command
termination
.
The
device address
is a single character with values 0 to 9, A to Z, and a to z. It is the first character
of a command. It is usually the number 0 (the default address as shipped from the factory) if data
recorder does not have multiple SDI devices connected to it.
The
command body
and the responses are shown as a combination of upper and lower case letters.
The upper case letters are the fixed portions of the command and the lower case letters are the
variables or values that are replaced by actual numbers. Values are entered in the form of a polarity
sign (
or
) followed by up to seven digits, including a decimal point.
The
command terminator
is an exclamation point (!).
NOTE: ALL SDI-12 COMMANDS ARE UPPER CASE.
The SDI-12 AnalogPlus module replies to all SDI-12 commands it supports. If the SDI-12
AnalogPlus module receives a command it does not support, no reply is made. The reply to a
measurement command (M) will have one of two forms:
a0000
Where a is the address and the 0000 indicates that there is no
further message from SDI-12 AnalogPlus module to send
Or
atttn
followed by
a
Where a is the address, ttt is the amount of time, in seconds,
the SDI-12 AnalogPlus module needs to make the
measurement or process the command and n is the number of
values that can be collected. As soon as the measurement is
over, the sensor will also respond with its address (if ttt is not
000). This response is called a
service request
.
Setting the Address
The default SDI-12 address is 0.
If you are using the SDI-12 AnalogPlus module connected with other SDI-12 devices, you will need
to change the SDI-12 AnalogPlus module address. Otherwise, skip this section. The address simply
lets multiple devices share the same wiring. When the data recorder needs data from a particular
sensor, it requests data using an address. Only the device with the matching address will reply. For
convenience in setting up the unit when only one sensor is connected, the SDI-12 AnalogPlus
module supports wildcard addresses of asterisk (*) and question mark (?).
In order to set the address by SDI-12 command, no other SDI-12 devices connected to the system
should be set to address 0 or to the desired SDI-12 AnalogPlus module address.