4 Replies Latest reply on Mar 16, 2017 8:34 PM by gachen

    How to mark a Data Value as Questionable without replacing the original value

    hmokdad

      Hi,

       

      We are performing some algorithms on PI Snapshot Data as they are coming ( Capturing them through Data Pipe Events), and we are marking some tags as Questionable. The "Marking as Questionable" is done by replacing the value by Another Value with the same timestamp:

                      AFValue AFVal = new AFValue();

                      AFVal.Value = value.Value;

                      AFVal.PIPoint = value.Point;

                      AFVal.Timestamp = value.TimeStamp;

                      AFVal.Questionable = true;
                      AFVal.PIPoint.UpdateValue(AFVal, OSIsoft.AF.Data.AFUpdateOption.Replace, OSIsoft.AF.Data.AFBufferOption.DoNotBuffer);

       

      The Problem we are facing is related to buffering, since most of the tags are already being updated by interfaces configured for Buffering, we are forced to use the BufferingOption in our Code, replacing the last line with the following:

                      AFVal.PIPoint.UpdateValue(AFVal, OSIsoft.AF.Data.AFUpdateOption.Replace, OSIsoft.AF.Data.AFBufferOption.Buffer);

       

      This is working when are monitoring a small number of tags, but for large tags, the interfaces are loosing data, possibly because our code buffer is locking the tag, preventing the Interface buffer from updating the tag. My question is there a way to directly mark the Value as Questionable without Replacing it with a new Value.

      Note: At the interface we are getting the following error: