beautypg.com

Sdi-12 command & response protocol – Xylem H-3311 User Manual

Page 16

background image

14

SDI-12 COMMAND &
RESPONSE PROTOCOL

The “Send Data” command returns sensor data generated as the result of previous “aM!”, “aC!” or

“aV!” commands. Values returned will be sent in 33 characters or less. The sensor’s data buffer will

not be altered by this command.

Command

Response

“aD0!” through “aD9!”

“apd.d ... pd.d

Where:

a

is the sensor address (“0-9”, “A-Z”, “a-z”, “*”, “?”).

D0..D9

are upper-case ASCII characters.

p

Is a polarity sign (+ or -)

d.d

represents numeric digits before and/or after the decimal. A decimal may be

used in any position in the value after the polarity sign. If a decimal is not used,

it will be assumed to be after the last digit.

For example: +3.29 +23.5 -25.45 +300

If one or more values were specified and a “aD0!” returns no data (a only), it means that

the measurement was aborted and a new “M” command must be sent. The following is an example

of the “aD0!” command.

Send Data Command

example of an "aD0!" command:

Previous command

Response

"aM!"

"a0012"

Subsequent Command Response

"aD0"

+X.XX+NNNN

Where:

X.XX

= Current position (stage), in user programmable units

NNNN

= Current position (raw counts), in raw position counts

Where:

a

is the sensor address (“0-9”, “A-Z”, “a-z”, “*”, “?”).

C

is an upper-case ASCII character

ttt

is a three digit integer (000-999) specifying the maximum time, in seconds, the sensor

will take to complete the command and have measurement data available in its buffer.

nn

is a two digit integer (00-99) specifying the number of values that will be placed in the

data buffer. If “n” is zero (0), no data will be available using subsequent “D” commands.

The data recorder may wake the sensor with a break and collect the data anytime after the

specified processing time has elapsed.

This manual is related to the following products: