P/N 3100346 ISSUE 3
PAGE 10
<30>
Two byte ASCII Command 30 echoed back from receiving unit.
<00>
Two byte ASCII ‘00’ used as protocol padding (two byes)
<ACK>
Unit received valid message and checksum
<ETX>
The <ETX> character has a value of 3 hexadecimal and is required at the end of
every message (1 byte).
<CHKSUM>
Receiving unit calculates two-byte checksum and returns ASCII value. Refer to
Section 4.0 for Block checksum calculation and verification.
4.0
Verify and Calculate Message Block Checksum
4.1
Message Block checksum can be verified by adding up all the hexadecimal characters in the received message
string, excluding the first character <STX> and the very last two checksum characters.
4.2
The sum of these characters will produce a three-byte hexadecimal value. The higher order byte is not used
and should be dropped. The lower two bytes are used for comparison to the received checksum characters.
See example Message String received below:
Message String Received:
<STX> 0 1 4 3 D A <ACK> <ETX> 5 6
Not included in calculation
Message characters
included
Two byte ASCII checksum data field
not included in calculation, but used
for comparison to calculated results
4.3
Calculating the checksum is done by first converting each ASCII character, found in the message string, to
the hexadecimal equivalent and then summing these characters. See below.
ASCII
HEXADECIMAL
0
0x30
1
0x31
4
0x34
3
0x33
D
0x44
A
0x41
✓
(ACK)
0x06
(ETX)
0x03
0x1
56
hexadecimal total
4.4
Dropping the upper hexadecimal byte from the above total yields a final result of
56
hexadecimal. The
calculated hexadecimal checksum value should match the ASCII value received in the message string. If it
does not match, a possible error occurred during transmission and the message is considered unreliable.
The master or controlling computer should try to resend the message again.
Example of a
POLL Command 43
issued to unit 05, Zone B
<STX>054300B<ETX>
ASCII
HEXADECIMAL
0
0x30
5
0x35
4
0x34
3
0x33
0
0x30
0
0x30
B
0x42
(ETX)
0x03
0x171 hexadecimal total