Latch discrete alarms in the PLC (ladder or SCL) into an alarm word, load it into WinCC, and create single messages in Alarm Logging with that word as message tag and one bit per message. Define few message classes with clear acknowledgement rules, monitor analog values with limits, hysteresis and delay, and show everything in the WinCC AlarmControl.
- Latch in the PLC, display and acknowledge in WinCC, reset in the PLC.
- Hysteresis and delay on every analog limit.
- Few classes, clear texts, regular review.
How the WinCC Message System Is Built
WinCC Alarm Logging turns tag bits and limit violations into messages. Message blocks define the columns (time, number, text, point of error), message classes define acknowledgement, message types define colours, and the AlarmControl shows lists for current, archived and historical messages.
Lab Flow: From Tank Signals to WinCC Alarm Logging
Every lesson in the Softwell PLC lab manual series follows the same six stages and the same address rule, so the code you write here plugs straight into the HMI lessons.
Stage 1Field Wiring and PLC Tags
| PLC tag | Address | Type | Device / comment |
|---|---|---|---|
LSH401_OK | %I8.4 | Bool | High-level switch, NC, 1 = level below |
P401_OL_OK | %I8.5 | Bool | Pump overload, NC, 1 = healthy |
TT401_Raw | %IW108 | Int | Temperature 4–20 mA = 0 – 150 °C |
Stage 2Input Mapping into DB_IO
// FC_InputMapping "DB_IO".LSH401_OK := "LSH401_OK"; "DB_IO".P401_OL_OK := "P401_OL_OK";
TT401 is scaled once in the PLC (see the SCL below); see analog scaling for WinCC.
Stage 3PLC Logic in Ladder and SCL
The same logic in SCL – use whichever your plant standard prefers; both write the same DB members that WinCC reads:
// FC_Alarm401 – SCL equivalent; WinCC Alarm Logging reads "DB_Alarm401".Alarm (Word)
"DB_Alarm401".Alarm.%X0 := NOT "DB_IO".LSH401_OK
OR ("DB_Alarm401".Alarm.%X0 AND NOT "DB_Alarm401".Reset_Cmd);
"DB_Alarm401".Alarm.%X1 := NOT "DB_IO".P401_OL_OK
OR ("DB_Alarm401".Alarm.%X1 AND NOT "DB_Alarm401".Reset_Cmd);
"DB_Alarm401".Reset_Cmd := FALSE; // one-shot, written by WinCC
// Analog value for WinCC limit monitoring (scaled once, here)
"DB_IO".TT401_degC := SCALE_X(MIN := 0.0, MAX := 150.0,
VALUE := NORM_X(MIN := 0, VALUE := "TT401_Raw", MAX := 27648));Stage 4Link PLC Tags to WinCC
In Tag Management add the SIMATIC S7-1200, S7-1500 Channel, create a connection with the CPU IP address, then use AS Symbols to load the PLC symbols and drag the DB members you need into a tag group. The DB members must have Accessible from HMI ticked in TIA Portal. Names and menus can differ slightly between WinCC versions.
| WinCC tag | Data type | Connection / address | Used by |
|---|---|---|---|
DB_Alarm401_Alarm | Unsigned 16-bit | symbolic | Message tag for both bit messages |
DB_Alarm401_Reset_Cmd | Binary | symbolic | Reset button |
DB_IO_TT401_degC | Floating-point 32-bit | symbolic | Limit monitoring, trend |
Stage 5Configure Alarm Logging and the AlarmControl
| Item | Setting |
|---|---|
| Message class Fault | Acknowledgement of came-in required; colours red |
| Message class Warning | No acknowledgement; colours amber |
| Message 1 | Message tag DB_Alarm401_Alarm, bit 0, class Fault, text "T401 high level (LSH401) – stop filling" |
| Message 2 | Same tag, bit 1, class Fault, text "P401 motor overload – check MPCB" |
| Analog alarm | Limit monitoring on DB_IO_TT401_degC: high limit 85 °C → Warning; hysteresis 2 K; delay 2 s where supported |
| Message blocks | Date, time, number, class, message text, point of error |
| Screen | WinCC AlarmControl in Alarms.pdl with acknowledge buttons; PLC RESET button with direct connection to Reset_Cmd |
The PLC side of acknowledgement handshakes is detailed in TIA Portal to WinCC alarm configuration.
Stage 6Perform and Test: Alarm Logging and Limit Monitoring
Two discrete alarms come from the PLC alarm word, one analog alarm from WinCC limit monitoring on the scaled temperature. Acknowledge in the alarm control, reset in the PLC, and switch off hysteresis and delay near the limit to watch one noisy sensor flood the list.
| No. | Time | Class | Message text | State |
|---|
Troubleshooting
| Symptom | Likely cause | First check |
|---|---|---|
| Message never comes | Wrong message bit or tag | Bit number vs PLC slice |
| Message comes and goes repeatedly | No hysteresis / delay | Limit monitoring settings |
| Message stays after reset | Not acknowledged | Message class acknowledgement |
| Reset does nothing | Cause still present | DB_IO bit in a watch table |
Hands-On Lab: WinCC Alarm Classes, Bit Messages and an Analog Limit
Hands-on- TIA Portal and WinCC Explorer V8.1
- Estimated time: 90 minutes
Wire and declare the alarm signals
Declare LSH401_OK, P401_OL_OK (both NC) and TT401_Raw.
Map and scale into DB_IO
Copy the switches and scale TT401 to °C.
Latch the alarms in ladder and SCL
Write the alarm word with reset in the seal-in branch.
Load the tags into WinCC
Load DB_Alarm401 and DB_IO.TT401_degC from AS Symbols.
Configure Alarm Logging
Classes Fault and Warning, two single messages on the alarm word, analog limit 85 °C with hysteresis and delay, AlarmControl on a screen.
Test and tune
Trigger, acknowledge, reset; provoke a flood near the limit and remove it with hysteresis and delay.
Every alarm names its device and action, latches in the PLC, is acknowledged in WinCC and reset in the PLC, and one noisy sensor cannot flood the list.
Frequently asked questions
What is the difference between a message class and a message type in WinCC?
The message class sets the acknowledgement behaviour (for example Fault with acknowledgement, Warning without); message types inside a class set colours and text such as Alarm, Warning or Tolerance.
Should discrete alarms be generated in the PLC or in WinCC?
Latch them in the PLC, in ladder or SCL, and let WinCC read a message tag and bit. The PLC sees every scan and keeps the latch even if the SCADA is restarted.
What do hysteresis and delay do on an analog alarm?
Hysteresis makes the alarm clear only below a lower value, so a value hovering at the limit does not toggle. A delay requires the limit to be exceeded for a time before the message comes. Together they stop alarm floods.
Who acknowledges and who resets?
Acknowledge is a WinCC action on the message. Reset clears the latched bit in the PLC once the cause is gone. Both are needed and are deliberately separate.
How do I keep the alarm list readable?
Few classes with clear meaning, message texts that name the device and the first action, hysteresis and delays on analog limits, and regular review of the most frequent messages.
Where is alarm philosophy defined?
In an alarm management standard such as ISA-18.2 or EEMUA 191 and a site alarm philosophy document; WinCC implements it.