Best way to check for differences in timeseries using the PISDK.

Discussion created by cguimaraes Employee on Feb 10, 2012
Latest reply on Mar 9, 2012 by cguimaraes

We have to merge the data from 19 PI Servers to a single PI server. I'm creating a small PISDK application to validate that the data merged successfully.




In another topic I already found that using the secondary interface to PIValues called IPIValues2. This seems to be the fasted way to get all the data of a specific time range into the code.




I'm using something similar to this to get the values.      


var v1arr1 = Array.CreateInstance(typeof(object), iValues1Count);
var v1arr2 = Array.CreateInstance(typeof(object), iValues1Count);
var v1arr3 = Array.CreateInstance(typeof(object), iValues1Count);
iValues1.GetValueArrays(out v1arr1, out v1arr2, out v1arr3);
var iValues2Count = values2.Count;

var v2arr1 = Array.CreateInstance(typeof(object), iValues2Count);
var v2arr2 = Array.CreateInstance(typeof(object), iValues2Count);
var v2arr3 = Array.CreateInstance(typeof(object), iValues2Count);

iValues2.GetValueArrays(out v2arr1, out v2arr2, out v2arr3);


Now I am left with 2 x 3 arrays representing the 2 time series. One array with the timestamps, one with values, and one with the value attributes per timeserie.


 My question now is: what is the best possible way to compare these two time series and find any differences?