beautypg.com

1 sdi-12 command and response protocol, Appendix b sdi-12 command and response protocol, H-5223 – Xylem H-5223 User Manual

Page 54

background image

Appendix B

SDI-12 Command and Response Protocol

B.1 SDI-12 Command and Response Protocol

This is a brief description of the Serial Digital Interface (SDI-12) Command and Response
protocol used by the W

ATER

LOG Series Model H-5223. Refer to the document "A SERIAL

®

DIGITAL INTERFACE STANDARD FOR HYDROLOGIC AND ENVIRONMENTAL
SENSORS." Version 1.1 November, 1993 Coordinated by Campbell Scientific, Inc., Logan,
Utah.

During normal SDI-12 communications, a master device will communicate with one or more
slave devices. The master is a DCP or data logger and slave devices are sensors. The H-5223 is
a master device. The H-5223 (master) sends an address together with a command to an SDI-12
sensor as needed or requested. The sensor then replies with a "response" to the command. In the
following descriptions, SDI-12 commands and responses are enclosed in quotes. The SDI-12
address and the command/response block terminators are defined as follows:

"a"

Is the sensor address. The following ASCII Characters are valid
addresses: "0" to "9", "A" to "Z", and "*". Sensors are normally initially
programmed at the factory with the address of "0" for use in single sensors
systems. Addresses "1" to "9" and "A" to "Z", can be used for additional
sensors connected to the same SDI-12 bus. The H-5223 can only work
with sensors at address 0 to 9.

"!"

This is the command termination character and is the last character of a
command block from the master.

""

Are carriage return (0D) hex and line feed (0A) hex characters. They are
the last two characters of a response block from a sensor.

Notes:

Ž

All commands/responds are upper-case printable ASCII characters.

Ž

Commands must be terminated with a "!" character.

Ž

Responses must be terminated with characters.

Ž

The command string must be transmitted in a contiguous block with no gaps of more than
1.66 milliseconds between characters.

Ž

A break of at least 12 milliseconds is sent out before the first command. If the sensor does
not respond to this command, the master will send the command again for a total of three
tries. If this break and three command sequence does not have a valid response the break is
sent again and three more tries to send the command. This will happen for a total of three
breaks with three tries of sending the command for each break. If the sensor does not
respond to any of the commands then the master gives up on this sensor and moves on to the
next task.

H-5223

SDI-12 Command and Response Protocol B-1