Alarm Status Table Question (TAGS)

Good Day,

Have not got to dig into this to far, but I was looking for a way to identify active alarms. That is easily done with the Alarm Status Table. I was able to get that lined out how I liked, but started exploring the details inside of each individual active alarm. I see the “Config Properties” under the details, such as Source Path, Name, Mode, etc. I was hoping i would see the OPC Item Path. Just curious if anyone has another possible avenue to quickly identify the actual tag path for alarms.
One option that i see is to list the tag used in the “Notes” section for the alarm config, but if the tag path was changed, that wouldn’t be dynamic.
I’ve looked at the scripting on createPopupMenu, but it did not appear that i could get the path needed there either.

Thanks,
Curtis F.

On the page with the summary control.

Add a label called srcPath to the screen somewhere.

Then under

Alarm Display Control, Scripting, OnDoubleClick

Add this line of code

self.parent.getComponent('srcPath').text = system.tag.read(str(alarmEvent.get('Source')).split(':')[3]+'.OPCItemPath').value

That will write the OPC Item Path of the alarm to the label when you double click an alarm.

2 Likes

Does not appear to work, it brings back nothing. Set the text to static “blah” in the label. Double click and it blanks. The output console is also empty.

Right below that line put these lines and then double click an alarm and check the console.
I am not sure why it isn’t working since these are standard calls.

print str(alarmEvent.get(‘Source’)).split(’:’)[3])
print system.tag.read(str(alarmEvent.get(‘Source’)).split(’:’)[3]+’.OPCItemPath’).value

1 Like

Worked just like it should have, I did not look to check and see that the alarms i clicked were OPC tags, the ones i were clicking were expression tags. Thanks for the help!

1 Like