3. Instruction Set 150 Operands: S 1 : Device address (K0~K254) S 2 : Function code: K1(H01), K2(H02), K3(H03), K4(H04), K5(H05), K6(H06), K15(H0F), K16(H10), K23(H17) S 3 : The function varies with the function code used. S : The function varies with the function code used. n : The function varies with the function code used. Explanations: 1. MODRW supports COM1 (RS-232), COM2 (RS-485), COM3 (RS-485). (COM3 is only applicable to DVP-ES2/EX2/SA2/SE, and is not applicable to DVP-ES2-C.) 2. S 1 : Address of the device to be accessed. Range: K0~K254. The address specified by the function codes K1, K2, K3, K4, and K23 can not be K0. 3. S 2 : Function code.
Only the function codes listed below are available currently; other function codes are not executable. Please refer to the program examples below for more information. 4. S 3 : Address of the data to be accessed. If the address is illegal for the designated communication device, the communication device will respond with an error message and DVP-PLC will store the error code and associated error flag will be ON. If the function code is 3-363 Mnemonic Operands Function Controllers MODRW MODBUS Read/ Write ES2/EX2 SS2 SA2 SX2 SE Typ e OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F MODRW:
11 steps S 1 * * * S 2 * * * S 3 * * * S * n * * * PULSE 16-bit 32-bit SA2 SA2 SA2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE SE SE Function code Description Models supported H01 Reading multiple bit devices ES2/EX2 V3.28, SS2 V3.24, SA2/SX2 V2.82, and SE V1.64 (and above) H02 Reading multiple bit devices All series H03 Reading multiple word devices All series H04 Reading multiple word devices ES2/EX2 V2.6, SS2 V2.4, SA2/SX2 V2.0, and SE V1.0 (and above) H05 Writing in a single bit device All series H06 Writing in a single word device All series H0F Writing in multiple bit devices All series H10 Writing in multiple word devices All series H17 Reading/Writing in multiple word devices ES2/EX2 V3.2, SS2 V3.0, SA2 V2.6, and SX2 V2.4 (and above)