Skip to content

AlarmViewer

Real-Time Alarm Management

The AlarmViewer is a specialized alarm widget designed for high-frequency industrial alarm streams. It features a blink controller for unacknowledged alarms, priority-based color coding, deferred rendering to prevent UI freeze during alarm storms, and full pagination support.

Key Features

Unacknowledged alarms blink with configurable animation targets — row background, priority dot, or text — to grab operator attention. The blink controller is a separate, testable component, not embedded in the rendering loop.

Priority System

4 priority levels with color-coded indicators:

  • High (red) — critical alarms requiring immediate action
  • Medium (orange) — significant deviations
  • Low (yellow) — advisory notifications
  • Warning (blue) — informational alerts

Column Types

7 specialized column types: Text, Badge, Icon, Checkbox, Priority, DateTime, and Actions.

Performance

  • Deferred rendering — updates throttled to ~30fps, preventing UI freeze during alarm storms
  • Dynamic pagination — row count calculated from viewport height
  • Multi-select with Ctrl+Click and bulk acknowledge

Main Properties

Property Type Description
alarmsJson QString JSON alarm data array
columnsJson QString JSON column definitions
filtersJson QString Active filter configuration
alarmCount int Total number of alarms
rowHeight int Height per alarm row
headerHeight int Header row height
showCheckboxColumn bool Enable multi-select checkboxes
showPriorityColumn bool Show priority dot column
showActionsColumn bool Show action buttons column
blinkEnabled bool Enable blink for unacknowledged alarms
blinkIntervalMs int Blink cycle interval in milliseconds
blinkRowBackground bool Blink the entire row background
blinkPriorityDot bool Blink only the priority indicator
blinkText bool Blink the alarm text
paginationEnabled bool Enable page-based navigation
dynamicRowsPerPage bool Auto-calculate rows from viewport
Color_PriorityHigh QVariant Color for high-priority alarms
Color_PriorityMedium QVariant Color for medium-priority alarms
Color_PriorityLow QVariant Color for low-priority alarms
Color_PriorityWarning QVariant Color for warning-level alarms

Note: This widget exposes 52 configurable properties. The table above covers only a selection — dozens more are available for fine-tuned control over colors, fonts, padding, animations, and behavior.

Usage Example in WinCC OA

XML Configuration (extended properties)

<extended>
  <prop name="rowHeight" type="INT">36</prop>
  <prop name="headerHeight" type="INT">40</prop>
  <prop name="blinkEnabled" type="BOOL">True</prop>
  <prop name="blinkIntervalMs" type="INT">800</prop>
  <prop name="blinkRowBackground" type="BOOL">True</prop>
  <prop name="showPriorityColumn" type="BOOL">True</prop>
  <prop name="showActionsColumn" type="BOOL">True</prop>
  <prop name="paginationEnabled" type="BOOL">True</prop>
  <prop name="dynamicRowsPerPage" type="BOOL">True</prop>
  <prop name="Color_PriorityHigh" type="COLOR">{220,53,69}</prop>
  <prop name="Color_PriorityMedium" type="COLOR">{255,152,0}</prop>
  <prop name="Color_PriorityLow" type="COLOR">{255,193,7}</prop>
  <prop name="Color_PriorityWarning" type="COLOR">{33,150,243}</prop>
  <script name="alarmClicked">alarmClicked(string id, string col)</script>
  <script name="alarmAcknowledged">alarmAcknowledged(string id)</script>
  <script name="selectionChanged">selectionChanged(string ids)</script>
</extended>

CTRL Initialization Script

main()
{
  // Define columns
  string cols = "[{\"id\":\"priority\",\"type\":\"Priority\",\"width\":40},"
                "{\"id\":\"timestamp\",\"type\":\"DateTime\",\"width\":160},"
                "{\"id\":\"message\",\"type\":\"Text\",\"width\":300},"
                "{\"id\":\"status\",\"type\":\"Badge\",\"width\":100},"
                "{\"id\":\"actions\",\"type\":\"Actions\",\"width\":80}]";
  EWO.setColumnsFromJson(cols);

  // Load alarms from datapoint
  EWO.setAlarmsFromJson(dpGet("System1:_AlarmViewer.data"));
}

Available Signals

Signal Parameters Description
alarmClicked id, col Single-click on an alarm row
alarmDoubleClicked id Double-click on an alarm
alarmRightClicked id, x, y Right-click for context menu
alarmHovered id Mouse enters alarm row
checkboxClicked id, checked Selection checkbox toggled
selectionChanged ids Multi-selection changed
alarmAcknowledged id Alarm acknowledged by operator
alarmStateChanged id, active Alarm active/return state changed
contextMenuAction id, actionId Context menu action executed
actionButtonClicked id, actionId Action column button clicked
sortChanged id, ascending Column sort changed
pageChanged page, totalPages Page navigation