6 Replies Latest reply on Nov 20, 2018 9:40 PM by sraposo

    how to use TimeGE?

    a00224

      I am using PI system explorer Analses, and this is set to periodic evaluation at intervals of 1 hour.

       

      CWOutlet temperature may only exceed 90'F for 96 hours each calendar year.  am I right in thinking this phrase will create a count of hours that this is true?

      I keep evaluating and I only get "0" for an output, when I know the answer should be 81.

       

      StartTime = parsetime(concat("01-Jan-", year("*")))

      TimeGE(CWOutlet,StartTime,'*',90)/3600

       

      the equation is mapped to an attribute '96HourRule'

      I have backfilled the expression starting on january 1st, i have checked it in, and I have refreshed.  still 0.  is the units of TimeGE seconds?

      this is my third straight day trying to figure out how to use this function... please help me.

        • Re: how to use TimeGE?
          John Messinger

          Hi Robert,

           

          Yes, the TimeGE function returns a value in seconds. You could simplify your expression somewhat by removing the step to generate your StartTime variable, and just pass a relative time as your start time, as follows:

           

          TimeGE(CWOutlet,'1-Jan','*',90)/3600

           

          This will still give you a relative time of January 1st for the current year.

          5 of 5 people found this helpful
          • Re: how to use TimeGE?
            sraposo

            Hi Robert,

             

            What version of Asset Analytics are you using? I noticed there is a typo in your StartTime variable, the * should be within single quotes instead of double quotes:

            Otherwise, I think your configuration should have worked. Though to keep it simple, and avoid using functions needlessly, John's proposed a good solution!

             

            Thanks,

            Seb

            1 of 1 people found this helpful
              • Re: how to use TimeGE?
                a00224

                My formula is now TagMax(CWOutlet, bom('Jan'),'*')

                currently the value for CWOutlet, as viewed from System Explorer, is 38'F. 

                answer is still 0. 

                I'm thinking of recalibrating my computer with a louisville slugger.

                  • Re: how to use TimeGE?
                    sraposo

                    Hi Robert,

                     

                    Lol.... before doing that, can you reach out to our support team ?

                     

                    Contact Us

                     

                    They'll be able to look at your setup with you over a remote session. There hasn't been any wait time all day today on our English line.

                     

                    Something that comes to mind quickly is that if you have  a PI Collective, maybe the data is different on some members of the collective and the analysis service is connected to one of those members.

                     

                    There are quite a few other troubleshooting steps I can give you if you would like. It will probably be faster if you call in, but let me know and I'll go into more details.

                     

                    If you do call in and you resolve your issue, mind coming back here (or telling the engineer who is helping you)  with the solution ?

                     

                    Thanks,

                    Seb