Toggle Wago PLC values from Node-red

Hello i would like to toggle the “xOUTPUT_NVL_2” network variable that is listed on my receiver list on ecockpit PLC program from the two button nodes “xOUTPUT_NVL_2 ON/OFF”, i just don’t know what would be the function so that values from the button would specifically set for the xOUTPUT_NVL_2 variable and what other configuration i should do. Please help,

Thanks

Hello,
You have the right idea, this should work. However your NVL Read is erroring so there is something wrong with the Codesys side of things most likely. I would try to get both the NVL read and write to show green (healthy) before trying to control the variables.

1 Like

Hello,

i am following exact same details as in this video here however after importing new gvl file and creating a network variable list and as soon as i connect/deploy on the node-red the original network variable receiver list just turns into “Wrongnetvar list” i am not sure what is causing that i did triple check that whenever i am making new gvl file, i am changing the list identifier and variable names and also i am not sure what is ID# for the network sender node.

Please help. Thanks

Please verify that you changed the port for the receive in a text editor as shown in the video. The send and receive messages need to use different ports.

Hello i configured a separate port for the UDP receive and transmit and both network variable list seems to be fine however my netvar sender still isn’t making any change in my e!cockpit program, is it can be because of the ID# property in netvar sender node, because i am not sure how to find the ID number of my Wago PFC? Please help.

Thank you very much

The List Identifier (and port) is changed in the text editor before you import the Receiver list. Here are screenshots from the YouTube video.



These numbers then have to match in NodeRED:
Codesys Sender [1] → NodeRED NVL Receiver [1]
NodeRED NVL Sender [3] → Codesys Receiver [3]

The ID numbers are generated by Codesys at runtime and can be found when youre online with the PLC by looking in the NVL object called +NetVarManager_UDP_PLC_T..


1 Like

Hello i did ended up fixing it by allocating different ports for the sender and receiver, but however problem is now that i still do not see any data changed on my ecockpit from the netvar-sender node, but yes i do have different List identifier and different ports for the netvar-receiver and sender. the output of my netvar-sender and function node is in the picture. Thanks