DCS System OPC server communication with C#
Hello,
first time posting questions here. So I am trying to communicate using C# with the OPC server provided by Control Builder F. The server has automation interface 1.0 implemented and the problem i am having is that my program can connect to the server and retrive data alright. however aftet around 6 hours the opc server always crashes with an error of 800700A4. no more threads can be created within the system.
any help would be greatly appreaciated. thanks
Answers
Looks like a recource leak. This happens for example if you register new tags for transfers between the OPC-Server and your C# program, and not unregister after you're done. C# (or java) programmers tends to forgot to free external recources after use, because internal recources are freeed automaticly by the runtime environment.
- unregister all subscription who are not needed anymore
- unregister all tags who are not needed anymore
- unregister (or re-use) all groups who are not needed anymore
- close (or re-use) all connection instances to the opc-server after not needed anymore.
Add new comment