Appendix C.2 Three Byte Binary Data Format - WATSON INDUSTRIES ARS-G152 Owner's Manual

Table of Contents

Advertisement

Appendix C.2 Three Byte Binary Angular Rate Data Format
All of the data words have a high sign bit (bit 7), but the delimiter byte is an ASCII carriage return character that has a
low sign bit (bit 7). Three bytes are transmitted per output parameter.
Example: Unit is sending out Angular Rate
The Unit is seeing these conditions:
Angular Rate
100.23˚/s
Binary Output Format:
Byte 1
Byte 2
Byte 3
0x90
0x84
0xDB
The Carriage return byte is the only byte which has a value less than 128 (0x80). This is the Synchronizing Byte.
7
6
5
4
3
2
High Byte
Bit 7 of the High Byte is set to 1. Bits 6 to 0 of the High Byte are the upper 7 bits of the data. (sign plus 6 bits of data)
Bit 7 of the Middle Byte is set to 1. Bits 6 to 0 of the Middle Byte are the next 7 bits of the data.
Bit 7 of the Low Byte is set to 1. Bits 6 to 0 of the Low Byte are last 7 bits of the data.
After the 3 byte data word is received, the Low Byte is shifted left to shift out the 7th bit(always set to 1). The Middle
Byte is then connected to the Low Byte as a 16 bit word. This 16 bit word is then shifted left to shift out the 7th bit in
the Middle Byte (always set to 1). The High Byte is then connected to the 16 bit word to form a 24 bit "word". This 24
bit "word" is then shifted left to shift out the 7th bit in the High Byte (always set to 1). What remains is a signed
fractional 3 byte answer with a resolution of 20 bits plus a sign bit. Scale factor: 0.000381 ˚/s /bit
0x7FFFF8 = +399.999 ˚/s
0x7FFFF0 = +399.996 ˚/s
...
0x000008 =
0x000000 =
0xFFFFF8 =
...
0x800008 = -399.996 ˚/s
0x800000 = -400.000 ˚/s
To convert binary data:
Angular Rate
Byte 1
Byte 2
Byte 3
0x90
0x84
0xDB
Shift Byte 3 left once to remove the high bit (bit 7) of the low byte:
Watson Industries, Inc.
<CR> byte
0x0D
3 Byte Binary Angular Rate Data Format
1
0
7
6
5
Middle Byte
+0.0004 ˚/s
+0.0000 ˚/s
-0.0004 ˚/s
20
4
3
2
1
0
ARS-G152 Rev A 05/02/2019
7
6
5
4
3
2
Low Byte
1
0

Advertisement

Table of Contents
loading

Table of Contents