Mitsubishi — Chapter 8 Application Instructions API 100-149

9 Application Instructions API 150-199 1. D1109 → D1036: communication protocol 2. M1136 → M1138: retain communication setting 3. D1252 → D1249: Set value for data receiving timeout 4. M1320 → M1139: ASCII/RTU mode selection 5. M1316 → M1312: sending request 6. M1318 → M1314: receiving completed flag M1002 Set communication protocol as 9600,8,E,1 Retain communication setting Set receiving timeout as 100ms M1320 = OFF, ASCII mode M1320 = ON RTU mode X0 Sending request X0 Data length (bit) Data storing register Data address: Y0=H0500 Function code: K2 read multiple bits Receiving completed Connection device address: K1 M1318 Processing received data ASCII mode:

The received data is converted to Hex value and stored in registers starting from D0 RTU mode: The received data is stored in registers starting from D0 Reset M1318  ASCII mode (COM3: M1320 = OFF, COM1: M1139 = OFF): When X0 = ON, MODRW instruction executes the function specified by Function Code H02 PLC1  PLC2, PLC1 sends: “ 01 02 0500 0010 E8 ” PLC2  PLC1, PLC1 receives: “ 01 02 02 3412 B5 ” PLC1 data receiving register D0 Analysis of the read status of PLC2 Y0~Y17:

1234H DVP-PLC Application Manual 9-6 MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 SET M1316 MODRW K1 K2 H0500 D0 K16 RST M1318 Register Data Descriptions D0 1234H PLC converts the ASCII data in address 0500H~0515H and stores the converted data automatically. Device Status Device Status Device Status Device Status Y0 OFF Y1 OFF Y2 ON Y3 OFF Y4 ON Y5 ON Y6 OFF Y7 OFF Y10 OFF Y11 ON Y12 OFF Y13 OFF