Applies To:
  • CitectSCADA 5.xx, 6.xx, 7.xx
  • CitectHMI 5.xx, 6.xx, 7.xx
  • CitectFacilities 5.xx, 6.xx, 7.xx
  • CitectSCADA Batch 5.xx, 6.xx, 7.xx
  • CitectSCADA Pocket 5.xx, 6.xx, 7.xx

Summary:

According to the help, it is listed that we can use AlarmSetInfo() to change the display parameters of the alarm list in runtime. However, some changes may not take place sometimes, for example changing the format of the alarm to be displayed in the list.

How to do this correctly? 


Solution:

Depending on the type of data that is to be changed using the AlarmSetInfo() function, you would have to reload/refresh the alarm list for the changes to take place.

For example, if you have a button which has the following cicode function as its input:

FUNCTION
FmtAlarmDsp()
INT hFont;
      hFont = DspFont("Times",-11,black,grey);
      AlarmSetInfo(205, 6, hFont);
END

There will be no need to refresh the alarm list as the changes will take place instantly.

However, if you are trying to change the format of the alarm displayed in the list using the following code:

FUNCTION
FmtAlarmDsp2()
INT hFmt;
       hFmt=FmtOpen("MyFormat","{Name,20}",1);
       AlarmSetInfo(205, 5, hFmt);
       AlarmDsp(205,5,4);         <-- Need to refresh the list using AlarmDsp() function
END

You will need to refresh the list before the changes take place.

Therefore, when customizing your project using AlarmSetInfo() function, it is always better to refresh the list after the changes made to ensure that the alarm list takes in the changes. 


Keywords:
 

Attachments