Acknowledge specific alarm / tag

I created a popup faceplate that shows alarms status of a specific Tag (UDT).
If it alarms ( it could HH, PH, PL or LL), what I want is to acknowledge that alarm on my faceplate, I have a button "Ack". But I don't know how am I going to acknowledge that specific alarm.

I hope some could show me, or what I need to study.
I see this document about

system.alarm.acknowledge(alarmIds,notes, username)

https://docs.inductiveautomation.com/display/DOC79/system.alarm.acknowledge

However, I do not know how to reference or know the alarmId specific to the tag binded to my popup faceplate.

I hope someone in community already found out solution to my problem.

Thanks and regards,

Like suggested in this post, you can try using queryStatus and filter to get just the specific tag. That will give you a list of alarm events that you can iterate using a script like here and get the IDs.

Your queryStatus call would probably look something like

alarms = system.alarm.queryStatus(status=["ActiveUnacked"], path=[my_tag_path])

where I'm assuming you have your tag path as a binding on the popup already.

EDIT: Like mentioned by @bschroeder, queryStatus is pretty intensive so you don't want to call it directly, use a message handler or invokeAsynchronous

Make sure that when you issue the script todo this

alarms = system.alarm.queryStatus(status=["ActiveUnacked"], path=[my_tag_path])

that you call that using system.util.invokeAsynchronous system.util.invokeAsynchronous - Ignition User Manual 7.9 - Ignition Documentation.

Otherwise you will freeze your client GUI while it is doing the query to the gateway.

Another option would be to put a message handler on the gateway to handle the acknowledgment of the alarm.

1 Like

Thanks, I'll update my post with that info as well for anyone looking in the future.

Thanks for all your suggestions,

I will try all this things and comeback here if I figure it out.

Regards,