Alarm delay on re-trigger

Hi guys,
I have a customer that had an alarm that was going on and off last night and sent him over 1000 emails within a couple of hours. I am using an ewon flexy with several different alarms triggered off of a Boolean bit from and allen Bradley plc. I was wondering if it can be setup so that if an alarm goes low then back high again right away it would ignore sending that email for a certain amount of time. I see the alarm delay in the setup but from what I understand that will just delay the email from sending that amount of time when the bit goes high?

Hello,

Can you provide a back up of the unit with support files?

A script setup may resolve the issue of consistent email sends. I would need to review the backup.

Hi Kevin.
See attached. Thank you.
MOVED TO STAFF NOTE (156 KB)

Also please see attached image. In the email the Tagname date and time is not matching the actual date and time. Not sure if i can change this or just remove it.

Hi Kevin.

Did you receive my previous emails with the backups you requested?

Hello Don,

Yes i have. I have been running some tests.

The only method that I have been able to get to work is with a BASIC script. You would need to code sending the email through the script. Use an ONTIMER and ONCHANGE to regulate the emails.

Ok thanks Kevin,

Are you able to help me out with the code you are testing and send me the sample code to try out?

Let me know. Whatever you can do to help would be greatly appreciated.

Hi Kevin.
Are you able to assist with the code you were testing here? As you can see in my backup there are several alarms so I would like to try this out for only the problematic ones.

Hello,

Sorry Don.

You can do with the following

CLS
TSET 1,300
ONCHANGE “TagStatus”, “GOTO EMAIL”
ONTIMER 1,“GOTO RESET”

$emailto$ = “”
$emailcc$ = “”
$emailsubject$ = “”
$emailbody$ = “”
$EmailAttachment$ = “”
$EmailContents$ = $EmailBody$ + $EmailAttachment$

FUNCTION EMAIL
IF (SEND_EMAIL@ = 0) THEN
SENDMAIL $EmailTo$, $EmailCC$, $EmailSubject$, $EmailContents$
Send_Email@= 1
ELSE
PRINT “MAIL HAS BEEN SENT”
ENDIF
ENDFN

FUNCTION RESET
IF (SEND_EMAIL@ = 1) THEN
Send_Email@ = 0
ELSE
PRINT “Email is ready to send”
ENDIF
ENDFN
END