Okuma M-codes18 codes

Okuma OSP M-code List

An Okuma OSP control, P200 or P300, follows the Fanuc pattern for stops and ends, spindle, M08 and M09 coolant and M06. Override and subprograms do not: M48, M49, M98 and M99 carry other functions, and a subprogram is called with CALL and ended with RTS. Through-spindle coolant numbers differ from model to model.

Okuma OSP M-code: 18 codes

Codes in colour link to a full page with a worked example and controller differences; the rest link to their row on the M-code list, except codes whose Okuma meaning differs from that list, which have no link.

CodeFunctionNotes
M00Program StopUnconditional program stop. Machine stops and waits for operator to press cycle start. Spindle, coolant, and feed are stopped.Use for mandatory operator intervention: part flip, inspection, manual deburr.
M01Optional StopConditional program stop. Machine stops only if Optional Stop switch is ON. Allows operator to skip stops during production runs.Controlled by Optional Stop switch on control panel. Ignored when switch is off.
M02Program EndEnds the program. Stops spindle, coolant, and feed. Cursor stays at M02 line. Does not rewind program.Use M30 instead for most applications - it rewinds to program start.
M03Spindle On CWStarts the spindle rotating clockwise (when viewed from above on a vertical mill, or from the tailstock on a lathe). Standard direction for right-hand tooling.Always verify S value is set before M03. Allow dwell (G04) after spindle start for heavy cuts.
M04Spindle On CCWStarts the spindle rotating counter-clockwise. Used for left-hand tooling, left-hand tapping, and specific operations.Used with left-hand taps (G74), left-hand helix end mills, and specific boring operations.
M05Spindle StopStops the spindle rotation. Should be called before tool changes and at program end.Spindle continues to coast - may need dwell for complete stop before tool change.
M06Tool ChangeExecutes automatic tool change. Swaps the current tool for the tool specified by the preceding T command. Machine goes through its tool change sequence.CRITICAL: Ensure safe Z position before M06. Many machines auto-retract, but always verify.
M07Mist Coolant OnActivates mist coolant (air/oil mixture). Provides lubrication with minimal coolant volume. Good for aluminum and where flood coolant is undesirable.Not all machines have mist coolant capability. Check machine configuration.
M08Flood Coolant OnActivates flood coolant. Standard coolant delivery for most machining operations. Provides cooling, lubrication, and chip evacuation.Turn on after spindle start, turn off before spindle stop to prevent splashing.
M09Coolant OffTurns off all coolant (both mist and flood). Should be called before tool changes and at program end.Always turn off coolant before spindle stop to prevent coolant spray.
M10Spindle Jog Off (Lathe)
M11Spindle Jog On (Lathe)
M19Spindle OrientationOrients the spindle to a specific angular position and locks it. Required for tool changes with orientation, some boring cycles, and live tooling operations.Required before G76 fine boring, some ATC machines, and B-axis live tooling on lathes.
M30Program End and RewindEnds the program and rewinds to the beginning. Stops spindle, coolant, and feed. Standard program ending code.Preferred over M02 for most applications. Program ready to run again after M30.
M48Spindle Override Ignore Cancel (Lathe)Spindle override, not feedrate override.
M49Spindle Override Ignore (Lathe)Spindle override, not feedrate override.
M98Tailstock Thrust Low (Lathe)An option on the lathe list. An OSP calls a subprogram with CALL, not M98.
M99Tailstock Thrust High (Lathe)An option on the lathe list. An OSP subprogram ends with RTS, not M99.

Where Okuma differs

  • Coolant follows the Fanuc pattern for M08 and M09: the Okuma lathe list gives M08 coolant 1 on and M09 off, and the mill list gives M07 oil mist on, M08 coolant pump on and M09 off. The lathe list leaves M07 unassigned.
  • Through-spindle coolant is a separate, machine-dependent M code. The Okuma lathe list alone gives M174 and M175 for through-spindle coolant on an H1 turret and M1071 and M1072 for high-pressure through-the-tool coolant on a VTR, so take the number from the machine's own list.
  • Work offsets on an OSP mill are selected with G15 and an H number, not G54 to G59, so the offset side of a tool change block looks different even though M06 is the same.
  • The Okuma lathe list gives M10 and M11 as spindle jog off and on, M48 and M49 as spindle override ignore cancel and ignore, and M98 and M99 as tailstock thrust low and high, an option. The table shows those lathe meanings in place of the reference's clamp, feedrate override and subprogram rows.
  • M13, M14, M21 to M23, M29, M32, M33, M36, M37, M41, M42, M50, M51 and M60 are not on the Okuma list in the reference, but the Okuma lathe list uses most of those numbers for other functions: M13 and M14 run the milling spindle, M22 and M23 switch chamfering and M29 turns on the tool interference check. M41 and M42 select spindle gear range 1 and 2, the meaning the reference gives them.

Frequently asked questions

Are Okuma M-codes the same as Fanuc?

For stops, spindle, M08 and M09 coolant and M06, yes. Subprograms are not: an OSP calls one with CALL and ends it with RTS, and on the Okuma lathe list M98 and M99 set tailstock thrust. Beyond the common set the OSP has its own numbering, and the lists differ between machine models, so the machine's own manual is the reference for anything else.

What is the through-spindle coolant code on an Okuma?

It depends on the machine. The Okuma lathe list alone gives M174 and M175 for through-spindle coolant on an H1 turret and M1071 and M1072 for high-pressure through-the-tool coolant on a VTR, so look the number up in the list for the exact model. See M07, M08 and M09: coolant.

Why does an Okuma program not use G54 with M06?

Because an OSP mill selects work offsets with G15 and an H number rather than G54 to G59, so the offset block around a tool change reads differently. M06 itself does the same job. See M06: tool change.

Other controller lists

Last updated 11 Oct 2026