Failed to use a service to connect to PcVue by OPC

3 Posts
2 Users
0 Likes
12 Views
(@sq.zheng@pcvue.com.cn)
Posts: 0
New Member Guest
 

Hi,

I got a question from a customer which is developing an OPC client in order to get data from OPC Server(PcVue).

1. When the OPC client is an application then the communication with PcVue is fine;
2. when they run the OPC client as a windows service, then it failed to connect to PcVue and has the error logs below:

错误信息文件(Error info file):C:Program FilesEwindTBM DCErrorerror2014-7-15h10m21.txt

----------------------------------------------------------------------------------
2014-7-15 10:21:04 尝试(Trying)OPCDAuto连接(Connect)Opc错误(Error)
System.Runtime.InteropServices.COMException (0x80080005): 服务器运行失败 (Server running failure)(Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))
at OPCAutomation.IOPCAutoServer.Connect(String ProgID, Object Node)
at YZH.Communicat.ClsOpcDriver.ConnectOpcServer()
2014-7-15 10:21:35 尝试(Trying)OPCDAuto连接(Connect)Opc错误(Error)
System.Runtime.InteropServices.COMException (0x80080005): 服务器运行失败(Server running failure) (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))
at RsiOPCAuto.IOPCAutoServer.Connect(String ProgID, Object Node)
at YZH.Communicat.ClsOpcDriver.ConnectOpcServer()
-----------------------------------------------------------------------------

Note: when run the OPC client as a Windows service, they succeeded to get data from KepServer and Mitsubishi OPC server.

In event viewer there is nothing for the connection error, and in log file opcsvr.log, there is nothing neither, it only has the succeeded connection.

2014/07/15,09:52:48.564,ZOO-9A3268D7B1B,Administrator,OPCSVR,I,0,0,Connection of a new client '6'...
2014/07/15,09:52:48.564,ZOO-9A3268D7B1B,Administrator,OPCSVR,I,0,0,...Client '6' is connected...
2014/07/15,09:53:47.033,ZOO-9A3268D7B1B,Administrator,OPCSVR,I,0,0,Client '6' is deconnecting...
2014/07/15,09:53:47.033,ZOO-9A3268D7B1B,Administrator,OPCSVR,I,0,0,...Client '6' is deconnected

Do you think it's a problem of PcVue as OPC server?

Thx!

 
Posted : 15/07/2014 8:33 am
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

For me it's probably a DCOM issue.
Try setting the DCOM parameters.
If still not working you can try changing the Security value to 1 in binsv32.ini. If not working try the value 0.

....
[DCOM Configuration]
;
;Security=0 (Do not call CoInitializeSecurity)
;Security=1 (Turn off security for this application)
;Security=2 (Uses the security settings for this application from the registry - Default value)
;
Security=1
....

 
Posted : 16/07/2014 7:07 am
(@sq.zheng@pcvue.com.cn)
Posts: 0
New Member Guest
 

Thank you! Nico. We tried with 1 and 0, but failed. It should be a DCOM problem.

After compared with other opc server's configuration, we modified the sv application's DCOM Configuration from "The launching user" to "The interactive user" in the identity tab, then the problem was solved.

 
Posted : 16/07/2014 7:52 am