Printed from Kezuriba (kezuriba.net/en/nc/m05/)
M05
Machining center, LatheSpindle stop
Format and notes
M05
- Put it before a tool change, measurement, or program end
Most M codes are assigned by the machine builder (the Siemens ISO dialect manual leaves M00–M89 to the machine tool maker). The same number can mean different things on different machines, so always check your machine’s manual.
Try it in the simulator (machining center)
Cutting without M03 (spindle forward) gives a warning. Add S3000 M03 to line 2 and run again.
X—
Y—
Z—
T—
S0
F0
—0:00
Simulator with exercises: Machining center page
Frequently asked questions about M05
- What is M05 (Spindle stop) used for and how is it formatted in a CNC program?
- M05 commands "Spindle stop" on Machining center, Lathe. The standard program format is "M05". Put it before a tool change, measurement, or program end
- Is M05 a modal code or a one-shot (non-modal) code?
- Whether M05 acts modally or as a single-block command depends on the CNC control and the machine builder’s PLC ladder implementation. Check your machine’s active modal status screen and programming manual before running in auto mode.
- Does M05 work differently on machining centers (mills) versus CNC lathes?
- M05 is primarily used on Machining center, Lathe. Depending on the machine type and the lathe G-code system (System A, B, or C), this code may be unavailable or assigned to a different function, so verify against your machine tool manual.
- Are there differences in M05 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
- While the core behavior of M05 is shared across most ISO-compatible CNC controls (FANUC, Mitsubishi Electric, Haas), controls using native conversational or proprietary dialects (such as Okuma OSP, Siemens native mode, or Heidenhain) or machine-specific M-code tables may use different syntax. Always verify with single-block execution and distance-to-go display on a new machine.
Sources
The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com
- Haas Automation, Inc. — Mill Operator's Manual – 18 Mill M-Codes (online version) haascnc.com
- Haas Automation, Inc. — Lathe Operator's Manual – 17 Lathe M-Codes (online version) haascnc.com
- National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov
- Ministry of Health, Labour and Welfare (MHLW), Human Resources Development Bureau, Office of the Councillor for Skills Evaluation — Human resource development manual using the practical exam tasks of the Grade 3 Skilled Worker Test: CNC lathe work (March 2018) waza.mhlw.go.jp
- Saitama University, Faculty of Engineering, Department of Mechanical Engineering, practical training — Machining center program 2019 (training NC program O19-0101, with comments) jisshu.mech.saitama-u.ac.jp