how to set up remote OPC UA connection|OPC UA Standard|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
how to set up remote OPC UA connection
Avatar
Øyvin
New Member
Members
Forum Posts: 2
Member Since:
04/30/2018
sp_UserOfflineSmall Offline
1
04/30/2018 - 05:17
sp_Permalink sp_Print

Hi all,

 

I'm trying to open up a connection to a public OPC-UA server through UaExpert, but I cant get it to work. I just copy/paste the adress in the add server, but get a BadCommunicationError responce back form the UaExpert whenever I try to open the connection. Is there something I'm missing when setting it up? do I need to add anything else except the adress?

http://www.opclabs.com/resourc.....a-server-2

 

https://github.com/node-opcua/.....UA-servers

 

Thanks

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
04/30/2018 - 06:36
sp_Permalink sp_Print

This works for me with the latest UAExpert:

opc.tcp://opcua.demo-this.com:51210/UA/SampleServer

Avatar
Øyvin
New Member
Members
Forum Posts: 2
Member Since:
04/30/2018
sp_UserOfflineSmall Offline
3
05/01/2018 - 22:50
sp_Permalink sp_Print

Thanks,

 

Unfortunately, I can't get it to work. It's probably something simple I forgot to do. Anyways, as you can see from the picture, I get a "could not connect to server: BadCommunicationError" message

 

Image Enlarger

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
05/02/2018 - 07:52
sp_Permalink sp_Print

Could be a network firewall issue.

Avatar
Zbynek Zahradnik
Member
Members
Forum Posts: 62
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
5
05/02/2018 - 08:31
sp_Permalink sp_Print

Randy is most likely right.

I am the person who runs this public server. It works for me now, and I am not aware of any longer downtime recently.

You can try connection using our Connectivity Explorer tool, http://www.opclabs.com/product.....y-explorer . If it does not connect, right-click on the server endpoint and select "TCP Connect Test". This will try to open a simple TCP connection to the server, without any OPC UA involved. If the TCP Connect Test fails, it would be almost definitely a firewall issue.

Regards

Avatar
Joost Merks
Member
Members
Forum Posts: 12
Member Since:
09/07/2021
sp_UserOfflineSmall Offline
6
10/29/2021 - 02:30
sp_Permalink sp_Print sp_EditHistory

Dear,

The opc.tcp://opcua.demo-this.com:51210/UA/SampleServer works fine for me! 🙂
Now I want to acces my own remote OPC UA Server. 

I have a PLC attached to a router with a static IP-Address. 
IP Address PLC: 192.168.1.10
IP Address router: 178.229.83.190
OPC UA port 4840 ? This port worked while the PLC was attached to my office network.

How can I acces my PLC via UaExpert?

Thanks in advance!

Kind regards,
Joost Merks

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
7
10/29/2021 - 05:14
sp_Permalink sp_Print

if you can ping 192.168.1.10 from a console on your PC then you can simple construct a URL that looks like:

opc.tcp://192.168.1.10:4840/

If you have a NAT firewall then the firewall must be configured to forward packets on port 4840 to 192.168.1.10

In this case, when you enter the firewall URL into the server list (opc.tcp://178.229.83.190:4840/), UAExpert should warn you of mismatch between the server endpoints and the URL that you actually used. You can ignore these warnings.

Avatar
Joost Merks
Member
Members
Forum Posts: 12
Member Since:
09/07/2021
sp_UserOfflineSmall Offline
8
10/29/2021 - 06:44
sp_Permalink sp_Print

Hi,

I guess I wasn't quite clear,

Well my PC with visualisation software (UaExpert) is located on my laptop in the office. 

The machine with PLC (OPC UA Server) and Router with Sim-Card are located in the field, so they are not on the same network. 
The machine works on solar panels and for this reason must also be energy sufficient. This means that the router + PLC will go to sleep mode every 15 min, afther which they connect to the internet again to send and receive data. 

First,
I tried to connect the PLC directly via ethernet to my PC. This UA Connection worked inmediately fine.

Now,
I added a router. So, the PLC is now connected to the router via a ethernet cable. and the PC (is not connected to the router by any hardware) can Ping to the IP Address of the sim card of the router.

Last step,
Is to place the IP address of the router in UaExpert on my PC after which (I thought) that I would be able to click 'through' the router > PLC > OPC UA Variables.

But this last step isn't working, when I fill in the IP address of the router in UaExpert I get no options to add the PLC data in the UaExpert Data Access viewer.

So that's the problem I didn't manage to solve yet. Hope u can help me.

In my router I've configured my NAT firewall like this:
At the tab NAT:
Public Port(s)       Private Port(s)         Type          Server IP Address         Description
4840                   4840                      TCP           192.168.1.10                TestPhoenix1

I do also have a tab named FireWall with "Enable filtering of incoming packets" and "Enable filtering of forwarded packets" Do I also have to set someting in here?

If you could mail me, i can send extra pictures of the GUI by email.
Thanks in advance!

Kind regards,
Joost Merks
Mail: jja.merks@student.avans.nl
Eindhoven, Netherlands

[Image Can Not Be Found]

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
9
10/29/2021 - 07:46
sp_Permalink sp_Print

Use the Add Server... window in UAExpert

Click on "Custom Discovery"

Enter the router URL: opc.tcp://178.229.83.190:4840/

You should connect to the PLC and get a warning that the endpoints don't match the URL.

Accept this. You should be able to connect.

Avatar
Joost Merks
Member
Members
Forum Posts: 12
Member Since:
09/07/2021
sp_UserOfflineSmall Offline
10
11/03/2021 - 00:55
sp_Permalink sp_Print sp_EditHistory

Hi Randy,

I tried your suggestion but when I start to search I get:
"Discovery GetEndpoints on opc.tcp://178.229.83.190:4840 failed (BadTimeout)."
"Discovery FindServersOnNetwork on opc.tcp://178.229.83.190:4840 failed (BadTimeout). falling back to FindServers
"Discovery FindServers on opc.tcp://178.229.83.190 failed (BadTimeout)."

Tried to find it with and without the port.

Ping on this IP is working.
Do you maybe know what I could try more?

Joost

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
11
11/04/2021 - 08:11
sp_Permalink sp_Print

The mostly likely explanation is the port forwarding on your router is not configured correctly.

You need some entry that tells the router to forward all traffic on port 4840 to the PLC.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 39
Currently Browsing this Page:
2 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855