Problem Overview: Force Control Without an External Sensor
A SIMOTION P350 controller running SIMOTION SCOUT 4.1.1.6 with a SINAMICS S120 (CU320 DP) is driving non-Siemens linear and rotary motors. Position control is fully operational, but the application requires that contact force at a mechanical stop be capped to a known maximum. The naive approach of _setForceCommandValue() combined with _runMotionInPositionLockedForceProfile() fails because SIMOTION forces the axis wizard into the configuration mode standard with force, which in turn requires a physical external force sensor to be declared. The actual force (drive parameter r0080) is already being transferred by PROFIBUS and updates in real time when force is applied by hand on a stationary motor, but the axis configuration block refuses to accept a drive parameter as a sensor source, and the wizard rejects the axis with the alarm axis must be configured as standard with force.
This reference documents the working configuration that replaces the missing force sensor: SIMOTION torque limiting driven by the drive's own actual force value (r0080) carried in a Telegram 105 extension. The result is a closed force clamp using only the data that SINAMICS S120 already publishes, with no external transducer, no bit/raw-to-physics scaling wizard, and no standard with force axis type. It is the path the Siemens support engineers recommended for applications that already have the actual force value inside the drive and that do not need explicit force-loop regulation, only a torque ceiling.
forceActualValueSetting.value system variable becomes available from V4.0 upward. Refer to the Siemens Industry Online Support for the SIMOTION system function reference and the SINAMICS S120 List Manual for parameter definitions.Force Control vs. Torque Limiting: Architectural Decision
| Function | Force control (closed loop) | Torque limiting (clamping) |
|---|---|---|
| Axis type required | standard with force | standard |
| External sensor | Mandatory in axis wizard | Not required |
| Drive parameter r0080 | Used as feedback only | Used as input to torque clamp |
| Response | Force command tracking | Torque clamped to limit, position still controlled |
| Stability risk on non-stiff mechanics | High | Low - position loop remains active |
| SIMOTION API |
_setForceCommandValue, _runMotionInPositionLockedForceProfile
|
_enableTorqueLimiting, _disableTorqueLimiting
|
| Data path | Actual value → SIMOTION force controller → torque setpoint | Torque limit → drive torque controller; r0080 still observable |
| Typical applications | Constant-force grinding, polishing, finishing | Press-fit, joining, end-stop protection, overload clamp |
For press-fit, joining, end-stop-protection, and overload-clamp applications the torque-limiting architecture is the correct choice: the position loop remains in control, the drive current is clamped to a value that corresponds to the maximum permissible force, and the mechanical contact is reached without instability. The actual force value remains observable and can be logged or used for process decisions, but the controller does not try to regulate it directly. The force control path is reserved for cases where a closed force loop is required, and it must be paired with a real sensor or with the forceActualValueSetting.value virtual-sensor path described later in this document.
Prerequisites and Tooling
- SIMOTION P350 (6AU1 350-xAxx-xAAx) with SIMOTION V4.1 SP1 or higher. The P350 is a SIMOTION PC-based controller; the steps apply equally to the P320 and D4x5 hardware with the same firmware family.
- SINAMICS S120 with CU320 DP (or CU320-2 PN) control unit, firmware V4.x or higher. The same procedure applies to CU310 DP/PN with the appropriate telegram.
- SIMOTION SCOUT 4.1.1.6 (or later in the V4.1 / V4.2 / V5.x line).
- Configured PROFIBUS (or PROFINET) link from SIMOTION to the SINAMICS drive, with standard Telegram 105 (32-bit position servo) or 106 (64-bit position servo) already selected on the drive.
- Drive parameter access to r0080 (actual force value, smoothed) verified in the SINAMICS expert list. For rotary motors r0080 is actual torque in Nm; for the linear-motor case the same parameter carries the actual force in N after the linear scaling (p1192/p1193) has been activated in the drive.
- Mechanical stop position known and within the axis travel range; the stop must be reachable without exceeding the configured torque limit at any intermediate position.
Telegram 105 is the standard SIMOTION servo telegram (PZD1/PZD2 = 32-bit position setpoint, PZD3 = 32-bit velocity setpoint, PZD4 = 16-bit torque/force setpoint, PZD5 = status word, PZD6 = actual position, PZD7 = actual velocity, PZD8 = actual torque/force, PZD9 = status word 2). Telegram 106 is the 64-bit position variant. Both support telegram extensions (additional PZDs) - this is the slot into which the raw r0080 value will be wired for diagnostic purposes, although the torque-limiting path itself does not strictly require the extension, since the drive internally closes the torque loop.
Step 1: Telegram 105 PZD Layout and Extension for r0080
Open the drive in SCOUT, navigate to Configuration → Message Frame Configuration, and confirm the active telegram is 105 (or 106). The PZD layout of Telegram 105 is shown in the table below; the extension slot is appended after PZD9 on the drive side and is reflected in the SIMOTION I/O mapping.
| PZD slot | Direction | Width | Signal |
|---|---|---|---|
| 1 | SIMOTION → drive | 32 bit | Position setpoint (MDI / DSC) |
| 2 | SIMOTION → drive | 32 bit | Velocity setpoint (additive) |
| 3 | SIMOTION → drive | 16 bit | Torque / force setpoint add |
| 4 | Drive → SIMOTION | 16 bit | Status word 1 |
| 5 | Drive → SIMOTION | 32 bit | Actual position (Gx_XIST1) |
| 6 | Drive → SIMOTION | 32 bit | Actual velocity (NIST_B) |
| 7 | Drive → SIMOTION | 16 bit | Actual torque / force (smoothed) |
| 8 | Drive → SIMOTION | 16 bit | Status word 2 |
| 9 (extension) | Drive → SIMOTION | 32 bit | r0080 actual force / torque (diagnostic) |
Add a telegram extension for one additional DWORD (4 bytes) and assign SINAMICS parameter r0080 as the source on the drive side. The resulting I/O addresses are visible in the configuration dialog and must be recorded - they are referenced by the SIMOTION technology object during commissioning for trace and diagnostic purposes, and they are also the value the user can read with %IW from a user program if a calculated force value is needed.
For verification, browse the SINAMICS expert list online and confirm that r0080 updates when a force is applied manually to the motor shaft. This is the same value the SIMOTION technology object will read. Record the polarity: positive = motor-side force / torque in the mechanical positive direction, negative = opposite. Confirm the polarity matches the application's sign convention before proceeding.
Step 2: r0080 vs r0031 and Drive-Side Scaling
SINAMICS S120 provides two actual-force-related signals:
- r0080 - actual torque/force, smoothed with the p0045 time constant (default 1 ms). Use this for force limiting; the smoothing prevents torque-ripple noise from prematurely activating the clamp.
- r0031 - actual torque/force, unsmoothed (raw from the current controller). Use only for fast diagnostic and only when the bandwidth of r0080 is insufficient.
The drive-side reference is set with p2003 (reference torque / reference force) and the value is transmitted as 0x4000 0000 = p2003. Verify p2003 matches the maximum force you intend to use; if the drive reference is 2× the mechanical limit, the r0080 value will saturate at 50 % of the SIMOTION limit and the clamp will appear to be too low. Set p2003 to the maximum force the drive can deliver at peak current, not to the application's mechanical limit.
Step 3: Axis Configuration - Standard with Technology Data Block
Open the axis wizard in SCOUT and select standard (not standard with force). Complete the wizard with the motor, encoder, and PROFIBUS data as for the existing position-controlled axis. On the configuration summary page enable the option Use technology data block (also labelled Configuration data / System variables) - this exposes the expert list entries required in Step 4 and Step 5. Without the technology data block, the expert list is read-only and the runtime torque limit cannot be written from a user program.
_enableTorqueLimiting is called, at which point the torque command is clamped to the configured limit and the position loop continues to operate.Step 4: TypeOfAxis.SetPointDriverInfo - Maximum Force or Torque
With the technology data block enabled, open the axis expert list in SCOUT (online, with the project loaded) and write the maximum permissible force or torque to the configuration data element:
TypeOfAxis.SetPointDriverInfo.(LinearMotor)DriveData.max(Force or Torque) = <MAX_FORCE_OR_TORQUE>
For a linear motor the value is in N; for a rotary motor it is in Nm. The unit must match the unit the drive is reporting in r0080 (controlled by p2003 and p0505 for linear-force scaling). Typical starting points are 1.2-1.5 × the steady-state contact force, allowing for dynamic overshoot; for a press-fit example with a press force of 5000 N and dynamic contact, set 6500 N. The expert list entry is configuration data - it must be written during commissioning (or downloaded as part of the project) and persists across reboots.
Step 5: UserDefaultTorqueLimiting.torqueLimit
Set the runtime torque limit on the same axis. This system variable is read every IPO cycle and applied to the drive torque limit when _enableTorqueLimiting is active:
UserDefaultTorqueLimiting.torqueLimit = <MAX_FORCE_OR_TORQUE>
This value is the upper bound the SIMOTION axis writes to the SINAMICS torque limit channel when _enableTorqueLimiting() is called. It must match (or be less than) the maximum entered in Step 4, otherwise the drive-side limit becomes the binding one and the SIMOTION limit is silently clamped. The system variable is in the same unit as the configuration data (N for linear, Nm for rotary).
UserDefaultTorqueLimiting.torqueLimit / p2003 × 0x4000 0000, and p1521 ≤ -UserDefaultTorqueLimiting.torqueLimit / p2003 × 0x4000 0000.Step 6: Runtime Activation with _enableTorqueLimiting()
At runtime, call the SIMOTION system functions on the motion task that owns the axis. The pattern is:
// Activate torque limiting with the configured limit
retVal := _enableTorqueLimiting(axis := axisName);
// ... motion runs, drive is clamped to UserDefaultTorqueLimiting.torqueLimit ...
// Deactivate at end of motion
retVal := _disableTorqueLimiting(axis := axisName);
Refer to the SIMOTION system functions reference for the full signature and return codes. Typical return codes are 0 = OK, 1 = axis not in the expected state (e.g. not homed or not enabled), and other values indicating configuration errors. The functions act on the drive torque-limit channel; the position loop remains active throughout, and the actual force (r0080) is observable on the trace or via actualForceValue in the axis system variables.
ST Code Example: Cyclic Force Limiting Block
FUNCTION_BLOCK forceLimit
VAR_INPUT
axis : AXIS_REF;
enable : BOOL;
forceLimitN : LREAL; // physical unit, N or Nm depending on axis type
END_VAR
VAR
ret : DINT;
state : INT := 0;
END_VAR
CASE state OF
0: // wait for enable
IF enable THEN state := 10; END_IF;
10: // apply limit and activate
axis.UserDefaultTorqueLimiting.torqueLimit := forceLimitN;
ret := _enableTorqueLimiting(axis := axis);
IF ret = 0 THEN state := 20; END_IF;
20: // hold - position loop active, torque clamped
IF NOT enable THEN state := 30; END_IF;
30: // release
ret := _disableTorqueLimiting(axis := axis);
state := 0;
END_CASE;
END_FUNCTION_BLOCK
Call this block from a motion task at IPO or IPOSync priority. The block updates torqueLimit every cycle, so the limit can be changed online (for example, a soft-start ramp from 10 % to 100 % of the maximum over 200 ms to avoid mechanical shock). The position command continues to drive the axis toward its setpoint; the drive current is capped at the torque-limit value; the mechanical contact is reached with the configured maximum force and the axis stops against the stop or the workpiece.
Alternative Path: forceActualValueSetting.value in SIMOTION V4.0+
The SIMOTION manual states: "In V4.0 and higher, a calculated value from the user program can also be specified as the actual sensor value via the cyclically effective forceActualValueSetting.value system variable. Prerequisite is the setting additionalSensorType:=SET_ACTUAL_VALUE."
This means: if the application requires that a SIMOTION-calculated value (for example a filtered, temperature-compensated, or fused value from multiple sources) act as the force feedback, set the configuration element to SET_ACTUAL_VALUE and write the value to axis.forceActualValueSetting.value in the IPO or IPOSync task. The drive's r0080 remains the raw value; SIMOTION's forceActualValueSetting.value becomes the effective input to the force/torque control. This is the documented path for using a SIMOTION-side calculated force as the input.
forceActualValueSetting.value path still requires the axis to be of the type that accepts a virtual sensor, which is the standard with force topology. The torque-limiting path documented above remains the correct choice when no external sensor is available, no force-loop regulation is required, and the axis is configured as standard. The two paths are not interchangeable: standard with force + virtual sensor = closed force loop, standard + torque limiting = clamped position loop.System Topology and Data Flow
Verification and Commissioning
- Download the project to the P350 and go online. Confirm the axis reaches the operational enable state and the drive reports no alarms.
- In the SINAMICS expert list confirm r0080 moves when force is applied manually. Note the polarity (positive for compressive / positive torque, negative for tensile / negative torque) and confirm it matches the mechanical convention used in the application.
- Open the axis trace in SCOUT, record
torqueLimit, the actual velocity, and the actual position. Move the axis into the mechanical stop with torque limiting enabled. The actual position should reach the stop and stop, the velocity should fall to zero, and the torque limit value should equalUserDefaultTorqueLimiting.torqueLimit. - Step the force limit value from 10 % to 100 % of
max(Force or Torque)and verify that the corresponding drive current scales linearly. This confirms the scaling is end-to-end consistent across p2003, p1522/p1523, the SIMOTION limit, and r0080. - Disable torque limiting (
_disableTorqueLimiting) and confirm the axis is free to move again - the position loop should resume normal behavior with no residual current command. - Trigger an emergency stop and confirm the torque limit is released; the drive should ramp down on the standard ramp. Test the safety-wired stop circuit separately - the torque limit is a software clamp, not a SIL-rated safety function.
Troubleshooting Matrix
| Symptom | Likely cause | Action |
|---|---|---|
Alarm "axis must be configured as standard with force" on _setForceCommandValue
|
Wrong axis type selected | Switch to "standard" axis type and use torque limiting instead of _setForceCommandValue
|
Alarm "force sensor not configured" on _setForceCommandValue
|
Sensor missing from axis wizard | Replace force control with torque limiting; do not attempt to bind r0080 to a virtual force sensor - the wizard will not accept it |
| Torque limit has no effect on drive current |
UserDefaultTorqueLimiting.torqueLimit not written, or written with wrong unit, or written before technology data block was enabled |
Confirm the value is written before _enableTorqueLimiting; verify the unit (N vs Nm) matches the drive scaling; enable the technology data block in the axis configuration |
| Drive current clamps at unexpected value | Drive-side torque limit (p1520/p1521) lower than SIMOTION limit, or p2003 reference too large | Inspect p1520/p1521 and p2003 in the drive expert list; set p2003 to the maximum deliverable force and p1520/p1521 to at least the SIMOTION limit |
| Actual force value (r0080) reads 0 in trace | Telegram extension not wired, or wrong slot, or p0045 smoothing time is too long | Re-check the PZD assignment in the message frame configuration; verify the I/O address in SCOUT; check p0045 |
| Force limit active but position oscillates | Position loop gain Kp too high for the new torque ceiling; mechanical resonance excited | Lower Kp, or increase the torque ceiling to give the loop authority, or add a low-pass filter to the velocity setpoint |
| Axis does not reach commanded position against the stop | Torque limit too low, or stop too far from commanded position, or friction compensates the limit | Verify mechanical stop position; raise limit if mechanically safe; check friction compensation in the axis configuration |
| Torque limit activates prematurely during free motion | Acceleration / deceleration torque exceeds the limit; mechanical resonance; load inertia miscalculated | Use a separate dynamic torque limit (ramp the limit from 2× max during motion to 1× max on contact); check the load inertia scaling |
| Limit has wrong polarity (axis pushes instead of clamps) | Sign convention mismatch between SIMOTION and drive | Flip the sign of UserDefaultTorqueLimiting.torqueLimit or of the drive's p1520/p1521; verify against r0080 with manual force application |
_enableTorqueLimiting returns non-zero |
Axis not enabled, not homed, or wrong axis type | Check axis state (must be "operational enable"), homing status, and axis type (must be "standard" with technology data block enabled) |
Edge Cases and Boundary Conditions
-
Linear vs rotary scaling. For linear motors p1192 (force constant) and p1193 (force scaling) must be set so that r0080 reports in N. For rotary motors, r0080 reports in Nm. The SIMOTION configuration
TypeOfAxis.SetPointDriverInfo.(LinearMotor)DriveData.max(Force or Torque)must use the same unit. Mixing units is the most common commissioning error and produces a limit that is off by a factor of 10³-10&sup6. - High dynamics. If the contact is reached at high velocity, the kinetic energy is converted to force impulse on impact and can overshoot the static limit. Use a dynamic torque limit that ramps from 2× max during free motion to 1× max on contact, or reduce the approach velocity.
- Vertical axes. On a vertical axis, gravity adds a constant torque component that must be subtracted from the limit. Either compensate gravity in the drive (p1512 / p1513) or pre-load the SIMOTION limit with the gravitational component.
- Multiple consumers of the torque limit. The drive's torque limit is shared between the SIMOTION axis, the drive-side fixed limits (p1520/p1521), and the current limit (p0640). All three must be set consistently, and the binding one wins. Always check the drive expert list for the active torque limit when debugging.
- Homing and reference. Torque limiting does not require homing to be active; the clamp operates on the torque command, not the position. However, position commands issued without homing will not move the axis (the position loop is disabled), so homing must be performed before any motion.
- Safety integration. The torque limit is a software function and is not SIL-rated. For safety-rated force or torque limiting, use the SINAMICS Safety Integrated functions (SBT, SLS, SDI, SS1) and wire the safety output to the drive's STO input. The SIMOTION torque limit is supplementary to the safety chain, not a substitute.
- PROFINET vs PROFIBUS. The procedure is identical on PROFINET, but the telegram extensions are configured in the device description (GSDML) and the I/O addresses are assigned by the PROFINET controller. Telegram 105 is supported on PROFINET SINAMICS S120 with CU320-2 PN or CU310 PN.
-
Firmware compatibility. The torque-limiting function has been present in SIMOTION since V3.x and in SINAMICS S120 since V2.x. The technology data block and the
UserDefaultTorqueLimitingsystem variable are present from V3.2 onward. TheforceActualValueSetting.valuealternative is V4.0+.
Frequently Asked Questions
Why does _setForceCommandValue insist on an external force sensor?
SIMOTION's force-control path is closed-loop and requires a stable, high-bandwidth force measurement; the axis wizard enforces this by requiring a sensor declaration. When the actual force is already computed inside the SINAMICS S120 (e.g. from torque and motor constant), the torque-limiting path is the correct substitute and does not require a sensor. Switch the axis type to "standard" and use _enableTorqueLimiting with UserDefaultTorqueLimiting.torqueLimit set to the maximum permissible force.
Can I bind r0080 directly to a virtual force sensor?
No. The axis wizard does not accept a drive parameter as the sensor source; it expects a sensor wired to a SIMOTION input. Binding r0080 to the I/O address of a virtual sensor fails because the scaling and format fields cannot be set correctly for a value that is already in physical units. Use the torque-limiting path instead, or use the V4.0+ forceActualValueSetting.value path with additionalSensorType:=SET_ACTUAL_VALUE on a "standard with force" axis.
Does torque limiting maintain the position loop?
Yes. _enableTorqueLimiting clamps the drive torque command; the position controller in SIMOTION remains active and continues to drive the axis to the commanded position until the mechanical stop or the torque limit is reached. This is the stability advantage over a force-control loop on a non-stiff mechanical system, and it is the reason the torque-limiting path is preferred for press-fit and joining applications.
What is the unit of UserDefaultTorqueLimiting.torqueLimit?
The unit is N for linear-motor axes and Nm for rotary-motor axes, matching the unit of TypeOfAxis.SetPointDriverInfo.(LinearMotor)DriveData.max(Force or Torque). Mixing units is the most common commissioning error. Verify p2003 (drive reference) and p0505 (linear-force scaling) are set so that r0080 reports in the same unit the SIMOTION limit is written in.
Is there a SIMOTION V4.0+ alternative that uses a calculated force value?
Yes. Set the configuration element to additionalSensorType:=SET_ACTUAL_VALUE and write the calculated value to axis.forceActualValueSetting.value in the IPO or IPOSync task. This is the documented path for using a SIMOTION-side calculated force as the input to the force controller. It still requires a force-capable axis type, however, so the torque-limiting path remains the recommendation when the axis type is "standard" and no closed force loop is required.
Why does the SIMOTION support team recommend Telegram 105 and not a custom telegram?
Telegram 105 is the standard SIMOTION servo telegram, supported on every SINAMICS S120 firmware and every SIMOTION version. It is the lowest-risk configuration: the PZD layout is fixed, the extension slot is well-defined, and the diagnostic trace in SCOUT knows how to decode the signals. A custom telegram (free PZD assignment) works but adds configuration surface and is harder to diagnose. Refer to the SINAMICS S120 List Manual on the Siemens Industry Online Support portal for the full Telegram 105 specification.