Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

CtrlX Datalayer PLC nodes subscription fails

CtrlX Datalayer PLC nodes subscription fails

CtrlXplorer
Established Member

Hello everyone,

I developed an app that has to subscribe to a specific PLC node in the Datalayer. The app utilizes Service2Service Authentication in order to generate an access token. 

The scope.json looks as following:

 

{
    "id": "datalayer-visualizer-app", "rexroth-device.all.rwx"]
}

 


I retrieve the token successfully.  Here is how it looks like as it is parsed from jwt.io website:

CtrlXplorer_0-1711458181713.png

Note: I noticed that the id parameter is empty and the plchandle is set to 0.

When I attempt to subscribe to PLC node in the Datalayer I get the following DL_INVALID_ADDRESS error:

CtrlXplorer_1-1711458357396.png

However, if I subscribe to a Datalayer node that is not defined by the PLC app, the subscribtion with this S2S token is working flawlessly.

Solution:
If I authenticate via username/password and retrieve the token from the Authorization API. This issue is resolved. I successfully subscribed to the PLC-defined node in the Datalayer.

What I suspect might be the issue is that the token retrieved from the Authorization API is complete (it includes the id and the plchandle parameter is not 0)

CtrlXplorer_0-1711462017855.png

Additional Info:

Build environment: Ubuntu 22.04
Snap base: core22
CtrlX CORE X3 (with core 22 app installed)
CtrlX Works version: 1.20.5


I would really appreciate your feedback. 😊

6 REPLIES 6

nickH
Community Moderator
Community Moderator

Hi @CtrlXplorer 

I followed these two guides to reproduce your error:

But I was not able to reproduce your error. It worked fine for me. Please check if you have an error in the Data Layer path to the node you want to subscribe to. I would recommend to use this button to copie out the path: 
copy Data Layer path in web uicopy Data Layer path in web ui

 

Best regards, 

Nick

CtrlXplorer
Established Member

Hi @nickH

Thank you for your reply. I also followed the guides that you specified and I made sure that the node paths was correct in the subscription ( I used tools like online Diff-checker and Notepad++ to see if there were any differences). As I already mentioned the problem only occurs when I use the S2S authentication token itself, and not because of the node path being incorrect. Also, I do not ecounter any errors if I retrieve the token from the Authorization API itself (using username and password).

My program logic simply waits for this S2S token file to be generated in the expected directory. Afterwards a SSE subscription request is being made to the exact PLC Datalayer node (see screenshot below) utilizing the S2S token as way of authenticating.

CtrlXplorer_0-1711622559404.png

However the problem with the DL_INVALID_ADDRESS  for the PLC Datalayer node persists.

Best regards,
CtrlXplorer

I also will leave a screenshot of the system apps versions below . Hope it helps to localize the issue: image.png

 

nickH
Community Moderator
Community Moderator

Hi @CtrlXplorer 

I tried it now once again with the V1.20 but it still works for me (also with the S2S Token). 

Here are my Apps:

2024-03-28_14h10_39.png

 

To get the S2S-Token I used this sample on GitHub. Then I did the subscription from cmd with curl (with the S2S-Token) and it works fine:

nickH_0-1711631617759.png

 

CtrlXplorer
Established Member

Hi again @nickH

I noticed that you are using lower versions of some System apps than what I am testing on. Could you please try to upgrade:
- Automation Core to version 1.20.2
- Device Admin to version 1.20.7
-
Hardware Support to version 1.20.5
-
PLC to version 1.20.6
- Realtime Kernel (see my screenshot above)
- Setup to 1.20.1
- snapd to 2.59.2
- Solutions to 1.20.1

You may get the complete archive of all mentioned upgrades from the Collaboration rooms and then search for the System Apps X3 01.20.12 archive. Also just wanted to politely remind you to make a backup of your system configuration before upgrading 😅

I also installed the S2S Authentication sample that you provided and still got the same results. Here are some screenshots.

🟥(S2S Token) Subscription to PLC Datalayer node: plc/app/Application/sym/GVL/SignalleucteGruen1

subscriptionWith_S2S_token_PLC.png

(S2S Token) Subscription to Datalayer node: framework/metrics/system/cpu-utilisation-percent

subscriptionWith_S2S_token_CPU_utilisation.png


(Authorization API Token) Subscription to PLC Datalayer node: plc/app/Application/sym/GVL/SignalleucteGruen1

subscriptionWith_AuthorizationAPI_token_PLC.png

 

Important Updates: As this is a PLC project, developed by a customer, the source project configurations were inspected and the issue was found to be located in the Symbol Configuration. Most likely the customer developed the PLC project on a lower version of the CtrlX PLC Engineering software. That was the reason for the DL_INVALID_ADDRESS error when subscribing to a PLC Datalayer node via ServiceToService token.

Solution: The issue was resolved by deleting the old Symbol Configuration and setting up a new one with the following addittional settings checked:

CtrlXplorer_0-1712133229899.png

Special thanks to @nickH for helping to identify the issue! I am marking this topic as closed. 🙂

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