🚚 Free Worldwide Shipping $99+ · 🔒 Secure Checkout · ↩️ 30-Day Returns

Authorised CNC Cutting Tool Supplier · Direct from China

How to Read a CNC Toolpath: G-code Basics for Operators

Even if your CAM generates the toolpath, knowing G-code lets you spot bad programming, recover from interrupted cycles, and make small edits at the machine.

Essential G-codes

Code Function
G00 Rapid traverse (max speed, NOT cutting)
G01 Linear feed (cutting at programmed feed rate)
G02 / G03 Circular interpolation CW / CCW
G17 / G18 / G19 Plane select XY / XZ / YZ
G20 / G21 Inch / Metric
G40 / G41 / G42 Cutter compensation off / left / right
G43 / G49 Tool length offset on / off
G54-G59 Work coordinate systems (WCS)
G80 / G81 / G83 Cancel cycle / drill / peck-drill
G90 / G91 Absolute / Incremental positioning
G94 / G95 Feed per minute / per revolution

Essential M-codes

  • M00 — Program stop (pause)
  • M01 — Optional stop (only if button pressed)
  • M03 / M04 / M05 — Spindle CW / CCW / off
  • M06 — Tool change
  • M08 / M09 — Coolant on / off
  • M30 — Program end + reset

Reading a Sample Block

N50 G01 X25.4 Y10.0 Z-2.5 F300

  • N50 — Block (line) number 50
  • G01 — Linear feed move
  • X25.4 Y10.0 Z-2.5 — Move to these coordinates
  • F300 — Feed rate 300 mm/min

Common Tool Change Block

T05 M06 ; G43 H05 Z50.0 ; M03 S2500 ; M08

Translation: Change to tool 5; activate length offset stored in H05; move Z to safe height; spindle on at 2500 RPM clockwise; coolant on.

Where to Look in Your Program

  • Top: tool number, WCS, units (G20/G21)
  • Bottom: M30 (or M02) to confirm proper end
  • Look for any feed rate (F) suspiciously high or low
  • Verify Z-axis safe positions before tool changes

For tooling that fits your G-code, browse our insert catalog.

Shop Related Products at HOOGUU

Written by

WeChat QR Code

扫码添加微信

Scan to add WeChat

WhatsApp Us

Cart

Your Cart is Empty

Back To Shop