Category Program & G/M Codes
M Code
Instruction set used for auxiliary function control.
Definition
Instruction set used for auxiliary function control. Treat it as a machine-side action set that must match the builder and controller conventions.
Formula / Rule
- M-codes control spindle, coolant, stops, clamps, tool change, and other auxiliary actions.
- Execution timing can vary by controller, so read the machine manual together with the NC block.
Typical Range
- Use it at tool changes, cycle boundaries, safe stops, and machine-specific actions.
Shop-floor Scenarios
- Confirm spindle and coolant commands before the first cut after a restart.
- Verify optional stop and end-of-program behavior during prove-out.
Common Errors / Troubleshooting
- If a machine response is missing, check whether that controller remaps or disables the M-code.
- If sequencing feels wrong, inspect block order, dwell, and machine builder options.
Related Tools
More in This Category
Related Tools
Explore more tools relevant to this workflow.
G/M Code Reference
Query G/M command usage with local controller rule sets and local syntax notes.
Arc Slot Generator
Generate NC code for arc slot machining.
G-Code Quick Inspector
Parse G-code programs with local rules to estimate cycle time, count tool changes, and flag risks.
G-Code Reference
Browse G-code commands, syntax notes, and controller-aware usage details.
Was this helpful?
Thanks for your feedback!