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
| Code | Function | Use before release | Common risk |
|---|---|---|---|
| G00 | Rapid positioning | Check clearance, fixture offsets, and retract height. | Crashes from unsafe Z or wrong work offset. |
| G01 | Linear feed move | Confirm feed mode, units, and tool engagement. | Feed too high after unit or modal-state mismatch. |
| G02 / G03 | Clockwise / counterclockwise arc | Confirm plane, radius/IJK format, and control convention. | Arc alarms or wrong toolpath direction. |
| G17 / G18 / G19 | Plane selection | Verify the active plane before arcs or canned cycles. | Unexpected arc plane after prior operation. |
| G54 - G59 | Work coordinate offsets | Match setup sheet, probe routine, and fixture location. | Running a program under the wrong offset. |
| M03 / M04 / M05 | Spindle clockwise, counterclockwise, stop | Check tool direction, RPM, and spindle state at operation start. | Wrong rotation for tap, thread mill, or left-hand tool. |
| M06 | Tool change | Confirm tool number, length offset, and magazine location. | Tool mismatch or missing length compensation. |
| M08 / M09 | Coolant on / off | Verify coolant mode for material and toolpath. | Dry cut when coolant is required for heat control. |
Download / export next steps
Formula handoff
Check feed, speed, and unit assumptions before interpreting G01 moves.
Cycle-time handoff
Use rapid, feed, tool-change, and spindle events in the machining-time calculator.
Benchmark handoff
Compare tool-change and non-cutting events against cycle-time benchmark ranges.
Shop-floor PDF
Download the same table for setup review meetings.