Skip to content

WriteMask and UserWriteMask not compiling correctly #204

@herrmannultraschall-jsl

Description

Hi UA-ModelCompiler Team,
I have a problem compiling the WriteMask and UserWriteMask from OPC model design xml to nodeSet2.xml. According to UA Attributes.xml, it is allowed to set these two attributes to control the write access of the DisplayName and Description of a node.

From UA Attributes.xml:

<opc:Constant Name="WriteMask">
   <opc:Documentation>Indicates which attributes are writable.</opc:Documentation>
</opc:Constant>
<opc:Constant Name="UserWriteMask">
   <opc:Documentation>Indicates which attributes are writable by the current user.</opc:Documentation>
</opc:Constant>

When I try to give write access to the attributes DisplayName and Description in my OPC model design xml file like so:

<opc:Object WriteAccess="96" SymbolicName="quantum:Weldprogram3" TypeDefinition="quantum:WeldprogramType">

or like so

<opc:Object SymbolicName="quantum:Weldprogram3" TypeDefinition="quantum:WeldprogramType">
   <opc:BrowseName>Weldprogram3</opc:BrowseName>
   <opc:DisplayName>Custom Weldprogram 03</opc:DisplayName>
   <opc:Description>Weldprogram number 3.</opc:Description>
   <opc:WriteMask>96</opc:WriteMask>
   <opc:UserWriteMask>96</opc:UserWriteMask>

I end up getting no equivalent tag in the compiled nodeSet2.xml file (as if the model compiler could not compile it and just "swallows it").

What I am expecting is, that by setting the WriteMask and/or the UserWriteMask, one or both are compiled correctly into this:

  <UAObject NodeId="ns=8;i=46819" BrowseName="8:UltrasonicStack3">
    <DisplayName>Custom Ultrasonic Stack 03</DisplayName>
    <Description>Ultrasonic Stack number 3.</Description>
    <WriteMask>96</WriteMask>
    <UserWriteMask>96</UserWriteMask>

If I set <WriteMask>96</WriteMask> and <UserWriteMask>96</UserWriteMask> directly into the compiled nodeSet2.xml it all works fine. Our OPC server reads it correctly and the attributes are writable (checked with the tool UA Expert: UA Expert)

Conclusion
So for me, there is a compilation error in the ModelCompiler or a wrong input on my side.

Please correct me if I am wrong with my input and close the issue, otherwise please fix the bug.

Additional Information
In our production code we now have a workaround implemented that patches nodes inside nodeSet2.xml with the WriteMask and UserWriteMask where we want the DisplayName and Description to be writable. We are pretty unhappy with that solution. I hope you can help the situation.

Looking forward to hearing from you. Thank you very much in advance.
Regards,
Johannes Stoll (Herrmann Ultrasonics Germany)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions