G Code Programming G - Code Programming (PDFDrive) PDF
G Code Programming G - Code Programming (PDFDrive) PDF
t d ti to t G-Code
GC d
Programming
Comp ter Integrated Manufacturing
Computer Man fact ring
A (X,Y)
(1,.875)
X axis
X-axis
Origin
g
C
D
(.750,-1.000)
(-.375,-.500)
3D Coordinate System (X
(X,Y,Z)
Y Z)
Z- Y-axis
axis
X-axis
Basic Machine A
Axes:
es 3 axis
a is
Milling Machines: 3 axis
X – axis (table left and
right)
Y – axis (table in and out)
Z – axis (usually the
spindle axis)
Additional Axes
A es
A – axis
i ((angular
l axisi about
b t X - axis)
i )
B – axis ((angular
g axis about Y – axis))
C – axis (angular axis about Z – axis)
Individual Words
Reserved Code Words Worksheet
N – Sequence or line number
G – Preparatory function
f
Di
Dimension
i Words:
W d
X–
Y–
Z–
Word Address 1
N – Sequence or line number
A tag that identifies the beginning of a block of
code It is used by operators to locate specific
code.
lines of a program when entering data or verifying
the program operation.
G – Preparatory function
G words specify the mode in which the milling
machine is to move along its programmed axes.
Word Address 2
Dimension Words
X – Distance or position in X direction
Y – Distance or position in Y direction
Z – Distance or position in Z direction
M – Miscellaneous functions
M words specify CNC machine functions not
related to dimensions or axial movements.
Word Address 3
F – Feed rate (inches per minute or millimeters per
minute)
Rate at which cutting tool moves along an axis
axis.
T – Tool number
Specifies tool to be selected.
selected
Word Address 4
I – Circular cutting reference for x axis
M05 – Stop
St spindle
i dl
Usually used prior to tool change or at end of program.
T
Two methods:
th d
• Linear interpolation – cut a path along a
specified
ifi d angle
l att a specified
ifi d ffeed
d rate.
t
• Circular interpolation – cut a path along an arc
or circle
i l att a specified
ifi d ffeed
d rate.
t
A is movements:
Axis mo ements Caution!
Ca tion!
Multiple axis movements are possible.
“Bestt Practice”
“B P ti ” iis NOT to
t make
k a 3-axis
3 i
movement using one line of code.
Move to position using two axes, X,Y;
th move th
then the Z with
ith an additional
dditi l
line of code.
E
Example
l 1:
1 NC Bl
Block
k
.125 GRID
T
Top View
Vi NC Bl
Block
k SPACES
Origin
(0,0)
Do nload Worksheet
Download
D( , ) I( , ) J( , )
B( , ) K( , )
L( , )
E( , )
A( , )
F( , )
C( , )
H( , ) G( , )
Origin
(0,0)
Pa se Lesson
Pause
E ample 1:
Example 1 Program NC
N01 G90 G80 T00
N02 G00 X0 Y3.000 Z1.000
N03 M03 S1000
E ample 1:
Example 1 Program NC
N01 G90 G80 T00
N02 G00 X0 Y3.000 Z1.000
N03 M03 S1000
N04 X.375 Y.250 Z1.000
N05 Z.100
Z 100
N06 G01 Z-.100 F5.00
N07 Y1.750
E ample 1:
Example 1 Program cont’d
N08 X1.250
X1 250 Y.250
Y 250
N09 Y1.750
N10 G00 Z.100
N11 X2.625
X2 625 Y.500
Y 500
N12 GO1 Z-.100
N13 X2.375 Y2.50
N14 X2.000
E ample 1:
Example 1 Program cont’d
N15 X1.750
X1 750 Y.500
Y 500
N16 Y1.500
N17 X2.000 Y1.750
N18 X2.375
N19 X2.625 Y1.500
E ample 1,
Example 1 con.,
con
N20 G00 Z1.000
Z1 000
N21 X0 Y3.000
Y3 000
N22 M05
N23 M30
E
Example
l 2:
2 PLTW Block
Bl k
.250 GRID
Worksheet Problem 2 SPACE
Oi i
Origin
E ample 2:
Example 2 Top View
Vie M( ,
)
F( , K( ,
J( , ) I( , )
C( , ) ) O( ,
) )
B( ,
) Q( ,
E( , )
)
A( ,
)
L( , P( ,
D( , ) )
G( , ) N( ,
) H( ,
)
Origin )