When using MC read, there will be a timeout problem when inserting data

I just entered the field of Node-red, so I don't know how to use it yet. MC read is indeed connected to the PLC, but there will be errors when transmitting data. Is there any way to improve it, or increase the max age?


Also, my English is not very good, so it may not be fluent, sorry

Can you select the nodes (inject --> debug) and export (CTRL-E) them to clipboard, then paste the exported flow into a </> code block in your reply.

[
    {
        "id": "b530dbccf4c27135",
        "type": "MC Write",
        "z": "df46dbbf3b8f073a",
        "name": "",
        "topic": "",
        "connection": "92dea6b87bcbce99",
        "data": "payload[0]",
        "address": "D200",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "output2",
        "outputs": 2,
        "x": 1760,
        "y": 340,
        "wires": [
            [
                "28f49d9049edf922"
            ],
            [
                "28f49d9049edf922"
            ]
        ]
    },
    {
        "id": "bc881c3545525520",
        "type": "function",
        "z": "df46dbbf3b8f073a",
        "name": "function 9",
        "func": "var Data = (global.get(\"Data\" + global.get(\"count\")));\nvar list = Data[global.get(\"net\")];\nvar list_clear = [];\nvar i ;\nfor(i = 0 ;i < list.length-1;i ++ ){\n    list_clear.push(list[i+1]);\n}\nmsg.payload = list_clear;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "\nglobal.set(\"count\",0);",
        "finalize": "",
        "libs": [],
        "x": 1560,
        "y": 540,
        "wires": [
            [
                "8db7614c5aae64a0",
                "9d16cd7d2a13f9bc",
                "b0ef7a2b71fe82b3",
                "171292cc371ae55f",
                "71e4e8dbd2bb9c6b",
                "37cdb53d2a5e74d5",
                "b56d66d7c9bde62b",
                "b530dbccf4c27135"
            ]
        ]
    },
    {
        "id": "28f49d9049edf922",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 8",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload[0]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1940,
        "y": 340,
        "wires": []
    },
    {
        "id": "d3c6c7bbb03634d4",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 9",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload[1]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1940,
        "y": 420,
        "wires": []
    },
    {
        "id": "a416705a443586ae",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 10",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload[2]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1940,
        "y": 500,
        "wires": []
    },
    {
        "id": "599dd75ab55a70a4",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 11",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload[3]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1940,
        "y": 580,
        "wires": []
    },
    {
        "id": "c378cdb93711308e",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 12",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload[4]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1940,
        "y": 660,
        "wires": []
    },
    {
        "id": "979fd3b85a95094d",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 13",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload[5]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1940,
        "y": 740,
        "wires": []
    },
    {
        "id": "5e6af70bd95950d9",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 14",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload[6]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1940,
        "y": 820,
        "wires": []
    },
    {
        "id": "9d16cd7d2a13f9bc",
        "type": "MC Write",
        "z": "df46dbbf3b8f073a",
        "name": "",
        "topic": "",
        "connection": "92dea6b87bcbce99",
        "data": "payload[1]",
        "address": "D201",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "output2",
        "outputs": 2,
        "x": 1760,
        "y": 420,
        "wires": [
            [
                "d3c6c7bbb03634d4"
            ],
            [
                "d3c6c7bbb03634d4"
            ]
        ]
    },
    {
        "id": "b0ef7a2b71fe82b3",
        "type": "MC Write",
        "z": "df46dbbf3b8f073a",
        "name": "",
        "topic": "",
        "connection": "92dea6b87bcbce99",
        "data": "payload[2]",
        "address": "D202",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "output2",
        "outputs": 2,
        "x": 1760,
        "y": 500,
        "wires": [
            [
                "a416705a443586ae"
            ],
            [
                "a416705a443586ae"
            ]
        ]
    },
    {
        "id": "171292cc371ae55f",
        "type": "MC Write",
        "z": "df46dbbf3b8f073a",
        "name": "",
        "topic": "",
        "connection": "92dea6b87bcbce99",
        "data": "payload[3]",
        "address": "D203",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "output2",
        "outputs": 2,
        "x": 1760,
        "y": 580,
        "wires": [
            [
                "599dd75ab55a70a4"
            ],
            [
                "599dd75ab55a70a4"
            ]
        ]
    },
    {
        "id": "71e4e8dbd2bb9c6b",
        "type": "MC Write",
        "z": "df46dbbf3b8f073a",
        "name": "",
        "topic": "",
        "connection": "92dea6b87bcbce99",
        "data": "payload[4]",
        "address": "D204",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "output2",
        "outputs": 2,
        "x": 1760,
        "y": 660,
        "wires": [
            [
                "c378cdb93711308e"
            ],
            [
                "c378cdb93711308e"
            ]
        ]
    },
    {
        "id": "37cdb53d2a5e74d5",
        "type": "MC Write",
        "z": "df46dbbf3b8f073a",
        "name": "",
        "topic": "",
        "connection": "92dea6b87bcbce99",
        "data": "payload[5]",
        "address": "D205",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "output2",
        "outputs": 2,
        "x": 1760,
        "y": 740,
        "wires": [
            [
                "979fd3b85a95094d"
            ],
            [
                "979fd3b85a95094d"
            ]
        ]
    },
    {
        "id": "b56d66d7c9bde62b",
        "type": "MC Write",
        "z": "df46dbbf3b8f073a",
        "name": "",
        "topic": "",
        "connection": "92dea6b87bcbce99",
        "data": "payload[6]",
        "address": "D206",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "output2",
        "outputs": 2,
        "x": 1760,
        "y": 820,
        "wires": [
            [
                "5e6af70bd95950d9"
            ],
            [
                "5e6af70bd95950d9"
            ]
        ]
    },
    {
        "id": "8db7614c5aae64a0",
        "type": "debug",
        "z": "df46dbbf3b8f073a",
        "name": "debug 21",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1760,
        "y": 260,
        "wires": []
    },
    {
        "id": "af8e6a92a5b913c5",
        "type": "inject",
        "z": "df46dbbf3b8f073a",
        "name": "Insert",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "0",
        "topic": "",
        "x": 1410,
        "y": 540,
        "wires": [
            [
                "bc881c3545525520"
            ]
        ]
    },
    {
        "id": "92dea6b87bcbce99",
        "type": "MC Protocol Connection",
        "name": "",
        "host": "192.168.0.100",
        "port": "10000",
        "protocol": "TCP",
        "frame": "1E",
        "plcType": "Q",
        "ascii": false,
        "PLCStation": "",
        "PCStation": "",
        "PLCModuleNo": "",
        "network": "",
        "octalInputOutput": false,
        "timeout": "1000"
    }
]

Like this?

I try to use different port gates for MC READ and MC WRITE.
Then it's fixed

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.