5 Replies Latest reply on Aug 15, 2014 12:42 PM by Gregor

    TimeEq error

    Cboggie

      I cannot get this equation to work in Datalink. 

       

      Datalink 4.2.0

       

       

       

       

       
      =TimeEq("'OSKANS:IT_031035_31_PV'","*-1d","*", 0)
      

       

       

      Bascially i want to calculate how long this tag was 0 over the past day.

       

       

       

      Keep getting #NAME? error in excel

       

       

       

      Any suggestions?

       

       

        • Re: TimeEq error
          xwang

          Hi,

           

          TimeEq is the PE function.  In PI Datalink, there is a function named "Time Filtered" to calculate the time.  For your goal, please input  'OSKANS:IT_031035_31_PV'>0  to the "Expression(s)" field.  And you could choose the time units to show the result from "Time units" field.  Wish this could help.

           

          Xi Wang

           

          vCampus team

            • Re: TimeEq error
              Cboggie

              thank you.  that's perfect.

               

              Could you tell me how to format the number inline?

               

              =PITimeFilter("'OSKANS:ME_031312_STATUS' = ""Off""",'Sheet1'!$D$2:$E$2,'Sheet1'!$G$2,"7d","hours",0,"oskans03mp")

               

              Here is the formula, ive tried adding "0.0" in several places without success.

                • Re: TimeEq error
                  xwang

                  Hi,

                   

                  Where do you need to put in 0.0 please?  0.0 is a float type.  In the formula, I believe you could use it when your PI point is a float type, which might make sense.  However, if you use it as "*-0.0d", the result is same as "*".  Moreover, if using the "0.0h" in "Time interval", you will get a error of "Invalid Time interval".  

                   

                  Xi Wang

                   

                  vCampus team

                    • Re: TimeEq error
                      Cboggie

                      This formula gives me a result of, for Example:  1.22234433.  I can use excel's formating and change it to 1.22.  However, if i refresh or change a date, it goes back to 1.22234433.  I believe there is a way to format the result, within the formula.

                        • Re: TimeEq error

                          Hello Chad,

                           

                          You can configure how many decimal places you see with PI DataLink -> Settings. By default "Number format" is set to "General". If you just like to see 2 decimal places, please enter "0.00" (without double quotes) into "Number formats".