Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Getting OPC_UA variable type definition

More
03 Nov 2016 19:23 #4538 by support
QuickOPC gives access to everything you can read or browse for in the OPC UA address space - it's just a question of 1) whether the information you are looking for is there, and 2) knowing where it is...

The picture you have shown is of the UA nodeset file on the server side. I think (but I am not 100% sure) that the Aliases might be primarily just for internal use in the nodeset (so that entities can refer themselves).

It is, however, possible that the server has used either the alias, or something similar, in the description string of the type. Have you tried to read the Description attribute of the type definition node?

Regards

Please Log in or Create an account to join the conversation.

More
03 Nov 2016 09:02 #4535 by bmts
Names as "NameAsString, AsBool..."are only for testing and In next use will not say nothig about variable type.

Idea is a create C#-classes that are the same as structures in PLC. Therefore I need to find out data-types in PLC,

So I expect to get a Member or Method that retuns an c# object/class ...

In Siemens IDE I find posibility to generate opc.xml file where i fond, that Identifier 3014 stand for "String"

It is posible read this Aliases by your EasyOpcClient?

www.opclabs.com/forum/ua-discovery-browsing/2005-getting-opc...le-type-definition/reply/4527#
Attachments:

Please Log in or Create an account to join the conversation.

More
02 Nov 2016 14:01 #4527 by support
The TypeDefinition is indeed the Node ID of the type.
And, I would kind of expect that by browsing from there, you should be able to find the members of the type.

But, *what leads you to believe that you should see some more members*? I do not know what you expect, but to me it looks like that the actual type might be kind of atomic (because the variable name ends with "NameAsString"), and isn't it therefore correct that it has no further members?

Please Log in or Create an account to join the conversation.

More
02 Nov 2016 11:16 #4523 by bmts
Hello, I try to create c# Classes browsing OpcUa server on Siemens-Plc.

I have in plc Datatype (is a structure) "UDT_Complex" which contain this items: {NameAsString, AsBool, AsInt, AsDWord ...}.
I am able to list all type nodes (items in structre) by method "EasyUAClient.BrowseDataNodes()",
but I dont know which property in node describes the type that I need to create on C# side, or which method return it.

As You can see on the image Node property "TypeDefinition" containg other Uri ... and if I use this Uri in method "EasyUAClient.BrowseDataNodes()" it return empty node ...

So how to get data type for this value?


Attachments:

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.203 seconds