Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width7

Declaration

Column
width93
Code Block
themeConfluence

METHOD AlarmRead
VAR_INPUT
         /// A 0-based index of the row read from TblAlarm
         diWhichRow     diWhichRow : DINT;


         /// An AlarmStorageStaticData variable, containing data of the alarm
         staticData           staticData : AlarmStorageStaticData;
END_VAR

The staticData here contains:

  • udiAlarmGroupId
  • udiAlarmClassId


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

Section
Column
width7

Declaration

Column
width93
Code Block
themeConfluence
_itfAlarmClass : IAlarmClass;
    _itfAlarmGroup : IAlarmGroup;
    _sClass : STRING;
    _sGroup : STRING;
Section
Column
width7

Implementation

Column
width93
Code Block
themeConfluence
_itfAlarmClass := g__Alm_GVLAlarmHandler.g_inst.FindAlarmClass(staticData.udiAlarmClassId);
IF (_itfAlarmClass <> 0) THEN
    _sClass := _itfAlarmClass.GetName();
END_IF

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


...

See also....