Showing results for 
Search instead for 
Did you mean: 

Creating a data layer node from Node-RED

Creating a data layer node from Node-RED

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,



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.


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?

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.


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

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.

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.