Rockwell Automation 1775-KA PLC-3 Communication Adapter Module User Manual User Manual

Page 133

Advertising
background image

Half-Duplex Protocol

Chapter 11

11Ć6

Block Check

The block check character (BCC) is a means of checking the accuracy of
each packet transmission. It is the 2’s complement of the 8–bit sum
(modulo–256 arithmetic sum) of the slave station number (STN) and all
the data bytes in the packet. For polling packets, the BCC is simply the
2’s complement of STN. The BCC does not include any other message
packets codes or response codes.

For example, if the master station wanted to send the data codes 8, 9, 6, 0,
2, 4, and 3 to slave station 20 hex (40 octal), the master message codes
would be (in hex):

10 01 20 10 01

DLE SOH STN DLE STX

08 09 06 00 02 04 03 10 03 A0

Data

DLE ETX BCC

The sum of the STN and data bytes in this message packet is 40 hex. The
BCC is the 2’s complement of this sum, or C0 hex. This is shown in the
following binary calculation:

0100 0000 40 hex
1011 1011 ls complement
+1
1010 0000 2s complement (E0 hex)

To transmit the STN or data value 10 hex, you must use the data code
DLE DLE. However, only one of these DLE text characters is included in
the BCC sum. For example, to transmit the values 8, 9, 6, 0, 10, 4, and 3
hex, a slave station would use the following message codes:

Represents single text value of 10

10 02 08 09 06 00 10 10 04 03 10 03 D2

DLE STX

Data

DLE ETX BCC

In this case, the sum of the data bytes is 2E hex because only one DLE
text code is included in the BCC. So the BCC is D2 hex.

Advertising