Is there a way to use AF SDK to write multiple AF Values at the same timestamp?
I already tried something like:
OSIsoft.AF.PI.PIServer piServer = OSIsoft.AF.PI.PIServers.GetPIServers().DefaultPIServer;
var piServerNetCredential = new NetworkCredential("piadmin", "****");
piServer.Connect(piServerNetCredential);
OSIsoft.AF.PI.PIPoint point;
if (!OSIsoft.AF.PI.PIPoint.TryFindPIPoint(piServer, "Multivalue Test", out point)) {
point = piServer.CreatePIPoint("Multivalue Test");
}
OSIsoft.AF.Asset.AFValues newValues = new OSIsoft.AF.Asset.AFValues();
AFTime startTime = new AFTime("T-15d", CultureInfo.CurrentCulture);
newValues.Add(new OSIsoft.AF.Asset.AFValue(5.0, startTime.LocalTime.AddDays(10)));
newValues.Add(new OSIsoft.AF.Asset.AFValue(6.0, startTime.LocalTime.AddDays(11).AddTicks(0)));
newValues.Add(new OSIsoft.AF.Asset.AFValue(7.0, startTime.LocalTime.AddDays(11).AddTicks(0)));
newValues.Add(new OSIsoft.AF.Asset.AFValue(8.0, startTime.LocalTime.AddDays(11).AddTicks(1)));
newValues.Add(new OSIsoft.AF.Asset.AFValue(9.0, startTime.LocalTime.AddDays(12)));
newValues.Add(new OSIsoft.AF.Asset.AFValue(10.0, startTime.LocalTime.AddDays(13)));
newValues.Add(new OSIsoft.AF.Asset.AFValue(11.0, startTime.LocalTime.AddMonths(10)));But value 6 is replaced by value 7.
I want to add multiple values at the same timestamp.