1 Reply Latest reply on Jan 22, 2015 9:51 PM by bbregenzer

    How would I create a running average PI totalizer tag triggered by an event?

    slm2

      How would I create an 8-hour running average PI Totalizer tag triggered by an event?  When an event occurs, I need the totalizer to do an 8-hour average of the source tag and store the value at the event trigger time.

        • Re: How would I create a running average PI totalizer tag triggered by an event?
          bbregenzer

          Hi, Sandra.

          If I understand you correctly, you want a backwards looking average of the tag calculated whenever a new value comes in.  For example, if sinusoid gets a new value at noon, then you want a tag that calculates the average of sinusoid from 4AM to noon.  If that is the case, then you can use an Expression Analysis in AF (recommended) or a PE tag on the Data Archive server with a PE syntax like: TagAvg('sinusoid','*-8h','*').  Use Event Based (Natural) scheduling for the calculation so that it is triggered whenever a new value of the tag comes in.

          Also, if you don't need the values written back to a tag and prefer to view the values on demand through a client, you can use the Average summary method (select Average for the By Time Range field) with a PI Point Data Reference in AF.  Be sure to use Time Range Override for the By Time field and a Relative Time of *-8h.  See the screenshot:

          1 of 1 people found this helpful