I used OPCDotNetLib but can't read data from remote OPC Server there .
I can connect , like
Type typeofOPCserver = Type.GetTypeFromProgID(clsidOPCserver, ip);
But looking the methods DataChanged or ReadCompleted doesn't work or works wrong.
I tested same with local OPC Server and it works well , with remote OPC Server I can connect, I can add items and can read data. OPC Server on remote machine shows that I read them, but I can't see any data. Seems like I need another workaround on OPCDotNetLib for remote OPC Server.
I even found a comment there
This library / dll will not work on a remote server, only local use is possible.
Is there some another available OPC Client .NET Libraries ?
I know it has been a while but to help those who need the libraries. To go along with Greg Buehlers answer. They are Free and part of the core OPC Foundation and can be found here click on Archives tab if you need previous versions. It took me forever to find them so I hope this may help someone.
You've got a few options for OPC compatibility. You can use the classical COM wrappers provided by OPC Foundation, or you can use the newer OPC library designed for .Net.
I haven't personally switched over to the newer library yet, but this is a break down of how to use
OpcNetApi.dll
,OpcNetApi.Com.dll
, andOpcRcw.Da.dll
to initialize a connection and subscribe to theDataChanged
event: