High-Speed Machining & Look-Ahead

On the control side, high-speed machining is about exactly one problem: a 3D surfacing program is thousands of tiny line segments arriving faster than the control can plan motion for them. Everything sold under the HSM banner—look-ahead, smoothing, corner rounding, “AI” contour control—is one of three levers pulled against that problem. If your surfacing program runs at half the programmed feed, stutters, or leaves facets and dwell marks, this page is the diagnosis.

  • Look-ahead — plan many blocks ahead of the one executing, so the control brakes early instead of panic-stopping at every feature.
  • Smoothing — re-fair the choppy chord data into continuous motion the axes can actually follow.
  • The tolerance band — how far the control may deviate from the programmed points to keep the feed up. This is the knob you set; the other two are what it buys.

Why Small Blocks Choke a Control

Do the arithmetic honestly and the problem is obvious. A finishing pass at F3000 (3000 mm/min) is 50 mm of travel every second. If the CAM system posted that toolpath as 0.1 mm line segments—typical for a tight-tolerance surface—the control must read, parse, plan, and execute 500 blocks every second, one every 2 milliseconds. Cut the segment length or push the feed and it climbs fast:

Programmed feed Segment length Blocks/sec required Time per block
F1000 (16.7 mm/s)0.5 mm3330 ms — any control coasts
F3000 (50 mm/s)0.1 mm5002 ms
F6000 (100 mm/s)0.1 mm1,0001 ms
F6000 (100 mm/s)0.05 mm2,0000.5 ms — beyond many controls

A control's block processing rate—how fast it can chew through blocks—is a hard hardware/firmware limit, and plenty of controls in the field cannot sustain 500 blocks/sec, let alone 2,000.

When the blocks can't be processed as fast as the axes could travel them, the control data-starves: the axes finish the current segment before the next one is ready and must wait—for a few milliseconds, hundreds of times a second. The symptoms are exactly what a slow surfacing job looks like:

  • The real feedrate collapses. The control simply cannot go faster than (block length × block processing rate), no matter what F says. At 0.1 mm blocks and 200 blocks/sec, you get F1200—regardless of the F3000 in the program.
  • Stutter and dwell marks. Each micro-stop lets the tool dwell and rub instead of cut. On a finished surface those show up as witness marks and inconsistent finish; in tough materials the rubbing work-hardens the surface and eats the tool.
  • Burned or dug corners. Where motion pauses in the cut, heat concentrates at the point of contact.

Underneath this sits the reason corner deceleration exists at all. A corner between two segments is a step change in velocity direction, and following it exactly would take infinite acceleration. Real axes have acceleration limits (the servos and ballscrews can only pull so hard) and jerk limits (how fast acceleration itself may change before the machine rings). So at every corner the control must either decelerate—in the limit, to a full stop—or round the corner off within some tolerance so velocity changes smoothly. A point-cloud surfacing program is thousands of tiny corners in a row; without help, the control brakes for every one of them.

Look-Ahead

Look-ahead is the planner reading N blocks beyond the one executing and computing a velocity profile across all of them at once instead of block by block. With that preview the control can:

  • Start braking early. If a sharp corner or a tight radius is 40 blocks ahead, deceleration begins now, spread over the approach, instead of panic-braking inside the last segment.
  • Blend corners within tolerance. Adjacent segments that deviate from a straight line by less than the tolerance band get treated as one continuous move—no corner, no decel.
  • Hold feed through curvature. The planner sees the whole arc-like region of tiny segments, recognizes the effective curvature, and runs the highest feed the centripetal-acceleration limit allows—steady, instead of surging and braking segment by segment.

The buffer size a machine actually needs falls out of braking-distance arithmetic, not marketing numbers. Stopping from feed v at deceleration a takes a distance of v²/2a, and the planner must always be able to see at least a full braking distance ahead—otherwise it cannot guarantee a stop for whatever the program does next. Assuming a usable deceleration of 1 m/s² and 0.1 mm segments:

Feed Braking distance (v²/2a) Blocks of preview needed
F3000 (50 mm/s)1.3 mm~13
F6000 (100 mm/s)5 mm~50
F10000 (167 mm/s)~14 mm~140
F20000 (333 mm/s)~56 mm~560

That is why look-ahead depth scales with feed and with how finely the path is chopped: “200 blocks” is generous at F3000 and marginal at F12000, and halving the segment length doubles the blocks needed at every feed. When the preview buffer is too shallow for the feed, the control quietly caps the feed to what it can guarantee—another way a program runs slower than programmed with no alarm and no explanation.

Smoothing / HSM Modes per Control

Every major control wraps its look-ahead, corner blending, and tolerance handling into a switchable HSM mode. The names differ; the lever is the same: turn it on, give it a tolerance, and tell it whether you are roughing or finishing. Only well-established invocations are shown as code below—for the rest, the mechanism is described and the exact activation belongs to your machine's documentation, because several of these are paid options that may or may not be on your machine.

Control Feature Invocation Tolerance
FanucAI Contour Control (AICC I/II) / AI Advanced Preview ControlG05.1 Q1 on / G05.1 Q0 offPrecision level / parameters (see note)
HaasSmoothing (accuracy control)G187 Pn EnnnnE = max corner rounding
Siemens SINUMERIKHigh Speed SettingsCYCLE832(tol, mode, …)First argument = path tolerance
HeidenhainCycle 32 TOLERANCECYCL DEF 32T = path tolerance, TA = rotary-axis tolerance
MazakSmooth-series geometry compensation / high-gain controlMachining-mode selection (mechanism — see below)Machining condition set
BrotherAccuracy mode selectionMode selection (mechanism — see below)Mode-dependent
OkumaHi-Cut / Super-NURBSOption-dependent (check option set)Option-dependent

Fanuc — AICC / AI-APC (G05.1). One G-code family covers the whole AI preview/contour lineup; which member you have (AI Advanced Preview Control, AI Contour Control I or II) depends on the model and option set, but the switch is the same:

G05.1 Q1        (AICC / AI PREVIEW ON - BEFORE THE SURFACING TOOLPATH)
...             (3D FINISHING PASSES)
G05.1 Q0        (OFF BEFORE DRILLING / TAPPING / RIGID CYCLES)

Note that on Fanuc the tolerance is not on the G-code line: the accuracy-vs-speed trade lives in the machining condition selection (a precision level, typically 1–10) and its underlying parameter set. Confirm on your machine how the level is selected—some builders expose it on the G05.1 block, most through the parameter screen.

Haas — G187. The most transparent implementation: one block sets both the smoothness level and the corner-rounding tolerance, and M30/reset restores the machine default:

G187 P1 E0.1    (P1 ROUGH: FASTEST, LOOSEST - E = 0.1 MM MAX DEVIATION)
G187 P2 E0.02   (P2 MEDIUM)
G187 P3 E0.005  (P3 FINISH: SMOOTHEST, TIGHTEST)
G187            (NO WORDS = BACK TO THE MACHINE'S DEFAULT SETTING)

Siemens — CYCLE832. The “High Speed Settings” cycle bundles the SINUMERIK smoothing machinery (compressor, look-ahead, jerk limiting) behind two decisions: a path tolerance and a machining-type parameter (roughing / semi-finishing / finishing), which biases the control toward speed or surface accordingly:

CYCLE832(0.01, _FINISH, 1)   ; 0.01 mm tolerance, finishing bias
...                          ; surfacing program
CYCLE832()                   ; deactivate / back to defaults

On 5-axis work CYCLE832 also manages the orientation-axis tolerance alongside the path tolerance, which is where it meets TRAORI—see SINUMERIK Transformations & 5-Axis for that machinery.

Heidenhain — Cycle 32 TOLERANCE. The TNC's contouring behavior is tolerance-driven by design; Cycle 32 sets how far the control may smooth the path:

CYCL DEF 32.0 TOLERANCE
CYCL DEF 32.1 T0.02           ; path tolerance for the linear axes, mm
CYCL DEF 32.2 HSC-MODE:1 TA0.5 ; mode bias + rotary-axis tolerance (deg)

Mechanically: T is the band the linear axes may deviate by, TA (on machines with rotary axes) is the equivalent angular band for the rotaries, and the HSC-mode word biases the control toward velocity (roughing) or path accuracy (finishing). The defaults and the exact wording of the 32.2 block vary by TNC generation—confirm against your control's cycle documentation.

Mazak — Smooth-series control. The selling point of the Smooth controls is that the HSM machinery is largely built in rather than bolted on: shape-recognition geometry compensation and high-gain feed-forward servo control re-fair the incoming path and keep following error down at high block rates, selected through machining-condition / machining-mode sets rather than a per-program G-code. Pick the mode that matches the operation (rough vs. finish) and the control manages the tolerance-speed trade from its condition tables.

Brother — Speedio. Brother's strength is raw acceleration and non-cut time—the machines out-accelerate most of the field, which flatters small-block programs by shrinking the braking-distance problem itself. Accuracy-vs-speed is a mode selection on the control (standard vs. accuracy-biased modes) rather than a tolerance-on-a-G-code-line scheme; for heavy 3D surfacing, expect the win to come from the machine's dynamics more than from a smoothing algorithm.

Okuma — Hi-Cut / Super-NURBS. OSP controls offer Hi-Cut Pro (high-speed contouring with look-ahead and acceleration management) and Super-NURBS (which re-fits the point data to smooth spline motion within a settable tolerance). Both are options—check the option set on your machine before assuming they are there, and take the activation syntax from the machine's own OSP documentation.

The Tolerance Band Trade

Every one of those modes asks for a tolerance number, and it is worth being precise about what that number buys. The tolerance is the band around the programmed path inside which the control is allowed to re-draw the motion. Wider band: the control can round corners harder, fair more segments into one continuous sweep, and hold a higher feed—at the cost of chordal deviation from the programmed points. Tighter band: truer to the points, slower through detail. That is the whole trade: tolerance is feed, bought with geometry.

The standard play follows the operation—the Haas P1/P2/P3 levels and CYCLE832's roughing/finishing parameter are exactly this play, pre-packaged:

Operation Typical control tolerance Why
Roughing0.05–0.1 mmStock is coming off anyway—buy maximum feed, geometry is free
Semi-finishing0.02–0.05 mmLeave a consistent skin for the finish pass
Finishing0.005–0.01 mmHold the surface; accept lower feed through detail

The part programmers get wrong is that the control's tolerance stacks on top of CAM's. The CAM system already approximated the true surface with chords at some chord tolerance; the control then deviates from those chords by up to the smoothing tolerance. The classic mismatch is posting 0.001 mm chords and then smoothing at 0.05 mm: you paid for ten times the blocks—the very block flood that chokes the control—to describe detail the smoothing mode is explicitly licensed to plow through. All cost, no accuracy. The sane arrangement is to decide the total band the part can tolerate and split it, with the CAM chord tolerance and the control tolerance in the same neighborhood—e.g. 0.01 mm chords with 0.01 mm smoothing for a finish pass—so every block the control has to digest is detail that actually survives to the surface.

CAM's Half of the Bargain

The control can only fair what it is fed, and CAM output quality varies enormously:

  • Arcs beat point clouds. One G02 block replaces dozens of chords, carries exact geometry, and costs the block processor almost nothing. Where the post can fit arcs (2D profiles, constant-Z passes), let it—a program that is mostly arcs rarely data-starves.
  • Consistent point spacing. Look-ahead planners handle evenly spaced points gracefully; a 2 mm segment followed by a 0.02 mm segment reads as a violent feed disturbance, and clusters of near-zero-length blocks are the single worst thing you can feed a planner.
  • No direction-reversal facets. Tessellation noise—points that zigzag a few microns across the true path—forces the control to treat each wiggle as a real corner. Smoothing tolerance absorbs some of it, but clean CAM tolerancing beats asking the control to launder bad data.

And it is the post-processor that decides whether any of the codes in this article ever reach the machine: whether G05.1 Q1, G187, or CYCLE832 gets emitted at the top of a finishing operation, whether arcs are output or flattened into chords, and how coordinates are rounded. If your surfacing programs never contain a smoothing code, the fix is in the post, not at the control—see CNC Post-Processors.

Diagnosing a Slow Program

Work the checklist in order—each item is cheap to check and each one alone can be the whole problem:

  • Is smoothing actually on? Look for the code (G05.1 Q1, G187, CYCLE832, Cycle 32) in the program, and confirm the option exists on the machine. The most common finding is that it was never emitted, or was cancelled by a reset earlier in the program.
  • Arcs or points? Open the file. Wall-to-wall short G01 moves at 0.02 mm spacing on what should be a simple profile means the post is chording geometry it could output as arcs.
  • Is the machine data-starved at the source? A program drip-fed over a slow serial link can starve the control before the planner ever gets a vote—the transfer becomes the block-rate ceiling. Run from memory or a fast link and compare; see DNC & File Transfer.
  • Are corners the bottleneck? Watch the load and feed display through a detailed region: rhythmic feed collapse at every direction change points at corner decel—the fix is tolerance (open the band) or geometry (fewer, cleaner corners), not a bigger buffer.
  • Or is it acceleration-limited, not data-limited? If the feed also sags on long smooth curves and the machine is simply never reaching F, the axes are running out of accel for the curvature, and no amount of look-ahead or smoothing will change physics. That is a machine-dynamics limit—the honest fixes are a larger tool stepping over less detail, or a machine with more acceleration.

See Also

References

  • Fanuc, Operator’s Manual (AI Contour Control / AI Advanced Preview Control sections), FANUC Corporation.
  • Haas Automation, Mill Operator’s Manual (G187 Accuracy Control), Haas Automation Inc.
  • Siemens, SINUMERIK 840D sl / 828D Milling Programming Manual (CYCLE832 High Speed Settings), Siemens AG.
  • Heidenhain, TNC Cycle Programming User’s Manual (Cycle 32 TOLERANCE), Dr. Johannes Heidenhain GmbH.

Have a question or want to contribute?

Contact us with corrections, additions, or topics you'd like covered.

Get in Touch