3. Instruction Set M1002 Set communication protocol as 9600,8,E,1 Retain communication setting Set communication timeout as 100ms M1320 = OFF ASCII mode M1320 = ON RTU mode X0 Sending request X0 Data length: K2 Datat register: D50 = H1770, D51=H12 Data address: H2000 Function Code: K16 Write in multiple Word data Receiving completed Connection device address: K1 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 H10 PLC VFD-B, PLC sends: “01 10 2000 0002 04 1770 0012 30” VFD PLC, PLC receives:
“01 10 2000 0002 CD” (No processing on received data) RTU Mode (COM3: M1320=On, COM1: M1139=On): When X0 = ON, MODRW executes the function specified by Function Code H10 PLC VFD-B,PLC sends: “0 1 10 2000 0002 04 1770 0012 EE 0C” VFD-B PLC, PLC receives :”01 10 2000 0002 4A08” (No processing on received data) Program example 13: COM2 (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 is stored in the registers starting from the register 3.
The connection between PLC-A (PLC COM2) and PLC-B: indicated by the index value in S . Data is read from multiple word devices in PLC-B into PLC-A, and data is written into multiple word devices in PLC-B from PLC-A. (M1143=OFF, ASCII Mode) (M1143=ON, RTU Mode) 3-389 MOV H87 D1109 SET M1136 MOV K100 D1252 RST M1320 SET M1320 SET M1316 MODRW K1 K16 H2000 D50 K2 RST M1318