Rockwell Automation 1770-KF2 Data Highway or Highway Plus Interface Module User Manual User Manual
Page 68

Asynchronous Link Protocols
Chapter 4
4-25
At the end of each polling packet there is a BCC byte. At the end of each
message packet, there is either a one-byte BCC field or a two-byte CRC
field. You can select BCC or CRC through switch settings (see Chapter 3,
“Asynchronous Link Features”).
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
packet codes or response codes.
Example 1: If the master station wanted to send the data codes 08, 09,
06, 00, 02, 04, and 03 to Slave Station 20 hex (40 octal), the master
message codes would be (in hex):
10
DLE SOH
01
08 09 06 00 02 04 03
10
03
C0
DLE ETX BCC
Data
20
DLE
10
STX
02
STN
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 1111
1’s complement
+1
1100 0000
2’s complement (C0 hex)
Example 2: 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 08, 09, 06,
00, 10, 04, and 03 hex, a slave station would use the following message
codes:
10
DLE
STX
02
08 09 06 00 10 10 04 03
10
03
D2
DLE
ETX
BCC
Data
Represents Single Text Value of 10