XLINK 500/100 Operations & Maintenance Manual page # 145
D~
318
Nov 14th
Day of the year of the most recent reading. For
2014, it is Nov 14th.
A8
120
2:00 AM
Minutes into the day. We can tell that this
transmission should have been made at 02:00 on
Nov14th and parse the data accordingly.
@NI
905
9.05
Sensor M1 collected at 02:00
@NH
904
9.04
Sensor M1 collected at 01:59
@NG
903
9.03
Sensor M1 collected at 01:58
@NF
902
9.02
Sensor M1 collected at 01:57
@NE
901
9.01
Sensor M1 collected at 01:56
@DG
263
26.3
Sensor M2 collected at 02:00
F
12
12.00V
Battery voltage
15.4.
Six Bit Binary Encoded Format
The 6-bit binary format is used to encode numbers into displayable ASCII characters. Fractional
numbers cannot be represented, so, for instance, a battery voltage of 13.04 volts set up with 2
right digits will be sent as 1304.
A 1 byte encoded number can range from -32 to +31.
A 2 byte encoded number can range from -2048 to +2047
A 3 byte encoded number can range from -131072 to +131071
Binary encoded numbers are always sent most significant bytes first. The number itself is broken
down into 6-bit digits, and each digit is placed in one byte of data. The number 64 (ASCII @) is
added to each digit to make it fall within the range of displayable ASCII characters. The only
exception is that 127 (ASCII <DEL>) is sent as 63 (ASCII ?)
15.4.1.
Example 1: Encoding the Number 10 in 1 Byte
Since 10 will fit in 6-bits, we only have to add 64 which would yield 74. So the number 10 would
appear as ASCII 74 or the letter J.
15.4.2.
Example 2: Encoding the Number 12345 in 3 Bytes
First, we have to convert 12345 into binary in 6-bit pieces:
12345 (base 10) = 11 000000 111001 (base 2)
Now we can convert each piece back to base 10:
11 000000 111001 (base 2) = 3, 0, 57
Finally, we add 64 to each piece and convert to ASCII:
67, 64, 121 = ASCII C@y
15.4.3.
Example 3. Encoding the Number -12345 in 3 Bytes
First we have to convert -12345 into two's complement 18-bit binary: -12345 (base 10) =
111100 111111 000111 (base 2)
Now we can convert each piece back to base 10: 111100 111111 000111 (base 2) = 60,
63, 7
Finally, we add 64 to each piece and convert to ASCII (since the second piece is 63 we
leave it alone):
124, 63, 71 = ASCII |?G
Example 4. Decoding the 3-byte string @SW:
This is just like encoding except we follow the steps backward.