10 - 5 10 - 5
MELSEC-Q
10 DEDICATED INSTRUCTIONS
*4: Set "0" for the case of write only.
*5: Set "0" for the case of read only.
*6: The combinations of the read and write targets that can be set in the target
MODBUS
R
device type setting and the setting ranges of the access points are
as indicated in the following table.
Type Specification of the Target MODBUS
R
Device
Access Points Setting Range
Set
values
Read target
Write target
Function Code
Read points
Write point
0100
H
Coil
01
Read coils
1 to 2000
0200
H
Input
02
Read discrete inputs
1 to 2000
0400
H
Input register
04
Read input registers
1 to 125
0500
H
Holding register
03
Read holding registers
1 to 125
0700
H
Extended file register
No specification
20
Read file record
1 to 124
0001
H
Coil
15
Write multiple coils
1 to 1968
0005
H
Holding register
16
Write multiple registers
1 to 123
0007
H
No specification
Extended file register 21
Write file record
1 to 122
0505
H
Holding register
Holding register
23
Read/write multiple registers
1 to 125
1 to 121
1)
No combination setting other than the above is allowed for the type
specification of the target MODBUS
R
device ((S1)+8).
2)
Simultaneous execution of read and write with a single instruction is
allowed only for 0505
H
(Read/Write Multiple Registers).
3)
Read file record (FC: 20) and Write file record (FC: 21) allows access to
multiple areas in one communication, however, only one area is accessible
in one communication when using this dedicated instruction.
POINT
(1) When the close option setting of the execution type ((S1)+0) is "TCP connection is closed
after instruction completion", TCP connection is closed after the dedicated instruction
has been completed and the completion device (D2) has turned ON.
If the dedicated instruction is executed again for the same target device during this TCP
connection closing processing, it is completed with an error.
When the execution interval of the dedicated instruction for the same target device is
short, set the close option to "TCP connection is not closed after instruction completion".
(2) Specify "(device number) - 1" as the device number.
However, this does not apply to the file number and device number specified for the
Read/write file record.
(3) When access is made to the bit device (coil, input) of the slave, the fraction bit is handled
as described below.
[Read]
When the read access points are 35 points
to
116640 to 116625
116656 to 116641
116672 to 116657
b0
b0
bF
bF
to
D100
D101
D102
<Read data storing device (D1)>
<Target slave device area>
Read
Remaining area is masked by 0.
[Write]
When the write access points are 5 points
D300
122544 to 122529
to
b0
bF
to
b0
bF
<Write data storing device (S2)>
<Target slave device area>
Write
Remaining area is ignored.