Mitsubishi — Chapter 8 Application Instructions API 100-149

9 Application Instructions API 150-199 M1002 Set communication protocol as 9600,8,E,1 Retain communication protocol Set receiving timeout as 100ms X0 M1320 = OFF ASCII mode M1320 = ON RTU mode Sending request X0 Force ON status (Set FF00H) Reserved Data address : Y0 = H0500 Function Code K5: Force ON/OFF bit device M1318 Receiving completed Connection device address: K1 Received data ASCII mode: No processing on received data . RTU mode: No processing on received data . Reset M1318  ASCII mode (COM3: M1320 = OFF, COM1: M1139 = OFF): PLC1  PLC2, PLC sends: “ 01 05 0500 FF00 6F ” When X0 = ON, MODRW instruction executes the function specified by Function Code H05 PLC2  PLC1, PLC receives:

“ 01 05 0500 FF00 6F ” (No data processing on received data)  RTU mode (COM3: M1320 = ON, COM1: M1139 = ON): When X0 = ON, MODRW instruction executes the function specified by Function Code H05 PLC1  PLC2, PLC1 sends: “ 01 05 0500 FF00 8C F6 ” PLC2  PLC1, PLC1 receives: “ 01 05 0500 FF00 8C F6 ” (No data processing on received data) Program Example 7: 1. Sending the function code K6(H06) through COM2 (RS-485): For writing a word data to 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.

DVP-PLC Application Manual 9-17 MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 SET M1316 MODRW K1 K5 H0500 D0 K1 RST M1318