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

Creating a data layer node from Node-RED

pacosta
Established Member

Creating a data layer node from Node-RED

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

3 REPLIES 3
TheCodeCaptain
Community Moderator

Re: Creating a data layer node from Node-RED

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é
Established Member

Re: Creating a data layer node from Node-RED

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

Re: Creating a data layer node from Node-RED

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.

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