04/07/2015
I have written an OPC server based on the LightOPC which provides data to a data logger. The data logger is able to browse to the items in my server but does not read the data values. If I connect to my server using another client e.g. the NI Server Explorer, then the values can be read. Also, if I use the data logger to connect to a commercially available OPC server this too works.
It appears that both client and server are working but are not able to communicate with each other. One possible issue is that the data logger is not running as the same Windows user as my OPC server is running under - could this be the problem? Do I need to do something?
The data logger provider is unwilling to help so is there anything I can do to identify what the problem is?
Thanks
Tony
Hello Tony,
You are describing a classic COM/DCOM problem. I can't help but wonder if the Read is asynchronous because you are connecting and browsing (synchronous calls). The sync-calls will work when the Server object is accepting the Client connection. But async-calls will fail when the Server tries to make a callback to the Client (the client/server roles essentially reverse for that moment) and the client is NOT accepting the Server connection.
I recommend asking your OPC vendors for their recommendations on DCOM configuration with their products. DCOM configuration suggestions will vary from vendor to vendor.
Hi Tony, I would try chrismisztur's suggestion first then look at the DCOM settings. If they are on the same host the user issue could be causing session isolation which would be solved by having both server and client running under the logged in user (same user). Barring that, most of the major OPC companies have white papers on opening DCOM. It is easier to do than you think but follow a white paper to be sure. Just remember that opening DCOM opens a security hole so remember to tighten it up again (instructions are also found in various white papers).
Rod Stein Manager of Technology Matrikon OPC http://www.matrikonopc.com
1 Guest(s)