3. Instruction Set Program Example 2: Communication between PLC and VFD-B series AC motor drive (RTU Mode, M1143= ON) M1002 Set communication protocol as 9600, 8, E, 1 Retain communication protocol Sett receiving timeout as 100ms Set as RTU mode Sending request X1 X0 Set communication instruction: D Data address: H2102 D ata length: 2 words evice address: 01 M1127 Processing received data The received data in HEX. is stored in D1070~D1085 Receiving completed Reset M1127 PLC VFD-B , PLC transmits: 01 03 2102 0002 6F F7 VFD-B PLC, PLC receives:
01 03 04 1770 0000 FE 5C Registers for data to be sent (sending messages) Registers for received data (responding messages) 3-289 MOV H87 D1120 SET M1120 MOV K100 D1129 SET M1143 SET M1122 MODRD K1 H2102 K2 RST M1127 Register Data Descriptions D1089 low byte 01 H Address of AC motor drive D1090 low byte 03 H Command code of AC motor drive D1091 low byte 21 H Starting data address D1092 low byte 02 H D1093 low byte 00 H Number of data (count by word) D1094 low byte 02 H D1095 low byte 6F H CRC CHK Low D1096 low byte F7 H CRC CHK High Register Data Descriptions D1070 low byte 01 H Address of AC motor drive D1071 low byte 03 H Command code of AC motor drive D1072 low byte 04 H Number of data (count by byte) D1073 low byte 17 H Content of address 2102 H D1074 low byte 70 H D1075 low byte 00 H Content of address 2103 H D1076 low byte 00 H D1077 low byte FE H CRC CHK Low D1078 low byte 5C H CRC CHK High