Default values for complex datatypes in model design file|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
Default values for complex datatypes in model design file
Avatar
Fahad Golra
Member
Members
Forum Posts: 3
Member Since:
11/07/2019
sp_UserOfflineSmall Offline
1
07/11/2022 - 08:03
sp_Permalink sp_Print

How to give default values for variable nodes with complex data types.  For example, how to give a default value for a property of Range type, where it has two values, one for low and one for high.  I tried the following, but it doesn’t work with the model compiler. 

<Property SymbolicName=”mymodel:EURange” TypeDefinition=”ua:PropertyType” DataType=”ua:Range” ValueRank=”Scalar”>
    <DefaultValue>
        <uax:Range>
            <uax:Low>0</uax:Low>
            <uax:High>60</uax:High>
       </uax:Range>
    </DefaultValue>
</Property>

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
07/11/2022 - 14:29
sp_Permalink sp_Print

You need to add XML encoded structure values. e.g:

<opc:Property SymbolicName=”EngineeringUnits” DataType=”EUInformation” ModellingRule=”Mandatory”>
<opc:DefaultValue>
<uax:ExtensionObject>
<uax:TypeId>
<uax:Identifier>i=888</uax:Identifier>
</uax:TypeId>
<uax:Body>
<uax:EUInformation>
<uax:NamespaceUri>http://www.opcfoundation.org/U…..ri&gt;
<uax:UnitId>4337968</uax:UnitId>
<uax:DisplayName>
<uax:Locale>en</uax:Locale>
<uax:Text>bit/s</uax:Text>
</uax:DisplayName>
<uax:Description>
<uax:Locale>en</uax:Locale>
<uax:Text>bit per second</uax:Text>
</uax:Description>
</uax:EUInformation>
</uax:Body>
</uax:ExtensionObject>
</opc:DefaultValue>
</opc:Property>

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