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

Creating a data layer node from Node-RED

Creating a data layer node from Node-RED

pacosta
Established Member

I am running a Virtual Control and a sample PLC application which creates a simple up-counter i. I am able to read and write the data layer node associated with the counter from Node-RED using the "Data layer request" Node-RED module (version 1.2.1). The path to the variable is "/plc/app/Application/sym/PLC_PRG/i".

My problems start when I want to create/register a brand new data layer node. It seems that for any path that I choose I get a DL_INVALID_ADDRESS error, for example with this message going to the "Data layer request" node:

{ method: "CREATE", path: "designer/xyz", payload: { type: 'int16', value: 1 } }

I am not sure if this functionality is not supported by the Node-RED data layer request module, or if I am doing something wrong. It seems that it is possible to create data layer nodes, at least judging by an example in the C++ SDK. The example registers a node in "myData/myFlatbuffer", for instance.

Any help or pointers would be highly appreciated,

Pablo

7 REPLIES 7

TheCodeCaptain
Community Moderator
Community Moderator

Hi Pablo,

To create own nodes you need to program your own app using the sdk.

The data is owned from your app, your app holds the memory, the datalayer is just the broker to access it.

For now you cannot do that with Node-Red.

In the future we will deliver an example for the sdk which can be used as a "flexible storage point" to also add own nodes via a REST call.

Regards

jacaré
Long-established Member

I also need this functionality to create new Nodes based on Node-RED data.
Machine data is read with Node-RED and I need to make this data accessible within ctrlX Core. What are my possibilities?

CodeShepherd
Community Moderator
Community Moderator

If you like to add the data to the ctrlX Data Layer the situation is still the same then in the post above from @TheCodeCaptain. You need an provider of data written in a PLC (IEC61131), or an app (c++, c# or python). A fitting example should be available in the SDK version 1.10 coming up end of July.

You could also write your data to a file on the core and read from anywhere else.

Hello,

is now available the possibility to create own nodes via a REST call as you said?

If not, when is it in plan to implement this possibility?

 

Best regards

TheCodeCaptain
Community Moderator
Community Moderator

Hi Toffa,

this is not yet available as a ready made app from us, but planned for the future.

In the meantime you could build such an app on your own based on our example on github.

https://boschrexroth.github.io/ctrlx-automation-sdk/samples-cpp/datalayer.provider.all-data/index.ht...

https://github.com/boschrexroth/ctrlx-automation-sdk/tree/main/samples-cpp/datalayer.provider.all-da...

Hi TheCodeCaptain,

are there any updates on when it will be possible to create own data layer nodes directly from NodeRED?

Thanks in advanced! 

Please have a look to this topic for more information about the upcoming KVD (Key Value Database) app.

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