Skip to main content



      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 06:52 Go to next message
Eclipse UserFriend
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 07:00 Go to previous messageGo to next message
Eclipse UserFriend
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 07:14 Go to previous messageGo to next message
Eclipse UserFriend
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 07:26 Go to previous messageGo to next message
Eclipse UserFriend
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 09:13 Go to previous messageGo to next message
Eclipse UserFriend
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 09:24 Go to previous messageGo to next message
Eclipse UserFriend
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 10:05 Go to previous messageGo to next message
Eclipse UserFriend
@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 10:43 Go to previous messageGo to next message
Eclipse UserFriend
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 10:55 Go to previous messageGo to next message
Eclipse UserFriend
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 11:15 Go to previous messageGo to next message
Eclipse UserFriend
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 11:17 Go to previous messageGo to next message
Eclipse UserFriend
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 11:30 Go to previous messageGo to next message
Eclipse UserFriend
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 11:31] by Moderator

Re: String id for OpcUa Folders [message #1834519 is a reply to message #1834518] Wed, 11 November 2020 11:40 Go to previous messageGo to next message
Eclipse UserFriend
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 11:44 Go to previous message
Eclipse UserFriend
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: Fri Jul 18 10:48:22 EDT 2025

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

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

Back to the top