PI SDK/AF SDK Equivalents for DataLink Functions

Version 7

    If you have a favorite DataLink function, the table below will show you what to use in your code to get the same results!

     

    Please note that for the AF SDK equivalents the equivalency relationships are between the PI SDK and AF SDK methods. Also, the AF SDK examples show the methods for both the PIPoint class in the OSIsoft.AF.PI namespace, as well as for the AFData Class in the OSIsoft.AF.Data namespace if performing the calculations based on AF attributes. For more information, please consult the AF SDK Help File .

     

    *Please also note that PI SDK is considered deprecated for new and future projects. Whenever possible, it is recommended to use AF SDK rather than PI SDK.

     

    DataLink FunctionPI SDK Equivalent*AF SDK Equivalent (OSIsoft.AF.PI namespace)AF SDK Equivalent (OSIsoft.AF.Data namespace)

    Current Value

    PICurrVal()

     

    PIData.Snapshot

     

    PIPoint.CurrentValue(),

    PIPoint.EndOfStream(),

    PIPoint.EndOfStreamAsync()

     

    OSIsoft.AF.Asset.AFAttribute.GetValue(),

    AFData.EndOfStream(),

    AFData.EndOfStreamSync()

    Archive Value

    PIArcVal()

     

     

     

     

     

    PIExpVal()

    By PI Tag

    PIData.ArcValue()

     

     

     

     

    By PI Expression

    IPICalculation.TimedCalculate()

    PIData.ArcValue()

    PIPoint.RecordedValue(),

    PIPoint.InterpolatedValue(),

    PIPoint.RecordedValueAsync(),

    PIPoint.InterpolatedValueAsync()

     

    IPICalculation.TimedCalculate()

    N/A - see next column ->

    PIData.ArcValue()

    AFData.RecordedValue(),

    AFData.InterpolatedValue(),

    AFData.RecordedValueAsync(),

    AFData.InterpolatedValueAsync()

     

    IPICalculation.TimedCalculate()

    AFCalculation.CalculateAtTimes()

    Compressed Data

    PICompDat(),

    PICompFilDat()

     

     

    PINCompDat(),

    PINCompFilDat()

    By Time Range

    PIData.RecordedValues()

     

     

    By Number of Values

    PIData.RecordedValuesByCount()

    PIData.RecordedValues()

    PIPoint.RecordedValues(),

    PIPoint.RecordedValuesAsync()

     

    PIData.RecordedValuesByCount()

    PIPoint.RecordedValuesByCount(),

    PIPoint.RecordedValuesByCountAsync()

    PIData.RecordedValues()

    AFData.RecordedValues(),

    AFData.RecordedValuesAsync()

     

    PIData.RecordedValuesByCount()

    AFData.RecordedValuesByCount(),

    AFData.RecordedValuesByCountAsync()

    Sampled Data

    PISampDat(),

    PISampFilDat()

     

     

    PIExpDat()

    By PI Tag

    IPIData2.InterpolatedValues2()

     

     

    By PI Expression

    IPICalculation.Calculate()

    IPIData2.InterpolatedValues2()

    PIPoint.InterpolatedValues(),

    PIPoint.InterpolatedValuesAsync()

     

    IPICalculation.Calculate()

    N/A - see next column ->

    IPIData2.InterpolatedValues2()

    AFData.InterpolatedValues(),

    AFData.InterpolatedValuesAsync()

     

    IPICalculation.Calculate()

    AFCalculation.CalculateAtIntervals(),

    AFCalculation.CalculateAtRecordedValues()

    Timed Data

    PITimeDat()

     

     

     

     

     

     

     

    PITimeExpDat()

    By PI Tag

    PIData.TimedValues()

     

     

    By 'exact' Retrieval Mode

    PIData.RecordedValues()

     

     

    By PI Expression

    IPICalculation.TimedCalculate()

    PIData.TimedValues()

    PIPoint.InterpolatedValuesAtTimes(),

    PIPoint.InterpolatedValuesAtTimesAsync()

     

    PIData.RecordedValues()

    PIPoint.RecordedValues(),

    PIPoint.RecordedValuesAsync()

     

    IPICalculation.TimedCalculate()

    N/A - see next column ->

    PIData.TimedValues()

    AFData.InterpolatedValuesAtTimes(),

    AFData.InterpolatedValuesAtTimesAsync()

     

    PIData.RecordedValues()

    AFData.RecordedValues(),

    AFData.RecordedValuesAsync()

     

    IPICalculation.TimedCalculate()

    AFCalculation.CalculateAtTimes()

    Calculated Data

    PIAdvCalcVal(),

    PIAdvCalcDat()

     

     

    PIAdvCalcFilVal(),

    PIAdvCalcFilDat()

     

     

    PIAdvCalcExpVal(),

    PIAdvCalcExpDat(),

    PIAdvCalcExpFilVal(),

    PIAdvCalcExpFilDat()

    By PI Tag

    IPIData.Summaries2()

     

     

    With Filter Expression

    IPIData.FilteredSummaries()

     

     

    By PI Expression

    IPICalculation.ExpressionSummaries()

    PIData.Summaries2()

    PIPoint.Summaries(),

    PIPoint.SummariesAsync()

     

    PIData.FilteredSummaries()

    PIPoint.FilteredSummaries(),

    PIPoint.FilteredSummariesAsync()

     

    IPICalculation.ExpressionSummaries()

    N/A - see next column ->

    PIData.Summaries2()

    AFData.Summaries(),

    AFData.SummariesAsync()

     

    PIData.FilteredSummaries()

    AFData.FilteredSummaries(),

    AFData.FilteredSummariesAsync()

     

    IPICalculation.ExpressionSummaries()

    AFCalculation.CalculateSummaries()

    Time Filtered

    PITimeFilterVal(),

    PITimeFilter()

     

    IPICalculation.PercentTrue()

     

    N/A - see next column ->

     

    AFCalculation.PercentTrue()

     

    Edit: Added the DataLink Excel function names for reference.

    Edit: Added the link for the online AFSDK programmer's reference, added comment about PI SDK being deprecated.

    Edit: Updated content for AF SDK 2.8, added column for AF.Data namespace, added links to all DataLink functions, PI SDK methods and AF SDK methods