Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

Ignition version 7.6 introduced a new alarming system. All of the associated functions can be found under the system.alarm section.

Panel
titleDescription

Acknowledges an alert, as specified by a system, path, and stateName. When run in a Client script, the currently logged-in user will be recorded as having acknowledged the alert. When run in a Gateway script, you must provide a username that will be recorded with the acknowledgement, since no user actually acknowledged the alert.

Panel
titleSyntax

system.alert.acknowledgeAlert(system, path, stateName)

  • Parameters

String system - The originating system for the alert being acknowledged.

String path - The path to the alert being acknowledged.

String stateName - The alert state name to acknowledge.

  • Returns

Nothing

  • Scope

Client

Panel
titleSyntax

system.alert.acknowledgeAlert(system, path, stateName, user)

  • Parameters

String system - The originating system for the alert being acknowledged.

String path - The path to the alert being acknowledged.

String stateName - The alert state name to acknowledge.

String user - A username to use for who acknowledged this alert. Only available in the Gateway-scoped version of this function.

  • Returns

Nothing

  • Scope

Gateway

Panel
titleExamples
Code Block
languagepy
titleCode Snippet
 #This example shows the basic syntax for acknowledging an alert.
 
system.alert.acknowledgeAlert("SQLTags.default", "[default]Alm_ESTOP", "ALM_STOP")
Code Block
languagepy
titleCode Snippet
#This code snippet could be used as a mouseReleased event handler on a 
#Table component whose data was the return value of the system.alert.queryAlertStatus function. 
#It would present a right-click menu to acknowledge the currently selected alert.
 
row = event.source.selectedRow
if row != -1:
   data = event.source.data
   alertSys = data.getValueAt(row,"System")
   alertPath = data.getValueAt(row,"Path")
   alertState = data.getValueAt(row,"State Name")
   def ack(event, aSys=alertSys, aPath=alertPath, aState=alertState):
      import system
      system.alert.acknowledgeAlert(aSys,aPath,aState)

   menu = system.gui.createPopupMenu({"Acknowledge":ack})
   menu.show(event)