3 Replies Latest reply on Jul 2, 2018 7:59 PM by bklundt

    Tag Data Extraction and Storing

    bklundt

      When writing expression code for a template, can you extract a tag data point and store it until certain criteria are met? For example, creating an array within a for loop so you can store data from that for loop and then access a value in that array

        • Re: Tag Data Extraction and Storing
          John Messinger

          Hi Ben,

           

          Unfortunately looping is not supported in AF Analytics. Support for arrays (and some new Expression functions to return and extract values from arrays) will be available in PI 2018 which is due for release very soon.

           

          What is the larger context of the problem you are trying to solve?

          • Re: Tag Data Extraction and Storing
            sraposo

            Hi Ben,

             

            Adding on to John's comment, we will be supporting Matlab integration in the PI 2018 release. If the logic of your calculation isn't supported in Asset Analytics, maybe it could be done in MatLab if you have a MatLab production server.

             

            Also, I'm a little confuse why you would want to extract PI Point data locally on the analysis box to maybe use it later. The data is in the PI Point in the PI Data Archive, why not make the data call when the condition is met? Apologies if  I'm misunderstanding your question!

             

            Thanks,

            Seb

              • Re: Tag Data Extraction and Storing
                bklundt

                Thanks Sebastien and John for the response. I am used to coding in MatLab and using loops to extract data.. so that was my first thought as to how to tackle my problem. Looking into it deeper, I found a way around the problem using different logic that Asset Analytics supports. Thanks for the help/suggestions!