WinCC Alarm Logging: Configuring 16-Bit and 32-Bit Message Tags
When configuring discrete alarms in Siemens WinCC Alarm Logging, the tag selection dialog for the Message Tag column sometimes appears to show only binary (BOOL) tags. A configured 16-bit word tag (e.g., MW4, DB4.DBW4) or a 32-bit double-word tag (e.g., MD20) does not appear in the selection list, even though the same tag updates correctly in WinCC Tag Management. The visible symptom is identical for internal tags, external SIMATIC S7 tags, and WinCC Unified PLC tags. The root cause is a missing configuration in an adjacent column — the Message Bit column — that the Alarm Logging editor uses to filter compatible trigger tags once a non-binary datatype is requested. This reference walks through the underlying mechanics, the WinCC Classic (V6.x and V7.x) and WinCC Unified (TIA Portal V20) configuration steps, the S7 address conventions, and the runtime verification procedure.
1. Problem Statement
The reported behavior is consistent across WinCC Classic V6, V7.0–V7.5 SP1 and WinCC Unified V15–V20:
- The engineer opens the Alarm Logging editor and adds a new single message or a message class instance.
- In the message configuration table, the engineer clicks the Message Tag column and selects the small button (...) to open the tag selection dialog.
- The dialog opens, but the filter narrows the list to binary tags only.
- Word (16-bit), DWord (32-bit), signed and unsigned tags configured in WinCC Tag Management do not appear.
- The same project works correctly when only binary tags are used as alarm triggers.
Underneath, the dialog does not actually filter by datatype. It filters by what the Alarm Logging runtime expects for the currently selected Message Bit value. The default Message Bit is 0, but until the engineer clicks into the Message Bit cell of that alarm row and commits a numeric value, the editor behaves as if no compatible trigger tag exists and limits the dialog to binary.
2. Root Cause Analysis
The WinCC Alarm Logging runtime uses three coupled parameters for each alarm row:
- Message Tag – the WinCC tag (internal or external) whose value is monitored.
- Message Bit – the zero-based bit index inside that tag. For Binary tags the value is fixed at 0. For Word tags the valid range is 0–15. For DWord tags the valid range is 0–31.
- Trigger Mode (WinCC Unified) or implicit edge (WinCC Classic) – whether the alarm is raised on a rising edge (0→1), falling edge (1→0), or both.
When the engineer does not explicitly set the Message Bit value, the Alarm Logging editor behaves as if the trigger source is undecided. To prevent accidental configuration errors, the tag dialog filter is restricted to binary tags until the Message Bit is committed. Once a numeric value (any value 0–31) is typed into the Message Bit cell and the row is committed with Enter or Tab, the dialog unblocks and exposes all compatible Word and DWord tags.
This behavior is documented in the WinCC V7.x Alarm Logging manual under the section "Configuring the message tag" and in the WinCC Unified V20 documentation under Basics of Alarm Logging (RT Unified).
3. WinCC Classic V7.x Alarm Logging Tag Model
WinCC Classic (V6, V7.0, V7.2, V7.3, V7.4, V7.4 SP1, V7.5, V7.5 SP1) stores alarm definitions in the SQL-based WinCC Configuration Studio. Each alarm row accepts the following trigger columns:
| Column | Data Type | Range | Required For Binary | Required For Word / DWord |
|---|---|---|---|---|
| Message Tag | WinCC Tag (BOOL / WORD / DWORD) | Existing tag | Yes | Yes |
| Message Bit | UINT8 | 0 (BOOL) / 0–15 (WORD) / 0–31 (DWORD) | Optional (auto = 0) | Required (0–15 or 0–31) |
| Acknowledgement Tag | BOOL / WORD / DWORD | Existing tag | Optional | Optional |
| Acknowledgement Bit | UINT8 | 0 / 0–15 / 0–31 | Optional | Optional |
| Status Tag | BOOL / WORD / DWORD | Existing tag | Optional | Optional |
| Status Bit | UINT8 | 0 / 0–15 / 0–31 | Optional | Optional |
For a binary tag, the Message Bit is implicitly 0; WinCC Classic auto-selects it. For a Word or DWord tag, the Message Bit is mandatory and must be entered before the tag selection dialog will accept non-binary tags.
4. Supported Tag Types and Bit Mapping
WinCC Alarm Logging supports only integer-like tags as trigger sources. The full mapping is:
| WinCC Tag Type | Underlying PLC Type | S7 Address Example | Bit Range | Notes |
|---|---|---|---|---|
| Binary Tag | BOOL | M 4.0, I 0.0, DB4.DBX0.0 | 0 | Single alarm per tag |
| Unsigned 16-bit | WORD | MW 4, DB4.DBW 0, IW 10 | 0–15 | Up to 16 grouped alarms |
| Signed 16-bit | INT | MW 6 | 0–15 | Same range as WORD |
| Unsigned 32-bit | DWORD | MD 8, DB4.DBD 0 | 0–31 | Up to 32 grouped alarms |
| Signed 32-bit | DINT | MD 12 | 0–31 | Same range as DWORD |
Real (32-bit float), Double (64-bit float), Text Tag 8-bit, and Text Tag 16-bit tags cannot be used as Message Tag in discrete Alarm Logging. For analog limit alarms the WinCC "Analog Alarm" type is required instead of the discrete-message path described here.
5. Step-by-Step Configuration: WinCC Classic V7.x
To configure a 16-bit or 32-bit tag as the Message Tag for an alarm:
- Open WinCC Configuration Studio from the WinCC Explorer or the Start menu.
- Navigate to Alarm Logging → Messages (or your project-specific message class folder).
- Double-click the row to edit, or right-click and select Add new message.
- In the Message Tag column, click the empty cell. Do not click the (...) button yet.
- Move to the Message Bit column of the same row and type the bit index (e.g.,
7for the 8th bit of a Word tag). Press Enter to commit. - Now click the (...) button in the Message Tag column. The tag dialog unblocks and lists all binary, Word, and DWord tags in the project.
- Select the desired Word or DWord tag (e.g.,
DB4_DBW4orMW4). Confirm with OK. - Optionally fill the Acknowledgement Tag, Acknowledgement Bit, Status Tag, and Status Bit columns. The same Message Bit constraint applies for non-binary acknowledgment and status tags.
- Save the project (Ctrl+S). Trigger a recompile if the runtime is already running.
If the project is currently active on a runtime station, changes take effect after a controlled reload. For redundant pairs, perform the action on both servers or rely on the internal redundancy synchronization of the alarm logging database.
6. WinCC Unified V20 Configuration
WinCC Unified (introduced with TIA Portal V15 and continuously expanded through V20) reuses the same Message Bit concept but exposes it under different terminology. The relevant configuration is in the HMI device's alarm configuration:
- Open the TIA Portal project and select the Unified Comfort Panel or Unified PC station.
- In the project tree, expand HMI alarms → Discrete alarms (or Analog alarms for limit-driven alarms).
- Add a new alarm and open its properties.
- In the Trigger section, configure:
- Trigger tag – the HMI tag or PLC tag that will be monitored.
- Trigger bit – the bit position inside the trigger tag. Visible as a numeric selector.
- Trigger mode – On rising edge, On falling edge, or On both edges.
- If the trigger tag is a Word or DWord PLC tag, the Trigger bit selector exposes the appropriate range automatically (0–15 or 0–31).
The runtime evaluation uses the same bit-mask logic as WinCC Classic. The internal alarm state machine raises the alarm when the configured bit transitions according to Trigger mode and clears it when the trigger condition is no longer true (subject to the configured acknowledgement model).
For additional background on the logging side (alarm log, archive configuration, and the relationship between triggering and logging), see Basics of Alarm Logging (RT Unified) in the TIA Portal V20 documentation.
7. S7 PLC Address Reference
For S7-300/400 and S7-1200/1500 controllers, the following address forms are common Message Tag sources:
| Address | Area | Data Width | Typical Use |
|---|---|---|---|
| M 4.0 | Merker (flag) | 1 bit | Discrete alarm |
| MW 4 | Merker word | 16 bits | Group of up to 16 alarms |
| MD 4 | Merker double word | 32 bits | Group of up to 32 alarms |
| I 0.0 | Process input | 1 bit | Discrete alarm from digital input |
| IW 0 | Process input word | 16 bits | Group of alarms from input module |
| DB4.DBX 0.0 | Data block bit | 1 bit | Discrete alarm from DB flag |
| DB4.DBW 4 | Data block word | 16 bits | Group from DB |
| DB4.DBD 0 | Data block double word | 32 bits | Group from DB |
For S7-1200/1500 with optimized block access (default since TIA Portal V13), absolute byte/bit addressing may not be available on the PLC data block side. Two practical paths exist:
- Set the data block to non-optimized access (uncheck "Optimized block access" in the DB properties). The PLC then exposes the absolute byte layout that WinCC Classic expects.
- Use symbolic tag references (e.g.,
"DB_Alarms".bGroupBits). WinCC Unified V20 binds directly to the PLC symbol and supports Word/DWord alarms without the absolute-address trade-off.
8. Trigger Logic and Bit-Level Semantics
Alarm Logging uses bit masking under the hood. For a configured Message Tag T and Message Bit B, the runtime evaluates the boolean condition on every acquisition cycle:
alarmState = ((T >> B) & 1)
The acquisition cycle is configurable per alarm logging channel (typical default ranges: 250 ms in WinCC Classic, 500 ms in WinCC Unified; tighter values are acceptable on a per-tag basis for time-critical alarms).
The edge detection logic:
- Rising edge: raises the alarm when the bit transitions 0 → 1.
- Falling edge: raises the alarm when the bit transitions 1 → 0.
- Both edges: raises on every transition.
- Status polling: keeps the alarm active while the bit remains in the triggered state.
The Message Bit value is zero-indexed: 0 = least significant bit, 15 = most significant bit of a Word (16#8000 mask), 31 = most significant bit of a DWord (16#80000000 mask).
9. Tag Filtering Behavior in the Selection Dialog
When the engineer clicks the (...) button on the Message Tag cell, the dialog runs an internal compatibility check:
- Read the Message Bit value of the current row.
- If the Message Bit cell is empty or out of range, restrict the result to BOOL tags.
- If Message Bit is 0–15, allow BOOL + WORD + DWORD tags.
- If Message Bit is 16–31, allow only DWORD tags.
Forcing the engineer to commit the Message Bit before opening the dialog prevents accidental binding of a Word tag when no bit was selected. This explains why the dialog appears empty for non-binary tags: the filter is correctly limiting the result, but the cause is the missing Message Bit entry, not the tag itself.
Older WinCC Classic V6 builds had a slightly different filter: the dialog showed binary tags only when Message Bit was unset, and required a manual "Show all tags" checkbox to expand to Word/DWord. The V7.x and Unified behavior described above supersedes that workflow.
10. Verification and Commissioning
To verify the alarm configuration in the WinCC runtime:
- Compile and download the WinCC project to the runtime (or use the local PC runtime for HMI engineering stations).
- Activate the runtime.
- From the PLC side, force the configured bit of the trigger tag:
- In STEP 7 V5.x: open the VAT (Variable Table) for the DB / Merker area and write the desired bit.
- In TIA Portal: use Monitor & Force → create a watch table and force the bit directly.
- Confirm that the alarm appears in the Alarm Control / WinCC AlarmControl view within one polling cycle.
- Reset the bit and confirm the alarm clears or remains pending depending on the configured acknowledgement model (single acknowledgement, multi-step acknowledgement, or auto-clearing).
- If the alarm does not appear, open the WinCC diagnostics window (
WinCC Explorer → Tools → Diagnostics) and inspect the Alarm Logging status channel for "Tag not found" or "Type mismatch" entries.
For WinCC Unified, the equivalent runtime test uses the Unified Runtime's Alarm Control view and the tag simulation facility exposed under HMI tags → Simulation. The simulation tool can drive HMI-side tags without touching the live PLC, which is invaluable for bench commissioning.
11. Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| Tag dialog shows only binary tags | Message Bit cell empty | Enter a numeric Message Bit (0–15 / 0–31) before opening the dialog |
| Tag dialog shows no tags at all | Message Bit out of range for the tag type | Use 0–15 for Word, 0–31 for DWord |
| Alarm raises but never clears | Trigger mode is "On rising edge" only and the PLC bit stays at 1 | Switch to "On both edges" or implement PLC-side reset |
| Alarm raises with the wrong text | Wrong bit index selected | Re-check bit mapping against the PLC source structure |
| Tag is listed but alarm does not fire | External tag connection is down or channel unit disabled | Check WinCC Channel Diagnosis and SIMATIC S7 Protocol Suite connection status |
| "Tag not found" runtime warning | Tag renamed or deleted in Tag Management after alarm configuration | Re-bind the Message Tag in Alarm Logging editor |
| Word tag visible in Tag Management but not in Alarm Logging dialog | Tag is signed (INT), not unsigned (WORD); some older V7.0 builds filter on unsigned only | Recreate as unsigned 16-bit tag or upgrade to V7.4 or later |
| Alarm appears only after manual reset | Acknowledgement Tag configured but not wired on the PLC side | Clear Acknowledgement Tag, or wire the PLC-side acknowledgement bit |
| Alarm fires repeatedly while bit stays high | Trigger mode set to "Both edges" and PLC toggles the bit periodically | Switch to "On rising edge" or fix the PLC logic that toggles the bit |
| Alarm text shows question marks after runtime restart | Project has not been fully compiled after a text change | Perform a full WinCC project compile and redeploy |
12. Best Practices and Field Notes
-
Group alarms with Word/DWord tags: A single Word tag can carry 16 alarms and a DWord can carry 32, drastically reducing SIMATIC S7 connection overhead. Reserve one Merker Word or DB Word per subsystem (e.g.,
DB100.DBW0= drive group 1 alarms: bit 0 = overload, bit 1 = overtemperature, bit 2 = phase loss, ...). - Document the Message Bit in the alarm comment: In the alarm's User text or Comment field, document the Message Tag and Message Bit verbatim so commissioning engineers can find the source in the PLC without reverse-engineering the configuration.
- Keep Message Tag and Status Tag identical: When the alarm is non-acknowledgable, configuring the same tag for Message and Status makes the runtime state predictable. WinCC will clear the alarm as soon as the bit returns to the non-triggered state.
- Use a fixed polling interval for critical alarms: For alarms where 500 ms latency is unacceptable, switch the Alarm Logging channel to a faster acquisition cycle (e.g., 100 ms) on a per-tag basis using the Acquisition cycle setting.
- Test with simulated PLC tags: During bench commissioning, use WinCC internal tags to validate the alarm text and acknowledgment model before connecting the live SIMATIC S7 channel. This isolates PLC bugs from HMI bugs.
- Migrate carefully between V7.x and Unified: A WinCC Classic alarm that uses Message Tag + Message Bit is semantically equivalent to a Unified alarm that uses Trigger tag + Trigger bit. The Siemens SIMATIC Migration Tool preserves the mapping when exporting a WinCC Classic project to a Unified target, but always spot-check the imported alarm definitions.
- Verify redundancy behavior: On redundant WinCC server pairs, alarm logging uses an internal SQL Server database replication. After any configuration change, force a master–standby switch and confirm that the alarm list, active alarms, and acknowledged states remain consistent.
FAQ
Why does the Message Tag dialog show only binary tags in WinCC Alarm Logging?
Because the Message Bit cell of the alarm row has not been set. Open the Message Bit column, type a numeric bit index (0–15 for Word, 0–31 for DWord), press Enter, then reopen the Message Tag dialog. The filter unblocks and lists all binary, Word, and DWord tags defined in the project.
Which WinCC tag types can be used as Message Tag?
Binary Tag (1 bit), Unsigned/Signed 16-bit (Word), and Unsigned/Signed 32-bit (DWord). Real (float), Text, and Date/Time tags are not supported as Message Tag and require the Analog Alarm configuration path instead.
What is the difference between Message Bit 0 and Message Bit 7 on a Word tag?
Message Bit 0 monitors the least significant bit of the Word (16#0001 mask). Message Bit 7 monitors bit 7 (16#0080 mask). On a DWord tag, Message Bit 31 monitors the most significant bit (16#80000000 mask). The bit index is always zero-based.
Does the same fix apply to WinCC Unified?
Yes. In WinCC Unified the columns are called Trigger tag and Trigger bit, but the underlying bit-mask logic is the same. Configure the Trigger bit first, then bind the Trigger tag from the HMI or PLC symbol list. See the official TIA Portal V20 Alarm Logging documentation for the full Unified workflow.
My alarm fires once but never clears. What is wrong?
The trigger mode is set to On rising edge only and the PLC bit stays at 1. Either change the trigger mode to On both edges and let the runtime auto-clear, configure a Status Tag that WinCC polls to clear the alarm, or implement a PLC-side routine that drops the bit after the operator acknowledges the alarm.