FOR i:=0 TO iCountRowsFromHistory-1
itfIAlarm := arritfAlarmsFromHistoryAll[i];
itfAlarmClass := itfIAlarm.GetAlarmClass();
END_FOR
but itfAlarmClass is always 0 so I can't use itfIAlarm.GetAlarmClass().GetName() method
The rest of Alarm elements like timestamps, message, latchvalues, etc. have proper values.
Same behavior I see in simulation AlarmManager examle app from Codesys Store and in real environment with Wago PFC200 controller.
Maybe someone knows where is the problem and how to read proper itfAlarmClass value ?
Regards
Marek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working:
VAR
iCountActiveAlarms : INT;
parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm;
itfAlarmManagerClientAll : IAlarmManagerClient;
END_VAR
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working:
VAR
iCountActiveAlarms : INT;
parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm;
itfAlarmManagerClientAll : IAlarmManagerClient;
END_VAR
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working:
VAR
iCountActiveAlarms : INT;
parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm;
itfAlarmManagerClientAll : IAlarmManagerClient;
END_VAR
I try to read Alarm Class from Alarm Storage by this code, of course in the beginning I define AlarmManagerClient, etc.
AlarmManager.g_AlarmHandler.GetAlarmsFromStorage( ...... );
FOR i:=0 TO iCountRowsFromHistory-1
itfIAlarm := arritfAlarmsFromHistoryAll[i];
itfAlarmClass := itfIAlarm.GetAlarmClass();
END_FOR
but itfAlarmClass is always 0 so I can't use itfIAlarm.GetAlarmClass().GetName() method
The rest of Alarm elements like timestamps, message, latchvalues, etc. have proper values.
Same behavior I see in simulation AlarmManager examle app from Codesys Store and in real environment with Wago PFC200 controller.
Maybe someone knows where is the problem and how to read proper itfAlarmClass value ?
Regards
Marek
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working:
VAR
iCountActiveAlarms : INT;
parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm;
itfAlarmManagerClientAll : IAlarmManagerClient;
END_VAR
AlarmManager.g_AlarmHandler.GetActiveAlarms(
itfAlarmManagerClient :=itfAlarmManagerClientAll,
iCountActiveAlarms => iCountActiveAlarms,
parritfActiveAlarms => parritfActiveAlarms);
The Value is always 0.
Please help.
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working:
VAR
iCountActiveAlarms : INT;
parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm;
itfAlarmManagerClientAll : IAlarmManagerClient;
END_VAR
AlarmManager.g_AlarmHandler.GetActiveAlarms(
itfAlarmManagerClient :=itfAlarmManagerClientAll,
iCountActiveAlarms => iCountActiveAlarms,
parritfActiveAlarms => parritfActiveAlarms);
The Value is always 0.
Please help.
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working:
VAR
iCountActiveAlarms : INT;
parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm;
itfAlarmManagerClientAll : IAlarmManagerClient;
END_VAR
AlarmManager.g_AlarmHandler.GetActiveAlarms(
itfAlarmManagerClient :=itfAlarmManagerClientAll,
iCountActiveAlarms => iCountActiveAlarms,
parritfActiveAlarms => parritfActiveAlarms);
The Value is always 0.
Please help.