Printed from Kezuriba (kezuriba.net/en/nc/m41-m44/)
M41–M44
Machining center, LatheSwitching the spindle gear (speed range)
Format and notes
M41–M44 (how many ranges there are and which is the low-speed one depends on the machine)
- Switches the spindle's speed-change gear. The low-speed gear gives large torque at low speeds (thick stock, heavy cutting, large threads). The high-speed gear is for high speeds. The MHLW NC lathe training material describes M41–M44 as “setting the gear range (speed range)”
- Many NCs select the gear automatically from the S value, so you usually don't need to write it. M41 and the like are used when you want to fix the gear (Haas, Mitsubishi Electric, Beckhoff)
- Write the gear command together with S before starting the spindle (in the Haas example, M03 comes on the line after S and M41; in the lathe training material example, M41 is written on the tool call line, followed by G97 S_ M03)
- The speed range of each gear is set by machine parameters, and an S outside the range causes an error or an automatic gear change
- Common mistakes: running M43 and M44 from another maker's program as they are (on Haas lathes they unclamp and clamp the turret). Misreading the meaning of M40 (automatic selection on Siemens, gear range 1 on Beckhoff)
Example
T0101 M41 ; (low-speed gear. On the same line as the tool call) G97 S300 M03 ; (set the gear before starting the spindle)
An example written by Kezuriba following the style of the MHLW NC lathe training material.
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.
Diagram: M41–M44: speed range of each gear (schematic)
Differences between controls and machines
The same code can be written or assigned differently depending on the CNC control and the machine builder. Always check your machine’s manual.
| Source | Machine | Item | Detail |
|---|---|---|---|
| MHLW (Japan) training text | Lathe | Meaning | M41–M44 gear range (speed range setting) |
| Haas | Machining center | Meaning | M41 fixes low speed and M42 fixes high speed (override). Returns to normal at the next S command. Write it together with S, before M03 |
| Haas | Lathe | Meaning | M41 and M42 are gears (an option on machines with gears) |
| Haas | Lathe | Meaning | M43 and M44 unclamp and clamp the turret (for maintenance). They are not gears |
| Siemens (native) | — | Meaning | M40 selects automatically; M41–M45 are gear ranges 1–5 |
| Beckhoff | — | Meaning | M40–M45 are gear ranges 1–6 (M40 is range 1). You don't need to write them if automatic selection is ON |
| Mitsubishi Electric | Lathe | Notes | If speed ranges of up to 4 are set in parameters, the gear signal is output automatically from the S value |
| Siemens (ISO dialect) | — | Notes | M40–M45 are M-codes with fixed meanings, and cannot be replaced by subprogram calls or the like |
Sources
The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.
- 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
- Haas Automation, Inc. — M41 / M42 Low / High Gear Override (machining center, per-code explanation page) haascnc.com
- Haas Automation, Inc. — M41 / M42 Low / High Gear (lathe, per-code explanation page) haascnc.com
- Haas Automation, Inc. — Lathe Operator's Manual – 17 Lathe M-Codes (online version) haascnc.com
- Siemens AG — SINUMERIK 840D sl/840D/840Di sl/810D Fundamentals, Programming Manual, Edition 08/2005 (6FC5398-1BP10-0BA0) cache.industry.siemens.com
- Beckhoff Automation — TwinCAT CNC Programmierung: Getriebeschalten von Spindeln (M40 - M45) (in German) infosys.beckhoff.com
- Mitsubishi Electric — MITSUBISHI CNC 700/70 Series Programming Manual (Lathe System) (IB-1500057) mitsubishielectric.com
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0) cache.industry.siemens.com