2 Replies Latest reply on Nov 7, 2018 2:22 PM by Dan Fishman

    Trouble with TimeGT and TimeLE Functions

    SReivenhart

      Hello everyone,

       

      I struggle to use the TimeGE, TimeLE, and all the other Time functions in PI AF. Can someone please provide me a good example of each and how it's properly used?

        • Re: Trouble with TimeGT and TimeLE Functions
          Lal_Babu_Shaik

          Hi Senterra

           

          Please find the link for TimeGE and TimeLE performance equation. Links has few examples related to PE

           

          PI Server

           

          Thanks,

          Lal

          1 of 1 people found this helpful
          • Re: Trouble with TimeGT and TimeLE Functions
            Dan Fishman

            If you want a more empirical example, than the help that Lal Babu Shaik provided, you could try the following.

             

            Map an attribute to your Sinusoid test point.  In this case I mapped my flow attribute to Sinusoid.

             

            From here, I know on any 24 hour period, Sinusoid should be approximately above 50 for half of the 24 hour period.  

             

            TimeGE.JPG

             

            I can use the function TimeGE('flow', '*-24h', '*', 50) and should see that it spends about 12 hours above 50.  I use the convert function to convert between seconds and hours or if I want I can divide by 60*60 (3600) to convert seconds to hours.  If you change the function to TimeGE('flow', '*-24h', '*', 0) you will get 86400 seconds, which is the total number of seconds in a 24 hour period.

             

            Other TimeXX functions work in a similar manner.  

            1 of 1 people found this helpful