PI ACE Calc and waiting for the Buffer to flush

Discussion created by mark.omeara on Feb 27, 2014
Latest reply on Mar 6, 2014 by mark.omeara





I have an ACE calculation that takes the last recorded data point from the archive (or snapshot I suppose) manipulates it then saves it back to PI as a new value at the timestamp of ACE execution. So as an illustrative example:


1) The current snapshot value is 40.00 at 9:15am


2) Ace runs and grabs that value (40) and adds 10 to it, so now 50


3) Ace wites the value back (either point.Value = 50 or point.PutValue(9:20, 50) - whichever)  at 9:20


4) Repeats steps 2 and 3 forever




My concern is when Buffering is enabled - to fan out to a collective.


If the calculation runs again soon after and the buffer has not flushed (in the above example the 9:20 data write is still in the buffer and not in the PI snapshot yet) then the calculation will pick up the previous value (at 9:15) and perform the calculation on that.


My question: Is there a way for an ACE calc to determine whether the buffer has been flushed for a specif point before embarking on the calculation?