AnsweredAssumed Answered

PI AFSDK gives run time error : Invalid Summary CalcType

Question asked by Dhiman on May 2, 2018
Latest reply on May 2, 2018 by rdavin

Hi,

I am using PI AFSDK to get the summaries of a PIPointList using this code:

 

List<IDictionary<AFSummaryTypes, AFValue>> _summaryValues = new List<IDictionary<AFSummaryTypes, AFValue>>();

PIPagingConfiguration config = new PIPagingConfiguration(PIPageType.TagCount, 150);

_summaryValues = _piPointList.Summary(piTimeRange, AFSummaryTypes.All, AFCalculationBasis.TimeWeighted, AFTimestampCalculation.EarliestTime, config).ToList(); ;

 

This code works fine in the development and UAT servers. But gives the below error in the production server:

 

Message: [-11114] Invalid Summary CalcType

Stack Trace:

   at OSIsoft.AF.PI.PIException.ConvertAndThrowException(PIServer piServer, Exception ex, String message)

   at OSIsoft.AF.PI.PIServerPointList.Summaries(IList`1 intervalDefinitions, Boolean reverseTime, AFSummaryTypes summaryType, AFCalculationBasis calcBasis, AFTimestampCalculation timeType, PIPagingConfiguration pagingConfig)

   at OSIsoft.AF.PI.PIPointList.Summaries(AFTimeRange timeRange, AFTimeSpan summaryDuration, AFSummaryTypes summaryTypes, AFCalculationBasis calculationBasis, AFTimestampCalculation timeType, PIPagingConfiguration pagingConfig)

   at OSIsoft.AF.PI.PIPointList.Summary(AFTimeRange timeRange, AFSummaryTypes summaryTypes, AFCalculationBasis calculationBasis, AFTimestampCalculation timeType, PIPagingConfiguration pagingConfig)

 

Both the UAT and Production servers are identical, running under the same user account in the same domain.

Any idea how to solve this issue?

Outcomes