-1

I'm novice at OPC and I'm making an OPC client on C#, and testing it at Matrikon OPC server. And i have a question, how could i shutdown connection with the server when program made it's business ? Cause I notice when I'm finishing my program it's still anyway marked as an active client in Matrikon OPC Server. I tried to delete subscribe from tags and delete created group, but it's doesn't work.

Jam
  • 101
  • 11
  • The only call we make is to release the COM object: `Marshal.ReleaseComObject(OpcServer);` where `OpcServer` is of type `IOPCServer`. – DonBoitnott Apr 06 '16 at 14:52

1 Answers1

1

The best to use the sample code and .net api from the opc foundation:

https://opcfoundation.org/developer-tools/developer-kits-classic

The api is free for registered users (for source code and other you need to be a member).

The opc .net api uses the Disposable pattern, so the connections/subscriptions etc. will clean up correctly.

apr
  • 552
  • 3
  • 9