D-1
Appendix D. SDI-12 Sensor Support
D.1 SDI-12 Command Basics
SDI-12 commands have three components:
Sensor address (a)
– a single character, and is the first character of the
command. The default address of zero (0) can be used unless multiple sensors
are connected to the same port.
Command body (M1)
– an upper case letter (the “command”) followed by
alphanumeric qualifiers.
Command termination (!)
– an exclamation mark.
An active sensor responds to each command. Responses have several standard
forms and terminate with <CR><LF> (carriage return – line feed). Standard
SDI-12 commands supported by the OBS501 are listed in TABLE
TABLE D-1. OBS501 SDI-12 Command and Response Set
Name
Command
Response
Acknowledge
Active
a!
a<CR><LF>
Send
Identification
aI!
allccccccccmmmmmmvvvxxx...xx<CR><LF>
Change
Address
aAb!
b<CR><LF>
Address
Query
?!
a<CR><LF>
Start
Measurement
aM!
atttnn<CR><LF>
Send Data
aDv
a<values><CR><LF>
Start
Verification
aV!
atttn
D.1.1 Address Query Command (?!)
Command
?!
requests the address of the connected sensor. The sensor replies
to the query with the address,
a
.
D.1.2 Change Address Command (aAb!)
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.