Ua Expert:has component variable structure only on top level

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
AGO
Full Member
Full Member
Posts: 8
Joined: 01 Jun 2016, 08:22

Ua Expert:has component variable structure only on top level

Post by AGO »

Hello!
My aim is to build up a variable structure "Example" with multiple levels in UaModeler. My way to do this was the following, but since I am a total beginner I am open for other approaches:

Object Types
-Example (FolderType, Has Component)
--ExampleDescription (BaseDataVariableType, Has Component, Base Data Type)
--- ExampleID (BaseDataVariableType, HasComponent, string)
--- ExampleRole (BaseDataVariableType, HasComponent, string)
--- ExampleName (BaseDataVariableType, HasComponent, string)

The Problem is that when browsing with UaExpert there is always just shown the top level of the structure (Example and ExampleDescription), but I can see the other Variables in the C++ Code. When I build up the structure without the Example (Folder) I can see the ExampleID, ExampleRole, ExampleName variables! But since I want to implement further levels, this is not sufficient.
Do you have an advice? Is there another approach e.g. building up a new VariableType or DataType?

Thank you for your advice!

AGO
Full Member
Full Member
Posts: 8
Joined: 01 Jun 2016, 08:22

Re: Ua Expert:has component variable structure only on top l

Post by AGO »

In the meantime I found the Structure ServerStatusDataType where there is exactly implemented what I am trying to do with my individual "Example":

Structure
-ServerStatusDataType
--StartTime
--CurrentTime
--State
--BuildInfo
---ProductUri
---ManufacturingName
---ProductName
---SoftwareVersion
---BuildNumber
---BuildDate
--SecondsTillShutdown
--ShutdownReason

So I built up a new Structure "ExampleType" which has about 4-5 levels. For each level it is necessary to build up a new "Structure" and to select it as Type for the upper level Child. For all Structures I selected "AddVariableType".
The next step was to add a new ObjectType and add a childvariable with the type "ExampleType". Now I can see my individual structure in UaModeler.

Is this the right approach? The aim is to extract the elements from a xml file and to map the data into the variables so that a user can monitor the values in UaExpert.

Thank you very much in advance!

AGO
Full Member
Full Member
Posts: 8
Joined: 01 Jun 2016, 08:22

Re: Ua Expert:has component variable structure only on top l

Post by AGO »

So in the last days I tried another approach to implement my information model. I used objects to group the variables.

I derived an "ExampleType" from the BaseObjectType and added 3 variables as children as well as one Object "ExampleDescription". I chose a self modelled Type ("ExampleDescriptionType") for the Object "ExampleDescription". "ExampleDescriptionType" has further child variables as well as another Object with an individual ObjectType, which I used to group more variables and so on.

I compiled the code and managed to start the server. What happens reminds me of my old problem:
I can only see the structure from top (Example) until ExampleDescription with the variables, but not the Object to group further variables.

I think it has to do something with the modelling rules, since the Object, which is not displayed, is an optional placeholder. The thing is that I choose the optional fields and optional placeholder fields in UaModeler so that every option is displayed in Modeler but not in Expert.

Can you please comment it?
Thank you very much!

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

Re: Ua Expert:has component variable structure only on top l

Post by Support Team »

This is the right approach for modelling complex types and using generated code.
Best regards
Unified Automation Support Team

Post Reply