Checksum (Crc16) - JUMO mTRON T Manual

Measuring,control, and automation system
Hide thumbs Also See for mTRON T:
Table of Contents

Advertisement

3.8

Checksum (CRC16)

Calculation scheme
The checksum (CRC16) is used to detect transfer errors. If an error is identified during evalu-
ation, the device concerned does not respond.
CRC = 0xFFFF
while (not all BytesOfMessage processed);
NOTE!
The low byte of the checksum is transmitted first.
Example: the CRC16 checksum CC DD is transmitted and displayed in the order DD CC.
Example
Request status of digital variable 1 at address 0x1371:
Instruction: read a word from address 0x1371
01
Slave
Response (CRC16 = 0x8479)
01
Slave
Word 1 = 1 means that digital variable 1 = 1.
CRC = CRC XOR BytesOfMessage
For (1 to 8)
CRC = SHR(CRC)
if (shifted to the right flag = 1
then
CRC = CRC XOR 0xA0001
03
13 71
Function
Address
03
02
Function
Number of
bytes
3 Modbus protocol description
00 01
Read a word
00 01
Word 1
else
95 D0
CRC
79 84
CRC
41

Advertisement

Table of Contents
loading

Table of Contents