When you read the AlarmStorage, you can get Static Informed about the alarms through this method call:


Declaration

METHOD AlarmRead
VAR_INPUT
/// A 0-based index of the row read from TblAlarm
diWhichRow : DINT;
/// An AlarmStorageStaticData variable, containing data of the alarm
staticData : AlarmStorageStaticData;
END_VAR

The staticData here contains:


Use
the following code to get the group name or class name:

Declaration

_itfAlarmClass : IAlarmClass;
_itfAlarmGroup : IAlarmGroup;
_sClass : STRING;
_sGroup : STRING;

Implementation

_itfAlarmClass := g_AlarmHandler.g_inst.FindAlarmClass(staticData.udiAlarmClassId);
IF (_itfAlarmClass <> 0) THEN
    _sClass := _itfAlarmClass.GetName();
END_IF

_itfAlarmGroup := g_AlarmHandler.g_inst.FindAlarmGroup(staticData.udiAlarmGroupId);
IF (_itfAlarmGroup <> 0) THEN
    _sGroup := _itfAlarmGroup.GetName();
END_IF 



See also....