Check-Character (Checksum; Ack/Nak Handshake - Honeywell SPM Technical Handbook

Single point monitor
Table of Contents

Advertisement

Check-Character (Checksum)

During the transmission of the packet, an error may
change the value of the data. In our example, for
instance, the packet of 3, 66, 65, 68 is now 3, 66, 61,
68. One way to determine that the numbers you receive
are the same as the numbers that were sent is to add
a check-character to the packet. A check-character is
a method of assigning a value to the packet to check if
any of your bytes have been modified.
If all the data bytes were to be added together and this
sum made into a byte, that byte could be called a check-
character, or sometimes called a checksum. For your
packet 3+66+65+68 is equal to 202. You would place this
number at the end of your packet: 3, 66, 65, 68, 202.
By adding all the bytes together, the sum should match
the value of the check-character. An error is indicated if
the two numbers do not match each other. If there is an
error, then either some of the data has been modified,
or the check-character itself was modified.
For the SPM, the check-character is the negated sum
of all the bytes in your packet. As above, our packet
would be 3, 66, 65, 68, -202. For this packet, the sum
of the bytes added to the check-character must equal
zero (0). Any other result indicates there is an error with
your data.
The SPM's data within the packet is interpreted in a
somewhat different manner than the above example.
The data is composed of two sections: a command and
one or more parameters. The command indicates the
type of data. Another way to view this is: the command
tells the type of packet and parameters. Each and every
packet will contain at least 4 data bytes: SPM DATE &
TIME stamp. This data gives a date and time reference.
You should insure that your SPM's date and time are
set accurately.
SPM Technical Handbook
SPM Single Point Monitor
An example of a typical communication: a packet with
a command of 61 (hexadecimal value) is a FAULT type
packet. The 61 indicates that this packet has been sent
due to a fault. See
Table
09 (HEX)
61 (HEX)
Table A-2: Fault Packet
This packet is for an instrument fault. The actual fault type
is found in the byte labeled as "FAULT". The remainder
of the packet is 09 (HEX) for the number of bytes (9)
found in this packet, DATE and TIME stamped for your
reference.
Every packet the SPM sends contains an address, a
length, a command and associated parameters and
a check-character. The SPM assumes that all remote
devices occupy address (HEX) 4D.
The SPM has been assigned an address of (HEX) 4C.
It only recognizes this address.

ACK/NAK Handshake

The SPM implements a handshake scheme between
itself and any other piece of equipment wishing to
communicate with the SPM. The most common
response back to the instrument is an "ACK". ACK
stands for ACKnowledge. Your equipment sends it back
to tell the SPM that the packet is ok. If, however, the
check-character did not match, you may elect to send
back a "NAK", which stands for NegAtive acKnowledge.
A NAK indicates that a data packet has been received
but the check-character did not match with the packet
data. The SPM will then re-send the packet to your
equipment. An ACK packet would be (all HEX): 4C, 04,
20, 90. (4C+4+20+90=0)
A-4
A-2.
DATE
TIME
FAULT NO
(2 bytes)
(2 bytes)
(1 byte)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents