• Not Answered

TopAlarmPriority function in Graphics Studio

Hi There,

I am trying to animate an object on a graphic to change color based on the highest priority alarm on a pop-up display (that is not currently open). I am trying to use the TopAlarmPriorityFunction to do this, but the function does not appear to be working or I am using it incorrectly. 

I have the line color of my object using the Emerson function "F_AlarmColor" with the Alarm Priority number being " DARU.TopAlarmPriority(DL.DN("Popup1")) ", but the color returned is always blue. My pop-up display has 8 Gems on it, and no matter what alarms I activate, the color always returns blue. I have also tried controlling the values returned by modify my expression to " DARU.TopAlarmPriority(DL.DN("Popup1")) <= 15 ? DARU.TopAlarmPriority(DL.DN("Popup1")) :0 " similar to how GEM frames animate their colors, but this also always returns blue color. If I reduced my expression to look at the alarm priority of one module directly, the returned color is correct, but I need to evaluate all the modules on the display. 

Any advice on using this function would be greatly appreciated. Thanks,


3 Replies

  • I believe that TopAlarmPriority will only work with Displays (not contextual displays) and will only return for active or unacknowledged alarms in Modules, Devices or Nodes whose primary control display is the same as the provided display which in your case in Popup1.
  • In reply to Matt Stoner:

    Thanks Matt!

    My pop-up is a normal Display so updating the primary control of the control modules fixed my issue (they were previously linked to the parent display that has the pop-up button). I did not find it clear on books online that it was the Primary Control of control modules being evaluated, this might be a nice little improvement to the topic.

    As a quick side question: My work around before your reply was using the Math.max function and listing all the MODULE/ALARMs[1].PRI. I found that when no alarms were active, the returned number seemed to be something outside the defined values in the F_AlarmColor function. Do you know what value is returned in ALARMS[1].PRI when no alarms are active?

    Thanks again 

  • In reply to Jim K:

    Believe it returns 255 if no alarm is active.

    There are many other "opportunities" for BOL to be improved but I'll send this request in. I think I've mentioned this before but I can be the squeaky wheel again Smiley