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)
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?
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.
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.