I would like to be able to generate a list of each tag that has enabled alarms and the alarm configuration for each of the enabled alarms. If anybody has written some script or query to do this cleanly, I would appreciate some help. Thanks!
results = system.alarm.queryStatus(source=["*"])
for alarm in results:
That should do the trick. Of course that just gives the source, but you could use the alarm object to grab whatever configuration settings you wanted out of it.
Using system.tag.browseTags(Simple) to get your tags and system.tag.getAlarmStates to get their alarm configuration can help.
Sorry all… but, I’ve tried to use the queryStatus above to get a list of all alarms, however I only get 27 alarms returned, where there should be hundreds. I ran this in two locations: my local dev environment, no connection to PLCs where I got the 27 alarms; I also ran it on the production gateway where it returned a large number of alarms. I’m now not confident the “full” alarm list that I gave the customer using this function is in fact a full list at all…
Why would these results be different for the same gateway backup, between two systems?
Is there a fool-proof way to extract out a full list of every single tag with an alarm attached to it? (regardless of whether or not it’s part of a UDT or not)