Kepware Knowledge Base: Solution
Does an OPC Client Know When a Server Disconnects?
Last Update: 2018/11/07
It is the OPC Client that establishes a connection to the server, not the server that connects to the OPC Client. Therefore, when the server shuts down normally (such as through an exit command), it will send a message to the OPC Client letting it know that the server is shutting down. It is up to the OPC Client to clean up its connections to the server. No message will be sent when the server shuts down abnormally.
Note: The OPC Client application can check the server's status. If it receives no response, then it has the option of closing or removing all objects that have been created for the server. If all else fails, the OPC Client will receive a message from DCOM after several minutes, letting it know that the connection to the server is stale. At this point, the OPC Client may close or remove objects.
©
2021
PTC Inc. All Rights Reserved.