AnsweredAssumed Answered

AFAttributes.Data.RecordedValues sometimes returns no data when data obviously exists

Question asked by Ahlywog on Oct 17, 2016
Latest reply on Oct 24, 2016 by gregor

I have a system that loads meteorological data into the PI database every 15 minutes.  PI System Explorer verifies the data is there.  I am developing an application that, every 15 minutes, gets the latest data and develops various documents our customers require.  The problem I'm experiencing is that, sometimes, the method will return an empty list when I can verify the data for the given time period is present.  Even when using a time period of an hour or more and it worked the last time the method was called.

 

The code:

 

 

IEnumerable<AFValues> valuesCollection = null;

 

AFAttributeList attributes = new AFAttributeList();

 

try

{

foreach (AFElement element in _elementCollection)

{

     attributes.AddRange(element.Attributes);

}

 

 

                valuesCollection = attributes.Data.RecordedValues(TimeRange, _boundaryType, _filterExpression, _includeFilteredValues, _pagingConfig, _maxCount);

 

}

 

catch

{

     throw;

}

 

return valuesCollection;

 

What am I missing?

Outcomes