5 Replies Latest reply on Feb 9, 2010 8:02 PM by MichaelvdV@Atos

    PI SDK - Query PI for maximum pointnumber or pointid

    mrai

      Is there a fast way to query PI server to identify the minimum and the maximum pointnumber or pointid corresponding to PI tags in a given PI 380 server ?

       

      Thanks

       

       

       

       

        • Re: PI SDK - Query PI for maximum pointnumber or pointid

          Other than looping through the PI Points in the PI Points Database and comparing the attributes, no (i.e. there is no PI SDK method to query a PI Server for that information).

           

          One option (a "dirty" option, in my opinion) would be to create a new PI Point, look at its PointNumber and PointID attributes, and then delete it.

           

          May I kindly ask why you would need that information? These are system-controlled attributes and one normally doesn't have to deal with them...

          • Re: PI SDK - Query PI for maximum pointnumber or pointid
            MichaelvdV@Atos

            I think this can be easily done with PI OLEDB ?

             

            something along the lines of ...

             

            "select max(pointid), min(pointid) from pipoint..pipoint"

             

            (haven't tried it)

              • Re: PI SDK - Query PI for maximum pointnumber or pointid

                Michael @ Atos Origin

                I think this can be easily done with PI OLEDB ?
                something along the lines of ...
                "select max(pointid), min(pointid) from pipoint..pipoint"
                Absolutely. But my original answer still applies: Other than looping through the PI Points in the PI Points Database and comparing the attributes, there is no fast way to query PI for this info (i.e. depending on the number of PI Points configured, chances are this will be still be relatively fast, but there is no directPI SDK method to query a PI Server for that information).

                 

                Taking a quick look at the PI SDK Trace will reveal that... the PI OLEDB Provider is making numerous PI SDK calls behind the scene, to accomplish that.