Hi all,

when using PIPoint.Summaries in the AF SDK I get the error [-11111] Error with summary calculation time array. In more detail, my call looks like this:

piPoint.Summaries(intervalDefinitions, OSIsoft.AF.Data.AFSummaryTypes.Count, OSIsoft.AF.Data.AFCalculationBasis.EventWeighted, OSIsoft.AF.Data.AFTimestampCalculation.Auto)

where intervalDefinitions contains just 1 entry that has just 1 interval.

First, I assumed that intervalDefinitions[0].Range is not defined correctly, i.e. StartTime > EndTime but this is not the case. However, the difference between StartTime and EndTime is very small (0.0000128s). Is this not resolved by PI?

Further debugging info:

intervalDefinitions[0].Range.StartTime = 11.05.2013 20:01:16.0600000

intervalDefinitions[0].Range.Endtime = 11.05.2013 20:01:16.0600128

Regards,

Martin

Yes, PI resolves the times but the times passed to PI are resolved to a PI subsecond, which is 1/65536

^{ }of one second. See this link for further description.Focusing in on just the decimal portion of your times,

0.0600000 * 65536 would be 3932.16, but PI requires it to be a whole number, so its rounded up to 3933.

0.0600128 * 65536 would be 3,932.9988608 but PI rounds it up to 3933, which is the same as your start time.

Then 3933 / 65536 becomes 0.0600128173828125, which is the PI subsecond slice used by both start and end times.