Opc_Ua_any device unable to connect to a server using Hostname

Hi,
I have a client B&R PLC that uses Opc_Ua_any device for exchanging couple variables with a server. I have estabilished and succesfully tested communincation with the server endpoint being configured with an IP address (opc.tcp://ip-address:port) with both B&R PLC Server and Sinumerik Server. I have tried configuring the server endpoint as its Hostname (opc.tcp://hostname:port) but I have not been able to connect to the server. Both devices are on the same network and have different hostnames. Our application is fairly simple, so I’m trying to avoid coding.
Is there anything I can do or configure further/differently in order to make this connection work?
I’m happy to provide more details.
Thank you!

Hello Jan
Have you activated your DNS settings in the CPU configuration?
AH: DNS configuration CPU

Good luck!
Jan

Hi Jan,
Yes, I have activated the DNS service and the connection still fails, is there anything else I need to set up there or modify elswere in the configuration?
Thank you!

Can you tell us which AR version you have and what the error in the logger is?

I have runtime M4.93 and I am getting error ID -1070584042

OK, this version of AR is fine. What ASCII data details do you have?

Example:
ID -1070584042
Entered by ddOpcUaClientPnpIF2
Description OPC UA connection failed
ASCII Data connect to opc.tcp://ATGILG253:48030 failed E:0xa0060000

Can you connect to the OPC UA server using UAExpert with the hostname provided? or do you have some error there as well?

My ASCII data are:
ID -1070584042
Entered by ddOpcUaClientPnpIF2
Description OPC UA connection failed
ASCII Data connect to opc.tcp://slunicko:4840 failed E: 0xa0060000

When connecting to the server using UAExpert, I do get some warnings/errors
Finding the server looks like this
image
upon opening the second option I get these messages, to which I answer yes



then it opens the usual options

and when I connect, I get these messages into the Log window

Connecting to the IP option goes without any issues.
Thank you!

You need to have a DNS server in the network and the server address configured (or taken from DHCP) for the PLC.

B&R Automation Runtime does not have support for Multicast DNS

Alright, this is how I have set up the DNS configuration on both ends


after setting this on both devices, the connection is still unsuccesfull.
Does it need to be set up on both devices or should it be different?
Or do I need to modify the server endpoint url based on this somehow? I have tried opc.tcp://slunicko.br-automation.com:4840 but it still fails.
Thank you!

Hi @jan.rehak , have you found solution for your problem?

Hi @kovarj not yet, I’ve asked a few people for insights and we’ve been looking for a solution. Once I’ll have a solution, I’ll publish it :smiley: . Of course if you have any ideas, they will be appricieted. :smiley:

Are you sure the PLC can access the DNS server? Because the network IP range seems to differ. 10.32.139.xxx for DNS, 10.32.138.xxx for PLC as I can see from your screen captures.
You can verify with the IcmpPing() FUB from the AsIcmp library to see if the server can be reached from the PLC.

1 Like