List of alarm tags

#1

any method to retrieve a list of alarm tags that i have configured? my system have a lot of tags and i am finding a way to list out all the available alarms in the system.

0 Likes

#2

Perhaps you could use the system.alarm.queryStatus() function and use a wild card to get all the alarms.

Best,

1 Like

#3

not sure if this will work in 7.7 but it will in 7.5 and 7.6 as long as you have the ialabs module. It will run thru all of your tag folders and print out the tagpath of any tag with an alarm configured and whether the alarm is analog or digital. be prepared, if you have alot of tags it will take quite a while.


tagProvider = '[put the tag provider name here]'
folder = ''
folderPath = tagProvider + folder
tags = system.tag.browseTags(tagProvider + folder,recursive=1)
for tag in tags:   
   tagAlert = system.tag.read(tagProvider + tag.path + '.alertmode').value
   if tagAlert != 0:
       if tagAlert == 1:
           print tag.path + ' = digital'
       elif tagAlert ==2:
           print tag.path + ' = analog'   
0 Likes

#4

For posterity:
Using system.alarm.queryStatus(source="*") as Nick suggested is far quicker than using browseTags. It also gets you access to all of the alarm’s configuration properties, rather than just the modified-from-default properties.

0 Likes