
AR4000 User’s Manual
19
LLL004001 – Rev 2.7
9.0 Serial Communications
9.1 Output Data Formats
Data is transmitted from the AccuRange 4000 as 8 data bits with no parity and 1
stop bit. The data sent may consist of calibrated distance readings, uncalibrated
sensor data, or both together in each sample. Data may be sent in ASCII or
binary format. Thus there are 6 data format combinations that can be transmitted
by the 4000: ASCII calibrated only (the default), ASCII uncalibrated only, ASCII
calibrated plus uncalibrated, binary calibrated only, binary uncalibrated only, and
binary calibrated plus uncalibrated.
If calibrated output is enabled, the range information is the measured distance
obtained by the sensor’s internal calibration process. This is then transmitted as
ASCII characters or binary bytes, depending on whether the ASCII or binary
mode has been selected. In binary, all multibyte range and distance
measurements are transmitted most significant byte first.
If uncalibrated mode is selected, the data transmitted by the sensor consists of a
raw (uncorrected) range reading in sensor count units, the reflected signal
strength, background light level, and sensor temperature. The size of the sensor
count units in uncalibrated mode will depend on the maximum range and sample
rate specified.
If both calibrated and uncalibrated outputs are enabled, the calibrated data is
transmitted first, followed by the uncalibrated information. Each combination is
detailed below.
The location of the zero point may be changed for either calibrated or
uncalibrated output with the Set Zero Point command. The direction of
increasing output serial values from the zero point may be reversed by issuing the
Set Span command with a distance closer than that used in a previously issued
Set Zero Point command.
9.1.1 ASCII Data format, Calibrated Distance Only
[DD]D.DD<CR><LF>
In this configuration, each sample consists of a string of characters as follows: 4
to 6 distance followed by <CR><LF>. characters (possible values from 0.00 to
999.99 inches in 1/100ths of an inch in English output, or 0 to 99999 mm metric)
Values enclosed in [] will not appear if they consist only of leading zeros.
9.1.2 ASCII Data format, Low Level Sensor Outputs Only
[
RRRRRR]R<TAB>[SSS]S<TAB>[AAA]A<TAB>[TTT]T<CR><LF>