0

ResettingAnchoredInterval with Total2 Aggreggation

I've got a flow, and I want to get get an accumulated daily flow rate. So it goes up and up and up, and at 9am it goes back to zero and starts over. I'm pretty sure I can use ResettingAnchoredInterval. But what aggregation do I use? Total2? TotalPer24Hours?

This totalizing math quickly gets beyond me. What even is the difference between Total2 and TotalPer24Hours?

3 replies

null
    • smason
    • yesterday
    • Reported - view

    Hi ,

    The Total aggregates are usually used when using tags that measure some type of rate. For instance, if your flow tag measures the volume of something per hour, you would use the TotalPerHour aggregate. Under the covers, these aggregates first find the TimeAverage2 value over the given interval, then multiply it by the number of units within the interval.
     

    If we assume your flow tag is measuring gal/hour and you want to estimate the total number of gallons over one day, the TotalPerHour aggregate would first find the average value over that 1-day period, then multiply it by 24 to come up with the estimated total.

    The ResettingAnchoredInterval function allows you to return the accumulated total throughout the day if you want to see that total build. Otherwise, you calculate it once at the end of the day using the preferred Total aggregate. For example, if you want to know the total every hour throughout the day as it builds, set the calc to run periodically every hour and set the interval over which it resets to 1 day within the function itself. There is an optional parameter to shift the interval if need be.

      • Real-Time Manager at CSE ICON
      • damon_vinciguerra.1
      • yesterday
      • Reported - view

       ahhh thanks makes sense.

       

      For the ResettingAnchoredInterval. Say I set it to reset every day at 9am. Say the calc triggers every 10s. Would you expect the value stored at 9am to be the total for the previous 24 hours and the value at 9:00:10 AM to be the total for the first 10s of the new "day"?

      • smason
      • yesterday
      • Reported - view

      Yes. Here's an example of one I just did.

Content aside

print this pagePrint this page
  • yesterdayLast active
  • 3Replies
  • 6Views
  • 2 Following