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 » Setting ID of Client Modul in 4DIAC
Setting ID of Client Modul in 4DIAC [message #1770642] Tue, 15 August 2017 14:02 Go to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
hello, everyone,
do you know, how can man set the ID of Client Modul in 4DIAC for reading value from OPC ua Server in cpu S7 1516 from siemens. i have tried much times, but it does not work. The setting of ID is by me opc_ua[opc.tcp://192.168.1.2:4840#/Objects:PLC_1:DataBlocksGlobal:Datenbaustein_1/SIMATIC.S7-1500.OPC-UAServer:PLC_1]
  • Attachment: Frage.PNG
    (Size: 19.90KB, Downloaded 165 times)
Re: Setting ID of Client Modul in 4DIAC [message #1770693 is a reply to message #1770642] Wed, 16 August 2017 09:35 Go to previous messageGo to next message
Stefan Profanter is currently offline Stefan ProfanterFriend
Messages: 12
Registered: July 2017
Junior Member
Hi,
your ID is simply wrong, that's not a valid browse path and it does not align with the correct format.

Please read the documentation (https://eclipse.org/4diac/en_help.php).

There is written for example:
To configure where the variable nodes are created in the address space, you can use the ID fields of the SUBSCRIBE/PUBLISH function blocks. We want to create the variables under /Objects/FlipFlop, whereas the node FlipFlop should be created in cd namespace 1. Therefore we set the ID to opc_ua[/Objects/1:FlipFlop]. If you don't indicate the namespace explicitly (the 1:), then it will take the namespace 1 as default. QI has to be set to 1 to enable the function block.


It's the same for Client and Server blocks.
Re: Setting ID of Client Modul in 4DIAC [message #1770702 is a reply to message #1770693] Wed, 16 August 2017 11:12 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
Hello, Stefan,
i have made according to what you said, but it also do not work. And i use UAExpert to connect with OPC UA Server in Siemens S7 1500 CPU and it works. You can see this in attachment. And if i use client in 4diac to connect with OPC ua Server and it does not work. It always reminder me that it can not find node method .
  • Attachment: UAexpert.PNG
    (Size: 13.62KB, Downloaded 140 times)
  • Attachment: Fehler2.PNG
    (Size: 17.03KB, Downloaded 147 times)
Re: Setting ID of Client Modul in 4DIAC [message #1770704 is a reply to message #1770693] Wed, 16 August 2017 11:13 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
Hello, Stefan,
i have made according to what you said, but it also do not work. And i use UAExpert to connect with OPC UA Server in Siemens S7 1500 CPU and it works. You can see this in attachment. And if i use client in 4diac to connect with OPC ua Server and it does not work. It always reminder me that it can not find node method .
  • Attachment: Fehler2.PNG
    (Size: 17.03KB, Downloaded 187 times)
  • Attachment: UAexpert.PNG
    (Size: 13.62KB, Downloaded 132 times)
Re: Setting ID of Client Modul in 4DIAC [message #1770706 is a reply to message #1770704] Wed, 16 August 2017 11:17 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
Hi,

your test nodes on your plc, are variable nodes, but not the method nodes. 4diac opc ua client at the moment can only trigger method nodes as it is explicitly described in the documentation:

Quote:
A client is used to call methods on a OPC UA server.


BR, Kirill
Re: Setting ID of Client Modul in 4DIAC [message #1770709 is a reply to message #1770706] Wed, 16 August 2017 11:40 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
so can i self build the variable node with sfb or does it have any else methde to solve this problem?
Re: Setting ID of Client Modul in 4DIAC [message #1770715 is a reply to message #1770709] Wed, 16 August 2017 12:43 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
the 4diac Client/Server blocks is utilized for OPC UA Method calls, Publish/Subscribe blocks are used for writing/reading OPC UA Server variables. Currently, forte OPC UA Server can read/write (PUBLISH/SUBSCRIBE 4diac FB) variables as described in 4diac documentation -> Using Communication Protocols -> OPC UA -> OPC UA Variables and create methods (SERVER 4diac FB), example is given in 4diac documentation -> Using Communication Protocols -> OPC UA -> OPC UA Methods. The OPC UA Client can trigger methods on the server (CLIENT FB) as it's stated in 4diac documentation -> Using Communication Protocols -> OPC UA -> OPC UA Client.

At the moment there is no way to read/write variables from a forte opc ua client from/to a forte opc ua server.

Hope, this makes it clear.
Re: Setting ID of Client Modul in 4DIAC [message #1770718 is a reply to message #1770715] Wed, 16 August 2017 13:00 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
sorry, i understand this not clear. Can i ask more one time , that i can use the publisch and subscribe blocks to solve this problem or can i use a server block to communicate with opc ua server in plc.
Re: Setting ID of Client Modul in 4DIAC [message #1770722 is a reply to message #1770718] Wed, 16 August 2017 13:15 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
There's currently no way to read/write Variables from 4diac opc ua client. You can use Client to call OPC UA methods (see pic). More on OPC UA address space concepts (i.e. different OPC UA node types) you can find in OPC UA specs (see Part 3)
  • Attachment: Capture.PNG
    (Size: 206.74KB, Downloaded 161 times)
Re: Setting ID of Client Modul in 4DIAC [message #1770728 is a reply to message #1770722] Wed, 16 August 2017 14:33 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
that means i can't now connect with opc ua server integrated in plc siemens via Client /Server blocks with method call or Publish/Subscribe blocks, because opc ua server in plc is variable node but in 4diac support only method node. And i ask more, if i can with UA Expert realize the commnunication between plc and 4diac.
Re: Setting ID of Client Modul in 4DIAC [message #1770738 is a reply to message #1770728] Wed, 16 August 2017 15:52 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
Fei Yin wrote on Wed, 16 August 2017 16:33
if i can with UA Expert realize the commnunication between plc and 4diac.

UaExpert is just another OPC UA Client, it won't help you to set up a communication between Siemens OPC UA Server and 4diac OPC UA Client.
I'm not sure if Simatic OPC UA C# Server supports method calls, but after doing a quick google search on that I stumbled across [1], where it's stated that the only possible operations are READ, WRITE and SUBSCRIBE. Also here [2] they propose to do read/write for accessing data tags. I might be wrong, however, you better ask Siemens about their OPC UA server.
The alternative to do what you want, could be building a wrapper on top of the Siemens OPC UA Server that will have both OPC UA Client to access the variables in the PLC and OPC UA Server to communicate with the 4diac Client. But you'll need to build a Client that triggers the corresponding variables on the Simatic OPC UA Server and then a Server that wraps those variables in OPC UA Methods to communicate with 4diac.

[1] https://cache.industry.siemens.com/dl/files/088/42014088/att_4419/v1/42014088_opc_uaclient_doku_v10_e.pdf
[2] https://support.industry.siemens.com/cs/attachments/67295801/67295801_opc_ua_ie_s7_variable_DOKU_V10_en.pdf
Re: Setting ID of Client Modul in 4DIAC [message #1770800 is a reply to message #1770738] Thu, 17 August 2017 08:10 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
i have aksed Siemens, the answer is that siemens support only Variable as NodeClass. And i have a idea: if i use Kepserver to kommuicate with plc and 4diac and then realize the kommunicate between plc and 4diac. Is it correct and feasible?
Re: Setting ID of Client Modul in 4DIAC [message #1770803 is a reply to message #1770800] Thu, 17 August 2017 08:33 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
Fei Yin wrote on Thu, 17 August 2017 10:10
i have aksed Siemens, the answer is that siemens support only Variable as NodeClass. And i have a idea: if i use Kepserver to kommuicate with plc and 4diac and then realize the kommunicate between plc and 4diac. Is it correct and feasible?

Remember that OPC UA is always p2p communication, you always need a client communicating with a server. So if you wanna connect Siemens OPC UA Server to 4diac Client your communication should look like this: Siemens OPC UA Server <> some OPC UA Client <> some OPC UA Server <> 4diac OPC UA Client
Re: Setting ID of Client Modul in 4DIAC [message #1770804 is a reply to message #1770803] Thu, 17 August 2017 08:45 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
i have used the Kepserver with intergrated opc ua client connecting to PLC and it works. And i konw that kepserver is also as a server and then it can connect to 4diac , but i don't know, if it can kommunicate with opc ua ?
Re: Setting ID of Client Modul in 4DIAC [message #1770811 is a reply to message #1770804] Thu, 17 August 2017 10:08 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

I've only partly followed the discussion here. But one question to Stefan and Kirill from me would be if it is a big effort to have some way to connect as client to a non 4diac OPC UA server for reading and writing variable nodes? Would this be possible with a different syntax for the ID value of a PUBLISH or SUBSCRIBE block?

[Updated on: Thu, 17 August 2017 10:09]

Report message to a moderator

Re: Setting ID of Client Modul in 4DIAC [message #1770813 is a reply to message #1770811] Thu, 17 August 2017 10:28 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
Alois Zoitl wrote on Thu, 17 August 2017 12:08
I've only partly followed the discussion here. But one question to Stefan and Kirill from me would be if it is a big effort to have some way to connect as client to a non 4diac OPC UA server for reading and writing variable nodes? Would this be possible with a different syntax for the ID value of a PUBLISH or SUBSCRIBE block?

Yep. We discussed that briefly yesterday and also thought about utilizing PUB/SUB's for doing read/write from the client's side.
Re: Setting ID of Client Modul in 4DIAC [message #1772300 is a reply to message #1770702] Thu, 07 September 2017 18:23 Go to previous messageGo to next message
Fei  Yin is currently offline Fei YinFriend
Messages: 36
Registered: July 2017
Member
Hello,Stefan,

i want to ask you,now the 4DIAC client supports the variable Node to read/write value form a opc ua server of other devices?
Re: Setting ID of Client Modul in 4DIAC [message #1772302 is a reply to message #1772300] Thu, 07 September 2017 18:56 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi, as I answerd in your other post. Please have a look at the latest version of the documentation. There you can find a section how to read and write variable nodes on a remote server. For writing we diceded to go with the publish block and for reading you currently have to use the client block. Details on how to set them up and how to use them are in the docs. I hope this helps.

Alois
Re: Setting ID of Client Modul in 4DIAC [message #1777195 is a reply to message #1772302] Sun, 26 November 2017 14:01 Go to previous messageGo to next message
Yannick THiessoz is currently offline Yannick THiessozFriend
Messages: 7
Registered: November 2017
Junior Member
Hello,

I start the "OPC UA with IEC 61499 Tutorial".
Everything works correctly until chapter "Read and Write OPC UA variables on a remote server".

My configuration is different. I have the 2 forte client/server on a raspberrypi as show in picture system.jpg and the IDE is on windows PC.

I start the 2 forte instance on raspberry like in picture forte_Process_Raspberry.JPG.

I download the emb_res to the 2 forte instances without error.

I use uaExpert client to access the server variables and when I write to Increment/IN the correct result is showed in Incremented/OUT. That meens the server part is working correctely!

When I trigger an event on INT2INT_2, I see the connection on the forte console like in picture forte_connection.JPG. But the value Increment/IN isn't changed !

When I trigger an event on CLIENT_0_1, the value doesn't change on INT2INT_3 !

That meens my client doesn't work on read and on write operation.

I am pretty sure that the problem is on my configuration but I does't find where.

Can you help me ?

Best Regards

Yannick
Re: Setting ID of Client Modul in 4DIAC [message #1777283 is a reply to message #1777195] Tue, 28 November 2017 07:04 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

if i see it correctly it looks like that you are running two FORTE instances on the same raspberryPI. This is in general no problem but in the current setup it means that both FORTEs will start their OPC UA Server/Client on the same port. Therefore i think the OPC UA stack of one of the two devices is not correctly starting. unfortunately currently the OPC UA port FORTE is using is set during CMake configuration. So in order to make your setup work you would need to compile two separate FORTEs. For quick testing can you move one of the FORTEs to another physical device?
Best Regards,
Alois
Re: Setting ID of Client Modul in 4DIAC [message #1777332 is a reply to message #1777283] Tue, 28 November 2017 14:57 Go to previous messageGo to next message
Yannick THiessoz is currently offline Yannick THiessozFriend
Messages: 7
Registered: November 2017
Junior Member
Hi Alois,
Thank you for your quick response.
You're right, I have both instances on the same device.
I will try to separate that on two devices.
Unfortunatly, I also check the chapter "OPC UA Client" which only works on a single device and which create a server and call a method. And the FB AddingClient does not work.
Maybe it's a mistake on my raspberry configuration process (build process) ?
I will try in my windows environment.
If you have another idea, do not hesitate :-)
best Regards
Yannick
Re: Setting ID of Client Modul in 4DIAC [message #1777422 is a reply to message #1777332] Wed, 29 November 2017 10:31 Go to previous messageGo to next message
Stefan Profanter is currently offline Stefan ProfanterFriend
Messages: 12
Registered: July 2017
Junior Member
Hi Yannick,
thanks for the info, I just fixed a Deadlock. See: https://git.eclipse.org/r/#/c/112545/
That should fix your issue with the AddingClient.

As Alois already explained, running two forte on the same device without changing the OPC UA Server port is not supported. Either you only start one forte, or you compile a second forte with a different OPC UA Port (see CMake property FORTE_COM_OPC_UA_PORT).

BR
Stefan
Re: Setting ID of Client Modul in 4DIAC [message #1777601 is a reply to message #1777422] Thu, 30 November 2017 16:33 Go to previous message
Yannick THiessoz is currently offline Yannick THiessozFriend
Messages: 7
Registered: November 2017
Junior Member
Hi Stephan,
I tryed with your change and it perfeclty works !
Thank you a lot for your reactivity.
I can now start the second step : check with our opc_ua server :-) !
I understand the Alois response about the 2 instances of forte. But if I understand correctly the "Read and Write OPC UA variables on a remote server" exemple. One instance of forte is used for the opc_ua client and the second instance is used for the opc_ua server. That should not create a opc_ua server port error ? But definitively this is not a problem for me because I just try this sample before using my one opc_ua server.
best regards and thank you again
Yannick
Previous Topic:Blinking applicaiton with Raspberry 3B QX could not write
Next Topic:How to create a Device to use in the 4DIAC IDE
Goto Forum:
  


Current Time: Thu Mar 28 11:37:12 GMT 2024

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

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

Back to the top