What is needed for displaying a custom type?

Questions regarding the use of the UaExpert.

Moderator: uaexpert

Post Reply
em3702
Jr. Member
Jr. Member
Posts: 4
Joined: 09 Nov 2018, 11:59

What is needed for displaying a custom type?

Post by em3702 »

Hi all,

I've created that custom data type using a DataTypeDefinition attribute. Expert version is 1.5.0 319 and it is properly showing the definition:

Image

When I now read a variable with that type, I set its NodeId as DataType and encode the variable value as ExtensionObject whose NodeId is again the NodeId of my DataType (ns=4;i=30). The body of the ExtensionObject is encoded with a length of 8 (2 DWORDS), the content is made up from two random values, say 1 and 5.

The data also appears to be transmitted properly to the UA Expert but somehow doesn't get interpreted properly. The value of my variable is shown as **Unknown Extension Object**:

Image

Hence my question: what am I doing wrong? Is there any information missing?

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

Re: What is needed for displaying a custom type?

Post by Support Team »

Hello em3702,

which server are you using? There are a few things to know about the correct creation of the DataTypeDefinition attribute and the encoding nodes in the address space, which are thoroughly described in part 3 of the OPC UA specification, 5.8 DataTypes.
Best regards
Unified Automation Support Team

em3702
Jr. Member
Jr. Member
Posts: 4
Joined: 09 Nov 2018, 11:59

Re: What is needed for displaying a custom type?

Post by em3702 »

Thanks for pointing me to 5.8. I was missing the entire VariableType definition!

After adding it, I can read my value!
Image

Thank you!

Post Reply