3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E F o r m o r e i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
3 - 2 8 1
API Mnemonic
Operands
Function
100
MODRD
S1, S2, n
Modbus Data Read
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
*
*
*
n
*
*
*
MODRD: 7 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32 16
P
32
16
P
Operands:
S
1
: External device’s node address (K0~K254)
S
2
: Modbus Data address of the external device
n
: Number of registers to read (K1
<
n
≦
K6)
Description:
1.
MODRD instruction supports COM2 (RS-485).
2.
MODRD is a Modbus read instruction for the MODBUS ASCII / RTU communication modes.
The MODRD instruction can be used to read MODBUS data from external devices that
support MODBUS.
3.
If the Modbus data address
S
2
is illegal for the external device, the device will respond with an
error. The ELC will record the error code in D1130 and set bit M1141.
4. The
response
data from the external device will be stored in D1070 to D1085. After receiving
the reply, the ELC verifies that the reply is correct. If there is an error, then M1140 = ON.
5.
If ASCII mode is selected, the ELC will automatically convert the response data to hex and
store it in D1050 to D1055. D1050 to D1055 will be invalid if using RTU mode for ELC-PV
controllers.
6.
After M1140 or M1141 = ON, the command will be sent to the external device again. If the
response is correct, then the flags M1140, M1141 will be reset.
7.
There is no limit on the number of times this instruction can be used in the program, but only
one instruction can be executed at a time on the same COM port.
8.
Rising-edge contact (LDP, ANDP, ORP) and falling-edge contact (LDF, ANDF, ORF) can not
be used with MODRD instruction.
9.
Refer to the RS instruction for more information. The RS instruction also uses COM2.
10. ELC-PB, ELCB-PB series doesn’t support the index registers E, F.
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...