Mapping OPC-UA Variable to Asset Property unclear

0

Dear Community and Support,

I am trying to map a Variable (Double) from an OPC-UA Server to an asset property of type measurement.

According to the swCollector.log my gateway on a Raspberry PI successfully connects to the server and traversed the nodeset. But somehow it does not write any values to the stream. Probably because I assigned the wrong "data stream path" to my property-alias.

To give an example:

The publicly available OPC-UA Server at opc.tcp://milo.digitalpetri.com:62541/milo has the following structure:

Root
|--- Objects
|--- ..
|--- Dynamic
|--- ..
|--- RandomDouble

I am trying to map the Random Double with the OPC-UA NodeID "ns=2;s=Dynamic/RandomDouble" to a measurement property in my asset.

However, I don't understand, what is meant by the "OPC-UA data streams", which I am supposed to map to my property-alias.

Having "/Objects/Dynamic/" as my Base-Node for the gateway, I tried the aliases "/Objects/Dynamic/RandomDouble", "RandomDouble" and the Node-ID "ns=2;s=Dynamic/RandomDouble". All without success.

Please provide clarification on how to extract the OPC-UA data stream path from a server in general and specify the correct path for my example case.

Cheers,

Willy

opcwill
asked 4 years ago377 views
3 Answers
0

Hi Willy,

We had a chance to play around with the OPC-UA server you linked. I think there are two things that are going on:

  1. The server has a “Turtle” node structure that is a recursive structure which will lead the gateway to keep browsing the folder in a loop. This seems to be specific to this OPC-UA server.
  2. The combination of data stream prefix, Node ID and property alias seem to not match.

Here are a couple combinations that worked for us:

With Prefix:
Data stream prefix: digitalpetri
Alias: digitalpetri/Dynamic/RandomDouble
Node Filter Rules: /Dynamic/*

W/o Prefix:
Data stream prefix: <blank>
Alias: /Dynamic/RandomDouble
Node Filter Rules: /Dynamic/*

You can also specify the actual browse path component of the NodeId with the forward slash prepended, instead of using a wild card. In this case it would be "/Dynamic/RandomDouble".

"Please provide clarification on how to extract the OPC-UA data stream path from a server in general and specify the correct path for my example case."
The best way to extract the path from the server is by looking at the node Id. In your case, s=Dynamic/RandomDouble tells you the path.

Please note that:

  1. We recommend having prefixes, in case you may have multiple OPC-UA servers with similar browse paths.
  2. "Objects" as seen in the browse tree is not part of the browse path.
  3. We prepend the data prefix, if one is defined, and the forward slash to the browse path of the NodeId.

Hope that helps,
Santosh

Edited by: Santosh@AWS on May 14, 2020 12:57 PM

answered 4 years ago
0

Hi Santosh,

thank you for your thorough and helpful reply.

I successfully connected to the server with your given property-aliases/browse-paths and was able to replicate the method for a different, locally hosted OPC-UA server.

Especially the hint that "Objects" is not part of the browse-path was valuable. As it seems this is always the case. I would therefore recommend including this information in the docs.

The notion that "Objects" can / has to be omitted in the browse path implies that the querying of the server is limited to Nodes in the "root/Objects" Folder. Imho this is a reasonable restriction, as the other two OPC-UA default folders under root ("root/Types" and "root/Views") are probably of little use for many IIoT applications in the cloud.
I have not checked if this restriction applies (='root/types' and 'root/Views' not accessible from AWS), but if this is indeed an assumption/ a restriction than this should also be included in the docs, if not already done so.

Thanks again and Regards,

Willy

opcwill
answered 4 years ago
0

Hi Willy,

Thank you for the feedback. I'm glad you were able to get it working.

I successfully connected to the server with your given property-aliases/browse-paths and was able to replicate the method for a different, locally hosted OPC-UA server.
SK: Yes, agreed, we will add this to the docs.

The notion that "Objects" can / has to be omitted in the browse path implies that the querying of the server is limited to Nodes in the "root/Objects" Folder. Imho this is a reasonable restriction, as the other two OPC-UA default folders under root ("root/Types" and "root/Views") are probably of little use for many IIoT applications in the cloud.
I have not checked if this restriction applies (='root/types' and 'root/Views') not accessible from AWS), but if this is indeed an assumption/ a restriction than this should also be included in the docs, if not already done so.
SK: We will look to adding this clarity in the docs as well. I'll need to verify, but I think we only support object paths at the moment. I understand you have a ticket open with documentation, we'll use that to enhance the docs on this topic.

As a side note, many thanks for the feedback on our docs. We love this as it helps us ensure we are thorough and future customers have the info needed in a self service manner.

Best,
Santosh

Edited by: Santosh@AWS on May 19, 2020 11:23 AM

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions