5 Replies Latest reply on Nov 15, 2013 2:15 PM by jdjohnstn

    PE or PI ACE?

    rmeyskens

      Here is my scenario. I am trying to find the best and easiest solution. Currently we do not have any ACE calculations in our environment.

       

      tagA - Digital ON/OFF

       

      tagB - Process flow

       

      so my current PE is: IF STATENO(tagA) = 1 THEN NOOUTPUT() ELSE TAGVAL(tagB)

       

      I am basically trying to filter out a zero/span operation of an instrument. I have noticed that even though tagA = 0 that tagB still hasn't 'levelled' off to its normal operating range. Lets says it takes ~30 mins for the zero/span operation to complete and see tagB return to normal, but tagA only shows it is running the zero/span function for 20 minutes. What I would like to do is once tagA = 1 then do NoOutput() for 30 minutes. Is that possible with PE or am I getting into the ACE world with that?

       

      If it is possible, what kind of code am I looking at for a PE?

       

       

        • Re: PE or PI ACE?

          Hello Randy,

           

          What you like to achieve is possible with PE. Simply set your PE tag up for natural scheduling with tagA as source. This means that each time there's snapshot change for tagA a calculation will be performed.

            • Re: PE or PI ACE?
              rmeyskens

              I think I didn't clearly explain. I need the NoOutput() for 30 minutes even if tagA returns to 0. so if tagA = 1 for 10 minutes, I would like there to be NoOutput() for 30 minutes from the time that tagA first equaled 1. Does that make sense? Is there a function that allows me to do that?

                • Re: PE or PI ACE?
                  jdjohnstn

                  We recently had a similar question, and something like this seemed to cover the case:

                   

                   if timeeq('CDM158', '*-30m','*',"Auto") > 0 then nooutput() else 'sinusoid'

                   

                  this says if the state has been "Auto" at any time in the last 30 minutes, then don't copy out the value.

                   

                  You may find some oter optimization, such as changing from "Auto" to 1, but that seems to give odd results.  Double-check this for your exact situation.

                    • Re: PE or PI ACE?

                      Thank you David,

                       

                      Just one thing that I would like to add. In opposite to what I suggested before, this use case requires clock scheduling.

                      • Re: PE or PI ACE?
                        jdjohnstn

                        Re-reading, that may or may not take care of your need, because it would wait until 30 minutes after TagA quit being 1.  You may want to play with things like '*'-FindEQ('tagA','*-30m','*') and BADVAL().  Some of this will depend on the volatility of TagA - if it goes off and back on multiple times in a 30 minute period, ehat do you want then, etc.