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.
| Code | Function |
|---|---|
| M00 | Program StopUnconditional program stop. Machine stops and waits for operator to press cycle start. Spindle, coolant, and feed are stopped. |
| M01 | Optional StopConditional program stop. Machine stops only if Optional Stop switch is ON. Allows operator to skip stops during production runs. |
| M02 | Program EndEnds the program. Stops spindle, coolant, and feed. Cursor stays at M02 line. Does not rewind program. |
| M03 | Spindle 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. |
| M04 | Spindle On CCWStarts the spindle rotating counter-clockwise. Used for left-hand tooling, left-hand tapping, and specific operations. |
| M05 | Spindle StopStops the spindle rotation. Should be called before tool changes and at program end. |
| M06 | Tool ChangeExecutes automatic tool change. Swaps the current tool for the tool specified by the preceding T command. Machine goes through its tool change sequence. |
| M07 | Mist Coolant OnActivates mist coolant (air/oil mixture). Provides lubrication with minimal coolant volume. Good for aluminum and where flood coolant is undesirable. |
| M08 | Flood Coolant OnActivates flood coolant. Standard coolant delivery for most machining operations. Provides cooling, lubrication, and chip evacuation. |
| M09 | Coolant OffTurns off all coolant (both mist and flood). Should be called before tool changes and at program end. |
| M10 | Spindle Jog Off (Lathe) |
| M11 | Spindle Jog On (Lathe) |
| M19 | Spindle OrientationOrients the spindle to a specific angular position and locks it. Required for tool changes with orientation, some boring cycles, and live tooling operations. |
| M30 | Program End and RewindEnds the program and rewinds to the beginning. Stops spindle, coolant, and feed. Standard program ending code. |
| M48 | Spindle Override Ignore Cancel (Lathe)Spindle override, not feedrate override. |
| M49 | Spindle Override Ignore (Lathe)Spindle override, not feedrate override. |
| M98 | Tailstock Thrust Low (Lathe)An option on the lathe list. An OSP calls a subprogram with CALL, not M98. |
| M99 | Tailstock 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