AnsweredAssumed Answered

how to create a simple PI PE counter

Question asked by Boost01 on Sep 22, 2015
Latest reply on Sep 22, 2015 by czhang

Hi all,


This should be really easy, but I am having a hard time with it. I need to create a Performance Equation to count while a tag has a value = "whatever", then reset to 0 when it doesn't. I have (as a test)

 

if 'ba:phase.1' = "Phase 1" then 'r501.active.duration' +1 else 'r501.active.duration' = 0

 

where r501.active.duration is the name of the tag I created for this.

All I get when I run this is 0,1,0,1,0,1 every minute (I set it to scan class 1 so I could get a minute counter).

I tried to run it with

if tagval('ba:phase.1','*')

but that didn't return any different results.

 

Any help would be gratefully appreciated.

 

Kevin

Outcomes