Every threading pass has to end somehow, and the two options are a small mechanical drama: ease out of the cut on a gradual angle, unloading the insert over the final pitch, or stop abruptly with the tool still buried at full depth. M23 and M24 are the codes that commonly toggle that choice on Fanuc-family lathes, pullout chamfer on, pullout chamfer off, and like most lathe M-codes in this range, they come with a caveat worth stating before the explanation: assignments vary by builder, and your machine’s manual is the verification step.

What the pullout chamfer physically does

With pullout on, the control blends the end of each threading pass into an angled retreat: over roughly the final pitch or so of travel, X retracts while Z completes, so the thread shallows gradually into a tapered run-out instead of ending at a wall. The insert exits the cut unloading progressively, the thread’s end looks intentional, and the tool sees none of the shock of stopping mid-bite. With pullout off, the pass runs to its endpoint at full depth and lifts out, abrupt by design, because some geometry demands it.

The situationThe settingWhy
Thread runs out at a shaft end or into open spacePullout onGentler exit, cleaner run-out, longer insert life
Thread runs up to a shoulderPullout offAn angled exit would need room the shoulder denies
Shoulder thread, properly designedPullout off, plus an undercut grooveThe groove gives the thread a defined end
Unknown machine, inherited programVerify before trustingThe M-number assignment is builder territory

The shoulder problem, which decides everything

The geometry rule is the whole decision: a chamfered exit consumes axial room, roughly a pitch of thread that fades to nothing, and threading to a shoulder offers no such room, the full thread has to persist as close to the face as the design needs. So shoulder threads run pullout-off, and the abrupt-stop consequences move to the print: the standard solution is an undercut, a relief groove at the thread’s end, grooving-tool territory, that gives both the threading insert and the mating part a defined place to finish. A torn-looking thread end or inserts chipping at end-of-pass on shoulder work is this physics complaining, and the fix is in the design as often as the code.

Two controls of the same behavior

The M-code pair is one of two handles: Fanuc-style cycles also carry the chamfer inside the cycle, the conventional r-style chamfer amount in G76, expressed in multiples of the lead, set in the cycle line or by parameter. Toggle and parameter address the same exit behavior from two directions, and how they interact, which wins, whether the M-codes even exist, is control- and builder-specific in the way this whole M-number neighborhood is. The professional method costs one scrap pass: command the configuration you intend, thread a test diameter, and read the run-out, a gradual taper says pullout is live, a wall says it is not, then document what your machine actually does next to the rest of its dialect.

Dialect breadth, for completeness: the open-source world expresses threading exits through cycle parameters rather than M-codes, LinuxCNC’s G76 includes a taper entry/exit argument, which is the same physics wearing parameter syntax.

Where this sits in the threading skill

Pullout is a finishing touch on the fundamentals: it matters only after the synchronization that makes threading work at all and the locked-RPM discipline are in place, the same mode-arming family that puts M29 ahead of every rigid-tap cycle, and it rewards the same habit as the rest of the lathe’s mode codes, knowing the pair’s existence and question on sight, then verifying the specifics per machine. That sight-recognition layer is what the free 60-second drills on the G-code practice page build across the M-code families: not every builder’s assignments, which no app could honestly promise, but the reflex that sees a threading cycle and asks how its passes end, which is the question this entire page exists to install.

Sources

Frequently asked questions

What do M23 and M24 do on a CNC lathe?

On many Fanuc-family lathes they toggle the threading pullout chamfer: pullout-on gives each pass a gradual angled exit over roughly the final pitch, pullout-off ends passes abruptly for shoulder threads. Assignments are builder-dependent; verify in the machine’s manual.

When should thread pullout be on versus off?

Geometry decides: open run-out favors pullout on, gentler on the insert with a clean tapered run-out. Shoulder threads demand it off, with an undercut groove giving the thread a defined end.

How does the pullout setting interact with the G76 chamfer parameter?

They address the same exit behavior from two directions, and which governs is control-specific. Test with a scrap pass, read the run-out, and document what your machine actually does.

Why does my thread look torn or the insert chip at the end of passes?

An abrupt exit under full load is the classic cause. Enable pullout or the cycle chamfer where geometry allows; where a shoulder forbids it, the print-level fix is the undercut groove.