After work a period time, AE Service automatic does not recevice data from OPC Server|Classic OPC: DA, A&E, HDA, XML-DA, etc.|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
After work a period time, AE Service automatic does not recevice data from OPC Server
Avatar
Zin Min
New Member
Members
Forum Posts: 1
Member Since:
04/06/2014
sp_UserOfflineSmall Offline
1
07/25/2016 - 03:06
sp_Permalink sp_Print

This tool is used OPC NET API AE. This tool is very simple. Connect OPC Server, receive alarm and save into CSV file. the source code is almost same as OPC Foundation sample code.Cry

 

I setup this tool and connect OPC Server successful and start to receive alarms. After work a period time, tool stop to receive alarm. But OPC Server and DCS both work fine. After restart this tool, it can receive alarms.

 

  1. After connect OPC Server successful, one method will check OPC connection status and Event Subscript status very 1 minute, both all normal. But cannot receive alarm.
  2. And then I add one function. If this tool does not receive alarm more than 10 minutes, it will automatic reconnect OPC Server. After run this function, reconnect OPC Server successful , but create subscript event failed. The error is DCOM error. Please see below.

2016-07-18,00:00:11,WARNING,Setup OPC Server Connection,-----------Trying to setup OPC Server connection.------------

2016-07-18,00:00:11,INFORMATION,OPCConnectionMonitor,Not receving alarms for long time, Auto Restarting OPC Connection: 10.130.36.37

2016-07-18,00:00:18,INFORMATION,AeController.SetupOPCServerConnection(),opcae://10.130.36.37/Yokogawa.ExaopcAECS1.1 connected.

2016-07-18,00:00:19,INFORMATION,AeController.PrintSubscriptionInfo(),BufferTime :0

2016-07-18,00:00:19,INFORMATION,AeController.PrintSubscriptionInfo(),MaxSize :1000

2016-07-18,00:00:19,INFORMATION,AeController.PrintSubscriptionInfo(),KeepAlive :10

2016-07-18,00:00:19,INFORMATION,AeController.PrintInformation(),Print information successfully.

2016-07-18,00:00:19,INFORMATION,OpcEvtHandler.Connect(),Staring browsing areas.

2016-07-18,00:00:19,WARNING,OpcEvtHandler.Connect(),Failed to browse areas on OPC server opcae://10.130.36.37/Yokogawa.ExaopcAECS1.1.: E_FAIL

IOPCEventServer.CreateAreaBrowser

2016-07-18,00:00:19,INFORMATION,OpcEvtHandler.Connect(),Staring browsing areas.

2016-07-18,00:00:20,WARNING,OpcEvtHandler.Connect(),Failed to browse areas on OPC server opcae://10.130.36.37/Yokogawa.ExaopcAECS1.1.: E_FAIL

IOPCEventServer.CreateAreaBrowser

2016-07-18,00:00:27,INFORMATION,OpcEvtHandler.GetReadyToReceiveEvts(),ready to register event change handler. Register EvtHandler failed, Error: System.Runtime.InteropServices.COMException (0x80010111): OLE received a packet with an invalid header. (Exception from HRESULT: 0x80010111)

   at OpcRcw.Comn.IConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)

   at OpcCom.ConnectionPoint.Advise(Object callback)

   at OpcCom.Ae.Subscription.Advise()

   at OpcCom.Ae.Subscription.add_EventChanged(EventChangedEventHandler value)

   at Opc.Ae.Subscription.add_EventChanged(EventChangedEventHandler value)

   at OpcEvtHandler.RegisterNewEvtHandler(String& msg).

  1. I do one more testing the function that AE Collector tool reconnect OPC  Server after does not receive alarm more than 10 minutes.

It is successful. It does not have DCOM error.

(1). Setup AE Collector tool and connect OPC Server. And then it starts to receive alarms.

(2). Stop DCS test function, so DCS does not general alarm and AE Collector tool also cannot receive alarms.  And then check the log file

2016-07-20,17:36:31,INFORMATION,OPCConnectionMonitor,Not receving alarms for long time, Auto Restarting OPC Connection: 192.168.6.10

2016-07-20,17:36:34,INFORMATION,AeController.SetupOPCServerConnection(),opcae://192.168.6.10/Yokogawa.ExaopcAECS1.1 connected.

2016-07-20,17:36:34,INFORMATION,AeController.PrintSubscriptionInfo(),BufferTime :0

2016-07-20,17:36:34,INFORMATION,AeController.PrintSubscriptionInfo(),MaxSize :1000

2016-07-20,17:36:34,INFORMATION,AeController.PrintSubscriptionInfo(),KeepAlive :10

2016-07-20,17:36:34,INFORMATION,AeController.PrintInformation(),Print information successfully.

2016-07-20,17:36:34,INFORMATION,OpcEvtHandler.Connect(),Staring browsing areas.

2016-07-20,17:36:34,INFORMATION,OpcEvtHandler.GetReadyToReceiveEvts(),ready to register event change handlerfinish register event change handler

2016-07-20,17:36:34,INFORMATION,AeController.SetupOPCServerConnection(),opcae://192.168.6.10/Yokogawa.ExaopcAECS1.1 finished subscription.

(3). Start DCS test Function again, AE Collector tool can automatic receive alarms.

 

Based on point 3, the reconnect OPC function is working. Source code does not have problem.

 

So now problem is

  1. Why this tool stop receive alarm from OPC Server.
  2. About reconnect OPC Server function, why the DCOM error happen?
  3. It is source code problem or environment problem
Avatar
bo li
New Member
Members
Forum Posts: 1
Member Since:
09/10/2021
sp_UserOfflineSmall Offline
2
03/06/2022 - 22:30
sp_Permalink sp_Print

Hi,I have the same problem,how do you solve it?

Avatar
jian xin
Member
Members
Forum Posts: 7
Member Since:
11/25/2022
sp_UserOfflineSmall Offline
3
03/15/2023 - 23:56
sp_Permalink
Awaiting Moderation

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Kristoffer Thyholdt
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1349
Posts: 4579