SlideShare una empresa de Scribd logo
1 de 95
FANUC INDIA FA & ROBOT 
1 
BASIC PROGRAMMING OF 
CNC MILLING MACHINE
FANUC INDIA FA & ROBOT 
2 
Course contents Page No. 
General coordinate System 04 
Designation of machine axes 05 
Machine coordinate system 06 
Work coordinate system 07 
Work datum setting procedure 09 
Work coordinate system – Selection 11 
Structure of 
program 13 
Course contents
FANUC INDIA FA & ROBOT 
Course contents Page No. 
Basic G codes 17 
Basic M codes 26 
Tool length compensation 27 
Cutter radius compensation 29 
Programming Examples 35 
Canned cycles – Drilling 47 
Pattern of holes 74 
Custom macro programming 87
FANUC INDIA FA & ROBOT 
4 
General Co-ordinate system 
General coordinate system
FANUC INDIA FA & ROBOT 
5 
Designation of machine axis 
Designation of machine axis
FANUC INDIA FA & ROBOT 
6 
Machine coordinate system 
• The point that is specific to 
machine and serves as the 
reference of the machine 
is referred to as the 
machine zero point 
• Machine tool builder sets a 
machine zero point for 
each machine 
Machine coordinate system
FANUC INDIA FA & ROBOT 
7 
Work co- ordinate system 
A coordinate system used for 
machining a workpiece is 
referred to as a workpiece 
coordinate system 
A workpiece co-ordinate system 
is also called as work reference 
zero or work datum 
The work datum will be set by 
the user before the machining 
process begins 
Work coordinate system
FANUC INDIA FA & ROBOT 
8 
Work co- ordinate system 
A coordinate system used 
for machining a workpiece is 
referred to as a workpiece 
coordinate system 
A workpiece co-ordinate 
system is also called as 
work reference zero or work 
datum 
The work datum will be set 
by the user before the 
machining process begins 
Work coordinate system
FANUC INDIA FA & ROBOT 
9 
Work datum setting procedure 
Move the work table and spindle head 
to the reference position 
Attach a dial gauge or fix the reference 
tool in the spindle 
Bring the tool towards the work piece 
in rapid mode or manually and make 
the tool to touch on the surface of the 
workpiece and note the Z axis reading. 
Then add the tool length with the same 
sign to get the Z co ordinate value and 
note down this value 
WCS 
MCS 
Work datum setting procedure
FANUC INDIA FA & ROBOT 
10 
Work datum setting procedure cont., 
Then move the tool to any one edge 
and make the tool to touch the edge 
and note down the readings of X and 
Y axes.ADD /subtract the radius of 
the tool from the readings 
The readings will be the distance 
between the machine zero and work 
zero point 
Record noted X, Y, Z values in any 
one of the work coordinate G codes 
(G54 to G59) 
Work datum setting procedure
FANUC INDIA FA & ROBOT 
11 
Work piece coordinate system - selection 
G54 Workpiece coordinate system 1 
G55 Workpiece coordinate system 2 
G56 Workpiece coordinate system 3 
G57 Workpiece coordinate system 4 
G58 Workpiece coordinate system 5 
G59 Workpiece coordinate system 6 
Work piece coordinate system selection
FANUC INDIA FA & ROBOT 
12 
Work piece coordinate system Selection 
Work piece coordinate system selection
FANUC INDIA FA & ROBOT 
13 
Structure of Program 
Structure of Program
FANUC INDIA FA & ROBOT 
Structure of Program 14
FANUC INDIA FA & ROBOT 
Structure of Program 15
FANUC INDIA FA & ROBOT 
16 
Block 
Structure of Program
FANUC INDIA FA & ROBOT 
17 
Basic G codes 
- Preparatory function 
- Tool movement related functions 
Basic G codes
FANUC INDIA FA & ROBOT 
18 
G94 - Feed per Minute 
Basic G codes
FANUC INDIA FA & ROBOT 
19 
G95 - Feed per revolution 
Basic G codes
FANUC INDIA FA & ROBOT 
20 
Co ordinate value & Dimensioning 
- Absolute G90 & Incremental G91 Programming 
- Inch & Metric Programming – G20 & G21 
- Decimal Point Programming – PRM 3401#0=1 
Basic G codes
FANUC INDIA FA & ROBOT 
21 
Absolute and incremental programming 
Basic G codes
FANUC INDIA FA & ROBOT 
22 
Tool movement in a straight line 
Basic G codes
FANUC INDIA FA & ROBOT 
23 
Tool movement in a circular path 
Basic G codes
FANUC INDIA FA & ROBOT 
24 
Direction of circular interpolation 
Basic G codes
FANUC INDIA FA & ROBOT 
25 
ijk values 
Basic G codes
FANUC INDIA FA & ROBOT 
26 
Basic M codes 
- Miscellaneous function 
- Machine operations related 
functions 
• M01 – Optional stop 
• M02 – Program stop 
• M03 – Spindle on, CW 
• M04 – Spindle on, CCW 
• M05 – Spindle stop 
• M06 – Turret indexing 
• M07 – Coolant on 
• M08 – Coolant on 
• M09 – Coolant off 
• M30 – Program stop and rewind 
Basic M codes
FANUC INDIA FA & ROBOT 
27 
Tool length compensation 
The procedure of mentioning the difference of length of tool assumed during 
programming and actual tool used for machining is called tool length compensation 
1) If the actual tool length is more than the assumed tool, the difference should be 
mentioned as follows 
G43 H01 
H01 – here 01 specifies the address where the difference 
of tool will be mentioned 
2) If the actual tool length is less than the assumed tool, the difference should be 
mentioned as follows 
G44 H01 
H01 – here 01 specifies the address where the difference 
of tool will be mentioned 
Tool length compensation
FANUC INDIA FA & ROBOT 
28 
Tool length compensation 
• G43 - Tool length offset plus 
• G44 - Tool length offset minus 
• G49 - Tool length compensation cancel 
Tool length compensation
FANUC INDIA FA & ROBOT 
29 
Cutter radius compensation 
-When the Endmill cutter of some specified 
diameter is commanded to position at a location, 
actually the centre point of the cutter only 
coincide with the addressed point of the work 
piece. 
- So, t is necessary to shift the cutter for a radius 
amount towards left or right from the position. 
The procedure of shifting the tool of radius 
amount is called as Cutter Radius 
Compensation 
G41 - Cutter radius compensation left 
G42 - Cutter radius compensation right 
G40 - Cutter radius compensation 
cancel 
Cutter radius compensation
FANUC INDIA FA & ROBOT 
30 
Cutter radius compensation 
The type of compensation is selected from 
the starting point as follows 
Type of 
operation 
Direction of 
movement 
Type of 
compensation 
External Clockwise G41 
External Counter 
clockwise 
G42 
Internal Clockwise G42 
Internal Counter 
clockwise 
G41 
Cutter radius compensation
FANUC INDIA FA & ROBOT 
31 
Cutter radius compensation 
Cutter radius compensation
FANUC INDIA FA & ROBOT 
32 
G41 - Cutter radius compensation left 
G41 D07; 
Here, D specifies the address of 
offset at which the radius of tool 
will be mentioned 
Cutter radius compensation
FANUC INDIA FA & ROBOT 
33 
G42 - Cutter radius compensation right 
G41 D07; 
Here, D specifies the 
address of offset at which 
the radius of tool will be 
mentioned 
Cutter radius compensation
FANUC INDIA FA & ROBOT 
34 
Operations performed in machining centre 
Side cutting 
Hole machining 
Face cutting 
Operations in machining centre
FANUC INDIA FA & ROBOT 
35 
G54 
Programming Examples 
SQ 150 
SQ 200 
thickness 
20mm 
1 
3 
4 
2 
Programming Examples
FANUC INDIA FA & ROBOT 
36 
Programming example 
Making 150 mm* 150 mm square 
for a depth of 5mm in a given Billet 
Assumptions 
Work offset = G54 
Tool length compensation = H01 
Point X co ordinate 
value 
Y co ordinate 
value 
1 25 25 
2 25 175 
3 175 175 
4 175 25 
Programming Examples
FANUC INDIA FA & ROBOT 
37 
O1001 ; Program Number 
N1 G21 G94 ; Metric input, Feed in mm/min. 
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position 
N3 T01 M06 ; (Dia. 15 mm End drill) 
N4 G90 G54 G00 X25.0 Y25.0 ; Work offset call 
N5 G43 H01 Z100.0 ; Tool length compensation call 
N6 M03 S1000 Z20 ; Positioning above the starting point and 
spindle starts rotating at 1000 rpm 
N7 G01 Z-5.0 F400 ; The tool is moved inside work of -5.0 mm 
N8 Y175.0 ; The tool is moved to second corner 
N9 X175.0 ; The tool is moved to third corner 
N10 Y25.0 ; The tool is moved to fourth corner 
N11 X25.0 ; The tool is moved back to first corner 
N12 G00 Z100.0 M05 ; The tool is taken out of the work and 
spindle stop 
N13 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position 
N14 M30 ; Program stop snd rewind 
Programming Examples
FANUC INDIA FA & ROBOT 
38 
PROGRAMMING EXAMPLE WITHOUT SUB PROGRAM 
2 
1 
3 4 
5 
6 
8 7 
Blank size: 150mm*150mm*20mm 
Point X Y 
1 0 25 
2 0 50 
3 45 150 
4 105 150 
5 150 50 
6 150 25 
7 125 0 
8 25 0 
G55 
Programming Examples
FANUC INDIA FA & ROBOT 
39 
O1002 ; Program Number 
N1 G21 G94 ; Metric input, Feed in mm/min. 
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position 
N3 T01 M06 ; (Dia. 15 mm End drill) 
N4 G90 G55 G00 X-25.0 Y-25.0 ; Work offset call 
N5 G43 H01 Z100.0 ; Tool length compensation call 
N6 M03 S1000 Z20 ; Positioning above the starting point and 
spindle starts rotating at 1000 rpm 
N7 G01 Z-20.0 F400 ; The tool is moved inside work of -20.0 mm 
N8 G41 G01 X0.0 Y0.0 D01 ; Cutter radius compensation call 
N9 G01 X0.0 Y50.0 ; The tool is moved to point 2 
N10 G01 X45.0 Y150.0 ; The tool is moved to point 3 
N11 G01 X105.0 Y150.0 ; The tool is moved to point 4 
N12 G01 X150.0 Y50.0 ; The tool is moved to point 5 
N13 G01 X150.0 Y25.0 ; The tool is moved to point 6 
Programming Examples
FANUC INDIA FA & ROBOT 
40 
N14 G01 X125.0 Y0.0 ; The tool is moved point 7 
N15 G01 X25.0 Y0.0 ; The tool is moved to point 8 
N16 G01 X0.0 Y25.0 ; The tool is moved to point 1 
N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position 
N18 G00 Z100.0 M05 ; The tool is taken out of the work and 
spindle stop 
N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position 
N20 M30 ; Program stop and rewind 
Programming Examples
FANUC INDIA FA & ROBOT 
41 
PROGRAMMING EXAMPLE WITH SUB PROGRAM 
2 
1 
3 4 
5 
6 
8 7 
Blank size: 150mm*150mm*20mm 
Point X Y 
1 0 25 
2 0 50 
3 45 150 
4 105 150 
5 150 50 
6 150 25 
7 125 0 
8 25 0 
G55 
Programming Examples
FANUC INDIA FA & ROBOT 
42 
O1003 ; Program Number 
N1 G21 G94 ; Metric input, Feed in mm/min. 
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position 
N3 T01 M06 ; (Dia. 15 mm End drill) 
N4 G90 G55 G00 X-25.0 Y-25.0 ; Work offset call 
N5 G43 H01 Z100.0 ; Tool length compensation call 
N6 M03 S1000 Z20 ; Positioning above the starting point and 
spindle starts rotating at 1000 rpm 
N7 G01 Z0.0 F400 ; The tool is moved To Z0.0 
N8 M98 P1500 L10 ; Sub program No.1500 call, L indicates 
No. of times 
N18 G00 Z100.0 M05 ; The tool is taken out of the work and 
spindle stop 
N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position 
N20 M30 ; Program stop snd rewind 
Programming Examples
FANUC INDIA FA & ROBOT 
43 
O 1500 ; Sub program No 
N200 G91 Z-2.0 F400 ; The tool is moved incrementally -2 mm 
N210 G90 G41 G01 X0.0 Y0.0 Cutter Radius comp. (left), 
F400 D01 ; The tool is moved towards work piece 
N220 G01 X0.0 Y50.0 ; The tool is moved to point 2 
N230 G01 X45.0 Y150.0 ; The tool is moved to point 3 
N240 G01 X105.0 Y150.0 ; The tool is moved to point 4 
N250 G01 X150.0 Y50.0 ; The tool is moved to point 5 
N260 G01 X150.0 Y25.0 ; The tool is moved point 6 
N270 G01 X125.0 Y0.0 ; The tool is moved to point 7 
N280 G01 X25.0 Y0.0 ; The tool is moved to point 8 
N290 G01 X0.0 Y25.0 ; The tool is moved to point 1 
N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position 
N310 M99 ; Sub program end 
Programming Examples
FANUC INDIA FA & ROBOT 
44 
PROGRAMMING EXAMPLE WITH SUB PROGRAM 
2 3 4 5 
1 
R25 
8 7 6 
Blank size: 200mm*200mm*20mm 
Point X Y 
1 0 0 
2 0 200 
3 75 200 
4 125 200 
5 200 200 
6 200 0 
7 125 0 
8 75 0 
G57 
R25 
Programming Examples
FANUC INDIA FA & ROBOT 
45 
O1004 ; Program Number 
N1 G21 G94 ; Metric input, Feed in mm/min. 
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position 
N3 T01 M06 ; (Dia. 15 mm End drill) 
N4 G90 G57 G00 X-25.0 Y-25.0 ; Work offset call 
N5 G43 H01 Z100.0 ; Tool length compensation call 
N6 M03 S1000 Z20 ; Positioning above the starting point and 
spindle starts rotating at 1000 rpm 
N7 G01 Z0.0 F400 ; The tool is moved To Z0.0 
N8 M98 P1501 L10 ; Sub program No.1500 call, L indicates 
No. of times 
N18 G00 Z100.0 M05 ; The tool is taken out of the work and 
spindle stop 
N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position 
N20 M30 ; Program stop snd rewind 
Programming Examples
FANUC INDIA FA & ROBOT 
46 
O 1501 ; Sub program No 
N200 G91 Z-2.0 F400 ; The tool is moved incrementally -2 mm 
N210 G90 G41 G01 X0.0 Y0.0 Cutter Radius comp. (left), 
F400 D01 ; The tool is moved towards work piece 
N220 G01 X0 Y200.0 ; The tool is moved to point 2 
N230 G01 X75.0 Y200.0 ; The tool is moved to point 3 
N240 G03 X125.0 Y200.0 R25.0 ; The tool is moved to point 4 with CIP-CCW 
N250 G01 X200.0 Y200.0 ; The tool is moved to point 5 
N260 G01 X200.0 Y0 ; The tool is moved point 6 
N270 G01 X125.0 Y0 ; The tool is moved to point 7 
N280 G03 X75.0 Y0 R25.0 ; The tool is moved to point 8 with CIP CCW 
N290 G01 X0 Y0 ; The tool is moved to point 1 
N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position 
N310 M99 ; Sub program end 
Programming Examples
FANUC INDIA FA & ROBOT 
47 
Canned cycles - Drilling 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
48 
G81 SPOT DRILLING CYCLE 
STEP Description of the cycle 
1 Rapid motion to hole position 
2 Rapid motion to safety 
level/reference level 
3 Feed rate motion to Z depth 
4 Rapid retract to 
initial/reference level 
FORMAT AND EXPLANATION 
G81 X…. Y…. R…. Z…. F…. 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
F = Federate specification 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
49 
Programming Example 
BLANK SIZE 
100*100*20 
DIA. 8, FIVE HOLES 
HOLE1 (20,20) 
HOLE2 (20,80) 
HOLE3 (80,80) 
HOLE4 (80,20) 
HOLE5 (50,50) 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
50 
PROGRAMMING EXAMPLE 
O1005 
N1 G91 G28 X0 Y0 Z0 
N2 T01 M06 
N3 G21 
N4 G17 G90 G54 G00 X20 Y20 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G81 Z-4. R5 F300 
N8 X80 
N9 Y80 
N10 X20N11 X50 Y50 
N12 G80 G00 Z100 
N13 G91 G28 X0 Y0 Z0 
N14 M05 
N15 M30 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
51 
G82 COUNTER BORING CYCLE 
STEP Description of the cycle 
1 Rapid motion to hole position 
2 Rapid motion to safety level/reference level 
3 Feed rate motion to Z depth 
4 Dwell at the depth in millisecond 
5 Rapid retract to initial/reference level 
Format and explanation 
G82 X…. Y…. R…. Z…. P….F…. 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
P = Dwell time in milliseconds 
F = Federate specification 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
52 
PROGRAMMING EXAMPLE 
BLANK SIZE 
100*100*20 
DIA. 8, FIVE HOLES 
HOLE1 (20,20) 
HOLE2 (20,80) 
HOLE3 (80,80) 
HOLE4 (80,20) 
HOLE5 (50,50) 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
53 
O1006 
N1 G91 G28 X0 Y0 Z0 
N2 T02 M06 
N3 G21 
N4 G17 G90 G54 G00 X20 Y20 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G82 Z-15. R5 P2000 F300 
N8 X80 
N9 Y80 
N10 X20 
N11 X50 Y50 
N12 G80 G00 Z100 M05 
N13 G91 G28 X0 Y0 Z0 
N14 M30 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
54 
DEEP HOLE DRILLING HIGH SPEED DEEP HOLE CYCLE 
STEP Description of the cycle STEP Description of the cycle 
1 Rapid motion to hole position 1 Rapid motion to hole position 
2 Rapid motion to safety 
level/reference level 
2 Rapid motion to safety 
level/reference level 
3 Feed rate motion to Z depth by 
the amount of specified depth 
3 Feed rate motion to Z depth by the 
amount of specified depth 
4 Rapid retract to safety level/R 
level 
4 Rapid retract by a clearance value 
(clearance value is set by a system 
parameter) 
5 Rapid motion to the previous 
depth less a clearance 
(clearance is set by a system 
parameter) 
5 Feed rate motion in Z axis by the 
distance specified plus clearance 
6 Steps 3,4, and 5 repeat until the 
programmed Z depth is reached 
6 Steps 4 and 5 repeat until the 
programmed Z depth is reached 
7 Rapid retract to safety/R level 7 Rapid retract to safety/R level 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
55 
FORMAT AND EXPLANATION 
G73 X…. Y…. R…. Z…. Q….F…. G83 X…. Y…. R…. Z…. Q….F…. 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
Q = Pecking depth (Micron) 
F = Federate specification 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
Q = Pecking depth (Micron) 
F = Federate specification 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
56 
WHEN TO USE DEEP HOLE DRILLING CYCLE (G83) 
For deep hole drilling, also known as peck drilling, where the drill has to be 
retracted above the part (to a clearance position) after drilling to a certain depth. 
WHEN TO USE HIGH SPEED DEEP HOLE DRILLING CYCLE(G73) 
For deep hole drilling, also known as peck drilling, where the chip breaking is ore 
important than the full retract of the drill from the holes. This type often used for a 
long series drills, when a full retract is not very important. 
Programming Example 
BLANK SIZE 
100*100*20 
DIA. 8, FIVE HOLES 
HOLE1 (20,20) 
HOLE2 (20,80) 
HOLE3 (80,80) 
HOLE4 (80,20) 
HOLE5 (50,50) 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
57 
O1007 
N1 G91 G28 X0 Y0 Z0 
N2 T03 M06 
N3 G21 
N4 G17 G90 G54 G00 X20 Y20 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G83 Z-30. R5 Q8000 F300 or G73 Z-30 R5 Q8000 F300 
N8 X80 
N9 Y80 
N10 X20 
N11 X50 Y50 
N12 G80 G00 Z100 M05 
N14 G91 G28 X0 Y0 Z0 
N15 M30 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
58 
TAPPING CYCLE - STANDARD TAPPING CYCLE - REVERSE 
STEP Description of the Cycle STEP Description of the cycle 
1 Rapid motion to hole position 1 Rapid motion to hole position 
2 Rapid motion to safety 
level/reference level 
2 Rapid motion to safety 
level/reference level 
3 Feed rate motion to Z depth 3 Feed rate motion to Z depth 
4 Spindle rotation stop 4 Spindle rotation stop 
5 Spindle reverse rotation (M04) 
and feed rate back to safety/R 
level 
5 Spindle reverse rotation (M04) 
and feed rate back to safety/R 
level 
6 Spindle rotation stop 6 Spindle rotation stop 
7 Spindle rotation normal 7 Spindle rotation normal 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
59 
FORMAT AND EXPLANATION 
G84 X…. Y…. R…. Z….R… F…. G74 X…. Y…. R…. Z…R….. F…. 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
F = Federate specification 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
F = Federate specification 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
60 
The important notes for the tapping operation 
• Safety/reference level should be higher in the tapping cycle than in the other cycles to 
follow for the stabilization of the feed rate, due to acceleration 
• Feed rate section for the tap is very important. In tapping, there is a direct relationship 
between the spindle speed and the lead of the tap. This relationship must be maintained at 
all the times. 
• The override switches on the control panel used for spindle speed and feed rate, are 
ineffective during these cycles. 
• Tapping motion (in or out of the part) will be completed even if the feed hold key is 
pressed during tapping cycle processing for safety reasons. 
PROGRAMMING EXAMPLE 
BLANK SIZE 
100*100*20 
DIA. 8, FIVE HOLES 
HOLE1 (20,20) 
HOLE2 (20,80) 
HOLE3 (80,80) 
HOLE4 (80,20) 
HOLE5 (50,50) 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
61 
O1008 
N1 G91 G28 X0 Y0 Z0 
N2 T03 M06 
N3 G21 
N4 G17 G90 G54 G00 X20 Y20 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G84 Z-15. R5 F300 or G74 Z-30 R5 F300 (Feed = RPM * Pitch) 
N8 X80 
N9 Y80 
N10 X20 
N11 X50 Y50 
N12 G80 G00 Z100 M05 
N13 G91 G28 X0 Y0 Z0 
N14 M30 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
G85 X…. Y…. R…. Z…. F…. 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
F = Feed rate specification 
62 
G85 BORING CYCLE 
STEP Description of the cycle 
1 Rapid motion to hole position 
2 Rapid motion to 
safety level/reference level 
3 Feed rate motion to Z depth 
4 Feed rate motion back to safety/R level 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
63 
This cycle is typically used for boring and reaming operations. 
This cycle is used in cases where the tool motion into and out of 
holes should improve the hole surface finish, its dimensional 
tolerances and/or its concentricity, roundness, etc. 
DIMNSION OF 
BLANK 
100*100*20 
HOLE DIA. 10 mm 
HOLE (50,50) 
WHEN TO USE THIS CYCLE 
PROGRAMMING EXAMPLE 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
64 
PROGRAMMING EXAMPLE 
O1009 
N1 G91 G28 X0 Y0 Z0 
N2 T01 M06 
N3 G21 
N4 G17 G90 G54 G00 X50 Y50 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G85 Z-20. R5 F300 
N8 G80 G00Z100 M05 
N9 G91 G28 X0 Y0 Z0 
N10 M30 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
65 
PRECISION BORING CYCLE (G76) 
STEP Description of the cycle 
1 Rapid motion to hole position 
2 Rapid motion to 
safety level/reference level 
3 Feed rate motion to Z depth 
4 Spindle rotation stop 
5 Shifting in programmed direction 
6 Rapid retract to reference level 
ROUGH BORING CYCLE (G86) 
STEP Description of the cycle 
1 Rapid motion to hole position 
2 Rapid motion to 
safety level/reference level 
3 Feed rate motion to Z depth 
4 Spindle rotation stop 
5 Rapid retract to reference level 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
66 
Format and Explanation 
G86 X…. Y…. R…. Z…Q... F (rough) 
G76 X…. Y…. R…. Z…I…J... F ….(fine) 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
F = Federate specification 
Q = amount of shift for boring 
I, J = amount of shift
FANUC INDIA FA & ROBOT 
67 
O1009 
N1 G91 G28 X0 Y0 Z0 
N2 T01 M06 
N3 G21 
N4 G17 G90 G54 G00 X50 Y50 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G86 Z-20. R5 F300 
N8 G80 Z100 
N9 G91 G28 X0 Y0 Z0 
N10 M05 
N11 M30 
Canned cycles - Drilling 
DIMNSION OF 
BLANK 100*100*20 
HOLE (50,50) 
PROGRAMMING EXAMPLE
FANUC INDIA FA & ROBOT 
68 
BORING CYCLE (G88) 
STEP Description of the cycle 
1 Rapid motion to XY position 
2 Rapid motion to safety level/reference level 
3 Feed rate motion to Z depth 
4 Dwell at the depth in milliseconds 
5 Spindle rotation stops (feed hold condition is generated and the CNC operator 
switches to manual operation mode and perform a manual task, then switches back to 
memory mode) 
6 Rapid retract to safety/reference level 
7 Spindle rotation on 
G88 X…. Y…. R…. Z….P… F…. 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. point) 
Z = Final depth (abs.) 
P = Dwell time in milliseconds 
F = Federate specification 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
69 
WHEN TO USE THIS CYCLE 
This cycle is rare. Its use is limited to boring operations with special tools that require 
manual interference at the bottom of a hole. This cycle may be used by some tool 
manufacturers for certain operations. 
PROGRAMMING EXAMPLE 
Canned cycles - Drilling 
DIMNSION OF 
BLANK 
100*100*20 
HOLE (50,50)
FANUC INDIA FA & ROBOT 
70 
O1010 
N1 G91 G28 X0 Y0 Z0 
N2 T01 M06 
N3 G21 
N4 G17 G90 G54 G00 X50 Y50 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G88 Z-20. R5 P2000 F300 
N8 G80 G00 Z100 M05 
N9 G91 G28 X0 Y0 Z0 
N10 M30 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
71 
BORING (REAMING) CYCLE (G89) 
STEP Description of the cycle 
1 Rapid motion to XY position 
2 Rapid motion to safety level/reference 
level 
3 Feed rate motion to Z depth 
4 Dwell at the depth 
5 Feed rate motion back to safety/R level 
G89 X…. Y…. R…. Z…. P…F…. 
X = Hole position in X axis 
Y = Hole position in Y axis 
R = Reference position (Z axis st. 
point) 
Z = Final depth (abs.) 
P = dwell time in milliseconds 
F = Federate specification 
Canned cycles - Drilling
FANUC INDIA FA & ROBOT 
72 
WHEN TO USE THIS CYCLE 
For boring operations, when the feed rate is required for the in and out directions 
of the machined hole, with a specified dwell at the bottom. The dwell is the only 
value that distinguishes this cycle from the cycle85/G85. 
PROGRAMMING EXAMPLE 
Canned cycles - Drilling 
DIMNSIONS OF BLANK 
100*100*20 
HOLE DIA. 10 mm 
HOLE (50,50)
FANUC INDIA FA & ROBOT 
73 
O1011 
N1 G91 G28 X0 Y0 Z0 
N2 T01 M06 
N3 G21 
N4 G17 G90 G54 G00 X50 Y50 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G85 Z-20. R5 P2000 F300 
N8 G80 G00 Z100 M05 
N9 G91 G28 X0 Y0 Z0 
N10 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
74 
PATTERN OF HOLES 
RANDOM HOLE PATTERN 
BLANK SIZE = 
100*100*20 
DIA. 8, FIVE HOLES 
HOLE1 (28,16) 
HOLE2 (60,32) 
HOLE3 (88,40) 
HOLE4 (104,48) 
Pattern of holes
FANUC INDIA FA & ROBOT 
75 
O1012 
N1 G91 G28 X0 Y0 Z0 
N2 T01 M06 
N3 G21 
N4 G17 G90 G54 G00 X28 Y16 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G83 Z-30. R5 Q8000 F300 
N8 X60 Y32 
N9 X88 Y40 
N10 X104 Y 48 
N11 G80 G00 Z100 M05 
N13 G91 G28 X0 Y0 Z0 
N14 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
76 
STRAIGHT ROW HOLE PATTERN 
First hole dimension 
from ref. = (15,10) 
distance between 
holes = 20, 
diameter of 
holes = 10 mm 
O1013 
N1G21 G94 
N2 G91 G28 X0 Y0 Z0 
N3 T01 M06 
N4 G17 G90 G54 G00 X15 Y10 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G83 Z-30. R5 Q8000 F300 
N8 G91 X20.0 K5 
N9 G80 G00 Z100 M05 
N10 G28 X0 Y0 Z0 
N11 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
77 
O1014 
N1 G91 G28 X0 Y0 Z0 
N2 T01 M06 
N3 G21 
N4 G17 G90 G54 G00 X15 Y10 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G83 Z-30. R5 Q8000 F300 
N8 G91 X20.0 K5 
N9 G80 G00 Z100 M05 
N10 G28 X0 Y0 Z0 
N11 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
78 
PATTERN OF HOLES IN AN INCLINED LINE 
ANGLE OF THE INCLINED LINE WITH X AXIS = 15 
DISTANCE BETWEEN HOLES = 40 
FIRST HOLE DIMENSION IS (20,20) 
DIAMETER OF HOLES = 10 mm 
The following calculation is required in FANUC to find distance between 
holes in X axis and in Y axis. 
X = 40 * cos15 = 38.63703305 
Y = 40 * sin15 = 10.3527618 
Pattern of holes
FANUC INDIA FA & ROBOT 
79 
O1015 
N1 G21 G94 
N2 G91 G28 X0 Y0 Z0 
N3 T01 M06 
N4 G17 G90 G54 G00 X20 Y20 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G83 Z-30. R5 Q8000 F300 
N8 G91 X38.6370 Y10.3527 K5 
N9 G80 G00 Z100 M05 
N10 G28 X0 Y0 Z0 
N11 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
80 
PROGRAMMING EXAMPLE 
RECTANGULAR GRID PATTERN 
DISTANCE OF FIRST HOLE 
FROM REFERENCE = (20,30) 
DISTANCE BETWEEN COLUMNS = 25 
DISTANCE BETWEEN ROWS = 20 
DIAMETER OF HOLES = 10 mm 
O1016 
N1 G21 G94 
N2 G91 G28 X0 Y0 Z0 
N3 T01 M06 
N4 G17 G90 G54 G00 X20 Y30 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
Pattern of holes
FANUC INDIA FA & ROBOT 
81 
N7 G99 G83 Z-30. R5 Q8000 F300 
N8 G91 Y20 K6 
N9 X25 
N10 Y-20 K6 
N11 X25 
N12 Y20 K6 
N13 X25 
N14 Y-20 K6 
N15 X25 
N16 Y20 K6 
N17 G80 G00 Z100 M05 
N18 G28 X0 Y0 Z0 
N30 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
82 
CIRCLE OF HOLES PATTERN 
Distance of reference point in X axis from the WCS = 75 
Distance of reference point in Y axis from the WCS = 60 
Starting angle of the first hole from X axis = 30 deg. 
Indexing angle between holes = 60, Number of holes = 6 
Radius of the circle = 50mm, Diameter of holes = 8mm 
1 
2 
3 
4 
5 
6 
Pattern of holes
FANUC INDIA FA & ROBOT 
83 
Hole # 1 
X = 75 + 50 * cos30 = 118.30127 
Y = 60 + 50 * sin30 = 85.0 
Hole # 2 
X = 75 + 50 * cos90 = 75.0 
Y = 60 + 50 * sin90 = 110.0 
Hole # 3 
X = 75 + 50 * cos150 = 31.6987298 
Y = 60 + 50 * sin150 = 85.0 
Hole # 4 
X = 75 + 50 * cos210 = 31.6987298 
Y = 60 + 50* sin210 = 35.0 
Hole # 5 
X = 75 + 50 * cos270 = 75.0 
Y = 60 + 50 * sin270 = 100.0 
Hole # 6 
X = 75 + 50 * cos330 = 118.30127 
Y = 60 + 50* sin330 = 35.0 
Pattern of holes
FANUC INDIA FA & ROBOT 
84 
O1017 
N1 G91 G28 X0 Y0 Z0 
N2 T03 M06 
N3 G21 
N4 G17 G90 G54 G00 X118.3012 Y85.0 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G99 G83 Z-30. R5 Q8000 F300 
N8 X75.0 Y110.0 
N9 X31.6987 Y85.0 
N10 X31.6987 Y35.0 
N11 X75.0 Y10 
N12 X118.301 Y35.0 
N13 G80 G00 Z100 M05 
N14 G91 G28 X0 Y0 Z0 
N15 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
85 
CIRCLES OF HOLES USING POLAR SYSTEM 
Distance of reference point in X axis from the WCS = 75 
Distance of reference point in Y axis from the WCS = 60 
Starting angle of the first hole from X axis = 30 deg. 
Indexing angle between holes = 60, Number of holes = 6 
Radius of the circle = 50mm, Diameter of holes = 8mm 
1 
2 
3 
4 
5 
6 
Pattern of holes
FANUC INDIA FA & ROBOT 
86 
O1018 
N1 G91 G28 X0 Y0 Z0 
N2 T03 M06 
N3 G21 
N4 G17 G90 G54 G00 X75.0 Y60.0 
N5 G43 H01 Z100 
N6 M03 S1000 Z20 
N7 G16; POLAR SYSTEM ON 
N8 G99 G83 X50 Y30 Z-30. R5 Q8000 F300 
N9 X50 Y90 
N10 X50 Y150 
N11 X50 Y210 
N12 X50 Y270 
N13 X50 Y330 
N14 G15 ; POLAR SYSTEM OFF 
N15 G80 G00 Z100 M05 
N16 G91 G28 X0 Y0 Z0 
N17 M30 
Pattern of holes
FANUC INDIA FA & ROBOT 
87 
CUSTOM MACRO PROGRAMMING 
Custom Macro programming
FANUC INDIA FA & ROBOT 
Custom Macro 
• Part Program prepared using variables 
• Arithmetic operations possible 
• Conditional statements like GOTO , DO WHILE are used 
• For developing user defined cycles 
• Can be easily called from user program 
Custom Macro programming
FANUC INDIA FA & ROBOT 
89 
Macro call 
Custom Macro programming
FANUC INDIA FA & ROBOT 
Simple Macro Call 
Custom Macro programming
FANUC INDIA FA & ROBOT 
Custom Macro programming 91
FANUC INDIA FA & ROBOT 
Custom Macro programming 92
FANUC INDIA FA & ROBOT 
Custom Macro programming 93
FANUC INDIA FA & ROBOT 
Model Macro Call- G66 
• Once G66 is issued to specify a modal call a macro is 
called after a block specifying movement along axes is 
executed. This continues until G67 is issued to cancel a 
modal call. 
Custom Macro programming
FANUC INDIA FA & ROBOT 
95 
G66 
Custom Macro programming

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Cnc turning(Fanuc system)
Cnc turning(Fanuc system)Cnc turning(Fanuc system)
Cnc turning(Fanuc system)
 
CNC PROGRAMMING FOR BEGAINER Part 1
CNC PROGRAMMING FOR BEGAINER Part 1CNC PROGRAMMING FOR BEGAINER Part 1
CNC PROGRAMMING FOR BEGAINER Part 1
 
CNC Milling
CNC MillingCNC Milling
CNC Milling
 
CNC Programming
CNC Programming CNC Programming
CNC Programming
 
Cnc drilling
Cnc drillingCnc drilling
Cnc drilling
 
Turning
TurningTurning
Turning
 
CNC
CNCCNC
CNC
 
Cnc Programming Basics
Cnc Programming BasicsCnc Programming Basics
Cnc Programming Basics
 
CNC Lathe Operating & Programming
CNC Lathe Operating & ProgrammingCNC Lathe Operating & Programming
CNC Lathe Operating & Programming
 
CNC Turning.ppt
CNC Turning.pptCNC Turning.ppt
CNC Turning.ppt
 
CNC MILLING
CNC MILLINGCNC MILLING
CNC MILLING
 
CNC MACHINE
CNC MACHINECNC MACHINE
CNC MACHINE
 
Manufacturing Technology-II Unit 5
Manufacturing Technology-II Unit 5Manufacturing Technology-II Unit 5
Manufacturing Technology-II Unit 5
 
Cnc milling
Cnc millingCnc milling
Cnc milling
 
CNC machining center and CNC controllers
CNC machining center and CNC controllersCNC machining center and CNC controllers
CNC machining center and CNC controllers
 
CNC Programmingmodifies examination 1
CNC Programmingmodifies examination 1CNC Programmingmodifies examination 1
CNC Programmingmodifies examination 1
 
cnc machining
cnc machiningcnc machining
cnc machining
 
Fanuc ot g code training manual
Fanuc ot g code training manualFanuc ot g code training manual
Fanuc ot g code training manual
 
4 tooling in cnc
4 tooling in cnc4 tooling in cnc
4 tooling in cnc
 
Cnc ppt by APC Sir
Cnc ppt by APC SirCnc ppt by APC Sir
Cnc ppt by APC Sir
 

Destacado

CNC Machines
CNC MachinesCNC Machines
CNC Machinespratik207
 
Introduction to cnc machines (1)
Introduction to cnc machines (1)Introduction to cnc machines (1)
Introduction to cnc machines (1)someshking
 
Robot programming
Robot programmingRobot programming
Robot programmingGopal Saini
 
line following robot
line following robotline following robot
line following robotRehnaz Razvi
 
Introductionto robotics a
Introductionto robotics aIntroductionto robotics a
Introductionto robotics aIftekhar Ali
 
Wireless Pick and Place Surveillance Robot
Wireless Pick and Place Surveillance RobotWireless Pick and Place Surveillance Robot
Wireless Pick and Place Surveillance RobotZeenat Saba Khan
 
Obstacle avoidance robot
Obstacle avoidance robotObstacle avoidance robot
Obstacle avoidance robotRahuldey1991
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Muhammad Ahkam Khan
 
O que é Human robot interaction (HRI)
O que é Human robot interaction (HRI)O que é Human robot interaction (HRI)
O que é Human robot interaction (HRI)Golem Company
 
Projeto Final de Computação Gráfica 2012 - FCT/UNESP
Projeto Final de Computação Gráfica 2012 - FCT/UNESPProjeto Final de Computação Gráfica 2012 - FCT/UNESP
Projeto Final de Computação Gráfica 2012 - FCT/UNESPErick Santos
 
Robot Lego programado em Java
Robot Lego programado em JavaRobot Lego programado em Java
Robot Lego programado em JavaJoao Alves
 
Receitas Robot De Cozinha N 16
Receitas Robot De Cozinha N  16Receitas Robot De Cozinha N  16
Receitas Robot De Cozinha N 16penacozinha
 
Receitas Robot De Cozinha N 15
Receitas Robot De Cozinha N  15Receitas Robot De Cozinha N  15
Receitas Robot De Cozinha N 15penacozinha
 
Receitas Robot De Cozinha N 21
Receitas Robot De Cozinha N  21Receitas Robot De Cozinha N  21
Receitas Robot De Cozinha N 21penacozinha
 
Tipos de Trayectorias en Robotica
Tipos de Trayectorias en RoboticaTipos de Trayectorias en Robotica
Tipos de Trayectorias en RoboticaUTM
 
Rational Robot (http://www.geektester.blogspot.com)
Rational Robot (http://www.geektester.blogspot.com)Rational Robot (http://www.geektester.blogspot.com)
Rational Robot (http://www.geektester.blogspot.com)raj.kamal13
 

Destacado (20)

CNC Machines
CNC MachinesCNC Machines
CNC Machines
 
part programming (cnc)
part programming (cnc)part programming (cnc)
part programming (cnc)
 
CNC Seminar
CNC SeminarCNC Seminar
CNC Seminar
 
Introduction to cnc machines (1)
Introduction to cnc machines (1)Introduction to cnc machines (1)
Introduction to cnc machines (1)
 
Robot programming
Robot programmingRobot programming
Robot programming
 
line following robot
line following robotline following robot
line following robot
 
Introductionto robotics a
Introductionto robotics aIntroductionto robotics a
Introductionto robotics a
 
Wireless Pick and Place Surveillance Robot
Wireless Pick and Place Surveillance RobotWireless Pick and Place Surveillance Robot
Wireless Pick and Place Surveillance Robot
 
Obstacle avoidance robot
Obstacle avoidance robotObstacle avoidance robot
Obstacle avoidance robot
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)
 
Robotics.Ppt
Robotics.PptRobotics.Ppt
Robotics.Ppt
 
Cnc Milling
Cnc MillingCnc Milling
Cnc Milling
 
O que é Human robot interaction (HRI)
O que é Human robot interaction (HRI)O que é Human robot interaction (HRI)
O que é Human robot interaction (HRI)
 
Projeto Final de Computação Gráfica 2012 - FCT/UNESP
Projeto Final de Computação Gráfica 2012 - FCT/UNESPProjeto Final de Computação Gráfica 2012 - FCT/UNESP
Projeto Final de Computação Gráfica 2012 - FCT/UNESP
 
Robot Lego programado em Java
Robot Lego programado em JavaRobot Lego programado em Java
Robot Lego programado em Java
 
Receitas Robot De Cozinha N 16
Receitas Robot De Cozinha N  16Receitas Robot De Cozinha N  16
Receitas Robot De Cozinha N 16
 
Receitas Robot De Cozinha N 15
Receitas Robot De Cozinha N  15Receitas Robot De Cozinha N  15
Receitas Robot De Cozinha N 15
 
Receitas Robot De Cozinha N 21
Receitas Robot De Cozinha N  21Receitas Robot De Cozinha N  21
Receitas Robot De Cozinha N 21
 
Tipos de Trayectorias en Robotica
Tipos de Trayectorias en RoboticaTipos de Trayectorias en Robotica
Tipos de Trayectorias en Robotica
 
Rational Robot (http://www.geektester.blogspot.com)
Rational Robot (http://www.geektester.blogspot.com)Rational Robot (http://www.geektester.blogspot.com)
Rational Robot (http://www.geektester.blogspot.com)
 

Similar a 4 basic cnc programming milling

CNC PART PROGRAMMING.pptx
CNC PART PROGRAMMING.pptxCNC PART PROGRAMMING.pptx
CNC PART PROGRAMMING.pptxAtharvaJagtap15
 
Computer integrated Manufacture & design Lab Manual
Computer integrated Manufacture & design Lab  ManualComputer integrated Manufacture & design Lab  Manual
Computer integrated Manufacture & design Lab ManualSpikeAerotek
 
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptxCAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptxsahils237192101
 
Codigos de-programacion cnc
Codigos de-programacion cncCodigos de-programacion cnc
Codigos de-programacion cnclmelmelme
 
internship presentation.pptx
internship presentation.pptxinternship presentation.pptx
internship presentation.pptxChinmaiKumar
 
CNC part programming
CNC part programmingCNC part programming
CNC part programmingjntuhcej
 
Chapter 4 cnc part programming
Chapter 4 cnc part programmingChapter 4 cnc part programming
Chapter 4 cnc part programmingRAHUL THAKER
 
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASH
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASHCNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASH
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASHVed Prakash
 
introduction to cnc machines
 introduction to cnc machines introduction to cnc machines
introduction to cnc machinesSTAY CURIOUS
 

Similar a 4 basic cnc programming milling (20)

CNC.ppt
CNC.pptCNC.ppt
CNC.ppt
 
CNC PART PROGRAMMING.pptx
CNC PART PROGRAMMING.pptxCNC PART PROGRAMMING.pptx
CNC PART PROGRAMMING.pptx
 
Computer integrated Manufacture & design Lab Manual
Computer integrated Manufacture & design Lab  ManualComputer integrated Manufacture & design Lab  Manual
Computer integrated Manufacture & design Lab Manual
 
Lecture 25.pdf
Lecture 25.pdfLecture 25.pdf
Lecture 25.pdf
 
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptxCAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
 
Cnc programming
Cnc programmingCnc programming
Cnc programming
 
Cncprogramming
CncprogrammingCncprogramming
Cncprogramming
 
Cnc programming
Cnc programmingCnc programming
Cnc programming
 
Codigos de-programacion cnc
Codigos de-programacion cncCodigos de-programacion cnc
Codigos de-programacion cnc
 
internship presentation.pptx
internship presentation.pptxinternship presentation.pptx
internship presentation.pptx
 
CNC part programming
CNC part programmingCNC part programming
CNC part programming
 
Chapter 4 cnc part programming
Chapter 4 cnc part programmingChapter 4 cnc part programming
Chapter 4 cnc part programming
 
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASH
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASHCNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASH
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASH
 
CNC1.ppt
CNC1.pptCNC1.ppt
CNC1.ppt
 
CNC1.ppt
CNC1.pptCNC1.ppt
CNC1.ppt
 
CNC1 (1).ppt
CNC1 (1).pptCNC1 (1).ppt
CNC1 (1).ppt
 
CNC Training.ppt
CNC Training.pptCNC Training.ppt
CNC Training.ppt
 
Cnc1
Cnc1Cnc1
Cnc1
 
introduction to cnc machines
 introduction to cnc machines introduction to cnc machines
introduction to cnc machines
 
cadcampart11.ppt
cadcampart11.pptcadcampart11.ppt
cadcampart11.ppt
 

Último

An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 

Último (20)

An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 

4 basic cnc programming milling

  • 1. FANUC INDIA FA & ROBOT 1 BASIC PROGRAMMING OF CNC MILLING MACHINE
  • 2. FANUC INDIA FA & ROBOT 2 Course contents Page No. General coordinate System 04 Designation of machine axes 05 Machine coordinate system 06 Work coordinate system 07 Work datum setting procedure 09 Work coordinate system – Selection 11 Structure of program 13 Course contents
  • 3. FANUC INDIA FA & ROBOT Course contents Page No. Basic G codes 17 Basic M codes 26 Tool length compensation 27 Cutter radius compensation 29 Programming Examples 35 Canned cycles – Drilling 47 Pattern of holes 74 Custom macro programming 87
  • 4. FANUC INDIA FA & ROBOT 4 General Co-ordinate system General coordinate system
  • 5. FANUC INDIA FA & ROBOT 5 Designation of machine axis Designation of machine axis
  • 6. FANUC INDIA FA & ROBOT 6 Machine coordinate system • The point that is specific to machine and serves as the reference of the machine is referred to as the machine zero point • Machine tool builder sets a machine zero point for each machine Machine coordinate system
  • 7. FANUC INDIA FA & ROBOT 7 Work co- ordinate system A coordinate system used for machining a workpiece is referred to as a workpiece coordinate system A workpiece co-ordinate system is also called as work reference zero or work datum The work datum will be set by the user before the machining process begins Work coordinate system
  • 8. FANUC INDIA FA & ROBOT 8 Work co- ordinate system A coordinate system used for machining a workpiece is referred to as a workpiece coordinate system A workpiece co-ordinate system is also called as work reference zero or work datum The work datum will be set by the user before the machining process begins Work coordinate system
  • 9. FANUC INDIA FA & ROBOT 9 Work datum setting procedure Move the work table and spindle head to the reference position Attach a dial gauge or fix the reference tool in the spindle Bring the tool towards the work piece in rapid mode or manually and make the tool to touch on the surface of the workpiece and note the Z axis reading. Then add the tool length with the same sign to get the Z co ordinate value and note down this value WCS MCS Work datum setting procedure
  • 10. FANUC INDIA FA & ROBOT 10 Work datum setting procedure cont., Then move the tool to any one edge and make the tool to touch the edge and note down the readings of X and Y axes.ADD /subtract the radius of the tool from the readings The readings will be the distance between the machine zero and work zero point Record noted X, Y, Z values in any one of the work coordinate G codes (G54 to G59) Work datum setting procedure
  • 11. FANUC INDIA FA & ROBOT 11 Work piece coordinate system - selection G54 Workpiece coordinate system 1 G55 Workpiece coordinate system 2 G56 Workpiece coordinate system 3 G57 Workpiece coordinate system 4 G58 Workpiece coordinate system 5 G59 Workpiece coordinate system 6 Work piece coordinate system selection
  • 12. FANUC INDIA FA & ROBOT 12 Work piece coordinate system Selection Work piece coordinate system selection
  • 13. FANUC INDIA FA & ROBOT 13 Structure of Program Structure of Program
  • 14. FANUC INDIA FA & ROBOT Structure of Program 14
  • 15. FANUC INDIA FA & ROBOT Structure of Program 15
  • 16. FANUC INDIA FA & ROBOT 16 Block Structure of Program
  • 17. FANUC INDIA FA & ROBOT 17 Basic G codes - Preparatory function - Tool movement related functions Basic G codes
  • 18. FANUC INDIA FA & ROBOT 18 G94 - Feed per Minute Basic G codes
  • 19. FANUC INDIA FA & ROBOT 19 G95 - Feed per revolution Basic G codes
  • 20. FANUC INDIA FA & ROBOT 20 Co ordinate value & Dimensioning - Absolute G90 & Incremental G91 Programming - Inch & Metric Programming – G20 & G21 - Decimal Point Programming – PRM 3401#0=1 Basic G codes
  • 21. FANUC INDIA FA & ROBOT 21 Absolute and incremental programming Basic G codes
  • 22. FANUC INDIA FA & ROBOT 22 Tool movement in a straight line Basic G codes
  • 23. FANUC INDIA FA & ROBOT 23 Tool movement in a circular path Basic G codes
  • 24. FANUC INDIA FA & ROBOT 24 Direction of circular interpolation Basic G codes
  • 25. FANUC INDIA FA & ROBOT 25 ijk values Basic G codes
  • 26. FANUC INDIA FA & ROBOT 26 Basic M codes - Miscellaneous function - Machine operations related functions • M01 – Optional stop • M02 – Program stop • M03 – Spindle on, CW • M04 – Spindle on, CCW • M05 – Spindle stop • M06 – Turret indexing • M07 – Coolant on • M08 – Coolant on • M09 – Coolant off • M30 – Program stop and rewind Basic M codes
  • 27. FANUC INDIA FA & ROBOT 27 Tool length compensation The procedure of mentioning the difference of length of tool assumed during programming and actual tool used for machining is called tool length compensation 1) If the actual tool length is more than the assumed tool, the difference should be mentioned as follows G43 H01 H01 – here 01 specifies the address where the difference of tool will be mentioned 2) If the actual tool length is less than the assumed tool, the difference should be mentioned as follows G44 H01 H01 – here 01 specifies the address where the difference of tool will be mentioned Tool length compensation
  • 28. FANUC INDIA FA & ROBOT 28 Tool length compensation • G43 - Tool length offset plus • G44 - Tool length offset minus • G49 - Tool length compensation cancel Tool length compensation
  • 29. FANUC INDIA FA & ROBOT 29 Cutter radius compensation -When the Endmill cutter of some specified diameter is commanded to position at a location, actually the centre point of the cutter only coincide with the addressed point of the work piece. - So, t is necessary to shift the cutter for a radius amount towards left or right from the position. The procedure of shifting the tool of radius amount is called as Cutter Radius Compensation G41 - Cutter radius compensation left G42 - Cutter radius compensation right G40 - Cutter radius compensation cancel Cutter radius compensation
  • 30. FANUC INDIA FA & ROBOT 30 Cutter radius compensation The type of compensation is selected from the starting point as follows Type of operation Direction of movement Type of compensation External Clockwise G41 External Counter clockwise G42 Internal Clockwise G42 Internal Counter clockwise G41 Cutter radius compensation
  • 31. FANUC INDIA FA & ROBOT 31 Cutter radius compensation Cutter radius compensation
  • 32. FANUC INDIA FA & ROBOT 32 G41 - Cutter radius compensation left G41 D07; Here, D specifies the address of offset at which the radius of tool will be mentioned Cutter radius compensation
  • 33. FANUC INDIA FA & ROBOT 33 G42 - Cutter radius compensation right G41 D07; Here, D specifies the address of offset at which the radius of tool will be mentioned Cutter radius compensation
  • 34. FANUC INDIA FA & ROBOT 34 Operations performed in machining centre Side cutting Hole machining Face cutting Operations in machining centre
  • 35. FANUC INDIA FA & ROBOT 35 G54 Programming Examples SQ 150 SQ 200 thickness 20mm 1 3 4 2 Programming Examples
  • 36. FANUC INDIA FA & ROBOT 36 Programming example Making 150 mm* 150 mm square for a depth of 5mm in a given Billet Assumptions Work offset = G54 Tool length compensation = H01 Point X co ordinate value Y co ordinate value 1 25 25 2 25 175 3 175 175 4 175 25 Programming Examples
  • 37. FANUC INDIA FA & ROBOT 37 O1001 ; Program Number N1 G21 G94 ; Metric input, Feed in mm/min. N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position N3 T01 M06 ; (Dia. 15 mm End drill) N4 G90 G54 G00 X25.0 Y25.0 ; Work offset call N5 G43 H01 Z100.0 ; Tool length compensation call N6 M03 S1000 Z20 ; Positioning above the starting point and spindle starts rotating at 1000 rpm N7 G01 Z-5.0 F400 ; The tool is moved inside work of -5.0 mm N8 Y175.0 ; The tool is moved to second corner N9 X175.0 ; The tool is moved to third corner N10 Y25.0 ; The tool is moved to fourth corner N11 X25.0 ; The tool is moved back to first corner N12 G00 Z100.0 M05 ; The tool is taken out of the work and spindle stop N13 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position N14 M30 ; Program stop snd rewind Programming Examples
  • 38. FANUC INDIA FA & ROBOT 38 PROGRAMMING EXAMPLE WITHOUT SUB PROGRAM 2 1 3 4 5 6 8 7 Blank size: 150mm*150mm*20mm Point X Y 1 0 25 2 0 50 3 45 150 4 105 150 5 150 50 6 150 25 7 125 0 8 25 0 G55 Programming Examples
  • 39. FANUC INDIA FA & ROBOT 39 O1002 ; Program Number N1 G21 G94 ; Metric input, Feed in mm/min. N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position N3 T01 M06 ; (Dia. 15 mm End drill) N4 G90 G55 G00 X-25.0 Y-25.0 ; Work offset call N5 G43 H01 Z100.0 ; Tool length compensation call N6 M03 S1000 Z20 ; Positioning above the starting point and spindle starts rotating at 1000 rpm N7 G01 Z-20.0 F400 ; The tool is moved inside work of -20.0 mm N8 G41 G01 X0.0 Y0.0 D01 ; Cutter radius compensation call N9 G01 X0.0 Y50.0 ; The tool is moved to point 2 N10 G01 X45.0 Y150.0 ; The tool is moved to point 3 N11 G01 X105.0 Y150.0 ; The tool is moved to point 4 N12 G01 X150.0 Y50.0 ; The tool is moved to point 5 N13 G01 X150.0 Y25.0 ; The tool is moved to point 6 Programming Examples
  • 40. FANUC INDIA FA & ROBOT 40 N14 G01 X125.0 Y0.0 ; The tool is moved point 7 N15 G01 X25.0 Y0.0 ; The tool is moved to point 8 N16 G01 X0.0 Y25.0 ; The tool is moved to point 1 N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position N18 G00 Z100.0 M05 ; The tool is taken out of the work and spindle stop N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position N20 M30 ; Program stop and rewind Programming Examples
  • 41. FANUC INDIA FA & ROBOT 41 PROGRAMMING EXAMPLE WITH SUB PROGRAM 2 1 3 4 5 6 8 7 Blank size: 150mm*150mm*20mm Point X Y 1 0 25 2 0 50 3 45 150 4 105 150 5 150 50 6 150 25 7 125 0 8 25 0 G55 Programming Examples
  • 42. FANUC INDIA FA & ROBOT 42 O1003 ; Program Number N1 G21 G94 ; Metric input, Feed in mm/min. N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position N3 T01 M06 ; (Dia. 15 mm End drill) N4 G90 G55 G00 X-25.0 Y-25.0 ; Work offset call N5 G43 H01 Z100.0 ; Tool length compensation call N6 M03 S1000 Z20 ; Positioning above the starting point and spindle starts rotating at 1000 rpm N7 G01 Z0.0 F400 ; The tool is moved To Z0.0 N8 M98 P1500 L10 ; Sub program No.1500 call, L indicates No. of times N18 G00 Z100.0 M05 ; The tool is taken out of the work and spindle stop N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position N20 M30 ; Program stop snd rewind Programming Examples
  • 43. FANUC INDIA FA & ROBOT 43 O 1500 ; Sub program No N200 G91 Z-2.0 F400 ; The tool is moved incrementally -2 mm N210 G90 G41 G01 X0.0 Y0.0 Cutter Radius comp. (left), F400 D01 ; The tool is moved towards work piece N220 G01 X0.0 Y50.0 ; The tool is moved to point 2 N230 G01 X45.0 Y150.0 ; The tool is moved to point 3 N240 G01 X105.0 Y150.0 ; The tool is moved to point 4 N250 G01 X150.0 Y50.0 ; The tool is moved to point 5 N260 G01 X150.0 Y25.0 ; The tool is moved point 6 N270 G01 X125.0 Y0.0 ; The tool is moved to point 7 N280 G01 X25.0 Y0.0 ; The tool is moved to point 8 N290 G01 X0.0 Y25.0 ; The tool is moved to point 1 N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position N310 M99 ; Sub program end Programming Examples
  • 44. FANUC INDIA FA & ROBOT 44 PROGRAMMING EXAMPLE WITH SUB PROGRAM 2 3 4 5 1 R25 8 7 6 Blank size: 200mm*200mm*20mm Point X Y 1 0 0 2 0 200 3 75 200 4 125 200 5 200 200 6 200 0 7 125 0 8 75 0 G57 R25 Programming Examples
  • 45. FANUC INDIA FA & ROBOT 45 O1004 ; Program Number N1 G21 G94 ; Metric input, Feed in mm/min. N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position N3 T01 M06 ; (Dia. 15 mm End drill) N4 G90 G57 G00 X-25.0 Y-25.0 ; Work offset call N5 G43 H01 Z100.0 ; Tool length compensation call N6 M03 S1000 Z20 ; Positioning above the starting point and spindle starts rotating at 1000 rpm N7 G01 Z0.0 F400 ; The tool is moved To Z0.0 N8 M98 P1501 L10 ; Sub program No.1500 call, L indicates No. of times N18 G00 Z100.0 M05 ; The tool is taken out of the work and spindle stop N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position N20 M30 ; Program stop snd rewind Programming Examples
  • 46. FANUC INDIA FA & ROBOT 46 O 1501 ; Sub program No N200 G91 Z-2.0 F400 ; The tool is moved incrementally -2 mm N210 G90 G41 G01 X0.0 Y0.0 Cutter Radius comp. (left), F400 D01 ; The tool is moved towards work piece N220 G01 X0 Y200.0 ; The tool is moved to point 2 N230 G01 X75.0 Y200.0 ; The tool is moved to point 3 N240 G03 X125.0 Y200.0 R25.0 ; The tool is moved to point 4 with CIP-CCW N250 G01 X200.0 Y200.0 ; The tool is moved to point 5 N260 G01 X200.0 Y0 ; The tool is moved point 6 N270 G01 X125.0 Y0 ; The tool is moved to point 7 N280 G03 X75.0 Y0 R25.0 ; The tool is moved to point 8 with CIP CCW N290 G01 X0 Y0 ; The tool is moved to point 1 N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position N310 M99 ; Sub program end Programming Examples
  • 47. FANUC INDIA FA & ROBOT 47 Canned cycles - Drilling Canned cycles - Drilling
  • 48. FANUC INDIA FA & ROBOT 48 G81 SPOT DRILLING CYCLE STEP Description of the cycle 1 Rapid motion to hole position 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 4 Rapid retract to initial/reference level FORMAT AND EXPLANATION G81 X…. Y…. R…. Z…. F…. X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) F = Federate specification Canned cycles - Drilling
  • 49. FANUC INDIA FA & ROBOT 49 Programming Example BLANK SIZE 100*100*20 DIA. 8, FIVE HOLES HOLE1 (20,20) HOLE2 (20,80) HOLE3 (80,80) HOLE4 (80,20) HOLE5 (50,50) Canned cycles - Drilling
  • 50. FANUC INDIA FA & ROBOT 50 PROGRAMMING EXAMPLE O1005 N1 G91 G28 X0 Y0 Z0 N2 T01 M06 N3 G21 N4 G17 G90 G54 G00 X20 Y20 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G81 Z-4. R5 F300 N8 X80 N9 Y80 N10 X20N11 X50 Y50 N12 G80 G00 Z100 N13 G91 G28 X0 Y0 Z0 N14 M05 N15 M30 Canned cycles - Drilling
  • 51. FANUC INDIA FA & ROBOT 51 G82 COUNTER BORING CYCLE STEP Description of the cycle 1 Rapid motion to hole position 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 4 Dwell at the depth in millisecond 5 Rapid retract to initial/reference level Format and explanation G82 X…. Y…. R…. Z…. P….F…. X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) P = Dwell time in milliseconds F = Federate specification Canned cycles - Drilling
  • 52. FANUC INDIA FA & ROBOT 52 PROGRAMMING EXAMPLE BLANK SIZE 100*100*20 DIA. 8, FIVE HOLES HOLE1 (20,20) HOLE2 (20,80) HOLE3 (80,80) HOLE4 (80,20) HOLE5 (50,50) Canned cycles - Drilling
  • 53. FANUC INDIA FA & ROBOT 53 O1006 N1 G91 G28 X0 Y0 Z0 N2 T02 M06 N3 G21 N4 G17 G90 G54 G00 X20 Y20 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G82 Z-15. R5 P2000 F300 N8 X80 N9 Y80 N10 X20 N11 X50 Y50 N12 G80 G00 Z100 M05 N13 G91 G28 X0 Y0 Z0 N14 M30 Canned cycles - Drilling
  • 54. FANUC INDIA FA & ROBOT 54 DEEP HOLE DRILLING HIGH SPEED DEEP HOLE CYCLE STEP Description of the cycle STEP Description of the cycle 1 Rapid motion to hole position 1 Rapid motion to hole position 2 Rapid motion to safety level/reference level 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth by the amount of specified depth 3 Feed rate motion to Z depth by the amount of specified depth 4 Rapid retract to safety level/R level 4 Rapid retract by a clearance value (clearance value is set by a system parameter) 5 Rapid motion to the previous depth less a clearance (clearance is set by a system parameter) 5 Feed rate motion in Z axis by the distance specified plus clearance 6 Steps 3,4, and 5 repeat until the programmed Z depth is reached 6 Steps 4 and 5 repeat until the programmed Z depth is reached 7 Rapid retract to safety/R level 7 Rapid retract to safety/R level Canned cycles - Drilling
  • 55. FANUC INDIA FA & ROBOT 55 FORMAT AND EXPLANATION G73 X…. Y…. R…. Z…. Q….F…. G83 X…. Y…. R…. Z…. Q….F…. X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) Q = Pecking depth (Micron) F = Federate specification X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) Q = Pecking depth (Micron) F = Federate specification Canned cycles - Drilling
  • 56. FANUC INDIA FA & ROBOT 56 WHEN TO USE DEEP HOLE DRILLING CYCLE (G83) For deep hole drilling, also known as peck drilling, where the drill has to be retracted above the part (to a clearance position) after drilling to a certain depth. WHEN TO USE HIGH SPEED DEEP HOLE DRILLING CYCLE(G73) For deep hole drilling, also known as peck drilling, where the chip breaking is ore important than the full retract of the drill from the holes. This type often used for a long series drills, when a full retract is not very important. Programming Example BLANK SIZE 100*100*20 DIA. 8, FIVE HOLES HOLE1 (20,20) HOLE2 (20,80) HOLE3 (80,80) HOLE4 (80,20) HOLE5 (50,50) Canned cycles - Drilling
  • 57. FANUC INDIA FA & ROBOT 57 O1007 N1 G91 G28 X0 Y0 Z0 N2 T03 M06 N3 G21 N4 G17 G90 G54 G00 X20 Y20 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G83 Z-30. R5 Q8000 F300 or G73 Z-30 R5 Q8000 F300 N8 X80 N9 Y80 N10 X20 N11 X50 Y50 N12 G80 G00 Z100 M05 N14 G91 G28 X0 Y0 Z0 N15 M30 Canned cycles - Drilling
  • 58. FANUC INDIA FA & ROBOT 58 TAPPING CYCLE - STANDARD TAPPING CYCLE - REVERSE STEP Description of the Cycle STEP Description of the cycle 1 Rapid motion to hole position 1 Rapid motion to hole position 2 Rapid motion to safety level/reference level 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 3 Feed rate motion to Z depth 4 Spindle rotation stop 4 Spindle rotation stop 5 Spindle reverse rotation (M04) and feed rate back to safety/R level 5 Spindle reverse rotation (M04) and feed rate back to safety/R level 6 Spindle rotation stop 6 Spindle rotation stop 7 Spindle rotation normal 7 Spindle rotation normal Canned cycles - Drilling
  • 59. FANUC INDIA FA & ROBOT 59 FORMAT AND EXPLANATION G84 X…. Y…. R…. Z….R… F…. G74 X…. Y…. R…. Z…R….. F…. X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) F = Federate specification X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) F = Federate specification Canned cycles - Drilling
  • 60. FANUC INDIA FA & ROBOT 60 The important notes for the tapping operation • Safety/reference level should be higher in the tapping cycle than in the other cycles to follow for the stabilization of the feed rate, due to acceleration • Feed rate section for the tap is very important. In tapping, there is a direct relationship between the spindle speed and the lead of the tap. This relationship must be maintained at all the times. • The override switches on the control panel used for spindle speed and feed rate, are ineffective during these cycles. • Tapping motion (in or out of the part) will be completed even if the feed hold key is pressed during tapping cycle processing for safety reasons. PROGRAMMING EXAMPLE BLANK SIZE 100*100*20 DIA. 8, FIVE HOLES HOLE1 (20,20) HOLE2 (20,80) HOLE3 (80,80) HOLE4 (80,20) HOLE5 (50,50) Canned cycles - Drilling
  • 61. FANUC INDIA FA & ROBOT 61 O1008 N1 G91 G28 X0 Y0 Z0 N2 T03 M06 N3 G21 N4 G17 G90 G54 G00 X20 Y20 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G84 Z-15. R5 F300 or G74 Z-30 R5 F300 (Feed = RPM * Pitch) N8 X80 N9 Y80 N10 X20 N11 X50 Y50 N12 G80 G00 Z100 M05 N13 G91 G28 X0 Y0 Z0 N14 M30 Canned cycles - Drilling
  • 62. FANUC INDIA FA & ROBOT G85 X…. Y…. R…. Z…. F…. X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) F = Feed rate specification 62 G85 BORING CYCLE STEP Description of the cycle 1 Rapid motion to hole position 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 4 Feed rate motion back to safety/R level Canned cycles - Drilling
  • 63. FANUC INDIA FA & ROBOT 63 This cycle is typically used for boring and reaming operations. This cycle is used in cases where the tool motion into and out of holes should improve the hole surface finish, its dimensional tolerances and/or its concentricity, roundness, etc. DIMNSION OF BLANK 100*100*20 HOLE DIA. 10 mm HOLE (50,50) WHEN TO USE THIS CYCLE PROGRAMMING EXAMPLE Canned cycles - Drilling
  • 64. FANUC INDIA FA & ROBOT 64 PROGRAMMING EXAMPLE O1009 N1 G91 G28 X0 Y0 Z0 N2 T01 M06 N3 G21 N4 G17 G90 G54 G00 X50 Y50 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G85 Z-20. R5 F300 N8 G80 G00Z100 M05 N9 G91 G28 X0 Y0 Z0 N10 M30 Canned cycles - Drilling
  • 65. FANUC INDIA FA & ROBOT 65 PRECISION BORING CYCLE (G76) STEP Description of the cycle 1 Rapid motion to hole position 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 4 Spindle rotation stop 5 Shifting in programmed direction 6 Rapid retract to reference level ROUGH BORING CYCLE (G86) STEP Description of the cycle 1 Rapid motion to hole position 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 4 Spindle rotation stop 5 Rapid retract to reference level Canned cycles - Drilling
  • 66. FANUC INDIA FA & ROBOT 66 Format and Explanation G86 X…. Y…. R…. Z…Q... F (rough) G76 X…. Y…. R…. Z…I…J... F ….(fine) X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) F = Federate specification Q = amount of shift for boring I, J = amount of shift
  • 67. FANUC INDIA FA & ROBOT 67 O1009 N1 G91 G28 X0 Y0 Z0 N2 T01 M06 N3 G21 N4 G17 G90 G54 G00 X50 Y50 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G86 Z-20. R5 F300 N8 G80 Z100 N9 G91 G28 X0 Y0 Z0 N10 M05 N11 M30 Canned cycles - Drilling DIMNSION OF BLANK 100*100*20 HOLE (50,50) PROGRAMMING EXAMPLE
  • 68. FANUC INDIA FA & ROBOT 68 BORING CYCLE (G88) STEP Description of the cycle 1 Rapid motion to XY position 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 4 Dwell at the depth in milliseconds 5 Spindle rotation stops (feed hold condition is generated and the CNC operator switches to manual operation mode and perform a manual task, then switches back to memory mode) 6 Rapid retract to safety/reference level 7 Spindle rotation on G88 X…. Y…. R…. Z….P… F…. X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) P = Dwell time in milliseconds F = Federate specification Canned cycles - Drilling
  • 69. FANUC INDIA FA & ROBOT 69 WHEN TO USE THIS CYCLE This cycle is rare. Its use is limited to boring operations with special tools that require manual interference at the bottom of a hole. This cycle may be used by some tool manufacturers for certain operations. PROGRAMMING EXAMPLE Canned cycles - Drilling DIMNSION OF BLANK 100*100*20 HOLE (50,50)
  • 70. FANUC INDIA FA & ROBOT 70 O1010 N1 G91 G28 X0 Y0 Z0 N2 T01 M06 N3 G21 N4 G17 G90 G54 G00 X50 Y50 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G88 Z-20. R5 P2000 F300 N8 G80 G00 Z100 M05 N9 G91 G28 X0 Y0 Z0 N10 M30 Canned cycles - Drilling
  • 71. FANUC INDIA FA & ROBOT 71 BORING (REAMING) CYCLE (G89) STEP Description of the cycle 1 Rapid motion to XY position 2 Rapid motion to safety level/reference level 3 Feed rate motion to Z depth 4 Dwell at the depth 5 Feed rate motion back to safety/R level G89 X…. Y…. R…. Z…. P…F…. X = Hole position in X axis Y = Hole position in Y axis R = Reference position (Z axis st. point) Z = Final depth (abs.) P = dwell time in milliseconds F = Federate specification Canned cycles - Drilling
  • 72. FANUC INDIA FA & ROBOT 72 WHEN TO USE THIS CYCLE For boring operations, when the feed rate is required for the in and out directions of the machined hole, with a specified dwell at the bottom. The dwell is the only value that distinguishes this cycle from the cycle85/G85. PROGRAMMING EXAMPLE Canned cycles - Drilling DIMNSIONS OF BLANK 100*100*20 HOLE DIA. 10 mm HOLE (50,50)
  • 73. FANUC INDIA FA & ROBOT 73 O1011 N1 G91 G28 X0 Y0 Z0 N2 T01 M06 N3 G21 N4 G17 G90 G54 G00 X50 Y50 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G85 Z-20. R5 P2000 F300 N8 G80 G00 Z100 M05 N9 G91 G28 X0 Y0 Z0 N10 M30 Pattern of holes
  • 74. FANUC INDIA FA & ROBOT 74 PATTERN OF HOLES RANDOM HOLE PATTERN BLANK SIZE = 100*100*20 DIA. 8, FIVE HOLES HOLE1 (28,16) HOLE2 (60,32) HOLE3 (88,40) HOLE4 (104,48) Pattern of holes
  • 75. FANUC INDIA FA & ROBOT 75 O1012 N1 G91 G28 X0 Y0 Z0 N2 T01 M06 N3 G21 N4 G17 G90 G54 G00 X28 Y16 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G83 Z-30. R5 Q8000 F300 N8 X60 Y32 N9 X88 Y40 N10 X104 Y 48 N11 G80 G00 Z100 M05 N13 G91 G28 X0 Y0 Z0 N14 M30 Pattern of holes
  • 76. FANUC INDIA FA & ROBOT 76 STRAIGHT ROW HOLE PATTERN First hole dimension from ref. = (15,10) distance between holes = 20, diameter of holes = 10 mm O1013 N1G21 G94 N2 G91 G28 X0 Y0 Z0 N3 T01 M06 N4 G17 G90 G54 G00 X15 Y10 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G83 Z-30. R5 Q8000 F300 N8 G91 X20.0 K5 N9 G80 G00 Z100 M05 N10 G28 X0 Y0 Z0 N11 M30 Pattern of holes
  • 77. FANUC INDIA FA & ROBOT 77 O1014 N1 G91 G28 X0 Y0 Z0 N2 T01 M06 N3 G21 N4 G17 G90 G54 G00 X15 Y10 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G83 Z-30. R5 Q8000 F300 N8 G91 X20.0 K5 N9 G80 G00 Z100 M05 N10 G28 X0 Y0 Z0 N11 M30 Pattern of holes
  • 78. FANUC INDIA FA & ROBOT 78 PATTERN OF HOLES IN AN INCLINED LINE ANGLE OF THE INCLINED LINE WITH X AXIS = 15 DISTANCE BETWEEN HOLES = 40 FIRST HOLE DIMENSION IS (20,20) DIAMETER OF HOLES = 10 mm The following calculation is required in FANUC to find distance between holes in X axis and in Y axis. X = 40 * cos15 = 38.63703305 Y = 40 * sin15 = 10.3527618 Pattern of holes
  • 79. FANUC INDIA FA & ROBOT 79 O1015 N1 G21 G94 N2 G91 G28 X0 Y0 Z0 N3 T01 M06 N4 G17 G90 G54 G00 X20 Y20 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G83 Z-30. R5 Q8000 F300 N8 G91 X38.6370 Y10.3527 K5 N9 G80 G00 Z100 M05 N10 G28 X0 Y0 Z0 N11 M30 Pattern of holes
  • 80. FANUC INDIA FA & ROBOT 80 PROGRAMMING EXAMPLE RECTANGULAR GRID PATTERN DISTANCE OF FIRST HOLE FROM REFERENCE = (20,30) DISTANCE BETWEEN COLUMNS = 25 DISTANCE BETWEEN ROWS = 20 DIAMETER OF HOLES = 10 mm O1016 N1 G21 G94 N2 G91 G28 X0 Y0 Z0 N3 T01 M06 N4 G17 G90 G54 G00 X20 Y30 N5 G43 H01 Z100 N6 M03 S1000 Z20 Pattern of holes
  • 81. FANUC INDIA FA & ROBOT 81 N7 G99 G83 Z-30. R5 Q8000 F300 N8 G91 Y20 K6 N9 X25 N10 Y-20 K6 N11 X25 N12 Y20 K6 N13 X25 N14 Y-20 K6 N15 X25 N16 Y20 K6 N17 G80 G00 Z100 M05 N18 G28 X0 Y0 Z0 N30 M30 Pattern of holes
  • 82. FANUC INDIA FA & ROBOT 82 CIRCLE OF HOLES PATTERN Distance of reference point in X axis from the WCS = 75 Distance of reference point in Y axis from the WCS = 60 Starting angle of the first hole from X axis = 30 deg. Indexing angle between holes = 60, Number of holes = 6 Radius of the circle = 50mm, Diameter of holes = 8mm 1 2 3 4 5 6 Pattern of holes
  • 83. FANUC INDIA FA & ROBOT 83 Hole # 1 X = 75 + 50 * cos30 = 118.30127 Y = 60 + 50 * sin30 = 85.0 Hole # 2 X = 75 + 50 * cos90 = 75.0 Y = 60 + 50 * sin90 = 110.0 Hole # 3 X = 75 + 50 * cos150 = 31.6987298 Y = 60 + 50 * sin150 = 85.0 Hole # 4 X = 75 + 50 * cos210 = 31.6987298 Y = 60 + 50* sin210 = 35.0 Hole # 5 X = 75 + 50 * cos270 = 75.0 Y = 60 + 50 * sin270 = 100.0 Hole # 6 X = 75 + 50 * cos330 = 118.30127 Y = 60 + 50* sin330 = 35.0 Pattern of holes
  • 84. FANUC INDIA FA & ROBOT 84 O1017 N1 G91 G28 X0 Y0 Z0 N2 T03 M06 N3 G21 N4 G17 G90 G54 G00 X118.3012 Y85.0 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G99 G83 Z-30. R5 Q8000 F300 N8 X75.0 Y110.0 N9 X31.6987 Y85.0 N10 X31.6987 Y35.0 N11 X75.0 Y10 N12 X118.301 Y35.0 N13 G80 G00 Z100 M05 N14 G91 G28 X0 Y0 Z0 N15 M30 Pattern of holes
  • 85. FANUC INDIA FA & ROBOT 85 CIRCLES OF HOLES USING POLAR SYSTEM Distance of reference point in X axis from the WCS = 75 Distance of reference point in Y axis from the WCS = 60 Starting angle of the first hole from X axis = 30 deg. Indexing angle between holes = 60, Number of holes = 6 Radius of the circle = 50mm, Diameter of holes = 8mm 1 2 3 4 5 6 Pattern of holes
  • 86. FANUC INDIA FA & ROBOT 86 O1018 N1 G91 G28 X0 Y0 Z0 N2 T03 M06 N3 G21 N4 G17 G90 G54 G00 X75.0 Y60.0 N5 G43 H01 Z100 N6 M03 S1000 Z20 N7 G16; POLAR SYSTEM ON N8 G99 G83 X50 Y30 Z-30. R5 Q8000 F300 N9 X50 Y90 N10 X50 Y150 N11 X50 Y210 N12 X50 Y270 N13 X50 Y330 N14 G15 ; POLAR SYSTEM OFF N15 G80 G00 Z100 M05 N16 G91 G28 X0 Y0 Z0 N17 M30 Pattern of holes
  • 87. FANUC INDIA FA & ROBOT 87 CUSTOM MACRO PROGRAMMING Custom Macro programming
  • 88. FANUC INDIA FA & ROBOT Custom Macro • Part Program prepared using variables • Arithmetic operations possible • Conditional statements like GOTO , DO WHILE are used • For developing user defined cycles • Can be easily called from user program Custom Macro programming
  • 89. FANUC INDIA FA & ROBOT 89 Macro call Custom Macro programming
  • 90. FANUC INDIA FA & ROBOT Simple Macro Call Custom Macro programming
  • 91. FANUC INDIA FA & ROBOT Custom Macro programming 91
  • 92. FANUC INDIA FA & ROBOT Custom Macro programming 92
  • 93. FANUC INDIA FA & ROBOT Custom Macro programming 93
  • 94. FANUC INDIA FA & ROBOT Model Macro Call- G66 • Once G66 is issued to specify a modal call a macro is called after a block specifying movement along axes is executed. This continues until G67 is issued to cancel a modal call. Custom Macro programming
  • 95. FANUC INDIA FA & ROBOT 95 G66 Custom Macro programming