2 Replies Latest reply on Dec 24, 2014 7:42 AM by Eugene Lee

    How to use RecordedValues

    Wanderld

      I can not find any document about this function.

      When I use pipoint.RecordedValues(aftimerange, AFBoundaryType.Inside, "", true);

      It can not retrieve any data. But I can retrieve the data using management tools.

        • Re: How to use RecordedValues
          Dan Fishman

          Please open AFSDK Programming Reference (%PIHOME%\Help\AFSDK.chm), select the Index tab and type "RecordedValues" as keyword to find the method.  You can also check out the OSIsoft.AF.PI namespace, look for the PIPoint class and then expand the methods to find RecordedValues.

           

          If you don't find AFSDK reference help file installed, please visit OSIsoft Technical Support Download Center, download and install the latest version of PI AF Developer Tools.


          1 of 1 people found this helpful
            • Re: How to use RecordedValues
              Eugene Lee

              Hi Dong Liu,

               

              Here is an example in C#

               

              PIPoint pt = PIPoint.FindPIPoint("\\\\servername\\cdt158");
              AFValues values = pt.RecordedValues(new AFTimeRange("*-10m", "*"), AFBoundaryType.Interpolated, null, true);
                         
              foreach (AFValue value in values)
                         {
                              string s = String.Format("{0} \t {1}", value.Timestamp, value.Value);
                              Console.WriteLine(s);
                         }
              

               

              where servername is the name of your PI Server and cdt158 is the name of the PIPoint.

              2 of 2 people found this helpful