FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
03-09-2021 02:46 AM
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
Solved! Go to Solution.
03-09-2021 08:35 AM
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
04-20-2021 03:29 PM
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?
04-20-2021 03:33 PM - edited 04-20-2021 03:48 PM
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.
12-20-2021 01:38 PM
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
12-20-2021 03:21 PM
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.
02-21-2023 08:54 AM
Hi TheCodeCaptain,
are there any updates on when it will be possible to create own data layer nodes directly from NodeRED?
Thanks in advanced!
02-21-2023 09:08 AM
Please have a look to this topic for more information about the upcoming KVD (Key Value Database) app.