3 Replies Latest reply on Apr 22, 2012 5:58 PM by hanyong

    Recalcution in PI ACE

    JiteshV

      In case of clock scheduling we can do recalculation as shown in manual for below expression.

      MyOutputTag.Value = MyInputTag.Avg("*-1h", "*")

      But in case of natural sechduling and I am doing addition of 3 tags where i need to have Same TimeStamp for all Input Tags at the time of ACE trigger

      If TimeStamp of All Input Tags is Same

      Then

      Output_Tag_Total.value = Input_Tag1.value+ Input_Tag2.value + Input_Tag3.value

       

      Else

       

      Output_Tag_Total.value  = "Invalid Data"

       

      EndIf

       

      May I know for above kind of logic, is it possible to do automatic / Manual recalculation?

       

      For automatic recalculation do I need to write any code?

       

      I appreciate all your help in advance !

       

       

        • Re: Recalcution in PI ACE
          hanyong

          Hi Jitesh,

           

          Yes, you can always run recalculation (auto or manual) for your ACE calculation. This is a feature of ACE, and you should be able to configure auto recalculation or trigger manual recalculation from ACE Wizard

           

          Since it is configurable, you do not have to write code for auto recalculation, but just to clarify the mechanism here. When auto recalculation is configured for an ACE calculation. It tells the ACE scheduler to sign up for archive value updates of the input tags, and re-calculation is triggered when there are changes in the archived values of the input tags (meaning there is a change in value in the tags' history). 

           

           

            • Re: Recalcution in PI ACE
              JiteshV

              Hi Han Yong,

               

              Recalculation with clock scheduling is comfortable. But in case of Natural scheduling take this example,

               

              Output_Tag_Total.value = Input_Tag1.value+ Input_Tag2.value + Input_Tag3.value

               

              Here if the any of the tag gets value then the triggered tamp timestamp whould match with the remaining tag timestamp, if it satisfies then display the output else show "insufficient data". Again after 4 days if the input_Tag2 got its data for 4 days then we need to compare the timestamp for input_Tag2 with the remaining tags (input_Tag1 , input_Tag3) and if all the three tags have same timestamp then show the result. else again show insufficient data.

               

              Can this be achived?

               

              I have tried with summary function but not sure in picking the timestamp of the refilled data and comparing with the remaining tags(timestamp) since it is naturally triggered.

               

              Give ur suggession.

                • Re: Recalcution in PI ACE
                  hanyong

                  Hi Jitesh,

                   

                  The recalculation feature in PI ACE does take into account if the calculation is natural or clock scheduled and whether an interval is specified for the recalculation. You can refer to the Recalculation section (part of Advanced Topics)in the PI ACE user guide, to get more details on how it works.

                   

                  But generally for natural scheduled calculations, if recalculation interval is not specified then PI ACE will take into account of the archived events of input and output tags in the calculation and recalculation at the times where there are archived events.

                   

                  I am not sure how you compare the timestamp of the values, but at this moment, I would guess that as long as the logic still works if you are running it at a time of an archived event, it would still work.