Formula con nodo function

How can I create this formula with a function node

Have a look at the MDN docs for the JavaScript Math object. That has lots of the functions you'll need (like Math.sqrt())

You then need to identify how all of those variables (C Smax Vn etc) are provided to the Function - are they message properties? Constants? And so on.

1 Like

I want Smax, Cn, Vn and CTRn to be non-constant variables and I don't know how to create an array to be able to modify them from a mqtt

Pass Cn, Vn and CTRn in a msg to the function block.

Start small...

Start by inserting these values using in a inject node and passing them to the function node. Once you have the inject + function working, try to get it working with the MQTT values.

As a user new to node-red, I think it would benefit you to watch this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

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