9 Application Instructions API 150-199 3. RTU Mode (M1143=ON) 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 A702” PLC-B PLC-A, PLC-A receives: “ 01 17 04 0100 1766 7701 ” Registers in PLC-A for received data (responding messages) Registers (D0) for PLC received data (responding messages): Program example 14: COM1 (RS-232)/ COM3 (RS-485), Function Code H17 1. Function code K23 (H17): Data is read from multiple word devices and data is written into multiple word devices. Data can be read from 16 word devices at most, and data can be written into 16 word devices at most. 2.
In the ASCII or RTU mode, the data received through COM1/COM3 on the PLC is stored in the registers starting from the register indicated by the index value in S +1. Users can use the instruction DTM to transform and move 3. The connection between PLC-A (PLC COM3) and PLC-B: the data. Data is written into multiple word devices in PLC-B from PLC-A. (M1320=OFF, ASCII Mode) (M1320=ON, RTU Mode ) If COM1 on PLC-A is connected, the program can be modified as shown below. 1. D1109 → D1036: Communication protocol 2. M1136 → M1138: The communication setting is retained. 3. D1252 → D1249: Communication timeout 4. M1320 → M1139: Choice between the ASCII mode and the RTU mode 5. M1316 → M1312:
The sending of the data though the communication instruction is requested. 6. M1318 → M1314: The receiving of the data through the communication instruction is complete. DVP-PLC Application Manual 9-29 Register Data Description D3007 Low byte ‘6’ 36H LRC CHK 1 LRC CHK 0 D3007 High byte ‘6’ 36H Register Data Description D3000 Low byte 01 H Address D3001 Low byte 17 H Function D3002 Low byte 04 H Number of data (bytes) D3003 Low byte 01 H Contents of the address 1100H D3004 Low byte 00 H D3005 Low byte 17 H Contents of the address 1101H D3006 Low byte 66 H D3007 Low byte 77 H CRC CHK Low D3008 Low byte 01 H CRC CHK High