Reputation: 6573
Is there practice to use the same TCP connection for long time and send thousands of Modbus commands there or in most cases a new connection is opened and closed for every Modbus command?
Upvotes: 0
Views: 62
Reputation: 18380
See page 10 of the MODBUS MESSAGING ON TCP/IP IMPLEMENTATION GUIDE V1.0b which provides guidance including:
It is recommended to keep the TCP connection opened with a remote device and not to open and close it for each MODBUS/TCP transaction
Opening a connection takes some time, and consumes resources. There is generally no need to disconnect/reconnect per transaction (but I have encountered devices that drop the connection after responding to a request).
Upvotes: 3