#1) Yes. I do this on 7.5 already. I do not see why it would not work in 7.6 thou I have not tried it yet.
I added the following Custom Properties on Alarm Table:
oldrow
Row -> linked to Selected Row on Alarm Table.
On the alarm table, mouseClicked add the following code:
#Get the custom properties.
oldrow = event.source.oldrow
newrow = event.source.Row
#Check to see a row is selected and this is the second click.
if newrow == -1 or oldrow <> newrow:
event.source.oldrow = newrow
else:
path = event.source.data.getValueAt(newrow,"Path")
app.Functions.tracealarm(path)
Next I added a new script under app.Functions.
def tracealarm(path):
import system
grf = system.tag.getTagValue(path + ".Documentation")
system.nav.openWindow(grf)
In this you could use swapWindow, centerWindow, etc to drive the windows. Depends on how you set up your navigation.
Next on each tag that generates the alarm, you need to add the window name (plus parameters if needed) you want opened to the documentation under the Metadata tab.
#2: I have never done this. But don’t see it being too difficult.
Create a window that only has that instrument perhaps a popup.
Create a button that would acknowledge the alarm(s).
On the visibility, you could add the following code:
tag = event.source.tag
search = '%' + tag + '%'
count = system.db.runPrepQuery("SELECT COUNT(*) FROM ALERT_LOG WHERE ACK_TIMESTAMP is null and PATH like ?", [search])
event.source.visible = count
On the button event handler of your choosing, I typically use action performed:
Add the following code:
import system
# Get the varibles from the root container.
tag = event.source.tag
#Get the date, format the date, Get the user
from java.util import Date
now = Date()
dt = system.db.dateFormat(now, "yyyy-MM-dd H:mm:ss")
user = system.security.getUsername()
# Acknowledge the alarms.
system.db.runPrepUpdate("UPDATE ALERT_LOG SET ACK_TIMESTAMP = ? , ACK_USER = ? WHERE ACK_TIMESTAMP is null and PATH like ?" ,[dt,user,search])
This is pretty basic, but since I don’t know how you set up all your tags / project you should be able to adapt this.
#3: I have not looked into the new alarming features of 7.6, sorry.
Hope this helps.
Cheers,
Chris