2 Replies Latest reply on Apr 2, 2013 2:28 PM by RJKSolutions

    Remove values from HA servers with PI Buffer Subsystem active


      Hi, All, 




      After several failed attempts removing values from HA servers with PI Buffer Subsystem active, we try AF SDK 2.5 for this. The code added looks like this: 



                  var piServers = new List<OSIsoft.AF.PI.PIServer>();
                  PISDK.IPICollective piCollective = App.Current.PIServer as PISDK.IPICollective;
                  if (piCollective.IsCollectiveMember && piCollective.CollectiveConnectionType == PISDK.pisdkCollectiveConnectionType.cctCollective)
                      // Is connected to Collective
                      piServers.AddRange(piCollective.MemberAvailability.Cast<PISDKCommon.NamedValue>().Where(m => m.Value != 0).Select(m => OSIsoft.AF.PI.PIServer.FindPIServer(m.Name)));
                  var oldValue = App.Current.PIServer.PIPoints["cdt158"].Data.ArcValue(DateTime.Now, RetrievalTypeConstants.rtAtOrBefore);
                  foreach (var srv in piServers)
                              var afValue = new OSIsoft.AF.Asset.AFValue(oldValue.Value, new OSIsoft.AF.Time.AFTime(oldValue.TimeStamp.UTCSeconds));
                              OSIsoft.AF.PI.PIPoint.FindPIPoint(srv, "cdt158").UpdateValue(afValue, OSIsoft.AF.Data.AFUpdateOption.Remove);

       Similar code works fine in a standalone server. However, with HA servers with PI Buffer Subsystem active in the client side, we got the following error message: 


      [-11414] Buffered point does not accept new events. 




      Anyone lend us a hand and elaborate how to remove values from HA servers without turning off PI Buffer Subsystem (some other custom interfaces depend on it)? Thanks a lot in advance! 





        • Re: Remove values from HA servers with PI Buffer Subsystem active

          Hi David,


          The reason for the error is because if PI Buffer Subsystem is used to buffer and fan data to a PI Collective, it locks up the snapshots of the points that PI Buffer Subsystem is handling. I think this Techsupport Article about this error will be helpful for you if you want to unlock the points temporarily (see Solution 3, Method 1)


          Taking a step away from your question. I can't help but to notice that you are using PISDK.IPICollective interface when testing if the PI Server is a collective and also getting a list of members in the collective. I am guessing that one of the reason is that you are building on top of an existing app that uses PI SDK. Instead of creating your own list of OSIsoft.AF.PI.PIServer to reference the collective members, you can also use the OSIsoft.AF.PI.PICollective object where the list of collective members will be accessible.