Problem Statement
When a runtime user acknowledges an active alarm in a Siemens WinCC HMI/SCADA project, the Alarm Logging control correctly creates an acknowledgement row, but the "User name" column remains blank. The Date, Time, and Count columns populate automatically because the Alarm Logging editor inserts them by default; the User name field is only populated when the Alarm Logging editor has been told where to find it. The symptom is most commonly observed on WinCC V7.x projects that have replaced the internal WinCC user administration with the central SIMATIC Logon service, but the same fault pattern appears on WinCC Professional (TIA Portal) projects when the logged-in Windows user is supplied through a UMC, AD, or SIMATIC Logon back end.
The fault is not a bug in Alarm Logging. It is a configuration gap. Alarm Logging needs two distinct settings before it will copy the runtime user into the acknowledgement row: (1) a system block assignment that includes the User name block, and (2) a process value block (or an internal tag) that supplies the actual name. When SIMATIC Logon is the identity provider, the standard @CurrentUser and @CurrentUserName tags do reflect the Windows-authenticated user, so the fix is straightforward once the binding chain is understood.
Root Cause Analysis
Alarm Logging writes an acknowledgement record whenever the runtime calls AXC_OnAcknowledge() (WinCC V7 C-API) or whenever the user clicks the acknowledgement button bound to Acknowledge in the Alarm Logging OCX. The internal handler writes the timestamp from the runtime clock, increments the Count counter, and copies the current username from a tag that has been pre-bound to the message frame.
Three preconditions must all be satisfied for the username column to be non-empty:
- The internal tag that contains the user identity (
@CurrentUserNameor a project-specific tag) must currently hold the SIMATIC Logon-resolved identity. WinCC re-reads this tag on every acknowledgement event; it is not cached. - The alarm message class must have a process value block slot bound to that tag using the
@N%s@syntax (for example@102%s@for block 2). The "contains expanded associated values" property of the message must be enabled, otherwise the placeholder is stored literally rather than evaluated. - The User name system block must be added to the Alarm Logging view. System blocks are separate from process value blocks; they govern which Alarm Logging control columns exist and which Alarm Logging fields they display.
If any one of the three preconditions is missing, the column will be blank even though the acknowledgement itself succeeds. This is by design: Alarm Logging never invents a username, it only displays the value it was handed.
@CurrentUser (Windows DOMAIN\User form) and @CurrentUserName (display name form) are updated by the Logon plug-in, not by the legacy WinCC user administration. Disabling the WinCC user administration (which is required when SIMATIC Logon is the identity provider) does not remove the internal tags; it only changes who writes them.Configuration Prerequisites
| Component | Required Version / Setting | Notes |
|---|---|---|
| WinCC V7.4 SP1 or later | Alarm Logging editor with system block customization | V7.3 also works but lacks some PB expansion toggles |
| SIMATIC Logon | V1.5 SP3 or later recommended | Earlier versions do not publish the display name to @CurrentUserName in all locales |
| Windows account used at runtime | Member of SIMATIC Logon role with alarm acknowledge right | Right is configured in WinCC User Administrator → Authorizations |
| WinCC Authorization | "Alarm - Acknowledge" (auth number 6 by default) | Confirm in User Administrator → Authorizations tab |
| Runtime computer | Same Windows user as the logged-on operator | SIMATIC Logon does not impersonate; it reads the current session token |
Step-by-Step Resolution
1. Confirm SIMATIC Logon Is the Active Identity Provider
- In the WinCC Explorer, right-click User Administrator and open its properties.
- Open the Logon tab. Verify the dropdown "Use SIMATIC Logon for logon" is selected. If unchecked, the runtime falls back to the internal user list and the
@CurrentUsertag will read from that internal list instead. - Open the Windows Services console (
services.msc) on the runtime PC and confirm the SIMATIC Logon service status is Running and startup type is Automatic. - Open SIMATIC Logon Configuration from the Start menu. Validate that the project is listed under "Assigned WinCC projects" and that the operator's Windows group has been granted the alarm acknowledgement authorization.
2. Validate @CurrentUser and @CurrentUserName Are Populated
- In the WinCC Explorer, open Tag Management → Internal Tags.
- Confirm the tags
@CurrentUser(text tag, 255 chars) and@CurrentUserName(text tag, 255 chars) exist. Both are created automatically by the WinCC runtime; do not delete them. - Start the runtime, log on with a SIMATIC Logon user, and add a temporary I/O field bound to
@CurrentUserNameto verify the display name appears. If the field stays empty, the SIMATIC Logon service is not connected to the project; revisit Step 1.
3. Bind the User Name to a Process Value Block
Alarm Logging reads the username through a process value block placeholder. The default message classes ship with up to 10 process value blocks; the conventional choice for the username is block 10 (placeholder @10%s@) or block 2 (@2%s@) if you want to keep the user in the message text as well.
- In the WinCC Explorer, open Alarm Logging and select the message class that contains the alarms you need (typically System - Errors or a custom class).
- Right-click the class → Properties → Process Values tab.
- In the row for the desired block index (for example, Block 10), enter the placeholder
@10%s@in the message text column if you want the user to appear in the alarm text, and in the Process Value column reference the tag@CurrentUserName. - Click Apply and close the dialog.
4. Enable "Contains Expanded Associated Values" on the Message
This is the property most often missed. Without it the @N%s@ placeholder is stored as a literal string and never expanded at runtime, regardless of the tag binding.
- In Alarm Logging, select the individual message (or Ctrl-A to select all messages in the class).
- Open Properties → Parameters/Options tab (WinCC V7) or the equivalent Message properties pane in WinCC Professional.
- Enable the checkbox "Contains expanded associated values" (German: "Erweiterte Begleitwerte enthalten").
- Click Apply and commit the change to the project database.
5. Add the User Name System Block to the Alarm Control
The system block is the column-level switch; the process value block is the data source. You need both.
- In the Graphics Designer, open the picture that contains the WinCC Alarm Control (OCX) and double-click it.
- Click the toolbar button Select columns (or right-click the control → Configure columns).
- In the dialog "Add/Remove..." select Available System Blocks → User name.
- Click the transfer (right-arrow) button to move it to Selected System Blocks.
- Position the column where you want it (between Time and Text is conventional), confirm with OK.
- Save the picture and re-compile / re-activate the runtime.
6. Optional: Add a Comment Column for Audit Trail
For FDA 21 CFR Part 11 / GxP installations, the alarm acknowledgement event needs the operator identity, a timestamp, and ideally an optional comment. Add the Comment system block the same way you added User name, and configure the control to prompt for a comment on acknowledgement via the OCX property Acknowledge with comment.
Verification Procedure
After applying the changes, verify end-to-end with this checklist. Do not skip any step; each verifies a different part of the chain.
-
Runtime identity test: Bind an output field to
@CurrentUserName. Confirm the displayed name matches the SIMATIC Logon user. If it does not, the remaining steps will fail silently. - Trigger test alarm: From the Graphics Designer or a script, trigger an alarm that is a member of the modified message class. Confirm the alarm row appears with the configured user name in its text and acknowledgement column.
- Acknowledge test: Click the Acknowledge button. The User name column of the acknowledgement row must contain the same value displayed in Step 1.
-
Audit database test: If the project archives to SQL, open MS SQL Server Management Studio, expand the alarm archive database, run
SELECT * FROM dbo.MS_AlarmView WHERE UserName IS NOT NULL ORDER BY TimeStamp DESCand confirm theUserNamecolumn is populated for new rows but empty for legacy pre-change rows. - Multi-user test: Log out, log in with a second SIMATIC Logon account, repeat the acknowledgement test. Both usernames must appear independently.
Process Value Block Syntax Reference
The placeholder grammar in Alarm Logging is @<block>%<format>@. The block index selects one of the ten process value blocks bound to the message class; the format specifier tells Alarm Logging how to render the value.
| Placeholder | Block Index | Typical Binding | Notes |
|---|---|---|---|
@1%s@ |
1 | Application-specific (e.g. line number) | String format |
@2%s@ |
2 | Operator / user display name | Common choice for username |
@10%s@ |
10 | Operator / user display name | Used when blocks 1-9 are reserved for process data |
@2%u@ |
2 | Unsigned integer user ID | Integer format |
@2%f@ |
2 | Floating point | For numeric process values |
@2%#02X@ |
2 | Hexadecimal (e.g. fault code) | C-style printf spec |
Block 0 is reserved by Alarm Logging for the message number and cannot be reassigned. Blocks 11 and above are not supported in the default message classes; if more are needed, create a custom message class with additional blocks defined in its property sheet.
System Block Reference
System blocks are the columns visible in the Alarm Control. They are managed in two places: the column selection dialog of the Alarm Control OCX, and the Alarm Logging editor's System Blocks node. The relevant system blocks for this fix are:
| System Block | Display Name | Source | Auto-Populated? |
|---|---|---|---|
| Date | Date of event | Runtime clock | Yes |
| Time | Time of event (ms resolution) | Runtime clock | Yes |
| Count | Sequential occurrence number | Alarm Logging internal | Yes |
| State | Came / Went / Ack | Alarm Logging state machine | Yes |
| User name | Operator identity | Process value block binding | No - manual binding required |
| Computer name | Source server | Runtime host | Yes |
| Priority | 0-16 | Message class property | Yes |
| Comment | Optional operator note | Acknowledgement dialog | Optional |
WinCC Professional / TIA Portal Equivalent
The same logic applies in TIA Portal WinCC Professional, but the menus differ. The mapping below helps engineers moving projects from V7 to V17/V18.
| WinCC V7 Path | WinCC Professional (TIA) Equivalent |
|---|---|
| Alarm Logging → Message Class Properties → Process Values | HMI alarms → Alarm classes → Properties → Process tag |
| Message → Properties → Parameters/Options → Contains expanded associated values | HMI alarms → Alarm text → "Multilingual" → "Insert tag / field" → enable "Output as expression" |
| Alarm Control → Configure columns → System Blocks | ProDiag / Alarm control → Columns → "User name" check box |
| User Administrator → Use SIMATIC Logon | Runtime settings → User administration → "Use SIMATIC Logon" |
Cross-Platform Alarm Acknowledgement Models
Other major HMI/SCADA platforms solve the same problem with different architectural primitives. Engineers responsible for multi-vendor sites should understand the parallel mechanisms so they can debug in any environment.
| Platform | Acknowledge API | Username Source | Comment Storage |
|---|---|---|---|
| Siemens WinCC V7 | Alarm Control OCX / AXC_OnAcknowledge C-API |
Process value block bound to @CurrentUserName
|
Optional, stored in archive |
| Siemens WinCC Unified | JavaScript HMIRuntime.Alarming
|
Session token from UMC / SIMATIC Logon | Stored as alarm property |
| Inductive Automation Ignition | system.alarm.acknowledge | Current session user (id, username, full name) | Stored as audit log entry |
| AVEVA System Platform | AlarmUtility:AlarmAck | Galaxy DB user table joined at ack time | Free-text comment on the ack request |
| Schneider EcoStruxure / AVEVA (Sigma) | Sigma alarm widget acknowledgement | Sigma user account configured for ack-only role | Logged in audit trail |
AVEVA's documentation is explicit: "The acknowledge request contains the user's name and any alarm comment. For the alarm utility, the alarm is acknowledged within the alarm feature immediately." This is the same handshake WinCC implements, just with the user identity attached at a different layer of the stack.
Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| User name column visible but always empty | Process value block not bound, or "Contains expanded associated values" not enabled | Re-bind tag to block, enable the checkbox |
| User name column shows the WinCC service account | SIMATIC Logon not enabled; runtime falls back to internal admin user | Enable "Use SIMATIC Logon" in User Administrator |
| User name column shows literal "@2%s@" | "Contains expanded associated values" missing | Enable the message property (Step 4) |
| User name column shows the previous user's name after re-logon |
@CurrentUserName tag retained its last value because the SIMATIC Logon plug-in was not refreshed |
Add a tag trigger on logoff/logon events; verify SIMATIC Logon service restart |
| Acknowledge button greyed out | Operator lacks WinCC authorization "Alarm - Acknowledge" (default auth #6) | Grant the auth in User Administrator or SIMATIC Logon role mapping |
| Column header missing entirely | User name system block not added to Alarm Control | Re-add system block in Alarm Control column dialog |
| Alarm text contains correct user but ack row is empty | Different block used for text vs. for acknowledgement; only the latter reads the username | Bind a separate process value block specifically for acknowledgement |
| Archive shows correct name; runtime does not | Alarm Control OCX uses an older cached version of the column configuration | Recompile the picture and re-activate runtime |
Diagnostic Queries and Scripts
For VBScript-based diagnostics inside WinCC, the following snippet dumps the active user identity into a status line so you can confirm the tag chain without leaving runtime:
' WinCC V7 VBScript - log current user to a diagnostic tag
Dim sUser, sHost
sUser = HMIRuntime.Tags("@CurrentUserName").Read
sHost = HMIRuntime.Tags("@CurrentUser").Read
HMIRuntime.Trace "User=" & sUser & " Host=" & sHost & " Time=" & Now
For projects that need to write the user to a non-default process value block, set the binding programmatically when the operator logs in:
' Bind operator name to block 10 of the active alarm message
Sub OnLogon(sUser)
HMIRuntime.Tags("OperatorName_PB10").Write sUser
End Sub
SQL Archive Verification
WinCC stores alarm events in the SQL Server alarm database (default name CC_Alarming_<ProjectName>_<Timestamp>). After the fix is deployed, confirm the archive integrity:
-- Top 20 acknowledgement events, newest first
SELECT TOP 20
TimeStamp,
MsgProcID,
State,
UserName,
ComputerName,
Comment
FROM dbo.MS_AlarmEvents
WHERE State = 4 -- 4 = acknowledged
ORDER BY TimeStamp DESC;
-- Count of acknowledgement events missing user identity
SELECT COUNT(*) AS BlankUserNameAcks
FROM dbo.MS_AlarmEvents
WHERE State = 4
AND (UserName IS NULL OR LTRIM(RTRIM(UserName)) = '');
The State column uses the bitmask documented in the WinCC Alarm Logging SQL reference: 1 = came, 2 = went, 4 = acknowledged, 8 = commented. Audit queries should always filter on State & 4 = 4 to isolate acknowledgement-only rows.
Performance and Retention Notes
Each acknowledgement row is one SQL insert; on a high-noise plant with 50 000+ alarms per shift, the MS_AlarmEvents table grows roughly 50 MB per week. The username column is a fixed nvarchar(60) so it adds negligible storage. Retention is governed by the archive configuration in Alarm Logging → Archive Configuration. For GxP sites, configure no automatic deletion and enable SQL Server transparent data encryption on the database files.
Bind @CurrentUserName to a single process value block and reuse it across all message classes where possible. Each binding adds a single tag read per acknowledgement event; reusing one binding keeps the runtime overhead flat as the project grows.
Safety and Compliance Considerations
In plants under FDA 21 CFR Part 11 or EU GMP Annex 11, the alarm acknowledgement record constitutes an electronic signature linking an operator identity to a process event. Two controls are mandatory on top of the WinCC configuration:
- The Windows account used to log on to SIMATIC Logon must itself be unique to the operator (no shared accounts). Configure the SIMATIC Logon Configuration tool to enforce individual accounts; group-based authentication alone is insufficient for the electronic signature rule.
- The audit trail in
MS_AlarmEventsmust be write-protected at the SQL role level. RevokeUPDATEandDELETEon this table from the WinCC runtime account; grant onlyINSERTandSELECT.
References to Official Documentation
For deeper reading, refer to:
- Siemens WinCC V7.5 SP2 Alarm Logging manual (entry ID 109750604 on the Siemens Industry Online Support portal at support.industry.siemens.com) — the canonical reference for process value block syntax and system block semantics.
- Siemens SIMATIC Logon V1.6 administration manual — describes the credential provider plug-in that writes
@CurrentUserand@CurrentUserName. - Inductive Automation Ignition User Manual, section system.alarm.acknowledge — alternative implementation for comparison.
- AVEVA Application Server documentation, alarm acknowledgement page — confirms the parallel user/comment data flow.
FAQ
Why does the Time and Count column populate but not User name in WinCC Alarm Logging?
The Time and Count columns are internal to Alarm Logging and are always written automatically. The User name column requires two project-level bindings: a process value block bound to @CurrentUserName with the "Contains expanded associated values" property enabled, and the User name system block added to the Alarm Control column list. Without both, Alarm Logging has no source for the username and leaves the column blank by design.
Does SIMATIC Logon change the @CurrentUserName tag value?
Yes. When SIMATIC Logon is enabled as the identity provider, the SIMATIC Logon plug-in writes the authenticated Windows display name into @CurrentUserName at logon and clears it at logoff. If SIMATIC Logon is disabled, the tag reads from the internal WinCC user administration list instead. You can verify with a temporary I/O field bound to the tag.
Which process value block should I bind the username to?
There is no reserved block for the username. The conventional choice is block 10 (@10%s@) because blocks 1-9 are usually reserved for process data, but any free block works. The binding is configured in Alarm Logging → Message Class Properties → Process Values, and the same block can be reused across multiple message classes.
Why does my alarm text show the username but the acknowledgement row does not?
The text and the acknowledgement row can be bound to different process value blocks. Confirm that the block used for the acknowledgement column is also bound to @CurrentUserName and that the message property "Contains expanded associated values" is enabled. Check the Alarm Control column configuration to see which system block is reading which source.
How do I confirm the fix works in the SQL archive?
Run SELECT COUNT(*) FROM dbo.MS_AlarmEvents WHERE State = 4 AND (UserName IS NULL OR LTRIM(RTRIM(UserName)) = '') against the project's alarm database. A healthy result is zero for all new events after deployment. Legacy rows generated before the fix will remain blank and should be marked as known-issue data in your validation documentation.
Does this work in WinCC Professional (TIA Portal) Unified?
The Unified alarm editor evaluates placeholders by default, so the "Contains expanded associated values" checkbox is not required. The username is bound directly in the alarm text or alarm property as a tag reference, and the Alarm Control column for "User name" is enabled in the column configuration. Migration of V7 projects to Unified should re-bind the tag rather than copy the placeholder syntax verbatim.