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

**URL:** <https://discourse.nodered.org/t/msg-payload-for-timertag-pre-timertag-acc-from-rockwell-plc/83013>\
**Category:** General\
**Created:** [19 November 2023 16:33 UTC](https://discourse.nodered.org/t/msg-payload-for-timertag-pre-timertag-acc-from-rockwell-plc/83013 "2023-11-19T16:33:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bachphi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bachphi/32/104849_2.png) [@bachphi](https://discourse.nodered.org/u/bachphi)\
**Post date:** [19 November 2023 16:33 UTC](https://discourse.nodered.org/t/msg-payload-for-timertag-pre-timertag-acc-from-rockwell-plc/83013/1 "2023-11-19T16:33:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [19 November 2023 16:39 UTC](https://discourse.nodered.org/t/msg-payload-for-timertag-pre-timertag-acc-from-rockwell-plc/83013/2 "2023-11-19T16:39:37Z")

</div>

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](https://nodered.org/docs/user-guide/messages)) 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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

---

<div class="post-metadata">

**Author:** ![bachphi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bachphi/32/104849_2.png) [@bachphi](https://discourse.nodered.org/u/bachphi)\
**Post date:** [19 November 2023 17:27 UTC](https://discourse.nodered.org/t/msg-payload-for-timertag-pre-timertag-acc-from-rockwell-plc/83013/3 "2023-11-19T17:27:38Z")

</div>

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

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

```auto
[
    {
        "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"
                }
            }
        }
    }
]

```

---

<div class="post-metadata">

**Author:** ![bachphi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bachphi/32/104849_2.png) [@bachphi](https://discourse.nodered.org/u/bachphi)\
**Post date:** [23 November 2023 17:32 UTC](https://discourse.nodered.org/t/msg-payload-for-timertag-pre-timertag-acc-from-rockwell-plc/83013/4 "2023-11-23T17:32:58Z")

</div>

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

`msg.payload.` `TimerTag.PRE`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 December 2023 17:33 UTC](https://discourse.nodered.org/t/msg-payload-for-timertag-pre-timertag-acc-from-rockwell-plc/83013/5 "2023-12-07T17:33:11Z")

</div>

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