Configuring Alarm Annunciator Tags in WinCC Professional TIA

David Krause11 min read
HMI / SCADASiemensTutorial / How-to
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

Overview

In WinCC Professional and WinCC RT Professional (the TIA Portal runtime generation), an alarm annunciator is the field-level signalling device that is driven when an alarm becomes active. The WinCC manual describes it generically as “a horn, or a warning lamp,” meaning a Boolean output the HMI sets while the alarm is in the active state and clears when the alarm is acknowledged or becomes inactive. The classic implementation in WinCC Flexible 2005 / 2008 allowed a script to be bound to the OnAlarmAppearing or OnAlarmAcknowledged event of a tag, which is how engineers historically wrote to a PLC output (e.g. Q2.6) to flash a stack light. That direct tag-event model is not exposed the same way in WinCC Professional / TIA Portal V15 and later, and is one of the most common causes of confusion when porting an existing WinCC Flexible project forward.

This reference documents the supported configuration path in TIA Portal V20 / WinCC RT Professional for the same outcome, and captures the workarounds that engineers use in the field when they must wire an annunciator to a discrete output.

Prerequisites

  • TIA Portal V17, V18, V19, or V20 with the WinCC Professional option installed. The behavior described in the Siemens documentation (see Alarm Logging in WinCC (RT Professional)) is identical across these versions for the annunciator features.
  • An HMI device of type PC-System (WinCC RT Professional) or a Comfort/Advanced Panel running the equivalent RT Advanced runtime. The annunciator bit itself is a client-side signal; it is not visible in WinCC Basic panels.
  • An HMI tag of type Bool that is connected to a PLC output point (for a lamp) or to a soft output that the PC will route to a sound card (for a horn). The tag address follows the standard WinCC syntax, e.g. %DB5.DBX10.0 for an S7-1500 DB bit, or a symbolic PLC tag.
  • An alarm class defined in the HMI alarms editor that supports the desired acknowledgment model (single, multi, no acknowledgment).
  • For audible annunciators: a .wav file (16-bit PCM, 22.05 kHz or 44.1 kHz mono is the safest format) deployed to the runtime project directory.

How the Annunciator Bit Is Driven in WinCC Professional

The conceptual change between WinCC Flexible and WinCC Professional is small but important. In WinCC Professional the annunciator is not a free-floating event handler on a tag; it is a property of an alarm class binding. When an alarm is raised, the runtime evaluates the alarm class configuration and, for the configured annunciator, sets the bound HMI tag to TRUE for as long as the alarm is in the came in / active state. The tag is reset when:

  1. The alarm is acknowledged (single acknowledgment) and the alarm class is configured as acknowledging.
  2. The alarm goes out (clears) and the Auto-clear option of the alarm class is set.
  3. The alarm is removed by an operator action on the alarm view.

This is the documented behavior in Configuring acknowledgment of the alarm annunciator (RT Professional) and Acknowledging an alarm annunciator (RT Professional).

Step-by-Step Configuration

Step 1 — Declare the HMI tag for the annunciator

  1. In the TIA Portal project tree, expand your HMI_RT_1 (or PC-System) and open HMI tags.
  2. Create a new tag, e.g. HMI_Annunciator_Horn of type Bool. For a lamp create a second tag HMI_Annunciator_Lamp_Q2_6.
  3. Connect each tag to the PLC symbolic address (e.g. "HMI_Horn" → %DB_HMI_Audio.X0.0 in the S7-1500).
  4. Set the acquisition cycle to 500 ms or 1 s. Faster cycles (100 ms) on annunciator tags waste CPU and risk flicker if the alarm clears/returns in the same scan window.

Step 2 — Configure the alarm class with the annunciator

  1. Open HMI alarms → Alarm classes in the project tree.
  2. Select the alarm class you want to use (typically Errors with acknowledgment) and switch to the Properties inspector.
  3. Under General, enable Use as annunciator. The dropdown now exposes the annunciator tag and the acknowledgment model.
  4. Pick the HMI tag (e.g. HMI_Annunciator_Horn) from the Tag dropdown. The tag is set to TRUE while any alarm of this class is active.
  5. Set Acknowledgment model to one of:
    • Single acknowledgment — the annunciator is reset by acknowledging the visible alarm row in the alarm view.
    • Acknowledgment with flash — same as above, but the tag is held TRUE until the alarm is fully cleared, not just acknowledged.
    • No acknowledgment — the tag follows the raw active/inactive state of the alarm.

Step 3 — Tie the alarm to the class

  1. Open the HMI alarms editor and create or edit the discrete alarm that should drive the annunciator.
  2. In the alarm’s Properties inspector, set Alarm class to the class you configured in Step 2 (e.g. Errors - With Horn).
  3. Confirm the Trigger tag is the bit that mirrors the process state (e.g. MotorOverload).

Step 4 — Build and load

  1. Compile the HMI station (right-click HMI_RT_1 → Compile → Software (all)).
  2. Download to the target PC or panel.
  3. In Runtime, simulate the trigger tag and confirm the horn tag goes high and the lamp is energized on the PLC output (e.g. Q2.6).

Alarm Class — Annunciator Parameter Mapping

Property Default Value for Horn Value for Lamp
Name Errors Errors_horn Warnings_lamp
Acknowledgment Without With With (single)
Use as annunciator No Yes Yes
Annunciator tag — HMI_Annunciator_Horn HMI_Annunciator_Lamp_Q2_6
Color / state Red Red, flashing Yellow, steady
Plc acknowledge tag — HMI_PlcAck_Horn HMI_PlcAck_Lamp
Auto-clear on ack No Yes No

Audible Annunciator Implementation (Horn)

WinCC RT Professional does not include a built-in sound card driver. To get an audible horn you need one of the following:

  1. PC audio output — bind a VBScript (or C-script in older builds) to the alarm class's Loop / Appearing event and call CreateObject("SAPI.SpVoice") or PlaySound with a .wav file. This is the path described in legacy WinCC V7.0 documentation (FAQ entry 24845318).
  2. PLC-driven horn — assign the annunciator tag to a real PLC output (e.g. %Q2.6) and let the physical horn be energized by a 24 V coil driven through a relay. The HMI simply sets the bit, the PLC routes the power.
  3. Third-party OPC bridge — expose the alarm state via the WinCC OPC UA server and let an external SCADA or audio device subscribe. Useful when the same horn must react to alarms from multiple HMI stations.
Important: A .wav file deployed with the project is the most reliable option; ensure it is PCM 16-bit, 22.05 kHz, mono. Compressed .mp3 cannot be played by the WinCC PlaySound API. The file must be copied to the runtime directory before the project is started, typically C:\Program Files\Siemens\Automation\WinCC RT Professional\<ProjectName>\.

Workaround When the Annunciator Tag Must Be Forced (Legacy Projects)

If you are migrating a WinCC Flexible 2005 faceplate that used the OnAlarmAppearing event of an HMI tag to set Q2.6, and you cannot use the alarm-class annunciator path (for example, the bit is driven by a calculated value, not a discrete alarm), the documented workaround in TIA Portal is to use a scheduled task with VBScript:

' Scheduled task: 250 ms cycle
' Forces Q2.6 to follow the highest-priority active alarm
Dim alarmCount
alarmCount = SmartTags("MyAlarmCounter")
If alarmCount > 0 Then
    SmartTags("HMI_Annunciator_Lamp_Q2_6") = True
Else
    SmartTags("HMI_Annunciator_Lamp_Q2_6") = False
End If

The script can be attached via HMI_RT_1 → Scheduled tasks → New. The cycle must be at least 250 ms to avoid overloading the WinCC task scheduler on PC stations.

Verification Procedure

  1. Start the runtime in RT Professional with the alarm simulation enabled (Tools → Simulate tags).
  2. Force the trigger tag to TRUE. The annunciator HMI tag must change to TRUE within one acquisition cycle.
  3. Confirm the bound PLC output (e.g. Q2.6) is energized in the S7-PLCSIM or the real CPU.
  4. Click Single acknowledgment in the alarm view (see Acknowledging an alarm annunciator (RT Professional)). The annunciator tag must return to FALSE.
  5. Force the trigger tag to FALSE. The tag must remain FALSE; the alarm should auto-clear if Auto-clear on acknowledgment is set.
  6. Trigger the alarm a second time to confirm deterministic repeatability of the sequence (acknowledge → clear → re-arm → acknowledge).

Troubleshooting Matrix

Symptom Likely cause Fix
Annunciator tag never goes TRUE Alarm class not set to Use as annunciator Re-check alarm class properties; the tag field is greyed out if not enabled
Tag goes TRUE but PLC output Q2.6 stays off HMI tag not connected to PLC tag, or wrong symbolic address Verify connection in HMI tags → Properties → PLC tag; rebuild and re-download
Tag stays TRUE forever Acknowledgment model is No acknowledgment and alarm has not cleared Switch to Single acknowledgment or fix the trigger condition so the alarm can clear
Tag flickers at 2 Hz Multiple alarms of the same class are coming and going Use a derived alarm class that ORs the conditions, or set a debounce time on the trigger tag
No audible sound despite WAV configured WAV file in wrong location or compressed format Re-deploy as 16-bit PCM, copy to the project runtime directory, restart the runtime
Acknowledge button has no effect Operator authorization insufficient; alarm class set to No acknowledgment Grant Operator or higher rights; verify the alarm class in the HMI alarms editor
Annunciator triggered but no row appears in alarm view The alarm is suppressed by an alarm group filter Open the alarm view properties, remove the filter, and verify the alarm shows in All alarms
Ported project from WinCC Flex shows compile warning "Event handler on tag not supported" Legacy OnAlarmAppearing script cannot be ported directly Replace the event script with an alarm class annunciator or a scheduled task (see workaround above)

Edge Cases and Field Notes

  • Multiple annunciators, one alarm: WinCC Professional allows one annunciator tag per alarm class. If a single alarm must drive two physical devices (e.g. a horn and a beacon), either create a second alarm class pointing to the second tag, or use a small VBScript that mirrors the first tag onto the second.
  • Annunciator on a tag that is not discrete: The annunciator bit must be Bool. If the source is a real value (e.g. an analog threshold), use a derived Discrete alarm with a trigger bit that goes true on threshold crossing; the trigger bit then drives the annunciator class.
  • Redundant HMI stations: With WinCC RT Professional in a redundant server pair, the annunciator bit is generated on the server that owns the active alarm. The partner server does not raise the horn — by design, to avoid double triggering of the physical device.
  • PC audio vs. PLC-driven horn: For SIL/IEC 61508 plants, the audible annunciator must be driven by the safety PLC output, not by the HMI sound card. Use the annunciator tag as a command to the safety output only when the HMI is the sole operator interface for the SIS.
  • Audit trail: Every state change of the annunciator tag is written to the alarm log when the bound alarm is configured with Logging enabled. This is the cleanest way to prove to an auditor that the horn was raised and acknowledged.

Migration Checklist (WinCC Flexible → WinCC Professional)

  1. Inventory every OnAlarmAppearing / OnAlarmAcknowledged script in the legacy project.
  2. Map each script to one of: annunciator class, scheduled task, or PLC logic.
  3. Delete the script and create an Alarm class with the equivalent annunciator tag.
  4. Re-bind every alarm that referenced the legacy script to the new class.
  5. Compile, download, and run the verification procedure above.
  6. Update the FDS (Functional Design Specification) to reflect the new alarm class names.

FAQ

Where exactly do I bind the annunciator tag in TIA Portal for WinCC Professional?

Open HMI alarms → Alarm classes, select the class, and in the Properties inspector enable Use as annunciator. The bound HMI tag (a Bool) is the one the runtime sets to TRUE whenever an alarm of that class is active. The path is documented in Configuring acknowledgment of the alarm annunciator (RT Professional).

Why can I no longer bind a VBScript directly to an HMI tag in WinCC Professional as I did in WinCC Flexible?

WinCC Professional moved the alarm-event scripting from a per-tag event handler to a project-wide scheduled task or alarm-class binding. The OnAlarmAppearing attribute on an HMI tag was removed when the runtime engine was re-architected for the TIA Portal Unified generation. The recommended replacement is an alarm class with an annunciator tag, or a scheduled task running a VBScript that mirrors the trigger.

How do I make the horn stop after the operator acknowledges the alarm?

Set the alarm class Acknowledgment model to Single acknowledgment and tick Auto-clear on acknowledgment. The annunciator tag is then driven to FALSE the moment the operator clicks Single acknowledgment in the alarm view, as described in Acknowledging an alarm annunciator (RT Professional).

What acquisition cycle should I use for the annunciator HMI tag?

Use 500 ms or 1 s. Cycles faster than 250 ms cause unnecessary load on the WinCC scheduler and produce visible flicker on a lamp that is wired to a 24 V relay coil, which can weld the contacts over time.

Can the annunciator bit be a Word or Int instead of Bool?

No. The annunciator binding requires a Bool HMI tag. If your PLC needs a multi-bit code (e.g. 16-bit annunciator word with bit 0 = horn, bit 1 = lamp), use a scheduled VBScript that maps the boolean alarm-class tag onto the individual bits of a Word HMI tag, or expose the bits as separate boolean tags and bind each one to a distinct alarm class.

Back to blog