10 Application Instructions API 202-313 M1002 Set communication protocol as 9600,8,E,1 Retain communication setting Set time-out value as 100ms X0 Set up in ASCII mode Sending request X0 Data Register Function Code: K0 Monitor ASDA status M1127 ASDA address: K1 Processing received data ASCII mode: Store the received data into specified registers D0~D4 in Hex RTU mode : Store the received data into specified registers D0~D4 in Hex Reset communication completed flag M1127 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 Set up in ASCII mode Set up in RTU mode M0 M0 Sending request 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 DVP-PLC Application Manual 10-11 MOV H87 D1120 SET M1120 MOV K100 D1129 RST M1143 SET M1143 SET M1122 ASDRW K1 K0 D0 RST M1127 MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 SET M1316 ASDRW K1 K0 D0 RST M1318