In my application the OPC client part is located in a Win32 NT service.
The other part of the application (user interface + database) is a regular Win32 application. Both parts communicate via named pipes.
I've problems with the CoDeSys OPC server, when I configure my Win32 NT service such, that it automatically starts at startup. It runs as 'local system service', and it is allowed to access the desktop.
The Win32 service (OPC client) almost always fails to communicate with the OPC server. It most cases, connecting to the server succeeds, adding a group works, adding an item to the group works, but writing an item fails. In most cases the first 'write item' fails with H'80010105 errorcode. Doing one more 'write item' causes the client too hang (i.e. it blocks in the COM function that does the 'write item'. The error code seems to indicate that an exception occured in the OPC (COM) server.
When I change the properties of the Win32 NT service, and make it a 'manually started' service, the problems don't seem to happen (at least not that often)
Also, I've another version of this OPC client which is not a Win32 NT service, but just a normal Win32 application (with identical OPC code), and this works with no problems.
I prefer a Win32 service though, as these get started automatically after startup.
Any idea what can be causing these problems?
Too me it seems a problem in the OPC server, or in the communication between the OPC server and the Gateway, immediately after startup. It also can have to do with the COM threading model used in the OPC server (just guessing). Or can it be COM security settings?
Arie N. Verheul
Log in to post a comment.