Kaiyi — 6.19.2 Explanation of Communication Instructions

AH500 Programming Manual The PLC sends the data. CRC CHK (01) above is the error checking code. It can be calculated by means of the instruction CRC. (8-bit mode: SM606 is ON.) CRC check code: 16#02 is stored in the low 8-bit in D106, and 16#07 is stored in the low 8-bit in D107. Additional remark: 1. The format of the communication data in the RTU mode: 2. CRC check code: The check code starts from the address to the data. The operation rule is as follows. Step 1: Suppose the data in the 16-bit register (the register in which 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. 6-407 Register Data Description D100 Low 8 bits 16#01 Address D101 Low 8 bits 16#06 Function D102 Low 8 bits 16#20 Data address D103 Low 8 bits 16#00 D104 Low 8 bits 16#00 Data D105 Low 8 bits 16#12 D106 Low 8 bits 16#02 CRC CHK 0 D107 Low 8 bits 16#07 CRC CHK 1 START Time interval Address Communication address:

8-bit binary address Function Function code: 8-bit binary code DATA (n-1) Data: n×8-bit data ……. DATA 0 CRC CHK Low CRC check code: The 16-bit check code is composed of two 8-bit binary codes. CRC CHK High END Time interval