My team needed a way to edit acknowledgement notes, and I haven't found a good way to do it with ignition without some work arounds so I came up with this:
For every section of my project I have a memory boolean that has this script that executes on value changed:
s = 0
delay = 0
while delay < 3:
if s == 0:
date = system.date.now()
s = system.date.getSecond(date)
else:
date = system.date.now()
t = system.date.getSecond(date)
delay = delay + abs(t - s)
system.tag.write("[.]ALARMS_ACTIVE",1)
It is a workaround that prevents the use of sleep, and allows supervisors to disable a bi-directional switch that is immediately re-enabled. Essentially toggling false to true, a momentary switch of sorts. I then export my alarm configurations into a .json and add the following tags into the file with VSCode:
"enabled": {
"bindType": "Tag",
"value": "[.]../../WIDGET/ALARMS_ACTIVE"
}
This way every alarm that is configured will be tied to this momentary switch. I re-import the alarm configs, and now whenever someone wants to re-do their ack notes they can take a quick snip of all the acknowledged ones and then reset the alarms and add their corrected notes back.
I'm curious if anyone else has a use case for this or has done this with a UDT or gateway script that would allow for resetting one alarm at a time. My ideal goal is to make it so in the alarm page, operators can select a single alarm and reset it instead of having to do so in large batches.