AHRS400 Series User’s Manual
Page 14
Doc# 7430-0004-01 Rev. A
respond with "A" at the new baud rate
when a successful detection o f the new
baud rate is completed.
3.6
Data Packet Format
In general, the digital data representing each measurement is sent as a 16-bit
number (two bytes). The data is sent MSB first then LSB.
In voltage mode, the data is sent as unsigned integers to represent the range
0 – 5 V.
In scaled and angle mode, the data generally represents a quantity that can
be positive or negative. These numbers are sent as a 16-bit signed integer in
2's complement format. The data is sent as two bytes, MSB first then LSB.
In scaled and angle mode, the timer information and temperature sensor
voltage are sent as unsigned integers.
The order of data sent will depend on the selected operating mode of the
AHRS.
Each data packet will begin with a header byte (255) and end with a
checksum. The checksum is calculated in the following manner:
1. Sum all packet contents
except
header and checksum.
2. Divide the sum by 256.
3. The remainder should equal the checksum.
X
NOTE
The header byte FF will likely not be the only FF byte in the data packet.
You must count the bytes received at your serial port and use the checksum
to ensure you are in sync with the data sent by the DMU. This is especially
critical when using the continuous data packet output mode.
Table 4 shows the data packet format for each mode.
SUNSTAR传感与控制 http://www.sensor-ic.com/ TEL:0755-83376549 FAX:0755-83376182 E-MAIL:[email protected]
SUNSTAR自动化 http://www.sensor-ic.com/ TEL: 0755-83376489 FAX:0755-83376182 E-MAIL:[email protected]