G-Code Basics for Beginners

This is a basic course for those who want to learn to read, understand and safely check simple CNC programs.

Course description

The course “G-code Basics for Beginners” helps you build a step-by-step understanding of the basic logic of CNC programming: from control program structure and coordinates to tool movements, technological commands, editing and simulation.

The material is designed for beginners and built so that the learner does not just memorize commands, but understands what happens to the machine on each program line. Special attention is given to safe code reading, coordinate checking, finding dangerous movements and preparing a program to run.

The course is a good foundation before studying more complex topics: cycles, tool compensation, subprograms, macro programming and practical programming for specific CNC control systems.

What you will learn

After completing the course, you will be able to:

  • understand the structure of a simple CNC program;
  • read G-code line by line and understand the machining sequence;
  • distinguish preparatory, technological and machining commands;
  • understand the X, Y, Z axes and the part zero;
  • read absolute and incremental coordinates;
  • understand the difference between G00, G01, G02 and G03;
  • find dangerous movements, especially along the Z axis;
  • check the spindle, feed, tool and coolant;
  • understand work offsets G54, G55 and G56;
  • perform basic NC program editing;
  • check a program in a simulator before practice;
  • understand what cycles, subprograms and simple code optimization are.

Course format

Interactive online course with electronic certificate

This is a fully self-paced online course. It does not include scheduled live classes or instructor attendance. You study the material independently, complete the required practice and checks, and receive an electronic certificate after finishing the course and passing the required assessment tasks.

Lesson plan

Course sections and topics

The course moves from CNC program structure to confident checking, editing and reading of simple G-code programs.

  1. 01
    CNC program structure and G-code reading logic
    • What G-code and an NC program are
    • What a control program consists of
    • Program blocks, lines and execution order
    • Comments and clear notes for the operator
    • Modal and non-modal commands
    • How to quickly distinguish setup lines from machining
  2. 02
    Machine coordinate system and program zero
    • X, Y and Z axes on a basic milling machine
    • Positive and negative movement directions
    • Machine coordinates and work coordinates
    • Part zero and the meaning of the program
    • Work offsets G54, G55, G56 and beyond
    • Checking coordinates against the drawing and setup sheet
    • Common mistakes when shifting zero and setting the part
  3. 03
    Program modes: G90, G91, G20, G21
    • Units of measurement: G21 and G20
    • Absolute programming G90
    • Incremental programming G91
    • Why accidental mixing of G90 and G91 is dangerous
    • Safe start line
    • How to check modes before running a program
  4. 04
    Tool movements and toolpath building
    • Rapid movement G00
    • Linear feed movement G01
    • Feed F and its effect on motion
    • Approach, cutting move and tool retract
    • Dangerous Z-axis movements
    • Circular interpolation G02 and G03
    • Defining an arc with I and J
    • R format for defining an arc radius
    • Checking the toolpath before machining
  5. 05
    Tool control and tool offsets, spindle, feedrate and coolant
    • Tool selection and tool change command
    • Tool length compensation: G43, H and G49
    • Cutter radius compensation: G41, G42, D and G40
    • Spindle speed S
    • Spindle rotation: M03 and M04
    • Spindle stop M05
    • Feedrate F in a machining context
    • Coolant: M08 and M09
    • Checking the relationship between T, H, D, S, F and M-codes
  6. 06
    Practical reading of a simple milling program
    • How to read the beginning of a program
    • How to read setup lines before machining
    • Step-by-step toolpath tracking
    • Identifying cutting depth and retract height
    • Finding spindle, feed, tool and coolant commands
    • Program stop commands
    • Program completion and return to a safe state
    • Checking the program against the expected machining sequence
  7. 07
    Safe G-code editing for beginners
    • What a beginner can edit
    • Changing coordinates without breaking the logic
    • Safely changing feed and spindle speed
    • Adding comments for the operator
    • Finding missing decimal points and minus signs
    • Errors in modal modes, offsets and tool number
    • Mini-checklist before saving the edited program
  8. 08
    Basic introduction to cycles, subprograms and optimization
    • What standard CNC cycles are
    • Example of a simple drilling cycle
    • What is a subprogram?
    • Where subprograms simplify G-code
    • Simple program optimization
    • What to study next after the basic course

This course is currently available in: English, Русский, Español, Українська.

CNCPassport © MEBLEOS © 2026 · Ver 1.0 · Terms & Conditions | Privacy Policy | Cookie Policy | Refund Policy Legal information | Privacy Policy