2 Replies Latest reply on Aug 22, 2011 6:52 PM by spilon

    PI Datalayer using PI WebServices

    schugh@nalco.com

      Hi ,

       

      Did anyone devlop PI datalayer using WS,if yes

       

      1) I dont see step parameter while doing the interpolation. We don't see that option....we do see number of values ....do we have step or not ?

       

      2) any sample code to get current values using PI WS.

       

      3) code to extract digital tags data using PI WS

       

       

       

      Regards

       

      Sandeep chugh 

        • Re: PI Datalayer using PI WebServices
          Ahmad Fattahi

          In general you can use GetPIArchiveData and GetPISnapshotData methods to retrieve current snapshot or data in the archives using PI Web Services. You would use PIArcDataRequest along with a single Manner to specify what type of data (interpolated, compressed, or plot) to retrieve. With archive data you obviously include a time constraint as well.

           

          On top of the PI Web Services users' manual you can find a very useful document including lots of examples in the vCampus Library under "Training Documentation". The title of the document is "Programming with PI Web Services". Hope this helps.

          • Re: PI Datalayer using PI WebServices

            sandeep chugh

            1) I dont see step parameter while doing the interpolation. We don't see that option....we do see number of values ....do we have step or not ?
            Do you mean step as in "timestep" or interval? If that's the case, then no it's not available. Basically, you divide the queried time range by the desired timestep and that gives you the number of interpolation intervals. This is the NumValues property in the PIArcDataRequest that Ahmad referred to.

             

            sandeep chugh

            2) any sample code to get current values using PI WS.
            You can look into the following places, in addition to the training documentation Ahmad alluded to:

            • vCampus Library > vCampus PI Products Kit > Data Access Technologies > PI Web Services User Guide > PI Web Services Programming Reference
            • Search for PI Web Services webinars under the vCampus Auditorium. This one, for instance, has a sample project attached.
            • The PI Application Development training course. You can attend an in-person course (see our Training website) or download the class materials under the vCampus Training Center.

            Note there is a GetPISnapshotData method, in addition to the GetPIArchiveData method (which you could use to retrieve a snapshot value, with the appropriate settings).

             

            sandeep chugh

            3) code to extract digital tags data using PI WS
            There's nothing special about extracting digital tags using PI WS; you can query them like any other tag and get the value back in the standard PI WS TimedValue object.

             

            ********************

             

            Please do not hesitate to search the Web Services discussion forum (as opposed to this generic forum) for answers to your other questions, or create a new discussion thread if you don't find the answer!

             

            Hope this helps!