Problem Overview
A SINUMERIK 840Di SL controller (PCU 50.3) wired to a Heidenhain RCN 226 absolute encoder through a SINAMICS S120 drive line-up (CU320 + SMC20) raises two persistent commissioning alarms on the spindle:
231150: bad initialization 0x10231806: bad initialization 0x6d
Both alarms are presented by the SINUMERIK HMI as encoder-side faults but originate on the SINAMICS Drive Object, where the Sensor Module Cabinet 20 (SMC20) is unable to complete EnDat 2.2 hand-shaking with the RCN 226. Setting p0400 to 10000 or 10100 produces a status of "no encoder", confirming that the drive does not recognize the RCN 226 as a known EnDat absolute device. The root cause is almost always an incorrect encoder database selection, an unfilled p0404 configuration word, or a mis-wired SMC20-X520 terminal. This guide maps both alarms to their SINAMICS F-code parents, documents the correct p0400 / p0404 values for the RCN 226, and walks through the full 840Di SL commissioning sequence required to clear them.
Hardware Stack Identification
Before touching parameters, confirm the exact hardware in the loop. The 840Di SL is a PC-based CNC that hosts the HMI on a PCU 50.3 panel and communicates with the drive line-up over PROFIBUS DP or PROFINET IRT. The spindle path described here is:
- Heidenhain RCN 226 - modular angle encoder with integral bearing and stator coupling, 28-bit singleturn, EnDat 2.2 protocol. The "IC 2260" EnDat 2.2 version is the variant typically used in machine-tool spindle feedback.
- Heidenhain adapter cable - shielded twisted-pair with 17-pin M12 connector on the encoder side; should be ordered against the Heidenhain RCN 226 data sheet so the shield terminates at 360 degrees on the encoder housing.
-
SMC20 (Siemens part number
6SL3055-0AA00-5BA0or the newer6SL3055-0AA00-5BA1with EnDat 2.2 firmware support) - Sensor Module Cabinet-mounted, accepts EnDat 2.1/2.2 and SSI encoders on theX520terminal block and forwards the position to the CU320 over DRIVE-CLiQ. -
CU320 (Siemens part number
6SL3040-1MA00-0AA0or-0AA1) - the SINAMICS Control Unit; hosts the drive objects and exchanges data with the NCU/PCU 50.3. - 840Di SL on PCU 50.3 - the HMI and NCK host, which mirrors the SINAMICS alarms on the operator panel as 231xxx codes.
5BA0 units may not have EnDat 2.2 support in their p0400 index; a firmware upgrade via the Siemens support site is sometimes the only path to recognition.Alarm Decoding: 231150 (0x10) and 231806 (0x6d)
SINUMERIK 231xxx alarms are re-mappings of SINAMICS F3xxxx faults on the corresponding drive object. The 0x10 and 0x6d suffixes are SINAMICS message-word values, not the 231xxx alarm index, and they point at the actual EnDat error reported by the encoder during cyclic hand-shaking.
| Alarm ID | Meaning in SINAMICS | 0x Suffix | Likely Root Cause |
|---|---|---|---|
| 231150 | F31500 / F31150 - encoder error during initialization | 0x10 | Encoder type not yet identified, or sensor-module boot handshake failed |
| 231806 | F31806 - encoder communication fault | 0x6d (109 dec) | EnDat 2.2 unsupported by selected p0400 value, or p0404 bits mis-set |
The 0x6d value is a Heidenhain EnDat error code that the SMC20 decodes and re-reports through the F31806 path. For an EnDat 2.2 absolute rotary encoder it can mean "command not supported by encoder" - which is what you see when the drive tries to interrogate the RCN 226 as if it were a SSI device (typical symptom of p0400 = 10000 / 10100 / 10120).
Root Cause Analysis
Three primary reasons produce this exact combination of alarms on a spindle driven by an RCN 226:
- Wrong encoder database entry in p0400. Values in the 10000 - 10200 range in the SINAMICS encoder database cover SSI, Hall-sensor, and incremental encoders - none of them EnDat 2.2 absolute. The drive will not enumerate the RCN 226, the status line on the Starter/SIMOTION Scout project will read "no encoder", and the sensor module will reject every initialization command, surfacing as F31500 (0x10) followed by F31806 (0x6d).
-
p0404 encoder configuration word is at factory default (0). Even with the correct
p0400index, an EnDat 2.2 absolute rotary encoder needs the configuration bits set: rotary (not linear), absolute (not incremental), and EnDat 2.2 (not 2.1). A zerop0404drops the drive back to "no encoder" after the next power-on. - SMC20 X520 wiring or 24 VDC supply missing. The EnDat interface on the SMC20 must be fed from a regulated 24 VDC source capable of 250 mA per channel, and the cable shield must be bonded to the encoder housing and the SMC20 sub-D backshell. Reversed clock/data pairs or a floating shield typically yields the 0x6d communication error rather than 0x10.
SINAMICS Parameter p0400 Reference
p0400[0...n] selects the encoder type that the drive uses to configure the corresponding Sensor Module channel. The factory index for a 24 V EnDat 2.2 absolute rotary encoder is found in the 20200-20299 and 20400-20499 ranges of the SINAMICS S120 List Manual. For the Heidenhain RCN 226 (EnDat 2.2, 28-bit, singleturn), the index that consistently enumerates the device on CU320 firmware 5.x and later is:
| Encoder | EnDat | Bits | Typical p0400 |
|---|---|---|---|
| RCN 226 (EnDat 2.2 IC 2260) | 2.2 | 28 singleturn | 20421 |
| RCN 226 (EnDat 2.1 IC 226) | 2.1 | 28 singleturn | 20200 / 20241 |
| RCN 227 | 2.2 | 28 | 20441 |
| EQN 425 | 2.1 | 25 | 20200 |
| EQN 437 | 2.2 | 28 | 20421 |
p0400 indices for Heidenhain encoders vary by SINAMICS firmware version. Cross-check the value against the SINAMICS S120/S150 List Manual parameter list (function diagram 4700 / 4710) shipped with the firmware on the drive. If p0400 is set to an index that the running firmware does not have, the drive will fall back to the "no encoder" state even if the index is otherwise valid.Index placement also matters. The spindle Drive Object (DO) typically owns encoder 2, while the motor encoder is encoder 1. Use the drive object index to place the value:
- Spindle encoder:
p0400[1] = 20421(or whichever EnDat 2.2 index applies to your RCN 226 variant) - Motor encoder:
p0400[0] = ...(set to match the actual motor-mounted encoder)
p0404 Configuration Bits
p0404[0...n] is the configuration word that tells the drive how to interpret the encoder selected by p0400. The factory default of zero will reject the RCN 226 because the drive still cannot decide whether the encoder is linear or rotary, absolute or incremental. Typical bit settings for an EnDat 2.2 absolute rotary encoder:
| Bit | Name | Set Value for RCN 226 |
|---|---|---|
| 0 | Linear / rotary | 1 = rotary |
| 1 | Incremental / absolute | 1 = absolute |
| 2 | Reserved (rotary direction) | 0 |
| 3 | Reserved | 0 |
| 4 | EnDat 2.2 | 1 |
| 5 | Multiturn | 0 (RCN 226 is singleturn) |
This produces a p0404 value of 0x13 (binary 00010011) for a rotary, absolute, EnDat 2.2, singleturn encoder. Setting p0404 after p0400 and saving to ROM (Copy RAM to ROM, then power cycle) is mandatory; otherwise the next commissioning upload of the project will overwrite the value.
SMC20 Wiring and Terminal Layout
The SMC20 brings the EnDat interface out on sub-D connector X520. Use only Heidenhain adapter cables with the 17-pin M12 connector specified for the RCN 226. The terminal assignments for X520 are:
| Pin | Signal |
|---|---|
| 1 | Encoder supply 5 V / 24 V (set by jumper on the SMC20) |
| 2 | Data (D+) |
| 3 | Clock (C+) |
| 4 | Clock return (C-) |
| 5 | Data return (D-) |
| 6 | Sense + |
| 7 | Sense - |
| 8 | Shield / GND |
Bridge settings on the SMC20 must be set for EnDat and for the encoder supply voltage the RCN 226 is rated for. Verify that the jumper block selects 5 V if the Heidenhain adapter cable derives its internal supply through the SMC20; RCN 226 is typically powered at 3.6 V to 14 V internally. If 24 V is set on the SMC20 and the cable does not have an internal regulator, the encoder will fail to enumerate and you will get the 0x10 initialization alarm rather than 0x6d.
p0400 and p0404 are correct.Step-by-Step Commissioning Procedure
- Open Starter / SIMOTION Scout for SINAMICS / Startdrive. Connect to the CU320 over PROFIBUS or PROFINET and load the project. Confirm online state.
- Check the topology: the SMC20 must appear under the CU320's DRIVE-CLiQ tree. Replace the unit if it reports as "unknown module".
- Navigate to the spindle Drive Object and open the configuration for encoder 2 (RCN 226). Set
p0400[1]to the value matching your RCN 226 EnDat 2.2 variant (typical 20421). Press OK; Starter writes the value to the drive. - Set
p0404[1]to0x13(rotary, absolute, EnDat 2.2, singleturn). - Copy RAM to ROM. Power cycle the entire drive line-up, including the SMC20, so the Sensor Module re-enumerates against the new database entry.
- Once the drive is back online, verify the sensor module channel now reports the encoder type and resolution. The drive should no longer say "no encoder".
- Run the encoder identification:
p0407 = 1in the spindle DO. The drive performs a coarse identification, sets the fine resolution inp0418/p0419, and writes the identified values top0400/p0404. - Save the project. Do not overwrite the identified values with a manual
p0400download - always read the values out of the drive and let the encoder identification populate them.
SINUMERIK 840Di SL Machine Data Alignment
After the SINAMICS side enumerates the RCN 226, the NCK on the PCU 50.3 must accept the encoder as a valid spindle actual-position source. The relevant machine data, in MD30200 $MA_NUM_ENCS / MD30240 $MA_ENC_TYPE and the related MD310xx spindle encoder block, must point at the second SINAMICS encoder:
-
MD30200[AX2] = 2- axis has two encoders (motor + spindle) -
MD30240[AX2,ENC2] = 1- incremental (SINUMERIK-side type for an absolute EnDat device is set to 1, since absolute bits are handled byMD34200 $MA_ENC_REFP_MODE) -
MD31020 $MA_ENC_RESOL[AX2,ENC2] = 33554432- 28-bit (matches the RCN 226)
If you do not realign the SINUMERIK-side machine data, the spindle position display on the HMI will stay at 0, even when the SINAMICS side reports a clean position. The 231150 / 231806 alarms typically re-surface within a few seconds of the next NCK reset if this layer is left out of step.
Verification Checklist
- No F3xxxx or 231xxx alarms in the SINAMICS / SINUMERIK diagnostics after power-up.
- Spindle actual position (HMI readout) tracks a manual rotation of the spindle.
- Starter / Startdrive shows the encoder as a recognized device on the sensor module channel, with a non-zero fine resolution in
p0418/p0419. -
r0047[0...63] & 0x20is clear (no position-error bit). - Encoder status word
r0480does not have bit 0 or bit 13 set. - Reference-point acknowledgment on the HMI works without spurious alarms during
REPOSmoves.
Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| "No encoder" status with p0400 = 10000 | Factory value, no encoder selected | Set p0400 to 20200-20299 or 20400-20499; verify EnDat version |
| 231150 0x10 + 231806 0x6d after p0400 = 10100 | 10100 is SSI, not EnDat | Set p0400 to 20421 (or applicable EnDat 2.2 value) |
| Alarms clear for a few minutes, then return | p0404 not saved / wrong DO index | Set p0404 to 0x13, copy RAM to ROM, power cycle |
| Alarms only at high spindle speed | Shield or twisted-pair issue | Re-terminate shield, replace Heidenhain cable |
| 0x10 only (no 0x6d) | 24 V supply missing on SMC20 | Check 24 V feed and SMC20 jumper for encoder supply |
| 0x6d only (no 0x10) | EnDat protocol mismatch (RCN is 2.2, drive is 2.1) | Update SINAMICS firmware, run encoder identification |
| Alarms after NC reset only | SINUMERIK MD30240 / MD31020 misaligned | Correct machine data to point at encoder 2 |
Frequently Asked Questions
Why does p0400 = 10100 still show "no encoder" on the RCN 226?
The 10100-10199 range in the SINAMICS encoder database covers SSI encoders and TTL incremental encoders, not EnDat 2.2. The SMC20 tries to enumerate the RCN 226 as SSI, the EnDat command set is unsupported, and the SMC20 returns 0x6d, which propagates as alarm 231806. Switch to a 20200-20299 or 20400-20499 value that matches the RCN 226's EnDat 2.2 protocol.
Is p404 the same as p0404, and why is the alarm tied to it?
Yes, p404 in the alarm description is the same parameter as p0404 in the SINAMICS parameter list - the leading zero is dropped in some user interfaces. p0404 is the configuration word that defines whether the encoder is rotary/linear, absolute/incremental, and which EnDat version is in use. Without those bits set, the drive cannot finish initializing the encoder and surfaces 231150 during the sensor-module boot phase.
Do I need a special SMC20 firmware for EnDat 2.2?
Yes. SMC20 modules with order number 6SL3055-0AA00-5BA0 require a firmware update to read EnDat 2.2 encoders correctly. The 6SL3055-0AA00-5BA1 variant ships with EnDat 2.2 support enabled. Always check the firmware stamp on the Sensor Module (visible in Starter under topology) before commissioning the RCN 226.
Can I bypass the SMC20 and connect the RCN 226 to the NCU directly?
No. The 840Di SL does not have an onboard EnDat input on the PCU 50.3. Position feedback from the RCN 226 must travel through the SINAMICS S120 drive line-up (via SMC20) and then back to the NCK over PROFIBUS / PROFINET. Trying to wire the encoder directly to a third-party counter module will leave the spindle position out of the SINAMICS closed-loop control and will not clear the 231150 / 231806 alarms.
After clearing the alarms, the HMI spindle position stays at zero. Why?
Most likely the SINUMERIK machine data is still pointing at the wrong encoder number or the wrong resolution. Set MD30200, MD30240 and the MD310xx spindle encoder block to the second encoder (encoder 2) and the 28-bit resolution of the RCN 226, then trigger an NCK reset. The HMI readout will track the actual spindle angle after that.