Reading SINAMICS V20 Alarm Codes Over USS Protocol from S7-1500

David Krause10 min read
SiemensTIA PortalTutorial / How-to
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: Reading V20 Diagnostic Codes Over USS

The SINAMICS V20 is a cost-optimized, single-axis AC drive from Siemens that supports the USS protocol on its RS485 interface for parameter access and basic control. When the drive is integrated into a SIMATIC S7-1500 (or S7-1200) automation cell, engineers frequently need to expose not only the drive's faults (which trip the drive) but also its alarms/warnings on a WinCC HMI for operator visibility. The challenge is that the parameter most engineers find first, r0947, only carries fault codes; warnings live in a separate parameter set.

This reference explains how to read both classes of diagnostic message over USS, maps the relevant V20 parameters to the USS_Read_Param / USS_Drive_Control function blocks in TIA Portal, and shows the HMI text-list mapping pattern used to convert raw numeric codes into human-readable messages.

Terminology: In Siemens V20 documentation, the words fault, alarm, and warning are used inconsistently. By definition: a fault trips the drive (pulse inhibit, ready lost); an alarm or warning is informational only and does not stop the motor. Warnings frequently precede a fault. The two are stored in different parameters and have separate bit structures.

Prerequisites

Item Required Value / Note
SINAMICS V20 firmware ≥ 3.92 (parameter access via USS is available on all released versions; r2110 indexing requires ≥ 1.20)
SIMATIC S7-1500 CPU Firmware ≥ 2.0 with USS library (USS_Compact_1500 / USS_Drive_Control block from "SINAMICS USS")
SIMATIC S7-1200 CPU Firmware ≥ 4.2; identical USS instruction set
TIA Portal ≥ V16 (later versions required for newest V20 GSD/parameter sets)
USS library "SINAMICS USS" library — provides FB USS_Drive_Control, FB USS_Read_Param, FB USS_Write_Param, FB USS_Port_Scan
Physical layer RS485 two-wire, 9600 or 19200 bit/s, even parity default, 8 data bits
Drive address Set in V20 via P2010[0] = 1…31; default 1

The baseline application document "Speed Control of a V20 with S7-1200 (TIA Portal) via USS" defines the wiring, USS telegram structure, and the standard call pattern for USS_Drive_Control; the procedure below extends that pattern to parameter polling for diagnostic data.

V20 Diagnostic Message Architecture

The V20 distinguishes two message classes, each with its own buffer structure:

Class Behavior Current Buffer History Buffer Counter
Fault Trips drive; OFF1/OFF2/OFF3 path active r0945[0]…r0945[7] (up to 8 active fault codes) r0947[0]…r0947[7] (last 8 acknowledged fault codes) p0952 total fault count
Alarm / Warning Informational; drive continues r2110[0], r2110[1] (2 active warnings) r2110[2], r2110[3] (2 historical warnings) p2111 total warning count

Unlike the fault side, which exposes eight slots in each buffer, the warning side is a fixed four-element array. This is the single most common source of confusion when engineers first try to poll warnings: a naïve copy of the fault logic into USS_Read_Param with index 0…7 will time out or return 0 for indices 4-7.

Parameter Map for USS Polling

The table below lists every V20 parameter you need for a complete HMI diagnostic faceplate. All parameters are 16-bit unsigned integers. Drive responses return raw integer values; V20 codes are not BICO-formatted and require no bit masking on the PLC side.

Parameter Index Range Meaning Suggested HMI Tag
r0945[0]…r0945[7] 0-7 Active fault codes V20_Fault_Active[1..8]
r0947[0]…r0947[7] 0-7 Fault history (last acknowledged) V20_Fault_Hist[1..8]
r2110[0] 0 Active warning #1 (most recent) V20_Warn_Active1
r2110[1] 1 Active warning #2 V20_Warn_Active2
r2110[2] 2 Historical warning #1 (most recent acknowledged) V20_Warn_Hist1
r2110[3] 3 Historical warning #2 V20_Warn_Hist2
p0952 n/a Total fault count since last reset V20_FaultCount
p2111 n/a Total warning count since last reset V20_WarnCount
r0030[0] n/a Actual current (signed, smoothed, % of rated) V20_CurrentPct
r0021[0] n/a Actual smoothed frequency (Hz, float) V20_FreqHz

Step-by-Step: Reading r2110 Warnings with USS_Read_Param

  1. Enable USS on the V20. Set P0010 = 30 and P0970 = 1 to save the parameters, then cycle the drive. Confirm P2010[0] matches the drive node address used in TIA Portal, and that P2014[0] = 6 (USS telegram off-time, ms) and P2021 baud rate are aligned on the PLC side.
  2. Import the USS library. In TIA Portal, navigate to "Options → Global libraries → SINAMICS USS" and drag the FBs into your project. The library delivers:
    USS_Drive_Control (FB1254) — cyclic control/status word
    USS_Read_Param (FB1251) — single-parameter read
    USS_Write_Param (FB1252) — single-parameter write
    USS_Port_Scan (FB1250) — bus scan utility
  3. Instantiate one DB per drive for USS_Drive_Control; the standard pattern from the V20/S7-1200 application document uses a single instance DB per node. The status word returned in USS_Drive_Control.Drive_Status exposes the fault bit (ZSW1.3) but not the warning bit, which is why polling r2110 is necessary if you want to surface warnings.
  4. Poll r2110 indices 0-3 sequentially. Instantiate one USS_Read_Param instance per index to avoid telegram collision; the USS port is half-duplex and cannot interleave reads on the same port. The minimum spacing is governed by P2014; use a 200 ms clock per index to keep the bus quiet.

ST Code: USS_Read_Param Polling Block

// Cyclic OB (e.g. OB1) — read 4 warning slots every 200 ms
// Each Read_Param FB is clocked by a different phase of a 4-pulse
// generator so only one telegram is in flight at a time.

// ---- Phase generators ----
IF "clk200ms" THEN
    CASE "pollPhase" OF
        0:
            "USS_Read_Warn_Active1"(Port      := "USSPort".portHandle,
                                    DriveAddr := 1,
                                    ParamNo   := 2110,    // r2110
                                    ParamIdx  := 0,       // active #1
                                    Done      => "rdA1_Done",
                                    Error     => "rdA1_Err",
                                    Value     => "V20_Warn_Active1");
        1:
            "USS_Read_Warn_Active2"(Port      := "USSPort".portHandle,
                                    DriveAddr := 1,
                                    ParamNo   := 2110,
                                    ParamIdx  := 1,
                                    Done      => "rdA2_Done",
                                    Error     => "rdA2_Err",
                                    Value     => "V20_Warn_Active2");
        2:
            "USS_Read_Warn_Hist1"(Port      := "USSPort".portHandle,
                                  DriveAddr := 1,
                                  ParamNo   := 2110,
                                  ParamIdx  := 2,
                                  Done      => "rdH1_Done",
                                  Error     => "rdH1_Err",
                                  Value     => "V20_Warn_Hist1");
        3:
            "USS_Read_Warn_Hist2"(Port      := "USSPort".portHandle,
                                  DriveAddr := 1,
                                  ParamNo   := 2110,
                                  ParamIdx  := 3,
                                  Done      => "rdH2_Done",
                                  Error     => "rdH2_Err",
                                  Value     => "V20_Warn_Hist2");
    END_CASE;
    "pollPhase" := ("pollPhase" + 1) MOD 4;
END_IF;

ST Code: Acknowledge / Clear Buffers

The V20 clears the warning history when the user issues a "fault acknowledge" over USS — set bit 7 of the control word (STW1.7 = 1) on the rising edge from USS_Drive_Control. This causes r2110[2]/[3] to roll forward and clears the active set if no condition is present. The same bit acknowledges faults in r0945; you cannot clear faults and warnings independently.

// Acknowledge edge detector
IF "HMI_Ack_Button" AND NOT "ackPrev" THEN
    "Drive_Ctrl_DB".Control_Word.%X7 := TRUE;   // STW1.7
ELSE
    "Drive_Ctrl_DB".Control_Word.%X7 := FALSE;
END_IF;
"ackPrev" := "HMI_Ack_Button";

HMI Integration: Mapping Raw Codes to Text

The PLC must translate the unsigned-16 codes returned in r2110 into operator-readable strings. Build a text list in WinCC (or in the HMI part of TIA Portal) whose index equals the warning code.

  1. Create a new Text list in the HMI tag editor; select Range = "Decimal", Length = WORD.
  2. Populate the entries from the V20 Operating Instructions, "List of faults and alarms" chapter. Typical entries:
    501 → "Current limit reached"
    502 → "Overvoltage in DC link"
    504 → "Inverter overtemperature"
    512 → "Motor overload (I²t)"
    780 → "Motor stalled / blocked"
  3. Bind each warning tag to a Symbolic I/O field on the faceplate with Display mode = "Text list".

Because the V20 can show more than 100 distinct warnings, prefer to import the official CSV from the V20 Parameter List manual into the text list rather than typing entries manually.

Verification Procedure

  1. Force a known warning: in the drive BOP, navigate to P2170 = 22 (warning: "Inverter I²t overload") and set P2180 = 1 to trigger a test alarm. Within 800 ms (one full poll cycle × 4 phases + telegram latency), the HMI should display A502 in the "Active Warning #1" field.
  2. Switch the drive to local control and force a fault with P0952 increments — confirm r0945[0] updates and the fault bit in the status word latches.
  3. Press the HMI Ack button; verify r2110[2]/[3] retains the historical values but r2110[0]/[1] clears when the trigger condition is removed.
  4. Pull the RS485 cable mid-run; confirm the USS_Read_Param "Error" output becomes non-zero within one poll cycle (typically 16#000A = "telegram length invalid" or 16#000C = "checksum").

Troubleshooting Matrix

Symptom Likely Root Cause Corrective Action
USS_Read_Param always returns 0 for indices 4-7 of r2110 V20 warning buffer only has four slots — there is no parameter at index ≥ 4 Limit polling to indices 0-3; remove any code that reads beyond index 3
"Error" output = 16#0002 (parameter access not supported) Wrong parameter number or access level locked Verify with BOP that r2110 is visible; check P0003 (user access level) ≥ 2
"Error" output = 16#000A (invalid telegram length) Port-configured byte order mismatched with drive Confirm P2015 (USS PZD length) and P2016 (USS PKW length) match PLC profile; default 2/4
Warnings visible on BOP but not on HMI Polling FB is being clocked faster than P2014 off-time Increase poll interval to 200 ms minimum; honor P2014 > telegram time
Polled values flicker / show random numbers Multiple USS_Read_Param instances firing on the same port in same OB cycle Sequence the four reads in a single CASE dispatcher as shown above; ensure mutual exclusion
Active warning displayed after the cause is removed Warning latch still active; some V20 warnings auto-clear only after OFF1 Issue OFF1/OFF2 then ACK, or wait for next OFF1 cycle; confirm via BOP
PLC sees r0945[0] = 0 even though drive is faulted on display Fault acknowledgement cleared the active buffer but not the history; operator looked at wrong field Display both r0945 (active) and r0947 (history) on the faceplate
No response at all on USS port RS485 termination missing or A/B swapped Add 120 Ω termination at both ends; verify polarity against the V20 terminal diagram

Performance and Bus Loading Notes

Each USS_Read_Param call consumes one USS telegram slot. With four warning slots, two fault slots, and the cyclic USS_Drive_Control running on the same port, plan for ~7 telegrams per cycle. At 19200 bit/s with a typical 14-byte request / 14-byte response, the bus is occupied roughly 110 ms per cycle — well below the 1 s limit, but if you add additional drives on the same RS485 bus, share the polling budget. For 31 drives each polling four warnings, consider moving diagnostic data into the cyclic PZD words by mapping r2110[0] into a connector output (e.g. P2051[0]) and reading it from the status word instead of parameter channel — this eliminates the PKW overhead entirely.

Differences vs. Other Siemens Drives

SINAMICS G120, G120C, and S120 series expose a more elaborate warning structure: r2122[0]…r2122[63] for active alarms, r2123[0]…r2123[7] for ACK history, r2132 for the active alarm code (most recent only). Engineers migrating from V20 to G120 should not directly substitute r2110 with r2122 — the indexing, slot count, and clear semantics differ. The diagnostic block strategy outlined above, however, ports directly: parameterize the ParamNo and ParamIdx fields of USS_Read_Param and reuse the same polling dispatcher.

Safety and Operational Notes

Warnings are advisory. Do not interlock machine safety functions on the value of r2110; only faults in r0945 are guaranteed to reflect a tripped drive state. For SIL/PL-rated stops, use the drive's STO inputs (XSTO on V20) or a hard-wired contactor, never a polled USS warning bit.
Parameter write protection. Some V20 parameter sets require P0010 = 30 to accept writes via USS. If USS_Write_Param returns "access denied", drop into commissioning mode on the BOP first, or set P0003 ≥ 3 (expert) before writing.

What is the difference between r0947 and r2110 on a SINAMICS V20?

r0947 holds the fault history (codes that previously tripped the drive); r2110 holds warnings, which are advisory and do not stop the motor. r0947 has eight slots; r2110 has only four slots split into two active (indices 0,1) and two historical (indices 2,3).

How many active and historical warnings does the V20 store?

Exactly two active warnings and two historical warnings are retained simultaneously in r2110[0..3]. There is no V20 parameter that stores more than two historical warnings at a time.

Can I read warning codes using USS_Drive_Control alone?

No. USS_Drive_Control only exchanges the cyclic control and status words plus the configured PZD words. To expose a warning code you must either poll r2110 via USS_Read_Param or map r2110[0] into a PZD word using P2051 and read it from the cyclic status frame.

Why does my warning code never clear on the HMI?

Some V20 warnings are latched until the drive receives an OFF1 command or an acknowledgement via STW1.7. Acknowledge from the BOP first to confirm the cause has cleared; if the code disappears there but persists on the PLC, refresh your polling tags and confirm no stale PLC tag is retaining the value.

Does this procedure work on S7-1200 as well as S7-1500?

Yes. The SINAMICS USS library provides identical FB interfaces for both PLC families and the V20 parameter layout is unchanged. The S7-1200 application document on Siemens Support describes the same wiring and call patterns.

Back to blog