Skip to main content
Independent machine intelligence · Research before the decision
THE MACHINEBLUE BOOKResearch · Market · Ownership
◧ The Machine Blue BookTechnologyReference LibraryMachine DirectoryGlossaryMarketplaceThe Gauge ↗ContactMain site ↗
Reference › Glossary › M-Code
Definition

M-Code

What is M-Code?

M-codes are the miscellaneous (machine) commands in a CNC program that control functions other than motion — spindle on/off and direction (M03/M04/M05), coolant (M08/M09), tool change (M06), and program stop/end (M00/M30). They work alongside G-codes to run the machine.

Exact M-code meanings vary by control and machine, which is one reason a post processor is tuned per machine.

Also known as

M codemiscellaneous code

Related terms

G-Code
Programming
Post Processor
Programming
CNC
Computer Numerical Control
Canned Cycle
Programming
See it in machines → Browse the machine reference

What's your machine worth?

Get a real number from a Machine Blue Book specialist — free, no obligation.

Or email info@themachinebluebook.com. Only a response to this request unless you separately opt in. Privacy · Terms.