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

Best reply by TheCodeCaptain

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

View original
7 replies