Master CNC
Blog · 5 min read · 13 Oct 2026

Fanuc vs Okuma OSP: the codes that are different

Moving a program from a Fanuc control to an Okuma OSP control (or back) is mostly the same G-code language, but some codes change and a few numbers mean something completely different. Here are the ones that catch people.

Turning centre (lathe)

JobFanucOkuma OSPWatch out
Tool callT0101T010101OSP: nose-R compensation no. · tool no. · offset no.
Feed per rev / per minG99 / G98G95 / G94G95 is the OSP power-on default.
DwellG04 X1. or G04 P1000G04 F1.OSP F = seconds.
Spindle speed limitG50 S2500G50 S2500Same.
Arc by radiusG02 X Z RG02 X Z LOSP uses L for the radius.
Chamfer / corner R in a move,C / ,RG75 / G76 with LOn Fanuc, G75 is the grooving cycle.
Rough turningG71 (two blocks, P Q)G85 NAT1 (LAP)On OSP, G71 is the thread cycle.
FinishingG70 P QG87 NAT1OSP contour sits between NAT1 G81 and G80.
Pattern repeat (castings)G73G86On OSP, G73 is the grooving cycle.
Multi-pass threadG76 (two blocks, µm, radius)G71 (one block, mm, diameter)See the G71 thread post.
Thread cycle, pass by passG92G33OSP: next passes are X-only blocks.
Grooving cycleG75 (P Q in µm)G73 (I K D)OSP D is a diameter.
Peck drill / face grooveG74G74Same number, different words: OSP needs X and Z.
Tapping on the centre lineG84 (if the option is fitted)G77OSP G77: K = Z where feed starts; the spindle stops after.
Live tool on / stopset by the machine builderM13 / M14, stop M12Live tool speed on OSP: SB=.

Machining centre (mill)

JobFanucOkuma OSPWatch out
Tool length offsetG43 H1G56 H1OSP H00 = no offset.
Return after a holeG98 / G99M53 / M54 / M52M53 = level set by G71 Z, M54 = R level, M52 = Z upper limit.
Bolt hole circlepolar coordinates G16 or a macroBHC patternOSP also has LAA, ARC, GRDX patterns.
Tool changeT1 M06T1 M06Same idea: T prepares, M06 changes.

Three rules that save a crash

  1. Never trust a code number across controls. G71, G73, G74 and G75 all mean different things on Fanuc and OSP.
  2. Check diameter or radius. OSP cycles use diameters for D, U and H; Fanuc G76 uses radius values in microns.
  3. M codes belong to the machine builder. Coolant, live tool, chuck and C axis codes vary even between machines with the same control.

The Master CNC app has the full code lists with examples for each control, and a program converter that rewrites Fanuc to OSP (and back) and marks every line you should check.

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