A TCP connection can be closed by one of the following:
When the Maximum Number of Connections are Open
If the PLC receives a request to open a new connection when the maximum number of connections has been reached, the PLC:
To identify which connection to close, the PLC examines groups of connections for inactive open connections, in the following sequence:
1
non-referenced connections to devices that are not configured as part of the Control Expert application
2
client connections
3
server connections
If the PLC discovers one or more inactive connections in the first group, it closes the oldest inactive connection in that group then opens a new connection.
If no inactive connection is discovered in the first group, the PLC examines the second group of connections and, if it discovers one or more inactive connections in the second group, the PLC closes the oldest inactive connection in that group and opens a new connection.
If no inactive connection is discovered in the first and second groups, the PLC examines the third group and, if it discovers one or more inactive connections in the third group, the PLC closes the oldest inactive connection in that group and opens a new connection.
If the PLC fails to discover an inactive connection in any of the three groups, no open connection is closed and no new connection can be opened.
NOTE: Closure of a connection is indicated to the application by means of a status report (message refused) on any exchanges in progress.