AnsweredAssumed Answered

AF and tag average over complex time intervals

Question asked by MCWilson63 on Sep 13, 2012
Latest reply on Sep 13, 2012 by mariamp

How would you set up an AF attribute so that is shows the average over another tag instead of over a time interval???

The example situation is a conveyor which carries coal, there is an on-line measurement of the ash% and tonnes/hour as the coal travels over the conveyor.
The goal is to know the %Ash for the last 100 tonnes of coal that went over the conveyor.

I made a performance equation tag to find the time since 100 tonnes went over the belt (restricted search to the last 7days), then average the ash% over that time. Its scheduled every 10min.
The issue is that the TagAvg function includes 0’s when calculating, so if there is no coal for 5 min then the average is not quite right…

P.E. = TagAvg('ash_percent'),FindEq('tonnes_total','-7d','*',TagVal('tonnes_total')-100),'*')

Is there a better way to get the average ash for the last x tonnes over conveyor into an AF tag???