Skip to content

Alarm view

The alarm view shows current alarms right on the screen, like the Alarm view in WinCC: time, priority, message, area and state; rows are colored by priority, unacknowledged ones are bold. “Areas” keeps only the alarms of its plant areas, “Unacknowledged only” hides acknowledged ones, and the buttons at the bottom acknowledge the selected or all alarms.

A script sees the view’s alarms with its filter and the operator’s selection, and can select and acknowledge. When the operator selects another alarm, the “Row selected” event fires. See Alarms for alarms in general.

Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:

Property Values Default Description
Areas text Areas. Separated by “;”; empty — all alarms
UnacknowledgedOnly true / false false Unacknowledged only
ShowButtons true / false true Acknowledge buttons
FontSize number 13 Font size

Item.Type = AlarmView. Any property is read and changed by name: Item.FontSize = 10. The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.

Actions of this element:

Member Description
Alarms() Alarms of the view (with its filter) — Name, Text, Area, Priority, PriorityRank, State, Value, Time, Active, Unacknowledged, Shelved
Alarm(name) An alarm of the view by name; null — not there
Count How many alarms the view has
UnacknowledgedCount How many are unacknowledged
Selected Names of the selected alarms
Select(names) Select an alarm or an array of alarms
ClearSelection() Clear the selection
Acknowledge(names) Acknowledge the selected; with a name or an array — these
AcknowledgeAll() Acknowledge all alarms of this view

Mouse, hover, focus and keyboard — as for any element (see Events and functions). Its own events:

  • Row selected (SelectionChanged) — The operator selected another row, alarm or tab; the selection is in Item.Selected.

Show the alarms of the area clicked on the screen — a click on the area.

Screen.Items("AreaAlarms").Areas = Item.Name;

Details of the selected alarm — the view’s “Row selected” event.

var name = Item.Selected[0];
var a = name ? Item.Alarm(name) : null;
Screen.Items("Details").Text = a ? a.Text + " (" + a.Priority + ", value " + a.Value + ")" : "";

Acknowledge all alarms of this area — leaving other areas alone.

Screen.Items("AreaAlarms").AcknowledgeAll();