AcknowledgeAllAlarms Subroutine

Acknowledges alarms for all tags in the specified Picture. If any of the alarms in the picture require an electronic signature, acknowledgement depends on the setting of the Unsigned Writes options in each alarm's block:

Accept Enabled – The subroutine will also acknowledge the alarm associated with this block.

Reject Enabled – The subroutine will acknowledge other alarms, but not the alarm associated with this block.

Syntax

AcknowledgeAllAlarms[Picture], [intErrorMode]

Properties

The AcknowledgeAllAlarms subroutine syntax has these parts:

Part

Description

Picture

String. (Optional) The file name of the Picture for which you want to acknowledge all alarms. If no picture is specified, the current picture is used.

intErrorMode

Integer. (Optional). The error mode.

0 (default) – Allows the subroutines to provide the error messages. Errors are displayed in the form of a message box. If no entry is made for the intErrorMode parameter, the default is used.

1 – Allows the user to handle the error messages. Errors in the subroutines are passed back to the calling routine for handling.

2 – Writes errors to all destinations. No error messages display. Instead, the errors are written to all iFIX destinations, including the Alarm History window destinations using SendOperatorMessage.

Remarks

If the only object in a picture is an Alarm Summary object that has Allow Acknowledge All Alarms disabled, this subroutine will not acknowledge any alarms. The order of logic in the subroutine is as follows:

  1. Look for an Alarm Summary Object in the picture.
  2. Check for whether the Allow Acknowledge All Alarms option is enabled.
    • If enabled, run the AckAllAlarms method.
    • If disabled, go to next step.
  1. Check the other objects in the picture.

If you are using the AcknowledgeAllAlarms subroutine on an Alarm Summary OCX, this subroutine checks to ensure that the Allow Acknowledge All Alarms property is enabled. If the property is disabled, no alarms associated with that Alarm Summary OCX are acknowledged.

 

Example