6–26
MULTINET4 MULTI-PORT SERIAL SERVER & MANAGED SWITCH – INSTRUCTION MANUAL
OPERATIONAL GUIDE
CHAPTER 6: OPERATIONAL GUIDE
In addition the server will generate a GATEWAY TARGET DEVICE FAILED TO RESPOND
exception message (exception code 0x0B) when the destination device does not respond
to a request within a user-configured interval. This message is sent to the client, which
then forwards the exception to the Modbus master device.
6.7.5
TCP Connection Handling
TCP connection handling performed by Multinet4 complies with the implementation
guidelines spelled out in Appendix A of the
Open Modbus/TCP Specification
.
When the Modbus/TCP client software receives a request from an attached serial Modbus
master it analyzes the packet and determines the destination device address. It checks to
see if it already has an open TCP connection for the destination. If not, the client attempts
to open a new TCP connection to the appropriate Modbus/TCP server. Once a connection is
established the request message is sent and the client waits for a response. After the
response is received it is forwarded back to the master.
After the transaction is complete the TCP connection remains open in anticipation of a
subsequent request. If another request is not made within the user-configured idle time
the TCP connection is closed and will be re-opened when a new request is received. The
client may also be configured so that it immediately makes a connection for a configured
device and keeps that connection open indefinitely. This mode eliminates the latency
associated with making the TCP connection for the initial request.
If a response is not received the Modbus/TCP client will time out after a user-configured
interval. After a timeout, the TCP connection is closed to eliminate the possibility of
receiving an unexpected late response. In addition the GATEWAY TARGET DEVICE FAILED
TO RESPOND (exception code 0x0B) exception message is sent to the Modbus Master,
which can then make the decision on whether or not to retry. If the client is configured to
hold connections open indefinitely a new connection will be established with the remote
server immediately following the timeout; otherwise, the client waits for the next Modbus
request before re-opening the connection.
The Modbus/TCP server process always listens for connections on TCP port 502.