3 Replies Latest reply on Feb 4, 2016 8:58 PM by TimAlexander

    Monthly Event Frame

    TimAlexander

      I am starting to use event frames, and wanted one that summed a tag over a monthly period.  I considered setting it as periodic, but it looked like the periods did not go above daily.  Let me know if I missed something there.  Anyway, I decided to just do a start trigger at the beginning of the month, and wanted an end trigger for the beginning of the next month.  In order to do this, I need to reference the StartTime attribute of the event frame, and I cannot figure out the correct syntax to use to do this.  I have tried several things, but no success yet.  I have pasted a screen shot below of what I have so far.  Let me know how to do it this way, or if you know a better way to do it.  Thanks!

       

        • Re: Monthly Event Frame
          Dan Fishman

          Similar post here: How do I begin and end Event Frames on attribute change?

           

          Basically, you cannot do back-to-back Event Frames using the current analysis service.  PI Event Frame generator has this feature and I pretty sure PI Analytics will have this at some point soon. I've gone with two analytics to do this in the past.  If you don't need exactly back to back, you could schedule for say every 5 minutes and use a trigger similar to: Month('*') =Month('*-1M')

           

          You cannot access the Event Frame attributes unless you get creative (PI OLEDB E or custom data reference).

          1 of 1 people found this helpful
            • Re: Monthly Event Frame
              Roger Palmen

              Well, you can create them back-to-back, but you need two analysis running. The design principle of the EventFrame Analysis is that there can only be one active / open / no endtime EventFrame for one analysis.

              So just create two, e.g. one for the even months, one for the odd months.

               

              Or stop the previous month one second or millisecond before the start of the next, but that's a bit tricky to setup in terms of scheduling.

              1 of 1 people found this helpful
            • Re: Monthly Event Frame
              TimAlexander

              Thanks Dan and Roger for your help!  I ended up sticking with one event frame, but both your responses were helpful.  I set it up with start and end triggers to be checked each second, and used a variation of Dan's end trigger.  the screen shot of what I have now is below.  I backfilled it to the beginning of the year, and it is behaving as expected.  The first frame for the year ended 1/31/2016 11:59:59PM and the second one started 2/1/2016 at 12:00:00AM. Thanks again!

               

              1 of 1 people found this helpful