retetes

PIPoint.Data.UpdateValue dmRemoveDuplicates

Discussion created by retetes on Mar 15, 2012
Latest reply on Mar 20, 2012 by retetes

 Hello

 

 We have a problem with some of our tags. They have multiple values for the same timestamp. it is an example:

 

 

 
Value       Event Time          Questionable    Annotated    Substituted
452,2674    1-Jan-2012 00:00:00 False           False       True
339,3976    1-Jan-2012 00:00:00 False           False       False
339,3976    1-Jan-2012 00:00:00 False           False       False
339,3976    1-Jan-2012 00:00:00 False           False       False

If we execute this C# code

 
 PITime pt = ... ;
 double new_value = 100.0D;
 DataMergeConstants dm = DataMergeConstants.dmReplaceDuplicates;

 point.Data.UpdateValue(new_value, pt, dm, null);


 
The result is:

 
Value       Event Time          Questionable    Annotated    Substituted
100         1-Jan-2012 00:00:00 False           False       True
339,3976    1-Jan-2012 00:00:00 False           False       False
339,3976    1-Jan-2012 00:00:00 False           False       False
339,3976    1-Jan-2012 00:00:00 False           False       False


 
PISDK documentation tells that this DataMergeConstants means:

 
 dmReplaceDuplicates  Add the value to the archive and overwrite any existing values at the same time.  


 
Why does it only replace the first value? I have checked the timestamp is the same in all the PIValues (done using UTCSeconds property). Signal configuration? PIData mode/configuration? something wrong in code?

 

 Thanks in advance

 

 Software:
 Client: PISDK 1.3.8.388 Windows 7

 Server: PI Server 2010 Windows 2008

Outcomes