I need to send an email for each and every alarm that fires in the software and I’m facing an issue of alarms missed events in the Alarm Active tag alarm event. My tag is a 16 bits SHORT tag. On that tag I’ve defined 16 Bit state alarms, one for each bit. I then programmed the Alarm Active tag event like this:
if missedEvents: print "ALARMS MISSED EVENTS" shared.alarms.sendEmail("Allarmi produzione",alarmEvent.displayPath)
where the sendEmail function is:
def sendEmail(subject,body): print "MAIL ALLARMI: ",str(body) system.net.sendEmail( "%s:%d" % (smtpServerAddress,smtpServerPort) ,mailAccountOwner ,subject ,str(body) ,False ,mailAddressTo ,None ,None ,60000*5 ,mailAccountOwner ,mailAccountPassword )
If I set the tag value to 32767 to fire 14 alarms all together, what I read in the wrapper log is:
i.e. only 5 alarms out of 14 get notified and the MISSED EVENTS warning gets printed.
Any suggestion to get all alarms notified? Should I split the tag into 16 boolean tags and apply the notification function to each of them?
Thanks in advance, regards