How to Acknowledge alarm using physical input from PLC?

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

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

Thanks Matrix_Engineering…

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!

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!

Hi rbabcock

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

Tamil