I am using a flex Getter from "node-red-contrib-modbus". The message it returns is an 8 bit array that looks like this, [true,false,false,false,false,false,false,false]. I am only interested in the first value. How can I separate and ignore the other values?
Ex. When the modbus address is true, It returns: [true,false,false,false,false,false,false,false]
When the modbus address is false, it returns: [false,false,false,false,false,false,false,false]
Use a change node that sets msg.payload as follows:
msg.payload[0]
Thank you for the reply. I will give it a try. I also found an array splitter node that does "more than likely" the same thing. I do prefer to use function nodes though,
The change node will do the trick, no need for a function node.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.