# How to Acknowledge alarm using physical input from PLC?

**URL:** <https://forum.inductiveautomation.com/t/how-to-acknowledge-alarm-using-physical-input-from-plc/37321>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [August 3, 2020, 3:13pm UTC](https://forum.inductiveautomation.com/t/how-to-acknowledge-alarm-using-physical-input-from-plc/37321 "2020-08-03T15:13:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![p.tamilarasaan](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@p.tamilarasaan](https://forum.inductiveautomation.com/u/p.tamilarasaan)\
**Post date:** [August 3, 2020, 3:13pm UTC](https://forum.inductiveautomation.com/t/how-to-acknowledge-alarm-using-physical-input-from-plc/37321/1 "2020-08-03T15:13:12Z")

</div>

Hi All,

I’m looking for some help with alarm. I like to Acknowledge alarm using physical input from PLC.  
I don’t know if that is possible.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [August 3, 2020, 3:41pm UTC](https://forum.inductiveautomation.com/t/how-to-acknowledge-alarm-using-physical-input-from-plc/37321/2 "2020-08-03T15:41:03Z")

</div>

[https://docs.inductiveautomation.com/display/DOC80/system.alarm.acknowledge](https://docs.inductiveautomation.com/display/DOC80/system.alarm.acknowledge)

---

<div class="post-metadata">

**Author:** ![p.tamilarasaan](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@p.tamilarasaan](https://forum.inductiveautomation.com/u/p.tamilarasaan)\
**Post date:** [August 3, 2020, 3:51pm UTC](https://forum.inductiveautomation.com/t/how-to-acknowledge-alarm-using-physical-input-from-plc/37321/3 "2020-08-03T15:51:46Z")

</div>

Thanks Matrix\_Engineering…

---

<div class="post-metadata">

**Author:** ![rbabcock](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rbabcock/32/13425_2.png) [@rbabcock](https://forum.inductiveautomation.com/u/rbabcock)\
**Post date:** [August 3, 2020, 5:50pm UTC](https://forum.inductiveautomation.com/t/how-to-acknowledge-alarm-using-physical-input-from-plc/37321/4 "2020-08-03T17:50:17Z")

</div>

I did this last week for some in-house function blocks we made for Phoenix’s PLCNext controllers. I put this in the Value Changed script for our Ack bit in the UDT. It might be a little messy and I’d welcome any input on improving it!

```auto
if currentValue.value > previousValue.value:
		aTag = tagPath
		
#Get the alarm name from the tag path
		aSource = aTag.replace('[default]', '')
		aSource = aSource.replace(tag.name, '')
		aSource = '*'+aSource+'*'
		
#alarmJournalName is a parameter in the UDT. If you have a static one use it here instead
		alarm = system.alarm.queryJournal(
			journalName = system.tag.read('[.]alarmJournalName').value,
			state = ["ActiveUnacked"],
			source = [aSource]
		)
		uuidList = []
#This will get every instance of the active, unacked alarm in the journal for your alarm
		for x in alarm:
			uuidList.append(str(x.getId()))
			
		system.alarm.acknowledge(uuidList, '', "admin")

```

Hopefully this helps!

---

<div class="post-metadata">

**Author:** ![p.tamilarasaan](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@p.tamilarasaan](https://forum.inductiveautomation.com/u/p.tamilarasaan)\
**Post date:** [August 4, 2020, 3:20am UTC](https://forum.inductiveautomation.com/t/how-to-acknowledge-alarm-using-physical-input-from-plc/37321/5 "2020-08-04T03:20:05Z")

</div>

Hi rbabcock

Thanks for the script. I will check that and let you on the same.

Tamil
