Rockwell Automation 5370 CVIM Communications Manual User Manual
Page 99

Chapter 5
Using the RS-232 Ports
5–29
For example, if a message packet contained the data codes 8, 9, 6, 0, 2, 4,
and 3, the message packet codes would be (in hex):
10
02
08
09 06 00 02 04 03 10
03
E0
DLE STX
Data
DLE ETX BCC
The sum of the data bytes in this message packet is 20 hex. The BCC is the
2’s complement of this sum, or E0 hex. This is shown in the following binary
calculation:
0010
000020 hex
1101
11111’s complement
+1
1110
00002’s complement (E0 hex)
To transmit the data value 10 hex, you must use the data code DLE DLE.
However, only one of these DLE data bytes is included in the BCC sum. For
example, to transmit the values 8, 9, 6, 0, 10, 4, and 3 hex, you would use the
following message codes:
Represents single
data byte 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.
The BCC algorithm provides a medium level of data security. It cannot
detect transposition of bytes during transmission of a packet. It also cannot
detect the insertion or deletion of data values of zero within a packet.