Referencing or copy of type-definition across multiple nodesets?|OPC UA Standard|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
Referencing or copy of type-definition across multiple nodesets?
Avatar
Patrick Berger
Member
Members
Forum Posts: 13
Member Since:
02/22/2022
sp_UserOfflineSmall Offline
1
06/04/2025 - 01:00
sp_Permalink sp_Print

Hi all

I’m struggeling with working on and with NodeSets created by different tools. What is the core idea or specification. I didn’t found anything regarding this topic: Most implementations are using other nodesets. Also companion specifications are referencing them. This leads to a hirarchy of nodesets.

What should happen if I create a new type/object/variable, that uses some “predefined” element in an other nodeset?
Based on my experience the tools are handling this in different ways – so every consuming tool must be able to deal with all of this variants? Is there something defined?
As example the export output from SIOME, if I create a new object type in a custom nodeset (namespace index 1), that uses machienry job-management:
 
<!– Machinery JobMng in custom type (namespace 1)–>
<UAObject NodeId=”ns=1;i=5066″ BrowseName=”5:JobOrderControl” ParentNodeId=”ns=1;i=5064″>
    <DisplayName>JobOrderControl</DisplayName>
    <References>
        <Reference ReferenceType=”HasTypeDefinition”>ns=4;i=1002</Reference>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
 
        <!– Current project namespace: overwrite optional methods to mandatory, so this is as expected –>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7000</Reference> <!– Example: Cancel-Method –>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7001</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7002</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7003</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7007</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7013</Reference>
 
        <!– Machinery Jobs NodeSet (not exactly expected, but ok) –>
        <ReferenceReferenceType=”HasComponent”>ns=5;i=6008</Reference>
        <Reference ReferenceType=”HasComponent”>ns=5;i=6007</Reference>
        <Reference ReferenceType=”HasComponent”>ns=5;i=6006</Reference>
        <Reference ReferenceType=”HasProperty”>ns=5;i=6005</Reference>
        <Reference ReferenceType=”HasComponent”>ns=5;i=6004</Reference>
        <Reference ReferenceType=”HasComponent”>ns=5;i=6003</Reference>
        <Reference ReferenceType=”HasComponent”>ns=5;i=6002</Reference>
        <Reference ReferenceType=”HasComponent”>ns=5;i=6001</Reference>
        <Reference ReferenceType=”HasComponent”>ns=5;i=6009</Reference>
    </References>
</UAObject>
 
<!– Example: Cancel-Method –>
<UAMethod NodeId=”ns=1;i=7000″ BrowseName=”4:Cancel” ParentNodeId=”ns=1;i=5066″>
    <DisplayName>Cancel</DisplayName>
    <References>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference> <!– ModellingRule_Mandatory –>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6006</Reference>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6007</Reference>
    </References>
</UAMethod>
 
<!– Example: referenced to machinery job nodeset and defined there –>
<UAVariable NodeId=”ns=1;i=6009″ BrowseName=”CurrentState” ParentNodeId=”ns=1;i=5001″ DataType=”LocalizedText”>
    <DisplayName>CurrentState</DisplayName>
    <References>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
        <Reference ReferenceType=”HasTypeDefinition”>i=2760</Reference>
        <Reference ReferenceType=”HasComponent” IsForward=”false”>ns=1;i=5001</Reference>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6010</Reference>
    </References>
</UAVariable>

 

On the other side, UAModeler creates a different output:

<!– UAModeler cloned/copy –>
<UAObject NodeId=”ns=1;i=5066″ BrowseName=”5:JobOrderControl” ParentNodeId=”ns=1;i=5064″>
    <DisplayName>JobOrderControl</DisplayName>
    <References>
        <Reference ReferenceType=”HasTypeDefinition”>ns=4;i=1002</Reference>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
       
        <!– Current project namespace: everything copied without considering of modificaitons (or not) –>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7000</Reference> <!– Example: Cancel-Method –>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7001</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7002</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7003</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7007</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7013</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6023</Reference> <!– Example: CurrentState –>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6033</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6035</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6037</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6038</Reference>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6039</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6040</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6045</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6046</Reference>
    </References>
</UAObject>
 
<UAVariable DataType=”LocalizedText” NodeId=”ns=1;i=6023″ BrowseName=”CurrentState” ParentNodeId=”ns=1;i=5066″>
    <DisplayName>CurrentState</DisplayName>
    <References>
        <Reference ReferenceType=”HasTypeDefinition”>i=2760</Reference>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
        <Reference ReferenceType=”HasProperty”>ns=5;i=6010</Reference>
    </References>
</UAVariable>
 
<UAMethod NodeId=”ns=1;i=7000″ BrowseName=”4:Cancel” ParentNodeId=”ns=1;i=5066″>
    <DisplayName>Cancel</DisplayName>
    <References>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference> <!– ModellingRule_Mandatory –>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6006</Reference>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6007</Reference>
    </References>
</UAMethod>
 
<!– 5: Machinery Jobs NodeSet (copy concept, because created by UAModeler) –>
<UAVariable NodeId=”ns=1;i=6009″ BrowseName=”CurrentState” ParentNodeId=”ns=1;i=5001″ DataType=”LocalizedText”>
    <DisplayName>CurrentState</DisplayName>
    <References>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
        <Reference ReferenceType=”HasTypeDefinition”>i=2760</Reference>
        <Reference ReferenceType=”HasComponent” IsForward=”false”>ns=1;i=5001</Reference>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6010</Reference>
    </References>
</UAVariable>
 
<UAObject NodeId=”ns=1;i=5001″ BrowseName=”1:JobOrderControl” ParentNodeId=”ns=1;i=1003″>
    <DisplayName>JobOrderControl</DisplayName>
    <References>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
        <Reference ReferenceType=”HasTypeDefinition”>ns=2;i=1002</Reference>    <!– ISA95 JobControl V2 NodeSet–>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6009</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6001</Reference>
        <Reference ReferenceType=”HasComponent” IsForward=”false”>ns=1;i=1003</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6002</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6003</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6004</Reference>
        <Reference ReferenceType=”HasProperty”>ns=1;i=6005</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6006</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6007</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=6008</Reference>
    </References>
</UAObject>
 
<!– ISA95 JobControl V2 NodeSet –>
<UAObjectType NodeId=”ns=1;i=1002″ BrowseName=”1:ISA95JobOrderReceiverObjectType”>
    <DisplayName>ISA95JobOrderReceiverObjectType</DisplayName>
    <Description>The OPENSCSJobOrderReciverObjectType contains a method to receive job order commands and optional definitions of allowable job order information</Description>
    <Category>ISA-95 Job Order Receiver V2</Category>
    <References>
        <!– … –>
    </References>
</UAObjectType>
 
This leads to a bunch of type definition copies accross mulitple nodesets without added value with all its consequences.
 
What I expect (and this is in general what SIOME does, especially if I resolve all vallidation issues ‘unnecessary overridden’ across all nodesets) is using references and add just “modifications” in the new nodeset.
 
<!– custom NodeSet–>
<UAObject NodeId=”ns=1;i=5066″ BrowseName=”5:JobOrderControl” ParentNodeId=”ns=1;i=5064″>
    <DisplayName>JobOrderControl</DisplayName>
    <References>
        <Reference ReferenceType=”HasTypeDefinition”>ns=4;i=1002</Reference>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
       
        <!– Current project namespace: overwrite optional methods to mandatory –>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7000</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7001</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7002</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7003</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7007</Reference>
        <Reference ReferenceType=”HasComponent”>ns=1;i=7013</Reference>
        <Reference ReferenceType=”HasComponent”>i=2772</Reference>
       
        <!– based on removing all clones in custom nodeset and machinery job: referencing directly to ISA95 NodeSet (machinery doesn’t add any modifications)–>
        <Reference ReferenceType=”HasComponent”>ns=4;i=6037</Reference>
        <Reference ReferenceType=”HasComponent”>ns=4;i=6033</Reference>
        <Reference ReferenceType=”HasComponent”>ns=4;i=6035</Reference>
        <Reference ReferenceType=”HasComponent”>ns=4;i=6036</Reference>
        <Reference ReferenceType=”HasProperty”>ns=4;i=6088</Reference>
        <Reference ReferenceType=”HasComponent”>ns=4;i=6039</Reference>
        <Reference ReferenceType=”HasComponent”>ns=4;i=6038</Reference>
        <Reference ReferenceType=”HasComponent”>ns=4;i=6034</Reference>
    </References>
</UAObject>
 
<!– Machinery Job NodeSet (optimized by SIOME)–>
<UAObject NodeId=”ns=2;i=5001″ BrowseName=”2:JobOrderControl” ParentNodeId=”ns=2;i=1003″>
    <DisplayName>JobOrderControl</DisplayName>
    <References>
        <Reference ReferenceType=”HasModellingRule”>i=78</Reference>
        <Reference ReferenceType=”HasTypeDefinition”>ns=1;i=1002</Reference> <!– ISA95 NodeSet –>
        <Reference ReferenceType=”HasComponent”>i=2772</Reference>
    </References>
</UAObject>
 
<!– No definition of any attribute (e.g. CurrentState), because already defined in ns=1;i=1002 –>
<!– ISA95 JobControl V2 NodeSet –>
<UAObjectType NodeId=”ns=1;i=1002″ BrowseName=”1:ISA95JobOrderReceiverObjectType”>
    <DisplayName>ISA95JobOrderReceiverObjectType</DisplayName>
    <Description>The OPENSCSJobOrderReciverObjectType contains a method to receive job order commands and optional definitions of allowable job order information</Description>
    <Category>ISA-95 Job Order Receiver V2</Category>
    <References>
        <!– … –>
    </References>
</UAObjectType>
 
=> Machinery Job-Management is cleaned up an adds just the new JobOrderControl type
=> Custom NodeSet references therefore directly to ISA95 for the type definition and contains only real overridden things.
 
A UANodeSet is expected to contain many UANodes which reference each other.
Tools that create UANodeSets should not add Reference elements for both directions in order to minimize the size of the XML file.
I think there is some sort of a concept break:
– forwart/backward references are compressed to get a minimized file
– all standard things fromt the core UA-Nodeset are always referenced and not copied
– referencing other nodesets and still copy content – then why not use just one big nodeset containing all used definitions? Then any tool would always work with just one file.
So my question is: which tool creates the correct and where is this defined (propably something related to the InstanceDeclaration)? And if there is a missing definition regarding this, shouldn’t this be clarified? Because all tools are using the nodesets and same input should create same output.
 

Best regards

Patrick

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