2 Replies Latest reply on Jun 18, 2018 5:34 PM by jtmp56941

    Calculation interval?

    jtmp56941

      If I am trying to write a PI expression through Tools>Data Sets>PI Calculation Data for a 7 day rolling average of a PI tag, what should I set the Calculation interval at?

       

      Thanks! I'm lost here. First time doing this.

        • Re: Calculation interval?
          afink

          Hi Jennifer,

           

          Welcome to PI Square and the PI community!  The calculation interval refers to how often the 7 day rolling average would be recalculated.  For example, if the calculation interval is 1 hr, then the expression would evaluation every hour, i.e. 12:00, 13:00, 14:00, etc.  So, this setting really depends on your needs and we cannot give explicit recommendations.  The only thing I would recommend is since it is a 7-day rolling average, the calculation interval probably does not need to be very quick.  Maybe on the order of hours would be suitable?  Also keep in mind that this will require querying 7 days worth of archive data and doing the calculation, so having this calculation run very often could have performance impacts on the server as well as the display itself.

           

          All this being said, PI Calculations in ProcessBook are a very old technology/implementation, and should be used sparingly.  Oftentimes, if you are using a rolling average for a tag likely others in the organization would also benefit from this information.  For these reasons, using PI Asset Framework (AF) to create an analysis to do this would likely be a much better approach.  Here are a few reasons why an AF analysis would be better.  Do you have AF and Analysis Service available at your site?  If so, here is a good video on getting started with AF Analysis Service.  There is also a free AF Analysis course available here on PI Square which you may find very helpful.

           

          1. AF and AF Analyses are being actively developed and getting bug fixes/new features

          2. The result history of the calculation can be stored in a PI Tag

          3. Multiple users can benefit from the calculation (not just your display)

          4. Analysis service is specifically designed to handle many calculations efficiently

           

          Hope this helps,

          Adam Fink

          2 of 2 people found this helpful