FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
08-08-2023 04:30 PM
Hello,
we have an application where want to record some data and it is necessary to move them from the PLC App into Node-Red.
The Array is 1333 big.
So this works fine. But if i read out that array in Node-Red i get only 1000 (0..999)transfered.
The rest of the array(1000 ... 1334) is empty. It feels like that Node-red can only capture the amount of data which is showing in the PLC app (1000 entries at once).
Does anyone has a solution for that ?
Thanks 🙂
Solved! Go to Solution.
08-08-2023 05:02 PM
Hello hundch,
This is just a limitation of the debug window in Node-RED. The data is still present. You can confirm by accessing one of the array elements beyond index 1000. See the flow below.
It is possible to increase the string character and array size limits in Node-RED settings, but not in the built snap from the ctrlX Store.
[
{
"id": "b5371fa7fab0afdc",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e0a278c4f5583337",
"type": "function",
"z": "b5371fa7fab0afdc",
"name": "Fill Array",
"func": "var obj = {array: []};\nfor (let i = 0; i < 2000; i++) {\n obj.array[i] = i;\n}\nmsg.payload = obj;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 280,
"y": 60,
"wires": [
[
"012d8ba6e83ea819",
"6bc65ad39e6484f9"
]
]
},
{
"id": "772e76da13ce7151",
"type": "inject",
"z": "b5371fa7fab0afdc",
"name": "Initiate",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 90,
"y": 60,
"wires": [
[
"e0a278c4f5583337"
]
]
},
{
"id": "012d8ba6e83ea819",
"type": "debug",
"z": "b5371fa7fab0afdc",
"name": "Output Array to Debug Window",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 510,
"y": 60,
"wires": []
},
{
"id": "6bc65ad39e6484f9",
"type": "function",
"z": "b5371fa7fab0afdc",
"name": "Access Element 1950",
"func": "node.warn(msg.payload.array[1950]);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 480,
"y": 120,
"wires": [
[]
]
}
]