AnsweredAssumed Answered

AFCalculation

Question asked by Doddabasappa Champion on Jul 31, 2015
Latest reply on Jul 31, 2015 by dng

Hi,

 

I have used below snippet to get previous event of tag with respect to current timestamp. It's returning timestamp which is almost 5 hours older than the last archived event's timestamp.

 

 

String expression = "PrevEvent('Sinusoid','*')";

 

List<AFTime> times = new List<AFTime>();

 

times.add(new AFTime("*"));

 

 

PIServer piserver = new PIServers().DefaultPIServer;

 

AFValues values = AFCalculation.CalculateAtTimes(piserver, expression, times);

 

foreach (AFValue Value in values)

{

}

 

Tried with CalculateATREeordedValues, CalculateATIntervals, but still not working. Did I miss anything?

 

 

Thanks,

 

 

Outcomes