9 Replies Latest reply on Dec 5, 2018 10:06 PM by Jaison_Rodrigues

    AF - Value retrieval  methods - No data

    LSalas

      Hi:

       

      AF: Version

      I am trying to use the value retrieval methods to calculate the total from midnight until now. The relative time was set up to "t" . I added a trend in pivision to see this tag and it shows NO DATA.

       

       

      I noticed if I use -24h for relative time and add the trend, the trend shows values. what Am I missing here?

       

       

      Any idea why?

       

      Thank you.

        • Re: AF - Value retrieval  methods - No data
          Lal_Babu_Shaik

          Hi Lisaury

           

          Request you to change by Time to “Time Range Override”

           

          Additional info : KB01589 - Value Retrieval Methods: Explanation of different client behaviors

           

          Regards,

          Lal Babu Shaik

          • Re: AF - Value retrieval  methods - No data
            Jaison_Rodrigues

            Hi Lisaury,

             

            As it is mentioned, you need to pass "Relative Time" and not "Absolute Time". "-24h" is a "Relative Time" and PI AF creates a time range based on the end time supplied by the client application (PI Vision in your case) and the offset defined by the Relative Time setting.

             

            Difference between "Time Range" and "Time Range Override" is that, when you use "Time Range" the Start and End Time passed from the client application is considered and the Relative Time setting is ignored. But if you use "Time Range Override", the time range will be determined by the Relative Time setting.

             

            In your case, you might have to use "Time Range" and enter -24h in Relative Time setting . Then, set the time range of your PI Vision Display to "t" to "*" (Now)

             

             

            Hope this helps.

             

            Regards,

            Jaison Rodrigues

              • Re: AF - Value retrieval  methods - No data
                LSalas

                Hi Jason:

                Thank you for your answer. It helped me to understand better how  Value retrieval  methods  works.  Because of what and how the client want to see , I guess a better option is create an analysis in my case.

                LS   

                  • Re: AF - Value retrieval  methods - No data
                    Jaison_Rodrigues

                    Value Retrieval Methods are of great use when you want your client applications to pass the time context. They might be a overhead on the server if clients pass a large time range, since these are executed by the AF Server and not by Analysis Service. In your case, since the time is absolute ('t'), analysis will be better option.

                     

                    Thanks.

                     

                    Regards,

                    Jaison Rodrigues

                      • Re: AF - Value retrieval  methods - No data
                        sraposo

                        Hi Jaison,

                         

                        Just a small correction. Data References are typically handled client side. Some calculations are done by the PI Data Archive, and some by the client. In the case of an analysis outputting to a PI Point, the analysis service does the calculation and the client retrieves the value from the PI Points.  In the case of an Analysis data reference, the client does the calculation.

                         

                        The AF Server is simply a middle man giving clients the required configurations needed for value retrieval or calculations.  The AF Server never returns any values other than those stored in attributes with a data reference of <none> . All other values are retrieved by clients using the configuration stored in AF.

                         

                        In the case, of a PI Point data reference with a value retrieval method of by time range override and by time range total, the client will ask the PI Data Archive for the result of the total calculation in the given time range. The PI Data Archive computes the total and returns the value to the client.

                         

                        I just wanted to clear that up. Please let me know if you have any questions.


                        Thanks,

                         

                         

                        Seb

                        1 of 1 people found this helpful
                  • Re: AF - Value retrieval  methods - No data
                    sraposo

                    Hi Lisaury,

                     

                    If you simply want to calculate a total from 't' to '*', you can use an Analysis instead: TagTot('|UIE-Cost','t','*').

                     

                    The Time Methods are used for client side calculations.

                     

                    Thanks,

                    Seb