AnsweredAssumed Answered

PIACEPoint retreive values by count?

Question asked by shankar.ecgit on Feb 13, 2016
Latest reply on Mar 16, 2016 by pthivierge

Dear Forum Members,


We have an ACE calculation which needs to retreive last 2 or maybe 3 values of its trigger points.


Since PIACEPoint.Values method can only provide list of values when there is a defined start time and end time,  how can we pick last 2 values of any tag using PIACEPoint,Values as start time will always be unknown.


Secondly, In our calculation - there are two trigger tags and it is a naturally scheduled calculation - hence how will PIACEPoint.Value behave for the non triggering tag?.. will it do any interpolation to the last snapshot value of non triggering tag and give the value at exactly mybase.exetime? or will it provide the last snapshot value of the non triggering tag?


Lastly, if the PIACEPoint.Value provides the last snapshot value of non triggering tag, then how do I get the timestamp of that event?.. because it will not be mybase.exetime - as it is not the triggering tag... There is no field called as PIACEPoint.Timestamp - hence how to know the timestamp of an ACEPoint if its not a trigger tag?


I know that we can do this by using PIPoint.RecordedvaluesbyCount or AFAttribute.RecordedvaluesbyCount  and currently we are using AFAttribute.RecordedvaluesbyCount - but we are facing a challenge of missed calculations and basically the calculation hangs somtimes which causes events to get stuck in wait queue - many of the events occurs in milliseconds precision, hence its important that the ACE calculation is extremely fast and lightweight - using PI AF SDK in PI ACE seems to make it heavy...maybe its possible that we are not using PI AF SDK in the right way too.


Some of my questions might have been very basic, but any reply or comment is appreciated - we need some advise on this as soon as possible.


Thanking you in anticipation.