KEMBAR78
CNC Gcode Examples | PDF
0% found this document useful (0 votes)
6 views2 pages

CNC Gcode Examples

This document provides examples of CNC G-code commands, including basic motion commands, coordinate systems, drilling cycles, tool and work offsets, and M codes. It also includes example programs for pocket milling, drilling patterns, and circular interpolation. Each section outlines specific G-code commands with corresponding usage scenarios.

Uploaded by

Zafer Kurt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

CNC Gcode Examples

This document provides examples of CNC G-code commands, including basic motion commands, coordinate systems, drilling cycles, tool and work offsets, and M codes. It also includes example programs for pocket milling, drilling patterns, and circular interpolation. Each section outlines specific G-code commands with corresponding usage scenarios.

Uploaded by

Zafer Kurt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CNC G-Code Examples

1. Basic Motion Commands


G00 – Rapid positioning
G00 X50 Y30
G01 – Linear interpolation
G01 X100 Y50 F200
G02/G03 – Circular interpolation
G02 X50 Y50 I20 J0
G03 X0 Y0 I-25 J0

2. Coordinate Systems & Modes


G17 – XY plane, G18 – XZ plane, G19 – YZ plane
G17
G18
G19
G90 – Absolute mode, G91 – Incremental mode
G90 G01 X50 Y50
G91 G01 X10 Y10

3. Drilling Cycles
G81 – Drilling cycle
G81 X20 Y20 Z-10 R2 F100
G83 – Peck drilling cycle
G83 X40 Y40 Z-20 R2 Q5 F80

4. Tool & Work Offsets


G54 – Work offset, G43 – Tool length compensation
G54
T01 M06
G43 H01 Z100

5. M Codes
M03 – Spindle ON clockwise M05 – Spindle stop M06 – Tool change M30 – Program end & rewind
M03 S1200
M05
M06 T02
M30

6. Example Programs

Example 1: Pocket Milling (Square)


%
O1001 (Pocket Milling Example)
G21 G17 G90 G40 G49 G80
G54
T01 M06
S1500 M03
G00 X0 Y0 Z5
G01 Z-5 F100
G01 X50 Y0 F200
G01 X50 Y50
G01 X0 Y50
G01 X0 Y0
G00 Z5
M30
%

Example 2: Drilling Pattern


%
O1002 (Drilling Pattern Example)
G21 G17 G90 G40 G49 G80
G54
T02 M06
S1200 M03
G81 X0 Y0 Z-10 R2 F100
X20 Y0
X40 Y0
X60 Y0
G80
M30
%

Example 3: Circular Interpolation (Circle)


%
O1003 (Circle Example)
G21 G17 G90 G40 G49 G80
G54
T03 M06
S1000 M03
G00 X0 Y-25 Z5
G01 Z-5 F100
G02 X0 Y-25 I0 J25 F150
G00 Z5
M30
%

You might also like