Msg.payload for TimerTag.PRE & TimerTag.ACC from Rockwell PLC

These two tags were defined in my eth-ip node and I can see their values in debug. How can I pass these values using msg.payload?

It would be easier if you showed the dubg so we can be sure of the property names.
So in a chnage node.
set msg. payload
to value of msg. TimerTag.PRE

There’s a great page in the docs (Working with messages : Node-RED) that will explain how to use the debug panel to find the right path and value to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

Thank you for your suggestion!
I did not need to use the change node.

Its needed syntax is msg.payload["TimerTag.ACC"]

[
    {
        "id": "92f84c2279a8c4b9",
        "type": "eth-ip in",
        "z": "d92a57752d6bc843",
        "endpoint": "dfecf1530cd22ce7",
        "mode": "all",
        "variable": "",
        "program": "",
        "name": "L30ER_PLC",
        "x": 139,
        "y": 57,
        "wires": [
            [
                "3c14b97a237b36d0"
            ]
        ]
    },
    {
        "id": "31572d115a93c089",
        "type": "change",
        "z": "d92a57752d6bc843",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "TimerTag.PRE",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "TimerTag.ACC",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 440,
        "y": 40,
        "wires": [
            []
        ]
    },
    {
        "id": "e793a7de09997f80",
        "type": "debug",
        "z": "d92a57752d6bc843",
        "name": "debug 6",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 360,
        "y": 200,
        "wires": []
    },
    {
        "id": "3c14b97a237b36d0",
        "type": "function",
        "z": "d92a57752d6bc843",
        "name": "node status",
        "func": "node.status({fill:\"green\", shape:\"dot\", text:\"Value: \"+msg.payload[\"TimerTag.ACC\"]});\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 470,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "dfecf1530cd22ce7",
        "type": "eth-ip endpoint",
        "address": "10.10.10.11",
        "slot": "0",
        "cycletime": "500",
        "name": "L30ER",
        "vartable": {
            "": {
                "TimerTag.ACC": {
                    "type": "DINT"
                },
                "TimerTag.PRE": {
                    "type": "DINT"
                }
            }
        }
    }
]

Noted that if you are using 'st-ethernet-ip' module, the payload tag is really straight forward.

msg.payload. TimerTag.PRE

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