I'm trying to create an object type to define a machine, that machine have N inputs/output signals that I want to populate dynamically when the OPC-UA Server is starting.
I've already tried creating the signal definition as another object-type and also as a variable-type, but the object-type child can't be defined as an array, and in the other hand the child as variable-type can be marked as an array but the generated C# code creates the child as a single property, not as an array/list.
Could you please guide me on what is the proper way of doing this in the UAModeler?
How to create an object with a children of type object-array
Moderator: uamodeler
-
- Hero Member
- Posts: 21
- Joined: 14 Jun 2021, 23:39
- Support Team
- Hero Member
- Posts: 3078
- Joined: 18 Mar 2011, 15:09
Re: How to create an object with a children of type object-array
Hello,
Arrays of Objects or Variables can be modelled with ModellingRule of the instance declaration node.
The ModellingRule OptionPlaceholder represents a 0..n relationship, the ModellingRule MandatoryPlaceholder represents a 1..n relationship. This means that you define that an instances has some children with the same TypeDefinition than the instance declaration.
The nodes for the array elements need to be created at the instance explicitly.
Arrays of Objects or Variables can be modelled with ModellingRule of the instance declaration node.
The ModellingRule OptionPlaceholder represents a 0..n relationship, the ModellingRule MandatoryPlaceholder represents a 1..n relationship. This means that you define that an instances has some children with the same TypeDefinition than the instance declaration.
The nodes for the array elements need to be created at the instance explicitly.
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Hero Member
- Posts: 21
- Joined: 14 Jun 2021, 23:39
Re: How to create an object with a children of type object-array
Thanks for the answer but unfortunatelly I'm not completely understanding the configuration. Is it possible you can provide me an Uamodeler example file?