cancel
Showing results for 
Search instead for 
Did you mean: 

Node RED OPC-UA Subscription to "Extension Object" fails

Node RED OPC-UA Subscription to "Extension Object" fails

leonberger-m
Established Member

Hello together, 

within Node-RED I try to setup a subscription to an OPC-UA parameter. The datatype of the parameter is offered as "Extension Object".
Within UA-Expert testtool I am able to verify the object and the content of this object. There are 3 parameters defined within the object
- ID
- Name
- Description 

During the test the values are filled with "ID=160" and "Name=Distanzhuelse" ... so they are not empty. 

Example: 
leonbergerm_1-1685099712347.png

If I try to access this object using a NODE-RED flow I either choose the "Data Layer Request" of the "Data Layer Subscription". 
Using the Subscription the operation fails with debug message "DL_FAILED" 

leonbergerm_3-1685100348898.png

Since the "ActiveTool" is the last node I can choose within the data structure I have exactly choosen this option.

leonbergerm_4-1685100405027.png

If I work with READ / BROWSE Request instead, I receive an empty array as result. 

leonbergerm_5-1685100471544.png

leonbergerm_6-1685100495747.png


But it's also not possible to access the parameters "Id", "Name" or "Description" as they are shown in UA Expert before.

Does anyone have an idea how I can access the parameters in this object or why the array is shown as "empty" even if there are currently parameters and values contained? 

Thanks for your support!

 

 

 

 

17 REPLIES 17

CodeShepherd
Community Moderator
Community Moderator

Just to make things clear. You are connected with the ctrlX CORE - OPC UA client to a server on the network. Could you show us how the data looks like in the data layer viewer?

Which path did you enter in the subscription in Node-RED?

A Browse does show you an array of all registered sub nodes. If there is "only" a complex data object, there are no sub nodes registered eventually.

I did some tests subscribing to data objects in the data layer and it works fine see e.g. path framework/bundles:

ctrlX CORE - Node-RED subscrition to data objectctrlX CORE - Node-RED subscrition to data object

There could be a problem with your data type.

Hi everyone!

I've just met with a similar issue. I use in Node-Red the data layer request node and also the data layer subscribe node for reading connected  OPC UA server parameters as an OPC UA Client. When I created the flows everything worked properly (Friday), today (the ctrlX Core was not restarted, was on ) with subscription nodes I get the subscription failed: DL_Failed error while with the data layer request node everything looks ok.  I tried to redeploy the flows and select the reading parameters again to make it work again, but I was unsuccessful. The only solution was to reboot the ctrlX Core, after that the data layer subscribe nodes were working again.  I got this error also for another ctrlX Core...

Can you help me with this? Restarting the ctrlX Core all the time when this error occurs is not a good solution for us, the Cores have to work all the time. 

nickH
Community Moderator
Community Moderator

Hi @arsz

Can you tell me which version of the OPC UA Client app you are using and which version the runtime on the ctrlX CORE has? 

Best regards 

Nick 

Hi Nick!

I am using the 1.18.1 version of OPC UA Client and  v1.18 as runtime on the ctrlX CORE.

Best regards

Aron

nickH
Community Moderator
Community Moderator

Hi Aron, 

there was a known issue with ctrlX OPC UA Client App V1.18. Subscriptions to OPC UA Client nodes did fail after a reconnect to the OPC UA Server was done by the client. So I think you can reproduce this error, if you disconnect and connect the OPC UA Server via the web-ui. 

To solve this, you would need to update to V1.20 of the ctrlX OPC UA Client App. This issue is solved here. 

Regards, 

Nick 

Hi Nick!

Thanks for the help, I will try it.

Aron

leonberger-m
Established Member

After further investigation it seems that an "extension object" is currently not supported by the CtrlX. That's why the values (ID, name, description) are even not shown in the CtrlX Data Layer. 

UAExpert: 

leonbergerm_0-1685621732141.png

Data Layer: 

leonbergerm_1-1685621757430.png

 

 

 

nickH
Community Moderator
Community Moderator

Hi @leonberger-m,

you are using the ctrlX OPC UA Client App, right? (from the initial question I was not sure if you are using the Client or the Pub/Sub App)

I think, the problem is, that you are trying to access a complex data type with the OPC UA Client. I took a look into the documentation of the OPC UA Client App and found a list of the supported data types (link to the docu). I think this might not match with your complex data type. 

Best regards, 

Nick 

leonberger-m
Established Member

Good morning @nickH,

yes that's right. I am using the CtrlX OPC UA Client App. Depending on the documentation it seems that the extension object is currently not on the list of supported data types. 

Maybe in the future there will be a possibility within CtrlX to access these kind of structure. 

Best regards
Markus 
 

Hello @leonberger-m,

I just made a test with my version 1.20 system and it seem to work as you expected.

I connected my ctrlX UA client with a XM42 UA server (MTX system) and I see the structures inside the datalayer like I see them inside the UA-Expert. I tried it with some NC-Data (of the MTX)

NC-Data_UA-Expert.png

NC-Data_DL.png

and a PLC structure.

PLC_UA-Expert.png

PLC_DL.png

The link with the supported data types, Nick mentioned in his last post, refer to method calls. Method calls (right now) only support simple data types as input and output parameters. But this gap will be closed step by step with the next versions.

Best regards

Christian

 

 

kuldeepM
Long-established Member

As discussed, reading the extension object was not possible from already existing node-red features, and to solve this issue, one needs to install the "node-red-contrib-opcua" pallet manually by offline installation. Installation file could be requested from the respective customer representative.

kuldeepM_0-1686575255261.png

 

configuration description could be found at below links:

Video: https://www.youtube.com/watch?v=S4GO63r_8Co&ab_channel=CLMechatronics

Links: https://github.com/mikakaraila/node-red-contrib-opcua

           https://flows.nodered.org/node/node-red-contrib-opcua

           https://github.com/mikakaraila/node-red-contrib-opcua/issues/298

 

Hello @kuldeepM , 

thanks for the information. 
I am wondering why the solution provided by @NoRisk4Project could even work with the CtrlX subscription object? 
In that case it's also an extension object and it seems that the data layer is able to read the content? 

nickH
Community Moderator
Community Moderator

Hello @leonberger-m

I don't know what @kuldeepM is trying to say.

I just tested it together with @NoRisk4Project. We did a subscription to a structure from the OPC UA client in the Data Layer. This worked without an issue. 

MicrosoftTeams-image (6).png

 

We used V1.20 of the ctrlX System Apps and also of all Application Apps (OPC UA Client and Node Red). Maybe this could be the issue for you, can you also try with the newest versions? 

Best regards, 

Nick 

smueller
Established Member

Hi @leonberger-m,

from my point of view it seems that the ActiveToolDataStructure contains two fields (Name, Description) which are from type "LocalizedText". This is not supported in current version. We will support "LocalizedText" in the upcoming Version 2.4 of our OPC UA Apps. Can you please verify that the types of this fields are the assumed "LocalizedText"?

Thanks and regards,

smueller

Hello @smueller ,

thanks for your answer. We are looking for the upcoming version 2.4 - that's great.
Regarding your question. 

For the second issue it seems to be real "localized text" - so should be supported soon:
Forum: Supported data structures - Bosch Shared (boschrexroth.com)
As shown in the screenshot (UA expert output) the data type is "LocalizedText"

leonbergerm_1-1696420404910.png


For the original question of this post the datatype is different. 
It seems to be a kind of array and the data type is named "ActiveToolDataStructure" within UA expert.
When we discussed this issue earlier someone of your colleagues mentioned that this is a former version of the "extension object" what is currently not supported by the released CtrlX version.

But maybe supported soon? Could you also give me some information about this kind of data type? 

leonbergerm_0-1696420389661.png

In the next screen the same parameter is shown when accessing over the CtrlX opcuaclient. 

leonbergerm_2-1696420804218.png

Best regards
Markus 

 

 

Hi @leonberger-m,

for me it looks like that the fields of "Name" and "Description" are also from DataType "LocalizedText". Therefore please read out the DataType-NodeId "ns=2;i=3009" on your server.

smueller_0-1698664333313.png

 

The Attribute "DataTypeDefinition" should be shown with corresponding fields then. There please look at [1] and [2] what the DataType it is? Here as a example how it looks like for the BuildInfo Struture in our Server:

smueller_1-1698664538019.png

 

Best regards,

smueller

Hello @smueller , 

today we were able to verify the settings for [1] and [2]. It really seems to be "localized Text" as well. So we are waiting for new app version 2.4. 

leonbergerm_0-1699352557668.png

Is there already an information when the new version 2.4 will be released? 

BR Markus 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist