Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

Acknowledges any number of alarms, specified by their event ids. The event id is generated for an alarm when it becomes active, and is used to identify a particular event from other events for the same source. The alarms will be acknowledged by the logged in user making the call. Additionally, acknowledgement notes may be included and will be stored along with the acknowledgement.

This function uses different parameters based on the scope of the script calling it. Both versions are listed below.

Client Permission Restrictions

Permission Type: Alarm Management

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.

Syntax - Client Scripts

system.alarm.acknowledge(alarmIds, notes)

  • Parameters

String[] alarmIds - List of alarm event ids (uuids) to acknowledge.

String notes - A string that will be used as the Ack Note on each acknowledged alarm event. If set to None , then an Ack Note note will not be assigned to the alarm event. 

  • Returns

Nothing

  • Scope

Vision Client

Syntax - Gateway Scripts

system.alarm.acknowledge(alarmIds, notes, username)

  • Parameters

String[] alarmIds - List of alarm event ids (uuids) to acknowledge.

String notes - A string that will be used as the Ack Note on each acknowledged alarm event. If set to None , then an Ack Note note will not be assigned to the alarm event. 

String username - The user that acknowledged the alarm. NOTE: This parameter is only used when called from a gateway scoped script. This parameter should be omitted from any client-based scripts.

  • Returns

Nothing

  • Scope

Gateway, Perspective Session

Examples
Code Snippet - Acknowledging an Alarm in Client Scope
# This example shows the basic syntax for acknowledging an alarm from a client-based script
system.alarm.acknowledge(['c27c06d8-698f-4814-af89-3c22944f58c5'],'Saw this alarm, did something about it.')
Code Snippet - Acknowledging an Alarm in Gateway Scope
# This example shows the basic syntax for acknowledging an alarm from a gateway-based script
system.alarm.acknowledge(['c27c06d8-698f-4814-af89-3c22944f58c5'],'Saw this alarm, did something about it.', 'admin')
Code Snippet - Acknowledging Selected Alarms from a Table
# This code snippet could be used as a mouseReleased event handler on a Table component (not an Alarm Status Table component) 
# whose data was the return value of the system.alarm.queryStatus  function.
# It presents a right-click menu to acknowledge the currently selected alarms (for more than one, the table must be set to allow multiple selection). 
# This example does not ask for an ack message, and therefore might fail if the alarms we're attempting to acknowledge require notes. 
# Also, note that the system will ignore any alarms that have already been acknowledged.
 
if event.button==3:
   rows = event.source.selectedRows
   data = event.source.data
   if len(rows)>0:
      uuids = [str(data.getValueAt(r,'EventId')) for r in rows]
      def ack(event, uuids=uuids):
         import system
         system.alarm.acknowledge(uuids, None)
      menu = system.gui.createPopupMenu({'Acknowledge':ack})
      menu.show(event)
Keywords

system alarm acknowledge, alarm.acknowledge

  • No labels