Overview: C-Axis Retrofit on a Carousel Lathe Controlled by SINUMERIK 840D sl
A C-axis on a turning machine converts the main spindle from a pure analog rotating spindle into a closed-loop, position-controlled rotary axis that can be indexed, interpolated, and used for cross-drilling, milling, and contouring with live tooling. Retrofitting a C-axis onto an existing carousel lathe that is already controlled by a SINUMERIK 840D sl is a common application when the original machine was built as a turning-only configuration and the production mix has shifted to milled features such as flats, pockets, hexagon profiles, and off-center holes.
The retrofit adds a second motor to the spindle - a plug-in milling motor coupled through a planetary gear reducer or a toothed belt - and a direct measuring system on the spindle nose (a precision gear or toothed disc with an encoder reading its rotation directly, often called a "plan-washer" encoder in European retrofit practice). The original turning motor remains in place and continues to drive the spindle for turning operations; the new milling motor takes over when milling is required, with the C-axis engaged and the spindle speed controlled by the new drive.
The central engineering challenge in such a retrofit is the position mismatch between the motor measuring system on the milling motor (encoder 1, an absolute AS20 singleturn encoder mounted at the non-drive end of the motor) and the direct measuring system on the spindle nose (encoder 2, a high-precision encoder driven from the spindle itself). When the controller switches from the motor encoder to the direct measuring system, any large difference between the two values will trigger a position controller kick, jerk alarms, contour errors, or following errors during the first engagement. The engineering solution is to write the value of measuring system 2 into the counter of measuring system 1 before the connection is made, so that both systems read the same absolute position and the handover is bumpless.
Mechanical and Drive Architecture
Three common mechanical configurations exist for a C-axis retrofit on a lathe. The correct choice depends on the workpiece weight, torque requirements, accuracy class, and existing spindle bearings.
Configuration A - One Motor, One Encoder with C-Axis via Spindle Drive
The original spindle motor is reused. A direct measuring system is added on the spindle nose. The spindle drive runs in spindle mode for turning and switches to axis mode (C-axis) for milling, with the direct encoder as the position feedback. This is the simplest configuration but limits the torque available for milling because the spindle motor is typically dimensioned for constant-power turning, not high-torque milling.
Configuration B - Two Motors with Mechanical Disengagement
Two separate motors are mounted. The turning motor remains on the spindle through a clutch that engages only during turning. The milling motor is engaged through a second clutch when C-axis milling is required. Both motors carry their own absolute encoders. When switching from turning to milling, the turning motor's clutch is opened and the milling motor's clutch is closed; the direct measuring system on the spindle reads the actual position and the new drive takes control. This is the configuration used in many production turning centers such as the DMG MORI CTX series and Mazak Integrex.
Configuration C - Two Motors Sharing the Same Spindle Shaft
Both motors are always coupled to the spindle, typically through different gear stages (one for high-speed turning, one for low-speed high-torque milling). No clutches are used; the inactive motor is electronically held in torque-free state. The encoder system used by the active motor is selected in the SINUMERIK configuration. This is the configuration most commonly used in European-built turning-milling centers.
For the carousel-lathe retrofit in question, the user has confirmed two motors are installed: the original turning motor and a second plug-in milling motor. This places the system in Configuration C, where both encoders are always physically present and the controller must select between them at runtime.
Encoder Topology: Motor Encoder and Direct Measuring System
Two physically distinct measuring systems are typically configured for a C-axis:
| Measuring System | Location | Typical Resolution | Function |
|---|---|---|---|
| Encoder 1 (motor measuring system, M) | Mounted on the rear of the milling motor (non-drive end) | 20-bit singleturn (AS20) or 24-bit multiturn | Commutation, speed control, torque control, coarse position |
| Encoder 2 (direct measuring system, DM) | Mounted on a precision gear disc on the spindle nose | 20 to 28 bit, depending on accuracy class | Fine position, C-axis position feedback, contour accuracy |
The motor encoder is required for the drive to commutate the synchronous motor and to control speed and torque. It is also used as a redundant position reference for the axis. The direct measuring system provides the actual spindle position with the thermal drift and backlash of the gear train already accumulated; it is the feedback used by the NC for the C-axis position loop when milling.
AS20 Encoder Characteristics
The AS20 is a Siemens absolute singleturn encoder, typically with an EnDat 2.2 or SSI serial protocol. Key specifications:
| Parameter | Value |
|---|---|
| Resolution per revolution | 1,048,576 increments (20 bits) |
| Number of revolutions | 1 (singleturn) |
| Interface | EnDat 2.2 or SSI |
| Supply voltage | 3.6 V to 5.25 V DC or 11 V to 30 V DC (variant dependent) |
| Output code | Pure binary |
| Cycle time | 8 microseconds (EnDat 2.2) |
| Mechanical speed limit | 12,000 rpm or 15,000 rpm (variant dependent) |
| Operating temperature | -40 degrees C to +115 degrees C |
Because the AS20 is a singleturn encoder, it loses its absolute position reference when the motor is decoupled or when the spindle is rotated beyond one full revolution while the drive is unpowered. The direct measuring system on the spindle nose, if it is also singleturn, has the same limitation. For a C-axis where the working angle can exceed 360 degrees, both encoders are typically multiturn variants (e.g., AM20, AM24) or the system uses a modulo reduction (e.g., a 1:360 gear between the spindle and the encoder) to make one revolution of the encoder represent a known angle of spindle rotation.
SINUMERIK 840D sl Measuring System Architecture
Each axis in the SINUMERIK 840D sl NCK can use one, two, or three encoders. For a C-axis with a motor encoder and a direct encoder, two encoders are required. The configuration is split between the SINAMICS S120 drive (which parameterizes the encoder hardware and performs commutation) and the SINUMERIK NCK (which selects which encoder feeds the position controller). The complete parameter reference is published in the SINUMERIK 840D sl List Manual and the SINAMICS S120 List Manual.
Drive-Side Encoder Configuration (SINAMICS S120)
On the SINAMICS S120 Sensor Module (SMC20 or SME20 for EnDat, SMC30 for SSI), the following drive parameters must be set for the motor encoder:
| Drive Parameter | Meaning | Typical Value for AS20 / Direct Encoder |
|---|---|---|
| p0400[0] | Encoder type selection (motor encoder) | 2020 (EnDat 2.2 singleturn 20-bit) or 2048 (EnDat 2.2 singleturn 24-bit) |
| p0400[1] | Encoder type selection (direct encoder) | Same family as encoder 1 |
| p0421[0] | Absolute encoder type (motor) | 1 (single-turn absolute) |
| p0421[1] | Absolute encoder type (direct) | 1 (single-turn absolute) or 2 (multi-turn absolute) |
| p0430[0] | Encoder module number (motor) | Sensor Module slot address |
| p0430[1] | Encoder module number (direct) | Sensor Module slot address |
| p0437[0] | SSI protocol configuration (if applicable) | Bit-coded message length, baud rate, parity |
| p2506[0] | Encoder commutation angle | Determined during motor identification |
After the encoder types are set, a power-on reset of the SINAMICS drive is required to load the encoder parameters. The drive then performs automatic encoder identification during the next commissioning step (p0010 = 4, motor identification at standstill). See the SINAMICS S120 Commissioning Manual for the detailed identification procedure.
NCK-Side Encoder Configuration (SINUMERIK 840D sl)
The NCK parameters below assign the two physical encoders to logical encoder slots in the axis and configure the position controller behavior:
| Machine Data | Meaning | Value for Two-Encoder C-Axis |
|---|---|---|
| MD30200 $MA_NUM_ENCS | Number of encoders for the axis | 2 |
| MD30220 $MA_ENC_MODULE_NR[0] | Drive module assignment for encoder 1 | Drive number of milling motor |
| MD30220 $MA_ENC_MODULE_NR[1] | Drive module assignment for encoder 2 | Drive number of milling motor (typically same drive) |
| MD30230 $MA_ENC_INPUT_NR[0] | Encoder input number (slot on Sensor Module) | 1 or 2 depending on wiring |
| MD30230 $MA_ENC_INPUT_NR[1] | Encoder input number for direct encoder | 2 if encoder 1 uses slot 1, or vice versa |
| MD30240 $MA_ENC_TYPE[0] | Encoder type identifier in NCK | 0 (incremental) or 4 (absolute with EnDat) |
| MD30240 $MA_ENC_TYPE[1] | Encoder type identifier for direct encoder | 0 or 4 |
| MD30242 $MA_ENC_INVERS[0] | Encoder direction inversion | 0 (false), set to 1 if axis motion direction is reversed |
| MD30242 $MA_ENC_INVERS[1] | Encoder direction inversion for direct encoder | 0 or 1 as required |
| MD34200 $MA_ENC_REFP_MODE[0] | Referencing mode for encoder 1 | 2 (absolute encoder, no referencing run needed) or 1 (incremental, zero pulse required) |
| MD34200 $MA_ENC_REFP_MODE[1] | Referencing mode for encoder 2 | Same as encoder 1 |
| MD34210 $MA_ENC_REFP_STATE[0] | Referencing state of encoder 1 | 2 (referenced) after first successful referencing |
| MD34210 $MA_ENC_REFP_STATE[1] | Referencing state of encoder 2 | 2 (referenced) after first successful referencing |
| MD38000 $MA_MM_ENC_ZERO_MONITORING[0,1] | Zero mark monitoring active | 1 (active) for incremental encoders, 0 (inactive) for absolute |
| MD36300 $MA_ENC_FREQ_LIMIT[0,1] | Encoder frequency limit | Value from encoder datasheet; alarm 21612 triggered on exceedance |
The values of MD30220 and MD30230 must match the drive configuration. If the SINAMICS drive is renamed (e.g., when replacing a Control Unit), the drive number must be updated in the NCK machine data or the encoder assignment will be lost. See the SINUMERIK 840D sl Commissioning Manual - NC, PLC, Drive for the assignment procedure.
SINUMERIK 840D sl Encoder Selection Interface
The NCK exposes the active encoder through the PLC interface (axis-specific DB3x, typically DB31 for axis 1, DB32 for axis 2, etc.). The relevant signals are:
| PLC Signal | Direction | Meaning |
|---|---|---|
| DB3x.DBX1.5 | NCK to PLC | Position measuring system 1 active |
| DB3x.DBX1.6 | NCK to PLC | Position measuring system 2 active |
| DB3x.DBX0.5 | NCK to PLC | Position controller active (closed loop) |
| DB3x.DBX0.6 | NCK to PLC | Speed controller active |
| DB3x.DBX1.0..1 | NCK to PLC | Referencing status |
| DB3x.DBX12.0 | PLC to NCK | Sensor for fixed stop active (used during C-axis clamping) |
| DB3x.DBX2.1 | NCK to PLC | Measuring system switching acknowledged |
For a C-axis, the standard selection in milling is measuring system 2 (the direct encoder), and in turning (when the spindle is in spindle mode rather than axis mode) measuring system 1 (the motor encoder) is used by the drive but the NCK position controller is disabled. The selection is made through the part program commands or through the machine-specific PLC logic.
Encoder Switching in the NC Program
The encoder selection is set in the NC program using the keyword MEAS or through specific commands in the spindle/axis configuration. Two common commands are:
MEAS = 1 ; Activate position measuring system 1 (motor encoder)
MEAS = 2 ; Activate position measuring system 2 (direct encoder)
Or, when using the spindle-specific commands for a C-axis:
SPCON ; Switch spindle to speed-controlled mode (turning)
SPCOF ; Switch spindle to position-controlled mode (C-axis)
The switch between motor encoder and direct encoder typically happens automatically inside SPCON / SPCOF based on the configuration of MD30450 $MA_IS_CONCURRENT_POS_AX. However, on many retrofit installations the switch is implemented explicitly in the PLC using the PLC interface bits listed above. The procedural detail is documented in the SINUMERIK 840D sl Programming Manual and the SINUMERIK 840D sl Diagnostics Manual.
Synchronization Procedure: Pre-Positioning the Motor Encoder with the Direct Encoder Value
The central question raised in the original retrofit case is whether the value of measuring system 2 (direct encoder) can be written into the counter of measuring system 1 (motor encoder) before the connection is made, so that both systems read the same absolute position when the controller switches from one to the other. The answer is yes, with the procedure documented in this section.
Why Pre-Synchronization Is Required
On a fresh retrofit, the direct encoder and motor encoder are mounted at different positions in the drivetrain. Their absolute counts do not agree at the moment the controller is powered up. When the controller switches from spindle mode (using the motor encoder implicitly for commutation) to C-axis mode (using the direct encoder for position control), any difference appears as a position offset. If the difference is small (less than the position-window tolerance), the controller absorbs it in the position loop. If the difference is large, the controller will:
- Trigger a contour error (alarm 25050 "Axis xx contour monitoring")
- Trigger a following error (alarm 25040 "Axis xx standstill monitoring" or alarm 25080 "Axis xx positioning monitoring")
- Apply a sudden step in the controller output, which appears as a mechanical jerk on the spindle
- In the worst case, abort the part program and require operator intervention
The standard tolerance can be checked in MD36020 $MA_POSITIONING_TOLERANCE (default 0.5 mm or 0.5 degrees on a rotary axis) and MD36030 $MA_STANDSTILL_POS_TOL (default 0.2 mm or 0.2 degrees).
Step-by-Step Synchronization Procedure
The procedure below pre-positions encoder 1 with the value of encoder 2 so that the two counters agree to within one motor encoder increment. It assumes both encoders have been mechanically mounted, both drive-side encoder parameters (p0400, p0421, etc.) have been set, and both NCK machine data (MD30200, MD30220, MD30230, MD30240) have been configured. The procedure is performed once after the mechanical installation is complete and the cabling has been verified.
- Power on the controller and the drive. Wait for the SINAMICS to complete its startup. Confirm that both encoders are visible in the drive trace (r0480, r0481).
- Open the SINUMERIK commissioning menu (MENU SELECT > Commissioning > Axes). Select the C-axis from the axis list.
- Navigate to "Measuring system" > "Referencing" and confirm that both encoder 1 and encoder 2 are listed with their hardware module numbers and slot numbers. Note the values shown in the "Raw position" field for each encoder - these are the unadjusted mechanical counts.
- Move the spindle manually (using the handwheel or jog mode, with the drive in a safe state) to a known reference position. A typical reference is the index position of a tooth on the "plan-washer" or a dowel pin on the spindle nose. Lock the spindle mechanically.
- Read the raw position of encoder 2 (the direct encoder) from the SINUMERIK service display (Service > Axes > Direct Measuring System) or via the trace function. Note the value as POS2_REF.
- Read the raw position of encoder 1 (the motor encoder) at the same physical position. Note the value as POS1_RAW.
- Calculate the offset to be written into encoder 1:
OFFSET = POS2_REF - POS1_RAW. This is the difference between the two counters when the spindle is at the reference position. - In the drive-side commissioning (SINAMICS STARTER or Startdrive), navigate to the encoder 1 configuration. Locate the parameter that adjusts the encoder zero, typically p0431[0] (encoder adjustment angle) or, more commonly, the parameter pair p0400/p0421 with the absolute encoder offset adjustment p0431[0] = OFFSET.
- Alternatively, on the SINUMERIK side, set the absolute encoder offset using MD34100 $MA_REFP_SET_POS[0] for encoder 1. This MD defines the position value that the controller assumes when the encoder is at its absolute zero. Writing OFFSET into this MD does not physically change the encoder count but adjusts the software mapping.
- Apply the new value, perform a power-on reset of the NCK (NCK reset + PLC restart, or via the operator panel: Commissioning > NCK > Reset), and confirm that the absolute position of encoder 1 now reads the same value as encoder 2 when the spindle is back at the reference position.
- Move the spindle to a second reference point (e.g., 90 degrees offset from the first reference) and re-read both encoder values. Confirm that the difference between the two encoders is now constant within plus or minus 1 encoder increment across the full 360 degree rotation.
- Set MD34210 $MA_ENC_REFP_STATE[0] = 2 and MD34210 $MA_ENC_REFP_STATE[1] = 2 to mark both encoders as referenced. From this point, the controller will treat both encoders as absolutely referenced and will switch between them without position jumps.
- Save the machine data to the CF card using the "Save" function in the commissioning menu. The values will be loaded automatically at the next controller startup.
Alternative: Absolute Encoder Pre-Adjustment via p0431
On SINAMICS S120, the encoder adjustment for absolute encoders is performed using parameter p0431 (encoder adjustment angle / absolute encoder offset). This parameter shifts the raw encoder value by the offset so that the displayed position matches the mechanical reference. The procedure is:
- Drive the spindle to the reference position.
- Read the actual encoder value from r0480 or r0481 (actual position raw value).
- Calculate the offset:
p0431 = r0480 - POS2_REF(for encoder 1, where POS2_REF is the target position in increments). - Write the value to p0431 and perform a power-on reset.
- Verify the actual position now reads POS2_REF at the reference position.
This parameter is only effective if the encoder is configured as an absolute encoder (p0421 = 1 or 2). On incremental encoders, the equivalent adjustment is performed by physically shifting the zero-mark disc or by using the "Encoder adjustment" function in the SINAMICS commissioning wizard.
Use of MD34100 $MA_REFP_SET_POS for the Absolute Encoder Mapping
If the encoder is absolute and the controller knows its absolute position at power-up, the mapping between the raw encoder count and the machine coordinate is performed by MD34100 $MA_REFP_SET_POS[encoder_index]. For the procedure to work, MD34200 $MA_ENC_REFP_MODE must be set to 2 (absolute encoder, no referencing run required).
The MD34100 value is the position in the machine coordinate system that corresponds to the encoder zero. If the raw count at the reference position is POS1_RAW and the desired machine coordinate at the reference position is POS2_REF, then MD34100[0] = POS2_REF. The controller will compute the actual machine position as POS2_REF + (current_raw - POS1_RAW) * MD31000[0] (encoder scaling).
Handling the Modular Axis Behavior
A C-axis on a lathe is typically configured as a modulo axis because the working angle wraps around 360 degrees during milling (e.g., milling a full circle, milling a hex profile, or helical interpolation). The modulo configuration is set in:
| Machine Data | Meaning | Value for C-Axis |
|---|---|---|
| MD30300 $MA_IS_ROT_AX | Axis is rotary | 1 (rotary axis) |
| MD30310 $MA_ROT_IS_MODULO | Rotary axis is modulo | 1 (modulo active) |
| MD30320 $MA_DISPLAY_IS_MODULO | Display in modulo range | 1 (modulo display) |
| MD30330 $MA_MODULO_RANGE | Modulo range size | 360.0 (degrees) |
| MD30340 $MA_MODULO_RANGE_START | Modulo range start position | 0.0 (degrees) |
| MD30350 $MA_SIM_LIMITS | Simulation limits | 0 (no simulation limit) |
| MD30455 $MA_MOTION_DIR_REVERSE | Reverse motion direction | 0 (normal) or 1 (reversed) |
When the axis is modulo, the actual position wraps around 360 degrees. The encoder values must also be interpreted modulo the encoder resolution per spindle revolution, scaled by the gear ratio between the spindle and the encoder.
Gear Ratio and Encoder Scaling
The motor encoder and the direct encoder are mounted at different positions in the drivetrain, with different gear ratios to the spindle. These ratios must be correctly defined in:
| Machine Data | Meaning | Formula |
|---|---|---|
| MD31000 $MA_ENC_IS_LINEAR[0,1] | Encoder is linear (vs. rotary) | 0 (rotary) |
| MD31010 $MA_ENC_GRID_POINT_DIST[0,1] | Encoder grid spacing (linear) or increments per rev (rotary) | AS20 = 1048576 inc/rev; Heidenhain RCN = 8388608 inc/rev typical |
| MD31020 $MA_ENC_RESOL[0,1] | Encoder resolution (additional scaling) | Not used for serial encoders, default 0 |
| MD31050 $MA_DRIVE_AX_RATIO_DENOM[0,1] | Denominator of axis-to-encoder gear ratio | Spindle teeth / encoder teeth |
| MD31060 $MA_DRIVE_AX_RATIO_NUMERA[0,1] | Numerator of axis-to-encoder gear ratio | Encoder teeth / spindle teeth (inverse) |
| MD31070 $MA_DRIVE_ENC_RATIO_DENOM[0,1] | Denominator of encoder-to-motor gear ratio | Motor teeth / encoder teeth |
| MD31080 $MA_DRIVE_ENC_RATIO_NUMERA[0,1] | Numerator of encoder-to-motor gear ratio | Encoder teeth / motor teeth |
| MD32100 $MA_AX_MOTION_DIR | Axis motion direction sign | -1 or 1 depending on mechanical layout |
| MD32110 $MA_POSCTRL_GAIN[0,1] | Position controller Kp factor per encoder | Typically 1.0 to 8.0 (1/s) for a C-axis |
The scaling formula for a rotary axis is:
Actual position [degrees] = (Raw encoder count / Increments per rev) * (MD31060 / MD31050) * 360.0
If the two encoders are mounted on the same spindle shaft through different gear reductions, the scaling constants for each must be set separately in MD31050 and MD31060, indexed by encoder (0 for encoder 1, 1 for encoder 2).
Referencing and Initial Commissioning
The first commissioning of the C-axis follows this sequence:
- Mechanical alignment of the spindle to a known reference (typically the C-axis zero mark or a dowel pin).
- Drive commissioning of the milling motor: motor identification, encoder identification, commutation angle adjustment.
- NCK commissioning of the C-axis: machine data entry, axis configuration, axis assignment to a channel.
- Encoder referencing for both encoder 1 and encoder 2 according to MD34200.
- Pre-synchronization of the two encoders using one of the procedures described above.
- Position controller optimization: Kp, Tn, feedforward, jerk limit.
- Speed controller optimization (if not already performed during motor commissioning).
- Contour test with circular interpolation in a closed 360 degree arc; verify the actual position vs. commanded position.
- Save all parameters and back up the CF card image.
Verification Tests
After the synchronization and commissioning are complete, perform the following verification tests before releasing the axis for production:
| Test | Procedure | Pass Criterion |
|---|---|---|
| Position agreement at multiple angles | Move the axis to 0, 90, 180, 270 degrees and compare encoder 1 vs. encoder 2 at each angle | Difference within plus or minus 1 increment of the coarser encoder |
| Direction test | Jog the axis in positive direction, verify both encoders increase; jog in negative direction, verify both decrease | Both encoders agree in sign |
| Encoder switch test | In the NC program, switch between measuring system 1 and 2 at a stationary position | No alarm 25040/25050, no controller kick |
| Full revolution test | Rotate the axis through 10 full revolutions and verify both encoders track | Both encoders return to the same count plus or minus 1 increment after each revolution |
| Contour test | Run a circular interpolation program at the programmed feedrate | Contour deviation within plus or minus 0.01 degree on the actual position display |
| Alarm test | Disconnect encoder cable, verify alarm 21610 (encoder failure) is raised for the correct encoder | Alarm is raised with the correct axis and encoder index |
Troubleshooting Matrix
| Symptom | Likely Cause | Corrective Action |
|---|---|---|
| Alarm 25040 "Axis xx standstill monitoring" | Position difference between encoders exceeds standstill tolerance | Re-run the synchronization procedure; verify MD36030 is appropriate for the encoder resolution |
| Alarm 25050 "Axis xx contour monitoring" | Contour error during C-axis milling | Check position controller gain (MD32110); verify feedforward (MD32600); re-check gear ratios |
| Alarm 21610 "Encoder xx error" | Encoder hardware fault or cable break | Check encoder cable, check encoder supply voltage, replace encoder if necessary |
| Alarm 26072 "Axis xx controller enable" | Controller enable missing for the active encoder | Check PLC interface DB3x.DBX2.1; verify the spindle-to-axis transition logic |
| Position offset between encoder 1 and encoder 2 after power-up | Synchronization was not performed, or absolute encoder lost position | Perform the synchronization procedure; check that the absolute encoder battery is good (if applicable) |
| Large mechanical jerk when switching from spindle mode to C-axis mode | Position difference between motor and direct encoder exceeds tolerance | Pre-synchronize the encoders; widen the switch tolerance (MD36020) if mechanical backlash permits |
| One encoder reads correctly, the other reads garbage | Encoder wiring error or wrong Sensor Module slot | Check MD30230 $MA_ENC_INPUT_NR matches the physical slot on the SMC20/SMC30 |
| Both encoders read garbage but the drive runs in spindle mode | MD30220 $MA_ENC_MODULE_NR points to the wrong drive | Verify the drive number assignment in the NCK matches the SINAMICS topology |
| Alarm 21612 "Encoder xx frequency exceeded" | Encoder speed exceeds the limit in MD36300 | Reduce the maximum C-axis speed or increase the gear ratio between the spindle and the encoder |
| Axis oscillates at standstill | Position controller Kp too high or Tn too small | Re-optimize the position controller; check for mechanical resonance |
Safety Considerations
Additional mechanical safety: the C-axis must be mechanically clamped during turning operations when the milling motor is disconnected, to prevent the spindle from being driven by the workpiece. The clamp is typically a hydraulic or pneumatic brake engaged by the PLC based on the spindle operating mode.
FAQ
Can I write the absolute value of measuring system 2 into measuring system 1 before connecting the C-axis on a SINUMERIK 840D sl?
Yes. The procedure is to power up the controller, move the spindle to a known reference position, read the raw counts of both encoders, compute the offset (POS2_REF - POS1_RAW), and write the offset into MD34100 $MA_REFP_SET_POS[0] for encoder 1, or into the SINAMICS parameter p0431[0] for the motor encoder. After a power-on reset, both encoders will read the same position at the reference, and subsequent switches between measuring systems will be bumpless.
Do I need both a motor encoder and a direct encoder on the C-axis?
For a SINAMICS S120 drive controlling a synchronous motor, a motor encoder is required for commutation and speed control, so it is always present. The direct encoder is added when the accuracy required for C-axis milling exceeds what the motor encoder alone can deliver after the backlash and thermal drift of the gear train. For high-precision milling (e.g., polygon turning, gear milling), the direct encoder is mandatory.
What is the difference between MD34100 $MA_REFP_SET_POS and the SINAMICS parameter p0431?
MD34100 sets the software mapping between the raw encoder count and the machine coordinate in the NCK. p0431 sets the hardware-level offset in the SINAMICS drive, which affects both the NCK and the drive display. Either method works; p0431 is preferred when the encoder is mounted at a position where the drive itself uses the absolute position (e.g., for commutation), and MD34100 is sufficient when the encoder is only used by the NCK.
Why does the controller switch between the motor encoder and the direct encoder during milling?
The motor encoder is used by the drive for commutation and speed control; it is always active. The direct encoder is used by the NCK for the position control loop because it reads the spindle position without the gear train backlash. When the C-axis is engaged, the NCK uses the direct encoder as the position feedback; when the spindle is in turning mode, the NCK position controller is inactive and only the drive-side speed controller using the motor encoder is active.
How often does the synchronization between the two encoders need to be performed?
For absolute encoders that retain their position across power-down (i.e., with a backup battery or with EnDat 2.2 battery-free buffering), the synchronization is performed once during initial commissioning and is valid for the lifetime of the installation, provided the encoder is not physically moved. For incremental encoders, the synchronization must be re-performed after each referencing operation or after the encoder loses its reference (e.g., after a cable break or encoder replacement).