Problem with UaGateway 1.22 and OPC DA server

Questions regarding installing, running and configuring UaGateway.

Moderator: uagateway

Post Reply
mnemo
Jr. Member
Jr. Member
Posts: 2
Joined: 08 Dec 2011, 16:10

Problem with UaGateway 1.22 and OPC DA server

Post by mnemo »

Hi!

I'm trying to implement a Java UA client and evaluating the UaGateway (on Windows Server 2003) to connect to a proprietary OPC DA server on the same machine. This specific DA server is used by several dozen clients right now and normally has no major issues to speak of.

Alas, when trying to add an item from the browse view in UaExpert or when adding a subscription in my Java client, the Gateway just hangs afterwards and needs to be "killed" via Task-Manager.

The last messages in UaExpert are:

Code: Select all

15:52:23.918 | DA Plugin          | UaGateway@srv - Ba... | CreateMonitoredItems failed with error BadTimeout (0x800A0000).
15:52:20.511 | DA Plugin          | UaGateway@srv - Ba... | Item [0]: SamplingInterval=-1, QueueSize=1, DiscardOldest=1, ClientHandle=0
15:52:20.511 | DA Plugin          | UaGateway@srv - Ba... | Revised values: LifeTimeCount=55, 
MaxKeepAliveCount=11, Priority=0, PublishingInterval=500
15:52:20.511 | DA Plugin          | UaGateway@srv - Ba... | CreateSubscription succeeded.
15:52:20.511 | DA Plugin          | UaGateway@srv - Ba... | Creating new subscription: ClientHandle=0, PublishingEnable=1, 
LifeTimeCount=60, MaxKeepAliveCount=5, Priority=0, PublishingInterval=500
15:52:20.511 | DA Plugin          | UaGateway@srv - Ba... | Found session for ServerId 0
15:52:20.511 | DA Plugin          | UaGateway@srv - Ba... | No subscription available for ServerId 0
15:52:20.511 | DA Plugin          |                                | QascDaModel::dropMimeData
15:52:19.574 | AddressSpaceModel  | UaGateway@srv - Ba... | QascAddressSpaceModel::mimeData
After this, all Browse and Read requests in UaExpert generate errors, so I assume UaGateway hangs. Also, it's not possible to stop the gateway via the tray icon and disconnecting and reconnecting to the gateway in UaExpert only yields errors.

According to the gateway log it looks as if it creates the DA group and items. It also logs the subscription deletion, although UaExpert just reports an error. There are no obvious errors in the gateway log.

Any ideas?

Kind regards
Tom

User avatar
Support Team
Hero Member
Hero Member
Posts: 2533
Joined: 18 Mar 2011, 15:09

Re:Problem with UaGateway 1.22 and OPC DA server

Post by Support Team »

Hello,

could you please tell us, which DA server you are using and eventually send us the whole trace file by email to support@unifiedautomation.com?

Thanks and best regards
Unified Automation Support Team
Best regards
Unified Automation Support Team

User avatar
Support Team
Hero Member
Hero Member
Posts: 2533
Joined: 18 Mar 2011, 15:09

Re:Problem with UaGateway 1.22 and OPC DA server

Post by Support Team »

Hello,

thank you for sending the trace file.

These are the calls the UaGateway is calling on the wrapped COM DA Server for CreateMonitoredItems.
IOPCServer::AddGroup
IOPCItemMgt::AddItems
IConnectionPoint::Advise
IOPCGroupStateMgt:: SetState
The last call is used to activate the group after adding the items. This call never returns and causes the timeout for CreateMonitoredItems. At the same time there is a OnDataChange callback from the server. It looks like the server is blocking the SetState until the OnDataChange returns.

This looks like a locking problem between the COM DA Server and the UaGateway as OPC COM DA Client. The server should not block incoming calls with outgoing calls. But the UaGateway should also not block the OnDataChange.

We will try to find a resolution on the UaGateway side.


Best regards
Unified Automation Support Team

Code: Select all

14:56:13.692Z|4|1DF8* CALL IOPCServer::AddGroup
14:56:13.692Z|4|1DF8* DONE IOPCServer::AddGroup [hr=0x0]
14:56:13.692Z|4|1DF8* CALL IOPCItemMgt::QueryInterface (IID_IOPCGroupStateMgt)
14:56:13.692Z|4|1DF8* DONE IOPCItemMgt::QueryInterface [hr=0x0]
14:56:13.692Z|4|1DF8* CALL IOPCItemMgt::QueryInterface (IID_IOPCSyncIO)
14:56:13.692Z|4|1DF8* DONE IOPCItemMgt::QueryInterface [hr=0x0]
14:56:13.692Z|4|1DF8* CALL IOPCItemMgt::QueryInterface (IID_IOPCAsyncIO2)
14:56:13.708Z|4|1DF8* DONE IOPCItemMgt::QueryInterface [hr=0x0]
14:56:13.708Z|4|1DF8* CALL IOPCItemMgt::QueryInterface (IID_IOPCSyncIO2)
14:56:13.708Z|4|1DF8* DONE IOPCItemMgt::QueryInterface [hr=0x0]
14:56:13.708Z|4|1DF8* CALL IOPCItemMgt::QueryInterface (IID_IOPCAsyncIO3)
14:56:13.708Z|4|1DF8* DONE IOPCItemMgt::QueryInterface [hr=0x0]
14:56:13.708Z|4|1DF8* CALL IOPCItemMgt::AddItems
14:56:13.708Z|4|1DF8* DONE IOPCItemMgt::AddItems [hr=0x0]
14:56:13.708Z|4|1DF8* CALL IOPCItemMgt::QueryInterface
14:56:13.708Z|4|1DF8* DONE IOPCItemMgt::QueryInterface [hr=0x0]
14:56:13.708Z|4|1DF8* CALL IConnectionPointContainer::FindConnectionPoint
14:56:13.708Z|4|1DF8* DONE IConnectionPointContainer::FindConnectionPoint [hr=0x0]
14:56:13.708Z|4|1DF8* CALL IConnectionPoint::Advise
14:56:13.708Z|4|1DF8* DONE IConnectionPoint::Advise [hr=0x0]
14:56:13.708Z|4|1DF8* CALL IOPCGroupStateMgt::SetState

14:56:13.708Z|4|1140* ==> OPCDataCallback::OnDataChange (1 items)
14:56:13.708Z|4|1140* CALL DataChange
Best regards
Unified Automation Support Team

mnemo
Jr. Member
Jr. Member
Posts: 2
Joined: 08 Dec 2011, 16:10

Re:Problem with UaGateway 1.22 and OPC DA server

Post by mnemo »

Thank you for the detailed analysis and explanation!

I will also try contacting our supplier if this behaviour is intended or can be changed.

Kind regards
Tom

User avatar
Support Team
Hero Member
Hero Member
Posts: 2533
Joined: 18 Mar 2011, 15:09

Re:Problem with UaGateway 1.22 and OPC DA server

Post by Support Team »

Hello Tom,

We changed the UaGateway to avoid the problem on the gateway side.
But it would be better to get also a change on the server side. It is always better to resolve such issues on both ends.

You will receive a test version to verify the change.

A new release requires intensive testing and will take a while since the change was not trivial.

Thanks and best regards
Unified Automation Support Team
Best regards
Unified Automation Support Team

Post Reply