How to use "alarms" parameter from onAcknowledge Extension Function

I need to set (clear) a ‘PLC bit’/OPC tag(s) when alarms are acknowledged in an Alarm Status Table.

There is the onAcknowledge extension function in scripting that looks like the perfect place to do so.

How is the ‘alarms’ parameter used for this function, or does someone have some sample code to help get started to pull the alarm tag information out for the alarm acknowledged? I’m not finding anything.
(In other words, a bit transitions from 0 to 1, triggers an alarm that is set for the tag, the alarm gets acknowledged, this same bit needs to get set back to 0. Currently it stays active/acknowledged, we need to clear it in some circumstances). Thanks much.

Found it.

Hi Jeff, I have the same problem, when I pressed acknowledge button, I nedd write in a tag. How can you solve this, please?

Hello Andreia,

Since this post was done, we are handling alarms a little bit differently. Still being relatively new, it is changing frequently : ).

The key now, is that we are setting the alarm ‘Ack Mode’ to ‘Unused’, so we are not using Ignitions acknowledgement. There is

We are then using a momentary button on an alarm screen to clear the PLC tags we are using for alarms. We still use the alarm display and display active alarms, with a toggle button to show ‘history’ or cleared alarms too.

I hope that helps, and feel free to let me know of other questions.


Oh, and also, about the way I did solve it at the time, in case you want to still do it that way: I don’t have any good sample code now, but in the onAcknowledge extension function for the Alarm Status Table that is called when the acknowledgement button is pushed, you need to enable that and have the script code to write a value (e.g. ‘0’) to the tag in question that has an alarm enabled that will be acknowledged.


To directly answer, for onAcknowledge function, click enabled on the top, then the script is simply this:

def onAcknowledge(self, alarms):
	system.tag.writeBlocking('[MyTags]New Tag',1)

Your tag provider and tag path will be unique to you.

1 Like

Thanks @jeff.ryan
Thanks @jlandwerlen I used this solution and work very well.