2 Replies Latest reply on Aug 21, 2018 5:10 PM by hhall

    How to delay a PI tag calculation after a change in the result.

    hhall

      How to delay a PI tag calculation. I currently have the following tag calculation.  Basically, it is used to count up when a certain event happens that meets the criteria.  It counts up 1 every time the event occurs, then resets to 0 every morning, to create a daily total.

       

      Tag1

      IF (DaySec('*') >= 18000 AND DaySec('*') < 18030) THEN 'Tag1' ELSE IF (DaySec('*') >= 18030 AND DaySec('*') < 18060) THEN 0 ELSE IF ('Tag2' > 0 AND Badval('Tag2') = 0) THEN 1 ELSE IF Badval('Tag1') THEN 0 ELSE IF ('Tag3'= 1) THEN ('Tag1' + 1) ELSE 'Tag1'

       

      There are usually hours between events.  Occasionally we have special circumstances where the tag counts 2or 3 events in a short period of time that is not accurate.  Once this calculation counts up 1, I want it to delay running the calculation again for 20 minutes.