4 Replies Latest reply on Aug 28, 2018 7:49 PM by tmcmanus

    How to build and 'all-time' totaliser in PI AF?

    simonsmith0912

      I just want to build a simple totaliser type analysis that sums all time number of hours a pump has been in service (I have a tag that is 0 or 1 depending on if the pump is in service). What is the best way to do this?

        • Re: How to build and 'all-time' totaliser in PI AF?
          rzandvliet

          Create an analysis that runs for example every 5 min. And then check the time it is equal to 0 or 1, depending of your needs. See the screenshot for our solution to count the running hours of a pump.

           

          1 of 1 people found this helpful
          • Re: How to build and 'all-time' totaliser in PI AF?
            André Åsheim

            Hi,

            Robert's example is a good approach, to give you some additional information:

            To not overload the PI Data Archive or reach one of the max query parameters (ArcMaxCollect, MaxQueryExecution, etc) always limit the data volume you are querying.

            A good practice (in the real world) is to not query raw data for more than a day at the time. Since this is a 0-1 value with likely not that many values you can likely without issues run it on a entire month (keep in mind how many values there is on the raw tag on many instances you can easily reach arcmaxcollect on just a week of data).

             

             

            I had a draft that was a bit more advanced than Robert's example, Since I already drafted it I can publish it as well:

            Month to date:

            Year to date:

            Total

            1 of 1 people found this helpful