Hey Guys, long time no post...
I have a new flow meter on a water system setup I am running on Mango.
It's a pulse flow meter, I don't know how many pulses per litre at this stage but I can work that out by watching the level in the tank over a time period.
The issue I have is the digital input on my RTU (Moxa E1212) is 2 byte unsigned, and with the current resolution I have monitoring the pulses it go's over 65000 pulses rather quickly and resets back to 0 then counts again.
I've got Mango reading this value, and it's accurate, however I'm basically wanting to read the value and set something to say yes the pump is running. We're not too worried about flow rates as we can work this out from the water going into the tank upstream.
Do you think it would be easiest to achieve this with some more lines in my script? I'm not sure how to write in script form the following:
if flowmeter value now is more than flowmeter value 10 seconds ago, then set value of point to 1 or if flowmeter value now is the same as flowmeter value 10 seconds ago, then set value of point to 0
Something along those lines anyway. The main issue we have is a solar pump in the system has a nice control panel on the front of it, but no external indication to tell us the pump is running :(