Unable to read value from nodes in OPC classic DA server

Questions regarding installing, running and configuring UaGateway.

Moderator: uagateway

Post Reply
goturvijay
Jr. Member
Jr. Member
Posts: 3
Joined: 07 Jun 2014, 01:26

Unable to read value from nodes in OPC classic DA server

Post by goturvijay »

Hi

We are trying to use the UA Gateway to read and subscribe to variables of an OPC classic DA server..
However, while trying to read the variable nodes on the OPC classic DA server, we get all information about the node, except the value..
This behaviour is seen even after adding variable nodes as monitored nodes in a subscription.
I have attached a screenshot of the UA Explorer which showed the same behaviour when the variable was read..[img]
OPCDAReadProblem.gif
[/img]

On reading this variable node with a classic OPC Client, we were able read the value properly and see changes in its value.
So is there something that needs to be done additionally while configuring the UA Gateway to connect to the COM DA Server..?

Regards
Vijay

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

Re: Unable to read value from nodes in OPC classic DA server

Post by Support Team »

Hello Vijay,

Could you please activate the trace functionality of the UaGateway (http://documentation.unified-automation ... e_sec.html) and send us the trace file and your configuration file by email?
Thank you.
Best regards
Support Team

goturvijay
Jr. Member
Jr. Member
Posts: 3
Joined: 07 Jun 2014, 01:26

Re: Unable to read value from nodes in OPC classic DA server

Post by goturvijay »

Hello

Thank you for the response..
A trace file is attached (in compressed form) with both application and stack traces enabled. We were using the CoDeSys OPC server v2 as our DA server.
We also attach some more screenshots..
Please feel free to let us know if we need to provide any more information..
srvTrace.zip
UAWrapperConfig.png
DA-Client_OPCServerV2.png
Regards
Vijay

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

Re: Unable to read value from nodes in OPC classic DA server

Post by Support Team »

Hi,

We cannot find anything wrong or special in UaGateway.

Here the outputs where UaGateway adds the three variables to a group in the COM Data Access Server:

Code: Select all

15:20:39.869Z|7|0DC8*   Item count = 3
15:20:39.869Z|7|0DC8*     Item[0] PLC_PRG.TestBool  DT=0 CH=1
15:20:39.869Z|7|0DC8*     Item[1] PLC_PRG.TestReal  DT=0 CH=2
15:20:39.869Z|7|0DC8*     Item[2] PLC_PRG.Get  DT=0 CH=3
15:20:39.884Z|4|0DC8* CALL IOPCItemMgt::AddItems
15:20:39.884Z|4|0DC8* DONE IOPCItemMgt::AddItems [hr=0x0]
15:20:39.884Z|7|0DC8* Add 3 items returned
15:20:39.884Z|7|0DC8*   Item[0] SH=1 AR=3 VarinatDT=11
15:20:39.884Z|7|0DC8*   Item[1] SH=2 AR=3 VarinatDT=4
15:20:39.884Z|7|0DC8*   Item[2] SH=3 AR=3 VarinatDT=11
And the data sent from the COM Data Access Server to UaGateway:

Code: Select all

15:20:40.072Z|4|13C8* ==> OPCDataCallback::OnDataChange (3 items)
15:20:40.072Z|7|13C8*   Parameters:
15:20:40.072Z|7|13C8*   ClientSubscriptionHandle = 4
15:20:40.072Z|7|13C8*   Masterquality = 1
15:20:40.072Z|7|13C8*   Mastererror = 0
15:20:40.072Z|7|13C8*   Value count = 3
15:20:40.072Z|7|13C8*     Item[0] CH=1 value=false quality=0x8 TS=15:20:37.934Z
15:20:40.072Z|7|13C8*     Item[1] CH=2 value=0 quality=0x8 TS=15:20:37.934Z
15:20:40.072Z|7|13C8*     Item[2] CH=3 value=false quality=0x8 TS=15:20:37.934Z
15:20:40.072Z|4|13C8* CALL DataChange
15:20:40.072Z|7|13C8* <-> UaMonitoredItemData::dataChange ClientHandle=1 Value= Status=0x808a0000
15:20:40.072Z|7|13C8* <-> UaMonitoredItemData::dataChange ClientHandle=3 Value= Status=0x808a0000
15:20:40.072Z|7|13C8* <-> UaMonitoredItemData::dataChange ClientHandle=5 Value= Status=0x808a0000
15:20:40.072Z|4|13C8* DONE DataChange
15:20:40.072Z|4|13C8* <== OPCDataCallback::OnDataChange [hr=S_OK]
The OPC COM Data Access quality=0x8 (OPC_QUALITY_NOT_CONNECTED) is sent from the COM Data Access Server to UaGateway. The UaGateway converts this quality to the OPC UA status code 0x808a0000 (OpcUa_BadNotConnected). This is the status code you can see in the OPC UA client.

Can you check with the COM Data Access Server vendor why the server send the OPC COM Data Access quality=0x8 (OPC_QUALITY_NOT_CONNECTED)?

Best Regards,
Unified Automation Support Team

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

Re: Unable to read value from nodes in OPC classic DA server

Post by Support Team »

Hi,

We do not know any details of how the CoDeSys OPC server works but it is strange that one client gets a good quality and that UaGateway as other client gets a bad quality.

One possible reason would be that the server is started twice and only one instance is able to connect to the data source.

This can happen if the DCOM configuration for the CoDeSys OPC server is set to 'The launching user' for 'Identity'. This is the default setting but OPC Server set-ups must set it to "The interactive user" or better to a specific user if they have a problem with started two times.

Since UaGateway is running as service and your GUI client runs interactive, it is possible that the server is started twice if DCOM is not configured right.

Best Regards,
Unified Automation Support Team

RMartins
Jr. Member
Jr. Member
Posts: 2
Joined: 14 Jul 2016, 15:59

Re: Unable to read value from nodes in OPC classic DA server

Post by RMartins »

Hi,

I have exactly the same problem when trying to connect with codesys opc server... did any of you found a solution?

Best Regards
Renato Martins

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

Re: Unable to read value from nodes in OPC classic DA server

Post by Support Team »

Hello,

The error is not caused by the UaGateway, the error is returned by the Codesys-Server when trying to access the data. It seems that the Codesys has lost the connection to the real data source.

For analyses:
- First check if you can connect to the Codesys and get data using a stanadard DA Client (Matrikon, Softing, Kepware)
- Second, please check if the Codesys is started twice, using the taks manager.

If it is started twice with different user context, the DCOM settings of the Codesys Server are wrong.
If it is not started twice, the Codesys has probably lost the connection to its own data.

Best Regards
Support Team

Post Reply