3. Instruction Set M1002 Set communication protocol as 9600, 8, E, 1 Retain communication protocol Set communication timeout as 100ms M1143 = OFF ASCII mode M1143 = ON RTU mode X0 X0 Sending request Data length(word) Data address: H2100 Data storing register Function code: K3 read multiple words Receiving completed Connection device address: K1 M1127 Processing received data ASCII mode : The received ASCII data is stored in registers starting from D0 and PLC converts the ASCII data to Hex value and stores them in D1296~D1301 automatically. RTU mode : The received data is stored in registers starting from D0 in Hex value. Reset M1127 ASCII mode (M1143 = OFF):
When X0 = ON, MODRW instruction executes the function specified by Function Code 03 PLC VFD-B, PLC sends: “01 03 2100 0006 D5” VFD-B PLC, PLC receives: “01 03 0C 0100 1766 0000 0000 0136 0000 3B” Registers for data to be sent (sending messages) 3-371 MOV H87 D1120 SET M1120 MOV K100 D1129 RST M1143 SET M1143 SET M1122 MODRW K1 K3 H2100 D0 K6 RST M1127 Register Data Descriptions D1256 Low byte ‘0’ 30 H ADR 1 ADR 0 Address of VFD-B: ADR (1,0) D1256 High byte ‘1’ 31 H D1257 Low byte ‘0’ 30 H CMD 1 CMD 0 Control parameter: CMD (1,0) D1257 High byte ‘3’ 33 H D1258 Low byte ‘2’ 32 H Data Address D1258 High byte ‘1’ 31 H D1259 Low byte ‘0’ 30 H D1259 High byte ‘0’ 30 H