Delta DVP-ES2 — 3.8 Detailed Instruction Explanation

DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming Program example 2: COM3(RS-485) 1. When M0 = ON, PLC sends communication commands by COM3 to read servo drive status. 2. When PLC received the feedback data from ASDA, M1318 will be active and the read data will be stored in D0~D4. M1002 Set communication protocol as 9600,8,E,1 Retain communication setting Set reveiving time-out as 100ms M0 Set up in ASCII mode Set up in RTU mode Sending request M0 Data Register Function Code: K0 Monitor ASDA status M1318 ASDA address: K1 ASCII mode:

Store the received data into specified registers D0~D4 in Hex Processing received data RTU mode : Store the received data into specified registers D0~D4 in Hex Reset communication completed flag M1318 Points to note: Relative flags and special D registers of COM2/COM3 :

3-496 MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 SET M1316 ASDRW K1 K0 D0 RST M1318 COM2 COM3 Function Description M1120 M1136 Retain communication setting Protocol M1143 M1320 ASCII/RTU mode selection setting D1120 D1109 Communication protocol D1121 D1255 PLC communication address Sending M1122 M1316 Sending request request D1129 D1252 Communication timeout setting (ms) Receiving M1127 M1318 Data receiving completed completed - M1319 Data receiving error - D1253 Communication error code M1129 - Communication timeout setting (ms) M1140 - COM2 (RS-485) MODRD/MODWR/MODRW data receiving error Errors M1141 - MODRD/MODWR/MODRW parameter error (Exception Code exists in received data) Exception Code is stored in D1130 D1130 - COM2 (RS-485) Error code (exception code) returning from Modbus communication