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 data type without reading node

More
23 Jul 2019 19:25 - 23 Jul 2019 19:25 #7558 by support
There is no such notion as "canonical data type" in OPC UA. There is just a data type. Maybe you can explain what you are trying to achieve.

Each node has many attributes (there are about 20 or so of them), and they are mostly static in nature. Only the Value attribute, which is the actual value, has more dynamic nature. For most servers, reading any attribute other than Value simply means providing an in-memory value. Reading the DataType attribute is *the* method to obtain the data type in OPC UA.

This has nothing to do with "the library", i.e. whether you are using QuickOPC or something else. It is how OPC UA is specified.

Of course, in order for the reading to be effective with many nodes, you have to stay away from reading them one by one - you need to put more of them into a ReadMultipleValues call.

Best regards
Last edit: 23 Jul 2019 19:25 by support.

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

More
23 Jul 2019 16:23 #7557 by gtan14
I believe what I'm looking for is the canonical data type. Can this be found using this library and without reading the actual node?

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

More
23 Jul 2019 15:47 #7555 by gtan14
Using this method actually reads the node though right? I don't want to read the node as I am listing all the available nodes, and trying to get the data type from all of them. Reading all those nodes would not be good for the server. Is there a way to do it without actually reading the node?

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

More
23 Jul 2019 15:39 #7554 by support
You can read the DataType attribute the node: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...%20of%20a%20single%20node.html .

The returned value is a Node ID, which can corresponding to some of the "standard" types in the OPC UA specification (usually), or to a custom type.

The "standard" types are in UADataTypeIds class.

Best regards

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

More
23 Jul 2019 15:31 #7553 by gtan14
Is there a way to get the data type of a node without actually reading it? OPCDA has a method GetPropertyValue that seems to achieve this. Is there something similar for OPCUA?

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

Moderators: support
Time to create page: 0.055 seconds