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

Page 69

Advertising
background image

Asynchronous Link Protocols

Chapter 4

4-26

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.

Cyclic Redundancy Check

Calculate the CRC value on the value of the data bytes and the ETX byte
(using the polynomial x

16

+ x

15

+ x

2

+ x

0

). To transmit the data value of

10 hex, you must use the data code DLE DLE. However, only one of
these DLE data bytes is included in the CRC value. Embedded responses
are not included in the CRC value.

At the start of a message packet, the transmitter clears a 16-bit register for
the CRC value. As a byte is transmitted, it is exclusive-ORed (with Bit 0
to the right) to the right eight bits of the register. The register is then
shifted right eight times with zeros (0s) inserted on the left. Each time a
one (1) is shifted out on the right, the following binary number is
exclusive-ORed with the 16-bit register value:

1010 0000 0000 0001

As each additional byte is transmitted, it is included in the value in the
register the same way. After the ETX value is included in the value in the
register and is transmitted, the value in the register is transmitted (right bit
first) as the CRC field.

The receiver also calculates the CRC value and compares it to the
received CRC value to verify the accuracy of the data received.

Important: In half-duplex mode there is a BCC on the polling packet
regardless of whether BCC or CRC error checking is used on messages.

Master/Slave Transceiver

In each station there is a program associated with the physical link called
the transceiver. The master station has a more complex transceiver than
the slave, since it must include a polling algorithm. The slave’s

Advertising