Configuring WinCC Professional V11 SP2 Alarm View to Display

David Krause13 min read
SiemensTroubleshootingWinCC
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 WinCC Professional V11 SP2 Update 5 Alarm View to Always Display the Latest Alarm at Row 1

1. Problem Definition

In Siemens WinCC Professional V11 SP2 Update 5, engineers configuring a bottom-of-screen alarm line via the WinCC AlarmControl frequently encounter a behavior where the alarm view appears to display an arbitrary row rather than the most recently raised message. The symptom manifests as follows:

  • The control is configured to occupy a narrow horizontal strip at the bottom of a screen.
  • Alarms are correctly being raised in the message archive.
  • The sort order internally is correct (timestamp-based), but the visible row rendered in the AlarmControl is neither the first row (oldest in the configured sort) nor the last row (newest), but rather a row somewhere in the middle of the visible buffer.
  • Disabling the scroll bar does not stop the runtime from auto-positioning to a different row when new alarms arrive.

This behavior is a well-documented nuisance on TIA Portal V11 SP2 Update 5 (build branch V11.0 SP2 HF5) when the AlarmControl is sized for a single visible row. The problem is not a sorting defect — the archive and the control both sort messages correctly — it is a selection / scroll-restoration defect in the runtime renderer of that specific build.

2. Affected Environment

Parameter Value
Engineering tool Siemens TIA Portal V11 SP2 (V11.0 + SP2 + Update 5)
Runtime target WinCC Professional Runtime (PC-based SCADA)
Control WinCC AlarmControl (HMI Controls library)
Display mode Single-row "Alarm Line" (height sized for 1 row)
Connection Local message archive (SQL-based, WinCC RT MSSQLSERVER)
Symptom scope All HMI devices compiled to WinCC Professional RT under the project
Note: TIA Portal V11 SP2 Update 5 is a legacy engineering environment. The AlarmControl behavior described in this article is specific to the V11 runtime. V13 SP1, V14 SP1, V15, V15.1, V16, V17, and V18 runtimes have substantially improved alarm-line rendering and most users do not encounter the same problem. If your project can be migrated, see Section 10 — Migration Path at the end of this document.

3. Root Cause Analysis

The root cause is not in the chronological ordering of the messages — the MessageBlock timestamps are stored in chronological order in the WinCC message archive and the AlarmControl sorts the visible buffer on the TimeStamp (or Date/Time) column by default. The defect lies in how the AlarmControl restores the selected row after a message list update event in the WinCC Professional V11 SP2 Update 5 runtime.

Three configuration deficiencies typically compound to produce the visible "arbitrary row" behavior:

  1. Sort direction is implicitly set to Ascending (oldest first) on the primary time column. The newest message therefore sits at the bottom of the buffer rather than the top.
  2. SelectedRow persistence is not pinned to row index 0 after each list update. The runtime attempts to retain the previously selected row by message ID, but when the control is sized to show only one row the viewport can scroll within the buffer, exposing an off-screen row.
  3. SingleLineDisplay (or equivalent SingleLine property) is not activated. Without this property, the control tries to render multiple rows even when the screen height only allows one — the renderer then centers on whatever row happens to have the vertical midpoint inside the strip.

4. Solution: Correct Sort Direction

The first correction is to set the sort direction of the time column to Descending (newest first).

4.1 Step-by-step — Configuration in TIA Portal V11 SP2

  1. Open the WinCC Professional project in TIA Portal V11 SP2.
  2. In the project tree, expand Screens and open the screen that contains the AlarmControl configured as the alarm line.
  3. Right-click the AlarmControl in the screen workspace.
  4. From the context menu select Properties.
  5. In the properties inspector, click the Columns tab.
  6. From the column list, select the date/time column (default name TimeOfArrival or Date/Time depending on your message class configuration).
  7. In the column properties, set Sort = Descending.
  8. If the column is currently set as the primary sort key, leave the SortIndex = 0.
  9. Click OK to confirm.
  10. Save the project (Ctrl + S) and re-compile the WinCC Professional RT.
  11. Download to the RT PC and re-test.

After this change, the most recent alarm appears at row index 0 of the alarm view (the top of the control). Older alarms scroll below.

5. Solution: Pin Selection to First Row

Setting the sort direction is necessary but not sufficient. To force the control to always re-pin the selected row to row 1 after every list-update event, use a VBScript behind the screen that is triggered by the AlarmControl's message list change event.

5.1 VBScript — Force selected row to first row on every update

Open the screen that contains the alarm view, select the AlarmControl, and in the Events tab of the properties inspector wire the following VBScript to the OnMessageListChange event (or, depending on the locale build, OnListUpdate):

' Force the alarm line to always show the newest alarm at row 0
Sub OnMessageListChange_AlarmLine(changeType)
    Dim objAlarm
    Set objAlarm = ScreenItems("AlarmControl_AlarmLine")

    ' Verify the runtime object is available
    If IsNull(objAlarm) Or (objAlarm Is Nothing) Then
        Exit Sub
    End If

    ' Defensive check: only run when change type indicates new message
    If changeType = 0 Then ' 0 = NewMessage in WinCC Professional V11
        ' Select the first row of the visible buffer (newest because sort is Descending)
        objAlarm.SelectedRow = 0
    End If
End Sub

5.2 Notes on the script

  • The ScreenItems collection name must match the exact name of the AlarmControl in your screen (default is AlarmControl_1 — rename to a project-specific name such as AlarmControl_AlarmLine).
  • The integer passed to changeType depends on the WinCC build. In V11 SP2 Update 5 the enumerations are: 0 = NewMessage, 1 = Cleared, 2 = Acknowledged, 3 = Sorted. Adapt the constant to your build if the value is different.
  • If the AlarmControl exposes SelectedRow as a read-only property in your build, use the wrapper .SelectedRow = 0 after calling .LockSelectedRow = True, or use the dynamic dialog with the NameOfMessageLine tag approach described in Section 6.

6. Solution: Single-Line Alarm Line Display

WinCC Professional exposes a dedicated property on the AlarmControl that limits the visible portion of the control to a single conceptual row. This is the property specifically intended for the "alarm line at the bottom of the screen" use case.

6.1 Configuration steps

  1. Select the AlarmControl on the screen.
  2. In the Properties inspector open the Layout section.
  3. Set AlarmLineView = True. (In some localized builds the property is named Einzelzeilenanzeige or appears as SingleLine under View > Mode.)
  4. Set StatusBar = Hidden.
  5. Set Toolbar = Hidden.
  6. Set ScrollBar = Hidden.
  7. Set Header = Hidden (no column header row).
  8. Adjust the screen object height to one row height. The default row height in WinCC V11 SP2 Professional is 18 px; the visible height of the AlarmControl must be exactly 18 px (or 36 px if 2 rows are still visible and you want the single-line mode to clip the second).

With AlarmLineView = True, the runtime treats the control as a single-row message display and automatically scrolls the most recent message into the visible slot on every list update. This is the supported method to implement the "bottom-of-screen alarm line" pattern.

7. Property Reference Table

Property Path in Properties Inspector Recommended Value for Alarm Line Effect
Sort Direction (Time column) Columns > Time column > Sort Descending Newest message at row 0
SelectedRow General > Selection 0 Forces selection to first row
AlarmLineView Layout > View True Renders the control as a single message line
StatusBar Layout > Bars Hidden Removes status bar to save vertical space
Toolbar Layout > Bars Hidden Removes toolbar
ScrollBar Layout > Bars Hidden Disables manual scroll
Header Layout > Header Hidden Removes column headers
RowHeight Layout > Geometry 18 px (default) Matches default WinCC row height
Margin Layout > Geometry 0 Removes internal padding

8. Buffer and Filter Configuration

If after applying Sections 4 through 7 the control still shows an arbitrary row, inspect the message filter and the runtime buffer length. The V11 SP2 Update 5 AlarmControl renders only the visible buffer, not the full archive. If the buffer is sized to a value that produces a non-integer number of full pages (for example, a buffer of 250 messages and a single-line view that scrolls every 250 / 1 = 250 messages), the runtime may attempt to restore the previously selected message and the row index can be mathematically ambiguous when re-paged.

Recommended values:

  • Runtime buffer length: 500 messages (default is 500 — leave unchanged unless project-specific).
  • Permanent display buffer length: 1000 messages.
  • Short-term archive size: project-specific, but ensure it is greater than the runtime buffer length so that paging is stable.
  • Filter: set the filter to All in the Properties > Filter tab for the test pass, then re-apply user-defined filters after the test confirms row 0 is being correctly selected.

9. Verification Procedure

After applying the configuration changes, perform the following verification steps in WinCC Professional Runtime:

  1. Start the WinCC Professional RT in simulation mode with the project (Start > Simulation > With tag simulator).
  2. Open the screen that contains the alarm line at the bottom.
  3. Trigger a single test alarm using the internal tag simulator or by writing to a configured alarm tag.
  4. Confirm that the alarm appears at row 0 of the AlarmControl within 1 second of the trigger.
  5. Trigger a second test alarm with a different message text.
  6. Confirm that the first alarm scrolls down and the second alarm is now at row 0.
  7. Wait 60 seconds and confirm that the position is stable (no row jumping).
  8. Trigger an alarm that is acknowledged via the operator control and confirm that the alarm does not disappear from the line; the most recent unacknowledged alarm should still be visible at row 0.
  9. Trigger an alarm that is cleared (state goes from Come to Go) and confirm that the cleared alarm does not immediately displace the next unacknowledged message — the line should retain the most recent state transition until the next message arrives.
  10. Log the verification results in the commissioning report.

9.1 Acceptance criteria

Test Pass Criterion
Single alarm trigger Alarm appears at row 0 within 1 s
Successive alarms Most recent at row 0, previous rows scroll down
Stability No row jumping over a 60 s observation window
Acknowledgment Ack does not displace the most recent message
Cleared state Cleared messages remain in the line until a new message arrives

10. Known Issues in V11 SP2 Update 5

The V11 SP2 Update 5 runtime has the following known issues that can mask the configuration fix above:

  • Defect in message-list restore after project start: On initial RT start-up, the AlarmControl briefly displays the wrong row before the first message arrives. This is a startup race condition. Workaround: open the screen only after the RT has been running for at least 5 seconds.
  • Sort persistence defect after bulk import: If 50+ messages are imported simultaneously (for example via the SIMATIC Logon import or via OPC UA historical alarms), the sort order can be lost for one re-render cycle. Workaround: implement the VBScript in Section 5.1 to force the selected row.
  • Locale defect — "Sort direction" label is not translated in all language packs. In some V11 SP2 Update 5 language packs the Sort dropdown shows blank entries. Workaround: use the VBScript setter .ColumnSort(0) = 1 (1 = Descending) in the OnLoad event of the screen.

11. Migration Path (Recommended Long-Term Fix)

If the project allows, migrate the engineering environment to TIA Portal V17 or later and re-compile the WinCC Professional RT. The V17 runtime includes a re-implementation of the AlarmControl renderer that:

  • Pins the selected row to row 0 by default when AlarmLineView = True.
  • Re-renders correctly after bulk imports.
  • No longer requires a VBScript workaround for the common case.

Refer to the official Siemens TIA Portal V17 release notes and the WinCC Professional V17 system manual for migration steps. Backward compatibility for V11 SP2 projects is supported by the TIA Portal migration tool.

12. Alternate Approaches

12.1 Use a text field bound to a dynamic alarm tag

Instead of placing an AlarmControl on the screen, place a single text field and bind it to the CurrentMessageText tag exposed by the WinCC RT. The text field is always one line tall and cannot show the "wrong row" because it is not a list at all.

Configuration:

  1. Insert a Text Field on the screen.
  2. Open the Animations dialog of the text field.
  3. Add a Dynamic animation of type Tag connection.
  4. Bind it to the internal WinCC tag @CurrentMessageText (or the language-specific equivalent exposed by your message classes).
  5. Set the trigger to On change.

This approach has the limitation that only the most recent message is shown — you cannot see the previous 1–2 messages that scrolled off. For most bottom-of-screen alarm-line applications this is acceptable.

12.2 Use a 2-row AlarmControl with AlarmLineView

If your operator convention requires the ability to glance at the previous alarm, set the screen-object height to 36 px (2 row heights) and enable AlarmLineView = True. The V11 SP2 Update 5 renderer is more stable with a 2-row visible buffer than with a strictly 1-row buffer.

13. Troubleshooting Matrix

Observed Symptom Likely Cause Resolution
Row 0 is empty, row 1 shows newest alarm Sort direction is Ascending Set sort direction to Descending (Section 4)
Row 0 shows oldest alarm, last row shows newest Sort direction is Ascending and AlarmLineView is False Set both to Descending and True
Arbitrary row is shown, scrolls on new alarm SelectedRow is pinned to a message ID that no longer exists at the same buffer position Force SelectedRow = 0 via VBScript (Section 5)
Row jumping on every new alarm Buffer length is not a multiple of the visible row count Set buffer length to 500, 1000, 2000 — avoid prime values
No alarm visible at all Filter is set to a class that the new alarm does not belong to Set filter to All for test, then refine
Alarm visible, then disappears without operator action Cleared alarms are being auto-removed by the line configuration Disable the AutoRemoveCleared property of the AlarmControl

14. Frequently Asked Questions

Why does my WinCC V11 SP2 Update 5 alarm line show an arbitrary row instead of the latest alarm?

The most common cause is the sort direction of the time column being set to Ascending (oldest first) rather than Descending (newest first). Combined with the AlarmLineView property being disabled, the renderer can land on any row of the visible buffer. Set the sort direction to Descending and enable AlarmLineView = True on the AlarmControl.

Does disabling the scroll bar fix the issue?

No. Siemens support cases on V11 SP2 Update 5 confirm that disabling the scroll bar alone does not prevent the runtime from auto-positioning to an off-screen row. The scroll-bar visibility only governs the user input path; the runtime still computes the selected row on every list-update event.

What is the default sort direction of the AlarmControl in WinCC Professional V11 SP2?

The default sort direction in V11 SP2 Update 5 is Ascending on the TimeOfArrival column, meaning the oldest message is rendered at row 0. To reverse this, open Properties > Columns > TimeOfArrival and set Sort = Descending.

Can I use VBScript to force the latest alarm to be displayed at row 1?

Yes. Wire a VBScript to the AlarmControl's OnMessageListChange event and set objAlarm.SelectedRow = 0 on every event. The example in Section 5.1 of this article is compatible with WinCC Professional V11 SP2 Update 5.

Is this bug fixed in a later TIA Portal version?

Yes. TIA Portal V13 SP1 and later re-implemented the AlarmControl renderer so that the AlarmLineView = True mode automatically pins the selected row to row 0 on every list update. If your project can be migrated, upgrade to TIA Portal V17 or later and the issue disappears without any VBScript workaround.

Back to blog