I’m using the Integral Sensor to integrate the sum of 2 power values in Watts. The Integral Sensor is used as an input to a Utility Meter with a daily meter reset cycle. The utility meter resets to 0 daily. However, the integral sensor value continues to increase. I would like to automate resetting the integral sensor to 0. How do I do that?
Why do I want to reset the integral sensor? If left operating long enough the integral sensor value will increase so much that small values can no longer be added to it. For example if X is the sensor value, when X is large enough (X+1)-X != 1. For a C++ float variable this happens a little after 1x10^7 (10,000,000). For a C++ double variable this happens a little after 1x10^15.
If I assume the Integral Sensor result is stored in a float, and that my energy increases by 40 kWh/day, then I will start to experience a precision loss around day 250 (10,000,000/40,000). The precision loss can be avoided by resetting the Integral Sensor to 0 periodically, which the Utility Meter input design supports.