Resolving Siemens 840D Rough Transitions at Feedrate Changes

David Krause20 min read
Motion ControlSiemensTroubleshooting
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

Resolving Siemens 840D Rough Block Transitions at Programmed Feedrate Changes

On SINUMERIK 840D sl controllers running CAM-generated multi-block toolpaths, a recurring symptom is a perceptible "jerk," scallop, or contour roughness at every block where the post-processor emits a new F word. The part program itself is geometrically clean, the controller is properly tuned, and the mechanical machine (in this case a Deckel Maho DMC 80U duoblock) is HSC-capable — yet the path quality is dominated by a periodic disturbance that arrives exactly when the programmed feedrate changes. This reference explains the underlying interpolator behavior, the role of CYCLE832, the custom macro CUST_832.SPF, the path-control G-codes (G60 / G64 / G642 / G645), the compressor functions (COMPCAD, COMPCURV), the feed-forward / acceleration-profile system (FFWON, SOFT), and the machine data that must be set in order to obtain a continuously smooth contour across feedrate-change blocks.

Field reference: The symptom described — roughness localized at F-word changes with otherwise normal cut — is almost never mechanical. It is a path-control, look-ahead, and compressor configuration problem that can be resolved at the NC level without touching ballscrews, drives, or the spindle.

1. Problem Statement

A typical post-processed milling program on an 840D sl shows the following pattern near the rough transitions:

N11760 X119.699 Y-50.373 F2444.
N11770 X118.645 Y-49.151
N11780 X117.532 Y-47.983
N11790 X117.135 Y-47.581 F3250.
N11800 X116.331 Y-46.781 F2435.
N11810 X115.496 Y-46.014
N11820 X114.631 Y-45.279
N11830 X114.516 Y-45.182 F3250.
N11840 X114.051 Y-44.786 F2440.
N11850 X113.566 Y-44.412
...

Each line is a short linear block (1–2 mm), the geometry is continuous, but every block either initiates a new modal feedrate (F2444, F3250, F2435, F2440 …) or is the first block after a feedrate change. The measured surface bears a regular pattern aligned with the block boundaries, and the audible/visible feed change suggests the axis is decelerating, settling, and re-accelerating at every F transition.

The same symptom can be observed on a wide variety of post processors (Mastercam, NX, Fusion 360, hyperMILL, etc.) and on both 840D sl and 828D controllers.

2. Root Cause Analysis

Three independent issues typically combine to produce the symptom. Each must be addressed separately.

2.1 G60 vs G64 in the Program Header

The program header in the source contains:

N20 G40 G17 G710 G94 G90 G60 G601 FNORM

G60 activates exact-stop behavior: at the end of every block, all path axes are decelerated to zero and held within the exact-stop fine tolerance (G601 = "interpolator-end exact stop fine"). With a block length of 1 mm and a programmed feedrate of 2400 mm/min, the axis is being forced to come to rest forty times per second. This single line in the header is the most common cause of "rough at every block" complaints on HSC machines.

The correct modal setting is one of the continuous-path modes:

G-Code Behavior Recommended Use
G60 Exact stop at every block end Drilling, single-point moves, position-only positioning
G64 Continuous-path (default profile) General milling
G641 Continuous path with programmable contour deviation Transition smoothing within a defined window
G642 Continuous path, max deviation with tolerance band HSC milling (840D sl SW ≤ V6.x)
G643 Block-internal, axis-specific smoothing Short blocks, low tolerance
G644 Maximum dynamic smoothing (knee-limited jerk) Very short blocks, high dynamic drives
G645 Continuous path, optimized geometric smoothing HSC milling (840D sl SW ≥ V6.x, default in CYCLE832)
If G60 is left active in the contour, no compressor, no look-ahead, and no machine data tuning will produce smooth motion. Confirm the active G-code group 10 with $AC_PATHCTRL in the diagnostics menu.

2.2 CYCLE832 Tolerance Selection

The header invokes:

N280 _camtolerance=0.100000 ; User Defined
N290 CYCLE832(_camtolerance,112003)
N310 TRAFOOF

The CYCLE832 call's third argument is the technology/tolerance index. With the source selection (112003), the cycle activates the Roughing (DYNROUGH) dynamic preset but, with the default CUST_832.SPF, does not activate a compressor, does not force G642, and does not switch feed-forward / soft acceleration. Tolerance is therefore not made effective. The cycle returns the dynamic settings of DYNROUGH, but the contour accuracy is still determined by the default (G60 / G601) of the calling program.

2.3 F-Word Modality in Modal Programming

In Siemens G-code, F is a modal value. Once written, it remains active until the next F word. A post processor that emits a new F on every block — or on the first block after a feed change — is harmless in continuous-path mode but actively harmful under G60. The fix is twofold: (a) get the controller out of G60, and (b) make sure the compressor reads the modal F from the previous block so the F-word is not re-interpreted as a feedrate step.

3. CYCLE832 — Parameter Reference

CYCLE832 is the SINUMERIK high-speed-setting cycle. Its syntax is:

CYCLE832 (_TOL, _MODE[, _TM])
Argument Meaning Type
_TOL Contour tolerance (mm or inch). Drives compressor accuracy band and G642/G645 deviation limit. REAL
_MODE 10-digit technology code. Encodes machining type, tolerance band, transformation, technology, and feed-forward settings. INT
_TM Optional: name of the orientation transformation (TRAORI) for 5-axis toolpaths. STRING

The _MODE argument is positional: DOFTM[5].DOFTM[4].DOFTM[3].DOFTM[2].DOFTM[1], where the digits have the following meaning for current 840D sl SW (≥ V6.x):

Digit Position Meaning Typical Value
1 (units) Machining type: 0 = none, 1 = rough, 2 = finish, 3 = rough + finish 3
2 (tens) Tolerance band: 0 = none, 1 = tolerance, 2 = contour tolerance, 3 = orientation tolerance 2
3 (hundreds) Transformation: 0 = no, 1 = TRAORI only, 2 = TRAORI + compressor 2
4 (thousands) Technology: 0 = none, 1 = mill_rough, 2 = mill_finish, 3 = mill_semifinish, 4 = mill_rough-finish 1
5 (ten-thousands) Reserved / future 0

The 112003 value in the source program decodes as 1 / 1 / 2 / 0 / 3 — that is: rough, tolerance, TRAORI + compressor, no technology preset, reserved. The cycle therefore should be requesting a compressor, but the effective behavior depends on what the loaded CUST_832.SPF actually implements on the local controller — and on the active G-code group 10 setting in the calling program.

4. CUST_832.SPF — Customizing the Cycle

CUST_832.SPF is the user-customizable cycle behind CYCLE832. It is loaded at NCK start and determines which G-codes, compressor functions, and feed-forward / acceleration profiles are activated for each combination of _TOL and _MODE. A typical HSC-oriented CUST_832.SPF excerpt for roughing looks like:

PROC CUST_832(REAL _TOL, INT _MODE, STRING _TM) SAVE DISPLOF
  ; --- decode _MODE ---
  DEF INT _MACH = _MODE MOD 10
  DEF INT _TOLB = (_MODE MOD 100)  TRUNC 10
  DEF INT _TR   = (_MODE MOD 1000) TRUNC 100
  DEF INT _TECH = (_MODE MOD 10000) TRUNC 1000
  ; --- branch on technology ---
  IF _TECH == 1 OR _TECH == 4 THEN
    ; ROUGH
    G642                          ; continuous path with tolerance
    COMPCAD                       ; CAD compressor
    FFWON                         ; feed forward on
    SOFT                          ; soft acceleration profile
    _SETTYP(1)                    ; dynamic mode = roughing
  ELSEIF _TECH == 2 OR _TECH == 3 THEN
    ; FINISH / SEMI-FINISH
    G645                          ; continuous path, geometric smoothing
    COMPCAD
    FFWON
    SOFT
    _SETTYP(2)                    ; dynamic mode = finishing
  ENDIF
  ; --- apply tolerance ---
  IF _TOLB >= 1 THEN
    $MA_SFACTOR_TOL = _TOL
  ENDIF
  ; --- transformation (5-axis) ---
  IF _TR >= 2 AND _TM <> "" THEN
    TRAORI(_TM)
  ENDIF
  RET
ENDPROC

The diagnostic rule is simple: when CYCLE832 is called, after the call the user should observe the following in the diagnostics display (or via the online form):

Active G-Code Group 10 Active G-Code Group 30 Active Compressor FFWON / SOFT
G642 or G645 G601 (or G602 with the right SW) COMPCAD both ON

If any of these are absent, either the calling program has overridden them (e.g. an unconditional G60 in the header), or the local CUST_832.SPF is missing the corresponding ... statement for the requested technology.

Important: G-codes written in CUST_832.SPF are modal and persist beyond the cycle. If the calling program subsequently issues a conflicting G-code (such as G60 in the header), it will silently deactivate the compressor and path-control settings without producing an alarm.

5. Path Control Modes — G60 / G64 / G642 / G645

The path-control G-codes (modal group 10) are the primary lever for surface quality on short-block programs. Selection criteria:

5.1 G60 (Exact Stop)

Activates exact-stop at the end of every block. Two sub-modes are available via modal group 20:

Sub-G-Code Behavior
G601 Fine exact stop: axis must reach position within MD20150 $MC_GCODE_DEFAULT_VALUES[8] (default: MD36010 $MA_STOP_LIMIT_FINE).
G602 Coarse exact stop: within MD36012 $MA_STOP_LIMIT_COARSE.

Use G60 only for predictable tool-position moves (e.g., drill, tap, single-point positioning). Never in a milling contour.

5.2 G64 (Continuous Path)

Switches off exact-stop. The interpolator decelerates each axis only as required to satisfy velocity, acceleration, and jerk limits; the path is mathematically continuous across block boundaries.

5.3 G641 (Programmable Contour Deviation)

Continuous path with a maximum permissible contour deviation. The deviation is programmed with ADIS (path) and ADISPOS (positioning) — usually not required for CAM programs that already use CYCLE832.

5.4 G642 (Max Deviation with Tolerance Band)

The standard HSC mode for 840D sl SW ≤ V6.x. The tolerance band comes from the _TOL argument of CYCLE832. The interpolator distributes the path error over multiple blocks so that the contour deviation never exceeds the programmed tolerance, even on very short blocks.

5.5 G643 (Block-Internal Smoothing)

Used for low-tolerance finishing (tolerance < 0.01 mm) where the bandwidth of G642 becomes insufficient. Smoothing is internal to each block rather than distributed across block boundaries.

5.6 G644 (Maximum Dynamic Response)

The most aggressive smoothing. Uses knee-limited jerk. Best on very short blocks with high-dynamic drives. Risk: contour accuracy is reduced; not recommended for finishing.

5.7 G645 (Optimized Geometric Smoothing)

Continuous path with optimized geometric smoothing — default in CUST_832.SPF on 840D sl SW ≥ V6.x. Combines the contour-accuracy behavior of G642 with a higher level of internal smoothing, suitable for both roughing and finishing.

Selection guidance:

Application Recommended Group 10 Group 20
Volumetric roughing (3-axis) G642 G601
Finishing (tolerance > 0.02 mm) G642 G601
Finishing (tolerance < 0.02 mm) G645 G601
5-axis finishing G645 + COMPCAD G601
High-dynamic HSC (short blocks, low tol) G644 G601
Drilling / tapping G60 G601

6. Compressor Functions — COMPCAD vs COMPCURV

The compressor replaces the original linear blocks with internal spline blocks of the same start and end point, providing a path that is smoother and shorter. Two variants are relevant:

Function Behavior When to Use
COMPCURV Compresses linear blocks into a curve-table-friendly spline. Most effective on 2D and 2.5D contours. Profile milling, 2.5D pockets, 3-axis planar cuts.
COMPCAD Compresses to a CAD-compatible spline; handles 5-axis, complex curvature, and very short blocks more robustly. 5-axis simultaneous milling, complex 3D surfaces, post processors that emit many short blocks.

COMPCAD is the recommended default in CUST_832.SPF for any 5-axis program and for any 3-axis program that exhibits the feedrate-change roughness described in this article.

Block compression and F-modality: When the compressor is active, the interpolator no longer reads individual modal F-words per block. The compressor builds a single spline and applies the modal feedrate continuously along it. The "rough at every F-word change" symptom disappears because the F-words are no longer being interpreted as independent feedrate events.

7. Feed Forward and Acceleration Profile

Setting Effect Recommended Value
FFWON Feed forward active — the speed-dependent following error is pre-compensated by the interpolator, so contours stay accurate even on sharp direction changes. Always ON for milling.
FFWOF Feed forward off — only the position controller compensates following error. Only for commissioning and tests.
SOFT Soft acceleration profile (jerk-limited). Smooth transitions at the cost of slightly longer acceleration phases. Always ON for HSC milling.
BRISK Brisk acceleration (trapezoidal velocity, no jerk limit). Faster acceleration, harder on the part surface. Only for punch presses and non-HSC.
SOFTA Soft acceleration limit, axis-specific. Used to tune individual axes for non-symmetric mechanics.

Activating FFWON has two prerequisites: (1) the velocity feed-forward factor must be set in MD32610 $MA_FFW_MODE and (2) the feed-forward gain in MD32800 $MA_EEC_ENABLE / MD32810 $MA_EEC_K_FACTOR. The default installation of CUST_832.SPF assumes these have been set by the machine manufacturer (e.g., DMG MORI).

8. Machine Data Reference

The following machine data must be set consistently with the path-control G-codes and the compressor function. Modifying these without OEM consultation is not recommended; the values below are the typical HSC factory defaults on a 5-axis DMG machine.

Machine Data Description Typical HSC Value
MD20150 $MC_GCODE_DEFAULT_VALUES[8] Default exact-stop fine tolerance 0.0 (irrelevant if G64 is modal)
MD20200 $MC_MAXFEED Maximum path feedrate (mm/min) Matches the drive's maximum velocity
MD20170 $MC_COMPRESS_BLOCK_PATH_LIMIT Maximum path length beyond which the compressor is automatically disengaged 1.0 to 5.0 mm
MD20172 $MC_COMPRESS_VELO_TOL Maximum permissible velocity tolerance at compressor output (relative to the programmed F) 0.1 (= 10 %)
MD20400 $MC_LOOKAH_NUM_OVR Number of override levels for look-ahead. Higher = more aggressive but slower NCK. 3 (rough) / 5 (finish)
MD20430 $MC_LOOKAH_VELO Look-ahead velocity factor (0.0 – 1.0) 0.05 (5 %)
MD20440 $MC_LOOKAH_RETRACTION Look-ahead retraction factor for fast retraction moves 0.0 (disabled)
MD20450 $MC_LOOKAH_FFORM Look-ahead feed-forward form: 0 = step, 1 = ramp, 2 = ramp+smooth 2 (ramp+smooth)
MD20460 $MC_LOOKAH_SMOOTH_FACTOR Smoothing factor (1.0 = no smoothing, higher = more smoothing) 1.0–1.5
MD20470 $MC_LOOKAH_NUM_SMOOTH_BLOCKS Number of look-ahead blocks used for smoothing 0 (default: no extra smoothing)
MD20480 $MC_LOOKAH_OVR_POINTS Number of override points for look-ahead 10
MD20482 $MC_LOOKAH_OVR_POINTS_FIRST Number of override points for look-ahead (first block) 2
MD20610 $MC_ADD_MOVE_ACCEL_RESERVE Acceleration reserve for additive motion 0.1 (10 %)
MD28520 $MC_MM_ORIPATH_CONFIG Orientation path configuration Bit 0 = 1 (orient smoothing active)
MD28530 $MC_MM_ORIPATH_LIFT Orientation path lift factor for TCPM 10.0 (or per OEM)
MD28535 $MC_MM_ORIPATH_SMOOTH_BOTH Smoothing for orientation path on both sides 0 or 1 per OEM
MD28540 $MC_MM_ORIPATH_SMOOTH_DIST Distance for orientation smoothing 5.0 (mm)
MD32420 $MA_JOG_AND_POS_JERK_ENABLE Enable jerk limitation for jog/positioning 1 (ON)
MD32430 $MA_JOG_AND_POS_MAX_JERK Maximum jerk for jog/positioning 50.0 (m/s³, axis-specific)
MD32500 $MA_FRICT_COMP_ENABLE Friction compensation enable 1 (ON)
MD32510 $MA_FRICT_COMP_ADAPT_ENABLE Friction compensation adaptive 1 (ON)
MD32610 $MA_FFW_MODE Feed-forward mode: 0 = off, 1 = velocity feed-forward, 2 = accel feed-forward 1 or 2
MD32800 $MA_EEC_ENABLE Enable following error compensation 1 (ON)
MD32810 $MA_EEC_K_FACTOR Following error compensation Kv factor 1.0 (per drive tuning)
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT Speed point at which acceleration is reduced 0.0 (disabled) or per axis
MD35230 $MA_ACCEL_REDUCTION_FACTOR Acceleration reduction factor 1.0 (no reduction)
MD36010 $MA_STOP_LIMIT_FINE Exact-stop fine limit (mm) 0.001
MD36012 $MA_STOP_LIMIT_COARSE Exact-stop coarse limit (mm) 0.05

Detailed descriptions for each data item are in the official SINUMERIK 840D sl / 828D Basic Functions manual: 840D sl Axes and Spindles (Function Manual) and 840D sl / 828D Basic Functions (Function Manual). For 5-axis / transformation-specific MDs see the 840D sl Transformations (Function Manual) and the SINUMERIK 840D sl / 828D Basic Functions article: SINUMERIK 840D sl / 828D Basic Functions – ID 64932982.

OEM Warning: The machine manufacturer (in this case DMG MORI for the DMC 80U duoblock) has already tuned these MDs to match the mechanical structure. Changing them without OEM approval will void the warranty and may induce new oscillations. Contact the OEM before modifying any of the $MC_ or $MA_ entries above.

9. Step-by-Step Configuration Procedure

  1. Replace G60 in the program header. Change line N20 from G60 G601 to G642 (or G645 on SW ≥ V6.x). Confirm that no later block in the program issues another G60 or G9 (single-block exact stop).
  2. Verify CYCLE832 technology index. For a 3-axis roughing program with no orientation tolerance, use CYCLE832(_camtolerance, 112003) with _camtolerance = 0.03–0.10 mm. For 5-axis roughing, use 112011 (tolerance + TRAORI + compressor + mill_rough).
  3. Inspect CUST_832.SPF. Open the cycle in the program directory (usually /_N_CMA_DIR/_N_CUST_832_SPF) and verify that the technology branch for "rough" includes G642, COMPCAD, FFWON, and SOFT.
  4. Confirm axis-side FFW. In the diagnostics menu, check that $AA_FFW_MODE[Ax] = 1 or 2 for all path axes. If 0, the controller is not applying velocity feed-forward even if FFWON is modal — this alone can cause the symptom.
  5. Check machine data values. In the SINUMERIK Operate menu Commissioning → Machine Data, verify that MD32610 and MD32810 are non-zero and consistent with the drive tuning report from the OEM.
  6. Run a single-block test. Execute the program in single block with the dry-run feedrate (e.g., F500). Each block boundary should produce a smooth, almost imperceptible "soft" transition — not a hard stop.
  7. Verify look-ahead. In the diagnostics menu, display $AC_LOOKAH_NO_BLOCKS_PREP and $AC_LOOKAH_NO_BLOCKS. Both should be non-zero during the contour. If both are zero, the look-ahead is not active and every F-word will be interpreted as a feedrate step.
  8. Inspect the part. Run a short program at the actual feedrate and inspect the surface. The "stippled" or "scalloped" pattern that aligns with block boundaries should be gone.

10. Verification and Diagnostics

After applying the changes, use the following on-line variables in the SINUMERIK Operate "Parameters / HMI diagnostics" view to confirm the state of the controller during program execution:

Variable Expected Value After Fix Meaning
$AC_PATHCTRL[AX...] 1 (G642) or 2 (G645) Active path-control mode
$AC_FGROUP[AX...] Includes all path axes Axes in the path group
$AC_COMPCAD[AX...] 1 COMPCAD active
$AC_FFW_MODE[AX...] 1 (velocity) or 2 (accel) Active feed-forward mode
$AA_SOFT_ACCEL[AX...] 1 Soft acceleration active
$AC_LOOKAH_NO_BLOCKS ≥ 10 Number of look-ahead blocks active
$AC_LOOKAH_OVR 1.0 (100 %) Effective look-ahead override

For trace-based diagnosis, the controller exposes the following signals on the axis service screen (Servo Trace):

  • Position command value (kv) — should be smooth across F-word boundaries when COMPCAD and G642 are active.
  • Position actual value (kx) — should track the command value within the contour tolerance band (MD36400 $MA_CONTOUR_TOL, typical 0.01 mm).
  • Velocity feed-forward output — should rise smoothly during the F-word transitions, not step.
  • Following error — should be reduced by FFWON to a fraction of its uncompensated value (typically < 5 % of the uncompensated error).

11. Troubleshooting Matrix

Observed Symptom Most Likely Cause First Check Fix
Rough at every block boundary, normal between blocks G60 in the program header Search the program for G60 / G9 Replace with G642 or G645
Rough only at F-word changes, smooth otherwise Compressor not active Check $AC_COMPCAD in the diagnostics Add COMPCAD to CUST_832.SPF or call COMPCAD in the program
Rough at every F-word, but G60 / COMPCAD look correct FFWON not active at axis level Check $AA_FFW_MODE and MD32610 Set MD32610 $MA_FFW_MODE = 1 and re-apply FFWON
Surface is smooth at low F, rough at high F Acceleration / jerk limit too low Check MD32300 $MA_MAX_AX_ACCEL and MD32431 $MA_MAX_AX_JERK Increase jerk limit (axis-side, OEM-approved)
Surface is smooth in 3-axis, rough in 5-axis Orientation smoothing off Check MD28520 and MD28540 Enable orientation smoothing per OEM spec
Rough at corners even with G642 / COMPCAD Look-ahead too short Check MD20430 $MC_LOOKAH_VELO and MD20400 Increase look-ahead number of blocks (consult OEM)
Compressor alarms (e.g., 10950, 10960) Block too short or too long for compressor Check the program for sub-millimeter blocks Tune post-processor output, increase MD20172 within OEM limits
Surface ok at F = 1000, rough at F = 3000 Drive current limit reached Check drive diagnostics for I²t / current saturation Reduce programmed feedrate or improve drive tuning (OEM)

Common alarm codes raised by compressor / look-ahead misconfiguration (from the SINUMERIK 840D sl Diagnostics Manual):

Alarm Number Meaning Typical Cause
10950 Compressor warning: contour deviation exceeded Tolerance _TOL too small for the curvature / block length
10960 Compressor: look-ahead overflow Too many short blocks; check MD20170 $MC_COMPRESS_BLOCK_PATH_LIMIT
10750 Feed-forward axis not ready MD32610 = 1/2 but MD32800 $MA_EEC_ENABLE = 0
10753 Following error compensation not parameterized MD32810 $MA_EEC_K_FACTOR = 0
20150 G-code default values inconsistent MD20150 $MC_GCODE_DEFAULT_VALUES for group 10 conflicts with the program

12. Header Templates

The following header templates produce reliable, smooth motion on 840D sl for typical CAM-generated programs. Replace the values for the actual machine, post-processor, and controller SW.

12.1 3-Axis Roughing

;SIEMENS 840D sl HEADER -- 3-axis roughing
DEF REAL _camtolerance = 0.05
N10 G40 G17 G71 G94 G90 G642 G601 FNORM
N20 $AC_MEAS_TYPE = 0
N30 TRAFOOF
N40 T122 M6
N50 S10000 M3
N60 M8
N70 G0 X97.072 Y-69.018 Z6. D1
N80 CYCLE832(_camtolerance, 112011)  ; rough + tolerance + TRAORI + compressor + mill_rough
N90 G1 Z-.7 F500 M26
N100 F1650  ; engage

12.2 3-Axis Finishing

;SIEMENS 840D sl HEADER -- 3-axis finishing
DEF REAL _camtolerance = 0.01
N10 G40 G17 G71 G94 G90 G645 G601 FNORM
N20 TRAFOOF
N30 T122 M6
N40 S12000 M3
N50 M8
N60 G0 X97.072 Y-69.018 Z6. D1
N70 CYCLE832(_camtolerance, 112022)  ; finish + tolerance + TRAORI + compressor + mill_finish
N80 G1 Z-.7 F300 M26
N90 F800  ; engage

12.3 5-Axis Simultaneous Roughing

;SIEMENS 840D sl HEADER -- 5-axis roughing with TRAORI
DEF REAL _camtolerance = 0.05
DEF STRING _TM = "ROTATION_5AX"
N10 G40 G17 G71 G94 G90 G642 G601 FNORM
N20 TRAFOOF
N30 T122 M6
N40 S10000 M3
N50 M8
N60 G0 X97.072 Y-69.018 Z6. B0 C0 D1
N70 CYCLE832(_camtolerance, 112011, _TM)
N80 G1 Z-.7 F500 M26
N90 F1650  ; engage
Controller SW compatibility: On 840D sl SW < V6.x, use G642 in the header and in CUST_832.SPF. On 840D sl SW ≥ V6.x, use G645. The CUST_832.SPF on the latest SW versions activates G645 by default, but the value can be overridden by the calling program if the header is left as G60.

Why does my 840D program look rough at every F-word change, even though the path geometry is continuous?

Almost always, the program header contains G60 (exact stop) or a single-block exact-stop G9 in the contour. With G60 active, the interpolator brings every path axis to a halt at the end of every block, then re-accelerates. Even a 1 mm block at F2400 forces a stop every 25 ms. Remove G60 from the header and replace it with G642 (840D sl SW ≤ V6.x) or G645 (SW ≥ V6.x). Confirm the active G-code group 10 with the diagnostics variable $AC_PATHCTRL — it should be 1 (G642) or 2 (G645), not 0 (G60).

What does CYCLE832 actually do, and which technology index should I use?

CYCLE832 is the SINUMERIK high-speed-setting cycle. It activates the compressor, the path-control G-code, feed-forward, soft acceleration, and the dynamic mode corresponding to the technology index. For 3-axis roughing use 112003 or 112011; for finishing use 112022 or 112002; for 5-axis work use the same values with the third argument set to the TRAORI name. The cycle itself is just a dispatcher — the actual G-codes it activates are in CUST_832.SPF, which must be configured for the local SW version and machine.

Should I modify the machine data ($MC_ / $MA_) to fix the roughness?

No, not as a first step. The machine manufacturer (DMG MORI, Grob, Hermle, GF, etc.) tunes the machine data to match the mechanical structure of the specific machine. The roughness described in this article is almost always solved by changing the program header (G60G642 / G645), confirming that CUST_832.SPF activates COMPCAD / FFWON / SOFT, and confirming the axis-side feed-forward with $AA_FFW_MODE. Only if those checks pass should you consider consulting the OEM about machine data.

My G642 / G645 program is still rough. What's next?

Check three things in this order: (1) $AC_COMPCAD = 1 during the contour — if not, the compressor is not running, and the F-words are still being interpreted as modal feedrate events; (2) $AA_FFW_MODE = 1 or 2 on every path axis — if 0, the controller is not pre-compensating the velocity-dependent following error, and the part will carry a "stipple" pattern; (3) the look-ahead is active — $AC_LOOKAH_NO_BLOCKS ≥ 10 during the contour. If any of these is wrong, correct it before touching machine data. Reference: SINUMERIK 840D sl / 828D Basic Functions (Function Manual).

What is the difference between COMPCAD and COMPCURV, and which one should I use?

Both are block compressors that replace linear blocks with internal splines of the same start and end point. COMPCURV is optimized for 2.5D contours (profile milling, pockets). COMPCAD is more robust on 5-axis programs, complex 3D curvature, and very short blocks. For 3-axis HSC roughing / finishing, either works. For 5-axis simultaneous work, use COMPCAD. The choice is made in CUST_832.SPF (or in the program via COMPCAD / COMPCURV) — see the 840D sl Transformations (Function Manual) for 5-axis-specific behavior.

Back to blog