S7 Out [Send the Variable List in Run Time]

To write in PLC using S7 Out I have to write all Variables in it and before this code, I have to make to array one for variables and another for values (payload)

Desired Output: I want to remove the variables from the S7 out and send it from the prepare Data function.

[
    {
        "id": "247e3fda1f9e7969",
        "type": "inject",
        "z": "4b831203ffade23e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 280,
        "y": 260,
        "wires": [
            [
                "31c124bf7d9a7e81"
            ]
        ]
    },
    {
        "id": "74629abe4d903824",
        "type": "function",
        "z": "4b831203ffade23e",
        "name": "Prepare Data",
        "func": "msg.payload = [msg.payload[0].Program_ID,\nmsg.payload[0].JOB_ID,\nmsg.payload[0].Length];\nmsg.variable = [\n    'PROGRAM',\n    'JOB',\n    'LENGTH'\n];\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 810,
        "y": 260,
        "wires": [
            [
                "3fefac4934f9933f"
            ]
        ]
    },
    {
        "id": "3b0dab24c63581d8",
        "type": "MSSQL",
        "z": "4b831203ffade23e",
        "mssqlCN": "4c7d57acebd0dde5",
        "name": "",
        "outField": "payload",
        "returnType": 0,
        "throwErrors": 1,
        "query": "SELECT TOP 1 Program_ID\r\n,JOB_ID\r\n,Length\r\n,LEFT(JOB_CODE, 40) AS JOB_CODE\r\n,LEFT((LEFT(HEAT_CODE, CHARINDEX('**', HEAT_CODE) - 1)), 30) AS HEAT_CODE\r\nFROM PRD_BUNDLE_5\r\nORDER BY ID DESC",
        "modeOpt": "queryMode",
        "modeOptType": "query",
        "queryOpt": "payload",
        "queryOptType": "msg",
        "paramsOpt": "queryParams",
        "paramsOptType": "msg",
        "rows": "rows",
        "rowsType": "msg",
        "parseMustache": true,
        "params": [],
        "x": 580,
        "y": 260,
        "wires": [
            [
                "74629abe4d903824",
                "54a129af06f067ae"
            ]
        ]
    },
    {
        "id": "31c124bf7d9a7e81",
        "type": "function",
        "z": "4b831203ffade23e",
        "name": "Query",
        "func": "msg.payload = `SELECT TOP 1 Program_ID\n,JOB_ID\n,Length\n,LEFT(JOB_CODE, 40) AS JOB_CODE\n,LEFT((LEFT(HEAT_CODE, CHARINDEX('**', HEAT_CODE) - 1)), 30) AS HEAT_CODE\nFROM PRD_BUNDLE_5\nORDER BY ID DESC`\n\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 410,
        "y": 260,
        "wires": [
            [
                "3b0dab24c63581d8"
            ]
        ]
    },
    {
        "id": "3fefac4934f9933f",
        "type": "s7 out",
        "z": "4b831203ffade23e",
        "endpoint": "1dc3de29454f834f",
        "variable": "",
        "name": "Write on Datablock  DB1010 on PLC E63",
        "x": 1080,
        "y": 260,
        "wires": []
    },
    {
        "id": "acef96b68e69f3b2",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "PROGRAM",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload.value[0]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 910,
        "y": 440,
        "wires": []
    },
    {
        "id": "2dc94d561f26692d",
        "type": "inject",
        "z": "4b831203ffade23e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 440,
        "y": 500,
        "wires": [
            [
                "0a38762e95466403",
                "6317c8e82f50273e",
                "7cc1ccbc7533d728"
            ]
        ]
    },
    {
        "id": "0a38762e95466403",
        "type": "s7comm read",
        "z": "4b831203ffade23e",
        "connection": "cb814bd938d11a92",
        "payload": "{\"S7_Type\":\"DB\",\"S7_DBnum\":\"1010\",\"S7_Datatype\":\"DI\",\"S7_Offset\":\"102\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"PROGRAM\"}",
        "s7Name": "PROGRAM",
        "topic": "",
        "name": "READ PROGRAM",
        "signalSetted": false,
        "none": "true",
        "repeat": "",
        "once": false,
        "x": 730,
        "y": 440,
        "wires": [
            [
                "acef96b68e69f3b2"
            ]
        ]
    },
    {
        "id": "d0d9eb5006fd4653",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "JOB",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload.value[0]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 890,
        "y": 500,
        "wires": []
    },
    {
        "id": "6317c8e82f50273e",
        "type": "s7comm read",
        "z": "4b831203ffade23e",
        "connection": "cb814bd938d11a92",
        "payload": "{\"S7_Type\":\"DB\",\"S7_DBnum\":\"1010\",\"S7_Datatype\":\"DI\",\"S7_Offset\":\"106\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"JOB\"}",
        "s7Name": "JOB",
        "topic": "",
        "name": "READ JOB",
        "signalSetted": false,
        "none": "true",
        "repeat": "",
        "once": false,
        "x": 710,
        "y": 500,
        "wires": [
            [
                "d0d9eb5006fd4653"
            ]
        ]
    },
    {
        "id": "6875b4aeb3ef8052",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "LENGTH",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload.value[0]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 580,
        "wires": []
    },
    {
        "id": "7cc1ccbc7533d728",
        "type": "s7comm read",
        "z": "4b831203ffade23e",
        "connection": "cb814bd938d11a92",
        "payload": "{\"S7_Type\":\"DB\",\"S7_DBnum\":\"1010\",\"S7_Datatype\":\"DI\",\"S7_Offset\":\"110\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"LENGTH\"}",
        "s7Name": "LENGTH",
        "topic": "",
        "name": "READ LENGTH",
        "signalSetted": false,
        "none": "true",
        "repeat": "",
        "once": false,
        "x": 720,
        "y": 580,
        "wires": [
            [
                "6875b4aeb3ef8052"
            ]
        ]
    },
    {
        "id": "54a129af06f067ae",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 780,
        "y": 200,
        "wires": []
    },
    {
        "id": "4c7d57acebd0dde5",
        "type": "MSSQL-CN",
        "z": "4b831203ffade23e",
        "tdsVersion": "7_4",
        "name": "Connection_RML",
        "server": "172.31.51.100",
        "port": "1433",
        "encyption": false,
        "trustServerCertificate": false,
        "database": "SUEZSTEELRM_RML",
        "useUTC": false,
        "connectTimeout": "15000",
        "requestTimeout": "15000",
        "cancelTimeout": "5000",
        "pool": "5",
        "parseJSON": false,
        "enableArithAbort": true
    },
    {
        "id": "1dc3de29454f834f",
        "type": "s7 endpoint",
        "transport": "iso-on-tcp",
        "address": "172.31.51.13",
        "port": "102",
        "rack": "0",
        "slot": "4",
        "localtsaphi": "01",
        "localtsaplo": "00",
        "remotetsaphi": "01",
        "remotetsaplo": "00",
        "connmode": "rack-slot",
        "adapter": "",
        "busaddr": "2",
        "cycletime": "1000",
        "timeout": "2000",
        "name": "Write on DatablocK  DB1010 on PLC E63",
        "vartable": [
            {
                "addr": "DB1010,DINT102",
                "name": "PROGRAM"
            },
            {
                "addr": "DB1010,DINT106",
                "name": "JOB"
            },
            {
                "addr": "DB1010,DINT110",
                "name": "LENGTH"
            }
        ]
    },
    {
        "id": "cb814bd938d11a92",
        "type": "s7comm",
        "ip": "172.31.51.13",
        "port": "102",
        "rack": "0",
        "slot": "4",
        "payload": [
            {
                "S7_Type": "DB",
                "S7_DBnum": "1010",
                "S7_Datatype": "DI",
                "S7_Offset": "102",
                "S7_BitOffset": "0",
                "S7_Quantity": "1",
                "S7_Name": "PROGRAM"
            },
            {
                "S7_Type": "DB",
                "S7_DBnum": "1010",
                "S7_Datatype": "DI",
                "S7_Offset": "106",
                "S7_BitOffset": "0",
                "S7_Quantity": "1",
                "S7_Name": "JOB"
            },
            {
                "S7_Type": "DB",
                "S7_DBnum": "1010",
                "S7_Datatype": "DI",
                "S7_Offset": "110",
                "S7_BitOffset": "0",
                "S7_Quantity": "1",
                "S7_Name": "LENGTH"
            }
        ]
    }
]

Hi,

It doesn't help anyone you including the PLC node.

I am missing what you mean.

I get a payload which looks like:

[{"variable":"DB1010,DINT102","value":55},{"variable":"DB1010,DINT110","value":1200}]

I can't see any S7 in there.

Reading - again - your post, you want to get TWO messages and combine them into one and send it out.

In your new example flow, get/use two inject nodes that send the two messages and do NOT include the PLC node.

Actually, (sorry), just paste the two messages you want to combine.

That may be easier for anyone to look at and suggest solutions.

I upload the
Write json code of flow.txt (9.8 KB)
wrong json....So Sorry

[
    {
        "id": "247e3fda1f9e7969",
        "type": "inject",
        "z": "4b831203ffade23e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 280,
        "y": 260,
        "wires": [
            [
                "31c124bf7d9a7e81"
            ]
        ]
    },
    {
        "id": "74629abe4d903824",
        "type": "function",
        "z": "4b831203ffade23e",
        "name": "Prepare Data",
        "func": "msg.payload = [msg.payload[0].Program_ID,\nmsg.payload[0].JOB_ID,\nmsg.payload[0].Length];\nmsg.variable = [\n    'PROGRAM',\n    'JOB',\n    'LENGTH'\n];\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 810,
        "y": 260,
        "wires": [
            [
                "3fefac4934f9933f"
            ]
        ]
    },
    {
        "id": "3b0dab24c63581d8",
        "type": "MSSQL",
        "z": "4b831203ffade23e",
        "mssqlCN": "4c7d57acebd0dde5",
        "name": "",
        "outField": "payload",
        "returnType": 0,
        "throwErrors": 1,
        "query": "SELECT TOP 1 Program_ID\r\n,JOB_ID\r\n,Length\r\n,LEFT(JOB_CODE, 40) AS JOB_CODE\r\n,LEFT((LEFT(HEAT_CODE, CHARINDEX('**', HEAT_CODE) - 1)), 30) AS HEAT_CODE\r\nFROM PRD_BUNDLE_5\r\nORDER BY ID DESC",
        "modeOpt": "queryMode",
        "modeOptType": "query",
        "queryOpt": "payload",
        "queryOptType": "msg",
        "paramsOpt": "queryParams",
        "paramsOptType": "msg",
        "rows": "rows",
        "rowsType": "msg",
        "parseMustache": true,
        "params": [],
        "x": 580,
        "y": 260,
        "wires": [
            [
                "74629abe4d903824",
                "54a129af06f067ae"
            ]
        ]
    },
    {
        "id": "31c124bf7d9a7e81",
        "type": "function",
        "z": "4b831203ffade23e",
        "name": "Query",
        "func": "msg.payload = `SELECT TOP 1 Program_ID\n,JOB_ID\n,Length\n,LEFT(JOB_CODE, 40) AS JOB_CODE\n,LEFT((LEFT(HEAT_CODE, CHARINDEX('**', HEAT_CODE) - 1)), 30) AS HEAT_CODE\nFROM PRD_BUNDLE_5\nORDER BY ID DESC`\n\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 410,
        "y": 260,
        "wires": [
            [
                "3b0dab24c63581d8"
            ]
        ]
    },
    {
        "id": "3fefac4934f9933f",
        "type": "s7 out",
        "z": "4b831203ffade23e",
        "endpoint": "1dc3de29454f834f",
        "variable": "",
        "name": "Write on Datablock  DB1010 on PLC E63",
        "x": 1080,
        "y": 260,
        "wires": []
    },
    {
        "id": "acef96b68e69f3b2",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "PROGRAM",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload.value[0]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 910,
        "y": 440,
        "wires": []
    },
    {
        "id": "2dc94d561f26692d",
        "type": "inject",
        "z": "4b831203ffade23e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 440,
        "y": 500,
        "wires": [
            [
                "0a38762e95466403",
                "6317c8e82f50273e",
                "7cc1ccbc7533d728"
            ]
        ]
    },
    {
        "id": "0a38762e95466403",
        "type": "s7comm read",
        "z": "4b831203ffade23e",
        "connection": "cb814bd938d11a92",
        "payload": "{\"S7_Type\":\"DB\",\"S7_DBnum\":\"1010\",\"S7_Datatype\":\"DI\",\"S7_Offset\":\"102\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"PROGRAM\"}",
        "s7Name": "PROGRAM",
        "topic": "",
        "name": "READ PROGRAM",
        "signalSetted": false,
        "none": "true",
        "repeat": "",
        "once": false,
        "x": 730,
        "y": 440,
        "wires": [
            [
                "acef96b68e69f3b2"
            ]
        ]
    },
    {
        "id": "d0d9eb5006fd4653",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "JOB",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload.value[0]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 890,
        "y": 500,
        "wires": []
    },
    {
        "id": "6317c8e82f50273e",
        "type": "s7comm read",
        "z": "4b831203ffade23e",
        "connection": "cb814bd938d11a92",
        "payload": "{\"S7_Type\":\"DB\",\"S7_DBnum\":\"1010\",\"S7_Datatype\":\"DI\",\"S7_Offset\":\"106\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"JOB\"}",
        "s7Name": "JOB",
        "topic": "",
        "name": "READ JOB",
        "signalSetted": false,
        "none": "true",
        "repeat": "",
        "once": false,
        "x": 710,
        "y": 500,
        "wires": [
            [
                "d0d9eb5006fd4653"
            ]
        ]
    },
    {
        "id": "6875b4aeb3ef8052",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "LENGTH",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload.value[0]",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 580,
        "wires": []
    },
    {
        "id": "7cc1ccbc7533d728",
        "type": "s7comm read",
        "z": "4b831203ffade23e",
        "connection": "cb814bd938d11a92",
        "payload": "{\"S7_Type\":\"DB\",\"S7_DBnum\":\"1010\",\"S7_Datatype\":\"DI\",\"S7_Offset\":\"110\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"LENGTH\"}",
        "s7Name": "LENGTH",
        "topic": "",
        "name": "READ LENGTH",
        "signalSetted": false,
        "none": "true",
        "repeat": "",
        "once": false,
        "x": 720,
        "y": 580,
        "wires": [
            [
                "6875b4aeb3ef8052"
            ]
        ]
    },
    {
        "id": "54a129af06f067ae",
        "type": "debug",
        "z": "4b831203ffade23e",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 780,
        "y": 200,
        "wires": []
    },
    {
        "id": "4c7d57acebd0dde5",
        "type": "MSSQL-CN",
        "z": "4b831203ffade23e",
        "tdsVersion": "7_4",
        "name": "Connection_RML",
        "server": "172.31.51.100",
        "port": "1433",
        "encyption": false,
        "trustServerCertificate": false,
        "database": "SUEZSTEELRM_RML",
        "useUTC": false,
        "connectTimeout": "15000",
        "requestTimeout": "15000",
        "cancelTimeout": "5000",
        "pool": "5",
        "parseJSON": false,
        "enableArithAbort": true
    },
    {
        "id": "1dc3de29454f834f",
        "type": "s7 endpoint",
        "transport": "iso-on-tcp",
        "address": "172.31.51.13",
        "port": "102",
        "rack": "0",
        "slot": "4",
        "localtsaphi": "01",
        "localtsaplo": "00",
        "remotetsaphi": "01",
        "remotetsaplo": "00",
        "connmode": "rack-slot",
        "adapter": "",
        "busaddr": "2",
        "cycletime": "1000",
        "timeout": "2000",
        "name": "Write on DatablocK  DB1010 on PLC E63",
        "vartable": [
            {
                "addr": "DB1010,DINT102",
                "name": "PROGRAM"
            },
            {
                "addr": "DB1010,DINT106",
                "name": "JOB"
            },
            {
                "addr": "DB1010,DINT110",
                "name": "LENGTH"
            }
        ]
    },
    {
        "id": "cb814bd938d11a92",
        "type": "s7comm",
        "ip": "172.31.51.13",
        "port": "102",
        "rack": "0",
        "slot": "4",
        "payload": [
            {
                "S7_Type": "DB",
                "S7_DBnum": "1010",
                "S7_Datatype": "DI",
                "S7_Offset": "102",
                "S7_BitOffset": "0",
                "S7_Quantity": "1",
                "S7_Name": "PROGRAM"
            },
            {
                "S7_Type": "DB",
                "S7_DBnum": "1010",
                "S7_Datatype": "DI",
                "S7_Offset": "106",
                "S7_BitOffset": "0",
                "S7_Quantity": "1",
                "S7_Name": "JOB"
            },
            {
                "S7_Type": "DB",
                "S7_DBnum": "1010",
                "S7_Datatype": "DI",
                "S7_Offset": "110",
                "S7_BitOffset": "0",
                "S7_Quantity": "1",
                "S7_Name": "LENGTH"
            }
        ]
    }
]

So sorry, is that a valid flow for your problem or not?

If not, delete it - as you are the one who created it - and put the one which is.

No worries.

We all make mistakes.

Yes .. it valid
In my Code, I enter the Variable List twice

  1. one in the S7 out
  2. second I enter in the Prepare Data set the variable name and its value

You seem to have two other threads active too.

I think this is kind of out dated by the others.

Have you tested it out sending the data as single data point instead of an array. I am not 100 percent sure that it can take an array. I could be wrong, but these would be the troubleshooting steps I would take.

It looks to me that it would take the array instead as separate messages.

  • All variables, one per message: Like the Single variable mode, but for all variables configured. If diff is checked, a message is sent everytime any variable changes. If diff is unchecked, one message is sent for every variable, in every cycle. Care must be taken about the number of messages per second in this mode.

Grey

Just to clarify:
Do you want to send dynamic variables (address assigned to variable symbolic name changes)?
Do you want to have a complete list of variables in S7out (Var1,Var2,Var3....) and just point to your desired variable (Var1,Var3) with function node?

[{"id":"ffc412ca.67fd4","type":"s7 in","z":"8fac4a2949790ae2","endpoint":"9305c140.f7da9","mode":"single","variable":"SEND.STATUS1","diff":true,"name":"","x":220,"y":1760,"wires":[["61abca25.ceea64"]]},{"id":"8cf7aa4b.2f2938","type":"change","z":"8fac4a2949790ae2","name":"","rules":[{"t":"set","p":"variable","pt":"msg","to":"topic","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":556,"y":1756,"wires":[["a8de828b.5c4a2"]]},{"id":"61abca25.ceea64","type":"function","z":"8fac4a2949790ae2","name":"SEND","func":"var topic = msg.topic\nvar value = msg.payload;\n\nvar arr_topic = topic.split(\".\")\narr_topic[0] = arr_topic[0].toUpperCase();\nif (arr_topic[0] == \"SEND\")\n{\n    var new_topic = \"RCV.\"+arr_topic[1]\n    msg.topic = new_topic;\n    msg.payload = value;\n    return msg;\n}","outputs":1,"noerr":0,"x":387,"y":1760,"wires":[["8cf7aa4b.2f2938","8af06c87.7f91"]]},{"id":"a8de828b.5c4a2","type":"s7 out","z":"8fac4a2949790ae2","endpoint":"79d98792.3696f8","variable":"","name":"","x":724,"y":1753,"wires":[]},{"id":"8af06c87.7f91","type":"debug","z":"8fac4a2949790ae2","name":"","active":false,"console":"false","complete":"true","x":580,"y":1804,"wires":[]},{"id":"e6feaac8.f5d228","type":"s7 in","z":"8fac4a2949790ae2","endpoint":"9305c140.f7da9","mode":"single","variable":"SEND.STATUS2","diff":true,"name":"","x":219,"y":1806,"wires":[["61abca25.ceea64"]]},{"id":"9305c140.f7da9","type":"s7 endpoint","address":"192.168.1.161","port":"102","rack":"0","slot":"2","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","cycletime":"500","timeout":"2000","name":"OCME","vartable":[{"addr":"DB9,X128.0","name":"RCV.Data_save"},{"addr":"DB9,X128.1","name":"RCV.Data_delete"},{"addr":"DB9,X128.2","name":"RCV.Auto1"},{"addr":"DB9,X128.3","name":"RCV.Manual1"},{"addr":"DB9,X128.4","name":"RCV.Auto2"},{"addr":"DB9,X128.5","name":"RCV.Manual2"},{"addr":"DB9,X128.6","name":"RCV.Auto3"},{"addr":"DB9,X128.7","name":"RCV.Manual3"},{"addr":"DB9,X129.0","name":"RCV.M505_ManFw"},{"addr":"DB9,X129.1","name":"RCV.M505_ManBw"},{"addr":"DB9,X129.2","name":"RCV.M520_ManFw"},{"addr":"DB9,X129.3","name":"RCV.M520_ManBw"},{"addr":"DB9,X129.4","name":"RCV.M525_ManFw"},{"addr":"DB9,X129.5","name":"RCV.M525_ManBw"},{"addr":"DB9,X129.6","name":"RCV.M545_ManFw"},{"addr":"DB9,X129.7","name":"RCV.M545_ManBw"},{"addr":"DB9,X130.0","name":"RCV.Cmd0"},{"addr":"DB9,X130.1","name":"RCV.Cmd1"},{"addr":"DB9,X130.2","name":"RCV.Cmd2"},{"addr":"DB9,X130.3","name":"RCV.Cmd3"},{"addr":"DB9,X130.4","name":"RCV.Cmd4"},{"addr":"DB9,X130.5","name":"RCV.Cmd5"},{"addr":"DB9,X130.6","name":"RCV.Cmd6"},{"addr":"DB9,X130.7","name":"RCV.Cmd7"},{"addr":"DB9,X131.0","name":"RCV.Cmd8"},{"addr":"DB9,X131.1","name":"RCV.Cmd9"},{"addr":"DB9,X131.2","name":"RCV.Cmd10"},{"addr":"DB9,X131.3","name":"RCV.Cmd11"},{"addr":"DB9,X131.4","name":"RCV.Cmd12"},{"addr":"DB9,X131.5","name":"RCV.Cmd13"},{"addr":"DB9,X131.6","name":"RCV.Cmd14"},{"addr":"DB9,X131.7","name":"RCV.Cmd15"},{"addr":"DB9,INT132","name":"RCV.POS_NO"},{"addr":"DB9,INT134","name":"RCV.SPARE"},{"addr":"DB9,INT136","name":"RCV.SPARE1"},{"addr":"DB9,INT138","name":"RCV.SPARE2"},{"addr":"DB9,INT140","name":"RCV.SPARE3"},{"addr":"DB9,INT142","name":"RCV.SPARE4"},{"addr":"DB9,INT144","name":"RCV.SPARE5"},{"addr":"DB9,DINT148","name":"RCV.PALLET_ID"},{"addr":"DB9,INT156","name":"RCV.PALLET_PRESENCE"},{"addr":"DB9,INT226","name":"RCV.LINE_ID"},{"addr":"DB9,INT158","name":"RCV.WRAP"},{"addr":"DB9,INT162","name":"RCV.STACKER_EN"},{"addr":"DB9,INT228","name":"RCV.PALLET_FULL"},{"addr":"DB9,DWORD0","name":"SEND.STATUS1"},{"addr":"DB9,DWORD4","name":"SEND.STATUS2"},{"addr":"DB9,DWORD8","name":"SEND.ALARMS"},{"addr":"DB9,INT12","name":"SEND.ZONE1"},{"addr":"DB9,INT14","name":"SEND.ZONE2"},{"addr":"DB9,INT16","name":"SEND.ZONE3"},{"addr":"DB9,INT18","name":"SEND.SPARE"},{"addr":"DB9,INT20","name":"SEND.SPARE1"},{"addr":"DB9,INT22","name":"SEND.SPARE2"},{"addr":"DB9,INT24","name":"SEND.SPARE3"},{"addr":"DB9,INT26","name":"SEND.SPARE4"},{"addr":"DB9,DINT30","name":"SEND.PALLET_ID"},{"addr":"DB9,INT38","name":"SEND.PALLET_PRESENCE"},{"addr":"DB9,INT108","name":"SEND.LINE_ID"},{"addr":"DB9,INT40","name":"SEND.WRAP"},{"addr":"DB9,INT44","name":"SEND.STACKER_EN"},{"addr":"DB9,INT110","name":"SEND.PALLET_FULL"}]},{"id":"79d98792.3696f8","type":"s7 endpoint","transport":"iso-on-tcp","address":"10.88.2.10","port":"102","rack":"0","slot":"1","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","adapter":"","busaddr":"","cycletime":"500","timeout":"2000","name":"H_HMI","vartable":[{"addr":"DB99,DWORD0","name":"RCV.STATUS1"},{"addr":"DB99,DWORD4","name":"RCV.STATUS2"},{"addr":"DB99,DWORD8","name":"RCV.ALARMS"},{"addr":"DB99,INT12","name":"RCV.ZONE1"}]}]

image

Here is example where I point into defined variables. But it is only for single variables, so not fully what you need. It just passes data from one endpoint to another.

As for array of variables I can only suggest to try what is written under node details:
image

so my guess: msg.variable = ["VAR1", "VAR2"] msg.payload = [0,1] return msg;

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