Alarms missed events

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

Any suggestion to get all alarms notified?

Is there a reason you're not using the alarm notification built into Ignition directly? I just ran a test, and got 15 alarms just as expected. Pipelines are definitely the best option here, because tag event scripts have a limited pool to run in and can block each other (hence, the missedEvents flag in the first place).

Hallo PGriffith, thanks for your answer. Main reason is that system.net.sendEmail comes with the base package, whereas the module you suggest me has a cost and the budget is limited.
But my question is more general perhaps, than sending an email notification of an alarm, i.e. it sounds like this: as far as the experience I did, we cannot be sure that the Alarm Active event fires for each and every alarm, if there are many simultaneous alarms, can we? So it is unreliable, isn’t it? Or is there a parameter which configures Ignition, so that we can always trust that the event fires? I tried also with invokeAsynchronous but with no benefit at all.

This is how I’m using to send emails for alarms and is working great:

This are my alarms:

This is my Tag Events:

This is my shared script:

And this is my SMTP profile in Ignition:

And this are my modules in Ignition (it’s limited to 3 clients and 500 tags):

And I always get all alarms, either is only one alarm active or all eight in one byte…

Thanks Zxcslo, it seems you have just the same configuration as me. One question: have you ever tried to put the tag value from 0 to 255 with the tag browser or a system.tag.write in a button script so to activate all alarms at the same time? May be you should also add an if branch like this in your Alarm Active event script:

if missedEvents:
  print "MISSED ALARMS EVENTS"

so that it’s easier to catch a missed events issue in the wrapper.log file.

Regards

When I was testing it, that’s the only way to set multiple alarms. So yes, I was putting 255 to the tag and got all 8 alarms…

Thanks for the ‘missedEvents’ tip… I’ll implement it right away… :thumbsup: