Hi, I am struggeling with sending network variables to codesys.
I am able to receive variables from PLC to Node-RED through node-red-contrib-nvl, but not the other way.
Node-RED V3.0.2 running on raspberry pi 4
Codesys 3.5 running on Deif AMC300
[
{
"id": "0b0cedbd47c94c35",
"type": "tab",
"label": "Codesys UECC",
"disabled": false,
"info": "",
"env": []
},
{
"id": "1a6f5a728e9537a6",
"type": "udp out",
"z": "0b0cedbd47c94c35",
"name": "",
"addr": "192.168.1.97",
"iface": "",
"port": "1202",
"ipv": "udp4",
"outport": "",
"base64": false,
"multicast": "false",
"x": 1210,
"y": 260,
"wires": []
},
{
"id": "e1d02d7d119a83c4",
"type": "udp in",
"z": "0b0cedbd47c94c35",
"name": "",
"iface": "",
"port": "1202",
"ipv": "udp4",
"multicast": "false",
"group": "",
"datatype": "buffer",
"x": 160,
"y": 160,
"wires": [
[
"f79a36fe563603f9",
"6cc11dd97326b7fd"
]
]
},
{
"id": "f79a36fe563603f9",
"type": "debug",
"z": "0b0cedbd47c94c35",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 490,
"y": 100,
"wires": []
},
{
"id": "6cc11dd97326b7fd",
"type": "nvl-receive",
"z": "0b0cedbd47c94c35",
"name": "",
"definition": "VAR_GLOBAL\n xBool: BOOL;\nEND_VAR",
"listId": "1",
"globaltypes": "e1676971a228cf35",
"x": 490,
"y": 160,
"wires": [
[
"1585a99456d92050"
]
]
},
{
"id": "1585a99456d92050",
"type": "debug",
"z": "0b0cedbd47c94c35",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1170,
"y": 160,
"wires": []
},
{
"id": "c38b0a5c0305d07e",
"type": "nvl-send",
"z": "0b0cedbd47c94c35",
"name": "",
"definition": "VAR_GLOBAL\n xBool2 : BOOL;\nEND_VAR\n\n",
"listId": "3",
"globaltypes": "e1676971a228cf35",
"x": 480,
"y": 260,
"wires": [
[
"1a6f5a728e9537a6",
"f80ae7976c014aba"
]
]
},
{
"id": "da042db614c37923",
"type": "inject",
"z": "0b0cedbd47c94c35",
"name": "False",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "0",
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 170,
"y": 220,
"wires": [
[
"b2bf3a6572586bf4"
]
]
},
{
"id": "dfe07dd340b0d084",
"type": "inject",
"z": "0b0cedbd47c94c35",
"name": "True",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "1",
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 260,
"wires": [
[
"b2bf3a6572586bf4"
]
]
},
{
"id": "f80ae7976c014aba",
"type": "debug",
"z": "0b0cedbd47c94c35",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 690,
"y": 320,
"wires": []
},
{
"id": "b2bf3a6572586bf4",
"type": "function",
"z": "0b0cedbd47c94c35",
"name": "",
"func": "const bool = msg.payload;\n\nmsg.payload = {\n \"xBool2\": bool\n}\n\nreturn msg;\n\n// {\n// \"xBool\": true,\n// }",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 260,
"wires": [
[
"c38b0a5c0305d07e",
"6e0a73a3f78cb3ae"
]
]
},
{
"id": "6e0a73a3f78cb3ae",
"type": "debug",
"z": "0b0cedbd47c94c35",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 490,
"y": 320,
"wires": []
},
{
"id": "e1676971a228cf35",
"type": "nvl-datatypes",
"name": "",
"datatypes": ""
}
]
Send Node:
Network variables list (receiver):