WinCC Operator List: Display Tag Comments via Message 12508141

David Krause17 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

Problem: Tag Comments Not Visible in WinCC Operator List

Engineers commissioning a Siemens WinCC V7 or TIA Portal WinCC Professional project routinely configure descriptive comments on every tag in the WinCC Tag Management editor. The expectation is reasonable: when an operator changes a setpoint in Runtime, the resulting audit row in the Alarm Control's operator list should display the description alongside the tag name, old value, new value, and operator name. In a default configuration it does not, and the missing comment is one of the most frequently reported gaps during WinCC commissioning.

The visible Comment column in the Alarm Control is not bound to the engineering-time tag comment. By default, that column is empty unless the operator types into it during Runtime or a script writes to it programmatically. Recognizing this distinction between engineering comment and runtime comment is the first step to a working fix. Both fields are surfaced by the same Alarm Control column, but they originate in completely separate places inside WinCC.

Root Cause: Two Independent Comment Sources

WinCC stores two completely separate comment fields, and they never merge automatically. Conflating them is the underlying reason the symptom appears in projects of every size.

Comment Source Configuration Location Filled By Visible In
Tag Comment (engineering) WinCC Explorer → Tag Management → right-click a tag → Properties → Comment HMI/PLC engineer at design time Tag selection dialogs, Graphics Designer tooltips, project documentation
Alarm Comment (runtime) Alarm Control → Comment column or operator message configuration → Comment text block Operator clicking the column in Runtime, or a script writing via the WinCC ODK / VBS Alarm Control → Comment column, embedded in message text via @103%s@

Because the Alarm Control column only displays the runtime comment, the engineering comment never surfaces unless the project engineer explicitly wires it into either the message text or the column source. The wiring path is the actual engineering task, and the rest of this article is dedicated to implementing that wiring correctly.

Important: WinCC Runtime never reads the engineering tag comment automatically into an operator message. There is no checkbox in Alarm Logging that copies the tag Comment property into the operator message body. The linkage must be created by configuration or by a script. Treat the absence of the comment as the documented default, not as a bug.

Understanding WinCC Operator Message 12508141

Every operator input at a WinCC Runtime screen (setpoint changes, mode switches, on/off actions, recipe selections) triggers a system operator message. The exact message number used for a value change is 12508141, which is a member of the 12508xxx series that WinCC assigns to operator-input operations. Engineers can customize this message in WinCC Explorer → Alarm Logging → Messages by filtering on the message number 12508141.

Message 12508141 ships with a default text similar to the following template:

"Operator input @100%s@: @101%s@ changed from @102%s@ to @103%s@"

The default text uses four placeholders. Their meaning in the WinCC Information System is documented in the WinCC V7 manual section "Operator messages → Placeholders for operator messages" and in the equivalent TIA Portal Help under "Visualize processes → Configuring alarms → System messages → Operator input":

Placeholder Meaning Source
@100%s@ Tag name Tag Management internal tag name
@101%s@ New value (post-change) Runtime process value after the operator input
@102%s@ Old value (pre-change) Runtime process value before the operator input
@103%s@ Operator comment Text typed by the operator in the operator dialog or injected via script

Note that the tag's engineering comment is not a placeholder inside 12508141. To include it, the engineer has to add a custom user text block, to extend the message with an additional process-value block, or to use a script that writes the engineering comment into the runtime comment field at the moment the input is performed. Each approach is described in the solution paths below.

Solution Path A: Customize the Operator Message Text with a Static Hint

If the goal is simply to make the tag comment visible in the operator list and the project contains only one operator-controlled tag (or a small, fixed set), the cleanest approach is to add a User Text Block to the message text that references the tag. WinCC supports up to ten user-defined text blocks (User Text 1 … User Text 10) per message, and each can be addressed with the corresponding placeholder @1%s@ through @10%s@.

  1. Open WinCC Explorer → Alarm Logging → Messages.
  2. Locate message 12508141 in the message list. Use the message-number filter and type 12508141 to avoid scrolling through thousands of system messages.
  3. Open the message properties dialog (double-click) and switch to the Parameters tab.
  4. Add a new User Text Block, e.g. User Text 1, with the literal text you want displayed. Example for a boiler pressure setpoint:
    Tag description: Boiler pressure SP — used for combustion control loop
  5. Insert that text block into the message text by adding @1%s@ (the placeholder for User Text 1) at the desired position in the message text field:
    "@100%s@ changed: @101%s@ < @102%s@ — @1%s@  | op-comment: @103%s@"
  6. Confirm with OK and recompile the OS / Runtime via the OS Project Editor on the engineering station.

This approach is static. Every operator input on the project will show the same boiler-pressure description, which is acceptable only when the project has a single operator-controlled tag or when the operator message is duplicated per tag. For multi-tag projects a dynamic approach is required, and the next two sections cover that.

Solution Path B: Inject the Engineering Comment via a VBS Action

When dozens or hundreds of operator-controlled tags exist in a single WinCC project, a static text block is unworkable. The right pattern is a global VBS action that fires on every operator input, reads the engineering comment of the tag being changed, and writes it into the runtime comment field of the Alarm Control so that @103%s@ reflects the engineering comment.

WinCC's automation model exposes the Alarm Logging comment field through the HMIRuntime object and through the AlarmControl ActiveX control. The simplest pattern uses the WinCC ODK (Open Development Kit) function AXC_SetComment inside a global action that is triggered by the standard OnOperatorInput event of Alarm Logging.

' Global VBS action bound to the standard "OnOperatorInput" event
' Project: WinCC V7.4 SP1 or later, WinCC Professional V16/V17/V18
Sub OnOperatorInput(ByVal TagName, ByVal NewValue, ByVal OldValue)
    Dim sComment
    sComment = GetTagComment(TagName)              ' read engineering comment

    ' Only overwrite the runtime comment field if the operator has not typed one yet
    If HMIRuntime.AlarmComments(TagName) = "" Then
        HMIRuntime.AlarmComments(TagName) = sComment
    End If
End Sub

Function GetTagComment(ByVal TagName) As String
    Dim oTag
    Set oTag = HMIRuntime.Tags(TagName)
    If Not oTag Is Nothing Then
        GetTagComment = oTag.Comment
    Else
        GetTagComment = ""
    End If
End Function
Compatibility note: HMIRuntime.AlarmComments and oTag.Comment are available in WinCC V7.4 SP1 and later. For TIA Portal WinCC Professional, the equivalent is the HMIRuntime.Tags(name).Comment accessor inside an action triggered by the OperatorInput system event of the Alarm Logging runtime API. The event hookup lives in the alarm logging runtime configuration under "System events → Operator input".

After this action is enabled and the OS project is recompiled, every operator input automatically fills the Alarm Control's Comment column with the engineering comment of the changed tag. The message text 12508141 will render as:

"TagName changed from 12.5 to 13.0 — engineering-comment-string"

The action runs synchronously with the operator input and adds well under one millisecond of overhead even on projects with several hundred operator-controlled tags, because the comment lookup is a single dictionary access against the already-loaded tag list.

Solution Path C: Use a User Text Block with a Tag Reference

For engineers who prefer a no-script configuration but still need dynamic comment text, WinCC also supports the User Text Block with a dynamic tag reference. The message configuration accepts {<TagName>} tokens that are substituted at Runtime, and an internal text tag can be updated by the same OnOperatorInput event handler from Solution Path B.

  1. Open message 12508141 and add a new User Text 2 with the literal token {TagCommentLookup}.
  2. Create an internal text tag named TagCommentLookup in WinCC Tag Management (data type Text tag 16-bit character set, length 255).
  3. Wire a global VBS or C action that updates TagCommentLookup with the comment of the tag currently being changed. The same OnOperatorInput handler from Solution Path B can be reused with one extra line:
    HMIRuntime.Tags("TagCommentLookup").Write sComment
  4. Re-compile the OS via the OS Project Editor and restart WinCC Runtime.

This pattern keeps the message configuration declarative (everything visible in the Alarm Logging editor) while still allowing the comment text to be dynamic. The User Text 2 token @2%s@ then resolves to the comment of the tag being changed.

Step-by-Step: Configuring Solution Path B from Scratch

  1. In WinCC Explorer, right-click Alarm Logging and choose System events (V7) or Properties → Events (TIA Portal).
  2. Locate the Operator input event and assign the global VBS action OnOperatorInput to it.
  3. Confirm that the action is enabled for Runtime (the check box Activate for Runtime must be ticked).
  4. Open the OS Project Editor, run a full compile, and transfer the project to the HMI server / Runtime station.
  5. Start WinCC Runtime.
  6. Log in as an operator with write authorization (operator level 2 or higher is the typical requirement for entering comments).
  7. Open the screen that contains the I/O field bound to the test tag.
  8. Click into the I/O field, change the setpoint, and press Enter.
  9. Open the Alarm Control window and switch its filter to Operator messages (message class filter).
  10. Locate the row corresponding to message 12508141. The Comment column (or the text block you added) must now show either the engineering comment or the operator-typed comment, depending on which solution path is in use.
  11. Right-click the row and choose Comment → enter a free-text comment → press OK. The row must update to display the operator comment in the same column. This validates that the runtime comment field is wired correctly.
  12. Save the project and close Runtime.

Step-by-Step: Verifying Solution Path A

  1. After applying the changes to message 12508141, open the OS Project Editor and verify that the Alarm Logging step is selected for compilation.
  2. Run a full compile and note the file <project>.LOG in the project directory for any compilation warnings related to user text blocks.
  3. Start Runtime and trigger an operator input on any tag that uses the system operator message.
  4. Open the Alarm Control window and confirm the message text now includes the static User Text Block content.
  5. If the text does not appear, re-open message 12508141 and confirm that the User Text Block was saved (a small icon next to the block indicates enabled state in WinCC V7).

Troubleshooting Matrix

Symptom Likely Cause Remedy
Comment column is always empty in Alarm Control The runtime comment field is not populated by either operator input or a script Implement Solution Path B or Path C, then re-trigger an operator input
Comment column shows only operator-typed text, never the engineering comment Solution Path B is not active, or the OnOperatorInput event is not bound Re-bind the VBS action to the Alarm Logging system event and re-compile the OS
@103%s@ resolves to empty string even after configuring it The user text block parameter is not enabled in the Alarm Logging configuration Verify the User Text Block is set in the message properties and that the corresponding placeholder index is correct (e.g. @1%s@ for User Text 1)
Tag comment changes are not reflected at Runtime OS project was not re-compiled after editing message text Run the OS Project Editor, restart WinCC Runtime, repeat the operator input test
VBS syntax error "missing ) after argument list" when calling HMIRuntime.Tags(...).Write Syntax error inside the global action (often an unmatched parenthesis or a string literal without closing quote) Compare against the example in Solution Path B; validate the script via the WinCC Script Debugger. The same parenthesis-balance principle described in the MDN JavaScript syntax-error reference applies when debugging VBS scripts in the WinCC environment
Multiple operator messages use the same number 12508141 Custom messages were created accidentally instead of modifying the system message Reset the project database or filter the message list by the original system message number; do not duplicate message 12508141
Comment is truncated to N characters User Text Block length limit reached (default 255 characters in WinCC V7) Shorten the tag comment in Tag Management or extend the User Text Block length in the message properties
Comment column shows the operator's typed comment only after Runtime restart The script in Solution Path B is overwriting a non-empty comment field at every input Wrap the assignment in an "only if empty" guard as shown in the example, or store the engineering comment in a separate User Text Block
User Text Block placeholder shows literal text @1%s@ instead of the comment The placeholder index does not match the configured User Text Block Re-check the mapping: @1%s@ = User Text 1, @2%s@ = User Text 2, and so on up to @10%s@
The Alarm Control filter “Show only entries with comment” hides the row entirely The engineering comment is empty for that tag Add a non-empty comment to every operator-controlled tag in Tag Management or relax the filter to “All entries”

Performance and Audit Considerations

Injecting the tag comment into the Alarm Control on every operator input has negligible performance impact because Alarm Logging writes the comment string at the same instant the operator-input record is generated. However, consider the following when scaling the pattern to large projects with thousands of tags:

  • Comment length: Keep engineering comments under 64 characters if the Alarm Control column width is fixed. Alarm Logging stores up to 255 characters by default but the Alarm Control truncates display at the column width, and an excessively long comment will force horizontal scrolling in the row.
  • Localization: Tag comments in Tag Management are not language-switchable. If the project uses WinCC text libraries for multilingual Runtime, store the engineering comment in the text library and look it up in the VBS action via HMIRuntime.Language instead of using oTag.Comment directly.
  • Audit trail: When Solution Path B writes the engineering comment to the runtime comment field, any operator-typed comment overwrites it. If both must be preserved, use a separate User Text Block (User Text 1) for the engineering comment and reserve the runtime @103%s@ for the operator comment. The resulting Alarm Control row will then contain both pieces of information.
  • Redundancy: Do not duplicate the engineering comment into both the Comment column and a User Text Block; this creates maintenance debt when the tag comment changes and only one path is updated.
  • Action scheduling: Schedule the OnOperatorInput action with a trigger tag of "Use standard cycle (250 ms)" or call it via the Alarm Logging system event. Do not poll on a global cycle because that wastes CPU on every scan.
  • Database growth: Alarm Logging writes the comment string into the SQL archive. Long comments (close to 255 characters) on every operator input will inflate the archive size; estimate approximately 1 KB per archived row and plan partitioning accordingly.

Edge Cases and Field-Proven Caveats

  • Redundant tags: If the same tag is configured twice in Tag Management (internal tag vs. process tag pointing to the same PLC address), both will fire message 12508141. Use the Unique tag name check in Alarm Logging to consolidate, or remove the duplicate tag.
  • Cross-project scenarios: In a WinCC/TIA distributed system with multiple HMI servers, the engineering comment is local to each HMI server's Tag Management. The script in Solution Path B must run on the same HMI server where the tag resides, otherwise oTag will return Nothing.
  • Migration from WinCC V6 to V7: The placeholder index for operator comments changed between V6 and V7. If an upgraded project still uses V6 indices, message text will not resolve correctly. Re-verify all placeholders after a major-version upgrade.
  • Alarm Control filtering: Setting the Comment column filter to “Show only entries with comment” will hide all operator-input rows when the engineering comment is empty. Document this in the operator manual to avoid confusion during shift handover.
  • User authorization: The right-click Comment dialog in the Alarm Control requires operator level 2 (or the level configured under User administration → Authorization levels) for write access. If operators cannot add comments, verify that their user group has the appropriate number assigned in the WinCC User Administrator.
  • Time stamps: Operator comments inherit the timestamp of the operator input, not the timestamp of the comment entry. If your regulatory workflow expects a separate timestamp for the comment, configure the Audit Trail option in Alarm Logging under Properties → Audit.
  • Graphics Designer integration: When using a faceplate-style I/O field with the “Operator authorization” check enabled, the operator input fires a different internal trigger. Test the full path in Runtime rather than relying on the engineering simulator.

Differences Between WinCC V7 and TIA Portal WinCC Professional

The placeholder syntax and message-number conventions are consistent between WinCC V7 (SIMATIC WinCC) and TIA Portal WinCC Professional, but the configuration paths differ. In TIA Portal WinCC Professional the message 12508141 is hidden behind the alarm configuration of the HMI tag and is not directly editable in the same way as in WinCC V7. Instead, the engineer must enable the option “Generate operator message for value change” on the tag properties and then customize the message text via the HMI messages editor.

The VBS action hookup in TIA Portal lives under Project tree → HMI device → Events → Alarm events rather than under Alarm Logging → System events as in WinCC V7. The function name and parameter list of the OnOperatorInput handler are otherwise identical, which means the script in Solution Path B can be reused verbatim after copying it into the TIA Portal action editor.

WinCC V7 vs TIA Portal note: For projects started in TIA Portal V18 or later, prefer Solution Path C (User Text Block with a dynamic tag) because the engineering-time tag comment is exposed through the same tag property in both environments, and the no-script approach is easier to maintain across project upgrades.

Related Settings and Documentation References

The full operator-message placeholder list and the rules for customizing system messages are documented in the WinCC V7 manual available at the Siemens Industry Online Support portal under entry ID 109772051. The WinCC Information System on the engineering station contains the same content locally and is searchable via the help index entry “Operator messages → Placeholders”.

For TIA Portal WinCC Professional, the equivalent documentation is shipped with the TIA Portal Help under “Visualize processes → Configuring alarms → Operator messages”. The TIA Portal WinCC Professional manual set contains the full placeholder syntax for V16/V17/V18/V19.

The WinCC ODK reference for AXC_SetComment and related Alarm Logging automation functions is shipped as a separate CHM help file inside the WinCC installation under \Siemens\Automation\WinCC\Documents\English. Engineers should consult that document before writing production automation code that writes alarm comments.

FAQ

What is the difference between a tag comment and an alarm comment in WinCC?

The tag comment is descriptive text stored in WinCC Tag Management that documents the purpose of a tag during engineering. The alarm comment is runtime-entered text that the operator types into the Alarm Control column when acknowledging an event or that a script writes via the WinCC ODK. They are independent fields and are never merged automatically.

Which system message number does WinCC use for tag setpoint changes?

Tag setpoint changes are logged with system message 12508141 in WinCC V7 and TIA Portal WinCC Professional. The default text uses placeholders @100%s@ (tag name), @101%s@ (new value), @102%s@ (old value) and @103%s@ (operator comment).

What does @103%s@ represent in a WinCC operator message?

The placeholder @103%s@ is replaced at Runtime with the operator comment — the free-text string typed into the operator dialog or the Comment column of the Alarm Control. It does not contain the engineering-time tag comment unless a script writes the engineering comment into the runtime comment field.

Can the engineering tag comment and the operator-typed comment both be displayed at the same time?

Yes. Use a User Text Block (User Text 1) for the engineering comment and reserve @103%s@ (the runtime comment placeholder) for the operator-typed comment. Both can coexist in the message text and both will appear in the Alarm Control row when configured correctly.

Why does my modified message 12508141 not appear in Runtime?

The OS project must be re-compiled after every change to Alarm Logging message text. Open WinCC Explorer, run the OS Project Editor, restart WinCC Runtime, and repeat the operator-input test. If the message still does not appear, verify that the message number was not accidentally duplicated by a custom message with the same number.

Back to blog