Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Read and Write OPC UA variables on a remote server
Read and Write OPC UA variables on a remote server [message #1852540] Mon, 23 May 2022 02:06 Go to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hello everyone!

I tried to deploy the "Read and Write OPC UA variables on a remote server" tutorial, available at the below link:

https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/opc_ua_version1.html
index.php/fa/42084/0/


But I noticed that at the tutorial is used the FB CLIENT_0_1 FB, which is not available at 4diac IDE/FORTE v 2.0.0 library (see pic below).
index.php/fa/42085/0/

I tried to go ahead anyway with the CLIENT with one SD and one RD, and also with SUBSCRIBE FB, but got the below errors on FORTE:

CLIENT FB:
ERROR: T#856924151338: [OPC UA ACTION]: Remote CLIENT_1 action is only allowed using a Client FB, the amount of BrowseName,NodeId pairs should match the number of RDs, and must have no SDs

SUBSCRIBE FB:
ERROR: T#658050475209: [OPC UA ACTION]: Remote SUBSCRIBE_1 action is only allowed using a Client FB, the amount of BrowseName,NodeId pairs should match the number of RDs, and must have no SDs


Does anyone know how to solve it?


B.R.
Ricardo

Re: Read and Write OPC UA variables on a remote server [message #1852542 is a reply to message #1852540] Mon, 23 May 2022 06:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

Hi,

we have for that a generic FB concept in 4diac FORTE. That means that on deployment 4diac FORTE takes the numbers given in the type name and generates the according FB interface. However we never had a nice handling for that in 4diac IDE. So if you need a CLIENT_0_1 you need to generate one by yourself. You can do this for example by copying the CLIENT_1 to CLIENT_0_1 and adjust the interface acordingly.

Cheers,
Alois
Re: Read and Write OPC UA variables on a remote server [message #1852672 is a reply to message #1852542] Tue, 31 May 2022 01:54 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

Many thanks for the tip. That worked! It was even possible to distribute the application into two devices.

But I was wondering if is possible to use the subscribe FB instead of client FB to distribuited architecture.

On my tests the Client FB needs to receive a REQ event, so that it reads the data. But if I remember correctly the subscribe FB does it automaticaly as soon as the data changes its value.

For instance, I tried to change the blink tutorial by using OPC-UA and Client FB as the pic below. It work, but REQ had to be generated manualy. Any ideia how to automate this?

index.php/fa/42126/0/

thanks in advance.
Ricardo
Re: Read and Write OPC UA variables on a remote server [message #1852824 is a reply to message #1852672] Mon, 06 June 2022 16:25 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

Hi Ricardo,

according to our documentation it should be possible to use SUBSCRIBE FBs to subscribe to variables in a remote server. I think this is what you want. But I have know idea how to do it correctly.

Cheers,
Alois
Re: Read and Write OPC UA variables on a remote server [message #1854798 is a reply to message #1852824] Sun, 11 September 2022 22:06 Go to previous messageGo to next message
Henry Pastuña is currently offline Henry PastuñaFriend
Messages: 6
Registered: August 2022
Junior Member
Hello everyone!

I tried to implement the "Reading and writing opc ua variables on a remote server" tutorial, available at the following link: https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/opc_ua_version1.html
As INT2INT_2.REQ is activated, so that it reads the increased value.
On the page it is mentioned that its activation is manually.

index.php/fa/42472/0/
Re: Read and Write OPC UA variables on a remote server [message #1854800 is a reply to message #1854798] Mon, 12 September 2022 10:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1583
Registered: January 2014
Senior Member

if your event input is not connected to anything it would also not be triggered. We do this in test examples a lot because it is easier to manually trigger the events and observe what is happening. For this you need to right click on the event pin and invoke trigger event.
Re: Read and Write OPC UA variables on a remote server [message #1854816 is a reply to message #1854800] Tue, 13 September 2022 02:57 Go to previous message
Henry Pastuña is currently offline Henry PastuñaFriend
Messages: 6
Registered: August 2022
Junior Member
Thanks a lot.
that solved my problem
Previous Topic:OPC UA
Next Topic:OPC UA Connection (Error: BadSecurityChecksFailed)
Goto Forum:
  


Current Time: Fri Apr 19 21:47:19 GMT 2024

Powered by FUDForum. Page generated in 0.03413 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top