Tag value fluctuations leading to alarm email spam

I have a tag value that fluctuates +/- 10 and when the value of the tag reaches an alarm specification, it triggers it numerous times leading to email spam.

My question is, how do I make it so the tag only alarms/emails once until it returns to a value of 180 or greater? My low level alarm spec is 100 and I don’t want to see another email until it returns to 180+.

Thanks in advance!

An easy way to achieve this would be to use a simple script. Essentially the way the script will work is it will detect if the value is at your low defined threshold, if it is we will trigger a bit marking that the message has been sent once and then keep that bit enabled until we get back to your good threshold.


    INIT Section
    emailSent% = 0
    ONCHANGE "YourTag", "GOTO CheckAlarming"

Then inside of the alarm section we can do:

    IF(YourTag@ < YourMinValue) THEN
        IF(emailSent% = 0) THEN
            rem this is where you would send your email. 
            rem sendmail "toemail", "cc", "subject", "body"
            emailSent% = 1

    IF(YourTag@ >= YourMaxValue) THEN
        IF(emailSent% = 1) THEN
            rem This is where you would send your good value email. 
            rem sendmail "toemail", "cc", "subject", "body"
            emailSent% = 0

Thats it. The above code will check if you are below your alarm, check if an email has been sent and will send a message if one hasn’t. Then it will disable subsequent email notifications.

Finally it will check if you go back over the max value and if you do send one notification and then set the bit to allow emails again.

1 Like