M functions are used to perform specialized actions in CNC programs. Most of the M-series Control M functions
have default actions, but can be customized with the use of macro files.
Summary of M functions
M00 Stop for Operator
M01 Optional Stop for Operator
M02 Restart Program
M03 Spindle On Clockwise
M04 Spindle On Counterclockwise
M05 Spindle Stop
M06 Tool Change
M07 Mist Coolant On
M08 Flood Coolant On
M09 Coolant Off
M10 Clamp On
M11 Clamp Off
M14 (macro) Swing Arm Pot Up *
M15 (macro) Unclamp Tool with air on *
M16 (macro) Unclamp Tool with air off *
M17 (macro) Prepare for Tool Change *
M18 (macro) Home Tool Changer *
M19 (macro) Orient Spindle *
M20 (macro) Pickup Tool *
M21 (macro) Move Head Up *
M22 (macro) Move Head to ATC level *
M23 (macro) Rotate Carousel *
M24 (macro) Start Tool Put-back *
M25 Move to Z Home
M26 Set Axis Home
M30 Customizable M-code for End of Intercon Program
M39 Air Drill
M41 (macro) Select Low Spindle Gear Range *
M42 (macro) Select Medium-Low Spindle Gear Range *
M43 (macro) Select High Spindle Gear Range *
M50 (macro) Index Tool Plus *
M51 (macro) Index Tool Minus *
M60 (macro) 5 Axis Digitizing *
* M functions marked with "(macro)" actually have no standard default action, and could possibly be
unimplemented and therefore unavailable on your machine. Also, their stated function is only standard on certain
machines.
Chapter 13
CNC Program Codes: M functions
M-Series Operator's Manual
M80 (macro) Carousel In *
M81 (macro) Carousel Out *
M91 Move to Minus Home
M92 Move to Plus Home
M93 Release/Restore Motor Power
M94,M95 Output On/Off
M98 Call Subprogram
M99 Return from Macro or Subprogram
M100 Wait for PLC bit (Open, Off, Reset)
M101 Wait for PLC bit (Closed, On, Set)
M102 Restart Program
M103 Programmed Action Timer
M104 Cancel Programmed Action Timer
M105 Move Minus to Switch
M106 Move Plus to Switch
M107 Output Tool Number
M108 Enable Override Controls
M109 Disable Override Controls
M115,M116,M125,M126 Protected Move Probing Functions
M120 Open data file (overwrite existing file)
M121 Open data file (append to existing file)
M122 Record local position(s) in data file
M123 Record value and/or comment in data file
M124 Record machine position(s) in data file
M127 Record Date and Time in a data file
M128 Move Axis by Encoder Counts
M129 Record Current Job file path to data file
M130 Run system command
M200/M201 Stop for Operator, Prompt for Action
M223 Write Formatted String to File
M224 Prompt for Operator Input Using Formatted String
M225 Display Formatted String for A Period of Time
M290 Digitize Profile
M300 Fast Synchronous I/O update
M333 Axis Role Re-assignment
M1000-M1015 Graphing Color for Feedrate movement
4/9/15
13-1
Need help?
Do you have a question about the M400 and is the answer not in the manual?