Why UaExpert can't recognize defined structure datatype?

Questions regarding the use of the UaExpert.

Moderator: uaexpert

Post Reply
guolin
Hero Member
Hero Member
Posts: 24
Joined: 10 Jul 2014, 10:49

Why UaExpert can't recognize defined structure datatype?

Post by guolin »

Hello,

My UaExpert is Version 1.3.0.201.

I created a structure datatype as following in xml based UANodeSet. An variable has a component which has this datatype.

<UADataType NodeId="ns=1;i=3003" BrowseName="1:ODOMETER">
<DisplayName>ODOMETER</DisplayName>
<References>
<Reference ReferenceType="HasEncoding">ns=1;i=5009</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5017</Reference>
<Reference ReferenceType="HasSubtype" IsForward="false">i=22</Reference>
</References>
<Definition Name="1:ODOMETER">
<Field DataType="UInt16" Name="ODOMETER_1"/>
<Field DataType="UInt16" Name="ODOMETER_2"/>
<Field DataType="UInt16" Name="ODOMETER_3"/>
<Field DataType="UInt16" Name="ODOMETER_4"/>
<Field DataType="UInt16" Name="ODOMETER_5"/>
</Definition>
</UADataType>



When I draw the valuable to the Data Access View, the DataType shows "NULL"". When I draw ServerStatus which has ServerStatusDatatype , it can showed structured datatype correclty.

What are the possible reason if structure datatype can't be showed ?

Thanks!

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

Re: Why UaExpert can't recognize defined structure datatype?

Post by Support Team »

Hi Guolin,

There are several reason why UaExpert cannot display the structrued value.
1) One reason can be that the Variable does have a NULL value. Please make sure that the Variable has a value of the structured DataType. If you are using the XML importer of the C++ SDK, the structured values of the NodeSet2.xml file are skipped by the importer.

2) Another reason could be that the dictionary and the encoding nodes are not valid. There must be a HasEncoding reference from the DataType to node with BrowseName "Default Binary" and TypeDefinition DataTypeEncodingType. This node must have a HasDescription reference to a node with TypeDefinition DataTypeDescriptionType. The value of this node is the node of the DataType within the dictionary. The dictionary is a node below the "OPC Binary" node.

If the server addressspace is created with UaModeler, the addressspace and the dictionary should be correct.

Best Regards
Support Team

guolin
Hero Member
Hero Member
Posts: 24
Joined: 10 Jul 2014, 10:49

Re: Why UaExpert can't recognize defined structure datatype?

Post by guolin »

Thanks! It seems that the reason is the structured node has not value.

What is the format to set the values in XML? Any documents defines this ?

Post Reply