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

Array bigger than 1000 in Node red ??

Array bigger than 1000 in Node red ??

hundch
Member

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. 

hundch_0-1691504748830.png

So this works fine. But if i read out that array  in Node-Red i get only 1000 (0..999)transfered.

hundch_1-1691504833194.png

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 🙂 

 

 

 

 

1 REPLY 1

Sgilk
Contributor

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": [
            []
        ]
    }
]

 

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