Modbus Rtu Master Communication (Send) - Panasonic FP0H User Manual

Programmable controller
Hide thumbs Also See for FP0H:
Table of Contents

Advertisement

6.3 MODBUS RTU Master Communication (SEND)

 Procedure
PLC has the transmission right in master communication, and master communication is
performed by sending commands to, and receiving responses from, devices that support
MODBUS-RTU. Data can be written by specifying unit numbers and memory addresses and
executing F145 (SEND) instruction in a user program, because PLC automatically creates
messages according to the protocol.
PLC
DT100
100
DT101
0
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
 Sample program
• Send a command from COM1 port of the unit, and write the content of the data registers
DT100 to DT101 of PLC into the data areas 1000 to 1001 (H03E8 to H03E9) of an external
device (unit no. 1).
• Confirm that transmission is not in progress (SEND / RECV executable flag R913C: ON) for
the same port, and start up SEND instruction.
• F145 (SEND) instruction is executed by specifying the port No., MODBUS command to be
used, the starting address of PLC memory area that stores data to be sent, unit number of a
destination unit, and the number of send data. Check addresses of destination devices in the
instruction manuals of devices.
R0
R913C
(Note): The slave side may not be able to respond, when the scan time of PLC as a master unit is short and interval
between transmission sessions is short. In such cases, insert a timer instruction into the execution conditions for
instructions, and make the sending interval longer.
6.3 MODBUS RTU Master Communication (SEND)
Command messages
(Hex) 01 10 03 E8 00 02 04 00 64 00 00(CRC)
(Hex) 01 10 00 00 00 02 (CRC)
Response messages
Perform writing by specifying Unit number and
address using the SEND instruction
F145 SEND
H1601
H1601
DT100
K1000
External devices that
support MODBUS-RTU
1000
100
1001
0
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
K2
6-5

Advertisement

Table of Contents
loading

Table of Contents