A searchable technical guide to common preparatory functions used in CNC milling and turning. Select any code to review its purpose, engineering interpretation, and controller-specific considerations.
i
Technical reference basis: This guide follows general ISO/FANUC-style programming conventions. G-code syntax, modal groups, parameters, and supported functions vary by control manufacturer, software version, machine builder, and installed options. Always validate commands against the official manuals for the specific machine and control before execution.
85 commands shownSelect a code for the engineering note
Code
Function
Milling
Turning
Rapid positioning
●
●
Linear interpolation
●
●
Circular interpolation, clockwise
●
●
Circular interpolation, counterclockwise
●
●
Dwell
●
●
High-precision contour control (HPCC)
●
—
AI Advanced Preview Control
●
—
Non-uniform rational B-spline (NURBS) Machining
●
—
Imaginary axis designation
●
—
Exact stop check, non-modal
●
●
Programmable data input
●
●
Data write cancel
●
●
XY plane selection
●
—
ZX plane selection
●
●
YZ plane selection
●
—
Programming in inches
●
●
Programming in millimeters (mm)
●
●
Return to home position (machine zero, aka machine reference point)
●
●
Return to secondary home position (machine zero, aka machine reference point)
●
●
Feed until skip function
●
●
Single-point threading, longhand style (if not using a cycle, e.g., G76)
●
●
Constant-pitch threading
●
—
Single-point threading, longhand style (if not using a cycle, e.g., G76)
—
●
Variable-pitch threading
●
—
Tool radius compensation off
●
●
Tool radius compensation left
●
●
Tool radius compensation right
●
●
Tool height offset compensation negative
●
—
Tool height offset compensation positive
●
—
Axis offset single increase
●
—
Axis offset single decrease
●
—
Axis offset double increase
●
—
Axis offset double decrease
●
—
Tool length offset compensation cancel
●
—
Define the maximum spindle speed
—
●
Scaling function cancel
●
—
Position register (programming of vector from part zero to tooltips)
Fixed cycle, simple cycle, for roughing (Z-axis emphasis)
—
●
Absolute arc programming
●
—
Incremental programming
●
●
Incremental arc programming
●
—
Position register (programming of vector from part zero to tool tip)
●
●
Threading cycle, simple cycle
—
●
Feedrate per minute
●
●
Fixed cycle, simple cycle, for roughing (X-axis emphasis)
—
●
Feedrate per revolution
●
●
Constant surface speed (CSS)
—
●
Constant spindle speed
●
●
Return to initial Z level in canned cycle
●
—
Feedrate per minute (group type A)
—
●
Return to R level in canned cycle
●
—
Feedrate per revolution (group type A)
—
●
Tool length measurement
●
—
No commands match the current search and filter.
Engineering Foundations
Fundamentals of G-Code and Computer Numerical Control (CNC)
Computer Numerical Control (CNC) technology relies fundamentally on G-code (Geometric code), a standardized programming language utilized to orchestrate automated manufacturing processes. Rather than representing distinct programming modalities, G-code functions as the precise instruction set interpreted by a CNC machine to synthesize raw materials into specific geometries. For these automated systems to execute operations successfully, the underlying program requires explicitly defined initial coordinates, specific trajectories, and absolute vector endpoints.
Structurally, G-code instructions dictate multi-axis motion pathways and regulate critical operational variables depending on the specific machining system and tooling configuration. Beyond spatial positioning, these alphanumeric commands specify tool selection, rotational axes, feed rates, travel limits, and system-level electrical parameters. Consequently, G-code serves as the vital communicative bridge that translates digital computer-aided designs (CAD/CAM) into highly repeatable, high-precision physical components.
Continue the Engineering Conversation
Receive practical machining guidance, CNC programming insights, tooling knowledge, and new technical resources from our engineering team.
No gated content. No additional requirements. Unsubscribe at any time.
G00
Rapid positioning
Engineering interpretation
On 2- or 3-axis moves, G00 (unlike G01) traditionally does not necessarily move in a single straight line between start point and endpoint. It moves each axis at its maximum rapid-traverse rate until its vector quantity is achieved. A shorter vector usually finishes first (given similar axis speeds). This matters because it may yield a dog-leg or hockey-stick motion, which the programmer needs to consider, depending on what obstacles are nearby, to avoid a crash. Some machines offer interpolated rapids as a feature for ease of programming (safe to assume a straight line).
ISO/FANUC reference note: Confirm the exact syntax, modal behavior, parameter format, and machine-option requirements in the official documentation for the installed control before running the program.
From the screen to the spindle
The program is only half of it. Tooling that holds size run after run is the other half.