Mitsubishi — Chapter 8 Application Instructions API 100-149

9 Application Instructions API 150-199 (No data processing on received data)  RTU mode (COM3: M1320 = ON, COM1: M1139 = ON): When X0 = ON, MODRW executes the function specified by Function Code H0F PLC1  PLC2, PLC1 sends: “ 01 0F 0500 0010 02 34 12 21 ED ” PLC2  PLC1, PLC1 receives: “ 01 0F 0500 0010 54 CB ”, (No data processing on received data) Program Example 11: 1. Sending the function code K16 (H10) through COM2 (RS-485): For writing many word data into a register. When PLC is connected to VFD-S AC motor drive: M1143 = Off, in ASCII mode When PLC is connected to VFD-S AC motor drive: M1143 = On, in RTU mode 2.

When in ASCII mode, the user stores the data to be written in the designated register D50 in hex format. The data sent back from AC motor drive are stored in D1070 ~ D1076. 3. When in RTU mode, the user stores the data to be written in the designated register D50 in hex format. The data sent back from AC motor drive are stored in D1070 ~ D1077. 4. When In ASCII mode or RTU mode, PLC will store the data to be sent in D1256 ~ D1295. If necessary, the user can move the data to other general registers by using MOV, DMOV or BMOV instruction. Other instructions of ES/EX/SS do not function on the data in D1256 ~ D1295. 5.

After receiving the data sent back from AC motor drive is completed, PLC will auto-check if the received data are incorrect. M1140 will be On if there is an error. 6. If the device address is illegal to a designated communication device, the communication device will respond with an error message and PLC will store the error code in D1130 and M1141 = On. For example, if 8000H is illegal to VFD-S, M1141 will be On and D1130 = 2. See user manual of VFD-S for error codes. 7. After M1140 = On or M1141 = On, PLC will send another correct datum to AC motor drive. If the data sent back from AC motor drive is correct, M1140 and M1141 will be reset.

M1002 Set up communication protocol 9600, 8, E, 1 Retain communication protocol M1143 X10 Communication time-out 100ms X0 Set up sending request X0 Address of communi- cation device K1 Function code K16: write many word data Data address H2000 Register for storing the data Data length (word) M1127 Process of received data ASCII mode : The received data are stored in special registers D1070 ~ D1078 in ASCII format. RTU mode : The . received data are stored in special registers D1070~1078 in hex format Sending/receiving of data is completed. The flag is reset. DVP-PLC Application Manual 9-24 MOV H87 D1120 SET M1120 MOV K100 D1129 SET M1122 MODRW K1 K16 H2000 D50 K2 RST M1127