Disconnect method
Description | Disconnects from the OPC server. |
Syntax | Disconnect () |
Remarks | This allows you to disconnect from a server. It is it is good programming practice for the client application to explicitly remove the objects that it created (including all OPCGroup(s), and OPCItem(s) using the appropriate automation method. Calling this function will remove all of the groups and release all references to the underlying Data Access Server. |
Example | '/* Normal Shutdown sequence '/* Remove all OPC Groups MyOPCServer.OPCGroups.RemoveAll '/* Remove all OPC Group objects Set MyOPCGroup = Nothing '/* Disconnect from server AnMyOPCServer.Disconnect '/* Remove OPCServer object Set MyOPCServer = Nothing |
Provide Feedback