3 Replies Latest reply on May 30, 2018 11:10 AM by rschmitz

    Multiple PI tags' values' existance at exact timestamps before performaning operation on AF

    VincentW

      Dear sir,

      I have questions about using multiple tags' value (at same timestamp) to generate values of multiple tags.

      For example,

      (1) We get tag_src1 and tag_src2 from UFL to PI DA server, so both of the tags have a series of same timestamps and different values.

      (2) We want to us PI AF... to generate values of additional tags. e.g. output to tag_dest_1 as (tag_src1 + tag_src2) where the exact timestamp's values' addition to tag_dest_1 with the same timestamp. Similarly another operation (tag_sc1 - tag_sc2) to tag_dest_2. Is it possible to use PI AF and Analysis to make it ?

       

      I'm not sure is that when we perform operation by tag's trigger, do we have problems of ensuring both tag_src1 and tag_src2 at exact timestamp will have values already from sources at that timestamp ?

      If this tag's frequency is one points every 100 ms. Will that be another issue ?

       

      Thanks.

        • Re: Multiple PI tags' values' existance at exact timestamps before performaning operation on AF
          rschmitz

          Hi Shengwen,

           

          You can use the Advanced button on the Analysis tab to set how the output timestamp is written. You can set the timestamp to be the Trigger Time (rather than the execution time so if the event reaches the server 1-2 seconds later due to network latency it will use the trigger time from the incoming tags for the timestamp).

           

           

          10 calculations/sec would be a concern if you were doing more expensive calculations (i.e. moving averages over an hour for a quickly updating tag), but for something relatively simple like adding or subtracting two numbers I suspect you'll be fine and they won't lag behind. One more caveat on this, if you're planning on doing this for 10k pairs of tags all updating with a 100ms frequency that's a bit of a different story and you may run into issues. Analysis performance is a little bit played by ear unfortunately so I can't give you hard cutoff numbers, but from what I understand what you're doing now seems reasonable.

           

          Cheers,

          Rob

            • Re: Multiple PI tags' values' existance at exact timestamps before performaning operation on AF
              VincentW

              Hello Robert,

              Thanks for your response. You have answered some of my questions.

              The following questions are:

              (1) Is it possible to determine both of  tag_src1 and tag_src2 have had values at time1 (supposed that they both have at identical time up to millisecond) so that we can perform operation like  (tag_src1 + tag_src2) ? Since if we just use TagVal(tag1, time1) + TagVal(tag2, time1) according to tag1's trigger time, I'm not sure TagVal(tag2, time1) is available at time1 yet.

              (2) As you said , there is no cutoff numbers for high frequency calculation. Do you recommend how we see the loading is still affordable and would not affect other PI functionality? e.g. just look at CPU / Memory usage?

              Thanks.

              BR,

              Vincent.