
8-2
Chapter 8. Modbus TCP Communication Functions
z
Communication procedure
Modbus TCP uses the TCP/IP socket interface for communication.
The procedure for using the TCP/IP socket interface may vary depending on the
host unit. The following describes how to use the TCP/IP socket interface with a
general computer.
(1) The host unit (master station) establishes a TCP/IP socket connection with
one unit of this device (as a slave station).
(2) The master station sends an instruction message to the slave station.
(3) The slave station receives the instruction message and executes read or write
processing according to the contents of the message.
(4) Furthermore, the slave station sends a response message appropriate for the
processing details.
(5) The master station receives the response message.
(6) To continue the Modbus TCP communication, return to (2).
(7) To finish the Modbus TCP communication, the master station disconnects the
slave station using the TCP/IP socket disconnection process.
z
General TCP/IP socket communication procedure
Ethernet
Application startup
socket()
connect()
(1)
send()
(2)
Connection
Command
shutdown()
(7)
Disconnection
close()
Disconnection completion
recv()
(5)
(6)
Response
Power supply startup
socket()
bind()
listen()
accept()
recv()
(3)
close()
send()
During Modbus/TCP
communication
(4)