FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
09-25-2023 10:20 AM
Hi everyone,
I wanted to create a variable into Data Layer using Node-red, but some how that is unable to create a variable into it.
May i know got any way or any function can do this? or is it because of the ctrlX security are not able to give the permision for 3rd party software to access?
Here is the flow has shown below.
[{"id":"2a0c7c29b9d9b543","type":"tab","label":"Flow 13","disabled":false,"info":"","env":[]},{"id":"51cd11e9021b58c7","type":"inject","z":"2a0c7c29b9d9b543","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":410,"y":340,"wires":[["1a65e635f3c31e07"]]},{"id":"d86ba9b12c74798e","type":"ctrlx-datalayer-request","z":"2a0c7c29b9d9b543","device":"9d5f26cc0358029a","method":"CREATE","path":"datalayer/debug","payloadFormat":"value_type","name":"","x":740,"y":460,"wires":[["e0349e41bd729fbf"]]},{"id":"e0349e41bd729fbf","type":"debug","z":"2a0c7c29b9d9b543","name":"debug 41","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":280,"wires":[]},{"id":"1a65e635f3c31e07","type":"function","z":"2a0c7c29b9d9b543","name":"function 3","func":"var newMsg = {};\nnewMsg.payload = {\n \"type\": \"object\",\n \"value\": {\n \"axsPos\": \"10\", \"buffered\": false, \"lim\": { \"vel\": \"10\", \"acc\": \"10\", \"dec\": \"10\", \"jrkAcc\": \"0\", \"jrkDec\": \"0\" }\n }\n}\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":380,"wires":[["d86ba9b12c74798e"]]},{"id":"9d5f26cc0358029a","type":"ctrlx-config","name":"","hostname":"192.168.1.56","debug":true}]
Solved! Go to Solution.
09-25-2023 11:20 AM
Hi kelvin,
Node-RED cannot create own nodes/variables in the datalayer out of the box.
You need an app which is owner of the memory, eg. our KVD app, or you write your own.
Here is a description how to use the KVD app together with Node-RED.
Creating a dynamic Data Layer Node from Node-RED u... (boschrexroth.com)
09-26-2023 02:12 AM
Hi @TheCodeCaptain,
Thanks for your reply and have a good idea for me. 😊