DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming 5. Take the connection between PLC1 (PLC COM3) and PLC2(PLC COM1) for example, the tables below explains the status when PLC1 reads Y0~Y17 of PLC2 If PLC1 applies COM1 for communication, the below program can be usable by changing: 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 protocol Set receiving timeout as 100ms M1320 = OFF ASCII mode M1320 = ON RTU mode X0 Sending request X0 Reserved Force ON status (Set FF00H) Function Code K5: Force ON/OFF bit device Data address : Y0 = H0500 Receiving completed Connection device address: K1 M1318 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): When X0 = ON, MODRW instruction executes the function specified by Function Code 05 PLC1 PLC2, PLC sends: “ 01 05 0500 FF00 6F ” 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 05 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) 3-378 MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 SET M1316 MODRW K1 K5 H0500 D0 K1 RST M1318