AlarmManagerHandler
AlarmManagerHandler (FB)
AlarmManagerHandler (FB)FUNCTION_BLOCK AlarmManagerHandler
This function block provides an alarm buffer list for each alarm configured in the configuration list. It is independent of the alarm state; even inactive alarms and alarms in the normal state are shown.
The "AlarmTraversalConsumer" is used to retrieve all alarm data. The data is not read directly via this function block itself; the "AlarmTraversalConsumer" can be understood as a listener. The data is accessed exclusively via the pointer to the "AlarmManagerBuffer". This pointer is returned by the "AlarmTraversalConsumer", which provides a get method for this purpose.
All data for each alarm row is held in the "stAlarmRowStructure", and each row is stored in the buffer array "m_paAlarmBuffer". The buffer can be accessed via the "ppaFilterAlarms" pointer. Only the filtered data is provided in this buffer.
Please note that only the data within the maximum configured number of alarms is read. This results in a significant performance gain. The data is also stored only once in the "AlarmManagerBuffer"; the buffer is addressed exclusively via the pointer.
With this function block, all alarms are accessible via IEC code, giving you the possibility to use them for other purposes or to define behavior rules. There are some standard rules that can be used. Different field information can be used to filter all alarms. "IMessageExecution" can be implemented to define custom alarm rules.
InOut:
Input
xForceDeactivateAlarmMessages
BOOL
Deactivate Alarm Messages (deactivates all alarm messages and ignores the last state of them)
Input
itfMessageExecution
IMessageExecution
Interface to define message execution rules.
Input
paPolicyList
POINTER TO ARRAY [0..ConstantParameters.gc_iMaxPolicyRules] OF stPolicy
The list which holds all policy rules.
Input
paGroupList
POINTER TO ARRAY [0..ConstantParameters.gc_iMaxGroupRules] OF stGroup
The list which holds all groups.
Input
xCreateFilterList
BOOL
On rising edge the "ppaFilteredAlarms" list will be created with the configured parameters "sFilterByType" and "sFilterString".
Input
sFilterByType
eFilterType
Filter by type (e.g.: "AlarmClass" or "AlarmGroup")
Input
sFilterString
STRING
Filter the list with the configured type and the matching filter string
Inout
ppaFilteredAlarms
POINTER TO POINTER TO ARRAY [0..ConstantParameters.gc_iMaxAlarms] OF POINTER TO stAlarmRowStructure
The filtered list, which is dynamically created by the given filter parameters.
Output
iFilteredAlarmRows
INT
the upper bound for the size of the filtered alarm buffer list.
Output
eError
ERROR
Output
stEmailStateInfo
stEmailState
Output
sAlarmTextPortal
STRING(255)
Last updated

