Cleared events in alarm journal are not filtering out

Hi all,

I’m using Ignition Vision v8.1 and am setting up my alarm journal.

My current architecture uses the PLC to trigger a boolean tag which is configured as an alarm in ignition. When I acknowledge the alarm, a script runs which uses the syste.alarm.acknowledge on all event IDs with state “ClearUnacked” and “ActiveUnacked”. The PLC turns the trigger tag off, and then the alarm appears twice in the journal: once as an Ack event state and again as a Clear event state. Both of these are populating even though I have the “Cleared Events” filter turned off.

Overall, the logic seems to be working correctly, but I do not want all of these duplicates in the alarm journal and only want acked events. Am I messing up some kind of configuration? How can I make these cleared events all disappear?

1 Like

I can’t explain why those appear with the filter settings you have configured, but try adding this to the filterAlarm extension function

def filterAlarm(self, alarmEvent):
	state = alarmEvent.get("EventState").toString()
	if state == "Clear":
		return False
	return True

Hi @schenk, thanks for the response. I honestly did not see that filter alarm function so this was handy. Looking at the ignition user manual it seems that the state of the alarm event once it is in the journal will contain the language of “Cleared, Acknowledged”, “Active, Acknowledged”, etc.

I only wanted the Cleared, Acknowledged events so using something like this seemed to work to get rid of the active and acknowledged events:

	state = str(alarmEvent.getState())
	if state == "Active, Acknowledged":
		return False
	return True