MODBUS RTU
Master-Slave Communication
Code
Description
SEND / RECV
①
executable flag
COM port No. of a
②
master unit
MODBUS
③
command
(Note 1)
MODBUS unit
④
number of a
destination unit
Master unit
⑤
memory area to
store receive data
Destination unit
⑥
send data storage
area
Number of send
⑦
data
(Note 1): When H5 or H6 is specified, if multiple points are specified for the number of send data, they are
automatically converted into Command 15 or 16 for sending multiple bits or words.
(Note 2): For details of instruction programming, refer to 8.2.4 [F145 SEND] Data Transmission (MODBUS Master:
Function Code Specification).
KEY POINTS
•
Other F145 (SEND) / F146 (RECV) instructions cannot be executed at the
same time to a communication port during master communication. Confirm
that the "SEND / RECV instruction executable flag" is ON, and execute the
instructions.
•
F145 (SEND) / F146 (RECV) instruction cannot be executed at the same time
to a port during slave communication.
•
The processing of F145 (SEND) / F146 (RECV) instruction is handled during
the execution of ED instruction. Check the SEND / RECV done flag to
confirm the completion of transmission / reception. Turned ON in the case
of an error, and an error code is stored in DT90123-DT90125.
•
In the case of COM0 port, specify "HF" as a COM port No. for an operand of
the F145 (SEND) / F146 (RECV) instruction.
Special relays / special data registers
SEND / RECV executable flag
SEND / RECV done flag
SEND / RECV done code
(Note): The Nos. in brackets indicate devices that are compatible with existing FP-X / FPΣ.
6-6
This is inserted to confirm that no SEND / RECV instruction is in progress for the
same port. Turns ON when an instruction is executable.
Specify a COM port No. for Bit 15 to Bit 12 of control data.
HF: COM0 port; H1: COM1 port; H2: COM2 port
Specify a MODBUS command for Bit 11 to Bit 8 of control data.
H5:
Command 05 (Force a single coil) or Command 15 (Force multiple coils)
H6:
Command 06 (Preset a single register) or Command 16 (Preset multiple
registers)
HD: One-bit transfer by Command 15
HE: One-word transfer by Command 16
Specify a unit number of a destination unit for Bit 7 to Bit 0 of control data.
Range: H00 to HFF (K0 to K255)
Specify the memory area of a master unit that stores send data.
Specify the MODBUS address of the memory area of a destination unit that stores
send data.
In the case of bit data, the max. number is 2040 (07F8H).
In the case of word data, the max. number is 127 (7FH).
COM0
R9134
R9135
DT90123
COM1
COM2
R913C (R9044)
R9144 (R904A)
R913D (R9045)
R9145 (R904B)
DT90124
DT90125