10 Replies Latest reply on Dec 13, 2010 7:31 PM by smohr

    Get Tag Values.

    farooquf

      Hi,

       

       

       

      I am thankful to all for your contributions. This forum page is helping me to clarify all my ongoing doubts and to explore the provided service..

       

       

       

      From my formar posts, you might have observed that I am consuming PI Webservice and calling GetPIArchieveData.

       

       

       

      But to full fill the ongoing requirements, I have to explore this service more closely. So I have a question for you now.

       

       

       

      If I pass start date and end date, then I will get the values provided values should be available in that time range.

       

       

       

       

       

       

       

      But what if I need value in my response even there are no values in that time range?

       

       

       

      For instance:

       

       

       

      Start Date: 2010-12-03T00:00:00Z  (YYYY-MM-DDTHH:mm:ss)

       

      End Date: 2010-12-04T00:00:00Z

       

       

       

      If there is no value in this time range, any any possibility (using PIArchMannar) to get last reads? That is on old date....i.e on date 2010-12-02?

       

       

       

      Will any combination of "compressed + outside" or "Interpolated+ outside" work ? Can I get old values, if there is no values in provided time range?

       

       

       

      Regards,

       

      Farooq

        • Re: Get Tag Values.
          andreas

          From the manual

           

          If the time range specified in the request does not include any events, you will receive a TimeSeries object that has no events; that is, an empty TimedValue array. This is important when querying paths containing stale data since you will retrieve data only if the time range includes the time of the most recent snapshot. A solution is to set the boundary type in the PIArcManner object of the PIArcDataRequest to Outside.

           

          You will have to set the boundary type in the PIArcManner object of the PIArcDataRequest to Outside.

            • Re: Get Tag Values.
              farooquf

              Thank you for your post.

               

              I refered the same manual but see no result when I executed the test case.

               

              Did I miss anything in PIArchMannar?

               

               

               

              6253.Image.JPG

               

               

                • Re: Get Tag Values.
                  Ahmad Fattahi

                  Farooq,

                   

                  I am glad you are finding OSIsoft vCampus forums helpful toward your needs

                   

                  Unfortunately I can't read your screenshot very well. However, as Andreas pointed out, can you make sure that some events in fact exist outside the time range you are querying for? If the answer is yes, can you share some of your code to see what is going on?

                    • Re: Get Tag Values.
                      farooquf

                      I am using SAP Process Integration(XI/PI) to integrate/consume OSISoft PI Webservices.

                       

                      But to explore the service I am using Info-path. I executed this test case on 2010-12-03 at 15:20.  I see that values are coming after every 15 mins interval. So I got  values at 15:00 and at 15:15.

                       

                      0045.IM1.JPG

                       

                       

                       

                      As you see in the second screen shot, I executed below test case on the same day at 15:32. But I provided time range from 16:00 to 16:00. This was a future time of that day. So values shouldn't come in this time range. But what if I need atleast old values??

                       

                      So bottom line is, if I don't have any value on today's date can I fetch values of yesterday's date using PIArchMannar? Please suggest.

                       

                      4341.IM2.JPG

                       

                       

                       

                      Regards,

                       

                      Farooq

                        • Re: Get Tag Values.
                          farooquf

                          Please zoom the webpage if you cannot see images clearly.

                            • Re: Get Tag Values.
                              Ahmad Fattahi

                              You can set the boundaries to be Outside. This is taken from PI Web Services User Manual:

                               

                               Outside

                              – Return events within the time range plus the first value that precedes the time range and the first value that follows the time range. Example:

                               

                               arcmnr.Boundaries = PIArcMannerBoundaries.Outside

                               

                               

                                • Re: Get Tag Values.
                                  farooquf

                                  Hi Ahmad,

                                   

                                  I used both compressed and outside. But received no values. If you refer the above screen shots, you will notic the my boundry is Outside. Do I need to perform anything else?

                                   

                                  Regards,

                                   

                                  Farooq

                                    • Re: Get Tag Values.
                                      Ahmad Fattahi

                                      Could you test the same thing but with time not in the future? Here is an example: There are no values between 15:00 and 15:30 but there are values before and/or after. Current time is 16:00. Run a query for values between 15:00 and 15:30 with boundaries set to Outside and see if it behaves as expected. Hope it sheds some light on the problem

                                       

                                      If the above doesn't take us anywhere please share some of your code that actually takes care of the query.

                                        • Re: Get Tag Values.

                                          @Farooq: the results you are seeing here deserve being investigated. I shared that with the development team and they are currently investigating the behaviour in PI Web Services and the underlying pieces. Thanks for reporting this, we will get back to you in the best delays.

                          • Re: Get Tag Values.
                            smohr

                            For future times, the culprit is the PI server.  If the entire time range is in the future, you will not receive any events, even if you set the manner to request outside boundaries.