8 Application Instructions API 100-149 Program Example 2: Communication between PLC and VFD-S series AC motor drives (RTU Mode, M1143 = On) M1002 Set up communication protocol 9600, 8, E, 1 Retain communication protocol Set up communication time-out: 100ms Set up as RTU mode Set up as sending flag X0 X0 Set up communication instruction device address 01 data address H2102 data length 2 words Process of receiving data The received data in hex are stored in D1070 ~ D1085. receiving completed M1127 Sending/receiving of data is completed. The flag is reset. PLC VFD-S, PLC sends: 01 03 2102 0002 6F F7 VFD-S PLC, PLC receives:
01 03 04 1770 0000 FE 5C Registers for sent data (sending messages) Registers for received data (responding messages) DVP-PLC Application Manual 8-3 Register DATA Explanation D1083 low ‘0’ 30 H Content of address 2106 H PLC automatically convert ASCII codes to numerals and store the numeral in D1055 = 0000 H D1083 high ‘0’ 30 H D1084 low ‘0’ 30 H D1084 high ‘0’ 30 H D1085 low ‘3’ 33 H LRC CHK 1 D1085 high ‘B’ 42 H LRC CHK 0 MOV H87 D1120 SET M1120 MOV K100 D1129 SET M1143 SET M1122 MODRD K1 H2102 K2 RST M1127 Register DATA Explanation D1089 low 01 H Address D1090 low 03 H Function D1091 low 21 H Starting data address D1092 low 02 H D1093 low 00 H Number of data (counted by words) D1094 low 02 H D1095 low 6F H CRC CHK Low D1096 low F7 H CRC CHK High Register DATA Explanation D1070 low 01 H Address D1071 low 03 H Function D1072 low 04 H Number of data (counted by bytes) D1073 low 17 H Content of address 2102 H D1074 low 70 H D1075 low 00 H Content of address 2103 H D1076 low 00 H D1077 low FE H CRC CHK Low D1078 low 5C H CRC CHK High