3 Replies Latest reply on Jul 9, 2012 1:17 PM by spilon

    Best way to get PI/AF data from a custom web part

    csgrbc

      Hi

       

      I was wondering if anyone knows how the existing OSI web parts, PI Gauge for example, gets its data from PI? I can only assume that they use the PI Data Services, but how?

       

      Is there some example code how this is achieved?

       

      Thanks for a great forum.

       

       

       

       

       

       

        • Re: Best way to get PI/AF data from a custom web part
          Ahmad Fattahi

          PI WebParts are deployed within a framework that includes PI Data Services and SharePoint.

          • PI Data Services provide data to web parts from a variety of data sources, including PI, relational databases, and web services.
          • Microsoft SharePoint technologies provide user and directory services, web part pages, and connectivity between web parts.

          There is a white paper in vCampus Library under Training Documentation called "Create a Custom WebPart" which should help you get going. This vCampus Builders' Cafe webinar should also be helpful.

            • Re: Best way to get PI/AF data from a custom web part
              hanyong

              Hi Mitul

               

              The architecture described by Ahmad about how PI WebParts get data from PI System via PI Data Services is right. But the details of how PI WebParts get data from PI Data Services is not exposed. If you are thinking of having a custom WebPart that visualizes PI System data in a different manner from what the PI WebParts supports, I would recommend that you look at using PI Web Services to get the data.

                • Re: Best way to get PI/AF data from a custom web part

                  Long story short: PI WebParts indeed gets its data PI Data Services, but PI Data Services in an internal component used by OSIsoft products and is not meant to be used by third-parties. You can use any of the regular PI Data Access components to fulfill your data access needs, and this includes PI Web Services as Han Yong pointed out.

                   

                  You can try out the Community Technology Preview (CTP) we recently announced, if you need AF Search/Browse capabilities. If you need additional functionality that is currently not exposed by PI Web Services, an option is to use the PI AF SDK (and wrap some of it in your own custom web service(s), if you decide to go that route).

                   

                  With that said, can you shed some light on what you need to do and what your requirements are? Maybe we could help point you in the right direction...