2 Replies Latest reply on Dec 3, 2018 1:46 AM by Jaison_Rodrigues

    How to I retreive a value at a specified time

    AndrewLindsay

      In a Pi ProcessBook display, how to I retrieve the value of a tag from 1 hour ago?  I'm trying to show the rate of change  of a variable over an hour.

        • Re: How to I retreive a value at a specified time
          KarlRickards

          Hi Andrew,

           

          If it's a single variable on a PDI display you will need to make a DataSet.  When you add a variable (value or bar) to a PDI display it go to the Define Value dialogue.  Click on the drop down next to Tag Search and select PI Calc.  Create a new Data Set and then in the PI Tag or Expression field enter the following expression but replace sinusoid with you tag name.

           

          tagval('sinusoid','*-1h')

          • Re: How to I retreive a value at a specified time
            Jaison_Rodrigues

            Hi Andrew,

             

            This is how it would look. you can add any calculation (using PI PE syntax) to your "Dataset" and it would get calculated at run-time.

             

            Just double-click on the tag that you added to the display and "Define Value" pop-up would appear. Select "PI Calc" from the drop-down and configure a new "Dataset" as shown or depending on your requirement. You might have to create one data set for each value you want.

             

             

            Regards,

            Jaison Rodrigues