Sorting WinCC Unified Alarm Control by Priority in TIA Portal V18

David Krause13 min read
HMI / SCADASiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Sorting WinCC Unified Alarm Control by Priority in TIA Portal V18

Engineers configuring an MTP700 or MTP1000 Unified Comfort Panel frequently discover that the WinCC Unified alarm control ignores the predefined column sort order defined at design time. The control continues to show alarms in their natural arrival sequence (latest first) regardless of the Sorting Direction and Sorting Order properties set on a column such as Priority. This article documents the root cause, the documented configuration procedure, the version-management constraints, and the field-proven workaround that forces the pre-defined priority sort to apply at runtime.

Scope. This reference targets WinCC Unified alarm control (RT Unified) with TIA Portal V18 (Engineering System, ES) and Unified Comfort Panels whose device image firmware is V18.0.0.x. The behavior described also affects WinCC Unified PC Runtime. Configuration paths are consistent with TIA Portal V17, V18, and V19/V20 unless explicitly noted.

1. Problem Description

An alarm control is configured with the following columns:

  • ID
  • Raise time
  • Priority
  • Alarm text

The intended behavior is that, when the alarm page opens, rows are sorted by Priority descending so that the highest-priority active alarm appears at the top. The following configuration is applied at design time:

  • Default sorting direction: Descending (also tested with None)
  • Sorting Direction of every column set to None except Priority (set to Descending)
  • Sorting Order of every column set to 0 except Priority (set to 1)

Observed behavior: the header still displays the sort indicator arrow and the order number on the Priority column, but the data rows remain in the natural arrival order (most recent alarm at the top). Clicking the column header repeatedly eventually restores the expected sequence, suggesting the runtime is reading the sort metadata but not applying it to the source query during initial render.

2. Affected Versions and Components

Component Affected Versions Recommended Fix Level
TIA Portal ES (WinCC Unified) V17 base through V18 Update 3 V18 Update 3 or later; V19/V20 for new projects
Unified Comfort Panel device image V17.0.0.x, V18.0.0.0–V18.0.0.2 V18.0.0.3 (or the latest V18 Update 3 image)
WinCC Unified PC Runtime V17 / V18 (matched to ES) Match to ES Update level exactly

The bug was first confirmed on TIA Portal V18 Update 2 and persists with intermittent fixes through Update 3 on certain device images. The device image (also referred to as the panel firmware or device version) is versioned independently from the ES. For example, V17.0.0.1 is the highest minor revision in the V17 series, while V17 Update 6 is the current ES and panel version for V17. Mismatched ES/runtime/device-image combinations are the most common cause of phantom sorting problems that survive a project re-compile.

Version independence. The Panel Image / device version is independent of the engineering version. A V18 ES project loaded onto an MTP panel whose image is V18.0.0.0 will exhibit different runtime behavior than the same project on a panel imaged at V18.0.0.3, even when the project itself is unchanged.

3. Root Cause Analysis

Two distinct defect classes contribute to the symptom:

  1. Predefined sort not applied on initial render. The Unified alarm control stores the predefined sort descriptor (column identifier, direction, order) in the screen layout. On the first build of the dataset after the page opens, the runtime fails to push the descriptor into the underlying AlarmSubscription query. A user-triggered header click on the same column completes the round-trip and triggers a re-query with the descriptor, which is why manual clicking "fixes" the view.
  2. "Show current alarms only" overrides sort priority. When the alarm control is configured to display only currently active (not cleared) alarms, the runtime collapses the list to the active subset after applying the predefined sort. Because the largest, unsorted active set is pushed to the front, the visual order can look as if sorting were ignored. Disabling this option (the field-verified workaround) keeps the full alarm history and exposes the predefined sort.

Both defect classes are mitigated by consistent version management across ES, PC Runtime, and device image, plus the design-time toggle described in Section 6.

4. Configuration Workflow for Predefined Column Sort

The canonical procedure for defining an initial sort by Priority descending follows the sequence documented in the Siemens TIA Portal help for configuring columns and sorting in RT Unified. The procedure is the same for alarm controls, alarm banners, and the alarm history view.

4.1 Prerequisites

  • TIA Portal with WinCC Unified installed (V18 Update 3 or later recommended).
  • A configured Unified Comfort Panel (MTP700, MTP1000, MTP1200, MTP1500, MTP1900) or a Unified PC Runtime target.
  • Alarm classes with discrete Priority values (e.g., 0 = diagnostic, 1 = information, 2 = warning, 3 = error, 4 = critical) configured in the HMI tags or the PLC alarm configuration.

4.2 Step-by-Step

  1. In the project tree, navigate to Screens > <Screen name> and select the alarm control.
  2. Open Properties > Alarm control > Columns.
  3. In the column list, select the Priority column.
  4. Set Sorting Direction = Descending.
  5. Set Sorting Order = 1 (or any non-zero integer; the integer determines the precedence of the sort key when chaining multiple sorted columns).
  6. For every other column in the list, set Sorting Direction = None and Sorting Order = 0.
  7. Compile the project and download to the panel.
  8. Close all running instances of the simulation. In the Runtime Manager, remove the project from any open runtime, then restart the simulation.
Runtime cache. The Runtime Manager retains compiled artifacts that include the alarm subscription metadata. Deleting the project from the Runtime Manager and re-adding it forces a fresh subscribe handshake on the next Start, which is required for many alarm-control property changes (sorting, filtering, selection behavior) to propagate.

5. Documented Property Reference

Property Location Allowed Values Notes
Sorting Direction Properties > Alarm control > Columns > <Column> None, Ascending, Descending Defines per-column direction at design time and runtime override header.
Sorting Order Same 0 (disabled) or integer ≥ 1 Lower number = higher precedence when multiple columns sort.
Default sorting direction Properties > Alarm control None, Ascending, Descending Fallback applied to columns that do not specify a direction.
Show current alarms Properties > Alarm control > General Boolean When true, can mask the predefined sort. Must be unchecked for priority sort to display reliably.
Sort by column header Runtime > Column header click Cycle: None → Asc → Desc → None Each click re-issues the alarm subscription query.

6. The "Show Current Alarms" Workaround

The single most effective field-verified workaround for the predefined-priority sort not applying at runtime is to disable the Show current alarms property of the alarm control:

  1. Select the alarm control on the screen.
  2. In Properties > Alarm control > General, clear the Show current alarms checkbox.
  3. Compile, download, and remove the project from the Runtime Manager.
  4. Restart the simulation or panel runtime.

After this change, the predefined Priority sort is applied on the initial render of the alarm list. Engineers who require the "current alarms only" filter can substitute it with a screen-level filter expression built using the alarm filter language (e.g., a filter that matches State <> "Cleared"), which is independent of the predefined sort and is applied in the alarm subscription query rather than as a post-sort collapse.

Why this works. When Show current alarms is true, the runtime collects the active alarm set, applies the predefined sort descriptor, and then discards cleared alarms. The collision between the post-filter collapse and the sort order produces the visually unsorted output. Disabling the toggle removes the post-filter and preserves the predefined sort sequence.

7. Version Management Procedure

Because the predefined-sort behavior depends on the interaction of three independently versioned components, follow this procedure before reporting a sorting defect:

  1. Open Help > Installed software in the TIA Portal and confirm the WinCC Unified ES version (e.g., V18 Update 3).
  2. In Project tree > Devices & networks > <HMI device> > Device information, note the Device version shown for the panel.
  3. In the TIA Portal installer or via SIMATIC Automation Tool, install the latest matching panel image for the same major version (V18 Update 3 image corresponding to the ES Update level).
  4. Update the WinCC Unified PC Runtime to the same Update level if a PC target is in scope.
  5. Recompile the project (right-click HMI device > Compile > Software (rebuild all)).
  6. Delete the project from Runtime Manager, then load it again from TIA Portal.

If the issue persists after version synchronization, capture a support request with the ES log (C:\ProgramData\Siemens\Automation\Log), the panel service log, and a screen recording of the failure.

8. Inline State Diagram: Initial Render Decision Flow

Page opens Alarm control builds view Read predefined sort Show current alarms? Apply sort descriptor Collapse to active only Header click re-queries Correct order displayed Wrong order (natural arrival)

9. Verification Procedure

After applying the configuration and the workaround, verify the alarm-control sort by following this procedure:

  1. Trigger three alarms of different priorities (e.g., Priority 2, Priority 3, Priority 4) in ascending order from the PLC.
  2. Navigate to the alarm screen on the panel.
  3. Confirm that the rows are ordered Priority 4 → Priority 3 → Priority 2 (descending by priority), not by arrival time.
  4. Clear the Priority 4 alarm on the PLC. Confirm the row order adjusts to Priority 3 → Priority 2 without a manual header click.
  5. Acknowledge the Priority 3 alarm from the panel. Confirm that the row moves out of the unacknowledged group but the predefined sort by priority is retained.
  6. Power-cycle the panel and re-open the alarm screen to verify the predefined sort survives a cold start.

10. Alternative Sorting Methods

10.1 User-Driven Sort at Runtime

Operators can override the predefined sort by clicking any column header. The cycle is None → Ascending → Descending → None. Each click re-issues the alarm subscription query and forces a consistent re-sort. Engineers can disable this per-column by setting Sorting Direction = None at design time and removing the Sort property from the column's runtime configuration.

10.2 Script-Based Sort

For complex multi-key sorts, a runtime script can iterate the AlarmControl API and invoke the same descriptor the design-time property generated. Using JavaScript on the Unified alarm control:

// Set predefined priority sort at runtime let alarmControl = UI.Items.AlarmControl_1; alarmControl.SetSorting({ columns: [ { name: "Priority", direction: "Descending", order: 1 }, { name: "RaiseTime", direction: "Descending", order: 2 } ] }); alarmControl.Update();

The exact API surface can differ between V17 and V20; check the screen scripting reference for the installed ES version before deploying.

10.3 Cross-Platform Reference: AVEVA System Platform

Engineers porting WinCC alarm views to AVEVA System Platform can sort alarm grids at runtime by right-clicking the alarm control grid, selecting Sort, and defining the First Sort Criteria and subsequent keys. This is documented in the official AVEVA documentation set. While the API differs, the diagnostic flow (verify subscription state → define sort descriptors → refresh) is transferable.

10.4 Cross-Platform Reference: EcoStruxure Building Operations

For Schneider Electric EcoStruxure Building Operations alarm views, the alarm state sort order is configured in WorkStation under Alarm View settings > Alarm state sort order. This is also a designer-managed, persisted sort descriptor, analogous to the WinCC predefined column sort.

11. Troubleshooting Matrix

Symptom Likely Cause Diagnostic Step Remedy
Sort indicators visible, data unsorted Show current alarms collapses the active set Toggle Show current alarms Uncheck Show current alarms
Sort works in simulation, fails on panel Mismatched device image vs ES Compare Help > Installed software vs Device information Reflash panel to matching Update level
Sort lost after project re-download Stale Runtime Manager cache Check runtime instance list Remove project from Runtime Manager, restart
Header click sorts once, then reverts Multiple alarm controls sharing subscription Inspect alarm subscription IDs Give each alarm control a unique subscription reference
Sort OK for first 20 rows, wrong after Pagination threshold vs sort Increase MaxRows on alarm control Raise MaxRows to the expected worst-case alarm count
Property change ignored at runtime Screen cached at load Verify latest compiled RT Compile > Software (rebuild all) and re-download
Priority column missing sort option Column provider not exposing Priority Inspect alarm source configuration Ensure alarm source assigns Priority from PLC or HMI tag

12. Edge Cases and Performance Considerations

  • Large alarm counts. Sorting is performed in the subscription query, not post-fetch. Defining a sort on a non-indexed column (e.g., a free-form Alarm text) with thousands of active alarms increases CPU load on the panel. Prefer indexed columns (Priority, State, Raise time) as sort keys.
  • Multi-key sorts. Use Sorting Order with integers in ascending precedence (1 < 2 < 3). The runtime evaluates sort keys in this order, so the highest-precedence column (lowest integer) appears ordered first, then secondary keys break ties.
  • User role restrictions. Some operators are denied the Sort runtime right. When the runtime right Change sorting is removed, only the predefined sort from design time is applied; clicking headers has no effect. Confirm operator rights in User administration > Runtime rights.
  • Subscribed vs. configured alarms. The WinCC Unified alarm control only sorts what the AlarmSubscription has delivered. If you cannot see certain alarms at all, the issue is upstream of the sort descriptor.
  • Multi-language alarm texts. Sorting on the Alarm text column in projects with multiple languages sorts on the active language's text, which can produce surprising ordering after a language switch. Use the Alarm ID for stable machine sorts.

13. Related Configuration: Alarm Banner

The compact Alarm banner control used on MTP panels has the same predefined sort limitation. The banner shows the highest-priority unacknowledged alarm by default; however, engineers who configure banner Sorting Direction and Sorting Order on the same columns as the full alarm control can experience the same failure mode. Apply the same Show current alarms toggle and version-match procedure to the banner configuration.

14. Reference Documentation

15. Frequently Asked Questions

Why does my WinCC Unified alarm control ignore the predefined Priority sort?

On TIA Portal V18 (Update 2 and most of Update 3), the runtime fails to push the predefined sort descriptor into the alarm subscription on first render. Disabling Properties > Alarm control > General > Show current alarms and matching the ES, PC Runtime, and device-image versions (e.g., V18.0.0.3) restores the expected order.

Which TIA Portal and Unified Comfort Panel versions contain the fix?

V18 Update 3 with the matching panel image V18.0.0.3 mitigates most predefined-sort defects. For new projects, TIA Portal V19 Update 2 or V20 with the corresponding latest device image is recommended.

Do I have to delete the project from Runtime Manager after changing sort settings?

Yes. Alarm subscription metadata is cached by the Runtime Manager. After changing sort, filter, or selection properties, remove the project from the Runtime Manager and restart the simulation or reload the panel runtime so the changes propagate.

Can I sort by multiple columns at the same time?

Yes. Set Sorting Order to sequential integers (1 = highest precedence, 2 = next, etc.) on the chosen columns. Lower integer = earlier in the sort hierarchy. Each column must also have a Sorting Direction of Ascending or Descending.

How do I keep the "active alarms only" filter and still have priority sorting?

Use an alarm filter expression at the alarm source (e.g., a filter that excludes the Cleared state) instead of the control-level Show current alarms toggle. Filter expressions are evaluated in the subscription query, so the predefined sort and the filter coexist correctly.

Back to blog