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)
| Job | Fanuc | Okuma OSP | Watch out |
|---|---|---|---|
| Tool call | T0101 | T010101 | OSP: nose-R compensation no. · tool no. · offset no. |
| Feed per rev / per min | G99 / G98 | G95 / G94 | G95 is the OSP power-on default. |
| Dwell | G04 X1. or G04 P1000 | G04 F1. | OSP F = seconds. |
| Spindle speed limit | G50 S2500 | G50 S2500 | Same. |
| Arc by radius | G02 X Z R | G02 X Z L | OSP uses L for the radius. |
| Chamfer / corner R in a move | ,C / ,R | G75 / G76 with L | On Fanuc, G75 is the grooving cycle. |
| Rough turning | G71 (two blocks, P Q) | G85 NAT1 (LAP) | On OSP, G71 is the thread cycle. |
| Finishing | G70 P Q | G87 NAT1 | OSP contour sits between NAT1 G81 and G80. |
| Pattern repeat (castings) | G73 | G86 | On OSP, G73 is the grooving cycle. |
| Multi-pass thread | G76 (two blocks, µm, radius) | G71 (one block, mm, diameter) | See the G71 thread post. |
| Thread cycle, pass by pass | G92 | G33 | OSP: next passes are X-only blocks. |
| Grooving cycle | G75 (P Q in µm) | G73 (I K D) | OSP D is a diameter. |
| Peck drill / face groove | G74 | G74 | Same number, different words: OSP needs X and Z. |
| Tapping on the centre line | G84 (if the option is fitted) | G77 | OSP G77: K = Z where feed starts; the spindle stops after. |
| Live tool on / stop | set by the machine builder | M13 / M14, stop M12 | Live tool speed on OSP: SB=. |
Machining centre (mill)
| Job | Fanuc | Okuma OSP | Watch out |
|---|---|---|---|
| Tool length offset | G43 H1 | G56 H1 | OSP H00 = no offset. |
| Return after a hole | G98 / G99 | M53 / M54 / M52 | M53 = level set by G71 Z, M54 = R level, M52 = Z upper limit. |
| Bolt hole circle | polar coordinates G16 or a macro | BHC pattern | OSP also has LAA, ARC, GRDX patterns. |
| Tool change | T1 M06 | T1 M06 | Same idea: T prepares, M06 changes. |
Three rules that save a crash
- Never trust a code number across controls. G71, G73, G74 and G75 all mean different things on Fanuc and OSP.
- Check diameter or radius. OSP cycles use diameters for D, U and H; Fanuc G76 uses radius values in microns.
- 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.
Calculators, process sheet to program, simulation, codes and lessons. Free to start, no sign-in, on phone and laptop.
Open the app

