2 Replies Latest reply on Jun 18, 2018 5:27 PM by Roger Palmen

    Ways to retrieve data from Pi Data Archive

    Noga

      I am trying to figure out the best way to retrieve tags data from my pi data archive.

      I am writing my code using AF-SDK 2016, and using PIPoint.RecordedValues method that recieves AFTimeRange timeRange parameter to indicate time boundaries for the tags values of interest.

      I also understand that AF-SDK has PIDataPipe class that enables to get a continuous flow of data by subscribing to the PI Server and keeping all data changes for tags by demand, and that the retrieval of data is not based on a given time-range, but on maxEventCountPerServer parameter given to the

      GetObserverEvents method.

       

      What I would like to know is, is the PIDataPipe class applicable for AF-SDK 2016? and what are the advantages and disadvantages of using one approach over the other?

       

        • Re: Ways to retrieve data from Pi Data Archive
          Eugene Lee

          Hi Noga,

           

          What is stopping you from using AF SDK 2017 R2 (2.9.5)?

           

          The PIDataPipe has been available since AF SDK 2012. Beginning in AF 2.5 (2012), the AF SDK ships with both a .NET 3.5 version and .NET 4.5 assembly. The .NET 4.5 version of the AF SDK contains support for enhanced data access calls for all attributes. You must be using the .NET 4.5 version in order to have access to the PIDataPipe class.

           

          The PIPoint.RecordedValues is for getting historic data over a time range (batch processing). Let's say you need the past year of data in order to write a yearly report, then you can use this call.

          The PIDataPipe is more for stream processing use cases where you want to continuously get updates for your subscribed PI Points.

          4 of 4 people found this helpful