9 Application Instructions API 150-199 7. PLC COM1/COM3 will not process the received data. 8. Take the connection between PLC1 (PLC COM3) and PLC2 (PLC COM1) for example, the tables below explain the status when PLC1 force ON/OFF Y0~Y17 of PLC2. Set value: K4Y0=1234H If PLC 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 5. M1316 → M1312: sending request 4. M1320 → M1139: ASCII/RTU mode selection 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 Data length(bit) Data storing register Function code: K15 Write in multiple bit devices Data address: H0500 Connection device address: K1 Receiving completed 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 executes the function specified by Function Code H0F PLC1 PLC2, PLC sends: “ 01 0F 0500 0010 02 3412 93 ” PLC2 PLC1, PLC receives:
“ 01 0F 0500 0010 DB ” DVP-PLC Application Manual 9-23 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 Y14 ON Y15 OFF Y16 OFF Y17 OFF MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 SET M1316 MODRW K1 K15 H0500 D0 K16 RST M1318