Delta AS Series Programming Manual page 916

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

Additional remarks
1.
The following table shows the format of the communication data in RTU mode.
START
Address
Function
DATA(n-1)
.......
DATA 0
CRC CHK Low
CRC CHK High
END
2.
CRC check code: The check code starts from the address to the data. The operation rule is shown in the following
table.
Step 1:
Suppose the data in the 16-bit register (the register where the CRC check code is stored) is 16#FFFF.
Step 2:
The logical operator XOR takes the first 8-bit message and the low 8-bit data in the 16-bit register, and
performs the logical exclusive OR operation on each pair of corresponding bits. The operation result is
stored in the 16-bit register.
Step 3:
The values of the bits in the 16-bit registers are shifted by one bit to the right. The value of the highest
bit becomes 0.
Step 4:
If the value of the right-most bit that is shifted to the right is 0, the data from step 3 is stored in the 16-bit
register. Otherwise, the logical operator XOR takes 16#A001 and the data in the 16-bit register, and
performs the logical exclusive OR operation on each pair of corresponding bits. The operation result is
stored in the 16-bit register.
Step 5:
Repeat step 3 and step 4, and perform the operation on the 8-bit message.
Step 6:
Repeat step 2–5, and then get the next 8-bit message. Perform the operations on all messages. The
final result in the 16-bit register is the CRC check code. Notice that the low 8-bit data in the 16-bit
register is interchanged with the high 8-bit data in the 16-bit register before the CRC check code is put
into the check code of the message.
Time interval
Communication address: 8-bit binary address
Function code: 8-bit binary code
Data: n×8-bit data
CRC check code:
The 16-bit check code is composed of two 8-bit binary codes.
Time interval
Cha p ter 6 App l ied Ins truc tio ns
6_
6 - 6 3 7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents