Allen Bradley PLC variable

Hello,
I have the following problem I get values from an Allen Bradley PLC.
If I want to use several variables in one function at the same time, it usually works like this:
this is output:
msg.payload = 22
msg.topic = 'value1'
if I now want to process the value in a function I do that by doing the following:

var test = msg.payload.value1

But a day at Allen Bradley looks like this e.g.
Local: 4: I.Ch0Data -> that is the topic

How can I achieve this?
If I do the following:
var test = msg.payload.Local: 4: I.Ch0Data
I get an error.

Is there a way that works?

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Thanks for pointing this out, but I can't find a solution to my problem there.
what do I have to do the node-red that puts together
"msg.payload.Local: 4: I.Ch0Data"

Have you tried the " Change" node?

What do you mean by that

I assume he meant that you can use a Change node to do what you want. However I am not clear exactly what data you have to start with. Can you feed the message you have into a Debug node set to show Complete Message and show us what it shows please. Then tell us for that example exactly what you want to see in msg.payload (assuming that is where you want it).

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