1. Overview of SINUMERIK Alarm 14040
Siemens SINUMERIK 840D, 840D sl, ONE, and 828D controllers report alarm 14040 "Channel %1 block %2 error in end point of circle" when the programmed end point of a circular block is geometrically inconsistent with the active plane, the programmed center point (I, J, K), or the programmed radius. The alarm halts program execution in AUTO and MDA modes and requires either an NC Reset (clear alarm with the RESET key) or a block-correction via the alarm acknowledge dialog. On ShopMill / ShopTurn conversational HMI shells, the alarm is shown with the Cancel icon and the offending block number. Use the official SINUMERIK 840D sl Programming Manual — Basics and the SINUMERIK 840D sl Programming Manual — Advanced as the primary reference. The Beckhoff Information System — NC error 20036 documents the equivalent condition as "Correction of the invalid centre point co-ordinates I, J, K or circle end points."
Alarm 14040 sits at the intersection of three CN subsystems: the geometry interpreter (decodes G2 / G3 / CT blocks), the post-processor (translates CAM toolpath geometry into G-code), and the compressor (combines short blocks into smooth motion via G642 / COMPCAD). When any of these emit a non-converging end point, 14040 surfaces. This reference consolidates the official Siemens diagnostics, the available machine data, and the field-proven post-processor and parameter corrections that resolve the alarm across roughing, finishing, 3+2 indexed, and simultaneous 5-axis toolpaths.
| Field | Value |
|---|---|
| Alarm number | 14040 |
| Alarm class | Reset / clear alarm |
| Reaction | NC Stop, interpreter halt, no path feed |
| Typical block | G2 / G3 with explicit end point, I/J/K, or radius R |
| Default clear | RESET key or Alarm Clear on HMI |
| Related alarms | 14010 / 14011 / 14012 / 14013 / 14045 / 14048 — same class |
2. Alarm Identification and Help System
The full alarm text contains a channel number and a block number:
14040 Channel 1 block N45 error in end point of circle
Where N45 is the block the controller was attempting to execute when the geometric check failed. The block counter in the alarm line helps locate the offending line in the program. The alarm has no explicit clear conditions — it remains active until the program pointer is moved with NC Reset.
The Siemens programming manual describes 14040 as one of the geometric inconsistency class of alarms raised by the interpreter. The corresponding CNC alarm documentation is available through the Siemens Industry Online Support portal.
3. Geometric Root Causes
Alarm 14040 is raised by the SINUMERIK interpreter before the path is handed to the interpolator, so the fault lies in the source code. Five geometric conditions trigger it.
3.1 End point inconsistent with center point
For a block such as N45 G2 X50.0 Y30.0 I20.0 J10.0, the controller verifies that the distance from (I, J) to the start position equals the distance from (I, J) to (X, Y). If the two radii differ by more than the tolerance window set in MD21000 $MC_CIRCLE_ERROR_CONST and MD21010 $MC_CIRCLE_ERROR_FACTOR, alarm 14040 is raised.
3.2 End point inconsistent with programmed radius
When a block uses the R radius syntax (G2 X... Y... R...), the controller solves a quadratic. If the radius is too small to span the start and end point, no valid center exists, and the alarm is raised with the same number. The check is identical for AR (arc-angle) programming.
3.3 Helix out-of-plane error
A helical block such as G2 X... Y... Z-31.9 I... J... programs a circle in the active plane (G17 default) plus linear motion on the orthogonal axis. The end point of the circle must lie in the active plane. If the Z component of the end point is non-zero and the controller cannot decompose the move into a circle + linear, the alarm is raised. The reported block often looks correct in the post-processor output because the post-processor mis-ordered the geometry.
3.4 Inactive plane mismatch
If G17 (XY), G18 (ZX), or G19 (YZ) is not the active plane, the I, J, K arguments are interpreted differently. A block with the same I J K triple that is valid in G17 may be invalid in G18 because K is read instead of J.
3.5 Modal call interaction with AR / AP
The modal polar arguments AR (arc angle) and AP (polar angle) modify the previous end point. If a CAM post-processor emits G2 AR=... in a block where the previous motion was a rapid G0 whose end point coincides with the start point of the arc, the controller may interpret the result as a zero-radius arc and raise 14040.
4. Post-Processor Root Causes
Most field occurrences of 14040 are not arithmetic mistakes in the G-code — they are post-processor defects that emit arithmetically valid but contextually wrong arcs. The patterns below account for the majority of cases.
4.1 Smoothing-induced drift
When a CAM post-processor that targets a Siemens 840D applies smoothing (block look-ahead, COMPCAD, or vendor-specific smoothing filters), the rounding that the smoother applies can shift the arc's end point by tens of microns. The smoother runs in a separate geometry pass that does not re-check the end point against the center after rounding. The post-processor then emits an end point that no longer matches I, J, K within the MD21000 / MD21010 tolerance window.
4.2 Helix approach mode in roughing cycles
Roughing cycles (e.g., CYCLE72, CYCLE832 with high-performance settings, or third-party pocket cycles) often offer helix-in as a default approach. If the helix end point lies in the active G17 plane but the tool is still several millimeters above the start Z, the post-processor's approach Z and the roughing cycle's retract Z can disagree, producing a G2/G3 whose end point is geometrically inconsistent with the start. Switching the approach to ramp-in eliminates the inconsistency.
4.3 Sub-millimeter rounding
Siemens controllers use 1 µm as the input resolution in the default metric configuration. Post-processors that output 0.0001 in (2.5 µm) values may round to the same integer step on both start and end point, and the round-off error shifts the end point off the circle by one or two steps. The interpreter detects this once the radius is recomputed from the rounded end point.
4.4 Radius-mode emission in lead-in
Some CAM packages output lead-in arcs in R (radius) mode. If the radius value is computed against the untransformed part coordinates and the active coordinate system has a programmable work offset (G54…G599) or a rotation (ROT, AROT, TRANS) in effect, the radius in the NC is no longer the geometric radius. The interpreter recomputes the center from the new start point and rejects the block with 14040.
5. Diagnostic Procedure
Follow this sequence to localize 14040 to a specific block, a specific cycle, or a specific post-processor defect.
- Note the block number from the alarm line.
- Open the part program in the editor and locate the block.
- Check the active plane (G17 / G18 / G19) at the block: search backwards for the most recent plane selection. Most 840D configurations default to G17.
- Verify the start point of the block equals the end point of the previous block. Use the Block Search with Calculation function (or
CALCBLOCKequivalent) to position the program pointer at the block and read the actual start coordinates from the Position display. - Compute the center-to-start radius and the center-to-end radius manually:
- rs = sqrt(I² + J²)
- re = sqrt((Xend − Xcenter)² + (Yend − Ycenter)²)
- If |rs − re| exceeds the value of MD21000 / MD21010, the geometry is at fault. Otherwise, look for a coordinate transform, a plane change, or a compressor interaction.
- If the failing block is inside a Siemens cycle (CYCLE72, CYCLE830, POCKET3), open the cycle and check the parameter Approach — set to ramp if it is helix.
- If the failing block follows a smoothing compressor (G642, COMPCAD, COMPSURF), disable the compressor with G60 (exact stop) for the failing block and re-run. If the alarm disappears, the compressor is the source.
6. Resolution by Cause
6.1 Post-processor: disable smoothing in the post
If the post is configured to apply smoothing, disable it for the failing operation. In Autodesk Fusion 360 and Inventor HSM, the Smoothing toggle in the post configuration lets you keep the same toolpath but skip the smoother. The G-code output then carries the unmodified end points, and 14040 disappears. As an alternative, keep smoothing on and increase the compressor tolerance via MD20172 / MD20180 — see section 6.4.
6.2 Approach: ramp-in instead of helix-in
For roughing cycles that emit a helix approach, switch to ramp-in. The end point of the move is then on the start Z plane rather than a mid-arc position, and the interpreter's check passes. The G2/G3 with Z delta becomes a valid helix only when the linear interpolation is along the orthogonal axis with a circle in the active plane — the ramp approach is the geometrically safer construct.
6.3 Coordinate frame: reset programmable work offsets
If the failing block follows a TRANS / ROT / AROT / SCALE / MIRROR modal command, the end point in the NC is offset by the active frame. Recompute the radius with the active frame applied. If the post-processor is meant to compensate for the frame, the post is defective. Fix the post or strip the frame from the part program with ROT / AROT in the reset and re-run.
6.4 Compressor tolerance
The compressor functions (COMPON, COMPCURV, COMPCAD, COMPSURF) combine short blocks into smooth motion. They do not change the programmed end points, but the rounding they apply can produce a path whose geometric end point lies outside the MD21010 tolerance. Tighten or relax the compressor tolerance via the following machine data:
| MD | Name | Effect |
|---|---|---|
| 20172 | $MC_COMPRESS_VELO_TOL | Velocity tolerance for compressor (mm/min) |
| 20170 | $MC_COMPRESS_BLOCK_PATH_LIMIT | Max compressed block length (mm) |
| 20180 | $MC_COMPRESS_VELO_LIMIT | Max path velocity into compressor |
| 20482 | $MC_COMPRESSOR_MODE | Bit-coded compressor mode (0 = OFF, bit 1 = COMPCURV, bit 2 = COMPCAD, bit 3 = COMPSURF) |
| 20480 | $MC_REFSET_DFLT_BITS | Reset defaults for compressor enable |
6.5 Circle tolerance
The end point tolerance window is set in MD21000 / MD21010:
| MD | Name | Unit | Default | Notes |
|---|---|---|---|---|
| 21000 | $MC_CIRCLE_ERROR_CONST | mm | 0.001 | Constant tolerance on radius mismatch |
| 21010 | $MC_CIRCLE_ERROR_FACTOR | — | 0.001 | Factor applied to radius (proportional) |
Increasing the constant widens the acceptance window. Field use suggests raising the constant to 0.01 mm and the factor to 0.01 reduces 14040 occurrences from smoothing without harming surface finish on parts with radii > 5 mm. Smaller radii require keeping the default. The full alarm reference list is in the SINUMERIK programming manual basics.
7. Helical Interpolation Case Study
The original report describes a sequence: rapid to a start position, feed to Z−31.9, then a helix to Z−37.2. The G-code approximates:
N10 G0 X0 Y0 Z5
N15 G1 Z-31.9 F500
N20 G2 X-10 Y0 Z-37.2 I-5 J0
Block N20 programs a circle in G17 (XY) from (0, 0) to (−10, 0) plus a linear Z motion from −31.9 to −37.2. The geometric check on the circle end point: the center (−5, 0) is exactly 5 mm from both endpoints, so the radius is consistent. The alarm 14040 in this case is often raised because the start point of the helix is read from the previous block's end point. If the post-processor omits the Z-31.9 explicit in the helix block but the controller carries the Z over as if from the previous G1, the path looks correct on screen but the controller's internal end point differs from the post-processor's intent by a sub-millimeter amount. The fix is to repeat the Z explicitly in every helix block:
N20 G17 G2 X-10.000 Y0.000 Z-37.200 I-5.000 J0
The block above is geometrically unambiguous: active plane G17, end point (−10, 0, −37.2), center offset from the start point by (−5, 0). The controller's internal radius check passes because the center, start, and end point all lie in G17.
7.1 Helix pitch verification
SINUMERIK requires the number of full revolutions in a helix to be an integer. A block such as G2 X... Y... Z... I... J... K... is treated as a helix only if the linear component is on a single axis. Mixed-axial linear motion (e.g., Z and X simultaneously) on a circular block raises 14048 (wrong number of revolutions for pitch), not 14040, but the two alarms are often confused. For a clean helix, restrict the linear component to the orthogonal axis of the active plane and let the controller compute the revolutions from the pitch.
8. Smoothing / Compressor Function Reference
| G code | Function | Effect on 14040 |
|---|---|---|
| G60 | Exact stop (modal) | Suppresses compressor; 14040 disappears if smoothing is the cause |
| G64 | Path-synchronous smoothing (default) | Permits compressor on short blocks; can trigger 14040 |
| G642 | Corner smoothing with tolerance | Corner rounding within tolerance; 14040 possible at tolerance boundary |
| G643 | Block-internal smoothing | Generates spline-fit blocks; 14040 possible at compressor boundary |
| G644 | Axis-specific smoothing | Path smoothing; 14040 less likely |
| COMPCURV | Compressor / curved | Generates spline blocks; end points preserved at original positions |
| COMPCAD | Compressor / CAD-oriented | Generates spline blocks optimized for freeform surfaces; 14040 possible at high curvature |
| COMPSURF | Compressor / surface | Topcon-class compressor; 14040 most often attributed here |
Disable the active compressor with COMPOF in the failing program as a diagnostic. The block can be re-enabled once the geometry is confirmed valid.
9. Block-by-Block Verification Procedure
- Run the program in single-block mode (SBL) past the previously failing block. The block should execute with the controller displaying the program pointer at the next block.
- Run the program in dry-run feed (DRY) and verify the tool path visually on the SINUMERIK HMI's Graphics view. The arc should render as a smooth quarter- or half-circle in the active plane, with the expected Z profile on the helix.
- Set the part program pointer to the failing block and run Block Search with Calculation (
CALCBLOCK). The controller precomputes all blocks up to the target and reaches the search position without re-executing the toolpath. If the search succeeds, the geometry is now consistent and 14040 should not reappear on the next run. - Restore the full program flow (all SBL off, feed override 100%, dry-run off) and run the part to confirm the alarm is gone in production conditions.
- If the alarm returns, the fix was incomplete; revisit the compressor / smoothing configuration and re-check the post-processor's modal logic.
10. Prevention and Best Practices
- Always emit the explicit orthogonal axis in a helix block (G17 helix → emit Z; G18 helix → emit Y; G19 helix → emit X).
- Prefer
CT(tangent circle) overG2/G3 with Rfor lead-in moves in 2.5D pocketing.CTrequires the controller to compute the center, so the center is always consistent with the start and end points. - Use
AR(arc angle) only when the controller can derive the end point from the start and the angle — never combineARwith explicitX Yon the same block. - Configure the post-processor to output in the unit system that matches the controller's measurement system setting (default metric for SINUMERIK 840D sl). Mixed-unit output (e.g., metric post in inch controller) generates round-off error.
- Set the G-code reset values to include G17 if the default plane is G18 or G19. This prevents plane-change modal pollution across part programs.
- For CAM packages with smoothing, run a test of the post output with smoothing disabled. If the alarm is gone, the smoother is the source; either disable it in the post or tune MD20172 / MD20180.
- Run an integrity check on every post-processor output: search for blocks where
ARappears with explicitX Y, where the helix block lacks the orthogonal axis, or where the active plane in the post header does not match the part program's plane set in the CAM tree.
11. Related Alarms
| Alarm | Meaning | Resolution overlap with 14040 |
|---|---|---|
| 14010 | Invalid modal G code at block start | Sometimes co-raised with 14040 when AR / AP is used incorrectly |
| 14011 | Error in radius programming | Direct overlap; geometry of circle inconsistent |
| 14012 | Error in modal circle block (no end point) | Direct overlap; missing end point |
| 14013 | Error in modal circle block (start point = end point) | Overlap; AR / AP defects |
| 14040 | Error in end point of circle | — |
| 14045 | Error in contour definition | Compressor-related, similar to 14040 |
| 14048 | Wrong number of revolutions for pitch | Helix-related; full revolutions must be integer |
12. Frequently Asked Questions
What does Siemens 14040 "Channel Block error in end point of circle" mean?
Alarm 14040 indicates that the end point of a G2 / G3 or CT block does not match the programmed center point (I, J, K) or the radius (R) within the tolerance window defined by MD21000 and MD21010. The interpreter stops the program at the block reported in the alarm line. Clear with NC RESET after the geometry is corrected.
Is alarm 14040 caused by the controller or by the NC code?
It is a code-side fault. The interpreter catches the inconsistency before the path is interpolated, so the alarm is almost always correct. Re-check the post-processor output, the active plane, the active coordinate frame, and the active compressor before suspecting a hardware problem.
How do I find the failing block when the alarm is inside a Siemens cycle?
Open the cycle (e.g., CYCLE72) on the HMI and inspect the Approach and Retract parameters. Switch the approach from helix to ramp and re-run. If the alarm moves, the cycle parameters are the source. If the alarm stays, the cycle's compiled-in default end point is wrong — inspect the cycle's source NC in the manufacturer-supplied NC file cabinet.
Can smoothing be the cause even with no G642 / COMPCAD in the program?
Yes. Smoothing is the default in G64. The smoothing path is computed from the part program's nominal end points, and the post-processor may emit end points that lie on the smoother's tolerance boundary. The G-code is valid; the smoother's interpolated path is slightly different. Disable smoothing with G60 / COMPOF for the failing region to confirm.
What is the correct format for a Siemens 840D helix block?
Emit the active plane explicitly, the circle end point, the orthogonal axis end point, and the I, J (or I, J, K) center. For example: G17 G2 X-10 Y0 Z-37.2 I-5 J0. The interpreter computes the circle in the active plane and the linear motion on the orthogonal axis from the same block, so the end point and the center are always consistent.