Overview
The recurring question from first-time integrators of a SINAMICS V20 with a SIMATIC S7-1200 is: "How do I get the drive to send a fault back to the PLC?" The drive does not initiate communication. On a USS bus (and on any master/slave fieldbus), only the PLC can solicit a response, and the drive can only answer when asked. The fix is therefore not a single drive parameter, it is a coordinated set of: (1) V20 parameter configuration that exposes the status word and fault number, (2) USS_PYM library wiring in TIA Portal that polls the drive on a deterministic cycle, and (3) ladder or structured-text logic that decodes the response.
This reference walks through the entire loop using the official Siemens sample "Speed Control of a V20 with S7-1200 (TIA Portal) via USS® protocol/MODBUS RTU with HMI" (entry ID 63696870) and the underlying SINAMICS V20 ⇄ SIMATIC S7-1200 USS communication application document. After reading it, you should be able to convert any of the V20 Fxxxx faults into a Bool, a Word, and a HMI tag in the S7-1200.
Why the V20 Cannot "Push" Faults to the PLC
USS is a half-duplex, master/slave, point-to-multipoint protocol riding on RS-485. The S7-1200 is the parent; the V20 is the child. The child has no token, no interrupt, and no autonomous transmit rights. The drive only places data on the bus in response to a request that contains its node address (P2011). Forgetting this is the single most common reason a beginner assumes the drive is misconfigured when the wiring and parameters are in fact correct.
Two consequences for fault reporting:
- The status word (ZSW) is delivered automatically with every cyclic PZD poll, so fault bit ZSW.3 is essentially free once USS is running.
- The fault number (
r0947/r2131) is a parameter, not a process value, so it must be read acyclically through the PKW channel of USS or with a separate USS/MODBUS read request.
Prerequisites
- SINAMICS V20, any firmware (the USS behavior is stable across all V20 versions; current branch 6SL3210-5BE27-5VX0 supports it natively).
- SIMATIC S7-1200 CPU with RS-485 onboard (CPU 1211C/1212C/1214C/1215C/1217C) or a CB 1241 RS-485 communication board on a 1200 that lacks the port.
- TIA Portal V15.1 or later (V17/V18 recommended for current USS_PYM revisions).
- Siemens library block
USS_PYM_232from the global library shipped with the V20 sample project, or extracted from the application document attached to entry 63696870. - Two-wire shielded RS-485 cable, terminated with 120 Ω at both physical ends.
- V20 default-reset to factory settings if you are starting from a used drive:
P0010 = 30,P0970 = 1.
SINAMICS V20 Communication Interface
The V20's RS-485 port sits on the lower terminal row of the control board. The default assignment is fixed: pin "P+" = RS-485 data +, pin "N-" = RS-485 data -, and the shield must be bonded to PE at the drive end. The port supports both USS and MODBUS RTU; the active protocol is selected with P2013 (number of PKW words). When P2013 = 4, the protocol is USS; when set to 0, MODBUS RTU is enabled. Setting it to 0 with a PKW length of 0 disables PKW and is the typical Modbus configuration.
Wiring topology
Use a daisy chain, not a star. The S7-1200 is bus master at one physical end, the last V20 is at the other end, both with 120 Ω termination resistors in parallel. Each drive in between has its termination disabled. The total stub length from any node to the trunk should not exceed 1 m.
V20 Parameter Configuration for USS Fault Reporting
The complete minimum parameter set to expose drive health to a S7-1200 over USS is shown below. Numbers are taken from the V20 Operating Instructions and the V20 List Manual, both linked from the Siemens Online Support entry 63696870.
| Parameter | Name | Value | Effect on fault path |
|---|---|---|---|
| P0010 | Commissioning filter | 0 | Exit commissioning (must be 0 to write other parameters at runtime) |
| P0700 | Command source selection | 5 | USS on RS-485 as command source (Start/Stop/Rev) |
| P1000 | Setpoint source selection | 5 | USS on RS-485 as speed setpoint |
| P2010 | USS baudrate | 6 (9600), 7 (19200), 8 (38400), 9 (57600), 10 (76800), 11 (93750), 12 (115200) | Must match S7-1200 USS_PYM_232 baud input |
| P2011 | USS node address | 1 ... 31 | Unique per drive on the bus |
| P2012 | USS process data (PZD) length | 2 | 2 PZD words cyclic: STW/ZSW + NSOLL/NIST |
| P2013 | USS parameter channel (PKW) length | 4 | Enables USS protocol and exposes parameter read/write |
| P2014 | USS telegram off-time | 500 ms | Window in which the master must re-poll or the drive faults F72 |
| P2023 | RS-485 bus termination | 2 (only on last drive) | Activates internal 120 Ω, do NOT duplicate with external resistor |
| P2040 | Process data cycle time (ms) | 20 | Determines ZSW update period |
| P2103 | Acknowledge source for faults | 5 | Fault acknowledge (OFF/ON edge) from USS control word bit 7 |
| P2104 | Fault source for F72 timeout | 3 | F72 = USS/MODBUS setpoint fault, reported on PKW |
Save with P0971 = 1 (transfer from RAM to EEPROM) before cycling power, or set P0010 = 0 and P0970 = 1 for a full factory reset and re-parameterization.
Status Word (ZSW) and Fault Word Bit Decoding
The V20 returns a 16-bit status word as the first PZD of every USS telegram. Faults and warnings are encoded in fixed bits, identical to the SINAMICS S/G/S120 family. The bit numbering below is the convention used in TIA Portal (bit 0 = LSB).
| Bit | Mnemonic | Meaning | PLC interpretation |
|---|---|---|---|
| 0 | RDY_ON | Ready to switch on | Precharge OK, no precharge inhibit |
| 1 | RDY_RUN | Ready for operation | Power stage healthy, enable possible |
| 2 | OP_EN | Operation enabled | Drive in RUN state (4-quadrant closed loop) |
| 3 | FAULT | Fault present | Use this bit as the fault-active flag in the PLC |
| 4 | OFF2 | Coast to stop active | STW.1 = 0 acknowledged |
| 5 | OFF3 | Quick stop active | STW.2 = 0 acknowledged |
| 6 | INHIBIT | Switch-on inhibited | Restart lockout active, needs STW edge 0→1 on bit 0 |
| 7 | ALARM | Warning active | Warning, drive still runs |
| 8 | SP_ERR | Set/actual deviation | Speed out of tolerance window |
| 9 | CTRL_REQ | Control requested | Automation must take control (bus lost) |
| 10 | F_REACHED | f ≥ fmax reached | Setpoint reached |
| 11 | I_M_P_LIM | Current/torque/power limit | Drive in limit |
| 12 | BRK_OPEN | Motor holding brake open | External brake release signal |
| 13 | THERM_MOT_W | Motor thermal warning | I²t motor model alarm |
| 14 | ROT_FWD | Direction = forward | 1 = forward, 0 = reverse |
| 15 | THERM_PWR_W | Power section thermal warning | Heatsink alarm |
TIA Portal USS_PYM Library Integration
USS_PYM_232 is a function block published by Siemens specifically to drive a SINAMICS V20 from an S7-1200. The block handles the cyclic PZD, the acyclic PKW (read/write parameter by index), the inter-character timeout, and the bus idle timer. It is imported as a global library: Options → Global libraries → Open library, navigate to the library shipped with the application document and confirm the trust-rights dialog.
Block interface (key I/O)
| I/O | Type | Description |
|---|---|---|
| PORT | HW_IO | Hardware identifier of the CB 1241 / onboard RS-485 |
| BAUD | Int | Baudrate (4=2400, 5=4800, 6=9600, 7=19200, 8=38400, 9=57600, 12=115200) |
| ADDR | Int | V20 node address (1..31) |
| PKW_LEN | Int | 4 for USS variable-length |
| PZD_LEN | Int | 2 (must equal P2012) |
| TIMEOUT | Time | Telegram timeout, recommend T#1s |
| REQ | Bool | Rising edge initiates a PKW read/write transaction |
| PARAM | Word | Parameter number (e.g. 947 decimal for r0947) |
| VALUE | Word | Value to write (ignored on read) |
| WRITE | Bool | FALSE = read, TRUE = write |
| DONE | Bool | Transaction completed without error |
| ERROR | Bool | Transaction error (see STATUS) |
| STATUS | Word | USS error word: 0 = OK, 0x8001 = timeout, 0x8002 = checksum, 0x8003 = wrong node, 0x8004 = parity, 0x8005 = framing |
| RESULT | Word | Value returned from the drive on a read |
Drop one USS_PYM_232 instance per V20 on the bus. Wire PORT to the hardware identifier of the RS-485 port, set BAUD to the same code as P2010, set ADDR equal to P2011, and connect the cycle output of a 20-ms cyclic OB to the same DB that builds the cyclic PZD. The PZD exchange is implicit; the REQ edge is only required if you want to read an additional parameter (e.g. r0947 for the fault number).
Reading Fault Numbers Acyclically with PKW
Bit 3 of ZSW tells you a fault is present but not which one. To obtain the actual F-code, read one of the following V20 parameters through the PKW channel:
| Parameter | Access | Description |
|---|---|---|
| r0947[0] | Read | Fault number of the most recent fault (e.g. 1 = F1 overcurrent) |
| r0948[0] | Read | Fault time, power-on time in ms (DWord) |
| r0949[0] | Read | Fault value, drive-internal diagnostic |
| r2131[0] | Read | Current fault code (same as r0947 but updated live) |
| r2132[0] | Read | Current warning code (alarms Axxxx) |
| r0052 | Read | CO/BO: status word 1 (raw ZSW) |
| r0021 | Read | Actual filtered frequency, Hz × scaling |
When indexing r0947 in TIA Portal, address index 0 for the latest fault, index 1 for the previous, up to index 7. The V20 keeps eight history entries; you can extend the PLC code to walk them all on a fault edge if you need an HMI log.
Structured Text Code Example
The snippet below shows the typical S7-1200 logic to flag a fault, read the F-code on a rising edge, and surface both to the HMI. It is intended for the OB that runs the USS_PYM_232 instance and a 50-ms watchdog.
// DB "V20_Fault_DB"
// Inputs from USS_PYM_232
iNodeAddr : INT := 1; // matches P2011
iBaud : INT := 6; // 6 = 9600 baud
wPZD_OUT : ARRAY[0..1] OF WORD; // ZSW, NIST
wPKW_RESULT : WORD; // result from last PKW read
bUSS_Done : BOOL;
bUSS_Error : BOOL;
wUSS_Status : WORD;
// Derived flags
bFaultActive : BOOL; // mirrored from ZSW bit 3
bWarningActive : BOOL; // mirrored from ZSW bit 7
wFaultCode : WORD; // F-code from r0947[0]
dFaultTime : DWORD; // r0948[0] in ms
bNewFault : BOOL; // edge memory
// 1. Decode ZSW from the cyclic PZD (auto-delivered)
bFaultActive := wPZD_OUT[0].%X3; // ZSW bit 3 = FAULT
bWarningActive := wPZD_OUT[0].%X7; // ZSW bit 7 = ALARM
// 2. On rising edge of bFaultActive, request a PKW read of r0947
IF bFaultActive AND NOT bNewFault THEN
bNewFault := TRUE;
bPKW_Req := TRUE; // connect to USS_PYM_232.REQ
wPKW_Param := 947; // r0947
bPKW_Write := FALSE; // read mode
END_IF;
// 3. On completion, latch the fault code
IF bPKW_Req AND bUSS_Done AND NOT bUSS_Error THEN
wFaultCode := wPKW_RESULT;
bPKW_Req := FALSE;
END_IF;
// 4. Fault clears on ZSW.3 going low and user ack on STW.7
IF NOT bFaultActive THEN
bNewFault := FALSE;
// optional: also clear wFaultCode after HMI has read it
END_IF;
// 5. Optional: HMI mapping
// HMI tag "DriveFaultActive" <- DB.bFaultActive
// HMI tag "DriveFaultCode" <- DB.wFaultCode
// HMI tag "DriveWarning" <- DB.bWarningActive
wordVar.%X3 extracts bit 3 of the Word. The result is a Bool. Adjust to wPZD_OUT[0].X3 if your compiler is older than V14.SINAMICS V20 Fault Code Reference
The most common V20 fault numbers reported in the field. Full list is in the V20 List Manual on Siemens Online Support (entry ID 109479590).
| Code | Name | Cause | PLC action |
|---|---|---|---|
| F1 | Overcurrent | Motor stalled, short, ramp too steep | Stop process, log ramp times |
| F2 | Overvoltage | Regenerative, line dip ride-through | Extend decel ramp, add brake resistor |
| F3 | Undervoltage | Line drop, weak supply | Alarm only if brief; trip if sustained |
| F4 | Motor overload | I²t motor model tripped | Check P0305, P0307, mechanical load |
| F5 | Inverter overload | I²t power module | Reduce load, increase drive size |
| F6 | Overtemperature (heatsink) | Fan failed, ambient > 40 °C | Inspect fan, derate |
| F11 | Motor overcurrent | Current limit exceeded at low speed | Check motor insulation, encoder |
| F20 | Too many parameter changes | > 1000 writes/min | Stagger PLC writes |
| F41 | Motor ID failure | Auto-tune aborted | Re-run ID with motor uncoupled |
| F51/F52 | Parameter save failure | EEPROM wear | Replace drive |
| F60/F61/F62 | Internal data/comm failure | CPU flash, RTC | Power cycle; replace if persistent |
| F63 | Incompatible parameter | Downloaded wrong parameter set | Factory reset, reload |
| F64 | Incompatible firmware | Mismatched FW on dual-flash | Re-flash with matching V20 FW |
| F71 | USS setpoint fault | No telegram in P2014 window | Check cable, baud, P2014 timeout |
| F72 | USS/MODBUS setpoint fault | Same as F71 (P2104 routed) | Same: shorten USS_PYM cycle, lengthen P2014 |
| F80 | Signal loss on AI | 4-20 mA loop broken | Wiring; P0756 = 0/1 to match sensor |
| F85 | External fault | DI configured with P2102 = 99 | Check DI wiring |
| F100/F101/F105 | Watchdog / internal | Firmware or stack failure | Power cycle; replace if recurring |
Commissioning Verification Procedure
- Power up the V20 with the RS-485 cable disconnected. Navigate to
P0010 = 0→P2010 = 6(9600 baud) →P2011 = 1(node 1) →P2012 = 2→P2013 = 4→P2014 = 500ms. Save withP0971 = 1. - Set command source:
P0700 = 5, setpoint source:P1000 = 5. - Power down, connect the RS-485 cable between the S7-1200 and the V20, and enable termination only on the drive (
P2023 = 2) and the S7-1200 side (DIP switch on the CPU or CB 1241). - In TIA Portal, import the global library containing
USS_PYM_232. Place a single instance DB in the project tree, wirePORTto the RS-485 hardware identifier. - Insert the instance call inside a 20 ms cyclic OB. Compile and download to the S7-1200.
- Go online and monitor the instance
STATUSoutput. A value of16#0000means the bus is healthy. Anything in the16#8xxxrange is a bus or timeout error. - Force the ZSW word in the watch table. At idle, ZSW =
16#0C31(bits 0, 1, 4, 5 set = ready and inhibited). If you see16#0C30for more than a second, your bus is dropping. - From the S7-1200, raise
STW.0, thenSTW.1, thenSTW.3in that order. ZSW bits 0, 1, 2 must follow. The drive is now in Operation enabled. - Trigger a fault (e.g. unplug the motor). Verify that within one telegram cycle,
ZSW.3rises in the PLC, and the read ofr0947returns the F-code for "motor overload". - Acknowledge with
STW.7edge 0→1.ZSW.3must clear within one cycle.
ZSW.3 = 0 is seen.Troubleshooting Matrix
| Symptom | Likely cause | Verify / fix |
|---|---|---|
| ZSW always 0 | Wrong baud, polarity swap, no termination | Compare P2010 to USS_PYM BAUD; swap P+ and N-; check 120 Ω across the bus |
| ZSW oscillates between valid values and 0 | Intermittent connection, EMI on cable, multiple terminations | Use shielded cable grounded at one end; remove duplicate 120 Ω |
| ZSW bit 3 = 1, but PKW read of r0947 returns 0 | PKW_REQ wired to wrong edge, or P2013 = 0 | Set P2013 = 4; verify REQ is a 50 ms pulse, not a level |
| Drive faults F72 immediately after start | PLC cycle > P2014 (default 500 ms) | Reduce PLC OB1 scan, call USS_PYM_232 in a fast OB (e.g. 10 ms) |
| Drive faults F71/F72 only during HMI download | TIA Portal download blocks CPU for > P2014 | Set P2014 ≥ 2000 ms while commissioning, restore to 500 ms in production |
| ZSW bit 7 (warning) stuck on | Analog input signal loss (A5012 = signal loss AI1) | Set P0756 = 0 (0-10 V) and P0776 = 0; check sensor wiring |
| ZSW bit 6 (inhibit) never clears | STW bit 0 not pulsed after fault | Toggle STW.0 with edge 0→1 after ZSW.3 falls |
| STATUS = 16#8001 from USS_PYM_232 | No reply within TIMEOUT | Increase TIMEOUT; check P2014 > TIMEOUT |
| STATUS = 16#8003 | Address mismatch | Match P2011 with the ADDR input on USS_PYM_232 |
| STATUS = 16#8002 / 16#8004 / 16#8005 | BCC, parity, or framing error | Check baud rate; verify only one master on the bus; check cable shielding |
| Fault code comes back as the index, not the value | PKW read of array element with wrong index | Read r0947 with index 0; the value is the F-code, not a parameter number |
| HMI sees the fault arrive only after pressing the start button | Read of r0947 gated on the start edge | Read r0947 on any fault-edge of ZSW.3, not on the start command |
Edge Cases and Field-Proven Caveats
PKW index handling: USS_PYM_232 always reads the value of the parameter, not the parameter descriptor. To walk the fault history, request parameter 947 with index 0, then 1, etc. The drive returns 0 once the history is exhausted. Do not confuse this with the parameter number itself.
Multi-drive bus: Multiple V20s on the same RS-485 port is supported up to 31 nodes. Each drive must have a unique P2011, and each PLC application should instantiate one USS_PYM_232 per drive. Sharing a single instance between drives will not work because the function block holds the bus for the duration of the transaction.
Long cables and baud: At 9600 baud, the V20 supports up to 1000 m of cable. At 115200 baud, drop to 50 m. If you must go further or faster, move to PROFIBUS with a SINAMICS V20 + PROFIBUS option (which the V20 does not have natively) or upgrade the drive to a SINAMICS V90/G120 with PROFINET.
Drive fault buffer reset: Reading r0947 does not clear the fault. To clear, the PLC must (a) drop STW.3, (b) drop STW.0, then (c) raise STW.7 as a pulse after ZSW.3 has fallen. Skipping step (b) leaves the drive in the "inhibit" state.
Fault code 0 vs. no fault: A return value of 0 from r0947[0] does not mean communication is fine. It means the fault buffer is empty. If you trigger a read while ZSW.3 = 1 and you get 0, the bus is probably answering with the wrong index. Check the index parameter of the PKW request and confirm P2013 is non-zero.
FAQ
Does the SINAMICS V20 have a PROFIBUS interface?
No. The V20 only has an RS-485 port that supports USS and MODBUS RTU. If you need PROFIBUS or PROFINET, step up to a SINAMICS V90, G110M, G120, or G120C with the matching communication module.
Can the V20 push a fault to the PLC on its own?
No. USS is a master/slave protocol and the S7-1200 is the master. The drive can only return a fault code when the PLC polls the status word (PZD) or reads r0947 (PKW). The "fault present" flag is bit 3 of the status word, delivered automatically with every PZD poll.
Which parameter holds the current fault number?
r0947[0] returns the most recent fault number, and r2131[0] returns the live current fault. For warnings, read r2132[0]. The mapping from number to text is given in the V20 List Manual, and the most common codes are listed in the table above.
Why does my drive fault F72 the moment I go online with TIA Portal?
F72 (or F71) is the USS/MODBUS setpoint timeout. The default window is P2014 = 500 ms. When TIA Portal holds the CPU during a download, the USS_PYM_232 instance stops polling and the drive decides the bus is dead. Set P2014 to 2000 ms during commissioning and restore it to 500 ms for production.
What is the minimum TIA Portal / firmware combination for USS_PYM_232?
TIA Portal V15.1 with S7-1200 CPU firmware V4.2 or later is the documented minimum in the V20 application document. V17/V18 with the same USS_PYM library is recommended for new projects and provides the better diagnostic STATUS words (16#8xxx breakdown shown above).
How many V20 drives can I connect to a single S7-1200 RS-485 port?
Up to 31 nodes per port, each with a unique P2011 value from 1 to 31. Each drive needs its own USS_PYM_232 instance DB and its own PKW/PZD request/response buffers; do not share an instance between drives because the function block holds the bus for the full telegram round-trip.