I have a flow transmitter showing flow. I want to use a totaliser function to calculate the daily flow. It should start counting at 8:00Am and calculates till next morning 7:59AM then resets the counter to zero for another 24 hour cycle. Can anyone help in building the logic in Control Builder 4.1.0.
Voted best answer
Its just an integrator. Use an "IntegratorReal" ( or INT if this is AC400) and set the gain to match the scaling factor for converting flow rate ( eg litres/min ) to totalizer rate ( ie day ). Use a timer to reset the totalizer with the "track" ( or BAL ) function.
Or just something like ...
Total := Total + current_flow*scale_factor*GetCurrentExecutionInterval();
if Day_Change then
Prev_Day := Total;