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

NodeRed DataLayer Request node problem

NodeRed DataLayer Request node problem

LucasTBC
Member

Hi all,

Just setting up an application on the CtrlX for the first time, and I'm running into this issue:

For some reasono it seems to me that the CtrlX DatalayerRequest node only works if I give it impropper JSON. The flow in the snippet bellow should demonstrate what I'm talking about. (Also find flow JSOn attached - change the .txt to .json to import back into node red.) 

 

The first inject node send invalid json which the CtrlX node accepts and sets the corresponding digital output

The second inject node which sends valid json does not get accepted by the Ctrlx node, but is valid json as shown by the debug node.

Any ideas here? THanks!

LucasTBC_0-1717446297272.png

Also, the input to the CtrlX request node seems pretty counter intuitive to me. I feel like I should be able to just set the inject node as follows and have it write to the PLC bit on the path. but this doesn't work.

THanks!

LucasTBC_1-1717446603256.png

 

 

5 REPLIES 5

LucasTBC
Member

Just adding a few more ways of generating valid JSON that doesn't work with the CtrlX node:

LucasTBC_0-1717447189429.png

 

You are right, that the JSON needs to be valid but also it needs to have the correct format. Please have a look to the examples on GitHub and also included in the ctrlX OS - Node RED app.

I'm still not quite clear, I don't think you've adressed my question.

The Ctrlx WRITE node has an option to accept value only as shown here (the configuration of the first node with invalid JSON)

But this invalid JSON works, and does set the datalayer tag.

LucasTBC_0-1717502506359.png

The first example in my flow, clearly shows that an invalid json does activate the output on the Ctrlx datalayer, but is NOT a valid JSON. And the following three examples of valid JSON do not write correctly to the datalayer.

Thus my confusion, why does the CtrlX expect INVALID json?

Thank you!

 

Your problem is also described in the troubleshooting documentation on GitHub. For the write method you always need to use the "value + type (json)" format to get it working properly.

Hello @CodeShepherd , thank you for the prompt replies, and I really appologize if I came accross a little upset. I'm just under a real time crunch for this project and trying to get socket communication setup between a UR20 and node red, and that was the last piece of the puzzle!
Thanks a million!

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