M-code reference

M19: Spindle orientation

M19 is spindle orientation. Stops the spindle at a fixed angle. It is non-modal, so it acts only on the line it is written on.

What M19 does

M19 turns the spindle to a fixed orientation and holds it, for tool changes, fine boring shifts and probe alignment.

TypeM-code
MachineMill and lathe
GroupSpindle
ModalNo: acts only on its own line

M19 example

M19

Orient the spindle.

WordWhat it means here
M19Spindle orientation

Codes people confuse with M19

CodeWhat it does instead
M05 Spindle stop. Stops the spindle.

Other codes in the spindle group

These also act only on their own line.

  • M03 Spindle on, clockwise
  • M04 Spindle on, counterclockwise
  • M05 Spindle stop
  • M29 Rigid tapping mode (Fanuc)

Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.

Quick check: M19

  1. What does M19 do? (Mill and lathe)

  2. Which code: Stops the spindle at a fixed angle.(Mill and lathe)

  3. What does M05 do? (Mill and lathe)

Show the answers
  1. Stops the spindle at a fixed angle.
  2. M19
  3. Stops the spindle.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does M19 mean in CNC programming?
Spindle orientation. Stops the spindle at a fixed angle.
Is M19 modal?
No. M19 acts only on the line where it is written; the next line goes back to whatever modal codes were already active.
What is the difference between M19 and M05?
M19 (spindle orientation): stops the spindle at a fixed angle. M05 (spindle stop): stops the spindle.

G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.

Free preview · no card Try G-Code Sprint