2 Replies Latest reply on Aug 21, 2017 6:01 PM by nifernando

    Question about how to set analytics for real-time.

    AMarques

      I am working on exercise 1 and 2, but i have some doubts how to set properly the analyses.

      Exercise 1:

      • For my plant our workday is 6:00 a.m to 6:00 am of next day.

      For set a Total uptime of a process over a 24-hour period. We can use TimeEq('Status','*-24h','*',"Run")/3600  or TimeEq('Status','y+6h','t+6h',"Run")/3600 (Hour), set scheduling to periodic run every day at 06:00 and output time stamp override: -1d. This calculation only show the uptime for the last day, if i want to know the uptime of current day starting at 6:00 a.m how we can set this up? I have try to do TimeEq('Status','t+6h','+24h',"Run")/3600 set scheduling to periodic Period:00h 05m 00s but for timestamp 00:00 to 6:00 a.m of next day don´t do the right calculation.

      I want to create a PI Coresight/Vision display where we can see value of MTD(month to day), last day, current day for uptime and production.

      Can you help me out.

       

       

      Exercise 2:

      • What's the difference of creating an attribute with a formula that do a sum or avg and performing an rollup analysis?

       

       

      Thanks

      Best regards

      André Marques

        • Re: Question about how to set analytics for real-time.
          Rick Davin

          Hello André,

           

          I will leave it to your SPOC Facilitator to address your first question.  As for your second question, allow me to explain the differences between a Formula DR and a Asset Analysis performing a Rollup.

           

          About Formula DR:

          • Calculates on-demand - for simple formulas with one or two inputs, this is a nice feature but for more complicated formulas with lots of inputs this can have negative performance
          • Does not work with strings
          • Works with only one event horizon, that is to say all input attributes only have a single AFValue associated with each.  For instance, you cannot request a sum or average for a time range.  You cannot fetch the previous value for any of the inputs
          • Fairly simplistic and minimal editor

           

          About Asset Analysis:

          • Can calculate on-demand or persist calculations to the PI Data Archive.  For more complicated analyses, there are many useful PE functions not available to Formula DR such as TagAvg, TagTot, PrevEvent, PrevValue, or TagVal just to name a few.
          • Works well with strings
          • Though its calculated for a given event, the analysis may use time range of data in calculations
          • Nicer editor where expressions may span multiple lines and include comments (see this useful link) for better readability and easier debugging

           

          If you search hard enough within PI Square or TechSupport, you may also find a Rollup DR.  Note the Rollup DR was never an officially released product, and was intended more as a learning tool to show what CDR's could do.  Though admittedly prior to the release of Asset Analytics I know some customers used the Rollup DR in their production databases.  One serious short-coming to the Rollup DR was that it did not persist the data back to the PI Data Archive, and sadly the very nature of a rollup is fairly intensive.  Which is another way of saying it was sluggish as it was frequently going through intense calculations on-demand.  Advantages of using an Rollup Analysis is (1) it's officially supported, (2) calculations were scheduled and performed once in the background, and (3) calculation results are saved back to the PI Data Archive, which gave a huge performance boost.

          1 of 1 people found this helpful
          • Re: Question about how to set analytics for real-time.
            nifernando

            Hello André,

             

            Question 01:

            I want to create a PI Coresight/Vision display where we can see value of MTD(month to day), last day, current day for uptime and production.

            Note: For my plant our workday is 6:00 a.m to 6:00 am of next day.

             

            Possible Solution:

            I would do this task following way

            • Last day uptime – Using an expression

            001006_Clipboard.png

            • Current day uptime – using an expression

                    Can you please clarify how would you define your current day?If you consider your current day 6 AM (t+6h) to current time, then you can try this

               2.png

            • MTD

                   You can use BONM function – return a timestamp for midnight on the first data of a following month from a given time expression

               3.png

             

            Note: you can use the scheduling method according to your company requirements.

             

            Question 02:

            What's the difference of creating an attribute with a formula that do a sum or avg and performing an rollup analysis?

             

            Possible Solution:

            Rick has already explained this, please let me know if you have additional questions regarding on this.

            1 of 1 people found this helpful