Master CNC
Blog · 6 min read · 13 Oct 2026

Okuma OSP G71 thread cycle, explained with an M30 × 2 example

On an Okuma OSP lathe, one G71 block cuts a whole thread: the control plans every pass and the finish pass for you. If you come from Fanuc, the trap is that Fanuc G71 is a roughing cycle. Here is the OSP version, step by step.

The block

G71 X__ Z__ B__ D__ U__ H__ F__ M32 M74
WordMeaning
XRoot diameter, where the last pass ends
ZThread end
BTool (thread) angle, 60 for a metric thread
DFirst depth of cut, as a diameter
UFinish allowance, as a diameter
HThread height, as a diameter
FLead (pitch for a single-start thread)
M32 / M33 / M34Infeed: along the left flank / zigzag / along the right flank. With none of them, M32 is used.
M73 / M74 / M75Depth pattern 1 / 2 / 3: how the depth of each pass is planned

Other words exist for taper threads (I or A), run-out (L), multi-start threads (Q) and more. Your OSP programming manual has the full list.

Example: M30 × 2 outside thread, 30 mm long

1. Work out H and X

A common shop value for the depth of an outside metric thread is 0.6134 × pitch:

height  = 0.6134 × 2   = 1.227 mm  (per side)
H       = 1.227 × 2    = 2.454     (OSP wants a diameter)
root  X = 30 − 2.454   = 27.546

2. The program

(M30 X 2 THREAD)
G97 S800 M03
G00 X34. Z5. M23
G71 X27.546 Z-30. B60 D0.7 U0.1 H2.454 F2. M32 M74
G00 X60. M22
  • G97 S800: constant spindle speed. Thread cycles are not used in G96.
  • G00 X34. Z5.: start above the 30 mm diameter and 5 mm in front of the part, so the axis is up to speed before the thread starts.
  • M23 / M22: switch the thread chamfer (the run-out at the end of the thread) on and off. Check which one your machine uses as its default.
  • D0.7: the first pass goes 0.7 on the diameter, which is 0.35 mm a side.
  • U0.1: 0.1 on the diameter is left for the finish pass.

3. What the control does

Thread profile showing the OSP G71 passes at 0.35, 0.70 and 1.05 mm, the last rough pass at 1.177 mm and the root at 1.227 mm
M74 pattern: D on every pass until H − U, then the U finish pass. Values per side.

With M74, each rough pass goes D deeper, down to H − U. Then the finish pass takes the last U. With M32, the tool goes in along the left flank of the thread, which keeps the cutting load on one edge of the insert.

Same thread on Fanuc (G76)

Fanuc does the same job with a two-block G76. Its values are radius values in microns, while OSP uses diameters in millimetres:

G76 P020060 Q50 R0.05
G76 X27.546 Z-30. P1227 Q350 F2.
Fanuc G76 passes for the same M30 x 2 thread
Fanuc G76 for the same thread: each cut = Q × √n, radius values.
Fanuc G76Okuma OSP G71
Thread heightP1227 (µm, radius)H2.454 (mm, diameter)
First cutQ350 (µm, radius)D0.7 (mm, diameter)
Finish allowanceR0.05 in block 1 (radius)U0.1 (diameter)
Thread anglelast two digits of P020060B60

Check before you cut. Thread height depends on the thread standard and your insert. Prove the program with a dry run, and take a first part with the override low.

Try it in Master CNC

Calculators, process sheet to program, simulation, codes and lessons. Free to start, no sign-in, on phone and laptop.

Open the app