Displaying SINAMICS S120 Fault Codes in WinCC 7.0 SP2

David Krause14 min read
SiemensTutorial / How-toWinCC
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

SINAMICS S120 drives expose hundreds of fault and alarm numbers (F-coded faults, A-coded alarms) that the controller needs to surface to the operator. When the drive is connected to a SIMATIC station (S7-300/S7-400 with ET 200S Profibus slave) and the SCADA layer is WinCC 7.0 SP2 over TCP/IP, there is no automatic, plug-and-play import path the way WinCC Flexible 2008 SP2 provided for direct point-to-point Profibus. The integrator must therefore build the bridge manually: read the SINAMICS fault and alarm words out of the cyclic or acyclic parameter channel, transport them to WinCC tags, and map each numeric value to a description through a WinCC text list or text library.

This reference covers three engineering paths that work in production installations:

  1. Method A – Cyclic fault/alarm word + manually built WinCC text list (lowest effort for small fault sets, most common field approach).
  2. Method B – Siemens pre-built text library for SINAMICS error messages (fastest, requires internet access to Siemens Support and is documented in entry ID 47520881 and the successor entry 51679827).
  3. Method C – Acyclic PKW/DPV1 parameter read of r0945, r0947, r2122, r2124 (used when the cyclic image does not contain the full fault buffer).

All three methods are valid; the choice depends on the number of drives, the desired granularity (current fault only vs. complete history), and the available engineering time.

Prerequisites

Component Version / Note
SINAMICS S120 with CU320-2 DP Firmware ≥ 4.4 recommended; older 2.x firmware uses different parameter indices for some alarm words.
SIMATIC S7 CPU (e.g., 315-2 DP / 317-2 DP / 414-2 DP) Any CPU with Profibus master capable of ET 200S communication.
ET 200S Profibus slave station IM 151-1 High Feature or compatible. The S120 may also be a direct Profibus slave; ET 200S is required only when additional distributed I/O is in the line.
STARTER / SCOUT commissioning tool Used to configure the telegram and to confirm the fault buffer parameters before SCADA work.
SIMATIC Manager / STEP 7 V5.5 + SP x For HW Config and Profibus master configuration.
WinCC 7.0 SP2 Runtime + Configuration studio installed on the engineering station; TCP/IP connection to the S7 station via WinCC channel "SIMATIC S7 PROTOCOL SUITE".
Optional text library From Siemens Support entries 47520881 / 51679827 (search for "SINAMICS Error messages for WinCC / WinCC flexible").
No direct export path exists from WinCC Flexible 2008 SP2 text libraries into WinCC 7.x. If the project migrated from a Panel-based HMI, the text library must be rebuilt inside WinCC or imported from the Siemens pre-built package.

SINAMICS S120 Fault and Alarm Architecture

The S120 keeps a circular fault buffer and a separate alarm buffer. The most important parameters for SCADA visualisation are listed below. Knowing which parameter to read is half the job; the other half is mapping the 16-bit or 32-bit value back to a string the operator can read.

Parameter Meaning Access Width
r0945[0…63] Fault code (Fxxxx) of the last 64 faults in chronological order RO U16
r0947[0…63] Fault value (additional information belonging to the fault) RO U32
r0949[0…63] Fault time received (timestamp in ms since power-on) RO U32
r0952[0…63] Fault time removed RO U32
r2122[0…63] Alarm code (Axxxx) of the last 64 alarms RO U16
r2124[0…63] Alarm value RO U32
r2130[0…63] Current alarm (just one, no history) RO U16
r2131 Current status word for alarms (bit-coded: "alarm present" etc.) RO U16
r2132 Current alarm time received (ms) RO U32
r2133 Current alarm time removed (ms) RO U32
r2135.0…15 Status word faults 1 – bit 0/3 set means "drive fault active", "fault present" RO U16

For a 1-line HMI message the typical minimum set is r2135.0 (fault present, bit 3) and r2130 (current alarm) plus r0945[0] (most recent fault code). The full list reference is in the SINAMICS S120/S150 List Manual.

Profibus Telegram and PPO Structure

The CU320-2 DP is configured with a standard telegram (1, 2, 3, 4, 5, 6, 7, 9, 110 or 111 are the most common). On a Profibus PPO (Parameter Process Object) the layout is:

Word range Content Typical use
PZD OUT (PCD 0…15) Control words + speed setpoint Cyclic control of the drive
PZD IN (PZD 0…15) Status words + actual speed Cyclic feedback
PKW (Parameter Identifier Value) Acyclic parameter channel, 4 words (PNU, Index, Value, Value) Read/write parameters, including the fault/alarm buffer

Standard telegrams 1–7 do not transmit fault text; they only transmit status bits (ZSW1 bit 3 = "fault active", ZSW1 bit 6 = "switch-on inhibit", ZSW1 bit 7 = "alarm active") and the actual value. The numeric code itself (e.g. F07801) is read out acyclically through the PKW part of the PPO or via DPV1 read/write record.

If cyclic display of the current alarm number is required, the S120 supports the "Free telegram 999 / 9999" configuration where additional status words are mapped to PZD. A typical mapping is:

  • PZD3 OUT = control word 2 (STW2) – not used for fault
  • PZD3 IN = ZSW2 (status word 2)
  • PZD4 IN = current alarm number r2130 (mapped via p2051[x])
  • PZD5 IN = most recent fault number r0945[0] (mapped via p2051[x])

This gives WinCC a 16-bit integer that can be wired directly into a text list. The configuration is done in STARTER under Drive → Communication → Telegram configuration → Free telegram configuration, then assigning p2051[i] = r2130 and p2051[i+1] = r0945[0].

Method A – Cyclic Word plus Manually Built WinCC Text List

This is the most reproducible method because it depends only on the WinCC configuration, not on external downloads.

Step A1 – expose the current fault and alarm number on Profibus

In STARTER, on the CU320-2:

  1. Open the drive object and switch to Communication → Telegram configuration.
  2. Choose Free telegram (BICO interconnection).
  3. Assign a free PZD input to parameter r2130 (current alarm) and another to r0945[0] (current fault) using the p2051[idx] and p2050[idx] parameters.
  4. Save to ROM and download.

Step A2 – map the PZD words into STEP 7 I/O

In HW Config of the S7 station, install the SINAMICS S120 GSD file (Siemens device library) and place the drive on the Profibus subnet. Note the input addresses assigned (e.g. PEW 256 / PEW 258 for the PZD words you need).

Step A3 – WinCC tag configuration

  1. In WinCC Explorer, open Tag Management and add two binary / unsigned-16 tags under the SIMATIC S7 PROTOCOL SUITE / Profibus DP / Tag or under TCP/IP if WinCC is talking to the CPU directly.
  2. Point the tags to the input words selected above (e.g. "Drive1_CurrentAlarm" → DBW or PEW from the S7 program). Often the S7 program copies the PZD image into a DB so that the WinCC TCP/IP channel can read it without I/O access rights.

Step A4 – build the text list

  1. In WinCC Explorer, right-click Text and Graphic Lists → Text Lists and create a new list, e.g. SINAMICS_FaultList.
  2. For WinCC 7.0 SP2 the list is a flat list of Value / Text pairs. Add the standard S120 fault codes. A representative subset:
Value Displayed text
0 No fault
7801 F07801 Motor overcurrent
7900 F07900 Motor blocked
30001 A30001 Power unit overtemperature warning
30004 A30004 Power unit temperature sensor error
50005 A50005 PROFIBUS communication error
  1. Repeat for alarms (Axxxx) and bind the text list to an I/O field in the desired screen.
Building a full library by hand is laborious. The current S120/G120/V90 firmware contains well over 3 000 distinct F/A numbers. Plan to extract the list from the SINAMICS List Manual rather than typing them.

Method B – Siemens Pre-Built Text Library (Entry 47520881 / 51679827)

Siemens ships a downloadable text library for WinCC and WinCC Flexible that contains the full SINAMICS error message catalogue. The original entry is 47520881; a successor that includes newer firmware is at 51679827.

Step B1 – download and unzip

  1. Log in to Siemens Industry Online Support.
  2. Open the entry and download the attached ZIP file (typically named xxxxx_SINAMICS_ErrorMessages_WinCC_en.zip).
  3. Extract to a working folder. The contents are usually:
    • A WinCC Flexible import file (*.xlsx or *.csv)
    • A WinCC v7 compatible import file (text library *.txt or *.xlsx)
    • A short README describing column layout

Step B2 – import into WinCC 7.0 SP2

  1. Open WinCC Explorer and select Text and Graphic Lists → Text Lists.
  2. Right-click the target text list and choose Import… (or use Text Library → Import from file, depending on the SP2 menu structure).
  3. Point at the exported CSV/XLSX. The import wizard maps the first column to Value and the second to Text.
  4. Verify with a few sample values (0, 7801, 30001, 50005) that the correct text appears in the preview column.
A common pitfall: the Siemens library uses a single text list with a 16-bit numeric range. If your tag is declared as signed 16-bit, values > 32 767 will overflow. Always declare the WinCC tag as Unsigned 16-bit or as Unsigned 32-bit if you concatenate two PZD words.

Method C – Acyclic PKW / DPV1 Read of the Fault Buffer

Use this method when the operator screen must show more than the latest fault. Acyclic communication is supported on the S7 side by SFB52 / SFB53 (RDREC / WRREC) or SFC58 / SFC59, and on the WinCC side through the S7 channel's Acyclic services.

PKW request structure for an S120 parameter read

Word Content (hex)
PKE word 1 0x1000 + parameter number (e.g. 0x1025 for r0945 = 0945 decimal = 0x03B1 → 0x13B1)
PKE word 2 Index (e.g. 0x0000 for r0945[0])
PWE word 3 Value high (don't care for read)
PWE word 4 Value low (don't care for read)

A successful drive response returns 0x2000 + parameter number in PKE word 1 and the parameter value in PWE word 3 / 4. A complete WINCC-side script in C that polls the buffer looks like:

// Pseudocode for a WinCC C action polling r0945[n] from a SINAMICS
// 'hS7' is a previously opened channel handle
// 'nDrive' is the Profibus station number
for (int n=0; n<8; ++n)
{
    DWORD dwPNU = 945;        // r0945
    DWORD dwIdx = n;          // index
    DWORD dwVal = 0;
    // Issue DPV1 read of (945, n) on the SINAMICS slot
    HRESULT hr = S7AcyclicRead(hS7, nDrive, SLOT_PZD, dwPNU, dwIdx, &dwVal);
    if (SUCCEEDED(hr))
    {
        SetTagWord(MAKE_WORD(nDrive, n), (WORD)dwVal);
    }
    Sleep(20);                // do not overrun the bus
}

Bind each SetTagWord result to its own text list element. Because the fault buffer is 64 entries deep, the typical compromise is to display the first 8 entries (most recent) and provide a button that loads the next 8 on demand.

WinCC 7.0 SP2 Configuration Walkthrough

Connect the S7 station to WinCC

  1. Open WinCC Explorer and start Tag Management.
  2. Add a new driver of type SIMATIC S7 PROTOCOL SUITE.
  3. Under TCP/IP, create a new connection. Point the IP address at the S7 CPU, the rack/slot to 0/2 (or the actual CPU slot).
  4. Create internal tags of type Unsigned 16-bit to hold each PZD value that the S7 copies into a DB. Sample structure in the S7 DB:
DATA_BLOCK "DB_Drive1"
  STRUCT
    stDriveStatus : WORD;   // ZSW1 from PZD1
    nActSpeed     : INT;    // NIST from PZD2
    nCurrentAlarm : WORD;   // r2130 mapped to PZD3
    nCurrentFault : WORD;   // r0945[0] mapped to PZD4
    nFaultBuf1    : WORD;   // optional acyclic
    nFaultBuf2    : WORD;
  END_STRUCT;
END_DATA_BLOCK

Wire the I/O field to a text list

  1. Open the screen (e.g. DriveOverview.pdl) in Graphics Designer.
  2. Drop an I/O field on the page; in the configuration dialog select Output mode and bind it to tag Drive1_CurrentFault.
  3. In the Output/Input tab, change field type to Text list and choose the imported list SINAMICS_FaultList.
  4. Repeat for Drive1_CurrentAlarm and the corresponding SINAMICS_AlarmList.

Alarms via the WinCC Alarm Logging

For a real SCADA feel, the fault should appear in the message line at the bottom of the screen with an audible buzzer. The standard method is:

  1. Create a numeric tag that mirrors a known fault bit (e.g. Drive1_ZSW1_Bit3).
  2. Open Alarm Logging and create a new single message. Set Trigger tag to the bit and Status to Came In / Went Out.
  3. In the message text use a placeholder for the dynamic text, for example: @(SINAMICS_FaultList%Drive1_CurrentFault%d). WinCC resolves the text list at runtime and prints "F07801 Motor overcurrent" instead of a raw number.
  4. Configure a class with red background and the horn flag set so the operator gets an audible indication.
Make sure that the message text does not exceed 255 characters. Long multi-line alarm texts from the Siemens library must be wrapped or truncated; otherwise the message may be clipped in the runtime message line.

Verification Checklist

Check Method Expected
Tag update in WinCC online Open Tag Management → select tag → "Update" column shows a heartbeat Constant quality "Good" with changing values when a fault is triggered
Fault text shows correctly Trigger F07801 from STARTER by blocking the motor I/O field shows "F07801 Motor overcurrent"
Alarm appears in Alarm Logging Trigger A30001 by heating the power unit Single message in red with correct text
Bit ZSW1.3 toggles Force a fault, read ZSW1 in WinCC Bit 3 = 1 (fault present)
Acyclic read works Watch S7 diagnostic buffer for DPV1 errors No SFB52 / SFB53 error codes, repeated successful reads

Troubleshooting Matrix

Symptom Likely root cause Fix
I/O field always shows "0 – No fault" Tag is declared signed 16-bit; values > 32767 wrap negative Change tag type to Unsigned 16-bit
Tag quality "Bad – Device failure" TCP/IP connection to wrong CPU IP, or wrong rack/slot Verify IP, subnet, and rack/slot in WinCC connection settings
Only the last 8 entries of the buffer are correct Reading of r0945[8…63] never executed; the script stops at index 7 Extend the polling loop to all 64 indices or implement on-demand paging
Fault number is right but text is wrong Text list has wrong column mapping on import (Value/Text reversed) Re-import with column order "Code, Text"
Frequent F08501 (PROFIBUS fault) on the S120 Cyclic PZD length does not match drive telegram Set the same telegram length in HW Config and in STARTER; verify the PPO type
Acyclic read returns error W#16#8090 / 80A1 Slot or index wrong; DPV1 channel not enabled in STARTER Enable "Parameter access" in CU320-2 properties and re-check slot assignment
Message line truncated at 128 characters Text library imported with multi-line descriptions Truncate to a single line ≤ 128 chars
Buzzer does not sound Alarm class "horn" flag not set, or sound file missing Assign *.wav in Computer → Sound and enable horn on the alarm class

Edge Cases and Field-Proven Caveats

  • Multiple drive objects on one CU320-2. A single CU hosts up to 6 servo / 6 vector drive objects. Each object has its own r2130/r0945 buffer. If the free telegram is configured only on the Control Unit, only the CU-level faults come through. To capture drive-object faults, configure the telegram on each DO.
  • PROFIsafe on top of Profibus DP. When the S120 has a PROFIsafe channel (e.g. via ET 200S PM-D F module), the safety faults are signalled through the PROFIsafe status bits, not through F-numbers. Do not map safety-relevant messages to text lists that can be silenced.
  • Text library localisation. The Siemens library at entry 47520881 ships in English; the German library is at 51679827. WinCC 7.0 SP2 supports text list runtime switching via the Text DLL, so both languages can co-exist.
  • Time stamping. r2132 / r0949 are milliseconds since the drive powered on, not absolute time. Convert to absolute time in the S7 logic by adding the power-on time of the CU. WinCC Alarm Logging receives the absolute time correctly only if the S7 stamps the message.
  • Legacy projects. Old S120 firmware < 2.6.2 indexes the alarm buffer at r2122[0…7] with a different mapping. Always cross-check the parameter list against the firmware version of the connected drive.

Is there a direct import path from a WinCC Flexible 2008 SP2 text library into WinCC 7.0 SP2?

No. WinCC 7.0 SP2 cannot import WinCC Flexible text lists natively. Use the Siemens pre-built libraries at entries 47520881 and 51679827, or rebuild the list manually from the SINAMICS List Manual.

Which parameter gives the most recent fault number on the S120?

Read r0945[0] for the latest fault code and r2122[0] for the latest alarm. Map both into the free PZD section of the Profibus telegram for cyclic access, or use DPV1 acyclic read for the full 64-entry buffer.

Why does my I/O field always show "0 – No fault" even when the drive reports F07801?

The WinCC tag is almost certainly declared as a signed 16-bit integer, so values above 32767 wrap negative. Switch the tag type to Unsigned 16-bit (or Unsigned 32-bit if two PZD words are concatenated).

How do I make the buzzer sound when a fault is raised?

In Alarm Logging, set the message class to a class with the "Horn" attribute enabled, then assign a sound file under Computer → Sound. The message trigger must be a tag that follows the ZSW1 bit 3 transition.

Can WinCC 7.0 SP2 read faults from the S120 without a PLC in the middle?

Direct Profibus DP from WinCC to the S120 is technically possible with the "PROFIBUS DP master" channel, but for ET 200S + S7 configurations the standard approach is to use the S7 as a gateway and TCP/IP between WinCC and the S7. The text list is identical either way.

Back to blog