What is G-code? CNC Programming Explained, Line by Line

8:27 Watch on YouTube

What the video shows

What G-code is and how a CNC controller reads it, in 8:27. Plain text based on RS-274 / ISO 6983: every line is a block, every word a letter and a number (N, G, M, X/Y/Z, I/J/K, F, S, T). Modal commands; G0 rapid positioning and G1 linear feed; G2/G3 arcs with I/J or R and the G17/G18/G19 planes; G20/G21 units, G90 absolute and G91 incremental positioning; G54–G59 work offsets and G53; G43 H tool length and G41/G42/G40 D cutter radius compensation; M3/M4/M5, M6, M8/M9, M0/M1 and M30. A complete program for an 80 × 50 mm plate with an R10 corner, line by line; how CAM and the post processor write G-code for a dialect; the interpreter, look-ahead and interpolator inside the controller. The codes shown are generic ISO/Fanuc style; every controller has its own dialect (X CNC takes feed in mm/s).

More videos

All videos