Guide on how you can use the AlarmAckF firmware function to count the number of unacknowledged alarms or to acknowledge alarms.
The firmware function AlarmAckF can be used, for example, to count the number of unacknowledged alarms in any alarm class or the number of all unacknowledged alarms in the CPU. The function can also be used to acknowledge a specific alarm, acknowledge all alarms in a specific alarm class or to acknowledge all alarms in the CPU.
The functions parameter “Mode” selects what the function does:
Mode := 0 = acknowledge all unacknowledged alarm points.
Mode := 1 = acknowledge all unacknowledged alarm points except security points.
Mode := 2 = acknowledge a specific alarm point, set the point-id of the alarm point with strParameter.
Mode := 3 = acknowledge all alarm points in a specific alarm group, set the alarm group name with strParameter.
Mode := 4 = acknowledge alarm points in a specific priority group, set the number of the priority with intParameter.
Mode := 100 = Count the number of all unacknowledged alarm points.
Mode := 101 = Count the number of all unacknowledged alarm points except security points.
Mode := 102 = Check if a specific alarm point is unacknowledged, set the point-id of the alarm point with strParameter.
Mode := 103 = Count the number of unacknowledged alarm points in a specific alarm group, set the alarm group name with strParameter.
Mode := 104 = Count the number of unacknowledged alarm points in a specific priority group, set the number of the priority with intParameter.
Below are a few examples for using this function.
Function used to acknowledge all alarms when a button on graphics is pressed. Button is returned to off state after acknowledging the alarms.
(*Read the state of the button*)
iAllAlarmsAck := GetDigitalPointF('TEST_ALARM_ALL_ACK_FI');
(*If button is pressed then execute the program*)
if (iAllAlarmsAck = 1) then
(*Acknowledge all alarms*)
iResult := AlarmAckF(Mode:=0, intParameter:=1, strParameter:='abc');
(*Return the button to off state*)
iResult := SetDigitalPointF(0, 4, 'TEST_ ALARM_ALL_ACK_FI');
end_if;
Function used to acknowledge a specific alarm when a button on graphics is pressed. Button is returned to off state after acknowledging the alarms.
(*Read the state of the button*)
iSingleAck := GetDigitalPointF('TEST_ALARM_SINGLE_ACK_FI');
(*If button is pressed then execute the program*)
if (iSingleAck = 1) then
(*Acknowledge a specific alarm point*)
iResult := AlarmAckF(Mode:=2, intParameter:=1, strParameter:='TEST_ALARM_A1_FH');
(*Return the button to off state*)
iResult := SetDigitalPointF(0, 4, 'TEST_ALARM_SINGLE_ACK_FI');
end_if;
Function used to count the number of unacknowledged alarms in a specific alarm class.
(*Read the number of unacknowledged alarms in a specified alarm class*)
iAClassCount := AlarmAckF(Mode:=103, intParameter:=1, strParameter:='A-CLASS');
(*Display the value on graphics*)
iResult := SetDigitalPointF(iAClassCount, 1, 'TEST_A_ALARM_M');
Function used to count the number of unacknowledged alarms with a specific alarm priority.
(*Read the number of unacknowledged alarms with a specific alarm priority*)
iPrio3Count := AlarmAckF(Mode:=104, intParameter:=3, strParameter:='abc');
(*Display the value on graphics*)
iResult := SetDigitalPointF(iPrio3Count, 1, 'TEST_3_ALARM_M');