Problem Statement
An S7-300 PLC reports a mix of alarm severities to a TP2200 Comfort HMI engineered in TIA Portal V12/V13 with WinCC Comfort/Advanced. Discrete alarm bits are configured and the alarm view displays them correctly, but the order in the runtime is strictly chronological. A temperature-limit alarm that arrives 5 minutes after a low-pressure fault is rendered above the low-pressure fault, even though the operator must see the low-pressure fault first. The required behavior is to display alarms grouped by class, with the most critical class always on top, and to use time only as the secondary sort key within a class.
This article documents the configuration path to achieve that behavior on a TP2200 Comfort panel, including the limits of the chronological default, how to create and order user-defined alarm classes, and how the WinCC alarm view combines class priority with time-of-occurrence in runtime.
Prerequisites
| Item | Required Version / Model | Notes |
|---|---|---|
| Engineering software | TIA Portal V12 SP1 / V13 (or later) with WinCC Comfort or WinCC Advanced installed | V12 SP1 was the first release that supports the TP2200 Comfort panel. V13 SP1 adds per-class priority and additional state-machine properties. |
| HMI runtime device | TP2200 Comfort (catalog number 6AV2 124-1MC01-0AX0 or equivalent) with a Comfort firmware image matching the TIA project version | Image / TIA version mismatches cause compile errors at the "Compiling and downloading to target device" step. Refer to the panel's Product Support page for the latest compatibility list. |
| PLC | SIMATIC S7-300 (any CPU with PROFINET, MPI or PROFIBUS to the panel) | Alarms are typically triggered by bits the CPU sets in the process image, a data block, or bit memory; the HMI polls the tag and raises the alarm on a 0-to-1 (or 1-to-0) edge. |
| Tag configuration | HMI tags already defined in the TIA project and linked to the PLC | The same tag can drive more than one alarm of different classes (e.g. 80 °C warning, 95 °C fault). |
| User rights | Operator logged in with the right to acknowledge alarms | Required only to test the acknowledgment model. The configuration itself does not require elevated rights. |
WinCC Alarm Architecture Overview
WinCC Comfort / Advanced organises runtime alarms into three orthogonal structures:
- Alarm class — determines the visual style (icon, foreground and background color), the acknowledgment model, and the default priority of every alarm assigned to it. The class also controls how the alarm behaves in the audit / non-logged runtime (NLR) buffer.
- Alarm — a single event (discrete / bit-triggered, analog-limit, or PLC-reported) with its text, tag trigger, and a reference to one alarm class.
- Alarm view / alarm line / alarm window — the visualization. The view receives alarms from all classes; the class controls the order in which they are displayed.
According to the Siemens TIA Portal help, "in addition to the acknowledgment behavior, when creating a new alarm class, you define the default priority of alarms of this alarm class." Useful information on alarms — TIA Portal documentation. This priority is the property the runtime uses to order the alarm buffer.
Alarm Class Priority Model
The WinCC alarm class is a categorical priority, not a numeric one in the runtime. The class list shown in the project tree is ordered from "most important" (top) to "least important" (bottom). The runtime sorts the alarm buffer first by that order and then by the time the alarm came in (chronological within the same class).
| Predefined class (WinCC) | Default acknowledgment | Typical use |
|---|---|---|
| Errors | With single acknowledgment | Hard faults that stop the process and require operator intervention. |
| Warnings | Without acknowledgment | Process deviations the operator should see but not clear. |
| System | Project-dependent | Diagnostic alarms, lifecycle events, license errors. |
| Diagnostic events | Without acknowledgment | Auto-clearable diagnostic messages from S7 CPUs. |
| Operator input messages | Without acknowledgment | Audit trail of operator actions. |
User-defined classes inherit the same model: each carries an acknowledgment model, color / icon and a display priority. The classes are listed in the project tree under HMI alarms > Alarm classes in the order the runtime uses to sort.
For comparison, some non-Siemens SCADA packages expose per-tag numeric priority. AVEVA InTouch, for example, defines an alarm priority of 1–999 with 1 being the most severe (see the AVEVA InTouch alarm priorities documentation). WinCC on a TP/Comfort panel does not use that model; priority is set per class, not per individual alarm value, and the runtime sort is categorical.
Alarm Visualization Controls
Three different controls consume the alarm buffer; each has slightly different behavior with respect to priority sorting.
| Control | Capacity | Sort behavior | Typical placement |
|---|---|---|---|
| Alarm view | All active alarms, optionally filtered by class | Sorted by class then by time. Operator can usually change the sort column. | Full-screen or page-level overview on the alarm screen. |
| Alarm line | One line; the most recent / highest-priority active alarm | Always shows the highest-priority active alarm. The first alarm of the top-most class in the project tree wins. | Persistent header on every screen of the project. |
| Alarm window | Pop-up; configured count of lines (typically 5–20) | Same sorting rules as the alarm view, with a "pop" animation on new entry. | Modal overlay triggered by class or by event. |
When the field report reports "only last error in the first line of error or alarm in the view" and the desired behavior is "important Alarm group (group : ID 1 to 99) first line", the fix is to put the group in its own class and put that class at the top of the list — both the alarm line and the alarm view then pick that class first.
Configuring Alarm Class Priority — Step-by-Step
The class ordering in the project tree is the runtime sort order. To put a "temperature" class above a generic "warning" class, you do not assign a numeric value — you move the class up or down the list. The procedure:
- In the TIA project tree, expand the HMI device (TP2200) and open HMI alarms > Alarm classes.
- Right-click Alarm classes and choose Add new alarm class. Give it a name (for example,
FaultsorTemperature alarms). Avoid names longer than 24 characters; the alarm line truncates them. - Select the new class and, in the inspector pane, set the properties:
- Name — operator-visible name (used in the class column of the alarm view).
- Display name — text shown in the alarm view's class column when localized.
- Default acknowledgment — With single acknowledgment, With always acknowledgment, or Without acknowledgment. The choice is the only way to express "this class does not require operator clear" in the runtime.
-
Background color / text color / icon — pick colors so the operator can identify the class at a glance (red for
Faults, amber forWarnings, cyan forInfo). - State machine — leave at default unless the project is integrated with a non-Siemens MES connector (then set to With state machine).
- Drag-and-drop the class in the project tree so the most important class is at the top of the list. The runtime uses the list order, not the order of creation, to sort.
- If a class is no longer required, do not delete it if any alarm still references it. Right-click the class, choose Find > Cross-references, re-assign each referencing alarm to a valid class, then delete.
Example: Three-Class Priority Stack for a Heating Process
| Class order (top = highest) | Name | Acknowledgment | Background | Sample alarm text |
|---|---|---|---|---|
| 1 | Faults | With single acknowledgment | Red | "Boiler low pressure" |
| 2 | Warnings | Without acknowledgment | Amber | "Outlet temperature above 80 °C" |
| 3 | Information | Without acknowledgment | Cyan | "Filter cleaning due in 50 h" |
With this order, "Boiler low pressure" stays at the top of the alarm view until acknowledged, even if 50 warnings arrive in the meantime.
Assigning Alarms to the Correct Class
With the class list ordered correctly, every alarm's "Alarm class" property must be set to the class that matches its severity. The procedure:
- Open HMI alarms > Discrete alarms (for bit-triggered alarms) or Analog alarms (for limit-triggered alarms).
- Select an alarm.
- In the inspector, set Alarm class to the correct class (e.g.,
Faultsfor the temperature alarm,Warningsfor the informational one). - Verify the Priority field on the alarm — it should be inherited from the class default. If you need to override for a single alarm, raise the priority value (a higher number moves the alarm up in the buffer, but only relative to other alarms in the same class).
- Use Edit > Find and replace with the filter "Alarm class = Faults" to bulk-modify the priority of every fault alarm if you change the class default after the alarms have been created.
A single PLC tag can drive more than one alarm of different classes. For example, the same temperature word can fire both a Warnings analog alarm at 80 °C and a Faults alarm at 95 °C. The runtime raises both events; the Faults one is shown above the Warnings one because its class is higher in the list.
S7-300 Side: Trigger Sources for HMI Alarms
On the S7-300 side, three trigger sources are commonly used with WinCC alarms. None of them require a special S7 function block; the HMI detects the trigger and raises the alarm.
| Trigger source | How it works | When to use |
|---|---|---|
| Bit in the process image or in a data block | The HMI polls a Boolean tag; on a 0-to-1 edge, the discrete alarm is raised. | Most common. Use DB bits for clarity and cross-referencing. |
| Analog limit on a tag | The HMI polls an Int / Real tag; when the value crosses the configured limit, the analog alarm is raised. | Process values such as temperature, pressure, level. |
| Programmed S7 alarm (SFB / SZL) | S7 raises an alarm using SFB33 / SFB34 / SFB35; the HMI displays it through the integrated "S7 diagnostics" alarm class. | CPU fault, module removal, rack failure. These are typically routed to a separate "System" class. |
Example DB layout for a small heating process:
DATA_BLOCK "HMI_AlarmsDB"
STRUCT
bLowPressure : BOOL; // Faults class
bHighTemp : BOOL; // Faults class
bFilterDue : BOOL; // Warnings class
bServiceHoursOK : BOOL; // Information class
rTemperature : REAL; // analog input for limit alarms
END_STRUCT
END_DATA_BLOCK
Bind bLowPressure to a discrete alarm of class Faults, bFilterDue to a discrete alarm of class Warnings, and bind rTemperature to two analog alarms (one at 80 °C of class Warnings, one at 95 °C of class Faults).
Configuring the Alarm View Sort Order
The alarm view does not have a separate "sort by class" setting — it inherits the class order from the project. Two view properties are commonly mis-set and break the desired sort:
- Sort column — must be the "Alarm class" column, not "Time". If the operator can change the sort column at runtime, the chronological view will return as soon as the column is clicked.
- Sort order — ascending order shows the highest-priority class on top of the buffer (because the class names are ordered by their project order, not by display name).
To make the priority sort the only one the operator can use:
- Open the HMI screen that contains the alarm view.
- Select the alarm view and, in the inspector under Properties > Columns and bars, confirm that the Alarm class column is the first column, and that the Allow operator change check is cleared for that column.
- Under Properties > Sort, set the sort to Alarm class, ascending, and clear Allow operator change.
- Set Properties > Selection > Filter to All if every class should be visible. If a separate view per class is required, use a filter expression that references the class name (e.g.,
'Alarm class' = "Faults").
Configuration Script for the Alarm View
The following VBScript can be placed in the screen's "Open" event to enforce the priority sort, override any operator change, and pin the class column to position 0:
Sub Screen_OnOpen()
Dim objView
Set objView = Screen.Items("AlarmView1")
objView.SortColumn = 1 ' 1 = Alarm class column (index 0)
objView.SortDirection = 0 ' 0 = Ascending (highest-priority class first)
objView.AllowSortChange = False
objView.AllowColumnChange = False
objView.Columns(0).Visible = True
objView.Columns(0).Width = 120
objView.Columns(0).AllowResize = False
End Sub
Special Case: Custom Class Without Acknowledgment
A frequent request is a class that shows before the Faults and Warnings classes but does not require acknowledgment — for example, a "Multiple active alarms" summary banner. WinCC supports this; the procedure is:
- Create the new class (e.g.,
Info banner) with Default acknowledgment = Without acknowledgment. - Move it to the top of the alarm class list in the project tree.
- Assign the summary alarm to that class.
- Verify in runtime that the banner appears on the first line of the alarm view without forcing an acknowledgment.
The "without acknowledgment" property prevents the operator from having to clear the banner before the underlying faults and warnings become the focus. Do not give the banner class an acknowledgment model that is stricter than the classes beneath it; the runtime will let the operator clear it, but the underlying fault will still be the first non-cleared entry in the buffer.
Logging and Long-Term History
For applications that require alarm history beyond the panel's volatile buffer, configure a log on the HMI side:
- Open HMI logs > Alarm logs.
- Add a new alarm log; give it a name and choose the storage path (SD card on the TP2200, or a network share if a UPS-backed path is available).
- In the log's properties, enable the Logging mode for every alarm class that must be persisted (typically
FaultsandWarnings;Informationis usually kept volatile to limit file growth). - Set a retention policy: Number of segments × Size per segment should not exceed the storage capacity. On an SD card of 4 GB this is rarely a constraint, but on a 512 MB card, limit to 2 segments of 50 MB.
The runtime records an entry to the log on every state transition (raised, cleared, acknowledged). The class is preserved in the log, so the priority sort can be re-applied when the log is replayed in the alarm view by setting the alarm view to "Source = Log" and the sort column to "Alarm class".
Verification and Runtime Test
After downloading the project to the TP2200, verify the sort order with a controlled trigger sequence:
- Start Runtime on the panel (or in the TIA PLCSim / PLCSim Advanced HMI simulation).
- Force a low-severity alarm (e.g., the
WarningsbitbFilterDue) and wait 30 s. - Force a high-severity alarm (e.g., the
FaultsbitbLowPressure). - Open the alarm view. The
Faultsentry must be on the top line; theWarningsentry must be below it, even though the warnings bit was raised first. - Clear the high-severity alarm (acknowledge or reset the bit). The
Warningsentry should move to the top because it is now the highest-priority class still active. - Trigger an analog limit on the
Warningsclass (e.g., raiserTemperatureto 85 °C). The warning should appear below the fault, even if the fault occurred 10 minutes earlier. - If the order is wrong, the most common cause is the alarm view's "Sort column" property being set to "Time" instead of "Alarm class", or the class list in the project tree not being in the desired order.
Acceptance Criteria
| Test | Expected result | Pass criterion |
|---|---|---|
| Trigger Warnings, then Faults (Faults 30 s later) | Faults at top of alarm view | Top line shows class = Faults. |
| Acknowledge the Faults alarm | Warnings moves to top | Top line shows class = Warnings. |
| Trigger three Faults of different priorities within the same class | Faults sorted by time-of-occurrence | Top line is the most recent Faults entry. |
| Power-cycle the panel | Volatile buffer is cleared, log (if enabled) is replayed in priority order | Alarm view shows the same priority order as before the cycle. |
| Trigger an Info banner alarm | Banner shown on top without acknowledgment | Top line is class = Info banner, no "ack" button pressed. |
Troubleshooting Matrix
| Symptom | Likely root cause | Corrective action |
|---|---|---|
| Alarms are always sorted by time, class order ignored | Alarm view "Sort column" is set to "Time", or the operator has changed the sort at runtime | Set the alarm view sort to "Alarm class" and disable the operator change. Confirm the class is at the top of Alarm classes in the project tree. |
| New alarm class does not appear in the alarm view | The view is filtered to a specific class | Open the view's Selection > Filter property and set it to All (or include the new class in the expression). |
| Alarm class priority field is greyed out | The project was created in TIA V12 with a class that does not have a "Priority" property | Upgrade the project to V13 SP1 or later, or override the priority on the individual alarm. |
| Compile error: "Alarm class X is referenced but not defined" | An alarm still references a class that was renamed or deleted | Use Find > Cross-references on the missing class name and re-assign each alarm to a valid class. |
| Class order in runtime is the reverse of the project tree | The alarm view's "Sort order" is set to "Descending" | Set the view's sort order to "Ascending". |
| Alarms in the same class appear out of order | Each alarm was given an individual priority value that overrides the class default | Reset the individual alarm priorities to the class default (select all alarms in the class, reset in the inspector). |
| Acknowledgment is required for a class that should be "Without acknowledgment" | The class was created inheriting the system class acknowledgment model | Open the class inspector and explicitly set "Default acknowledgment" to "Without acknowledgment". |
| Alarm line shows the wrong class on a remote page | The alarm line is configured to a specific class instead of "All classes" | Set the alarm line's "Alarm class" property to "All". |
| TP2200 only shows the last error on every page | Only the alarm line (one line) is visible on every page, with the alarm view only on the alarm page | Add a separate alarm line for the highest-priority class and a full alarm view on the alarm page. Configure each with the correct class filter. |
| Color/icon is not visible on the panel | Project was edited in V13 and then opened in V12; V12 strips extended properties | Re-open in V13, re-apply the color and icon, re-download to the panel. |
Frequently Asked Questions
Does the alarm class priority in WinCC work the same way as numeric priority in AVEVA InTouch?
No. AVEVA InTouch uses a numeric per-tag priority (1–999, with 1 being the most severe). WinCC on a TP/Comfort panel uses a categorical priority set on the alarm class; the runtime sorts by class order, not by a numeric value (see the AVEVA InTouch alarm priorities documentation for the contrast).
Can I reorder alarm classes in the project tree to change the runtime priority?
Yes. The runtime uses the class list order in the project tree (top = highest priority). Drag-and-drop reorders them; no rebuild is required, but the project must be re-downloaded to the panel for the new order to take effect.
Why is the priority field of an alarm greyed out in TIA V12?
TIA V12's alarm class does not expose a per-class priority property. You can still set the individual alarm's "Priority" field, or upgrade to TIA V13 SP1 or later to expose the class default and override behavior.
How do I make a summary alarm appear above all faults without forcing acknowledgment?
Create a new alarm class with "Default acknowledgment" set to "Without acknowledgment", move it to the top of the class list, and assign the summary alarm to it. The runtime will display it on the first line and the operator will not be required to clear it before faults and warnings become the focus.
Will changing the alarm class default priority push the new value to existing alarms?
No. The class default priority is copied into each alarm at creation time. After changing the class default, you must update the "Priority" property on each alarm manually, or use Edit > Find and replace with a filter on the class name to apply the new default in bulk.
Can a single S7-300 tag drive two alarms of different classes?
Yes. Define two alarms that reference the same HMI tag (or two analog limits on the same word) and assign them to different alarm classes. The runtime will raise both events and the higher-class one will appear on top of the alarm view.