AF function to calculate time of bad value of particular tag

Hi All,

I want to generate few notifications on the bad value time of any specific tag like

if the tag is bad for last 24 hours then HIGH CRITICAL message should be sent. If the tag is not bad for last 24 hours but bad for 10% of day time then LOW CRITIC

AL message should be sent. If the data is bad at current time then warning should be sent, likewise...

Do we have any AF function which can help for how much time the specific tag was bad?

Bad value could be any digital error for the tag, not any specific error value...

 

Best Regards,

Supriya

Parents
  • Hi Supriya

     

    In AF Analytics, you can create an expression analysis with any of the functions starting with the word Time.

    These work on AF Attributes, so to prepare you'll need to create a Formula Data Ref. attribute defined as Int16 to check if your tag of concern is bad or not. Use the config string A=Attribute;[badval(A)] where A points to your attribute, and outputs of 1 indicate bad value while 0 indicates good values.

     

    These functions return the total number of seconds the condition is true for, so if you use the Time Equals function, you should compare it with the number of seconds per day (86400), something like TimeEq('FormulaAttribute', '*-24h', '*', 1) = 86400.

    You can also use the TimeLT (LessThan) or TimeLE (Less or Equal) and compare that with 8640 to represent 10% of the time.

Reply
  • Hi Supriya

     

    In AF Analytics, you can create an expression analysis with any of the functions starting with the word Time.

    These work on AF Attributes, so to prepare you'll need to create a Formula Data Ref. attribute defined as Int16 to check if your tag of concern is bad or not. Use the config string A=Attribute;[badval(A)] where A points to your attribute, and outputs of 1 indicate bad value while 0 indicates good values.

     

    These functions return the total number of seconds the condition is true for, so if you use the Time Equals function, you should compare it with the number of seconds per day (86400), something like TimeEq('FormulaAttribute', '*-24h', '*', 1) = 86400.

    You can also use the TimeLT (LessThan) or TimeLE (Less or Equal) and compare that with 8640 to represent 10% of the time.

Children