4 Replies Latest reply on Feb 1, 2011 12:55 AM by spilon

    Use of SeriesID in TimeSeries Service Release 2.

    farooquf

      Hi Guys,

       

      Recently I upgraded the PI wbservice to R2 version, which is the latest release.

       

       Does anyone knows the use of SeriesId in Response message? I mean when can we use this field?

       

      Also the default value in the service is 400. Can we set any other default value, such as 1000 or 2000? Is there any impact of setting higher default value in the NumValue field?

       

      I 'm also testing GetPISnapshotData. I believe it give the latest value in that time range. That is what i found in dummy testing. Is this correct? 

       

      Thanks

       

      Farooq

       

       

        • Re: Use of SeriesID in TimeSeries Service Release 2.
          Ahmad Fattahi

          Farooq,

           

          The value of the SeriesID property of the first TimeSeries passed into the method will be copied to the SeriesID property of the TimeSeries returned to the client. Client applications may make use of this to keep track of asynchronous calls to InsertPIData.

           

          GetPISnapshotData would return the snapshot value of each path (a PI tag) passed to it. There is no time range involved.

           

          When you ask about NumValue, what method are you referring to?

            • Re: Use of SeriesID in TimeSeries Service Release 2.
              farooquf

              Hi Ahmad,

               

              Thank you for your reply.

               

              I'm referring to GetPIArchieveData. For this method, NumValue, in the PIArchManner, is 400 by default.

                • Re: Use of SeriesID in TimeSeries Service Release 2.
                  Ahmad Fattahi

                  Use the NumValues property to specify how Archive values are retrieved:

                  • For interpolated values, NumValues sets the number of interpolation intervals into which the time range is evenly divided.
                  • For Plot Values, NumValues sets the number of screen pixels in the representation of a trend.
                  • For Compressed values, NumValues sets the maximum number of values to return.

                  Minimum value is 1. Default: 400.

                   

                  In the first two cases, the higher NumValues the more values you are requesting from PI Server (heavier query). While in the last case, you would just cap the maximum number of events retrieved from PI Server.

                    • Re: Use of SeriesID in TimeSeries Service Release 2.

                      The reason for the default value of 400 values maximum, is a simple protection. It is to protect the developer/integrator from inadvertently making exceptionally large queries (and potentially affecting other modules/applications). One needs to keep in mind this is a product designed to be used over distributed architectures, potentially the WAN, and different scalability/usability metrics must be taken into account in the design. In general I would kindly advise against just leaving out default values and 'hope they do the trick'; default values (especially for quantitative parameters, as opposed to boolean/flags) are meant to help start using a given function, after which one refines his use of it. They obviously cannot suit any and all use cases and system sizes.