4 Replies Latest reply on Nov 5, 2018 10:00 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.

          4 of 4 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