
112
CMC TECHNICAL REFERENCE MANUAL
1X36003 Version 2.52
1996-1999 Ingersoll-Rand Company
Date of Issue: 18-Oct-1999
checking for the command messages sent to CMC. The Ingersoll-Rand UCM-wizard
software allows you to configure BCC or CRC error checking for the UCM-DF1 driver, which
needs to be the same error checking method as 1770-KF2.
BCC (One Byte)
The BCC field contains the 2’s compliment of the 8-bit sum of all data bytes between DLE
STX and DLE ETX BCC control characters. BCC provides a medium level of data security.
It cannot detect either the transposition of bytes during transmission nor the insertion or
deletion of the value zero within a message frame.
Another way to quickly determine a BCC value, add up the hex values of all data bytes
between DLE STX and DLE ETX BCC in the message frame. If the total is greater than
100h, drop the most significant digit, and then subtract the result from 100h. This gives you
the BCC.
CRC (Two Bytes)
This provides a higher level of data security than BCC but is more difficult to implement. All
the data bytes between DLE STX and DLE ETX CRC plus the ETX byte are used to
calculate the CRC value.
The following explains how to calculate the CRC value:
•
Before starting the calculation, a 16-bit register used to store the CRC value is cleared
to be zero.
•
As a byte is fetched from the data buffer, it is XORed (least-significant bit to the right)
with the right eight bits of the CRC register.
•
The result is placed in the right eight bits of the CRC register.
•
Inserting 0s on the left then shifts the 16-bit CRC Register right eight times. Each time a
1 is shifted out on the right, the CRC register is XORed with a 16-bit constant A0-01h.
•
As each additional byte is fetched, it is included in the value in the register the same
way.
•
After the ETX byte transmitted is also included in the calculation, the CRC calculation is
complete. The 16-bit CRC value is transmitted low byte first then high byte.
Comparing the calculated BCC/CRC bytes with the received BCC/CRC bytes always
validates the DF1 messages received by UCM.
CAUTION
To transmit the data value of 10 hex, you must use the data symbol DLE DLE
(double-stuffing DLEs). However, only one of these DLE bytes is included in the
BCC/CRC calculation. However, if your BCC check sum is 10 hex, send it as DLE
and not DLE DLE.
The rest of this section explains the meaning of the data bytes between DLE STX and DLE
ETX BCC/CRC control characters.