Ewon Flexy script for pulscounter

Hello,

Could someone help us with a script for counting pulses from a flowmeter and set this is l/min please?
With this value we would like to activatie a pump
-> every x liter the pump must turn x seconds.

thanks
,
Danny

Hi Danny,

I think I kind of have an idea on what you’re looking for. You should be able to do something like this. I’m going to have you create 3 tags: Pulse, Counter, and Rotations.

Onchange “Pulse”, “@Pulse_Counter()”

Function Pulse_Counter()

if Pulse@ = 1 then // when the pulse value goes high it causes the counter to go up by 1
counter@ = counter@ + 1
endif

Rotations@ = Counter@

Endfn