Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

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

Create a Variable into Data Layer using Node-red

Create a Variable into Data Layer using Node-red

kelvin
Member

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}]

 

 

2 REPLIES 2

TheCodeCaptain
Community Moderator
Community Moderator

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)

Hi @TheCodeCaptain,

Thanks for your reply and have a good idea for me. 😊 

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