2 Replies Latest reply on Aug 7, 2018 7:13 PM by Batou

    Retrieving Archived Values For Multiple Timestamps automatically

    Batou

      Hello All,

      I am trying to generate multiple values onto my spreadsheet using PiArcVal. The timestamps I want to use (with PiArcVal) are generated (in another column) using PiCompDat. I'd like to avoid oversizing my PiArcVal ''array'', in order to avoid error messages when resizing the spreadsheet. It seems like PI SDK would be the solution. If that's the case, would someone be able to point me to a vba code that could solve my prob. If you know of a better way than VBA, please share.

      Thanks.

        • Re: Retrieving Archived Values For Multiple Timestamps automatically
          VasanthakumarR

          Hi Mohammed,

           

          In PI Archive Values Datalink function you cannot select more than one timestamp, so I would recommend you use the PI Timed Data Datalink Function which allows you to select the multiple timestamps and it will be given the same result like Archive values (Exact Time). Check the link PI DataLink for more details about Timed Data Function 

           

          Timed data.png

           

          -Vasanth.

          1 of 1 people found this helpful
            • Re: Retrieving Archived Values For Multiple Timestamps automatically
              Batou

              Thank you Kumar for the quick answer. ''Timed Data'' PI function is indeed a solution but not quite: assuming I will need to oversize the array because the number of cells referred to as timestamps isn't static, Excel will still generate a few error messages (''The time is invalid'').

              The timestamps are generated, using PiCompDat, which will change depending on the set start and end time (using a dynamic excel function like NOW() ).

              I'd prefer not having to filter out the error messages (in order to draw a graph e.g.) because It will also hide other relevant information in the sheet.

              Thanks.