UA AddressSpace Modeling Help Please

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
tooLate
Sr. Member
Sr. Member
Posts: 10
Joined: 10 Jun 2013, 15:09

UA AddressSpace Modeling Help Please

Post by tooLate »

Hello,

I am new to OPC UA in general and I have the task to investigate the possibilities and different SDKs for OPC UA usage. And I am struggeling with the vast possibilites of the UA information model.

I have to generate a model for a camera with a set of parameters. This is the easy part, following the SDK server lessons. I created a new camera type object type with several variables for the parameters.
The problem is that different camera models have a different number of digital inputs and outputs, which themselves have a set of paremeters each. So the question is how to model a random set of digital inputs and outputs for one camera, since they are not single parameters that can be modeled with variables, or can they ?

I tried to model the digital input and output as a separate object type or as a variable array but I can not imagine how to generate a random numer of camera instances, each with a random number of digital inputs and outputs.

Maybe somebody can give me a push into the right direction. Thank you.

kind regards

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: UA AddressSpace Modeling Help Please

Post by Support Team »

Hello,

I do not understand the meaning of
a random set of digital inputs and outputs for one camera
Does it mean that you do not have the information about the digital inputs and outputs at modelling time?

Best regards,
Unified Automation Support Team

tooLate
Sr. Member
Sr. Member
Posts: 10
Joined: 10 Jun 2013, 15:09

Re: UA AddressSpace Modeling Help Please

Post by tooLate »

Hello

yes that is correct.

I want to add instances of the cameras ( camera object types ) during runtime. because of different camera models, each camera has an individual number of digital inputs and outputs.
My problem is that each digital input or output consists of several attributes / parameters, so I try to model it as another object type. And during modelling I am not sure how to link the two object types so I can create instances of the camera object with any number of digital inputs and outputs.

Something like: camera object type ---> has component ---> (1...n) digital input object type

Of course one option would be to model each camera type separately with a predefined set of digital inputs and outputs.

And right now I am thinking that maybe my problem has nothing to do with the modelling but the implementation later? but then again I am still not sure if this is a good way to model the cameras and their parameters this way.

kind regards

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: UA AddressSpace Modeling Help Please

Post by Support Team »

Hello,

In OPC UA the instance declarations (i.e. children of a type) have modelling rules. Typically the modelling rules are Mandatory or Optional. In these cases an instance of the type has (modelling rule Mandatory) / can have (modelling rule Optional) a child with the same browe name as the instance declaration.
But there are also the modelling rules MandatoryPlaceholder and OptionalPlaceholder. The modelling rules define (1..n) and (0..n) relationships. The children do not have the same browse name than the instance declaration but the same type definition.

Note: Generating code for the modelling rules MandatoryPlaceholder and OptionalPlaceholder is not supported fully for the UnifiedAutomation SDKs.

Best regards,
Unified Automation Support Team

tooLate
Sr. Member
Sr. Member
Posts: 10
Joined: 10 Jun 2013, 15:09

Re: UA AddressSpace Modeling Help Please

Post by tooLate »

Thanks for the quick information, I will look into it.

kind regards

Post Reply