Overview
SIMATIC TP1200 Comfort panels running on TIA Portal accept three principal alarm categories: discrete alarms, analog alarms, and controller (system) alarms. Discrete alarms are bit-triggered events; they fire when a specific bit inside a configured trigger tag transitions to a defined state. Analog alarms are limit-value events evaluated on a numeric tag. Controller alarms are generated automatically by the SIMATIC S7-1500 or ET200S CPU for system diagnostics such as module faults or rack errors.
This article targets the most common source of confusion: a project where the controller exposes a multi-state variable (an INT or WORD that holds a process code) and the engineer wants a separate alarm message for each state. Discrete alarms can only be bound to a single bit of a trigger word, but the trigger word itself can be an INT, WORD, or DWORD - the HMI does not care about the data type's full width, only the bit you select. The remainder of this reference walks through the configuration, explains the bit-selection rule, and shows how to derive one alarm per process state.
Prerequisites
Before configuring discrete alarms, verify the following project assets exist:
- TIA Portal project with the ET200S station and the TP1200 HMI device added to the same project. The HMI must be connected to the PLC through a PROFINET or PROFIBUS connection in "Devices & Networks".
- PLC tags accessible on the HMI. In the TP1200's HMI tags table, the trigger variable must be defined as an HMI tag with the same name and data type as the PLC tag, or be linked through a direct PLC tag reference (recommended for S7-1500/ET200S).
- Alarm class assigned in the HMI alarm configuration. Out-of-the-box, TIA Portal provides Errors, Warnings, and System; user-defined classes can be added (for example, ProcessCritical, ProcessInfo) with custom acknowledge requirements.
- HMI runtime authorization. The user group running the alarm view must have at least the "Operate" permission on the alarm class. Edit user administration under "Runtime Settings > Users and Roles" if acknowledgement is required.
Hardware reference for the ET200S CPU is the SIMATIC ET 200S manual collection; the TP1200 Comfort is documented in the SIMATIC HMI TP1200 Comfort operating instructions. Alarm configuration rules are covered in the TIA Portal online help under "Configuring alarms > Discrete alarms".
Alarm Types in TIA Portal HMI Runtime
The WinCC Comfort/Advanced runtime distinguishes the alarm sources shown below. Choosing the wrong source for a use case is the most common configuration error.
| Alarm type | Trigger variable | Evaluation | Typical use |
|---|---|---|---|
| Discrete alarm | BOOL or 1 bit of INT/WORD/DWORD | Edge or status | Bit-flagged events: valve open, motor running, fault bit set |
| Analog alarm | INT, REAL, WORD | Limit value (high, low, hysteresis) | Temperature > 80 °C, pressure < 2 bar |
| Controller alarm | Diagnostic buffer of the S7 CPU | Automatic | Module failure, wire break, PROFINET diagnostics |
| System alarm | HMI internal | Automatic | Connection loss, recipe errors, screen overflow |
| User-defined alarm | Function call in PLC | Edge or status | Custom protocol events, complex logic results |
For the "one alarm per INT value" use case, discrete alarms with a single trigger word are still the correct mechanism. The TIA Portal HMI runtime evaluates only the bit you point at; the remaining bits in the word are ignored by that alarm. This is the key insight that resolves the original question.
Discrete Alarm Architecture: Tag and Bit Mapping
A discrete alarm is bound to a single bit position of a tag. The tag can be declared as a Boolean (BOOL) - one bit, one alarm - or as a wider data type. When the tag is wider, you must specify the bit number (0-15 for WORD, 0-31 for DWORD, 0-7 for BYTE) when creating the alarm.
The bit-selection rule is the only technical constraint you must respect. Beyond that, the TIA Portal dialog allows up to 32 alarms to share one tag (in the case of a DWORD), or 16 for a WORD, or 8 for a BYTE. In practice, an INT or WORD exposes 16 alarm "slots" per tag, which is more than enough for a typical process code register.
Why the dialog asks for a bit number
The alarm runtime in WinCC Comfort stores the alarm state as a bit index into the configured trigger word. To determine whether the alarm is active, the runtime polls the trigger tag from the controller, masks the configured bit, and compares the masked result against the configured trigger state. This is why a 16-bit word can drive up to 16 alarms but never more - the resolution is one alarm per bit.
Memory layout example
Assume a process status word in the ET200S declared as:
// PLC tag in ET200S
"ProcessStatus" : WORD // %MW100, status bits from auxiliary logic
Bit assignments:
| Bit | Process meaning | Alarm text suggestion |
|---|---|---|
| 0 | Idle (1 = system in idle state) | "Process idle" |
| 1 | Running (1 = line running) | "Process running" |
| 2 | Starved (1 = input buffer empty) | "Process starved - check infeed" |
| 3 | Blocked (1 = output full) | "Process blocked - check outfeed" |
| 4 | Overload (1 = drive current high) | "Drive overload - investigate" |
| 5 | E-Stop active (1 = E-Stop circuit open) | "E-Stop pressed" |
| 6 | Maintenance required (1 = service timer expired) | "Maintenance due" |
| 7 | Hand mode (1 = local HMI control) | "Manual mode active" |
| 8 - 15 | Reserved for expansion | (not configured) |
Each row in this table becomes one discrete alarm in the TP1200 alarm editor, all bound to ProcessStatus at the relevant bit number. Eight alarms consume a single WORD tag - no extra HMI tags required.
Step-by-Step: Configuring Discrete Alarms
The procedure below creates the eight discrete alarms listed above and assigns them to the alarm view on the TP1200 screen.
- Open the HMI device editor. In the project tree, double-click the TP1200 device to open the HMI editor.
- Open the alarm editor. In the editor tree, expand "Runtime settings > Alarms". Right-click "Discrete alarms" and choose "Add new discrete alarm".
-
Bind the trigger tag. In the alarm row, click the trigger tag field. The selection dialog shows all PLC tags visible to the HMI. Select
ProcessStatus(data typeWORD). -
Set the bit number. When the tag is wider than one bit, the dialog reveals a "Bit number" column. Enter
0for the first alarm,1for the second, and so on through7for the eighth. - Choose trigger mode. Open the "Trigger" column. Choose between Rising edge, Falling edge, and Status. The default is rising edge; for "maintenance due" the status mode is often more useful because the trigger word stays set until the operator clears the bit manually.
- Set the alarm text. Click the alarm text cell and enter the operator-facing string. Use multiline alarms for diagnostics, e.g. "Drive overload - investigate\nCheck motor current and conveyor load".
- Assign an alarm class. Use Errors for E-Stop and overload, Warnings for starved/blocked/maintenance, and System (or a custom info class) for state changes such as idle/running/manual mode.
- Configure acknowledgement. If acknowledgement is required, expand the alarm class properties and set "Acknowledgement" to "With acknowledgement". By default, discrete alarms are not acknowledged; events appear and clear without operator action.
- Add the alarm view to a screen. Drag the "Alarm view" control from the toolbox onto the process overview screen. Configure its filter to show all configured alarm classes.
- Compile and download. Compile the HMI first, then the PLC. Download to the TP1200 and the ET200S in that order. Cycle power on the HMI if the runtime reports "alarm configuration outdated".
BOOL and only bit 0 is valid. Change the PLC tag to WORD or INT to enable bit selection. The PLC will still treat the higher bits as ordinary process data.Trigger Modes: Rising Edge, Falling Edge, and Status
The trigger mode determines when the alarm transitions from Inactive to Active and back. Choosing the wrong mode leads to alarms that never clear, or alarms that fire repeatedly while the condition holds.
| Mode | Active when | Goes inactive when | Recommended for |
|---|---|---|---|
| Rising edge | Bit transitions 0 → 1 | Operator acknowledges (if required) and bit returns to 0 | One-shot events: E-Stop pressed, fault detected |
| Falling edge | Bit transitions 1 → 0 | Operator acknowledges and bit returns to 1 | Loss-of-signal alarms: SignalOK bit cleared, watchdog elapsed |
| Status | Bit is currently 1 | Bit returns to 0 (and acknowledge, if configured) | Persistent state: maintenance due, manual mode active |
Mapping a Multi-State INT to Discrete Alarms
Some applications expose a process state as a small enum: 0 = Idle, 1 = Running, 2 = Starved, 3 = Blocked, 4 = E-Stop. TIA Portal discrete alarms cannot be bound to a numeric range, only to a bit. There are two supported techniques to map an enum to discrete alarms.
Technique 1 - Decode the enum into a bit pattern in the PLC
Add a small helper word and let the ET200S program maintain a one-hot representation of the current state. Each state corresponds to one bit:
// ET200S S7-150 / ET200S STL excerpt
// StateWord : WORD, %MW102
// ProcessState : INT, %MW100 input
LAR1 P##StateWord // pointer to local copy of StateWord
L W#16#0
T LW [AR1,P#0.0] // clear all bits
L #ProcessState
JL _ERR // out-of-range jumps to error handler
JU _IDL
_0: L W#16#0
JU _WR
_IDL: L 0
L W#16#0 // bit 0 = idle
JU _WR
_1: L 2 // bit 1 = running
JU _WR
_2: L 4 // bit 2 = starved
JU _WR
_3: L 8 // bit 3 = blocked
JU _WR
_4: L 16 // bit 4 = E-Stop
_WR: T LW [AR1,P#0.0]
_ERR: NOP 0
Once StateWord is published to the HMI, configure one discrete alarm per state, all bound to StateWord with the bit number equal to the state index.
Technique 2 - Use separate BOOL tags per state
Less efficient on the wire (one tag per alarm) but simpler to commission. The PLC sets or clears individual BOOL tags in mutual exclusion. Each tag is bound to a single discrete alarm with bit number 0.
For projects on a constrained PROFINET line where update bandwidth matters, Technique 1 is preferred. For small machines with fewer than ten states, Technique 2 is more readable and the bandwidth cost is negligible.
ProcessState > 3, but it cannot fire different text for state 2 versus state 3. Discrete alarms remain the only mechanism that produces per-state alarm text without a custom script in the HMI.Acknowledgement, Logging, and HMI Display
Discrete alarms support an optional acknowledgement workflow. When acknowledgement is required for the alarm class, the alarm stays in the To acknowledge state until an operator with the appropriate rights presses the "Acknowledge" button in the alarm view. The runtime event log records came in, went out, and acknowledged events with millisecond timestamps sourced from the HMI clock. To keep the log consistent with the controller, enable time synchronization on the HMI to the PLC (Runtime Settings > Time synchronization) so the HMI clock follows the ET200S CPU time.
For long-term archival, configure a log target under "Logs > Alarm log". The TP1200 supports logging to a CSV file on a plugged SD card or to a remote SQL database through the WinCC option WinCC/Logging. The alarm log retains entries even after a power cycle, provided the SD card is present and not write-protected.
Showing alarms on the TP1200
Three screen objects are useful for alarm display:
- Alarm view - tabular display of active and historical alarms, with sort, filter, and acknowledge controls.
- Alarm indicator - compact icon shown on a header bar that flashes red or yellow depending on the highest active alarm class.
- Alarm window - pop-up that appears on every new alarm and requires acknowledgement before it closes (configure under "Screen > Events").
For most production HMIs, the alarm indicator on the header combined with a full-screen alarm view on a dedicated "Alarms" page is the standard layout.
Sending PLC Alarms Automatically to the HMI
If the ET200S CPU is an S7-1500-class controller (IM 151-8 PN/DP), the runtime also supports controller alarms (also called "PLC alarms" or "program alarms"). These are messages that you write in the PLC program using the Program_Alarm instruction (in SCL) or the ALARM_8P / NOTIFY_8P legacy block (in STL). The text and any associated process values travel with the alarm; the HMI receives them automatically without any per-message configuration.
This approach is documented in the TIA Portal cloud help: Sending complete alarms from the controller to the HMI device and automatically updating them. The advantage over discrete alarms is that the alarm text lives in the PLC program (one source of truth, version-controlled with the controller source) and the HMI is reconfigured automatically when the controller source changes. The disadvantage is that the project must be built on TIA Portal V16+ and the controller must support the Program_Alarm instruction (S7-1500 series and IM 151-8 PN/DP from firmware V3.0).
A minimal SCL example:
// SCL on IM 151-8 PN/DP
IF #Overload THEN
"DB_Alarms".AlarmOverload.In := TRUE;
"DB_Alarms".AlarmOverload.Latch := TRUE;
"DB_Alarms".AlarmOverload.Severity := 2; // 0=info, 1=warn, 2=error
"DB_Alarms".AlarmOverload.Text1 := 'Drive overload';
"DB_Alarms".AlarmOverload.Text2 := CONCAT('Current=', REAL_TO_STRING(#Current_A));
"DB_Alarms".AlarmOverload(); // call the Program_Alarm instance
END_IF;
For greenfield projects that use a SIMATIC S7-1500 or IM 151-8 PN/DP with V3.0 firmware, prefer program alarms. For brownfield work on legacy S7-300 / S7-400 / IM 151-7 CPUs, the discrete alarm mechanism described above is the only available approach.
Verification and Commissioning
After the project has been built and downloaded, perform the following checks before handing the line over to production:
-
Tag online test. In the HMI tag table, set the trigger tag
ProcessStatusto a value with the bit you want to test. The corresponding alarm must appear in the alarm view within the configured polling cycle (default 1 s). For a status-mode alarm, reset the bit and confirm the alarm clears. - Acknowledge path. With an alarm class that requires acknowledgement, log in as a user with the "Operate" permission and confirm the acknowledge button is enabled. Log out and verify the button is disabled.
- Time stamp drift. Compare the HMI clock with the PLC clock. If the difference exceeds 1 s, enable time synchronization under "Runtime Settings > Time Synchronization".
- Power cycle. Power off the HMI, then power it back on. The active alarm list should be restored from the controller; the alarm log should remain intact on the SD card.
- Network loss. Disconnect the PROFINET cable between the ET200S and the TP1200 for at least 5 s. The runtime should generate a system alarm "Connection to PLC interrupted" within the configured time-out (default 3 s). Reconnect and confirm the alarm clears.
Troubleshooting Matrix
| Symptom | Likely cause | Remedy |
|---|---|---|
| Alarm does not appear when bit is set | Trigger tag not visible to the HMI | Verify the tag is selected in the HMI tag table with the correct access method; recompile the HMI |
| Alarm appears but never clears | Trigger mode set to Status but the PLC never resets the bit | Add a reset condition in the PLC, or change the trigger mode to Rising edge with acknowledgement |
| Alarm fires repeatedly on a toggling bit | Trigger mode set to Falling edge on a bit that toggles | Switch to Status mode, or use a one-shot in the PLC |
| Bit number field is greyed out in the alarm editor | Trigger tag data type is BOOL | Change the PLC tag to WORD or INT; the PLC program logic is unaffected |
| Wrong alarm text appears | Bit number in the alarm does not match the bit set in the PLC | Cross-check the bit indices in the alarm table against the PLC assignment; use the HMI online test to force each bit |
| Acknowledge button is disabled | Logged-in user lacks the required permission | Assign the "Operate" right on the relevant alarm class to the operator group |
| Alarm log is empty after restart | No SD card installed or card is full | Insert a Siemens-approved SD card (6AV2181-8XP00); check the log path under "Logs > Alarm log" |
| Compile error "Tag not available" | HMI tag and PLC tag name mismatch | Use direct PLC tag references (TIA Portal V15+) instead of duplicating the tag in the HMI tag table |
| Alarm time stamp differs from PLC time by minutes | Time synchronization not enabled | Activate time sync under Runtime Settings and verify the PLC is the time master |
| Alarm floods the view (more than 100 events per minute) | Trigger mode set to Rising edge on a toggling bit | Debounce the bit in the PLC or switch to Status mode |
Notes on Edge Cases and Interoperability
On TP1200 panels configured as PROFINET IO devices, the HMI itself becomes a node on the bus. The discrete alarm polling cycle must be shorter than the controller's update cycle, otherwise alarms will lag by one cycle. The default 1-s poll is acceptable for most discrete alarms; reduce to 250 ms for E-Stop-class events by adjusting the HMI tag acquisition cycle.
When migrating projects from WinCC Flexible 2008 to TIA Portal, discrete alarm configurations are imported as-is, but the bit-number column is hidden behind the "Advanced" view in the alarm editor. Engineers familiar with WinCC Flexible may assume the bit number is implicit and discover the configuration issue only at runtime. Make the bit column visible by right-clicking the alarm table header and enabling "Bit number".
For HMI panels that talk to a third-party controller (Allen-Bradley CompactLogix, Schneider Modicon M340) over EtherNet/IP or Modbus TCP, the discrete alarm mechanism in the TIA Portal HMI still works, but the trigger tag must be a Modbus holding register or an EtherNet/IP assembly mapped to a Boolean or 16-bit tag. Allen-Bradley C-More Micro HMI alarm setup uses an entirely different configuration model with separate "alarm screen" objects, illustrating the value of documenting the chosen toolchain up front.
Frequently Asked Questions
Why does TIA Portal only let me select a single bit of a WORD for a discrete alarm?
The WinCC Comfort runtime stores each discrete alarm's state as one bit inside a trigger tag. A WORD exposes 16 bit positions, so a single tag can drive up to 16 alarms. The dialog shows the bit number to make this explicit. If you only need one alarm, change the PLC tag to BOOL so the selection is unambiguous.
How do I create one alarm per value of a process-state INT (for example, 0 = idle, 1 = running, 2 = starved)?
Discrete alarms cannot be triggered on an integer value, only on a bit. Either decode the enum into a one-hot bit pattern in the ET200S program and bind each bit to a discrete alarm, or use the Program_Alarm instruction in SCL to send the message from the controller. The one-hot pattern is the most common technique on legacy ET200S IM 151-7 systems.
What is the difference between rising edge, falling edge, and status trigger modes?
Rising edge fires once when the bit transitions from 0 to 1. Falling edge fires once when the bit transitions from 1 to 0. Status mode keeps the alarm active for as long as the bit is in the configured state. Use rising edge for one-shot events, falling edge for loss-of-signal alarms, and status for persistent conditions such as maintenance-due or hand-mode-active.
Why does the alarm not clear when the PLC bit returns to 0?
The trigger mode is probably set to Status with acknowledgement required, so the alarm stays in the "To acknowledge" state until an operator presses the acknowledge button. Either disable acknowledgement on the alarm class or change the trigger mode to Rising edge so the alarm clears automatically when the bit is reset.
Can I send the alarm text from the PLC instead of configuring each message in TIA Portal?
Yes, on S7-1500 CPUs and IM 151-8 PN/DP controllers from firmware V3.0 you can use the Program_Alarm instruction in SCL or the legacy ALARM_8P / NOTIFY_8P block. The HMI receives the alarm text and any associated process values automatically. The configuration is documented in the TIA Portal help under "Sending complete alarms from the controller to the HMI device".