SINAMICS S120 Torque Limit Setting p1520/p1521 from TIA Portal

David Krause13 min read
SiemensTutorial / How-toVFD / Drives
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

1. Problem Overview

Setting the upper and lower torque limits on a SINAMICS S120 drive directly from a TIA Portal HMI fails for most engineers on the first attempt because of how SINAMICS drive parameters must be addressed through the controller, not by binding the IO field directly to the parameter number. The typical symptom: an IO field wired to CU.Axis.Parameter[1520] accepts a value at runtime, but the drive rejects the write and the value does not latch — or the field shows the read-back value but the operator cannot modify it.

This article documents the correct procedure for writing p1520[0] (upper torque limit) and p1521[0] (lower torque limit) from a SIMATIC HMI, plus the read-only display of actual torque via r0081. The procedure is the same for SIMOTION, SIMATIC S7-1500 with TO Axis, and the older SIMATIC S7-300/400 with a standard axis control block, with minor addressing differences noted in the integration sections.

Reference documentation used throughout this article:

Engineering rule. Drive parameters on a SINAMICS S120 are accessed through the controller, not the HMI directly. The HMI writes to a PLC tag, and the controller executes a parameter read/write job against the drive via PROFIdrive acyclic channel (DPV1 / PKW) or via the standard telegram mapped I/O.

2. Prerequisites

Component Minimum Version Notes
TIA Portal V15.1 or later V17 recommended for S120 firmware 5.2 SP3 support
STEP 7 / S7-1500 CPU Firmware 2.5 or later CPU 1515-2 PN or higher for PROFINET IRT
SINAMICS S120 Firmware 4.7 or later CU320-2 PN or CU310-2 PN control unit
SINAMICS Startdrive V15.1 or later Required for drive object integration in TIA Portal
SIMATIC HMI Comfort Panel / WinCC RT TIA WinCC Comfort / Advanced / Professional
PROFINET / PROFIBUS PROFINET IRT or PROFIBUS DP Standard telegram 1, 2, 3, 4, 5, 6, 9, 20, or 102

Configure the drive in TIA Portal using SINAMICS Startdrive. After adding the drive to the project, the drive object becomes available in the device tree as [Drive name] > Drive axis > ... and exposes its parameter list. Verify that the controller is online with the drive and that cyclic communication is green before attempting parameter writes.

3. SINAMICS S120 Torque Limit Parameters

The torque limit function in SINAMICS S120 is a closed-loop limit on the torque setpoint. There are several layers:

Parameter Meaning Unit Range Writability
p1520[0] Upper torque limit (positive direction, motoring) Nm -100000.00 to +100000.00 Online via DPV1 / PLC
p1521[0] Lower torque limit (negative direction, regenerative) Nm -100000.00 to +100000.00 Online via DPV1 / PLC
p1522[0] Upper torque limit, source selection — Fixed values 0–7 Configurable
p1523[0] Lower torque limit, source selection — Fixed values 0–7 Configurable
p1524[0] Upper torque limit scaling % -400.0 to +400.0 Online via DPV1 / PLC
p1525[0] Lower torque limit scaling % -400.0 to +400.0 Online via DPV1 / PLC
r0081[0] Torque utilization actual (M_actual / M_max) % -300.0 to +300.0 Read-only
r0079 Torque setpoint total (M_set) Nm — Read-only
r0031 Torque actual value (M_actual, smoothed) Nm — Read-only

The values are entered in Nm, not in percent, when typed via p1520/p1521 directly. The S120 normalizes them internally against p2003 (reference torque) for telegram scaling. Per the SINAMICS S120 Function Manual: "The value specifies the maximum permissible torque whereby different limits can be parameterized for motor and regenerative mode." This means the upper limit p1520 protects motoring operation and p1521 protects regenerative (braking) operation. Both default to the maximum motor torque and are active immediately on power-up unless overridden by p1522/p1523 sources.

Note on r81 vs r0081. The parameter number in Starter/Startdrive is always the full 4-digit form. r81 is shorthand used in operator chatter; the real-time torque utilization is r0081[0] (in %) and the smoothed torque setpoint is r0079[0] (in Nm). r0031 gives the actual mechanical torque after filter.

4. Why Direct CU.Axis.Parameter Writes Fail

Many engineers drag an IO field onto the screen and bind it to the drive's parameter number. In TIA Portal the path looks correct: DriveAxis > Parameters > p1520[0]. The compile passes. At runtime the field is read-only or the write returns 0x8001 (PROFIdrive error: parameter write protected by controller).

The cause is the PROFIdrive PKW (Parameter-Kennung-Wert) channel. Parameter writes must be initiated by the controller using an acyclic record read/write on the PROFIdrive channel, or the drive must be configured to expose the parameter through a free telegram slot. The HMI tag linked to CU.Axis.Parameter[1520] reads on each cycle but cannot be written without an explicit acyclic job from the PLC program.

The HMI tags in TIA Portal are not equivalent to PLC acyclic parameter access jobs. The HMI tag binding generates a cyclic read of the parameter at the configured update rate. Writes via the same binding route to the drive object interface, but the drive rejects them when the parameter write protection is active or when the controller holds a lock on the parameter set.

5. Step-by-Step: Writing p1520 and p1521 from HMI

Step 1 — Define PLC tags

Create two HMI-visible tags in the PLC tag table of the S7-1500 CPU. These tags are the interface between the HMI and the controller program that actually drives the parameter job.


TYPE "HMI_TorqueLimit"
VERSION : 0.1
   STRUCT
      UpperLimit_Nm   : REAL;   // p1520[0] in Nm
      LowerLimit_Nm   : REAL;   // p1521[0] in Nm
      UpperScale_pct  : REAL;   // p1524[0] in %
      LowerScale_pct  : REAL;   // p1525[0] in %
      WriteTrigger    : BOOL;   // rising edge writes the values
      WriteBusy       : BOOL;
      WriteDone       : BOOL;
      WriteError      : BOOL;
      ErrorId         : DWORD;  // PROFIdrive DPV1 error code
   END_STRUCT;
END_TYPE

Mark the tag structure as accessible from HMI (right-click → "Accessible from HMI").

Step 2 — Implement acyclic parameter write in SCL

Use the S7-1500 WRIT_DPM instruction (formerly DPRD_DAT / DPWR_DAT blocks) to write parameters acyclically. For S7-1500 + Startdrive, the recommended instruction is "WRREC / RREC pattern with the Drive object handle, or use the S7-1500 Motion Control MC_WriteDriveParameter block available in the SINAMICS drive object library.


// SCL sample — write p1520 and p1521 via MC_WriteDriveParameter
// Requires: SINAMICS S120 axis object "Axis_1" in TIA Portal
// HMI writes to: HMI_TorqueLimit.UpperLimit_Nm and .LowerLimit_Nm

IF "HMI_TorqueLimit".WriteTrigger AND NOT "HMI_TorqueLimit".WriteBusy THEN
    "HMI_TorqueLimit".WriteBusy := TRUE;
    "HMI_TorqueLimit".WriteDone := FALSE;
    "HMI_TorqueLimit".WriteError := FALSE;

    // Write p1520[0] (upper torque limit, Nm)
    "dbParamJob".ParameterNumber := 1520;
    "dbParamJob".Index            := 0;     // Index 0
    "dbParamJob".Value            := "HMI_TorqueLimit".UpperLimit_Nm;
    "inst_MC_WriteDriveParameter"(Axis := "Axis_1",
                                  ParameterNumber := 1520,
                                  Index := 0,
                                  Value := "HMI_TorqueLimit".UpperLimit_Nm,
                                  Execute := TRUE,
                                  Done => "HMI_TorqueLimit".WriteDone_1,
                                  Busy  => "HMI_TorqueLimit".WriteBusy_1,
                                  Error => "HMI_TorqueLimit".WriteError_1,
                                  ErrorId => "HMI_TorqueLimit".ErrorId_1);

    // Write p1521[0] (lower torque limit, Nm)
    "inst_MC_WriteDriveParameter_2"(Axis := "Axis_1",
                                  ParameterNumber := 1521,
                                  Index := 0,
                                  Value := "HMI_TorqueLimit".LowerLimit_Nm,
                                  Execute := TRUE,
                                  Done => "HMI_TorqueLimit".WriteDone_2,
                                  Busy  => "HMI_TorqueLimit".WriteBusy_2,
                                  Error => "HMI_TorqueLimit".WriteError_2,
                                  ErrorId => "HMI_TorqueLimit".ErrorId_2);
END_IF;

Reset the trigger on completion. Use a state machine or a simple TON timer to debounce the HMI input. The complete state machine pattern is documented in the S7-1500 / S120 torque limiting application document.

Step 3 — Configure the HMI IO field

On the Comfort Panel screen, drop an IO field and bind its process tag to HMI_TorqueLimit.UpperLimit_Nm. Configure:

  • Mode: Input/output (operator can write)
  • Format: 9999.99 (one decimal place is enough for Nm)
  • Limits: min = -M_max(pump) for the lower IO field; max = +M_max for the upper IO field
  • OnChange event: Set HMI_TorqueLimit.WriteTrigger = TRUE on a rising edge of "Value changed". Reset the trigger after the WriteDone flag in the PLC becomes TRUE.

Use a momentary pushbutton to apply the values, or set the trigger from a "value changed" event of the IO field with a 500 ms debounce.

Step 4 — Read p1520/p1521 back for display

Use MC_ReadDriveParameter to populate the read-back tags every second. Show the current latched value next to the input field so the operator sees confirmation of the write.


// Periodic read of p1520 and p1521 back to HMI
"inst_MC_ReadDriveParameter"(Axis := "Axis_1",
                              ParameterNumber := 1520,
                              Index := 0,
                              ReadOnce := FALSE,
                              CyclicRead := TRUE,
                              Value => "HMI_TorqueLimit".UpperLimit_Nm_Readback);

6. Visualizing Real-Time Torque on the HMI

Three useful read-only parameters for real-time torque display:

Display Source Parameter Engineering Unit Use
Torque utilization r0081[0] % Bar gauge against ±100 %
Torque setpoint r0079[0] Nm Numeric indicator
Torque actual r0031[0] Nm Smoothed mechanical torque

To display r0081[0] in an HMI gauge or numeric field, add a free parameter tag bound to r0081 in the HMI tag table. The Startdrive configuration exposes all drive parameters under the drive object — expand the drive axis, expand "Parameters", filter "r0081", drag it to the HMI tags. The HMI updates the value at the configured refresh rate (default 1 s; minimum 100 ms in Comfort Panel).

Scaling reminder. r0081 is already in %; do not multiply by p2003 or any reference. r0079 and r0031 are in Nm; do not interpret as %.

7. MC_TorqueLimiting — Programmatic Torque Limiting

For dynamic, application-dependent torque limits (winder, force-controlled press, hoisting), use the Motion Control instruction MC_TorqueLimiting from the S7-1500 MotionControl library. The instruction allows activation and deactivation of force/torque limits at runtime, including override of p1520/p1521 from the PLC program.


"inst_MC_TorqueLimiting"(
   Axis              := "Axis_1",
   Enable            := "HMI_TorqueLimit".EnableDynamic,
   LimitUpper        := "HMI_TorqueLimit".UpperLimit_Nm,
   LimitLower        := "HMI_TorqueLimit".LowerLimit_Nm,
   Mode              := MC_TORQUELIMITING_LIMIT_BOTH,
   InOperation       => "HMI_TorqueLimit".LimiterActive,
   Busy              => "HMI_TorqueLimit".LimiterBusy,
   Error             => "HMI_TorqueLimit".LimiterError,
   ErrorId           => "HMI_TorqueLimit".LimiterErrorId
);

Per Siemens: "With the Motion Control instruction 'MC_TorqueLimiting' you can limit the torque effective on the drive. You can activate and deactivate the force/torque limiting at runtime." When the instruction is enabled, it overrides p1520/p1521 with the values provided at LimitUpper / LimitLower. When disabled, the drive returns to the static values stored in p1520/p1521.

The TIA Portal example project linked in the S7-1500 / S120 torque limiting application document includes a ready-to-use SCL FB and HMI screen.

8. Scaling and Reference Values

Reference Parameter Meaning Typical Value (1FK7 / 1FT7 / 1PH8 motors)
p2000 Reference speed 3000 rpm
p2003 Reference torque Equal to motor rated torque (p0303-derived)
p2002 Reference current Equal to motor rated current

When you set p1520[0] = 50.0 Nm on a 100 Nm motor, the drive's internal representation is 50.0 / 100.0 = 0.5 (50 %). This is the value seen on the fieldbus when the parameter is read via PROFIdrive in the standard telegram. If you write the value via the PLC tag and the value shows as if scaled by 1/1000, check that the controller's normalization factor matches p2003 — sometimes Startdrive defaults to a different scaling mode for older firmware (< 4.6).

Firmware caveat. On S120 firmware 4.7 and later, the MC_WriteDriveParameter instruction handles the scaling normalization automatically. On firmware 4.5 and earlier, you may need to write p1520 multiplied by 1/1000 to get the same Nm result — verify with Startdrive trace.

9. PROFIdrive / Telegram Considerations

The torque limit p1520/p1521 is normally written acyclically, not via the standard telegram. However, several control words in extended telegrams allow limiting from the controller in real time:

  • Standard telegram 1: STW1/ZSW1 + NSOLL/NIST — no torque limit word
  • SIEMENS telegram 102: Includes torque limit, similar to standard 6 with extra addends
  • Standard telegram 6: Includes M_LIM (torque limit scaling) and M_ADD (additive torque setpoint)
  • Standard telegram 9: Includes M_LIM with finer resolution

For real-time closed-loop torque control with sub-millisecond latency, use telegram 9 or 102. The HMI write procedure documented above remains valid for slow setpoint changes (operator adjustments, recipe downloads); the cyclic telegram path is reserved for the PLC's own closed-loop logic.

10. Verification Procedure

  1. Go online with the S7-1500 in TIA Portal.
  2. Open the HMI Runtime (Start WinCC RT on the engineering station or run on the panel).
  3. Enter 25.0 Nm into the upper torque limit IO field; click Apply.
  4. In Startdrive, monitor p1520[0] under the drive axis. Verify it reads 25.00 Nm.
  5. Open a trace on the drive. Record r0079 (torque setpoint). Command a torque-controlled motion and confirm the trace plateaus at 25 Nm.
  6. Enter a negative value (e.g. -30.0) in the lower limit field. Verify p1521[0] = -30.00.
  7. Watch the r0081[0] indicator. At full p1520 limit utilization, the bar gauge should read near 100 %.
  8. Force an overshoot: command 150 % of p1520 momentarily. Verify the drive applies the limit and faults off only if the limit is exceeded for the time defined in p1526[0] (torque limit time).

11. Troubleshooting Matrix

Symptom Likely Root Cause Remedy
HMI field shows value, write reverts to old value Parameter is write-protected by controller lock (e.g. p0922 = ... LockBits active) Check p0922 and p1990. Drive parameter write protection prevents HMI-side writes.
Write returns ErrorId 0x8001 PROFIdrive DPV1 error: parameter not writable while drive is in operation Disable the drive (OFF1/OFF2), then write p1520/p1521, then re-enable.
Write returns ErrorId 0x80B1 Parameter number not found / index invalid Verify p1520[0] is the correct format. The trailing [0] is the index, mandatory.
Write returns ErrorId 0x80B5 Parameter not writeable (read-only attribute) Check that the parameter is writable in the current drive state. Some drive objects are read-only on safety-integrated axes.
Value writes but takes no effect on torque p1522/p1523 source selection points to a different value (e.g. connector input) Set p1522[0] = 1520 and p1523[0] = 1521 to use the parameter as the active source.
Value writes but motor only honors upper limit Asymmetric torque limit, p1521 not enabled Set p1523[0] = 1521 to enable the lower limit source.
r0081 shows negative values when stationary Drive reports negative actual torque when no motion (load torque) Normal behavior — r0081 is a signed value. Recalibrate the load if mechanical preload is undesirable.
HMI binding to drive parameter shows "---" Cyclic communication lost or parameter not selected in Startdrive Verify the drive object is online. Re-add the parameter to the HMI tag list if the field is blank.
MC_TorqueLimiting returns busy for >2 s Drive in commissioning mode (p0010 > 0) Set p0010 = 0 to exit commissioning. Retry.

12. Field-Commissioning Checklist

  • Verify the drive is in "Ready to switch on" state (r0002 = 0x21) before writing torque limits
  • Confirm the safe torque off (STO) channel is not active when MC_TorqueLimiting is enabled
  • Test with a small load first: set p1520 = 5 % of M_max, command 50 % torque, confirm clamp
  • Document the HMI tag list with scaling, units, and limits in the project documentation
  • Enable the user-defined parameter set (p0970 = 1) and save the project to retain the torque limits across power cycles
  • Save the RAM to ROM (p0977 = 1) after commissioning to make the values persistent in the CF card

What is the correct parameter number to set the upper torque limit on a SINAMICS S120?

The upper torque limit is p1520[0] and the lower torque limit is p1521[0], both in Nm. To use the parameter values as the active torque limit source, set p1522[0] = 1520 and p1523[0] = 1521. Defaults are ± motor peak torque (p0333 absolute). See the SINAMICS S120 Function Manual.

Why does writing p1520 directly from an HMI IO field not work?

Direct HMI binding to a drive parameter executes a cyclic read but cannot initiate a proper acyclic DPV1 write while the controller is active. The fix is to bind the IO field to a PLC tag and use MC_WriteDriveParameter in SCL to perform the acyclic write to the drive. Documented in the TIA Portal FAQ 109481157.

How do I read the real-time torque on the HMI?

Use r0081[0] for torque utilization in percent (ideal for a bar gauge, range −300 % to +300 %), r0079[0] for the torque setpoint in Nm, and r0031[0] for the smoothed actual torque in Nm. Add the parameter to the HMI tag list and bind a numeric field or bar gauge to it.

What is the difference between p1520/p1521 and MC_TorqueLimiting?

p1520/p1521 are static parameter values that the drive reads on power-up or on explicit save. MC_TorqueLimiting is a runtime Motion Control instruction that overrides p1520/p1521 with dynamic values from the PLC program while enabled. When MC_TorqueLimiting is disabled, the drive returns to the static p1520/p1521 values. See the S7-1500/S120 torque limiting application.

What PROFIdrive telegram should I use for torque limiting on S120?

For dynamic closed-loop torque control use standard telegram 6, 9, or SIEMENS telegram 102. These include the torque limit scaling word (M_LIM) and additive torque setpoint (M_ADD). For slow operator-driven changes via HMI, the acyclic parameter write (DPV1) procedure in this article is sufficient and does not require a specific telegram.

Back to blog