1 Reply Latest reply on Apr 11, 2018 12:27 PM by rschmitz

    How PI VIsion query data from PI server?

    yihan

      HI,

       

      My team and I are currently building a webpage, and getting data through PI webapi.

      However we are not able to get the correct data, which the data shown on our webpage will always be different from what is showing on PI Vision (same attribute, same timeframe).

       

      The attributes are mostly using Formula data reference, for example Utilities, the formula is something like:

      A = rawfeed total; B = total utilities consumption; [(B/A)*100]

      where, rawfeed total & total utilities consumption are attributes with pi point data reference, and its value retrieval method are both set to timerange and total.

       

      On PI webapi stream, we are only able to use GET value and GET interpolated value (calculates using interpolated value gave us wrong value).

       

      It would be good if anyone could explain how PI Vision get that calculated value out, so that we could use that on our webpage as well.

      Thanks.

        • Re: How PI VIsion query data from PI server?
          rschmitz

          Hi Yehan,

           

          Currently PI Vision uses PI Data Services an application which is was built for data access for a number of web services and relational databases. In general, I would highly recommend keeping with the PI Web API which is actively being developed. We're in the process ourselves to move to the data access to the PI Web API for PI Vision as well.

           

          That being said, while I wouldn't recommend switching to using the same data retrieval service as PI Vision perhaps we can get a better idea of what's going on with the call you're making to the PI Web API. Would you be willing to share the details of the query you're making to the PI Web API? Could you also share the end goal you're looking to accomplish with this (i.e. interpolate values for this formula attribute every hour on the hour). I tried to reproduce this on my system just now and I wasn't able to.

           

          Cheers,

          Rob