8 rs-232/rs-485 data output format, 1 measurement output – Campbell Scientific SR50A Distance Sensor User Manual

Page 20

Advertising
background image

SR50A Sonic Ranging Sensor

3.8 RS-232/RS-485 Data Output Format

3.8.1 Measurement Output

The measurement output string for the SR50A is as follows:

<STX>aa;D.DDD;QQQ;TT.TT;VVVVV;CC<CR><LF><ETX>

<STX> is the hex character &h02 (2 in decimal)

aa
These two characters are the serial address of the sensor. The default is 33.
Note this is two ASCII characters of &h33 in Hexidecimal or 51 in decimal.

D.DDD
This is the distance to target reading. The units depend on the Output Units
setting. The number of digits and decimal places also depend on the output
unit that is selected. The decimal digits are as follows:

Meters:

D.DDD, 0.000 for no valid reading

DD.DDD possible for values past 9.999 m

Centimeters: DDD.DD

DDDD.DD possible for values past 999.99 cm

000.00 output for no valid reading

Millimeters: DDDD

-999 output for no valid reading

9999 Maximum value

Feet: DD.DDD

00.000 output for no valid reading

Inches: DDD.DD

000.00 output for no valid reading

QQQ
This data value is the optional quality value output. The quality value is
always a 3 digit integer and varies from 152 to 600, where 600 is the poorest
quality.

TT.TT
This is the temperature value in Degrees Celsius read by the SR50AT sensor.
This value is optionally output by setting the Temperature Output option to
ON. Only the SR50AT sensor will output a valid temperature. The SR50A
will output a –999.00 if the Temperature Output option is set to ON. The
temperature is displayed with 2 decimal points of precision.

VVVVV
This is the diagnostic output value. Each digit represents a pass or a fail on a
diagnostic test.

XVVVV
If X is a 1, then the ROM Memory has passed the signature test.

14

Advertising