Checksum Protocol - GSE 60 SERIES Technical Reference Manual

Programmable process controllers
Table of Contents

Advertisement

C
HECKSUM
One of the most effective and popular error-detection methods is the cyclic
redundancy check (CRC). The CRC method is used in virtually every field
where transmitting serial data is involved. The CRC is basically an error
detection mechanism. The CRC follows three basic rules in order to insure
the data that has been transmitted has been received properly.
1. Along with the message, provide the device receiving the data with
some means of knowing it received it correctly.
2. The receiving device should send a return message, acknowledging
receipt or asking for retry.
3. Continue to send the message until it gets to its destination.
In Europe, if a printer is not located adjacent to the controller then the
transmission must include a checksum and a mechanism to re-attempt a
transmission in case of errors in order to be PTB approved. A CRC would
suffice in this application.
Several different styles of checksums can be calculated by the controller to
help insure the integrity of the transmitted data. One of these checksum
calculation methods matches that used by Epson printers in a protocol
commonly used in Europe. Together with capabilities of the input
interpreter (P205), the indicator can be used with these Epson printers,
insuring correct data transfer by re-sending the transmission if the required
acknowledge is not received.
A data checksum calculation consists of three commands:
1. Initialize and begin calculating a specific type of checksum starting
with the next transmitted character.
2. Stop calculating the checksum (optional). Required only when the
checksum is not to be transmitted until after some additional
characters are transmitted.
3. Transmit the checksum. Since most supported checksums are two-
byte, there are two commands, one for most significant byte (msb) first
and one for least significant byte (lsb) first. Both bytes will be
transmitted in succession. For single byte checksums, either
command can be issued.
Several codes have been defined which allow these commands to be
embedded at the proper locations in a custom transmit or to be done at a
particular time within a macro. Similar to the way a carriage return/line
feed combination can be programmed into a custom transmit setup by
entering .256, the codes for the checksums can be entered as shown in
Table 8-20.
To allow one these checksum commands to be issued directly from a
macro, use the appropriate code listed above along with the "send control
code" command, "%&." For example, use 306%& to begin a LRCC-8
checksum.
P
ROTOCOL
60 Series Technical Reference Manual
Communications 8-33

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents