I am trying to calculate flow rate as a function of change of wet well level over time. I have tried using various tags types, adaptations of Ex 3-17 from the Adv Config Workbook, Intgr and Deriv functions; and everything comes up with some kind of errant data: Intgr gave max scale value, Deriv gave 0. Using the following provided the most realistic results:
"[PUMP_RUN] == 1 ? Latch(AbsTime(1, 60, 0), Watch(0, [Wet Well Level]) ? PickValid(ABS([Wet Well Level]) 7.48 [CROSS_SECT], 0) :0 :0"
So for a sewage lift station, the thought was while the pump is running, every 60 sec check the change of the wet well, then take the absolute value of the change and multiply it by 7.48 gal/cuft and by the cross-sectional area to find the gpm. Towards the end of the pump cycle, this was accurate, but at the beginning, this caused 2x greater than the expected value.