Skip to main content
Back to Resources

Program reference

CNC G-Code and M-Code Reference

Common G-code and M-code commands for setup review, cycle-time assumptions, and program handoff checks.

Direct answer: G-codes command motion and geometry while M-codes command machine functions. Confirm modal state, offsets, spindle direction, and coolant before release.

Program reference

CNC G-Code and M-Code Reference

Common milling and turning G-codes and M-codes for setup review, cycle-time assumptions, and program handoff checks.

Source: Created from the 2026-06-24 GSC support-page expansion pass to cover CNC shop-floor reference intent without duplicating calculator pages.Updated: 2026-06-24
CodeFunctionUse before releaseCommon risk
G00Rapid positioningCheck clearance, fixture offsets, and retract height.Crashes from unsafe Z or wrong work offset.
G01Linear feed moveConfirm feed mode, units, and tool engagement.Feed too high after unit or modal-state mismatch.
G02 / G03Clockwise / counterclockwise arcConfirm plane, radius/IJK format, and control convention.Arc alarms or wrong toolpath direction.
G17 / G18 / G19Plane selectionVerify the active plane before arcs or canned cycles.Unexpected arc plane after prior operation.
G54 - G59Work coordinate offsetsMatch setup sheet, probe routine, and fixture location.Running a program under the wrong offset.
M03 / M04 / M05Spindle clockwise, counterclockwise, stopCheck tool direction, RPM, and spindle state at operation start.Wrong rotation for tap, thread mill, or left-hand tool.
M06Tool changeConfirm tool number, length offset, and magazine location.Tool mismatch or missing length compensation.
M08 / M09Coolant on / offVerify coolant mode for material and toolpath.Dry cut when coolant is required for heat control.