Function Node undefined

Hello im trying to defined the two values that comes from each counter, but there isn´t a topic so the Function doesn´t know which value to use. What i want to do is simple, in the Function node i need to do a simple calculation with the values that comes from the two counters, but i can´t create a variable "var on=payload.counter1 " and "var marcha=payload.counter2".

I created a function where i defined a variable to each payload that comes out of the counter, and then i have a FUNCTION where i try to call the variables of each function but still is undefined.
Im new in node red, hopefully some of you could help me out!

See this article in the cookbook for an example of how to join messages into one object.

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