Modbus/TCP is a much more recent development, created to allow Modbus ASCII/RTU protocols to be carried over TCP/IP-based networks. Modbus/TCP embeds Modbus messages inside TCP/IP frames. Although the implementation is fairly simple, characteristics associated with networking add some challenges. For example, because Modbus masters expect and require responses to their polls within a certain time frame, the non-deterministic (and other) aspects of TCP/IP networks have to be considered.
Modbus/TCP sets up connections between nodes on the network, sending requests via TCP in a half-duplex fashion. TCP allows multiple requests to be ‘pipelined’ or queued in a buffer waiting to be serviced. Modbus/TCP has the capability to use transaction identifiers (sequence numbers), but some early manufacturers of Modbus/TCP equipment did not use them.
In some cases, this can create problems for Modbus/RTU devices connected to the network through interfaces. If a request from a master is lost, or contains an improper function code, the slave does not respond. The master may re-initiate the request, or there may be other requests in the pipeline. Responses to later or other requests may become out of sync and the master may match the wrong response with a request. The resulting symptoms could range from appearing to receive wrong data from a slave, to slaves going off-line, to a gradually slowing down of response time.