Creating a fetch/write request to retrieve data from a PLC

My goal is to send a fetch/write frame into a PLC with Node-Red, in order to collect data thanks to captors.

I created a flow to do that (I can't upload my json file because I'm "a new user"), but I don't understand how the nodes are working in Node-Red.
There are several steps to do :

  1. Establish the connection to the port, which is 2000 here (reading).
  2. Creating and sending the fetch/write request frame, who will ask the PLC the data I want to retrieve.
  3. Response of the PLC, and printing the values in Node Red (debug or dashboard). The received frame will be different from the request frame.

The frame is a 16 bits buffer that I want to send : [83,53,16,1,3,5,3,8,1,62,0,0,0,2,255,2] for example.

How can I do that ? I know my flow is not running but this was my idea. I am a beginner in Node-Red, so it is a little complicated for now.

Thank you for your help :slight_smile:

Hi,
Welcome to the Forum,

What brand of PLC do you use? Siemens, Omron...
Ethernet, USB Serial?

You don't have to worry about the connection in most cases, just read the data and process it

You can use this node to convert the data

And if it is modbus then node-red-contrib-modbus to read it.

1 Like

Hi,

I use a PLC from Siemens, and an ethernet wire. I already know the node you are showing me, I have tried a flow with it but the problem is... I don't understand how it works, even with the examples.
I'd like to show you what I've done, but it looks impossible for now. Do you have an idea for how can I share my flow ? And yes, I used both parser and maker buffer nodes.

Yep use:

```json
paste your flow
```

Hi,

At the beginning I used modbus TCP nodes, it almost worked. But I had a problem with a port who was not open (whereas it normally should have worked, we checked this after). Actually, there are some differences between Fetch/Write and Modbus TCP protocols. In the first one, I have to do the steps one by one, while in the other all is happening on the same time. I have to open the port (to connect) before asking data. That is why (I think) it was not working with modbus tcp nodes.

[
    {
        "id": "94fc9cefc9ca0cf0",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "297034b70f636f78",
        "type": "buffer-maker",
        "z": "94fc9cefc9ca0cf0",
        "name": "Creation of the frame",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "name": "item1",
                "type": "byte",
                "length": 16,
                "dataType": "bin",
                "data": "[83,53,16,1,3,5,3,8,1,62,0,0,0,2,255,2]"
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "x": 620,
        "y": 200,
        "wires": [
            [
                "8224d2bb0bc54019"
            ]
        ]
    },
    {
        "id": "8224d2bb0bc54019",
        "type": "tcp request",
        "z": "94fc9cefc9ca0cf0",
        "name": "Sending request",
        "server": "192.168.0.1",
        "port": "2000",
        "out": "char",
        "ret": "buffer",
        "splitc": "\\n",
        "newline": "",
        "tls": "",
        "x": 820,
        "y": 200,
        "wires": [
            [
                "0a70d4d2ea2f6a79"
            ]
        ]
    },
    {
        "id": "0a70d4d2ea2f6a79",
        "type": "buffer-parser",
        "z": "94fc9cefc9ca0cf0",
        "name": "Reception of the request",
        "data": "payload",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "buffer",
                "name": "Response frame",
                "offset": 0,
                "length": 16,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "value",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 1050,
        "y": 200,
        "wires": [
            [
                "eefa55141c0900a1"
            ]
        ]
    },
    {
        "id": "eefa55141c0900a1",
        "type": "debug",
        "z": "94fc9cefc9ca0cf0",
        "name": "Result",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1230,
        "y": 200,
        "wires": []
    },
    {
        "id": "786ebfe4ee01d826",
        "type": "tcp-client",
        "z": "94fc9cefc9ca0cf0",
        "action": "Listen",
        "actionType": "str",
        "host": "192.168.0.1",
        "hostType": "str",
        "port": "2000",
        "portType": "str",
        "datamode": "single",
        "datatype": "buffer",
        "newline": "",
        "xmlAttrkey": "$",
        "xmlCharkey": "_",
        "xmlStrip": false,
        "xmlArray": false,
        "xmlNormalizeTags": false,
        "xmlNormalize": false,
        "write": "",
        "writeType": "str",
        "topic": "",
        "name": "Connection to the port 2000",
        "debug": "none",
        "x": 360,
        "y": 200,
        "wires": [
            [
                "297034b70f636f78"
            ]
        ]
    },
    {
        "id": "4e7c6b47a29342e7",
        "type": "inject",
        "z": "94fc9cefc9ca0cf0",
        "name": "Frame",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "[83,53,16,1,3,5,3,8,1,62,0,0,0,2,255,2]",
        "payloadType": "bin",
        "x": 150,
        "y": 200,
        "wires": [
            [
                "786ebfe4ee01d826"
            ]
        ]
    },
    {
        "id": "de3bd3ac68455563",
        "type": "inject",
        "z": "94fc9cefc9ca0cf0",
        "name": "True",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 150,
        "y": 260,
        "wires": [
            [
                "786ebfe4ee01d826"
            ]
        ]
    },
    {
        "id": "b6391ae377415d30",
        "type": "comment",
        "z": "94fc9cefc9ca0cf0",
        "name": "Sending a Fetch/Write request for PLC",
        "info": "",
        "x": 230,
        "y": 100,
        "wires": []
    },
    {
        "id": "bbdfa812e241af6e",
        "type": "comment",
        "z": "94fc9cefc9ca0cf0",
        "name": "Launching with a boolean or with the frame ?",
        "info": "",
        "x": 250,
        "y": 320,
        "wires": []
    },
    {
        "id": "a0293d38706c9a03",
        "type": "comment",
        "z": "94fc9cefc9ca0cf0",
        "name": "Creation of the frame maybe after the connection to the PLC ?",
        "info": "",
        "x": 620,
        "y": 160,
        "wires": []
    }
]

Why not use s7 ?

I forgot this node, thank your for that. I tried to establish the connection with it, and i thought it would have worked, but still not. I have this error message :"Error: connect ECONNREFUSED :". So the connection is refused, it looks like the same problem that I had with the modbus TCP node.

I think the problem comes from the networks. My PC is connected to the first ethernet port of an IOT2050 from Siemens (one network). The PLC (the one into the chamber, Siemens too) is connected to the second ethernet port of the IOT (a second network). I am connected to node red through the IOT, which I visualize on my laptop. Maybe the connection is impossible because they are not directly on the same network. Do you think I have to add a second network card on my PC in order to establish the communication ?

I am an apprentice and all these notions are relatively new for me. I apologize if it's obvious for you :slight_smile:

No, I think you have not enabled access in the PLC
See here

1 Like

Which PLC are you talking about ? The IOT or the one in the chamber ? I posted the issue in the Siemens's forum for more help.

If you are able to ping the PLC from your PC, the IOT is not the problem.
Look at the link and check in the PLC CPU settings.

Hi, sorry for the delay, I was investigating. It's complicated to check the CPU settings because the chamber is handled by an other company, they have to come here for doing that.

However, this time I tried to connect the PLC directly to my laptop, so I was logged in localhost on node red. I created 2 nodes : one with the s7 siemens and the other one with the modbus read tcp.

For the modbus node, I succeeded to be connected to the PLC. Yet, I had one warning message "Modbus Failure On State sending Get More About It By Logging" and an error message, which is often "Error: Timed out". The errors are different each time : "Error: read ECONNRESET", "port not open"... I tried to change several settings, such as the TCP Type, the time out, the delay, etc... Nothing is working. I still had two messages payload on the debug console, with an empty string. I don't understand what thing is missing.

Afterwards, I tried the s7 node, with the same configuration. Here, it's worse. I even didn't succeed to connect to the machine (offline). The error is always "Error: read ECONNRESET". I thought this node would worked because he was specifically created for that, but still not.

I put several screenshots on the topic, I hope it will help you to understand what I said and the problem I meet.

Thank you.


I can only put 2 images (new user), I'm sorry...

What Siemens PLC are you using? S7-300/400 or S7-1200/1500. In case of S7-1200/1500 try changing slot to 1. Port for S7 communication is 102. Where do you get port 2000 from?

1 Like

Hello, the PLC is a Siemens ET200SP, so I believe it's a S7-1500. The port for reading is the 2000, and the port for writing is the 2001 (datasheet).

I've tried to establish a TCP connection with the basic nodes in Node Red. I've succeeded to connect the ports 2000 and 2001 (see picture below). The problem is, it doesn't succeed to communicate with the PLC : "connect failed IP ADDRESS:PORT".

This is what I've done in my architecture :

  1. Connecting and listening to the ports 2000 (reading) and 2001 (writing), with a TCP response on the appropriate port.
  2. Creation of the frame to send to the PLC for reading measures --> read query
  3. TCP request for asking the PLC the data I want
  4. Add a debug node for receive the answer of the PLC

I also added the expected response of the PLC, which I verified on an specified application.

I created a flow in order to show you what I did. You'll find the .json just after. I as well put a screenshot of the architecture and what I have in the debug console (I injected the expected response in the debug console, it is not the real response of the PLC).

Thanks !

Flow :

[
    {
        "id": "68125ec0949e5455",
        "type": "tab",
        "label": "Flux 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "401c13f692b32cda",
        "type": "inject",
        "z": "68125ec0949e5455",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 90,
        "y": 200,
        "wires": [
            [
                "a1e98ebcdab0d865"
            ]
        ]
    },
    {
        "id": "88d57d9f7acd2e12",
        "type": "tcp request",
        "z": "68125ec0949e5455",
        "name": "",
        "server": "192.168.0.1",
        "port": "2000",
        "out": "time",
        "ret": "buffer",
        "splitc": "0",
        "newline": "",
        "trim": false,
        "tls": "",
        "x": 500,
        "y": 200,
        "wires": [
            [
                "0bc099209cde7172"
            ]
        ]
    },
    {
        "id": "0bc099209cde7172",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Debug readQuery + response PLC port 2000",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 830,
        "y": 200,
        "wires": []
    },
    {
        "id": "a1e98ebcdab0d865",
        "type": "function",
        "z": "68125ec0949e5455",
        "name": "readQuery",
        "func": "// Requête de lecture : lire les 2 premières données à partir de l'adresse 0\nlet buf = [];\n    buf[0] = 'S'; //System ID\n    buf[1] = '5'; \n    buf[2] = 16; //Length of header\n    buf[3] = 1; //ID OP code\n    buf[4] = 3; //Length of OP code\n    buf[5] = 5; //OP code, 5=READ FUNCTION\n    buf[6] = 3; //ORG field\n    buf[7] = 8; //Length ORG field\n    buf[8] = 1; //ORG ID\n    buf[9] = 62; //DB NR, in our case it is DB62\n    buf[10] = 0; //Start address, high byte\n    buf[11] = 0; //Start address, low byte\n    buf[12] = 0; //Length, high byte - Data packet length in WORDS\n    buf[13] = 4; // Les 2 premières mesures (Dry and Wet bulb)\n    buf[14] = 255; //Empty field\n    buf[15] = 2; //Length empty field\n\nlet a = []; \nfor (let i = 0; i < 16; i++) {\n    a.push(buf[i]);\n}\n\nreturn [{payload: a}];\n\n\n\n\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 270,
        "y": 200,
        "wires": [
            [
                "88d57d9f7acd2e12",
                "d9d3d4b036bf9318"
            ]
        ]
    },
    {
        "id": "2cc22a40c2cddf4c",
        "type": "inject",
        "z": "68125ec0949e5455",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 90,
        "y": 260,
        "wires": [
            [
                "f6a079f81a59f6e2"
            ]
        ]
    },
    {
        "id": "1fa4de0610a5822b",
        "type": "tcp request",
        "z": "68125ec0949e5455",
        "name": "",
        "server": "192.168.0.1",
        "port": "2001",
        "out": "time",
        "ret": "buffer",
        "splitc": "0",
        "newline": "",
        "trim": false,
        "tls": "",
        "x": 500,
        "y": 260,
        "wires": [
            [
                "94aa2b35458de2bb"
            ]
        ]
    },
    {
        "id": "94aa2b35458de2bb",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Debug readQuery + response PLC port 2001",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 830,
        "y": 260,
        "wires": []
    },
    {
        "id": "f6a079f81a59f6e2",
        "type": "function",
        "z": "68125ec0949e5455",
        "name": "readQuery",
        "func": "// Requête de lecture : lire les 2 premières données à partir de l'adresse 0\nlet buf = [];\n    buf[0] = 'S'; //System ID\n    buf[1] = '5'; \n    buf[2] = 16; //Length of header\n    buf[3] = 1; //ID OP code\n    buf[4] = 3; //Length of OP code\n    buf[5] = 5; //OP code, 5=READ FUNCTION\n    buf[6] = 3; //ORG field\n    buf[7] = 8; //Length ORG field\n    buf[8] = 1; //ORG ID\n    buf[9] = 62; //DB NR, in our case it is DB62\n    buf[10] = 0; //Start address, high byte\n    buf[11] = 0; //Start address, low byte\n    buf[12] = 0; //Length, high byte - Data packet length in WORDS\n    buf[13] = 4; // Les 2 premières mesures (Dry and Wet bulb)\n    buf[14] = 255; //Empty field\n    buf[15] = 2; //Length empty field\n\nlet a = []; \nfor (let i = 0; i < 16; i++) {\n    a.push(buf[i]);\n}\n\nreturn [{payload: a}];\n\n\n\n\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 270,
        "y": 260,
        "wires": [
            [
                "1fa4de0610a5822b"
            ]
        ]
    },
    {
        "id": "b8b135847891b39f",
        "type": "function",
        "z": "68125ec0949e5455",
        "name": "responseReadQuery",
        "func": "// Réponse du PLC : écriture des 2 premières données à partir de l'adresse 0\nlet buf = [];\n    buf[0] = 'S'; //System ID\n    buf[1] = '5'; \n    buf[2] = 16; //Length of header\n    buf[3] = 1; //ID OP code\n    buf[4] = 3; //Length of OP code\n    buf[5] = 6; //OP code, 5=READ ACKNOWLEDGMENT FUNCTION\n    buf[6] = 15; //ACK field\n    buf[7] = 3; //Length ACK field\n    buf[8] = 0; //Error\n    buf[9] = 255; //Empty field\n    buf[10] = 7; //Length empty field\n    buf[11] = 0; //Start address, low byte\n    buf[12] = 0; //Length, high byte - Data packet length in WORDS\n    buf[13] = 0; // Les 2 premières mesures (Dry and Wet bulb)\n    buf[14] = 0; //Empty field\n    buf[15] = 0;\n\n    // DATA : float => codé sur 4 bytes\n    // 1ère valeur : Dry bulb \n    buf[16] = 65; \n    buf[17] = 198; \n    buf[18] = 223; \n    buf[19] = 194; \n\n    // 2ème valeur : Wet bulb\n    buf[20] = 67;\n    buf[21] = 163; \n    buf[22] = 213; \n    buf[23] = 174;\n\nlet a = []; \nfor (let i = 0; i < 24; i++) {\n    a.push(buf[i]);\n}\n\nreturn [{payload: a}];\n\n\n\n\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 340,
        "y": 900,
        "wires": [
            [
                "476c85c49ca831bd"
            ]
        ]
    },
    {
        "id": "13db1951bc7376e6",
        "type": "inject",
        "z": "68125ec0949e5455",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 110,
        "y": 900,
        "wires": [
            [
                "b8b135847891b39f"
            ]
        ]
    },
    {
        "id": "476c85c49ca831bd",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Debug expected response by the PLC",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 630,
        "y": 900,
        "wires": []
    },
    {
        "id": "d9d3d4b036bf9318",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Frame to send",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 480,
        "y": 160,
        "wires": []
    },
    {
        "id": "0f8932c8f0fa62d9",
        "type": "comment",
        "z": "68125ec0949e5455",
        "name": "Frame + TCP request PLC",
        "info": "",
        "x": 130,
        "y": 120,
        "wires": []
    },
    {
        "id": "1f915e63c572b0d2",
        "type": "tcp in",
        "z": "68125ec0949e5455",
        "name": "Connection port 2000",
        "server": "client",
        "host": "192.168.0.1",
        "port": "2000",
        "datamode": "stream",
        "datatype": "buffer",
        "newline": "",
        "topic": "",
        "trim": false,
        "base64": false,
        "tls": "",
        "x": 140,
        "y": 580,
        "wires": [
            [
                "6cc805f03596b6d7",
                "8fd58e5781a88c51"
            ]
        ]
    },
    {
        "id": "6cc805f03596b6d7",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Debug connexion port 2000",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 460,
        "y": 640,
        "wires": []
    },
    {
        "id": "8fd58e5781a88c51",
        "type": "tcp out",
        "z": "68125ec0949e5455",
        "name": "Response TCP port 2000",
        "host": "",
        "port": "",
        "beserver": "reply",
        "base64": false,
        "end": false,
        "tls": "",
        "x": 450,
        "y": 560,
        "wires": []
    },
    {
        "id": "d6fe54f5f0d96f2e",
        "type": "tcp in",
        "z": "68125ec0949e5455",
        "name": "Listening port 2000",
        "server": "server",
        "host": "192.168.0.1",
        "port": "2000",
        "datamode": "stream",
        "datatype": "buffer",
        "newline": "",
        "topic": "",
        "trim": false,
        "base64": false,
        "tls": "",
        "x": 130,
        "y": 520,
        "wires": [
            [
                "8fd58e5781a88c51",
                "90dfcb79415de366"
            ]
        ]
    },
    {
        "id": "90dfcb79415de366",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Debug listening port 2000",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 450,
        "y": 480,
        "wires": []
    },
    {
        "id": "1c3c07de39031802",
        "type": "tcp in",
        "z": "68125ec0949e5455",
        "name": "Connection port 2001",
        "server": "client",
        "host": "192.168.0.1",
        "port": "2001",
        "datamode": "stream",
        "datatype": "buffer",
        "newline": "",
        "topic": "",
        "trim": false,
        "base64": false,
        "tls": "",
        "x": 800,
        "y": 560,
        "wires": [
            [
                "c08de818ed379a84",
                "aab782c653c16c7e"
            ]
        ]
    },
    {
        "id": "c08de818ed379a84",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Debug connexion port 2001",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1120,
        "y": 620,
        "wires": []
    },
    {
        "id": "aab782c653c16c7e",
        "type": "tcp out",
        "z": "68125ec0949e5455",
        "name": "Response TCP port 2001",
        "host": "",
        "port": "",
        "beserver": "reply",
        "base64": false,
        "end": false,
        "tls": "",
        "x": 1110,
        "y": 540,
        "wires": []
    },
    {
        "id": "e1982bf605d04cd6",
        "type": "tcp in",
        "z": "68125ec0949e5455",
        "name": "Listening port 2001",
        "server": "server",
        "host": "192.168.0.1",
        "port": "2001",
        "datamode": "stream",
        "datatype": "buffer",
        "newline": "",
        "topic": "",
        "trim": false,
        "base64": false,
        "tls": "",
        "x": 790,
        "y": 500,
        "wires": [
            [
                "aab782c653c16c7e",
                "aed5d2e1a3c8efa6"
            ]
        ]
    },
    {
        "id": "aed5d2e1a3c8efa6",
        "type": "debug",
        "z": "68125ec0949e5455",
        "name": "Debug listening port 2001",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1110,
        "y": 460,
        "wires": []
    },
    {
        "id": "7b2d030f04621fcd",
        "type": "comment",
        "z": "68125ec0949e5455",
        "name": "Connection + listening mode PLC",
        "info": "",
        "x": 150,
        "y": 400,
        "wires": []
    },
    {
        "id": "d1645c2a4c2c20d7",
        "type": "comment",
        "z": "68125ec0949e5455",
        "name": "Port 2000 : reading",
        "info": "",
        "x": 270,
        "y": 700,
        "wires": []
    },
    {
        "id": "a37d3190c0832c5f",
        "type": "comment",
        "z": "68125ec0949e5455",
        "name": "Port 2001 : writing",
        "info": "",
        "x": 950,
        "y": 700,
        "wires": []
    },
    {
        "id": "d7656b2aa0e74685",
        "type": "comment",
        "z": "68125ec0949e5455",
        "name": "Example : response expected by the PLC",
        "info": "",
        "x": 200,
        "y": 840,
        "wires": []
    }

  1. You cannot have multiple connections with the same host on the same port. Example in your case:
    192.168.0.1:2000 thats why you get errors
  2. Why don't you want to use standard S7 node that was suggested to you?

What do you mean when you say "multiple connections" ? For instance I've already tried to disable listening or connecting node in order to see if it will change smth, but no.

For the S7 node, I've tried to use it too, but for a reason that I would not know to explain, it doesn't work... I will try with slot 1 but I don't think it will work.

I think you are mixing some things: what you are listening right now is OUC.
image

Examples for this communication can be found here:

This mechanism is used for event based stuff where you have to create strings.

For 90% of use cases where you need to read/write data from PLC you use
image

probably the same manual you were referring to.

For connection to PLC in this mode, use S7 node which was recommended, slot1, port:102.
If something is wrong then there are a lot of video tutorials and forum posts related to this topic.

1 Like