5 PP
5 PP
1.
Reference Points
2.
3.
Point from where the tool starts for its motion while executing a
program and returns back at the end of the cycle.
This can be any point within the workspace of the tool which is
sufficiently away from the part.
In case of CNC lathe it is a point where tool change is carried
out.
Part Origin/Zero
BLOCK FORMAT
Sample Block
N135 G01 X1.0 Y1.0 Z0.125 F5;
G & M Codes
Example CNC Program
N5 G90 G20
N10 M06 T3
N15 M03 S1250
N20 G00 X1 Y1
N25 Z0.1
N30 G01 Z-0.125 F5
N35 X3 Y2 F10
N40 G00 Z1
N45 X0 Y0
N50 M05
N55 M30
G Codes
Modal G-Codes
Most G-codes set the machine in a mode
which stays in effect until it is changed or
cancelled by another G-code. These
commands are called modal.
Eg: G01 cancelled by G02
M Codes
M00
M01
M02
M03
M04
M05
M06
M08
M09
M10
M11
M30
N Codes
Programming Modes
Unit Selection
Metric unit selection : G21 or G71
Inch unit selection : G20 or G70
Tool Motion
G00 : Rapid Traverse/Positioning
Format: N_ G00 X_ Y_ Z_ ;
Move tool rapidly by any path (shortest path) to reduce
non productive time.
Format: N_ G01 X_ Y_ Z_ F_
Linear Interpolation results in a straight line feed move.
Used when material is to be cut using Feed rate.
25
B
20
15
10
5
PositioningmotionfromAtoC
N10G00X30000Y20000F0
10
15
20
25
30
Tool Motion
G02 : Circular Interpolation (CW)
25
CircularinterpolationfromAtoB
aboutacirclecenteredatC
N10G02X20000Y10000
I5000J15000F2500
I=5
20
15
J=15
10
5
B
C
10
15
20
25
30
Tool Motion
G03 : Circular Interpolation CCW
G04 : Dwell
N_ G04 X3.0; (3 sec. stoppage of controller)
Or
N_ G04 P3000; (3000 millisecond)
N5 G90 G21
N10 M06 T2
N20 G00 X1 Y1
(Rapid to X1,Y1 from origin point)
N25 Z0.125
(Rapid down to Z0.125)
N30 G01 Z-0.125 F100
(Feed down to Z-0.125 at
100 mm/min)
N35 G01 X2 Y2
(Feed diagonally to X2,Y2)
N40 G00 Z1
(Rapid up to Z1)
N45 X0 Y0
(Rapid to X0,Y0)
N50 M05
N55 M00
(Program stop)
Assumptions:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Part/workpiece Zero is at A
Identify Coordinate system if required
Locate Rapid/Clearance plane
Material of w/p: CI or MS
Type of Machine: Vertical Milling m/c
Type of tools: Tool 1 = 20 mm dia. slot drill
Tool height: 15 mm
Spindle speed: 3000 rpm
Feed: 120 mm/min
Assumptions:
10.
X- coordinate
Y-coordinate
25
25
25
75
65
75
65
25
Part Program
N5 G92 X0 Y0 Z0* (abs. preset at A)
N10 G90 G20* (abs. prog. with Metric)
N15 M06 T1* (tool change Tool :1)
N20 M03 S1200* (spindle CW at 1200 rpm)
N25 G00 X25 Y25 Z2*(tool at B 2mm above)
N30 G01 Z-12 F120* (tool to full depth)
N35 Y75* (proceed to C)
N40 X65* (proceed to D)
N45 G02 Y25 I0 J-25* (cut curve till E)
N50 G01 X25* (proceed to B)
N55 Z2* (tool to rapid plane)
N60 G00 Z50 M05* (rapid & spindle stop)
N65 X0 Y0* (rapid to start position)
N65 G91 G28 X0 Y0 Z0* (rapid to home)
N70 M30* (program end & tape rewind)
Note: For calling Tool 2 for another
operation: After N65 go to N15 and use T2
G-CODE PROGRAM
Second pass:
conventional mill to a
depth of 0.25 around
edge profile.
N35 Z-0.250
N40 X3.875
N45 Y4.125
N50 X0.125
N55 Y0.125
N60 Z0.125
Third pass:
conventional mill to a
depth of 0.125 around
pocket profile.
N65 G00 X1.25 Y1.0
N70 G01 Z-0.125 F5
N75 X1.75
N80 Y2.5
N85 X1.25
N90 Y1.0
N95 Z0.125
Solution:
1) Assumptions
2) Part Program