Delta DVP-ES2/EX2/SS2/SA2/SX2/SE Two-Way Radio User Manual


 
3. Instruction Set
3-331
API Mnemonic Operands Function
150
MODRW MODBUS Read/ Write
Controllers
ES2/EX2 SA2
SE
SA2 SX2
Bit Devices Word devices Program Steps Type
OP
X Y M S K H KnX KnY KnM KnS T C D E F
S
1
* * *
S
2
* * *
S
3
* * *
S *
n * * *
MODRW: 11 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
Operands:
S
1
: Device address (K1~K254) S
2
: Function code: K2(H2), K3(H3), K5(H5), K6(H6), K15(H0F) ,
K16(H10) S
3
: Data address S: Data register n: Data length.
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: K1~K254.
3. S
2
: Function code. H02: read multiple bit devices of DVP-PLC; H03: read multiple word
devices of AC motor drive or DVP-PLC; H05: force ON/OFF bit device; H06: write in single
word device of AC motor drive or DVP-PLC; H0F: write in multiple bit devices of DVP-PLC;
H10: write in multiple word devices of AC motor drive or DVP-PLC. Only these function codes
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.
z Associated registers and flags indicating errors on PLC com ports: (For detailed
information please refer to Points to note of API 80 RS instruction.)
PLC COM COM1 COM2 COM3
Error flag M1315 M1141 M1319
Error code D1250 D1130 D1253
z For example, if 8000H is illegal for DVP-PLC, the error will be in indicated by different set
of flags and registers. For COM2, M1141 will be ON and D1130 = 2; for COM1, M1315 =
ON and D1250 = 3, for COM3, M1319 = ON and D1253 = 3. Please check the user
manual of DVP-PLC for error code explanations.
5. S: Registers for storing read/written data. Registers starting from S stores the data to be
written into the communication device or the data read from the communication device. When