M06

Machining center

Tool change (ATC)

Format and notes

T_ M06

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)

T selects the next tool and M06 changes it. Re-apply G43 H_ after the change because the tool length is different.

    X—
    Y—
    Z—
    T—
    S0
    F0
    —0:00

      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.

      SourceMachineItemDetail
      HaasMachining centerNotesM16 is also tool changeHaas mills also have M16 (Tool Change)
      Saitama Univ. workshop textMachining centerFormatT#100 T00 M06On the training machine, T is written twice (the next tool is staged by specifying T00). A machine-specific format example

      Frequently asked questions about M06

      What is M06 (Tool change (ATC)) used for and how is it formatted in a CNC program?
      M06 commands "Tool change (ATC)" on Machining center. The standard program format is "T_ M06". T selects the next tool, and M06 swaps it with the tool in the spindle
      Is M06 a modal code or a one-shot (non-modal) code?
      Whether M06 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 M06 work differently on machining centers (mills) versus CNC lathes?
      M06 is primarily used on Machining center. 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 M06 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
      Yes. Control builders such as FANUC, Mitsubishi Electric (M80/M800), Okuma (OSP), Haas, Mazak, Siemens (SINUMERIK ISO dialect), and Heidenhain can differ in argument letters, decimal-point rules, and optional parameters for M06. Review the control comparison table above and verify the exact syntax in your machine’s programming manual before proving out the program.

      Sources

      The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.

      1. Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
      2. Haas Automation, Inc. — Mill Operator's Manual – 18 Mill M-Codes (online version) haascnc.com
      3. National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov
      4. 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