if( system.tag.read("[default]Line/ClearFaults").value == 1):
results = system.alarm.queryStatus(source=["*Line*"])
for item in results:
eventID = "%s" % (item.getId())
except Exception as e:
print("Error:" + str(e))
Running this client event script to remotely acknowledge alarms.
All alarms acknowledge with this script but some reappear a few seconds later as unacknowledged.
I made an expression tag to monitor the unacknowledged alarm count and using this script initially it went from 120 -> 0 to 88.
Running again it went from 88 -> 0 to 88.
Hi found this code and it works for me on perspective client.
def runAction(self, event):
This event is fired when the 'action' of the component occurs.
self: A reference to the component that is invoking this function.
event: An empty event object.
#Alarm states to be cleared
state = ["ActiveUnacked", "ClearUnacked"]
#Create Dataset containing alarms in desired state
result = system.alarm.queryStatus(state = state).getDataset()
#Convert to python dataset
alarmDataset = system.dataset.toPyDataSet(result)
alarmNames = 
#Iterate over dataset to get a list of alarm names
for x in alarmDataset:
#pass alarm name list, comment, username
system.alarm.acknowledge(alarmNames, "Batch Ack", "Administrator")