Alert Acknowledge

I have an alert summary table set up in my project which is working fine. However, along with acknowledging the Ignition alerts, I need to write to a couple of OPC tags to acknowledge the alarm in the control system. I would like to do both from the same button. Does anyone have an idea of how I can accomplish this? Thanks.

Sure, this isn’t too hard. The idea is that you’ll set the Alert Summary table’s Ack Buttons Location property to Hidden, and then drop your own button beneath the table so that you can implement your own acknowledgement logic.

For example, you could use this script on the button’s actionPerformed event to acknowledge the alert and alse do your own custom logic:

[code]table = event.source.parent.getComponent(“Alert Summary”)

selRow = table.selectedRow
alerts = table.alerts

if selRow != -1:
alertSys = alerts.getValueAt(selRow,“System”)
alertPath = alerts.getValueAt(selRow,“Path”)
alertState = alerts.getValueAt(selRow,“State Name”)
system.alert.acknowledgeAlert(alertSys,alertPath,alertState)
# Perform your own logic here[/code]

You could bind the button’s Enabled property to an expression like this so that the button only became enabled when the user had selected an unacknowledged alert:

{Root Container.Alert Summary.selectedRow}!=-1 && !try(toBoolean({Root Container.Alert Summary.alerts}[{Root Container.Alert Summary.selectedRow},"Acked"]),true)

Hope this helps,

Carl,

That was very helpful. As a follow-up, what if I needed to do an “Acknowledge All” in this same scenario? Thanks.

Same idea, just loop through all of the rows in the dataset. You can check the value of the “Acked” field to see if the alert on that row needs acknowledgement or not.

Thanks for the nudge in the right direction. That did the trick.

Isn’t there a way to do this in the onAcknowledge event inside of the alarm status table?

Hello. This thread was originally made in 2010 when the system used was known as “Alerts” rather than “Alarms” - a lot has changed since then so this thread is not accurate for current versions.

Nowadays this would likely be achieved with Tag Event Scripts. There are Alarm Event scripts for each tag that can be configured to do something when that alarm event happens. This method would allow the script to run regardless of where or how the alarm was acked.

Well would you look at that. system.tag.writeBlocking("[.]Ack", True) in the AlarmAcknowledge event script worked like a charm. Thanks for pointing me in the right direction.

1 Like