PISDK - UpdateValues does not work

Discussion created by HalifaxWater on Feb 13, 2014
Latest reply on Oct 19, 2017 by Aysha



I am new to PI SDK. I am working on a code to insert the historical values into PI tags. I use UpdateValues to do this, but it does not add all values to the PI Server, instead, it only add one at the Snapshot time. Here is my code in C#:


PISDK.PIPoint pt;
PIValues vals;
PIValue piVal;
PIErrors piErr;


_PIServerRef.PIPoints.PointLoaded(tst.ID, out pt);


if (pt != null){


vals = new PIValues();
vals.ReadOnly = false;


for (int j = 0; j < tst.Time.Length; j++)
piVal = vals.Add(tst.Time[j], tst.Value[j], null);


vals.ReadOnly = true;
piErr = pt.Data.UpdateValues(vals, PISDK.DataMergeConstants.dmReplaceDuplicates, null);


I also tried UpdateValue method. In this case, It only adds about 180 values to the Point, stopping at the Snapshot time (there are more than 3000 values).