0% found this document useful (0 votes)
15 views

L06 Part Programming 2

Uploaded by

u1909030
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

L06 Part Programming 2

Uploaded by

u1909030
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 27

All credit of this Slide

Dr. Abdullahil Azeem


Common Programming Format and Procedure
1. Start-up or preliminary blocks.
Ex: G90 (absolute positioning), G20 (inch mode), G40 (cancel cutter
diameter compensation).
2. Workpiece coordinate setting (part zero).
The method of setting the part zero (varies for each controller):
 using the zero set or zero shift button on the controller (no NC
command is needed).
 using G-codes (e.g., G92 & G54 – G59).

3. Tool call (tool change) – possibly with tool length offset.


4. Spindle speed control.
5. Tool motion blocks – the main body of the program.
Repeat 3, 4, 5 as necessary.
6. Home return – avoid running into the fixture or part.
7. Program end blocks.
Rapid Positioning
Rapid Positioning command G00 – for tool positioning.
 It moves the tool along a straight-line path from the initial (current) position
to the final position at the maximum feedrate.
 General Syntax: G00 Xn Yn Zn

Note:(1) Be careful not to run into the machine table, fixture, part, etc.
(2) Xn Yn Zn specify the coordinates of the cutter center at the tip.
Linear Interpolation
Linear Interpolation command G01 – for cutting.
 It moves the tool along a straight-line path from the initial (current) position
to the final position at a programmed feedrate.
 General Syntax: G01 Xn Yn Zn Fn

Note:(1) The cutter must be tangent to the line it cuts (calculating cutter
offset is needed).
(2) Xn Yn Zn specify the coordinates of the cutter center at the tip.
CNC – Computer Numerical Control
Linear Interpolation
Machine a rectangular block 3”  2”  0.5”. Cutter ½” end mill.
Part zero: X 0 & Y 0 at lower left-hand corner. Z 0 at top of the
part.
Z Y
Linear InterpolationX=M.HOME
Y=M.HOME X
 Ex: Machine a rectangular block 3”  2”  0.5”. X0 & Y0 at lower
Z=M.HOME left-
X=-0.5
hand corner. Z0 at top of the part. Cutter ½” end mill. Blank in irregular
Y=-0.25
shape. Assume part origin is set earlierX=-0.5
Z=1.0
Y=-0.25
Y=-0.5 X=-0.25 X=3.25
O0001 Y=2.25 Y=2.25
Z=.25
Z=M.HOME
N0010 G20 G90 Z=-0.55 Z=-0.55
X=-0.5
N0020 G92 X-10.2 Y11.6 Z7.6 (not using tool length offset)X=3.25
X=-0.5
X=-0.25
Y=-0.5
N0030 T01 M06 X=-0.5
Y=-0.25
Y=-0.25
Z=.25 Y=-0.25
Y=-0.5
Z=-0.55
Z=-0.55 Z=-0.55
N0040 M03 S800 Z=-0.55
N0050 G00 X-.5 Y-.5 Z=7.6
N0060 G00 Z.25 Y=11.6 Z Y
N0070 G01 Z-.55 F5.0
N0080 G01 X-.25 Y-.25 X=-10.2 X
N0090 Y2.25
N0140 G00 Z1.0
N0100 X3.25 N0150 M05
N0110 Y-.25 N0160 G28
N0120 X-.5 N0170 M30
N0130 Z.25
Circular Interpolation
Circular Interpolation commands G02 & G03 – for cutting a circular contour.
 It moves the tool along a circular path from the initial (current) position to the
final position at a programmed feedrate.
Note:(1) Circular interpolation is executed on a plane. Plane selection
(modal commands): G17 – XY (default), G18 – XZ, G19 – YZ.
(2) Tool motion direction: G02 – clockwise; G03 – counterclockwise.
(3) Absolute or Incremental coordinates are being used.
 General Syntax: G02 (G03) Xn Yn (Zn) In Jn (Kn) (Fn)
Circular Interpolation
Example:
N010 G90 (Absolute) Initial position of ½” tool
N020 G17 (XY Plane) Y
N040 G01 X3.0 Y.25 F10.0
X
N040 G02 X4.125 Y-3.9486 I0. J-2.25 J
2
R2
Calculation: Y
60
End Position: This is absolute positioning
X=3+2.25cos(60)
Y=-2-2.25sin(60) 3
I and J: (center-initial)
X
I=3-3
End
J=-2-0.25
position
This is incremental positioning with respect to initial position of
Circular interpolation.
Circular Interpolation
 Circular Interpolation via Radius Specification – coding the radius (R) of the
circular arc instead of I, J, and K.
 General Syntax: G02 (G03) Xn Yn (Zn) Rn (Fn)

Questions:
 What happens if an R word and a set of I and J words (for the XY plane) are
both given in the same circular interpolation command block?
 Can R word be used to machine full circles?
Cutter radius compensation

Source: https://www.youtube.com/watch?v=vFD7uTQEel0

Cutter radius compensation (CRC)

G41 Tool nose radius compensation (left)


G42 Tool nose radius compensation (right)
G40 cancel Tool nose radius compensation
Turing Program (CNC Lathe Programming)
DEF WORK
PS LC, [0,0], [96,90]
END
DRAW
G00 X500 Z500
G50 S2500
NLAP1 G81
G00 G42 X50 Z98
G01 X60 Z88 F0.15
Z80
G02 X70 Z75 L5
G03 X80 Z70 L5
G01 Z60
G02 X80 Z35 L40
G01 Z25
X90 Z20
X95
G40
G80
G00 X95 Z100 S670 T010101 M03 M08

---------------- ROUGH CUT --------------------

NT1 G96 S130


G85 NLAP1 D3 F0.3 U1.0 W0.1
G00 X95 Z100
G97 X500 Z250 S930
M01
X95 Z100 T020202

---------------- FINISH CUT -------------------

NT2 G96 S180


G87 NLAP1
G00 X95 Z100 M05 M09
M02
C3

DEF WORK
PS LC, [0,0], [200,40]
END
DRAW ---------------- ROUGH CUT --------------------
G00 X500 Z500
G50 S2500 NT1 G96 S130
G85 NLAP1 D10 F0.3 U1.0 W0.1
NLAP1 G81 G00 X42 Z65
G00 G42 X26 Z201 G97 X500 Z250 S930
G01 X34 Z196 F0.15 M01
Z167 X42 Z205 T020202
G03 X34 Z127 L80
G01 Z87 ---------------- FINISH CUT -------------------
X40 Z84
Z60 NT2 G96 S180
G02 X40 Z20 L60 G87 NLAP1
G01 X42 G00 X500 Z250 M05 M09
G40 M02
G80
G00 X42 Z205 S670 T010101 M03 M08
Cutter radius compensation

Source: https://www.youtube.com/watch?v=vFD7uTQEel0

Cutter radius compensation (CRC)

G41 Tool nose radius compensation (left)


G42 Tool nose radius compensation (right)
G40 cancel Tool nose radius compensation
Tool length offset / compensation
Tool length compensation / offset cutter
G43 tool length compensation (positive direction)
workpiece
G44 tool length compensation (negative direction)
G49 cancel Tool nose radius compensation spindle

G01 Z0.0 F0.15 G43 H01 Z0.0 F0.15

Objective is to touch the tool tip to


the upper surface of the workpiece

Z0

X0
Tool length offset / compensation
Tool length compensation / offset cutter
G43 tool length compensation (positive direction)
workpiece
G44 tool length compensation (negative direction)
G49 cancel Tool nose radius compensation spindle

G01 Z0.0 F0.15 G44 H01 Z0.0 F0.15

Z0
Objective is to touch the tool tip to
the upper surface of the workpiece
X0
Milling Program Assignment- Group 1
Milling Program Assignment- Group 2
Milling Program Assignment- Group 3
Milling Program Assignment- Group 4
Milling Program Assignment- Group 5
Milling Program Assignment- Group 6
G Code list
G Code list (Cont.)
M Code list (Cont.)
88 96
80
70
60
35 G00
25

R40
G01
20 G02

R5
G03
Feed G40
G42

R5
0.15

80
90

80

60
200
196
167
127
87
84
60
R60

20
X

R 80
z

28
40

34

Feed
0.15

You might also like