The Complete G-Code and M-Code Reference Guide for CNC Programming (2025 Edition) CNC programming begins with two vital command systems: G-codes and M-codes. G-codes control motion and positioning, while M-codes handle machine functions like spindle or coolant. This guide provides ...
Category: G-Code & M-Code Reference
Explore the complete list of G-codes and M-codes used in CNC machining. Understand commands, syntax, and machine responses with real-world examples and explanations.
cnccode.com – Ultimate CNC Knowledge Hub | G-Code, CAD/CAM, DIY CNC Latest Articles
G52 G-Code Explained: Temporary Coordinate System Offsets in CNC Machining
cnccodeG52 G-Code Explained: Temporary Coordinate System Offsets in CNC Machining G52 is a simple yet powerful G-code that lets you temporarily shift the coordinate system origin, relative to the currently active work offset (e.g., G54). It’s ideal when machining multiple ...
G50 G-Code Explained: Spindle Speed Limits and Position Setting in CNC Turning
cnccodeG50 G-Code Explained: Spindle Speed Limits and Position Setting in CNC Turning G50 is a dual-purpose G-code used in CNC turning centers to: 🌀 1. G50 as Maximum Spindle Speed Limit 🔧 Syntax: 🛡 Why It Matters: When using G96 ...
G17 G18 G19 Explained: Plane Selection in CNC Machining and Circular Interpolation
cnccodeG17 G18 G19 Explained: Plane Selection in CNC Machining and Circular Interpolation In CNC machining, the controller needs to know which 2D plane you’re working in to correctly execute arc movements (G02/G03) and canned cycles. That’s where G17, G18, and ...
M00 vs M01 vs M02 vs M30: CNC Program Stops and End Commands Explained
cnccodeM00 vs M01 vs M02 vs M30: CNC Program Stops and End Commands Explained Every CNC program needs to pause, stop, or reset at the right time — and that’s where M00, M01, M02, and M30 come into play. While ...
G65 vs M98: Macro Calls vs Subprograms in CNC Programming
cnccodeG65 vs M98: Macro Calls vs Subprograms in CNC Programming Both G65 and M98 are used to call external blocks of G-code, but they serve very different purposes. Understanding when and how to use each helps make your programs cleaner, ...
M198 Explained: Calling External Subprograms via USB, DNC, or Card
cnccodeM198 Explained: Calling External Subprograms via USB, DNC, or Card M198 is a powerful but underused M-code that allows CNC programs to call subprograms stored on external media — such as USB drives, memory cards, or DNC servers — without ...
G100+ G-Codes: OEM-Specific Functions and Advanced CNC Control
cnccodeG100+ G-Codes: OEM-Specific Functions and Advanced CNC Control Standard G-codes (G00–G99) cover basic CNC motions, drilling, tool changes, and feedrate modes. But many CNC controllers also support G100+ series codes — these are custom or extended G-codes, often OEM-specific or ...
G98 vs G99: Controlling Return Positions in CNC Canned Cycles
cnccodeG98 vs G99: Controlling Return Positions in CNC Canned Cycles When using canned cycles like G81, G83, or G84, the CNC machine needs to know where to return after completing a drilling move. That’s where G98 and G99 come in. ...
G96 vs G97: Constant Surface Speed vs Fixed RPM in CNC Turning
cnccodeG96 vs G97: Constant Surface Speed vs Fixed RPM in CNC Turning In CNC turning, spindle speed directly affects surface finish, tool wear, and chip control. G96 and G97 are two G-codes that define how the spindle speed is determined: ...