10 Replies Latest reply on Aug 25, 2016 12:32 PM by gregor

    duplicate values at same timestamp in plot and archive values

    Sudeshna

      Hello all

       

      I have 2 attributes in AF - Effective date and Readings for a meter.

      Yesterday i came across an unexpected scenario :

      Data reference for Readings attribute is PI Point.

      Now, when i scroll onto time series data to get

       

      1 - Plot values  - i can see 3 duplicate same value(s) for the timestamp same as that of Effective date.

      2- Archive values - i can see 2 duplicate same value(s) for the timestamp same as that of Effective date.

      3- Sampled values - there is only 1 value(s) for the timestamp


      Is this expected? or am i missing something here?


      Kindly help. Many Thanks.

        • Re: duplicate values at same timestamp in plot and archive values
          pmartin

          Hi Sudeshna,

           

          This document might be helpful for you: Time Series Data

           

          First thing I would check is the actual archived values in PI System Management Tools.  I suspect you will see similar results to the Archive tab in PI System Explorer.

          Your sampled data is working as expected.  You told it (via the interval) to give you one data point for every hour and that's what it did.

          Your plot data is interesting.  I suspect that if you increase the number of intervals to an arbitrarily large number (say 10k) that you will see it more accurately mimic the archive data from the 2nd tab.  Perhaps the Number of Intervals you specified is just too small.  Try playing around with it to see if you can get different behavior.

          • Re: duplicate values at same timestamp in plot and archive values
            ernstamort

            Hi Sudeshna,

             

            The archive values are the ones that are stored in the PI Database. And yes it is possible to store duplicate values with the same time stamp. It is also possible to store different values at the same time.

            Sampled and plot values are different representations of the archived values. If you sample every hour you will of course only see 1 value for that time stamp.

             

            Holger

            • Re: duplicate values at same timestamp in plot and archive values
              skwan

              Hi,

              Can you please clarify your question?  Are you asking why the three screen shots are showing different information?  Or are you asking why there are multiple values at the same timestamp?

              --

              Steve Kwan

                • Re: duplicate values at same timestamp in plot and archive values
                  Sudeshna

                  Hi Stephen,

                   

                  My question here is why there are multiple values at the same time stamp in case of Archive and Plot, though the PI point referred is having only single value.

                   

                  Regards,

                  Sudeshna

                    • Re: duplicate values at same timestamp in plot and archive values
                      Rhys Kirk

                      This one has been bugging me but now I know why you see this.

                       

                      You are using Element Versions, right? Hence your attribute with the effective date so that you know which version you are dealing with.

                      The thing with versions is that they will act like a Boundary. So when you look at Archive data that spans the Element Version Effective Date then you will see two values; one at the end boundary of the older version and one at the start boundary of the newer version. Likely the AF SDK then sticks the two data sets together hence the duplicate value.

                      Plot values is related. Chances are there are two plot values calls issued that match the Version Effective Dates. This will be why the third value sneaks in there. It wont make any difference to trends using the attribute though, they'll still be drawn the same.

                       

                      Right, I can concentrate again now that this puzzle is solved.

                        • Re: duplicate values at same timestamp in plot and archive values
                          Sudeshna

                          Hi Rhys,

                           

                          Many thanks for this valuable information.

                           

                          We are not using "Readings" attribute for trends, however this attribute is referred by a custom .dll(ConsumptionDR) to calculate the consumption which results in duplicate time stamp in Consumption results.

                           

                          Is there any workaround for not considering the boundary values while calculating the archive and plot?

                           

                          Data Reference for TotalConsumption Attribute:

                           

                          Consumption.JPG

                           

                          Plot results from "TotalConsumption" Attribute:

                           

                          ConsumptionDR.JPG

                           

                          Sudeshna