ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC UA connection problem

I have a problem connecting to an OPC UA server. I used the simplest version of NIs Example here

 

https://zone.ni.com/reference/en-XX/help/371618J-01/lvmve/establishing_connection_btwn_opcua_svr_cln...

 

but no matter what I do i get the error

 

-356653 The status of the OPC UA server is uncertain. 

I have tried setting the "trust all servers" to true, i have tried providing certificates... nothing works. Other software such as UA expert connects instantaneously without any issues. How hard can it be?

 

Message 1 of 15
(8,371 Views)

We have the same problem here connecting to a B&R plc.

 

We tried different settings for authorization in combination with provided certificates, but this does not work at all.

Connection with UA expert works fine.

 

@bfelber: have you solved the problem in the meantime?

0 Kudos
Message 2 of 15
(8,172 Views)

Yes, we solved it by using the hostname "br-automation" - or whatever hostname is configured in automation studio - instead of the ip address. Just add the plc's ip to your host file in the system32/drivers/etc folder. With this workaround you should be able to connect to your B&R plc. I hope this will work out for you as well.

Message 3 of 15
(8,157 Views)

Works perfectly, thank you very much!

For everybody else encountering this problem, see screenshot attached for solution.

 

opc_ua.PNG

 

0 Kudos
Message 4 of 15
(8,149 Views)

Thank you very much guys! I had the same issue with B&R and now it has been solved 🙂

0 Kudos
Message 5 of 15
(7,433 Views)

@diebestetest wrote:

Thank you very much guys! I had the same issue with B&R and now it has been solved 🙂


we solved it by using the hostname "br-automation" - or whatever hostname is configured in automation studio - instead of the ip address. Just add the plc's ip to your host file in the system32/drivers/etc folder. With this workaround you should be able to connect to your B&R plc.

0 Kudos
Message 6 of 15
(7,425 Views)

Hi,
 I have the same issue with the same PLC brand, but this solution doesn't seem to solve.
Is there a particular syntax to edit the hosts file? A space between IP and description or a tab or something similar?
Do I have to reboot the system?
Now I don't get the connection error but I get a Timeout error so something is changed but still not solve.

0 Kudos
Message 7 of 15
(3,615 Views)
You said "whatever hostname is configured in automation studio", but I don't have automation studio, the PLC is from a third party company.
How to know what hostname is used? Can I find it using UAExpert?
0 Kudos
Message 8 of 15
(3,605 Views)

This is how I see my PLC on UAExpert.
What server endpoint URL should I place in my code?

gepponline_0-1714731805863.png

 

0 Kudos
Message 9 of 15
(3,557 Views)

@gepponline wrote:

This is how I see my PLC on UAExpert.
What server endpoint URL should I place in my code?

gepponline_0-1714731805863.png

 


Interesting, never seen multiple entries as shown on your screenshot above.

This is how it looks from my side (and works).

I would like to recommend to connect by IP, the name probably may not be resolved properly:

Screenshot 2024-05-03 13.54.36.png

 

0 Kudos
Message 10 of 15
(3,554 Views)