Since the Nano-10 only has one socket to act as client you do have to close any existing connection before you can open a connection to another server. However, the socket on the Nano-10 allow you to reuse the socket immediately after it has been closed on one server and use it to connect to another server. So there is not too much latency to switch from one server to another especially if it is over a local area network.

The STATUS(3) will return a 1 when a connection has been made. So if the network is busy or network latency is high it may take a little longer to return a 1. You should wait for STATUS(3) to return a 1 before sending READMODBUS/WRITEMODBUS etc commands.

When you close a socket, there is a bit of house keeping that the network stack need to do to fully close the socket. Only when the socket is fully closed then STATUS(3) returns a zero.

If you do a round-robin connection to each slave quickly then managing the network connection and disconnection is important, otherwise you may encounter situation where the next connection will fail because the last connection is still open.

Attached sample program "ModbusTCPTest.PC6" file is a good example to follow to prevent your program from getting stuck in inability to close a previous connection properly before making a new connection.

I would like to resurrect this issue. Using the Nano with Modbus TCP servers, specifically the ADAM 6051 and a Acromag analog input module: how quickly can the TCP connection be opened and closed? I need to sample an analog input every second and I need another two digital modules on the network as well that are not time critical. Currently, my testing with just the Acromag indicates that this is not going to happen. How do I manage higher speeds on local but remote IO networks?

We have previously did a round-robbin test of a network of several PLCs where a Nano-10 open a connection, send a command and receive data, close the connection and move on to the next Modbus/TCP server within a fraction of a second. We did not specifically measure the time it takes but I believe it is possible to complete a cycle of five network controllers within less than 1 second.