TCP IP Scanner Losing Connection

I am having issues with losing my connection to a TCP IP barcode scanner on port 51240, It works for a while but then the node shows disconnected. Once i restart the scanner it so far always starts working again for x amount of time. I don't know if its a scanner problem or node-red setup issue.

My next step was to try a different TCP port but I am looking at other ideas on what could be the problem?

I should add I can always ping the IP address

[
    {
        "id": "29bdc5903ebe68f6",
        "type": "debug",
        "z": "ce6b5df784b18300",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 630,
        "y": 1320,
        "wires": []
    },
    {
        "id": "bd1ad3acab7aa002",
        "type": "tcp in",
        "z": "ce6b5df784b18300",
        "name": "",
        "server": "client",
        "host": "192.168.3.50",
        "port": "51240",
        "datamode": "stream",
        "datatype": "utf8",
        "newline": "",
        "topic": "",
        "base64": false,
        "tls": "",
        "x": 260,
        "y": 1380,
        "wires": [
            [
                "29bdc5903ebe68f6",
                "def1b3201abacdd7"
            ]
        ]
    },
    {
        "id": "897d351c07392aa1",
        "type": "inject",
        "z": "ce6b5df784b18300",
        "name": "Trigger Scan",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "T",
        "payloadType": "str",
        "x": 350,
        "y": 1000,
        "wires": [
            [
                "c177037e93d8721f"
            ]
        ]
    },
    {
        "id": "c177037e93d8721f",
        "type": "tcp out",
        "z": "ce6b5df784b18300",
        "name": "",
        "host": "192.168.3.50",
        "port": "51240",
        "beserver": "client",
        "base64": false,
        "end": false,
        "tls": "",
        "x": 950,
        "y": 1040,
        "wires": []
    },
    {
        "id": "d5e98b7e8b1be7f6",
        "type": "debug",
        "z": "ce6b5df784b18300",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 630,
        "y": 1440,
        "wires": []
    },
    {
        "id": "c215f2c24b011534",
        "type": "inject",
        "z": "ce6b5df784b18300",
        "d": true,
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": ".1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 110,
        "y": 1080,
        "wires": [
            [
                "05fa8750989cf4a0"
            ]
        ]
    },
    {
        "id": "05fa8750989cf4a0",
        "type": "MC Read",
        "z": "ce6b5df784b18300",
        "name": "M500",
        "topic": "",
        "connection": "8bf9ce709d0bac70",
        "address": "M500",
        "addressType": "str",
        "outputFormat": "1",
        "errorHandling": "throw",
        "outputs": 1,
        "x": 330,
        "y": 1080,
        "wires": [
            [
                "bf36fdbf8698e642"
            ]
        ]
    },
    {
        "id": "0ba908b7db09b02b",
        "type": "inject",
        "z": "ce6b5df784b18300",
        "d": true,
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": ".1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 330,
        "y": 900,
        "wires": [
            [
                "813eb785272c477e"
            ]
        ]
    },
    {
        "id": "813eb785272c477e",
        "type": "MC Read",
        "z": "ce6b5df784b18300",
        "name": "Y5",
        "topic": "",
        "connection": "8bf9ce709d0bac70",
        "address": "Y5",
        "addressType": "str",
        "outputFormat": "1",
        "errorHandling": "throw",
        "outputs": 1,
        "x": 530,
        "y": 900,
        "wires": [
            [
                "bdf70248f339d761"
            ]
        ]
    },
    {
        "id": "bdf70248f339d761",
        "type": "debug",
        "z": "ce6b5df784b18300",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 900,
        "wires": []
    },
    {
        "id": "06b901db64270eaf",
        "type": "comment",
        "z": "ce6b5df784b18300",
        "name": "Manual Scanner Trigger",
        "info": "",
        "x": 320,
        "y": 960,
        "wires": []
    },
    {
        "id": "48d9231513041a71",
        "type": "comment",
        "z": "ce6b5df784b18300",
        "name": "Scanner Data",
        "info": "",
        "x": 250,
        "y": 1340,
        "wires": []
    },
    {
        "id": "7d1f8edd0f0ccc65",
        "type": "function",
        "z": "ce6b5df784b18300",
        "name": "If True Return T",
        "func": "if(msg.payload == true)\n{\n    msg.payload = 'T'\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 640,
        "y": 1080,
        "wires": [
            [
                "c177037e93d8721f"
            ]
        ]
    },
    {
        "id": "20266a9bbd51a1a7",
        "type": "comment",
        "z": "ce6b5df784b18300",
        "name": "PLC Scanner Trigger",
        "info": "",
        "x": 320,
        "y": 1040,
        "wires": []
    },
    {
        "id": "bf36fdbf8698e642",
        "type": "rbe",
        "z": "ce6b5df784b18300",
        "name": "",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 470,
        "y": 1080,
        "wires": [
            [
                "7d1f8edd0f0ccc65"
            ]
        ]
    },
    {
        "id": "8bf9ce709d0bac70",
        "type": "MC Protocol Connection",
        "name": "PLC1",
        "host": "192.168.3.39",
        "port": "3001",
        "protocol": "UDP",
        "frame": "3E",
        "plcType": "Q",
        "ascii": false,
        "PLCStation": "",
        "PCStation": "",
        "PLCModuleNo": "",
        "network": "",
        "octalInputOutput": false,
        "timeout": "1000"
    }
]type or paste code here

Is the scanner maybe going into power saving mode?

I don't believe so but I can check the software and configuration

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