I am using a Serial <=> TCP Modbus gateway. RS is configured to use [Shared Connection], with [Stay connected] ticked. I noticed a phenomenon, in the packet log, RS would disconnect current TCP connection and reconnect if any STA on serial bus failed to response properly. This reconnect makes sense for native TCP device. In my gateway scenario it sounds weird. Since the error comes from Serial side of the gateway. Reconnect to the gateway, doesn’t make any difference. Not sure if this is by design or bug. This behavior affect performance, I think it should be avoided or at least configurable, unless it’s a TCP layer connection error.
This programmed behaviour makes sense for navtive-TCP device, in which case RS is talking to each device directly.
But with a Serial-TCP gateway ? It adds noise to log and stalls longer before retry on the serial device.
In my case, I think a configurable option wouold be nice, but not necessary, disabling this behaviour for shared connection mode should be eoungh, since RS has no way to reset the serial connection to the actual device behind the gateway anyway.
Of course, reconnect on TCP exception is beyound the scope of this topic.