
04/08/2025

Hello everybody.
First, I have to admin, that I am pretty new to more complex OPC UA things. In a project, we want to create an Informationmodel of a productionline. To achive this, I created in Siemens SIOME an ObjectType FB_ProductionStation, that describes one productionstation.
The FB_Productionline describes not this productionline, that has several FB_ProductionStations. I would like to gather all the FB_ProductionStation in an array. This woule come in handy, since I am using a CodeSys Controller as the opc ua server. With the array, I could easily iterate over all the objects, during runtime.
I somehow have not found a solution to this problem. Creating arrays of normal variables, and eben structs seems to be possible, but nor for objecttypes.
I appreciate any kind of help.
Regards from Germany, Ben

05/30/2017

Objects are not serializable entities in OPC UA. They only exist in the AddressSpace and need to be accessed with Browse.
Variables have a Value which is serializable but Variable itself is not serializable.
The concept of an Array only applies to serializable entities such as the Value of a Variable.
You can collect all of your FB_ProductionStation into a Folder with an Organizes reference which is like an Array.
You can then Browse the Folder to get a list of all FB_ProductionStations which would allow you to interate over the Objects, however, if you needs more information than is returned in the Browse you will Read attributes.
Can you describe what information you need when you are iterating over the Objects?

04/08/2025

Thank you for the explanation. I somehow have not found this information yet.
When iterating over the objects, I want to access several informatino, this goes from simple boolean and integer variables to variables of a structured type or enumerations.
I understand your solution with the folder, I think it is the same idea as in an aggregation object maybe.

05/30/2017

Yes, folders allow Nodes to be organized in different ways depending on the use case.
i.e. you can have a physical and logical representation of a plant where the hierarchy changes the same Object exists in both hierarchies.
The expected process for iterating over a list of Objects is:
1) Browse to get list of NodeIds
2) Use NodeIds + BrowsePaths to children in a call to TranslateBrowsePathsToNodeIds to get NodeIds for the components
3) Call Read with the NodeIds of the components to get the Value.
The TranslateBrowsePathsToNodeIds and Read take multiple operations so the above steps are only 3 service calls.
For example:
BoilerType -> OutputLevel (double) -> InputFlow (double) MyBoilers -> Boiler1 -> Boiler2 1) Browse(MyBoilers) => Boiler1.NodeId, Boiler2.NodeId 2) TranslateBrowsePathsToNodeIds { [ NodeId: Boiler1.NodeId, [ OutputLevel, InputFlow ] ], [ NodeId: Boiler2.NodeId, [ OutputLevel, InputFlow ]]} => [ Boiler1.OutputLevel.NodeId, Boiler1.InputFlow.NodeId], [ Boiler2.OutputLevel.NodeId, Boiler2.InputFlow.NodeId ] 3) Read(Boiler1.OutputLevel.NodeId, Boiler1.InputFlow.NodeId, Boiler2.OutputLevel.NodeId, Boiler2.InputFlow.NodeId) => Boiler1.OutputLevel.Value, Boiler1.InputFlow.Value, Boiler2.OutputLevel.Value, Boiler2.InputFlow.Value
1 Guest(s)