IF TAGAVG('Testtag','*','*-1h') => 0 THEN TAGAVG('Testtag','*','*-1h') ELSE nooutput()
But what if i want to write the prvious value of the calculalation tag (Testtag.CALC)?
What you have suggested would not write any value to the calculation tag (Testag.CALC).
Could you also help on this?
Thanks in advance.
The PE will write the value of the source tag (TESTTAG) only if the test criteria is met i.e. the value being anything over 0.
If the value is below then nothing is written.
I'm unsure why you would want to write the previous value of the calculated tag again in the event of the value being below 0, as this value is already in PI. Writing it again would be a waste of archive space?
If this is the required behaviour, replace "nooutput()" with "PrevVal('testtag', '*')"
I also got the operators the wrong way round in my first post. I put "=>" instead of ">=".
Hope this helps,