In basic programming we wrote the tool moves one by one with G00, G01, G02 and G03; this is needed to learn the logic. But in real production, writing every roughing pass separately makes the program unnecessarily long: it bloats, the error chance rises, and when the profile changes many lines must be edited. Canned cycles make the control unit perform repeated tool moves with short commands. Common FANUC lathe cycles: G90 (OD/ID turning), G94 (facing), G92 (threading), G71 (longitudinal roughing), G72 (facing-direction roughing), G73 (pattern repeat), G70 (finishing), G74 (Z-direction peck drilling/grooving), G75 (X-direction grooving) and G76 (multi-pass threading).
The aim of this lesson is not just to show the cycle line format; it is to explain which operation the cycle automates, the physical meaning of the parameters, from which point the cycle must be started, how the profile lines are formed, and how a wrong parameter can send the tool down the wrong path.
xF0x9Fx93xB7 IMAGE AREA — Canned-cycle concept: automating repeated roughing passes with one command
Suggested alt text: “CNC lathe canned cycle roughing pass automation”
1. What Is a Canned Cycle? Advantages
A canned cycle is a program structure, predefined in the control, for the moves that repeat continuously in an operation. The programmer gives the cycle the start point, target diameter/length, pass amount, retract, finishing allowance, feed and the profile start/end lines; the control computes the needed moves. For example in G71 each roughing diameter is not written one by one; the radial stock per pass, the retract, the finished profile and the finishing allowance are defined, and the CNC creates the rest. But the cycle does not understand the part geometry by itself: the profile coordinates, P–Q lines, start point and pass/allowance must be given correctly.
Advantages: repeated lines drop, the program becomes readable, the pass amount is changed easily, the profile is defined in one place, the finishing cycle reuses the same profile, editing time and typing errors drop, and the control computes the roughing distribution. But cycles do not help someone who does not know the basic motion commands: someone who does not understand the moves inside the cycle cannot notice a wrong start point or wrong profile direction. So the roughing-pass logic with G00–G01 must be understood before G71.
2. FANUC G-Code System and Cycle Groups
On FANUC lathe controls the G-code system can be configured as A, B or C; this changes the number or meaning of some G codes. In G-code system A, G90 is the OD/ID turning cycle, G92 the thread cycle and G94 the facing cycle. Also, the “G90 = absolute, G91 = incremental” idea from milling does not hold on a FANUC lathe using G-code system A; here absolute values are given with X–Z and incremental with U–W, while G90 is a turning cycle. On the real machine, the control model, active G-code system and cycle format must be verified from the machine manual.
Cycles are thought of in two groups: simple cycles (G90, G92, G94) — one line performs a few basic moves automatically; multiple-repetitive cycles (G70, G71, G72, G73, G74, G75, G76) — use more parameters, and especially G71/G72/G73 read the profile between P–Q, create many passes and leave a finishing allowance.
xF0x9Fx93xB7 IMAGE AREA — Simple cycles: G90 OD and G94 facing move sequence
Suggested alt text: “CNC lathe G90 and G94 cycle moves”
3. G90 — OD/ID Turning Cycle
G90 is a modal cycle that does simple turning along an OD/ID in one line. Straight: G90 X... Z... F...;; taper: G90 X... Z... R... F...; (X target diameter, Z target length, R taper difference, F feed). In sequence: rapid to the target diameter, cut in Z, retract in X, rapid back to the start point. Being modal, only the new X is written on the next lines.
(Raw Ø60 → Ø40.4, length Z-50) G00 X62.0 Z2.0 ; G90 X56.0 Z-50.0 F0.28 ; (pass 1) X52.0 ; (Z and F modal) X48.0 ; X44.0 ; X40.4 ; (final rough diameter)
The start point must be outside the raw diameter and in front of the face; for raw Ø60, X62 Z2 is suitable, while X50 Z2 is inside the raw stock and crashes. In ID work the tool starts inside the hole and the hole grows as it advances to larger X values (e.g. G00 X28 Z2; G90 X34 Z-40 F0.18; X38; X39.6;). In a taper, R is the X taper difference between start and end; a wrong R sign can form the taper the other way and drive the tool into the part, so verify with simulation/air cutting.
4. G94 — Facing Cycle
G94 removes material in the facing direction. Straight: G94 X... Z... F...;; taper: G94 X... Z... K... F...; (X target diameter, Z the face’s Z position, K taper, F feed). The cycle: rapid to target Z, face-cut toward X, cut out in Z to the start length, rapid back to the start diameter in X. Used for multiple facing passes when there is excess material on the front face.
(Raw front face Z5 → finished Z0) G00 X62.0 Z7.0 ; G94 X0 Z4.0 F0.20 ; (facing pass 1) Z3.0 ; (X and F modal) Z2.0 ; Z1.0 ; Z0 ;
When? G90 for straight OD/ID, simple steps/tapers and few passes; G94 for excess stock on the face, wide flange surfaces and front-face roughing. For complex profiles with many diameters, radii, chamfers, tapers and different shoulders, G71 or G72 is more suitable.
xF0x9Fx93xB7 IMAGE AREA — G71 longitudinal roughing: profile and automatic roughing passes
Suggested alt text: “CNC lathe G71 roughing cycle profile passes”
5. G71 — Longitudinal Roughing Cycle
G71 is one of the most used cycles: it reads the part’s finished profile and, cutting along Z with the set pass amounts in X, removes the roughing stock automatically. Common two-line format:
G71 U(d) R(e) ; G71 P(ns) Q(nf) U(Δu) W(Δw) F(f) ;
| Parameter | Meaning |
|---|---|
| U(d) (line 1) | Radial stock removed per roughing pass in X |
| R(e) (line 1) | Retract amount at the end of each pass |
| P(ns) | N line where the profile starts |
| Q(nf) | N line where the profile ends |
| U(Δu) | Finishing allowance in X |
| W(Δw) | Finishing allowance in Z |
| F(f) | Roughing feed |
Note: the U2.0 on line 1 is, in many FANUC formats, a radial pass even with diameter programming; that is, it can correspond to a 4 mm change on diameter and must not be confused with direct X/U coordinate moves. R0.5 is a 0.5 mm retract at each pass end. P100 Q180 are the profile’s N100–N180 lines. U0.4 is the X finishing allowance (verify diameter/radial interpretation), W0.2 the Z finishing allowance, F0.28 the roughing feed. Important: the first block of the profile (the P line) must contain G00 or G01, otherwise an alarm can occur.
6. Full G71 Program Example and G70 Finishing
G71 does not machine the profile in one pass; it removes the stock outside the profile in layers per the U pass and leaves an X/Z finishing allowance. G70 re-runs the same P–Q profile for finishing (G70 P... Q...;) — it does not write a new profile, which is the biggest advantage of these cycles. A tidy roughing+finishing program:
% O2003 G21 G40 G99 ; G50 S2500 ; T0101 ; (roughing tool) G96 S180 M03 ; M08 ; G00 X62.0 Z2.0 ; G71 U2.0 R0.5 ; G71 P100 Q180 U0.4 W0.2 F0.28 ; N100 G00 X30.0 ; N110 G01 Z0 F0.12 ; N120 X36.0 Z-3.0 ; (chamfer) N130 Z-20.0 ; N140 X44.0 ; N150 Z-45.0 ; N160 X50.0 Z-55.0 ; (taper) N170 Z-70.0 ; N180 X56.0 ; G00 X100.0 Z100.0 ; M09 ; M05 ; T0202 ; (finishing tool) G96 S220 M03 ; M08 ; G00 X62.0 Z2.0 ; G70 P100 Q180 ; (same profile finish) G00 X100.0 Z100.0 ; M09 ; M05 ; M30 ; %
The profile lines sit in the program flow, right after the G71 call; the cycle uses the P–Q section as the profile and, once done, moves to the line after Q. No tool change, spindle stop, other cycle or subprogram call is placed between P and Q.
7. G71 Profile Direction, Type I / Type II and Finishing Allowance
In standard OD G71 the profile is usually defined from small to large diameter, from the front of the part toward the chuck (X growing/constant, Z negative). Type I is for simple, one-way profiles (X values generally increase). Type II can machine recessed or direction-changing profiles (growing then shrinking). If there is a concave profile or a groove-like recess, the control’s Type II support must be verified; do not assume G71 machines every profile automatically.
Finishing allowance: coming straight to the finished size at the end of roughing is often wrong; a small allowance is left in X and Z (e.g. U0.4 W0.2). If the allowance is too large, the finishing tool is overloaded and the size deviates; too small, the roughing marks are not cleaned and the tool rubs in places. In ID G71 the sign of the finishing allowance can differ from OD (e.g. U-0.3), because roughing leaves the allowance on the side toward the hole centre; the start X, retract direction and U sign are checked carefully.
8. G72 and G73 — Facing Roughing and Pattern Repeat
G72 is like G71 but distributes the passes in Z and cuts in X (along the face); it suits wide face surfaces, flanges and disc-type parts. Format: G72 W(d) R(e); then G72 P Q U W F;. In short: G71 is longitudinal roughing, G72 facing-direction roughing; both can be finished afterward with G70.
G73 is the pattern-repeat cycle for when the raw part is already close to the finished profile (forging, casting, pre-formed). G71 removes stock in parallel layers; G73 repeats the defined profile several times with set X–Z offsets, reducing air cutting and removing the casting/forging skin evenly. Format: G73 U(i) W(k) R(d); then G73 P Q U W F; (first U/W the total profile difference, R the number of repeats). The exact meaning of the parameters is verified from the control model.
9. G74 and G75 — Peck Drilling and Grooving Cycles
G74 is used for Z-axis peck drilling or face grooving. If the drill advances continuously in a deep hole, chips jam, coolant cannot reach the bottom, and the drill overheats and can break. In peck drilling the drill advances a set depth, retracts a short amount (breaking/clearing the chip) and advances again. Note: the drill must be on centre and in G97 constant speed, the peck amount suited to drill diameter/material, and coolant reaching the bottom verified. G75 makes a stepped groove in X on an OD/ID; in a narrow groove it only plunges in X, in a wide groove it forms the full width with X plunge + Z shift (tool width and Z shift must be computed correctly). Important: in G74/G75/G76 the decimal point is not supported in some P and Q addresses; e.g. Q2000 can be 2.000 mm in the smallest input unit, while Q2.0 may not be accepted — the unit and decimal use must always be verified.
xF0x9Fx93xB7 IMAGE AREA — Thread cycle: G76 multi-pass threading and pass distribution
Suggested alt text: “CNC lathe G76 thread cycle pass distribution”
10. The Basics of Threading and G32
When threading, the spindle and Z axis run synchronously: for each part revolution the tool advances by the thread pitch (for M30×2, F2.0 = 2 mm per revolution). During threading the feed override cannot be changed like normal turning, and each pass must enter the same thread groove. Why G97? The speed must stay constant during threading; with G96 the control tries to change speed as the diameter deepens and the sync breaks. So G97 S... is used (a low, controlled speed at the start).
G32 is a single-pass synchronous thread command (G32 Z... F...;). To complete a pass, the programmer writes the approach, cut, exit, return to the start Z and the plunge to the next pass diameter separately:
(M30x2 OD thread — multi-pass with G32) G97 S500 M03 ; G00 X31.0 Z3.0 ; G00 X29.6 ; G32 Z-40.0 F2.0 ; G00 X31.0 ; G00 Z3.0 ; G00 X29.2 ; G32 Z-40.0 F2.0 ; G00 X31.0 ; G00 Z3.0 ; G00 X28.9 ; G32 Z-40.0 F2.0 ; G00 X31.0 ; G00 Z3.0 ;
Due to servo delays, a pitch error can form at the thread start/end regions; so the programmed thread path is kept longer than the real thread length (e.g. real thread Z0–Z-30, program Z3 to Z-33). If there is no run-out because of a shoulder, a thread-relief groove is needed. With G32 the Q address shifts the thread start angle to make multi-start threads (e.g. Q0 and Q180000 for a double start; the unit is 0.001°).
11. G92 — Simple Thread Cycle
G92 does, in one line, the thread pass written with four moves in G32: rapid to the X pass diameter, sync-cut to Z at the thread pitch, exit the part, return to the start point. Straight: G92 X... Z... F...;; taper: G92 X... Z... R... F...;. Being modal, only the new X pass diameter is written on the next lines:
G97 S500 M03 ; G00 X31.0 Z3.0 ; G92 X29.6 Z-40.0 F2.0 ; (pass 1, Z and F modal) X29.2 ; X28.9 ; X28.7 ; X28.6 ; X28.6 ; (spring/finish pass)
The thread depth is not given in one pass; passes are large at first and gradually smaller, because the cutting edge’s contact area grows as the thread deepens. With equal diameter differences the tool load rises excessively on the last passes; the last one or two passes are repeated at the same diameter for spring-back compensation. In a taper thread, R defines the taper difference. On some systems G92 can create an automatic exit chamfer at the thread end (parameter-dependent); if threading to a shoulder, this feature must be checked.
12. G76 — Multi-Pass Thread Cycle
G76 is an advanced cycle that automatically manages the number of passes, the pass depths, the minimum pass, the finishing passes, the thread angle and the thread height. Common two-line format:
G76 P(m)(r)(a) Q(Δdmin) R(d) ; G76 X(U) Z(W) R(i) P(k) Q(Δd) F(L) ; (Example: M30x2 OD thread, ~35 mm) T0404 ; G97 S500 M03 ; M08 ; G00 X31.0 Z3.0 ; G76 P020060 Q100 R0.05 ; G76 X28.55 Z-35.0 R0 P1227 Q300 F2.0 ; G00 X100.0 Z100.0 ; M09 ; M05 ;
Line 1: P020060 is three pieces: 02 the number of finishing/spring passes, 00 the thread exit chamfer, 60 the thread angle (60° metric). Q100 the minimum pass depth (usually no decimal; can be 0.100 mm), R0.05 the radial allowance left for finishing. Line 2: X the root diameter (for M30×2, e.g. Ø28.55 — the real value comes from the thread standard/tolerance), Z the thread end, R the taper (R0 = straight thread), P the thread height (radial, no decimal; e.g. 1.227 mm), Q the first pass depth (e.g. 0.300 mm), F the thread pitch. G76 does not split the thread depth equally: the first pass is large, the rest shrink, balancing the chip section per pass and giving a more balanced cut than G92.
13. G32 vs. G92 vs. G76
| Cycle | Advantage | Disadvantage |
|---|---|---|
| G32 | Every move is visible; flexible for special/variable threads; teaches thread logic well | Long code per pass; programmer does the pass distribution; error-prone |
| G92 | Simple and short; pass diameters visible; suits small thread jobs | Pass diameters set by hand; long for many passes; pass load balanced by the programmer |
| G76 | Computes pass distribution automatically; manages finishing passes; short for many passes; efficient in series | Complex parameter structure; wrong P/Q is a serious error; format varies by control version |
Pitch vs. feed: on a single-start thread, pitch = feed. On a multi-start thread, feed = pitch × number of starts (e.g. 2 mm pitch, 2 starts → F4.0). If only the tooth pitch is read from the drawing and the number of starts is ignored, the wrong thread is made. The thread tool must be mounted at the right angle (60° metric), at centre height and perpendicular to the axis; a slightly angled mounting makes the thread flanks uneven. Thread measurement is done not only with a caliper but with a thread micrometer, ring/plug gauge or the three-wire method over the effective diameter (even if the root looks right, the effective-diameter tolerance can differ).
xF0x9Fx93xB7 IMAGE AREA — Full part: operation sequence (face→drill→G71→G70→groove→G76→part)
Suggested alt text: “CNC lathe full part operation sequence and cycles”
14. Cycle Safety: Stopping, MDI and Common Mistakes
During a multiple-repetitive cycle the program can be stopped for a manual operation; but before restarting, the tool must be returned to the point where the cycle stopped, otherwise the manual move is added to the cycle path and the tool path shifts. If the tool was moved by hand mid-cycle, continuing straight with cycle start may not be safe; if needed, cancel the cycle, move the tool to a safe point and restart from a suitable line in single block. Some multiple-repetitive cycles like G70/G71/G72/G73 may not be usable in MDI mode (since they need P–Q profile lines); these are run inside a saved program.
Common mistakes: writing P/Q lines wrong; not putting G00/G01 at the profile start; mistaking the first G71 U value for diameter (it can be radial, a 2× difference); not checking the diameter/radial interpretation of the X finishing allowance; choosing the start point inside the raw stock; writing the profile direction reversed; giving a recessed profile to G71 without a Type II check; a wrong decimal in G74–G76 P/Q (a 1000× error); using G96 during threading; entering a normal feed instead of the thread pitch (F0.20 → a wrong 0.2 mm pitch instead of 2 mm); giving the G92/G76 target diameter without checking the standard.
15. Full Part: Operation Plan and Program
Raw Ø60 steel bar; Ø36/Ø44 steps, Ø44→Ø50 taper, rear Ø50; front chamfer 3×45°; M36×2 thread on the Ø36 section; a groove at the thread end; a Ø16 centre hole; to be parted from the bar. Operation order: face → centre drill → Ø16 drill → G71 roughing → G70 finishing → groove → G76 thread → parting.
% O3001 (FULL PART TRAINING PROGRAM) G21 G40 G99 ; G50 S2500 ; (T01 OD ROUGHING) T0101 ; G96 S180 M03 ; M08 ; G00 X62.0 Z2.0 ; G71 U2.0 R0.5 ; G71 P100 Q180 U0.4 W0.2 F0.28 ; N100 G00 X30.0 ; N110 G01 Z0 F0.12 ; N120 X36.0 Z-3.0 ; N130 Z-20.0 ; N140 X44.0 ; N150 Z-45.0 ; N160 X50.0 Z-55.0 ; N170 Z-70.0 ; N180 X56.0 ; G00 X100.0 Z100.0 ; M09 ; M05 ; (T02 FINISH) T0202 ; G96 S220 M03 ; M08 ; G00 X62.0 Z2.0 ; G70 P100 Q180 ; G00 X100.0 Z100.0 ; M09 ; M05 ; (T03 GROOVE) T0303 ; G97 S700 M03 ; M08 ; G00 X38.0 Z-20.0 ; G01 X32.0 F0.08 ; G00 X38.0 ; G00 X100.0 Z100.0 ; M09 ; M05 ; (T04 THREAD) T0404 ; G97 S450 M03 ; M08 ; G00 X37.0 Z3.0 ; G76 P020060 Q100 R0.05 ; G76 X33.55 Z-18.0 R0 P1227 Q300 F2.0 ; G00 X100.0 Z100.0 ; M09 ; M05 ; M30 ; %
Each operation uses different cutting conditions: roughing G96 S180 / F0.28, finishing G96 S220 / F0.12, grooving G97 S700 / F0.08, thread G97 S450 / F2.0. Even if the program is short, each operation’s tool, speed mode, feed and pass are planned separately. The thread diameters are only to show the cycle structure; for M36×2 the real major/root diameters come from the thread standard.
16. Choosing a Cycle, Simulation and Safe First Run
| Job | Suitable Cycle |
|---|---|
| Straight longitudinal diameter | G90 |
| Repeated facing passes | G94 |
| Complex longitudinal roughing | G71 |
| Wide face-profile roughing | G72 |
| Near-profile casting/forging | G73 |
| Deep hole (Z peck) | G74 |
| X-direction grooving | G75 |
| Simple multi-pass thread | G92 |
| Thread with auto pass distribution | G76 |
| Finishing after G71/G72/G73 | G70 |
A cycle is not required for every operation: to machine a single Ø40 diameter over 10 mm, G01 X40.0; Z-10.0; is enough. Cycles help with repeated passes, complex profiles, multi-pass threads, deep holes and wide grooves. It matters that the program is the safest and clearest, not the shortest. Before running on a real part, cycles should be watched in simulation (where does the first pass start, is the retract direction right, is the whole profile machined, is the finishing allowance on the right side, are the thread passes at the right diameter); but simulation may not fully show the real holder/chuck/tailstock. First run: correct program + G-code system, tool/offset and P–Q coordinate checks, low rapid override, single block, measurement after the first roughing pass, verification of the rough size before G70 finishing, and checking the first thread pass at a low depth.
17. Reading the Program Instead of Memorising It
A cycle line should be read not as a heap of letters and numbers but as a production sentence. For example G71 U2.0 R0.5; G71 P100 Q180 U0.4 W0.2 F0.28; reads: “Take the profile between N100–N180 as the basis; remove 2 mm radial stock each roughing pass; retract 0.5 mm at the pass end; leave 0.4 mm in X and 0.2 mm in Z as finishing allowance; feed 0.28 mm/rev in roughing.” Likewise G76 P020060 Q100 R0.05; G76 X28.55 Z-35.0 R0 P1227 Q300 F2.0;: “Machine the 60° thread with two finishing passes; minimum pass 0.1 mm, finishing allowance 0.05 mm; root diameter Ø28.55, thread end Z-35, height 1.227 mm, first pass 0.3 mm, pitch 2 mm.” Someone who can read this way grasps the production logic instead of memorising cycles. Although the aim of cycles is similar across controls, the number of lines, address meanings, P/Q units, whether the pass is diameter/radius and the profile-type support can vary; the programming manual of the control in use is checked before real production.
Lesson Summary
- Canned cycles shorten repeated moves; they split into simple (G90/G92/G94) and multiple-repetitive (G70/G71/G72/G73/G74/G75/G76).
- G71 reads the profile (P–Q), creates roughing passes automatically and leaves an X/Z finishing allowance; G70 reuses the same profile for finishing. The first G71 U value is a radial pass.
- G72 is facing-direction roughing, G73 pattern repeat for near-profile stock; G74 peck drilling, G75 X grooving.
- In threading, spindle–Z are synced; G97 is used. G32 (single pass), G92 (simple cycle), G76 (auto pass distribution). On multi-start threads, feed = pitch × starts.
- The program is read, not memorised; the cycle format and units are verified from the machine manual and the first run is done under control.
Assessment Test
- Which cycle reads the profile and creates roughing passes automatically in longitudinal roughing? A) G94 B) G71 C) G76 D) G04
- What does the U value on the first line of G71 usually indicate? A) Diameter finishing allowance B) Radial roughing pass amount C) Thread pitch D) Retract angle
- (True/False) G70 reuses the P–Q profile from G71 for finishing; no new profile is needed.
- Which mode is used when threading? A) G96 constant cutting speed B) G97 constant speed C) G94 D) G73
- Which cycle computes the pass distribution automatically in multi-pass threading? A) G32 B) G92 C) G76 D) G90
- On a double-start thread of 2 mm pitch, what should the F value be? A) 1 B) 2 C) 4 D) 0.2
- (True/False) The first block of a G71 profile (the P line) must contain a G00 or G01 group command.
Show Answer Key
1) B – G71 is the longitudinal roughing cycle. 2) B – The first U is the radial roughing pass amount. 3) True – G70 uses the same P–Q profile. 4) B – G97 constant speed is used for threading. 5) C – G76 does the pass distribution automatically. 6) C – Feed = 2 mm × 2 starts = 4. 7) True – The P line needs G00/G01.
Open-Ended Questions
- Explain the logic of using G71 and G70 together.
- Explain the difference between G71 and G72 and which parts they suit.
- Compare the G32, G92 and G76 threading methods.
- Read a G71 line (with its parameters) as a sentence.
- Why is G97 used when threading?
What This Series Has Reached
Across these seven lessons, CNC lathe training was built in this order: machine structure and safety → axes and coordinates → cutting tools → cutting values → workholding and offsets → basic FANUC programming → canned cycles and full-part programming. A student who reaches this point can break the drawing profile into X–Z points, sequence the operations, choose suitable tool groups, understand the cutting speed–spindle speed–feed–pass relationship, distinguish the workpiece zero from the tool offset, read G00–G03 moves, build the G71–G70 roughing/finishing logic, and tell the G32/G92/G76 threading methods apart.
But completing the theory does not mean independent production can be done straight away on a real machine. On the real machine, the control panel, referencing, tool measurement, workpiece zeroing, chuck/tailstock use, program transfer, alarm handling and first-part setup must be practised under the supervision of an authorised trainer or experienced operator. With Mentor CNC, the journey of carrying theory to the shop floor continues.
Note: these seven lessons form the core CNC lathe curriculum. Operational topics such as program management, simulation, alarm handling and data transfer continue in Lesson 8.