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 » String id for OpcUa Folders(Use the String id used for variables in the folder structure)
String id for OpcUa Folders [message #1834488] Wed, 11 November 2020 11:52 Go to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Hello,

I want my application to use have String identifiers in the OpcUa nodeset. I have created all my variables and methods using "s=" which nicely adds the id to my node. However, the directories do not have String nodes, but use numeric instead which hinders me accessing a folder by it's Id in my concurrent Application.

Is there a way to convert the directory ids to String using their path for example? I have looked into the CMake cache and did not find any option and the documentation does not cover creating directories so I guess this is not an option aswell.

Thank you in advance
Mario
Re: String id for OpcUa Folders [message #1834490 is a reply to message #1834488] Wed, 11 November 2020 12:00 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
It's the same for folders:

/Objects/folder,s=myStringIdFolder/var1,s=myStringIdVar

this will set the string id "myStringIdFolder" for the folder and "myStringIdVar " for the variable.

Jose
Re: String id for OpcUa Folders [message #1834491 is a reply to message #1834490] Wed, 11 November 2020 12:14 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Thank you very much! This solves my problem
Re: String id for OpcUa Folders [message #1834492 is a reply to message #1834491] Wed, 11 November 2020 12:26 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Ok I was looking at a wrong node in UaExpert since the nodes have shifted around. Assuming I am creating a variable using this:

opc_ua[WRITE;/Objects/Device/Module/Id,1:s=/Device/Module/Id]

I need to transform it into this:

opc_ua[WRITE;/Objects/Device/Module,s=Module/Id,1:s=/Device/Module/Id]

For my case it did not work and is not displaying the variable at all
Re: String id for OpcUa Folders [message #1834500 is a reply to message #1834488] Wed, 11 November 2020 14:13 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
a workaround for this would be first to create a folder using CREATE_OBJECT with the required node id and then to create a variable in the folder.. requires a bit of work but that is how it works now..

create a folder (0:i=61) is the NodeId of the FolderType
opc_ua[CREATE_OBJECT;,0:i=61;/Objects/Device/Module,1:s=Module]


and then instantiate the variables you need in the folder
opc_ua[WRITE;/Objects/Device/Module/Id,1:s=/Device/Module/Id]


Hope this helps,
Kirill
Re: String id for OpcUa Folders [message #1834502 is a reply to message #1834500] Wed, 11 November 2020 14:24 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
That's right, thanks Kirill.

That's the only way for now. I didn't realize it was not possible to set two nodeIds
Re: String id for OpcUa Folders [message #1834506 is a reply to message #1834502] Wed, 11 November 2020 15:05 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
@Kirill DorofeevFriend

I have tried your approach by creating a folder first. Can you check if the folder keeps the string nodeId after you create the Id variable?
If I only create the Folder it shows up as expected, but after I add a variable node the folder is using an integer instead

This confuses me since I am creating the folder first. Any ideas?
Re: String id for OpcUa Folders [message #1834511 is a reply to message #1834506] Wed, 11 November 2020 15:43 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
I've attached the screenshot with the app in my previous message. With it, both folder and variable in it get the string nodeids as expected. Does your application look similar? Cheers, Kirill
Re: String id for OpcUa Folders [message #1834513 is a reply to message #1834511] Wed, 11 November 2020 15:55 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Yes i have attached a screenshot of the used application I used including a screenshot from UaExpert showing that the nodeId is still a numeric value
Re: String id for OpcUa Folders [message #1834514 is a reply to message #1834513] Wed, 11 November 2020 16:15 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
Could you please also copy what you have there on PARAMS port for both publish FBs?
Re: String id for OpcUa Folders [message #1834515 is a reply to message #1834514] Wed, 11 November 2020 16:17 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Publish_0: opc_ua[CREATE_OBJECT;,0:i=61;/Objects/Plotter/HANDSHAKE_FU/CAPABILITIES/CAPABILITY1]

HSCapabilityId opc_ua[WRITE;/Objects/Plotter/HANDSHAKE_FU/CAPABILITIES/CAPABILITY1/ID,1:s=Plotter/HANDSHAKE_FU/CAPABILITIES/CAPABILITY1/ID]

Hope this helps
Re: String id for OpcUa Folders [message #1834518 is a reply to message #1834515] Wed, 11 November 2020 16:30 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
in PUBLISH_0 you need to specify the string node id you wanna have there as following:

opc_ua[CREATE_OBJECT;,0:i=61;/Objects/Plotter/HANDSHAKE_FU/CAPABILITIES/CAPABILITY1,1:s=Plotter/HANDSHAKE_FU/CAPABILITIES/CAPABILITY1]

[Updated on: Wed, 11 November 2020 16:31]

Report message to a moderator

Re: String id for OpcUa Folders [message #1834519 is a reply to message #1834518] Wed, 11 November 2020 16:40 Go to previous messageGo to next message
Mario Krizic is currently offline Mario KrizicFriend
Messages: 38
Registered: April 2019
Member
Thank you!

I can't believe I missed that. Now it works as intended.
Re: String id for OpcUa Folders [message #1834521 is a reply to message #1834519] Wed, 11 November 2020 16:44 Go to previous message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
Cool! We'll probably need to implement it so that it works as Jose proposed. This would be much more user-friendly :-)
Previous Topic:Arrowhead framework & Registering Services
Next Topic:ladder language vs forte
Goto Forum:
  


Current Time: Thu Mar 28 16:50:03 GMT 2024

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

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

Back to the top