I am currently working on a project where I am using a Modbus-Read and a Modbus-Response node in order to receive information from an external equipment.
The equipment is outputting pulses which are then read by the Read node.
Here I have two issues, the first one being able to get a Gauge working with proper values.
What I want here is to read the RPM of an engine, so I want the gauge to display how many revolutions per minute the engine is having. What I am stuck with so far is that it only displays a total amount of counts since it has started, so instead of showing for instance 1500 RPM, it is showing the total value of 30000 revolutions / pulses since it started counting.
Is there any way to change the msg.payload to show the value as pulses per minute instead of the total count?
My string is currently:
With the Change node set up like this:
My gauge is currently showing:
But even thou the engine is active, it still does not show me the current RPM.
The Modbus-Response node receives all the pulses, but does not pass on this info to the gauge.
My second issue is that the engine sends out two pulses for every revolution, so the value would need to be downscaled by a factor of two. For instance, if my engine is running steadily at 2000 RPM, it would send out 4000 pulses per minute.
Appreciate all and any help with these issues.