Perspective - AlarmStatusTable - Visibility on Acknowledge Button Click Event

Based on what I've read so far I'm thinking the answer is no, but I'm curious if there is any workaround for detecting if the "Acknowledge" button has been clicked on an Alarm Status Table.

We have devices with 'ack' tags as part of their udts and it would be ideal if we could trigger those tags when acknowledged in the Alarm Status Table, rather than performing two independent acks.

I've already solved in one direction (device acknowledge will acknowledge on the Alarm Status Table), but it would be ideal to go in the other direction as well if possible.

1 Like

I’d also like the ability to refresh a binding on alarm ack :upside_down_face:

Pondering some options...
I would try to move the PLC write (away from Alarm Table Ack button) to an alarm pipeline that runs any time an alarm is active & acknowledged. Might be a dance of race conditions with your existing logic...

I just learned about Alarm event scripts a couple days ago, after posting a question about Ack tags.

Could you just perform your binding refresh on the alarm acknowledge event for the relevant tag(s)?

Absolutely NOT recommending this as a solution, but you can add events to the acknowledge button using Periscope's Portal component.

This is an example of adding an onclick event to the Acknowledge button that sends a message, which a handler responds to by displaying/printed the selected alarms.

Again, do not do this. Trying to reset latching control system alarms using Ignition alarm acknowledgement is not a good idea. Just because they both use the word "Alarm" doesn't make them the same thing.

View Configuration
{
  "custom": {},
  "params": {},
  "props": {},
  "root": {
    "children": [
      {
        "meta": {
          "name": "Portal"
        },
        "position": {
          "height": 300,
          "width": 300,
          "x": 327,
          "y": 562
        },
        "props": {
          "element": "() \u003d\u003e document.getElementById(\u0027alarmTable\u0027)?.querySelector(\u0027.ackAlarmsButton\u0027)",
          "events": {
            "target": {
              "lifecycle": {
                "onMount": "(target) \u003d\u003e {\n\n  target.onclick \u003d () \u003d\u003e {\n\n    console.log(\u0027clicked\u0027)\n    perspective.sendMessage(\u0027alarmAcked\u0027, {}, \u0027view\u0027)\n  }\n\n}"
              }
            }
          }
        },
        "type": "embr.periscope.embedding.portal"
      },
      {
        "meta": {
          "domId": "alarmTable",
          "name": "AlarmStatusTable"
        },
        "position": {
          "height": 380,
          "width": 585,
          "x": 42,
          "y": 53
        },
        "props": {
          "selection": {
            "active": {
              "data": [
                {
                  "ackNotes": "",
                  "ackPipeline": "",
                  "ackTime": "2025-04-06 21:59:08.275+0000",
                  "ackUser": "bmusson",
                  "activePipeline": "",
                  "activeTime": "2025-04-06 21:59:03.703+0000",
                  "clearPipeline": "",
                  "clearTime": "",
                  "deadband": "0.0",
                  "displayPath": "Alarms/Alarm/Alarm",
                  "eventId": "97d4eb7d-084a-4305-babc-65392a802b34",
                  "eventTime": "2025-04-06 21:59:08.275+0000",
                  "eventValue": "true",
                  "isAcked": "true",
                  "isActive": "true",
                  "isClear": "false",
                  "label": "Alarm",
                  "name": "Alarm",
                  "notes": "",
                  "priority": "Medium",
                  "source": "prov:default:/tag:Alarms/Alarm:/alm:Alarm",
                  "state": "Active, Acknowledged"
                }
              ]
            }
          }
        },
        "scripts": {
          "customMethods": [],
          "extensionFunctions": [
            {
              "enabled": false,
              "name": "filterAlarm",
              "script": null
            },
            {
              "enabled": false,
              "name": "filterShelvedAlarm",
              "script": null
            }
          ],
          "messageHandlers": [
            {
              "messageType": "alarmAcked",
              "pageScope": false,
              "script": "\tsystem.perspective.print(self.props.selection.active.data)\n\t\n\tself.getSibling(\"Label\").props.text \u003d self.props.selection.active.data",
              "sessionScope": false,
              "viewScope": true
            }
          ]
        },
        "type": "ia.display.alarmstatustable"
      },
      {
        "meta": {
          "name": "Label"
        },
        "position": {
          "height": 32,
          "rotate": {
            "anchor": "25% 25%"
          },
          "width": 50,
          "x": 96,
          "y": 486
        },
        "props": {
          "text": [
            {
              "ackNotes": "",
              "ackPipeline": "",
              "ackTime": "",
              "ackUser": "",
              "activePipeline": "",
              "activeTime": "2025-04-06 21:59:03.703+0000",
              "clearPipeline": "",
              "clearTime": "",
              "deadband": "0.0",
              "displayPath": "Alarms/Alarm/Alarm",
              "eventId": "97d4eb7d-084a-4305-babc-65392a802b34",
              "eventTime": "2025-04-06 21:59:03.703+0000",
              "eventValue": "true",
              "isAcked": "false",
              "isActive": "true",
              "isClear": "false",
              "label": "Alarm",
              "name": "Alarm",
              "notes": "",
              "priority": "Medium",
              "source": "prov:default:/tag:Alarms/Alarm:/alm:Alarm",
              "state": "Active, Unacknowledged"
            }
          ]
        },
        "type": "ia.display.label"
      }
    ],
    "meta": {
      "name": "root"
    },
    "type": "ia.container.coord"
  }
}
2 Likes

Way to ease me down that rabbit hole :laughing:

@bmusson - perhaps dumb question - I unsuccessfuly tried to replace the call to perspective.sendMesssage() with perspective.print(), util.sendMessage() and self.session.refreshBinding()

function whitelist issue or context issue?

Yes this would absolutely work, thanks for pointing it out! My use-case doesn’t care which tag is acked though, so adding in the view (once) as opposed to every tag seems a bit more efficient (from development perspective)

I implemented an onClick event on the entire component and check that an alarm has been selected before firing off a message handler. Not perfect (fires more often than necessary), but it works.