...
Section |
---|
Column |
---|
| Code Block |
---|
|
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 |
---|
| Code Block |
---|
| _itfAlarmClass : IAlarmClass;
_itfAlarmGroup : IAlarmGroup;
_sClass : STRING;
_sGroup : STRING;
|
|
|
Section |
---|
Column |
---|
| Code Block |
---|
| _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....