9 Application Instructions API 150-199 M1002 Set communication protocol as 9600, 8, E, 1 Retain communication protocol M1320 = OFF ASCII mode M1320 = ON RTU mode Set communication timeout as 100ms The data is read from the address H1100. The data is written into the address H1000. The data is read into D3000. The data is written from D4000. The length of the data which is read is K2. The length of the data which is written is K2. X0 Sending request X0 D10:The index value indicates the register into which the data is read. D11: The index value indicates the register from which the data is written. D20: Length of the data read D21: Length of the data written D0:
Address from which the data is read D1: Address into which the data is written Function code: K23 The data is read from/written into multiple word devices. Connection device address: K1 M1318 Processing received data ASCII mode : The received ASCII data is stored in the registers starting from D3000 i . n Hex value RTU mode : The received data is stored in the registers starting from D3000 in Hex value. Reset M1318 ASCII Mode (COM3: M1320=OFF; COM1: M1139=OFF): When X0=ON, MODRW executes the function specified by the function ode H17. PLC-A PLC-B, PLC-A sends: “01 17 1100 0002 1000 0002 04 1770 0012 06” PLC-B PLC-A, PLC-A receives:
“01 17 04 0100 1766 66” Registers in PLC-A for received data (responding messages) Register D3000 D3001 RTU Mode (COM3: M1320=ON; COM1: M1139=ON): When X0=ON, MODRW executes the function specified by the function code H17. PLC-A PLC-B,PLC-A sends: “01 17 2100 0002 2000 0002 04 1770 0012 A702” PLC-B PLC-A, PLC-A receives:
“ 01 17 04 0100 1766 7701 ” Registers in PLC-A for received data (responding messages) Register D3000 DVP-PLC Application Manual 9-30 MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 MOV H1100 D0 MOV H1000 D1 MOV K3000 D10 MOV K4000 D11 MOV K2 D20 MOV K2 D21 SET M1316 MODRW K1 K23 D0 D10 D20 RST M1318 Data Description 0100H PLC-A converts ASCII codes in 1100H and stores the converted data automatically. 1766H PLC-A converts ASCII codes in 1101H and stores the converted data automatically. Data Description 0100 H PLC-A converts data in 1100H and stores the converted data automatically.