Appendix C. SDI-12 Sensor Support
C-3
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.
Only one sensor should be connected to a particular terminal at a
time when changing addresses.
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!
The data logger makes a request to sensor 0 to start
a measurement.
00352<CR><LF>
Sensor 0 immediately indicates that it will return
two values within the next 35 seconds.
0<CR><LF>
Within 35 seconds, sensor 0 indicates that it has
completed the measurement by sending a service
request to the data logger.
NOTE