Configuring Alarm Sorting in WinCC Professional TIA Portal

David Krause10 min read
SiemensTutorial / How-toWinCC
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

Configuring Alarm Sorting in WinCC Professional TIA Portal

WinCC Professional (TIA Portal) inherits the same alarm control object model and VBS interface as Classic WinCC V7.x, but exposes the underlying sort properties through different dialog paths. The most common field requirement is a runtime-stable sort that places unacknowledged errors at the top, warnings beneath them, and acknowledged events at the bottom. This reference documents the configuration path, the VBS properties that govern scroll behavior on sort, and the verification steps required to confirm deterministic sort order in Runtime.

1. Problem Scope and Engineering Objective

Operators expect alarm lists to behave as decision support, not as a chronological log. A deterministic sort order reduces cognitive load and shortens the time-to-acknowledge for high-priority events. The engineering objective is to:

  • Place unacknowledged alarms at the top of the visible list.
  • Order remaining alarms by class (Errors, Warnings, Messages) when acknowledged state is equal.
  • Prevent the control from automatically scrolling to the newest event when a sort key is applied.
  • Persist the configuration in the engineering station (ES) rather than relying on runtime configuration.

WinCC Professional does not expose every property through the Properties inspector in TIA Portal. Specifically, the IgnoreAutoScrollOnSort flag that controls the runtime behavior of the sort command is a member of the Alarm Control's VBS object model and must be set through a script or the runtime sort dialog.

2. Prerequisites

Required software and configuration baseline
Component Version / Setting Notes
TIA Portal V16 / V17 / V18 / V19 / V20 Same Alarm Control object model across versions; the V20 documentation set confirms the property set.
WinCC Professional RT Professional, V16 or later Target runtime; HMI panels (Comfort/Advanced) use a different alarm control with limited VBS support.
HMI device PC-based RT or WinCC Runtime Professional Alarm Control must be inserted on a screen of the HMI device, not on a faceplate.
Alarm blocks Alarm Class, Acknowledgment Both must be enabled in Project settings > Alarm blocks or per-control under Properties > Blocks.
Scripting VBScript engine, enabled in Runtime WinCC Professional supports the same VBS object model as WinCC V7.x.
Confirm that the HMI target supports the full VBS object model. Comfort Panels and RT Advanced use a constrained VBS subset; the properties documented here apply to RT Professional only.

3. Alarm Control Object Model Overview

The Alarm Control in TIA Portal WinCC Professional exposes the same COM-style object model used in Classic WinCC V7.x. The two members relevant to sort control are:

  • MessageColumnSortIndex — sets the index of the column used as the primary sort key. Accepts the column index as a 1-based integer.
  • IgnoreAutoScrollOnSort — boolean flag that, when set to True, prevents the Alarm Control from jumping to the most recent alarm when the sort key changes.

Both members are accessible from VBS through the screen object's HMIRuntime path. The dialog-based sort configuration (Properties > Columns > Sort) writes to the same internal data set, but does not expose IgnoreAutoScrollOnSort; that property is reachable only through the runtime sort dialog or through VBS.

4. Step-by-Step Configuration in the Engineering Station

The following procedure produces a stable sort in Runtime without resorting to runtime configuration. All settings persist in the project and are deployed with the HMI image.

4.1 Disable Automatic Scrolling

  1. Select the Alarm Control on the screen.
  2. Navigate to Properties > Window > Scrolling.
  3. Set the Scrolling property from Automatic to Manual (or disable Follow-up scrolling as available in your version).

This step is mandatory. With automatic scrolling enabled, the control repositions the selection on the newest event after every refresh, masking the sort effect.

4.2 Enable the Required Alarm Blocks

  1. Open Project settings > Alarm blocks.
  2. Enable the system blocks Alarm Class and Acknowledgment. The Acknowledgment block is required because it carries the boolean state that drives secondary sort.
  3. Alternatively, enable the same blocks per control under Properties > Blocks. The per-control setting overrides the project setting for that instance only.

4.3 Expose the Sort Columns

  1. Open Properties > Columns for the Alarm Control.
  2. Add the columns Alarm Class and Acknowledgment to the visible column set.
  3. Reorder the columns so the operator sees the sort key at the leading edge of the table. A typical layout is: Date/Time, Alarm Class, Acknowledgment, Message text, Area, Source.

4.4 Configure Sort Order and Direction

  1. Return to Properties > Columns.
  2. For the Alarm Class column set:
    • Sort order: 1 (primary key)
    • Sort direction: Ascending
  3. For the Acknowledgment column set:
    • Sort order: 2 (secondary key)
    • Sort direction: Descending

With Alarm Class ascending and Acknowledgment descending, the Alarm Control first orders by class (Errors at the top because Errors < Warnings < Messages in numeric class ID), and within each class groups unacknowledged entries above acknowledged ones. The result is the desired operator-priority list.

Sort direction interpretation depends on the data type of the column. For Acknowledgment, the boolean is treated numerically: 0 = not acknowledged, 1 = acknowledged. Descending therefore places unacknowledged first.

5. Handling IgnoreAutoScrollOnSort

The dialog-based sort in TIA Portal does not surface the IgnoreAutoScrollOnSort property. There is no equivalent field in Properties > Columns or Properties > Window. To control this behavior, use one of the following approaches.

5.1 Runtime Sort Dialog

The runtime sort dialog — the same dialog present in Classic WinCC V7.x — exposes the Ignore auto scroll checkbox. Operators can toggle it interactively. This is the path of least resistance when the project allows operator-driven sort configuration, but it does not persist across recompile unless captured by a script.

5.2 VBScript on Screen Load

Attach the following VBS procedure to the screen's Loaded event. The script writes both MessageColumnSortIndex and IgnoreAutoScrollOnSort through the Alarm Control's Item collection.

' VBS - attach to Screen "AlarmOverview" Loaded event
Sub Screen_Loaded()
    Dim objAlarmCtrl
    Set objAlarmCtrl = ScreenItems("Control1")

    ' Disable automatic scroll on sort
    objAlarmCtrl.IgnoreAutoScrollOnSort = True

    ' Optional: enforce column-based sort from script
    objAlarmCtrl.MessageColumnSortIndex = 2   ' column 2 = Alarm Class
    objAlarmCtrl.MessageColumnSortMode   = 1   ' 0 = ascending, 1 = descending

    ' Optional: clear the operator's runtime sort override
    objAlarmCtrl.MessageColumnSort = False
End Sub

The ScreenItems("Control1") reference is the HMI tag name of the Alarm Control as defined in Properties > General > Name. Replace Control1 with the actual control name in your project.

5.3 Dynamic Toggle on a Button

Bind a button's Click event to a procedure that flips the property and refreshes the view:

Sub OnClick(ByVal Item)
    Dim objAlarmCtrl
    Set objAlarmCtrl = ScreenItems("Control1")

    objAlarmCtrl.IgnoreAutoScrollOnSort = Not objAlarmCtrl.IgnoreAutoScrollOnSort

    ' Force a refresh so the operator sees immediate feedback
    objAlarmCtrl.MessageColumnSort = True
End Sub
Property name case matters in VBS. The canonical names are IgnoreAutoScrollOnSort, MessageColumnSortIndex, MessageColumnSortMode, and MessageColumnSort. Lowercase variants such as ignoreAutoScrollOnSort are accepted by the VBS engine, but the mixed-case form is the documented API.

6. Alarm Logging Configuration (RT Professional)

The alarm logging subsystem records all configured events. The Alarm Control reads from this log, so the sort keys must exist as columns in the configured log. Confirm the path:

  1. Open HMI tags > Alarm logging on the HMI device.
  2. Verify the active log contains columns for Class, State (acknowledgment), and Time.
  3. If your project uses a custom log layout, add the missing columns or switch back to the system log layout.

Reference: Basics on alarm logging (RT Professional) — TIA Portal V20 documentation.

7. Verification Procedure

After deploying the project to the RT Professional runtime, validate the configuration with the following checks.

7.1 Functional Check

  1. Trigger an Error alarm in slot A and a Warning alarm in slot B, both unacknowledged.
  2. Trigger a Warning alarm in slot C, acknowledged.
  3. Confirm the visible list order, top to bottom: Error A (unacknowledged), Warning B (unacknowledged), Warning C (acknowledged).
  4. Acknowledge Error A and confirm it remains above Warning C (Alarm Class sort key is unchanged).

7.2 Scroll Behavior Check

  1. With the list populated, change the sort order at runtime through the sort dialog.
  2. Confirm the selection does not jump to the most recent event when IgnoreAutoScrollOnSort = True.
  3. Toggle the property via the dynamic button (Section 5.3) and confirm the behavior reverses when False.

7.3 Persistence Check

  1. Stop and restart the Runtime.
  2. Confirm the column set, sort order, and direction persist (TIA Portal-written configuration is part of the project image).
  3. Confirm IgnoreAutoScrollOnSort returns to its last scripted value. The runtime sort dialog's checkbox does not persist across restart unless written from a script attached to Screen_Loaded.

8. Comparison: TIA Portal vs Classic WinCC V7.x

Sort property exposure across WinCC editions
Property / Feature WinCC V7.x WinCC Professional (TIA) Notes
Alarm Control object model Full VBS Full VBS Same members; same call syntax.
Column sort in Properties inspector Yes (Configuration dialog) Yes (Properties > Columns) Same end result.
IgnoreAutoScrollOnSort in Properties inspector No — runtime only No — runtime only / VBS Identical limitation in both editions.
Runtime sort dialog Yes Yes Includes the Ignore auto scroll checkbox.
Faceplate alarm control Yes Yes VBS API access is the same; faceplate instance requires the screen name in the call path.
Alarm block configuration Alarm Logging editor Project settings > Alarm blocks Path differs; column set is the same.

9. Troubleshooting Matrix

Common faults and corrective actions
Symptom Likely Root Cause Corrective Action
Sort order changes are not visible in Runtime Scrolling is set to Automatic Disable Properties > Window > Scrolling > Automatic.
All alarms appear in chronological order Alarm Class or Acknowledgment block not enabled Enable both blocks in Project settings > Alarm blocks and re-add the columns.
Sort applies at startup, then drifts Operator toggled sort in runtime dialog Set MessageColumnSort = True on Screen_Loaded to re-enforce.
VBS error: object does not support property Control name mismatch or wrong VBS variant Verify the Alarm Control name in Properties > General > Name; reference with that exact string.
IgnoreAutoScrollOnSort has no effect Property toggled before the control is fully initialized Move the assignment to the Loaded event of the screen, not the Open event of the control.
Only one sort key is applied Sort order values not unique per column Set primary = 1, secondary = 2, etc. Sort order values must be unique integers.
Acknowledged events appear above unacknowledged Acknowledgment sort direction inverted Set Acknowledgment column sort direction to Descending; boolean 0 (unacknowledged) sorts above 1.

10. Best Practices for Production Projects

  • Prefer script-driven configuration for non-visual properties. Properties like IgnoreAutoScrollOnSort cannot be set through the TIA Portal inspector; using a single Screen_Loaded VBS function keeps the configuration reproducible across recompiles.
  • Lock operator sort changes through UAC. Disable the sort button on the Alarm Control toolbar if your plant requires deterministic list behavior.
  • Use distinct sort order values. Multiple columns with the same sort order value cause undefined prioritization in WinCC Professional.
  • Document the column index in script headers. VBS sort index references are positional; if the operator's column layout is edited, the script breaks silently.
  • Validate the alarm log schema before commissioning. A missing Acknowledgment system block in the log layout is the most common source of "sort key does nothing" complaints.
  • Test under alarm flood. Sort performance under 100+ events/second is dominated by the alarm log read path, not the sort itself. Profile with the WinCC Channel Diagnosis tool before sign-off.

11. Reference: Related Configuration Paths

How do I put unacknowledged alarms at the top of a WinCC Professional alarm list?

Enable the Acknowledgment and Alarm Class blocks in Project settings, add both columns, then set Alarm Class sort direction to Ascending (order 1) and Acknowledgment to Descending (order 2). Unacknowledged boolean 0 sorts above acknowledged 1 within each class.

Where is the IgnoreAutoScrollOnSort property in TIA Portal?

It is not exposed in the TIA Portal Properties inspector. Set it through VBS on the Alarm Control's IgnoreAutoScrollOnSort member, ideally attached to the screen's Loaded event so the value is re-applied at every restart.

Why does the alarm list jump to the newest event after I sort it?

Either Scrolling is set to Automatic in Properties > Window, or IgnoreAutoScrollOnSort is False. Set Scrolling to Manual and assign IgnoreAutoScrollOnSort = True from VBS to freeze the selection during sort operations.

Can I use the same VBS code in WinCC V7.x and TIA Portal WinCC Professional?

Yes. The Alarm Control's VBS object model is identical between the two editions. The same MessageColumnSortIndex, MessageColumnSortMode, and IgnoreAutoScrollOnSort members are available with the same syntax in both products.

Does this work on Comfort Panels or RT Advanced?

No. Comfort Panels and RT Advanced use a constrained VBS subset and a different Alarm Control that does not expose IgnoreAutoScrollOnSort. The procedures documented here apply to RT Professional only.

Back to blog