Omega DP41-B Series User Manual page 82

Universal input
Hide thumbs Also See for DP41-B Series:
Table of Contents

Advertisement

5. Data Field
The data field is constructed using sets of two hexadecimal digits, in the range of 00 to FF
hexadecimal. The data field of messages sent from a master to slave devices contains
additional information, which the slave must use to take the action defined by the function
code. This can include items like discrete and register addresses, the quantity of items to
be handled, and the count of actual data bytes in the field.
6. CRC Checking
With RTU mode the error checking field contains a 16-bit value implemented as two eight-
bit bytes (HI-order byte and Low-order byte). The error check value is the result of a
Cyclical Redundancy Check (CRC) calculation performed on the message contents.
After building a message (address, function code, data) the transmitting device calculates
a CRC code and puts it to the end of the message. A receiving device will calculate a
CRC code from the message it has received and compare against transmitted CRC code.
If these CRC codes are different, there has been a communication error. The Universal
Input Meters will not reply if they detect a CRC error.
Sequences of CRC calculation:
6.1
Load a 16 bit CRC register with all 1's.
6.2
Apply first 8 bit byte of the message to the least significant bit (LSB) of the
contents of the register.
6.3
Exclusive OR these 8 bit with the register contents.
6.4
Shift the result one bit to the right with zero entering into the most
significant bit (MSB) position and evaluate the LSB.
6.5
If over flow bit in LSB is 1, exclusive OR the latest register contents with
A001 Hex value.
6.6
If over flow bit in LSB is 0, no exclusive OR occurs (repeat step 4).
6.7
Repeat steps 4, 5 and 6 until 8 shifts have been performed.
6.8
Apply next 8 bit byte of the message to the LSB contents of the register.
6.9
Exclusive OR these 8 bit with the register contents.
6.10
Repeat steps 4 to 9 until all bytes of the message have been processed.
6.11
The final content of the register is the CRC value.
Note: When CRC is placed into the end of the message, the low order byte of the
CRC will be transmitted first, followed by the high order byte.
M - 3

Advertisement

Table of Contents
loading

Table of Contents