Industry Online Support
Technical Forum
9/9/2008 4:14 PM | |
Posts: 7 Rating: (0) |
Hello everybody: I'm making an opc client application using c#. I've started with the sample called opcasync.net installed with simatic net. I've made a windows form sample project that is reading every two seconds a plc variable via opc and it works. Now I want to convert this project to a windows service. I create a windows service project and copy the same as I have in the windows form project. When I try to read the plc variable I get the next error: System.Runtime.InteropServices.COMException (0x80040200): Exception from HRESULT: 0x80040200 at OpcRcw.Da.IOPCAsyncIO2.Read(Int32 dwCount, Int32[] phServer, Int32 dwTransactionID, Int32& pdwCancelID, IntPtr& ppErrors) at WindowsService.OPC_Client.Read() Both projects are attached. Attachmentprojects.zip (298 Downloads) |
9/13/2008 6:01 PM | |
Joined: 7/15/2008 Last visit: 10/6/2024 Posts: 382 Rating: (44) |
Hello jljuan, Please check if you have your MDAC "MICROSOFT DATA ACESS COMPONENT" propperly installed and configured. |
9/15/2008 4:25 PM | |
Posts: 487 Rating: (45) |
Simatic NET OPC server itself does not allow it to be configured as a Windows service. May be that contributes to the problem. You have not mentioned what is on the otherside ofSimaticNET. Is it an S7 PLC on ethernet? But anyway kepware S7 OPC server allows it to be configured asWindows NT service. So it may be worth a try with it. Trial version is downloadable. Check this links for more info. http://www.kepware.com/Products/Siemens_Suite.html http://www.kepware.com/Products/feature-ntservice.htm |
9/25/2008 6:13 AM | |
Posts: 133 Rating: (2) |
well done! |
Follow us on