Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Using an AF Formula as a Counter

$
0
0

I'm trying to create a counter for how many times a tag equals a certain value using AF formulas and attributes (as I'm not allowed to add more PI tags), so this restricts me to AF formula syntax (not PEs).

 

How can this be done?  For example, using Sinusoid as a test, how can I increment a counter(B) every time sinusoid(A) equals 50 ?

 

Something like this is needed ?

 

A=sinusoid

 

B=counter

 

Expression:  if (A==50) then B+1 else donothing

 

I cannot use if (A==50) then B+1 without the else as it gives a syntax error

 

How do I 'donothing' in AF formula syntax ??

 

Thanks for the help !

 

 


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>