Model Design Overflow (Architecture Problems)|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Model Design Overflow (Architecture Problems)
Avatar
Ivan Zatarain
New Member
Members
Forum Posts: 1
Member Since:
04/10/2022
sp_UserOfflineSmall Offline
1
05/18/2022 - 05:16
sp_Permalink sp_Print

Hello Everyone:

I have a couple of weeks trying to build a nice model design for a project with the following Architecture:

  • Root (BaseType-FolderType)
    • System1 (BaseType-Machine)
      • Machine (BaseType-Component)
        • MovingUnit (BaseType-FolderType)
          • MovingUnit1 (BaseType-Component)
            • Some Parameters
            • General Component (BaseType-GeneralBase)
              • Some Params
              • GeneralBase (DataType: ua:BaseInterfaceType)
                • Params
        • MovingUnit10
    • System2

My problem is when i compile it using the model compiler from OPCFoundation Model Compiler, My nodeset2.Xml file is over 1MB size....

and i wanted to do the same that I did for moving units for another 4 systems....

This is my first model design so feel free to take a look and please tell me some ideas and solutions.

Some General questions:
Can I use an structure of objects? it compiles but when i connect to the server, the objects are not there.

How can an array of Moving Units for example can be implemented?
Does somebody has a list of the Object, Variable, DataType available BaseTypes? The documentation is too complex and i would like to know what am i allow to use?

I couldn´t attacht my ModelDesign.XML but here is the code

 

################

<?xml version="1.0" encoding="utf-8" ?>
<opc:ModelDesign
xmlns:uax="https://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ua="https://opcfoundation.org/UA/"
xmlns:opc="https://opcfoundation.org/UA/ModelDesign.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://troteclaser.com/TrotecModel"
TargetNamespace="http://testone.com/testmodel"
TargetXmlNamespace="http://testone.com/testmodel"
TargetVersion="I_0.00"
TargetPublicationDate="2022-05-17T00:00:00Z">

<opc:Namespaces>
<opc:Namespace Name="Test" Prefix="testmodel" XmlNamespace="http://testone.com/testmodel/Types.xsd" XmlPrefix="Trotec">http://testone.com/testmodel&l.....ce&gt;
<opc:Namespace Name="OpcUa" Prefix="Opc.Ua" Version="1.04.7" PublicationDate="2020-05-09T00:00:00Z" XmlNamespace="https://opcfoundation.org/UA/2008/02/Types.xsd">https://opcfoundation.org/UA/&l.....ce&gt;
</opc:Namespaces>

<!-- Enums -->
<opc:DataType SymbolicName="StatusEnum" BaseType="ua:Enumeration">
<opc:Fields>
<opc:Field Name="Unknown" Identifier="0"/>
<opc:Field Name="Initializing" Identifier="1"/>
<opc:Field Name="Disconnected" Identifier="2"/>
<opc:Field Name="Idle" Identifier="3"/>
<opc:Field Name="Error" Identifier="4"/>
<opc:Field Name="Busy" Identifier="5"/>
<opc:Field Name="Paused" Identifier="6"/>
</opc:Fields>
</opc:DataType>
<opc:DataType SymbolicName="SeverityEnum" BaseType="ua:Enumeration">
<opc:Fields>
<opc:Field Name="Unknown" Identifier="0"/>
<opc:Field Name="Informational" Identifier="1"/>
<opc:Field Name="Paused" Identifier="2"/>
<opc:Field Name="Stop" Identifier="3"/>
<opc:Field Name="Abort" Identifier="4"/>
</opc:Fields>
</opc:DataType>

<!--BaseTypes -->
<opc:ObjectType SymbolicName="StatusType" BaseType="ua:BaseObjectType" ExposesItsChildren="true">
<opc:Children>
<opc:Variable SymbolicName="Code" DataType="StatusEnum" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="TimestampTrigger" DataType="ua:DateTime" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="ConfigurationType" BaseType="ua:BaseObjectType" ExposesItsChildren="true">
<opc:Children>
<opc:Variable SymbolicName="Version" DataType="ua:String" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="ID" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="LoadConfiguration" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="ConfigFilePath" DataType="ua:String" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="ErrorType" DataType="ua:ExtensionObject" ExposesItsChildren="true">
<opc:Children>
<opc:Variable SymbolicName="Code" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Severity" DataType="SeverityEnum" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Timestamp" DataType="ua:DateTime" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>
<!--<opc:ObjectType SymbolicName="ErrorsType" TypeDefinition="OpcUa:BaseObjectType" ExposesItsChildren="true">
<opc:Description>Error of a machine element.</opc:Description>
<opc:Children>
<opc:Object SymbolicName="Error01" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error02" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error03" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error04" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error05" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error06" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error07" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error08" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error09" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error10" TypeDefinition="ErrorType"/>
<opc:Variable SymbolicName="TimestampTrigger" DataType="ua:DateTime" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="AcknowledgeError" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>-->
<opc:ObjectType SymbolicName="ErrorsType" BaseType="ua:BaseObjectType">
<opc:Description>Error of a machine element.</opc:Description>
<opc:Children>
<opc:Object SymbolicName="Error01" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error02" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error03" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error04" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error05" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error06" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error07" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error08" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error09" TypeDefinition="ErrorType"/>
<opc:Object SymbolicName="Error10" TypeDefinition="ErrorType"/>
<opc:Variable SymbolicName="TimestampTrigger" DataType="ua:DateTime" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="AcknowledgeError" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="GenericBaseType" DataType="ua:BaseInterfaceType">
<opc:Description>Base type for machines and components.</opc:Description>
<opc:Children>
<opc:Object SymbolicName="Status" TypeDefinition="StatusType"/>
<opc:Object SymbolicName="Error" TypeDefinition="ErrorsType"/>
<opc:Object SymbolicName="Configuration" TypeDefinition="ConfigurationType"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="ComponentType" BaseType="GenericBaseType">
<opc:Description>Base type for components.</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="Name" DataType="ua:String" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Description" DataType="ua:String" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Index" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="UID" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Enabled" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
<opc:Method SymbolicName="Enable" TypeDefinition="EnableMethodType"/>
<opc:Method SymbolicName="Disable" TypeDefinition="DisableMethodType"/>
</opc:Children>
</opc:ObjectType>

<!--Machine Unit-->
<opc:ObjectType SymbolicName="MovingUnitType" BaseType="ComponentType">
<opc:Description>Represents the data structure for a MovingUnit.</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="IsMoving" DataType="ua:Boolean" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="InPosition" DataType="ua:Boolean" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="IsReferenced" DataType="ua:Boolean" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="CurrentPosition" DataType="ua:Double" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="OffsetZeroPosition" DataType="ua:Double" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="PositionLimits" DataType="ua:Boolean" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="NegativeLimit" DataType="ua:Double" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="PositiveLimit" DataType="ua:Double" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="JogVelocity" DataType="ua:Double" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="OperationVelocity" DataType="ua:Double" SupportsEvents="true" ExposesItsChildren="true" AccessLevel="ReadWrite"/>
<opc:Method SymbolicName="MoveAbsolute" TypeDefinition="MoveAbsoluteMethodType"/>
<opc:Method SymbolicName="MoveRelative" TypeDefinition="MoveRelativeMethodType"/>
<opc:Method SymbolicName="StartReference" TypeDefinition="StartReferenceMethodType"/>
<opc:Method SymbolicName="StopMoving" TypeDefinition="StopMovingMethodType"/>
<opc:Method SymbolicName="JogPositive" TypeDefinition="JogMethodType"/>
<opc:Method SymbolicName="JogNegative" TypeDefinition="JogMethodType"/>
<opc:Method SymbolicName="MoveToHomePosition" TypeDefinition="MoveToHomePositionMethodType"/>
<opc:Method SymbolicName="MoveToWorkPosition" TypeDefinition="MoveToWorkPositionMethodType"/>
<opc:Object SymbolicName="HomePosition" TypeDefinition="InputType"/>
<opc:Object SymbolicName="WorkPosition" TypeDefinition="InputType"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="ExhaustType" BaseType="ComponentType">
<opc:Description>Represents the data structure for a Exhaust systems.</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="StartupTime" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="ShutdownTime" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Method SymbolicName="StartExhaust" TypeDefinition="StartExhaustMethodType"/>
<opc:Method SymbolicName="StopExhaust" TypeDefinition="StopExhaustMethodType"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="LaserSystemType" BaseType="ComponentType">
<opc:Description>Represents the data structure for a LaserSystem.</opc:Description>
<opc:Children>
<opc:Object SymbolicName="LaserSource" TypeDefinition="ComponentType"/>
<opc:Object SymbolicName="PilotLaser" TypeDefinition="OutputType"/>
<opc:Object SymbolicName="FocusLaser" TypeDefinition="OutputType"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="MachineLayerType" BaseType="ComponentType">
<opc:Children>
<opc:Variable SymbolicName="HeartBeat" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="ErrorOccured" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Acknowledge" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>
<!--Inputs & Outputs-->
<opc:ObjectType SymbolicName="InputType" DataType="ua:ExtensionObject" ExposesItsChildren="true">
<opc:Description>Represents the data of a mapped hardware input</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="Name" DataType="ua:String" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Description" DataType="ua:String" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Index" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="DebounceTime" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Value" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="IsInverted" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>
<opc:ObjectType SymbolicName="OutputType" DataType="ua:ExtensionObject" ExposesItsChildren="true">
<opc:Description>Represents the data of a mapped hardware output</opc:Description>
<opc:Children>
<opc:Variable SymbolicName="Name" DataType="ua:String" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Description" DataType="ua:String" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Index" DataType="ua:UInt32" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="SetValue" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="Value" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
<opc:Variable SymbolicName="IsInverted" DataType="ua:Boolean" AccessLevel="ReadWrite"/>
</opc:Children>
</opc:ObjectType>

<!--Units container-->
<opc:DataType SymbolicName="StructMovingUnits" BaseType="ua:Structure" ExposesItsChildren="true">
<opc:Fields>
<opc:Field Name="MovingUnit01" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit02" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit03" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit04" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit05" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit06" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit07" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit08" TypeDefinition="MovingUnitType" />
<opc:Field Name="MovingUnit09" TypeDefinition="MovingUnitType" />
</opc:Fields>
</opc:DataType>
<!--Variable-->
<VariableType SymbolicName="StructMovingUnitsType" DataType="StructMovingUnits" BaseType="ua:BaseDataVariableType" ValueRank="0" ExposesItsChildren="true">
<Description>testtesttest</Description>
<Children>
<Variable SymbolicName="MU01" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
<Variable SymbolicName="MU02" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
<Variable SymbolicName="MU03" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
<Variable SymbolicName="MU04" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
<Variable SymbolicName="MU05" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
<Variable SymbolicName="MU06" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
<Variable SymbolicName="MU07" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
<Variable SymbolicName="MU08" TypeDefinition="MovingUnitType" ModellingRule="Mandatory"/>
</Children>
</VariableType>

<opc:ObjectType SymbolicName="MovingUnitsType" BaseType="ua:FolderType">
<opc:Description>Container for MovingUnitType instances</opc:Description>
<opc:Children>
<opc:Object SymbolicName="MovingUnit01" TypeDefinition="MovingUnitType"/>
<opc:Object SymbolicName="MovingUnit02" TypeDefinition="MovingUnitType"/>
<opc:Object SymbolicName="MovingUnit03" TypeDefinition="MovingUnitType"/>
<opc:Object SymbolicName="MovingUnit04" TypeDefinition="MovingUnitType"/>
<opc:Object SymbolicName="MovingUnit05" TypeDefinition="MovingUnitType"/>
<opc:Object SymbolicName="MovingUnit06" TypeDefinition="MovingUnitType"/>
<opc:Object SymbolicName="MovingUnit07" TypeDefinition="MovingUnitType"/>
<opc:Object SymbolicName="MovingUnit08" TypeDefinition="MovingUnitType"/>
<opc:Variable SymbolicName="MovingUnit09" DataType="StructMovingUnits"/>
</opc:Children>
</opc:ObjectType>

<!--Methods-->
<opc:Method SymbolicName="EnableMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="DisableMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="JogMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="StartReferenceMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="StopMovingMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="MoveAbsoluteMethodType">
<opc:InputArguments>
<opc:Argument Name="AbsoluteTargetPosition" DataType="ua:Double"/>
</opc:InputArguments>
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="MoveRelativeMethodType">
<opc:InputArguments>
<opc:Argument Name="RelativeTargetPosition" DataType="ua:Double"/>
</opc:InputArguments>
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="StartExhaustMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="StopExhaustMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="StartProcessMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="EndProcessMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="AbortProcessMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="MoveToHomePositionMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>
<opc:Method SymbolicName="MoveToWorkPositionMethodType">
<opc:OutputArguments>
<opc:Argument Name="Result" DataType="ua:Boolean"/>
</opc:OutputArguments>
</opc:Method>

<!--Root-->
<opc:ObjectType SymbolicName="System" BaseType="ua:FolderType">
<opc:Description>.</opc:Description>
<opc:Children>
<opc:Object SymbolicName="TestRoot" TypeDefinition="MovingUnitsType"/>
</opc:Children>
</opc:ObjectType>
</opc:ModelDesign>

###############

I hope somebody can help me.

BR.

Alebrije

Avatar
Randy Armstrong
Admin
Forum Posts: 1450
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/18/2022 - 20:02
sp_Permalink sp_Print

The NodeSet is primarily used for defining types. If you use it for instances you will get huge files. 

The nodes you defined need to be linked to a well known node such as the Objects node.

If they are not linked they will not appear.

You can look at this example to illustrate how to add model design defined instances into the server address space:

https://github.com/OPCFoundati.....ler/Server

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 21
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1348
Posts: 4575