AnsweredAssumed Answered

FindPIPoints IsGood Performance

Question asked by ChrisHylton on Nov 20, 2017
Latest reply on Nov 20, 2017 by ChrisHylton

Haven't found anything in multiple search attempts.  Anyone have any ideas.

 

Trying to use the PI AF SDK to identify 'bad' points.  If I use the PiPointTagSearchPage control, I can build a query that returns all the points in just a few seconds.  I think the time it takes is literally just the network transfer of the PIPoint objects and PI is doing this server side VERY fast.  But when trying to do this with the SDK, using FindPIPoints, I can't seem to find a way to get at .CurrentValue.IsGood.

 

The code below works, and returns in a decent amount of time.  But if I expand it to Tag = "*", for all points, forget about it.

 

Thinking there has to be a way to pass IsGood to the server, but how?  How does the user control do this so fast (all points in 10 seconds for bad and 20-30 seconds for good)?

 

Thanks!

 

        Dim piServer As PIServer

        piServer = OSIsoft.AF.PI.PIServer.FindPIServer("scadapi")

        piServer.Connect()

 

        Dim qNotDecommissioned As New PIPointQuery

        qNotDecommissioned.AttributeName = "pointsource"

        qNotDecommissioned.AttributeValue = "DECOMMISSIONED"

        qNotDecommissioned.Operator = OSIsoft.AF.Search.AFSearchOperator.NotEqual

 

        Dim qTag As New PIPointQuery

        qTag.AttributeName = "tag"

        qTag.AttributeValue = "A*"

 

        Dim list = PIPoint.FindPIPoints(piServer, {qTag, qNotDecommissioned}).ToList

        Dim good = list.Where(Function(p) p.CurrentValue.IsGood).ToList

        Dim bad = list.Where(Function(p) Not p.CurrentValue.IsGood).ToList

Outcomes