SINAMICS G120 S7-300 PROFINET Speed Control Programming Guide

David Krause26 min read
Motor ControlSiemensTutorial / 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: SINAMICS G120 and SIMATIC S7-300 Integration

The SINAMICS G120 is a modular low-voltage drive family from Siemens used for speed and torque control of asynchronous and synchronous three-phase motors. Each drive consists of a Power Module (PM) that handles the IGBT output stage and a Control Unit (CU) that provides the control logic, I/O, and fieldbus interface. For PROFINET-based control from a SIMATIC S7-300 CPU, the Control Unit must be a PROFINET-enabled variant such as the CU240E-2 PN (6SL3244-0BB12-1BA0) or CU240E-2 PN-F (6SL3244-0BB13-1FA0). The PN-F variant adds Safety Integrated with PROFIsafe for STO, SS1, and SLS functions.

The communication path between a SIMATIC S7-300 CPU (e.g., CPU 315-2 PN/DP, order number 6ES7315-2EH14-0AB0) and the SINAMICS G120 is cyclic PROFINET IO data exchange conforming to the PROFIdrive profile (referenced in IEC 61800-7-1 and IEC 61800-7-304). The PLC acts as the PROFINET IO Controller, and the G120 Control Unit is the PROFINET IO Device. Cyclic process data (PZD = Prozessdaten) is exchanged at the PROFINET send clock, typically 1 ms, 2 ms, or 4 ms, using a configured standard telegram.

The S7-300 family traditionally uses STEP 7 V5.x (SIMATIC Manager) for engineering, NOT TIA Portal. S7-300 CPUs can also be configured in TIA Portal as of V13 SP1. This article covers the STEP 7 V5.5 + HW Config + STARTER workflow, which is the canonical path for the CPU315-2PN/DP. For S7-1500 + Startdrive with the G120, see Siemens Application Example 78788716.

System Architecture

S7-300 CPU 315-2 PN/DP 6ES7315-2EH14-0AB0 PROFINET IO Controller OB1 / OB35 cyclic Managed PROFINET Switch ≥ 100 Mbit/s SCALANCE XC-100 / XB-200 SINAMICS G120 CU240E-2 PN-F PROFINET IO Device Standard Telegram 1 p0922 = 1, p2000 = 1500 rpm Power Module PM240-2 3-ph 400 V, kW-matched Three-Phase Induction Motor IE3 / IE4, nameplate per p0304-p0314 Encoder optional (HTL/TTL) PN PN DC bus U V W

Figure 1 — Reference topology: S7-300 CPU, managed PROFINET switch, SINAMICS G120 with CU240E-2 PN-F, PM240-2 power module, and the connected three-phase motor.

Prerequisites and Hardware

Before commissioning the drive, gather the following components:

  • SIMATIC S7-300 CPU 315-2 PN/DP (6ES7315-2EH14-0AB0) with PROFINET interface on X1 P1R / P2R (RJ45)
  • SINAMICS G120 Power Module (e.g., PM240-2 size A-C, 6SL3210-1PE..) selected for the motor kW rating
  • SINAMICS G120 Control Unit CU240E-2 PN-F (6SL3244-0BB13-1FA0) — supports Safety Integrated
  • STEP 7 V5.5 SP4 or higher with HW Config and NetPro
  • STARTER V4.5 SP1 or higher (or SINAMICS Startdrive V15.1+ as alternative)
  • GSDML file for the CU240E-2 PN-F V4.7 (or matching firmware version), installed via HW Config → Options → Install GSD File
  • PROFINET patch cables (Cat 5e or higher), managed switch recommended (e.g., SCALANCE XC-100)
  • Motor with complete nameplate data for p0304, p0305, p0307, p0310, p0311, p0314, cos φ

Firmware compatibility for the CU240E-2 PN-F: firmware V4.5 or higher is required for full Telegram 1-352 support. Firmware V4.7 SP3 is the current production release as of this writing. Firmware is updated via STARTER (online → accessible nodes → right-click → firmware update).

PROFINET Network Configuration and IP Addressing

Both the S7-300 CPU and the G120 Control Unit require static IPv4 addresses on the same subnet. PROFINET uses name-based addressing for device identification — the IP address alone is insufficient; the PROFINET device name must also match between HW Config and the physical device.

Device Default IP Default Device Name Subnet Mask
S7-300 CPU 315-2 PN/DP 0.0.0.0 (set by user) (not required for controller) 255.255.255.0
G120 CU240E-2 PN-F 0.0.0.0 (set by user) g120-drv1 (factory default may be blank) 255.255.255.0

Use the Primary Setup Tool (PST) or PRONETA to assign the PROFINET device name and IP address to the G120 Control Unit before downloading the STEP 7 hardware configuration. The device name assigned by the tool must match the name configured in HW Config exactly (PROFINET is case-sensitive on device names).

Hardware Configuration in STEP 7 HW Config

  1. Open the S7 project in STEP 7 → SIMATIC Manager → double-click HW Config for the S7-300 station.
  2. From the hardware catalog, navigate to: PROFINET IO → Drives → SINAMICS → SINAMICS G120 → CU240E-2 PN-F → V4.7.
  3. If the device is not in the catalog, install the GSDML file first: Options → Install GSD File → browse to the downloaded GSDML-V2.3xx-... file.
  4. Drag the SINAMICS G120 onto the PROFINET IO system line. STEP 7 will automatically create a PROFINET IO system if one does not exist.
  5. Right-click the G120 → Properties → Ethernet → assign a unique PROFINET device name (e.g., "g120-drv1") and IP address (e.g., 192.168.0.10).
  6. In the device slot list (slot 0), select the standard telegram. For basic speed control, choose Standard Telegram 1.
  7. STEP 7 will display the assigned I/O addresses (typically IW 256 / QW 256 for the first drive in the project). Record these addresses.
  8. Save and compile (Station → Save and Compile), then download (PLC → Download to Target).
For the CU240E-2 PN-F variant, a separate PROFIsafe slot (slot 1) is available for Safety Integrated communication. Configure PROFIsafe parameters (F-source address, F-destination address, watchdog time) on this slot only if the F-CPU is also part of the project. The PROFIsafe slot is independent of the standard telegram and uses a different address range.

Standard Telegram Selection

Standard telegrams are predefined PROFIdrive PZD structures that define the cyclic data layout between the PLC and the drive. Each telegram has a fixed number of words sent and received. The most commonly used telegrams for the SINAMICS G120:

Telegram PZD OUT (PLC → Drive) PZD IN (Drive → PLC) Use Case
Standard Telegram 1 STW1, NSOLL_A ZSW1, NIST_A Basic speed control (most common)
Standard Telegram 2 STW1, NSOLL_A, STW2 ZSW1, NIST_A, ZSW2 Extended setpoint with motpot / fixed setpoints
Standard Telegram 3 STW1, NSOLL_A ZSW1, NIST_A_GLATT Speed control with smoothed actual value
Standard Telegram 4 STW1, NSOLL_A ZSW1, NIST_A, fault buffer Speed control with fault code in PZD
Standard Telegram 20 STW1, NSOLL_A ZSW1, NIST_A, MELD_NAMUR Speed control with NAMUR status word
Standard Telegram 352 STW1, NSOLL_A, M_LIM ZSW1, NIST_A, MELDW, G1_ZSW Speed control with torque limit and diagnostics

For a PID-driven speed reference (the typical use case described in the field report), Standard Telegram 1 is the optimal choice. Each standard telegram occupies 4 bytes of input (drive → PLC) and 4 bytes of output (PLC → drive) on the PROFINET IO system.

Cyclic Telegram Data Structure (Standard Telegram 1)

PLC → Drive (Outputs at QW base address)

Word Offset Signal Name Source Parameter Function
QW + 0 STW1 r2050[0] Control word 1, 16-bit, bit-coded
QW + 2 NSOLL_A r2050[1] Speed setpoint A, 16-bit normalized to p2000

Drive → PLC (Inputs at IW base address)

Word Offset Signal Name Sink Parameter Function
IW + 0 ZSW1 p2051[0] Status word 1, 16-bit, bit-coded
IW + 2 NIST_A p2051[1] Actual speed A, 16-bit normalized to p2000

Assume HW Config assigns base address 256. Then STW1 = QW 256, NSOLL_A = QW 258, ZSW1 = IW 256, NIST_A = IW 258.

PROFIdrive Control Word 1 (STW1) Bit Definitions

Control word 1 follows the PROFIdrive application class 1 (AC1) state machine. The bit assignments per PROFIdrive profile V4.2:

Bit Designation Function
0 ON / OFF1 0 = ramp-down via p1121 then pulse inhibit. 1 = ON, ready to run.
1 OFF2 0 = immediate pulse inhibit, coast to stop. 1 = OFF2 cleared.
2 OFF3 0 = fast stop via p1135 ramp. 1 = OFF3 cleared.
3 Enable operation 0 = inhibit pulses (pulse enable removed). 1 = pulses enabled.
4 Enable ramp generator 0 = freeze ramp-function generator output. 1 = ramp generator active.
5 Unfreeze ramp generator 0 = hold setpoint (ramp input frozen). 1 = ramp input follows setpoint.
6 Enable setpoint 0 = suppress setpoint (output to speed controller = 0). 1 = apply setpoint.
7 Fault acknowledge 0 → 1 rising edge acknowledges pending faults.
8 Jogging bit 0 Reserved for jog functions (not used in AC1).
9 Jogging bit 1 Reserved for jog functions.
10 Control by PLC 1 = PLC has master control. 0 = local/parameter setpoint source.
11 Direction reversal 1 = invert setpoint sign (reverse direction).
12 Reserved Set to 0.
13 Motor potentiometer up Used only with Telegram 2.
14 Motor potentiometer down Used only with Telegram 2.
15 Reserved Set to 0.

Key STW1 values used for the basic on/off sequence:

Drive State STW1 Hex STW1 Binary (bits 0-7) Meaning
Drive OFF (initial power-up) 0x047E 0111 1110 OFF1=0, OFF2=1, OFF3=1, Enable=1, Ramp=1, Unfreeze=1, Setpoint=1
Drive ON (Operation enabled) 0x047F 0111 1111 OFF1=1, OFF2=1, OFF3=1, Enable=1, Ramp=1, Unfreeze=1, Setpoint=1, Ack=1
Coast stop (OFF2 active) 0x047C 0111 1100 OFF2=0 → immediate pulse inhibit
Fast stop (OFF3 active) 0x047A 0111 1010 OFF3=0 → ramp via p1135
Disable setpoint only 0x0477 0111 0111 Bit 6 = 0 → speed controller setpoint = 0

Per PROFIdrive, the proper command sequence for starting the drive is:

  1. Apply 0x047E — drive powers up and enters "Ready to switch on" state (ZSW1 bit 0 = 1).
  2. Apply 0x047F — drive transitions through "Switched on" to "Operation enabled" (ZSW1 bits 0, 1, 2 = 1).
  3. Write the speed setpoint to NSOLL_A (QW 258). The drive ramps to the setpoint via p1120.
  4. For controlled stop: remove bit 0 (OFF1 = 0). The drive ramps down via p1121 then inhibits pulses.
  5. For coast stop: clear bit 1 (OFF2 = 0). Pulses are removed immediately.
  6. For fast stop: clear bit 2 (OFF3 = 0). Drive ramps down via p1135.
  7. For fault acknowledgement: generate a 0 → 1 transition on bit 7 while bits 0-3 are in their normal ON state.

Status Word 1 (ZSW1) Bit Definitions

Bit Designation Meaning when = 1
0 Ready to switch on Initial power-up complete, drive ready to receive ON command.
1 Ready to operate OFF1 can be applied (no faults, line contactor closed if used).
2 Operation enabled Pulses enabled, drive following setpoint.
3 Fault present Drive is faulted. Read r0947 for fault code, r0949 for fault value.
4 Coast stop active (OFF2) OFF2 has been commanded or pulses not yet enabled.
5 Fast stop active (OFF3) OFF3 has been commanded.
6 Switching on inhibited Drive is in safe inhibit state. OFF1-OFF1 transition required to clear.
7 Alarm present Non-fatal warning active. Read r2110 for warning code.
8 Speed setpoint / actual deviation n_set − n_act within tolerance window (p2161 / p2163).
9 Control requested Drive requests master control from PLC (set when p3981 = 1).
10 f or n reached / exceeded Actual speed ≥ reference (p2142).
11 I·t limit reached Motor thermal model limit reached (r0034).
13 Acknowledgement triggered Acknowledgement was successfully processed (rising edge bit 7 of STW1).
14 Direction reversal active Motor is rotating in reverse (negative actual speed).

Speed Setpoint Normalization and Scaling Formulas

NSOLL_A and NIST_A are 16-bit signed integers with a normalized range of -32768 to +32767 (0x8000 to 0x7FFF). The full-scale value 0x4000 (16384 decimal) corresponds to 100% of the reference speed p2000. The effective range is -200% to +200%, although the drive clamps the positive side at p1082 (maximum speed) and the negative side at -p1082.

The normalization formula (PLC side):

NSOLL_A = (n_setpoint_rpm / p2000) × 16384

Equivalently in hexadecimal scaling:

NSOLL_A_hex = (n_setpoint_rpm / p2000) × 0x4000

Example: if p2000 = 1500 rpm (default) and the desired speed is 750 rpm:

NSOLL_A = (750 / 1500) × 16384 = 8192 = 0x2000

For reverse rotation at the same magnitude:

NSOLL_A = (–750 / 1500) × 16384 = –8192 = 0xE000

Decoding NIST_A on the PLC side:

n_actual_rpm = (NIST_A / 16384) × p2000

If the PID controller output is a REAL value in the range -100.0% to +100.0%, the conversion is:

n_setpoint_rpm = (PID_LMN / 100.0) × p2000

Using the SINA_SPEED Function Block

Siemens provides the SINA_SPEED FB (function block 302, instance DB created per drive axis) as part of the SINAMICS standard block library. The FB is documented in Siemens Application Example 58820849. The library is included with STARTER and can also be downloaded free of charge from Siemens Support. SINA_SPEED handles the STW1 state machine transitions, the NSOLL_A scaling, and the fault acknowledgement pulse internally, removing the need for the application engineer to write the state machine manually.

Call interface (STEP 7 V5.5 / TIA Portal V13+):

CALL "SINA_SPEED" , DB302
  AxisNo       := 1              // INT: Drive axis number (from STARTER topology, typically 1 for first drive)
  EnableAxis   := TRUE           // BOOL: Master enable for the FB
  SpeedSp      := #n_setpoint    // REAL: Speed setpoint in rpm (engineering units)
  RefSpeed     := 1500.0         // REAL: p2000 reference speed value
  EnableSp     := TRUE           // BOOL: Enable speed setpoint (drives bit 6 of STW1)
  AckError     := #ack_fault     // BOOL: Pulse to acknowledge faults (rising edge)
  SpeedAct     := #n_actual      // REAL: Actual speed in rpm (engineering units)
  AxisEnabled  := #drv_ready     // BOOL: Drive is in Operation enabled state
  Lockout      := #drv_lockout   // BOOL: Drive is in switching-on inhibited state
  Error        := #fault         // BOOL: TRUE = error active
  ErrorCode    := #err_code      // INT: 0 = OK, 8xxx = drive fault, 8xxx = comm fault
END_CALL

The SINA_SPEED FB internally performs the following operations:

  1. Scales the REAL SpeedSp value to the 16-bit integer NSOLL_A using the formula above and RefSpeed as the reference.
  2. Generates the STW1 state machine based on EnableAxis, EnableSp, and AckError inputs (transitioning 0x047E → 0x047F on rising edges of EnableAxis).
  3. Generates the fault acknowledge pulse on bit 7 of STW1 when AckError has a rising edge.
  4. Decodes ZSW1 bits to produce AxisEnabled, Lockout, and Error outputs.
  5. Scales NIST_A back to REAL engineering units using RefSpeed.

Recommended call location: place SINA_SPEED in a cyclic interrupt OB (OB30-OB38). OB35 at 100 ms is typical for pump, fan, and conveyor applications. OB32 at 10 ms is suitable for higher-bandwidth speed loops. OB1 is acceptable for non-time-critical applications but produces non-deterministic update timing.

Manual Programming without SINA_SPEED

For installations that cannot use the SINA_SPEED library (legacy S7-300F with restricted library, custom state machine requirements, or educational purposes), the drive can be controlled manually by direct PQD/PIW access. The following example assumes DB100 as the data interface block and base address 256 for the drive.

DB100 layout (one drive):

  • DB100.DBX0.0 — Run request (BOOL)
  • DB100.DBX0.1 — Coast stop (OFF2)
  • DB100.DBX0.2 — Emergency stop (OFF3)
  • DB100.DBX0.3 — Fault acknowledge pulse (BOOL)
  • DB100.DBD2 — Speed setpoint (REAL, rpm)
  • DB100.DBD6 — Actual speed (REAL, rpm, feedback)
  • DB100.DBX10.0 — Drive ready (Operation enabled)
  • DB100.DBX10.1 — Drive faulted
  • DB100.DBW12 — Fault code (INT)

OB35 cyclic interrupt code (100 ms execution):

// ====== BUILD STW1 ======
      U     "DB100".DBX0.0           // Run request
      =     "STW1".Bit0             // ON/OFF1
      U     "DB100".DBX0.1           // Coast stop (OFF2)
      SPBN  OFF2_OFF
      R     "STW1".Bit1             // Bit 1 = 0 → OFF2 active
      SPA   OFF2_DONE
OFF2_OFF: S     "STW1".Bit1             // Bit 1 = 1 → OFF2 cleared
OFF2_DONE:
      U     "DB100".DBX0.2           // E-stop (OFF3)
      SPBN  OFF3_OFF
      R     "STW1".Bit2             // Bit 2 = 0 → OFF3 active
      SPA   OFF3_DONE
OFF3_OFF: S     "STW1".Bit2
OFF3_DONE:
      U     "DB100".DBX0.0
      S     "STW1".Bit3             // Enable operation
      S     "STW1".Bit4             // Enable ramp generator
      S     "STW1".Bit5             // Unfreeze ramp generator
      S     "STW1".Bit6             // Enable setpoint
      U     "DB100".DBX0.3
      FP    "ack_edge_mem"          // Positive edge detect
      S     "STW1".Bit7             // Fault acknowledge pulse
      S     "STW1".Bit10            // Control by PLC
      T     "STW1" 
      T     PQD 256                 // Write STW1 to QW 256

// ====== SCALE NSOLL_A ======
      L     "DB100".DBD2            // Load REAL setpoint (rpm)
      L     1500.0                  // Load p2000
      /R
      L     16384.0                 // Load 0x4000
      *R
      RND                           // Round to integer
      T     "NSOLL_A"
      T     PQD 258                 // Write NSOLL_A to QW 258

// ====== READ NIST_A and decode ======
      L     PIW 258                 // Load NIST_A (INT)
      ITD                           // Convert to DINT
      DTR                           // Convert to REAL
      L     16384.0                 
      /R                            // Scale to 1.0 = 100%
      L     1500.0                  // p2000
      *R
      T     "DB100".DBD6            // Save actual speed (rpm)

// ====== DECODE ZSW1 ======
      L     PIW 256                 // ZSW1
      T     "ZSW1"
      U     "ZSW1".Bit2             // Operation enabled
      =     "DB100".DBX10.0
      U     "ZSW1".Bit3             // Fault present
      =     "DB100".DBX10.1
      L     0
      T     "DB100".DBW12           // Clear fault code (read from r0947 via acyclic)
The positive edge detector for fault acknowledge requires a static BOOL memory (e.g., DB100.DBX20.0) to remember the previous state. The example uses "ack_edge_mem". Without edge detection, the fault bit would be held set permanently, preventing subsequent acknowledgements.

Commissioning the G120 in STARTER

  1. Open STARTER → Project → New → Online (accessible nodes via PROFINET).
  2. Click "Accessible nodes" — STARTER will discover the G120 by its PROFINET device name.
  3. Select the G120 and click "Accept" to add it to the project.
  4. Double-click the drive → Configuration wizard launches.
  5. Set the control structure: "Speed control" (V/f or vector control can be selected on the next screen).
  6. Enter motor nameplate data: p0304 (rated voltage V), p0305 (rated current A), p0307 (rated power kW), p0310 (rated frequency Hz), p0311 (rated speed rpm), p0314 (motor pole pair number).
  7. Set the command source: p0700 = 6 (PROFINET / PROFIdrive telegram).
  8. Set the setpoint source: p1000 = 6 (PROFINET setpoint).
  9. Set the standard telegram: p0922 = 1 (or whichever telegram was selected in HW Config).
  10. Set the reference speed: p2000 = rated motor speed from p0311.
  11. Set speed limits: p1080 (minimum speed) ≥ 0, p1082 (maximum speed) ≤ p2000 (typically).
  12. Set ramp times: p1120 (ramp-up seconds), p1121 (ramp-down seconds).
  13. Optional: set p1300 (control mode) = 0 for V/f open-loop or 21 for sensorless vector control.
  14. Optional: motor identification p1900 = 2 (motor identification at standstill + rotating measurement).
  15. Save the configuration to the drive RAM, then RAM → ROM (Copy RAM to ROM).
If you change p0922 in STARTER, you MUST also change the telegram selection in STEP 7 HW Config (and re-download the HW Config to the PLC). Mismatched telegram lengths between the PLC configuration and the drive configuration trigger PROFINET fault F01910 (PZD mapping error) and prevent cyclic communication.

Integrating the PID Loop

The PID FB41 (CONT_C) from the STEP 7 Standard Library outputs a REAL value (LMN) in percent, typically scaled by the LMN_FAC (output factor) and LMN_OFF (output offset) parameters. The default LMN range is -100.0 to +100.0% for bipolar outputs or 0.0 to 100.0% for unipolar.

To connect the PID output to the drive setpoint:

n_setpoint_rpm = (PID_LMN / 100.0) × p2000

For unipolar control (PID output 0-100%):

n_setpoint_rpm = PID_LMN × (p2000 / 100.0)

Example FB41 configuration for a pump speed control loop:

  • SP_INT (setpoint): REAL, 0.0 to 100.0 representing 0% to 100% of flow demand
  • PV_IN (process value): REAL, scaled feedback from 4-20 mA pressure transmitter
  • GAIN: e.g., 0.5 (proportional gain, tune empirically)
  • TI: e.g., 5000 ms (integral time)
  • TD: 0 ms (no derivative action for pump flow)
  • LMN_FAC: 1.0
  • LMN_OFF: 0.0
  • LMN_HLM: 100.0 (output upper limit)
  • LMN_LLM: 0.0 (output lower limit, for unidirectional pump)

Place FB41 and SINA_SPEED in the same cyclic interrupt OB (e.g., OB35 at 100 ms) to ensure consistent sample time. The OB35 cycle time = PID sampling time = drive setpoint update time.

Verification and Diagnostics

PROFINET Connection Verification

  1. Open NetPro in STEP 7 → right-click PROFINET IO system → Target system → Ethernet → Verify. All devices should report OK.
  2. Open HW Config online (PLC → Online View). The G120 should appear with a green check mark.
  3. Physically inspect the G120 LEDs: RDY (green, steady = ready, flashing = startup), BF (bus fault, OFF = OK, red = no connection, red flashing = configuration error).

Drive State Verification via VAT

Open a Variable Table (VAT) in STEP 7 and monitor:

  • QW 256 — STW1 output (control word being sent to drive)
  • QW 258 — NSOLL_A output (speed setpoint being sent)
  • IW 256 — ZSW1 input (drive status word)
  • IW 258 — NIST_A input (actual speed from drive)

Test sequence:\p>

  1. Power up the drive. Observe QW 256 = 0x047E and ZSW1 bit 0 = 1 (Ready to switch on).
  2. Force QW 256 = 0x047F (or trigger Run in your FB). Observe ZSW1 bits 0, 1, 2 = 1 (Operation enabled).
  3. Write NSOLL_A = 0x2000 (representing 750 rpm at p2000 = 1500). Monitor NIST_A as the drive ramps up via p1120.
  4. Verify ZSW1 bit 10 (f or n reached) transitions to 1 when NIST_A ≈ NSOLL_A.
  5. Force QW 256 bit 0 = 0 (OFF1). Observe the drive ramps down via p1121.

STARTER Trace for Dynamic Verification

  1. Open STARTER → select the drive → Tools → Trace.
  2. Add signals: r0021 (actual speed smoothed), r0063 (actual speed unsmoothed), r1114 (ramp-function generator setpoint after ramp), r0080 (torque actual).
  3. Configure trigger: free run for 10 seconds.
  4. Start the trace while commanding a step change in setpoint (e.g., 0 → 1500 rpm).
  5. Verify: actual speed tracks the setpoint with no overshoot (or acceptable overshoot per process requirements); ramp time matches p1120.

Fault Code Reference Table

Fault Code Name Cause Remedy
F01910 PROFINET PZD mapping error Telegram configured in HW Config does not match p0922 in drive; mismatched I/O lengths. Set p0922 to match the HW Config telegram number. Re-download HW Config to PLC.
F08501 PROFIsafe fault 1 (CRC error) PROFIsafe CRC error detected; F-host and F-device parameter mismatch. Verify F-source address matches F-destination address. Check PROFIsafe watchdog time (F_WD_Time).
F08502 PROFIsafe fault 2 (watchdog timeout) No valid PROFIsafe telegram received within F_WD_Time. Increase F_WD_Time in F-CPU safety program. Verify PROFINET connection and CPU run state.
F30001 Power unit overcurrent Short circuit or ground fault on motor cable; motor incorrectly wired. Check motor wiring (U, V, W). Measure insulation resistance. Reduce p0640 (current limit) if motor is undersized.
F30002 DC link overvoltage Excessive regenerative energy during deceleration; line voltage too high. Increase ramp-down time p1121. Install braking resistor. Verify line voltage is within ±10% of nominal.
F30003 DC link undervoltage Line voltage dropped below threshold; phase loss. Check line supply. Verify all three phases are present. Check input fuses.
F30005 Power unit I²T overload Drive output exceeded rated current for too long. Check mechanical load. Verify motor sizing. Reduce load duty cycle.
F30011 Motor overload (thermal model) Motor thermal model (I²T) reached trip threshold. Reduce load. Check p0601 (motor thermal model). Verify ambient temperature.
F30015 Motor cable phase failure One phase of motor cable open. Check motor connections at drive and motor junction box. Test continuity of each phase.
F30802 Encoder signal lost Encoder cable disconnected or damaged; encoder fault. Check encoder cable. Verify shield grounding. Test encoder with oscilloscope.
F7801 Motor overcurrent (internal) Current exceeded drive hardware limit. Check for mechanical jam. Verify motor nameplate data in p0304-p0311.
F7900 Motor blocked / stalled Speed controller at limit, motor not rotating. Check mechanical load. Verify encoder feedback. Increase p2165 stall detection time.
F30021 Ground fault Insulation breakdown, current to ground detected. Measure insulation resistance of motor and cable. Replace damaged cable.
A07901 Motor speed controller at limit Speed controller output saturated (I or P component at limit). Reduce load. Tune speed controller Kp (p1460) and Tn (p1462). Check for mechanical binding.
A08502 PROFIsafe warning Non-fatal PROFIsafe parameter discrepancy. Verify F-parameters. Check PROFIsafe version compatibility.

To read fault codes from the PLC, use SFB52 (RDREC) or SFB53 (WRREC) to read parameter r0947[0..7] (current fault codes) and r0949[0..7] (fault values). The acyclic PROFINET record is index 0x010A (parameter request). For bulk fault buffer reads, use the standard FB305 (SINA_DIAG) or equivalent acyclic functions.

Safety Integration with PROFIsafe

The CU240E-2 PN-F variant supports Safety Integrated with the following PROFIsafe-controlled safety functions:

  • STO (Safe Torque Off) — PROFIsafe bit 0
  • SS1 (Safe Stop 1, time-controlled) — PROFIsafe bit 1
  • SLS (Safely-Limited Speed) — PROFIsafe bit 3 (requires encoder or sensorless safety via p9501)

To enable PROFIsafe safety, the following are required:

  1. F-CPU in the S7-300 family (e.g., CPU 315F-2 PN/DP, 6ES7315-2FJ14-0AB0).
  2. Safety program in the F-runtime group (F-CALL, F-DB with PROFIsafe telegram).
  3. PROFIsafe slot configured in HW Config (slot 1 of the CU240E-2 PN-F) using PROFIsafe profile V2.6.1 or V2.4.
  4. F-source address (PLC) and F-destination address (drive) configured identically on both sides.
  5. PROFIsafe watchdog time F_WD_Time = 100 ms to 500 ms (typically).
Loss of PROFIsafe communication will result in the drive transitioning to the safe state (STO active, pulses inhibited). The F-CPU must complete the PROFIsafe watchdog within the configured F_WD_Time or the drive will trigger PROFIsafe fault F08502 and require manual reset. The PROFIsafe telegram is independent of the standard Telegram 1 and uses a different address range.

For applications requiring only basic STO without PROFIsafe, use the on-board STO terminals on the CU240E-2 PN-F (terminals EP+1 / EP+2 / SH). A fail-safe signal applied to EP+1 and EP+2 activates STO. This configuration does not require an F-CPU and is sufficient for many machine safety applications per ISO 13849-1 PL d or SIL 2.

Performance Optimization

  • PROFINET send clock: Default is 1 ms. Set via HW Config → PROFINET IO system properties → Real-time settings → Send clock. For pump/fan applications, 2 ms or 4 ms reduces network CPU load without significant control degradation.
  • Cyclic OB interval: 100 ms (OB35) is typical. For higher dynamic response, use 10 ms (OB32) or 4 ms (OB30). Faster times require the CPU to have sufficient headroom (check OB1 cycle time remains well under 100 ms).
  • Speed controller tuning: Default Kp (p1460) and Tn (p1462) are set for a Siemens 4-pole standard motor. For non-standard motors, run autotune (p1960 = 1 for rotating measurement). The PI speed controller output is the torque setpoint, which is limited by p1520 (torque lower limit) and p1521 (torque upper limit).
  • Setpoint filter: For noisy PID outputs, enable the setpoint filter (p2261 = 1, PT1 low-pass) and tune p2262 (filter time constant) to a value 1/5 to 1/10 of the dominant process time constant.
  • Actual speed smoothing: If using Standard Telegram 1, NIST_A is the unsmoothed actual speed. If the feedback is noisy, switch to Standard Telegram 3 which provides NIST_A_GLATT (smoothed via p0045 time constant).

Migration Path to TIA Portal and Startdrive

Siemens recommends TIA Portal V17 with Startdrive V17 as the modern engineering environment for new SINAMICS G120 projects. The migration benefits include:

  • Integrated hardware catalog without separate GSD file management
  • Graphical commissioning wizards for the drive and motor
  • Axis technology object (TO_Speed) for S7-1500 motion control functions (MC_Power, MC_MoveVelocity, MC_Stop per PLCopen standard)
  • Integrated safety engineering with Safety Integrated in the TIA Portal
  • Web server on the S7-1500 CPU for remote drive diagnostics
  • Automatic consistency check between PLC program and drive configuration

The S7-300 + STEP 7 V5.x + STARTER workflow documented in this article remains fully supported by Siemens and is appropriate for legacy projects or where S7-300 hardware is mandated. For new applications, the S7-1500 + Startdrive platform is recommended.

Troubleshooting Matrix

Symptom Probable Cause Diagnostic Step Resolution
BF LED solid red on G120 PROFINET connection lost or device name mismatch Check PROFINET device name with PRONETA; verify cable Re-assign PROFINET device name to match HW Config exactly; check cable
BF LED red flashing No PROFINET controller (CPU not in RUN or wrong subnet) Check PLC PROFINET interface state in HW Config Place CPU in RUN; verify IP address on same subnet; verify PROFINET device name on drive
Drive does not start, ZSW1 bit 0 = 0 STW1 bit 0 (OFF1) not set; drive not powered Monitor QW 256 in VAT Ensure bit 0 = 1 in output word; check 24 V supply to CU
Drive does not start, ZSW1 bit 6 = 1 (switch-on inhibited) STW1 has invalid bit pattern; OFF1-OFF1 transition needed Read ZSW1 bit 6; check STW1 sequence Apply 0x047E then 0x047F sequence; clear faults first
F01910 PROFINET fault Telegram mismatch between PLC and drive Compare p0922 in drive with HW Config telegram slot Set both to the same telegram number; re-download HW Config
F08501 PROFIsafe fault PROFIsafe F-address mismatch or F-WD_Time too short Check F-source and F-destination addresses in F-CPU and drive Verify addresses match; increase F_WD_Time to at least 100 ms
Motor runs but speed is wrong by fixed factor p2000 not matched to setpoint scaling Check p2000 in STARTER expert list Set RefSpeed input of SINA_SPEED = p2000, or scale NSOLL_A manually
Motor runs in wrong direction Phase sequence reversed at motor OR setpoint sign wrong Check motor wiring U-V-W; check NSOLL_A sign Swap two phases at motor terminals OR negate setpoint in PLC
PID output saturates at LMN_HLM PID output range mismatch with setpoint scaling Monitor FB41 LMN value in VAT Adjust LMN_FAC/LMN_OFF; verify LMN_HLM/LMN_LLM match process range
Communication timeout (F08502) PROFINET watchdog timeout exceeded Check PROFINET send clock and watchdog time Increase watchdog time in HW Config; reduce network load; verify all switches are managed
Motor runs but ramps very slowly Ramp times p1120 / p1121 set too long Check p1120, p1121 in STARTER Reduce ramp times to application requirements (typical 5-30 s)
Overshoot during setpoint changes Speed controller Kp too high or Tn too low Run STARTER trace with r0063, r1114 Reduce p1460 (Kp) by 20%; increase p1462 (Tn)
Drive faults F30005 on acceleration Load inertia too high; ramp too aggressive Check load inertia vs motor inertia ratio Increase ramp-up time p1120; check p0640 (current limit)
Communication works in OB1 but not in OB35 OB35 cycle time too short for FB execution Check OB35 execution time in PLC diagnostic buffer Reduce OB35 load; increase OB35 cycle time; use SFC26 for time stamping

FAQ

What is the difference between Standard Telegram 1 and Standard Telegram 2 for the SINAMICS G120?

Standard Telegram 1 has 2 PZD words (STW1 + NSOLL_A outputs, ZSW1 + NIST_A inputs) for basic speed control. Standard Telegram 2 adds a third word: STW2 (extended control word 2) on the output and ZSW2 (extended status word 2) on the input, allowing control of additional bits like motor potentiometer up/down, fixed setpoint selection, and ramp-function generator bypass. Use Telegram 1 for simple speed-following applications and Telegram 2 when extended control functionality via PLC is required.

Why does my G120 drive fault with F01910 after starting the PLC?

F01910 indicates a PROFINET PZD mapping error between the PLC and the drive. The most common cause is a mismatch between the telegram number configured in HW Config (slot 0 of the G120 in the PROFINET IO system) and the parameter p0922 in the drive. Verify both are set to the same value (e.g., 1 for Standard Telegram 1). Mismatched I/O lengths, missing or extra PZD words, or a GSD file version mismatch also cause F01910.

Can I call SINA_SPEED from OB1 or must it be in a cyclic interrupt OB?

SINA_SPEED can be called from OB1, but the recommended location is a cyclic interrupt OB (OB30-OB38) with a configured execution interval (e.g., 100 ms for OB35, 10 ms for OB32). Calling from OB1 produces a non-deterministic update rate that depends on the OB1 cycle time, which fluctuates with program length and communication load. For PID control loops with a defined sample time, place both the PID FB (FB41) and SINA_SPEED in the same cyclic OB and set the OB cycle time equal to the PID sampling time.

How do I acknowledge a drive fault from the PLC program?

Send a rising edge (0 → 1 transition) on bit 7 of STW1 (control word 1) while bits 0-3 are in their normal ON state. The STW1 value for fault acknowledgement with the drive running is 0x047F (the bit 7 transition from 0 to 1 triggers the acknowledgement). If using SINA_SPEED, set the AckError input to TRUE for one PLC cycle (use a positive edge detector like FP on a static BOOL memory) to generate the rising edge internally. The drive will acknowledge the fault and reset ZSW1 bit 3 (fault present).

What is the maximum PROFINET update rate for the SINAMICS G120?

The CU240E-2 PN and CU240E-2 PN-F Control Units support PROFINET send clocks of 0.5 ms, 1 ms, 2 ms, and 4 ms (set in HW Config under PROFINET IO system properties → Real-time settings → Send clock). For standard speed control of pumps, fans, and conveyors, 2 ms is sufficient and reduces network CPU load. For high-dynamic positioning applications (with CU250S-2 PN), 1 ms or 0.5 ms is recommended. Lower send clocks (4 ms or longer) reduce network load but increase control loop latency.

Back to blog