Overview
The WinCC Horn function is an audible alarm acknowledgement tool that plays a configured .wav file whenever a defined tag, message, or alarm priority is asserted. In a PCS 7 V9.0 SP3 environment running on top of WinCC 7.4 SP1, the horn is normally driven by the central Alarm Logging (ALG) subsystem and triggers on the standard alarm classes used by ALARM_8P, ALARM_8, NOTIFY_8P, and the operator-process-level block set (APL).
The default PCS 7 horn configuration is intentionally global: every WinCC client that is logged into the same server project receives the same sound event. Operators therefore commonly ask three follow-up questions that this reference addresses directly:
- Which tags or messages actually drive the horn output?
- How do you change the alarm priority that triggers the horn, or add new source tags?
- How do you limit the audible output to a single OS client (for example, the operator station in the control room) without affecting engineering or remote stations?
Prerequisites
| Component | Minimum Version | Notes |
|---|---|---|
| SIMATIC PCS 7 | V9.0 SP3 | Including Update 2 (HF2) for stable ALG behaviour on multi-client projects. |
| SIMATIC WinCC | 7.4 SP1 | Update 4 recommended; ships with PCS 7 V9.0 SP3. |
| AS block library | PCS 7 APL V9.0 | Provides ALARM_8P / NOTIFY_8P with priority 0..15. |
| OS Server / OS Clients | Server: WinCC 7.4 SP1; Clients: identical | Package must be compiled and downloaded after each horn change. |
| WAV file | PCM 8/16-bit, 22.05/44.1 kHz, mono, < 1 MB | Stored under \Siemens\WinCC\Media\<Project>\Horn\. |
| User right | WinCC Administrator or higher | Required to edit Alarm Logging and the Graphics Designer. |
Before changing horn settings, capture a full OS project backup (SIMATIC Manager → OS → Archive OS Project) so that you can roll back if an alarm route breaks.
How the WinCC Horn Is Wired Internally
The horn pipeline is event-driven and travels through three layers:
-
AS layer: An
ALARM_8Pblock raises a message with a defined priority (0 = highest, 15 = lowest in PCS 7 convention) and class (e.g.,Alarm, high). -
ALG layer: WinCC Alarm Logging receives the message via the S7 protocol. Each message row carries the priority, the trigger tag (default
_PRIORITY_or per-message binary tag), and the class. - Horn layer: The Horn attribute of Alarm Logging holds up to 16 source tags (one per priority). When any source tag goes to a non-zero value, the corresponding WAV is played on every WinCC client that has the Horn function enabled in its project.
In PCS 7, the source tags are auto-bound to the priorities of the standard message classes. This is why a fresh OS project sounds the horn automatically the first time you raise an alarm: all priorities are mapped by default.
Step-by-Step: Defining Which Tags Trigger the Horn
Step 1 - Open Alarm Logging
- Start WinCC Explorer on the OS server.
- In the left navigation tree, right-click Alarm Logging → Open.
- The ALG editor opens with the message configuration loaded.
Step 2 - Open the Horn Configuration Dialog
- In ALG, choose Tools → Horn from the menu bar.
- The Horn dialog opens. It contains a grid of 16 rows, one per priority (0..15), and per row an assignment of:
- Trigger tag (Boolean or integer)
- Sound file (
.wavpath) - Loop count
- Activation flag (enable/disable)
Step 3 - Map a Custom Trigger Tag
The trigger tag is any WinCC internal or external tag whose value change should sound the horn. Use the dialog's tag picker to bind your tag to a priority:
Tag name : MyPlant_Alarm_Critical
Data type : Binary Tag
Priority : 0 (highest in PCS 7)
Sound file : \Siemens\WinCC\Media\Horn\critical.wav
Loop count : 3
Enabled : [x]
Acknowledge : Operator must acknowledge in ALG message window
Step 4 - Choose Sound File and Loop Count
| Priority | Typical Class | Recommended WAV | Loop Count |
|---|---|---|---|
| 0 | Alarm, high (failure) |
critical.wav continuous tone |
3 |
| 1-3 | Alarm, high | high.wav |
2 |
| 4-7 | Alarm, medium | medium.wav |
1 |
| 8-11 | Warning | warning.wav |
1 |
| 12-15 | Tolerance / Info |
info.wav or none |
0 (disabled) |
Step 5 - Restrict Triggering to Selected Alarm Priorities
To prevent unwanted horn activation, disable entire rows in the Horn dialog by clearing the Enabled checkbox. The corresponding priority still produces visible ALG messages and the message line still flashes, but no sound plays:
- In the Horn dialog, clear the checkbox for priorities 8 through 15.
- Click Apply → OK.
- Compile the OS server and download the project to all clients.
This is the simplest mechanism for the engineer's original question: "How do I change the priority of alarms that are supposed to sound the horn?" The answer is that the Horn configuration table is the priority-to-sound mapping - you do not need to touch any block in the AS, only this table.
Step-by-Step: Adding Custom Source Tags as Triggers
Beyond alarm priorities, WinCC supports a second route: any tag in the project can be declared a Horn source. This is useful when an event is not an alarm (for example, a recipe validation failure, an operator-station heartbeat loss, or a SmartAlarm from PCS 7 Maintenance) but should still produce an audible notification.
- Create a binary or integer tag in the WinCC tag manager, for example
CustomHorn_RecipeError. - From your AS code, set this tag to
1for as long as the event is active; reset it to0when the operator clears it. - Open Tools → Horn in ALG.
- In the trigger-tag column of an unused priority row, browse to the tag and assign a short WAV file.
- Click Apply. The change is live after the next OS compile and download.
Source tags are an extension, not a replacement. They run in parallel to the alarm-priority-driven horn. The two are OR-combined: a sound plays if either path raises it.
Step-by-Step: Limiting Horn Playback to a Single Client
The standard horn is global. To restrict it to one client (for example, only the control-room OS, not the engineering station or remote maintenance client), use one of three approaches. The first is preferred because it stays inside the project standard tooling.
Approach A - Server-Side Horn, Client-Side Project Filter (Recommended)
- Disable the Horn on every client except the target client by unchecking Horn in the WinCC project properties on those clients.
- WinCC Explorer → right-click the project → Properties → Options tab.
- Clear the Activate Horn option on the engineering station and any non-target client.
- Save, compile, and download the project to each client independently.
This approach satisfies the user's question "is there a way to only have one client sounding the alarm?" without any scripting.
Approach B - Single Horn Tag With Per-Client VBScript Filter
When you cannot split the project configuration (for example, all clients load the same ES configuration), filter the audible output in the Graphics Designer with VBScript.
- Define a single WinCC internal binary tag
Horn_Triggerthat any alarm source sets to1. - On each client's start screen, add a VBScript action that runs once on
Open Pictureand again wheneverHorn_Triggerchanges value. - The script checks the local machine name and only plays the WAV on the matching client.
' Client-specific horn trigger script
' Place on start picture: Actions tab -> On Open
Const ALLOWED_CLIENT = "OS_CLIENT_01"
Dim sHostName
sHostName = HMIRuntime.Tags("@localMachineName").Read
If sHostName <> ALLOWED_CLIENT Then
' Do nothing on non-target clients
Exit Sub
End If
Dim oTrigger
Set oTrigger = HMIRuntime.Tags("Horn_Trigger")
If oTrigger.Read = 1 Then
HMIRuntime.Sound.Play "\\Siemens\WinCC\Media\Horn\alarm.wav", False
End If
Wire the script to the tag change event from Tag Logging → right-click Horn_Trigger → Event → VBScript → On Change. This delivers sub-second response on the target client and silent behaviour on all others.
Approach C - WinCC Scheduler Horn Suppression
If horn suppression must follow a shift calendar (for example, off during night-shift with no operators), use the WinCC Scheduler to write 0 to a global Horn_Enable tag and check that tag in your script before playing.
Verification
- Force an alarm from the AS (use SIMATIC Manager → AS → Online → Monitor/Modify on the
ALARM_8Pinstance to setAckto0). - Confirm the visible ALG message line shows the priority you configured.
- Listen for the WAV assigned to that priority on the target client only.
- On a non-target client, verify silence but identical visible alarm indication.
- Verify acknowledgement by clicking the alarm in the message window; the horn must stop within one loop.
- Capture screenshots and tag-trace dumps (
WinCC Channel Diagnosis) for the commissioning log.
Use the Alarm Logging runtime check Tools → Horn → Test to fire the WAV without a real alarm, useful during acceptance testing.
Troubleshooting Matrix
| Symptom | Likely Cause | Corrective Action |
|---|---|---|
| Horn never plays on any client | Horn disabled in WinCC project properties | Re-enable on the OS Server / OS Client project → Properties → Options → Activate Horn |
| Horn plays only on the server, not on clients | Horn disabled in client project | Open WinCC Explorer locally on the client and enable Horn, then reload the project |
| Horn plays on every client including engineering station | Horn enabled globally, no client filter | Apply Approach A (disable on non-target) or Approach B (script with @localMachineName) |
| Wrong priority plays the wrong sound | Tag assigned to wrong row in Horn dialog | Re-map trigger tag; verify priority mapping against the table above |
| Sound cuts off mid-alarm | Loop count set to 0 or WAV format unsupported | Re-encode WAV to PCM 16-bit, 44.1 kHz, mono; set loop count to a positive integer |
| Alarm visible but no horn despite enabled row | AS not raising the configured priority class | Check ALARM_8P / NOTIFY_8P instance parameters in the AS; confirm EV_ID matches the ALG message number |
| Horn script fires on the wrong client after maintenance swap | Hard-coded computer name in script | Replace constant with a configurable internal tag, e.g., Horn_Allowed_Client, and re-deploy |
| "Sound device busy" runtime error | Multiple overlapping sound calls | Centralise sound playback through one cyclic script; cancel previous plays via HMIRuntime.Sound.Stop
|
Performance and Licensing Notes
- Each WinCC client uses a Windows sound device handle for horn playback. Limit concurrent loop counts to 3 to avoid audio-driver contention on Windows Server 2016 / 2019.
- For multi-monitor stations, the WAV plays through the default Windows audio endpoint. Map the operator's preferred output via the Windows Sound control panel.
- PCS 7 V9.0 SP3 ships an updated ALG with deduplicated message rows; this prevents the same priority from firing the horn twice within 250 ms.
- If the project uses redundancy (OS Server A / B), configure the Horn identically on both servers to keep operator experience consistent during failover.
Reference Parameters and Interfaces
| Object | Path / Interface | Used For |
|---|---|---|
| Horn dialog | WinCC Explorer → Alarm Logging → Tools → Horn | Priority to WAV mapping |
| @localMachineName | Internal tag, read-only | Client hostname in VBScript |
| HMIRuntime.Sound | VBScript object | Programmatic WAV playback |
| ALARM_8P / ALARM_8 | APL block | Raises priorities 0..15 |
| NOTIFY_8P | APL block | Operator information (lower-priority) |
| EV_ID | Block parameter | Links AS event to ALG message number |
| MS_HORN_STATE | WinCC internal status tag | Active horn state per client |
For full reference on the Horn function as documented in WinCC Help, see the WinCC 7.4 SP1 Information System under Working with WinCC → Alarm Logging → Configuring the Horn. A practical guide also ships with PCS 7 V9.0 SP3 as PDF "PCS 7 - Configuring the Horn" on the Siemens Industry Online Support portal; search entry ID 109792585 for the canonical Siemens-hosted reference.
Best-Practice Checklist
- Document the priority-to-WAV mapping in the OS Functional Specification.
- Keep one and only one trigger tag per priority row.
- Use the same WAV file set across OS Servers for failover consistency.
- Test horn playback after every OS compile; a stale client can break Horn silently.
- Validate the client-filter script with a hostname swap before handover.
- Store WAV files in the project folder (not a personal drive) so the package is portable.
FAQ
What is the simplest way to specify which tags or alarms sound the WinCC horn?
Open Alarm Logging on the OS server, choose Tools → Horn, then in the 16-row grid assign trigger tags and WAV files per priority. Clear the Enabled checkbox on any priority you want silent. Save, compile, and download the OS.
Can I add a custom tag as a horn source without using the ALARM_8P block?
Yes. Create a binary WinCC tag, set it from your AS or script when the event occurs, then bind it to an unused priority row in the Horn dialog. The source tag fires in parallel with alarm-priority-driven triggers (logical OR).
How do I limit the horn so only one client (for example, OS_CLIENT_01) plays the sound?
Either disable the Horn in WinCC project properties on every other client (Approach A), or use VBScript with HMIRuntime.Tags("@localMachineName").Read to gate HMIRuntime.Sound.Play calls on the target client only (Approach B). Both approaches work in PCS 7 V9.0 SP3 / WinCC 7.4 SP1.
Does the horn run on the engineering station as well?
By default yes, unless you clear the Activate Horn option in the ES project properties. For commissioning convenience, disable horn on the ES first and re-enable only on the target operator client.
Why does the horn not stop after the operator acknowledges the alarm?
Confirm that the ALARM_8P / ALARM_8 instance is correctly wired with its EV_ID to the ALG message row and that Ack processing clears the trigger tag. In the Horn dialog, reduce the loop count if multiple loops overlap the acknowledgement moment.