0% found this document useful (0 votes)
48 views32 pages

Part Programming On Milling

The document discusses milling machine part programming and canned cycles. It provides information on: 1) G-codes for cutter compensation, tool length compensation, and work position commands. 2) Canned cycles for circular and rectangular pocket milling using G17/G171 and G172/G173 codes. 3) M-codes for subprogram calls and ends, including an example program using M98 and M99. 4) What canned cycles are and common drilling canned cycles like G81.

Uploaded by

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

Part Programming On Milling

The document discusses milling machine part programming and canned cycles. It provides information on: 1) G-codes for cutter compensation, tool length compensation, and work position commands. 2) Canned cycles for circular and rectangular pocket milling using G17/G171 and G172/G173 codes. 3) M-codes for subprogram calls and ends, including an example program using M98 and M99. 4) What canned cycles are and common drilling canned cycles like G81.

Uploaded by

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

Milling Machine Part Programming

Prof. Pratik A shah


Assistant Professor in Mechanical
Engineering Dept.,
DDU, Nadiad
BLOCK CONFIGURATION.
G CODES - G4Ø, G41, G42
(CUTTER COMPENSATION).
• The collection of G4Ø, G41 and G42 codes allow
the machine controller to produce very accurate
arcs and tapers on the billet, by compensating for
the tool radius.

• Complex work piece shapes are therefore


programmed with cutter compensation mode
active. The radius of the tool (the offset amount) is
measured, and then entered into the offset file in
the machine controller. Once set, the tool path can
be offset by this value, Regardless of the program.
WORK POSITION AND MOVEMENT
COMMAND.
• When tool nose radius compensation is required in a CNC
program, the position of the billet in respect to the tool must be
specified using the table below.
TOOL LENGTH COMPENSATION:
• G43T1 H1;
• H1 refers to tool length compensation of tool one,
which has a value of -3.000 in the offset table. A minus
value increases the length of the tool, whereas a positive
value decreases the length of the tool.
• Offset Table
Most CNC machine controllers will have an offset table
for the operator to input offset values. If the operator is
using tool number one then the offset numbers for tool
number one will be used. Below is an example of a
table showing how the offset values can be organized to
illustrate tool length (G43) and radius compensation for
four different tools.
Tool length Radius compensation

No. Value No. Value

1 -3.000 11 5.000

2 2.000 12 8.000

3 -1.750 13 10.000

4 0.375 14 7.000

… 0.000 … 0.000

10 0.000 20 0.000
G17ØG171
(CIRCULAR POCKET CANNED
NØØ8Ø G17Ø RØ PØ Q3 XØ YØ Z-6 IØ JØ K-24 ;
NØØ9Ø G171 P75 S3ØØØ R75 F25Ø B35ØØ J2ØØ ;
• For G17Ø block,
• R defines the position of the tool to start cycle ie. Ø (surface of job).
• P defines when P is zero(Ø) the cycle is a roughing cycle.
• Q defines the peck increment, in program number
• ØØØ2, 2 pecks each of 3mm.
• X defines the pocket centre in X axis (Ø).
• Y defines the pocket centre in Y axis (Ø).
• Z defines the pocket base (-6mm) from job surface.
• I defines the side finish allowance (Ø as this is a roughing cycle only).
• J defines the base finish allowance (Ø as this is a roughing cycle only).
• K defines the radius of pocket (-24) negative value - cut in CCW direction).
 
• For G171 block,
• P defines the cut width percentage.
• S defines the roughing spindle speed (S3ØØØ).
• R defines the roughing Feed in Z (75).
• F defines the roughing feed XY (25Ø).
• B defines the finishing spindle speed (35ØØ, not applicable as roughing only).
• J defines the finishing feed (2ØØ, not applicable as roughing only).
• When setting offsets the value R must be included, R being the radius of the cutter.
• The direction of the cutter path is controlled by K, a negative (K-24) value for K means the cutter path is in a CCW direction
and if the K value is positive (K+24) the cutter path is in a CW direction. The Q value is always positive (Q+3). When the tool
has finished cutting the tool retracts 1mm in the Z axis, moves to the centre of the circular pocket at rapid traverse, retracts
again in the Z axis .
• Program number ØØØ2 is for a two cut roughing cycle.
PROGRAM NUMBER ØØØ2 - ROUGHING PROGRAM - CIRCULAR POCKET - G17Ø AND G171.
[BILLET X75 Y9Ø Z3Ø ; ........................... Billet size.
[EDGEMOVE X-37.5 Y-45 ; ..................... Position of datum from the bottom LH corner of
billet.
[TOOLDEF T1 D6 ZØ ; ............................ Tool no. dia. and position.
O ØØØ2 ; ...................................................Program no.
NØØ4Ø G91 G28 XØ YØ ZØ ; ............... Metric, reference point.
NØØ5Ø MØ6 TØ1 ; ................................. Tool no.
NØØ6Ø G9Ø GØØ XØ YØ Z1Ø S3ØØØ MØ3 ;..... Absolute, rapid, tool 1Ømm above surface,
spindle speed and start.
NØØ7Ø GØ1 ZØ F3ØØ;........................ Tool to surface of job, feed set.
NØØ8Ø G17Ø RØ PØ Q3 XØ YØ Z-6 IØ JØ K-24 ;........ Circular pocket canned cycle.
NØØ9Ø G171 P75 S3ØØØ R75 F25Ø B35ØØ J2ØØ ; ... Circular pocket canned cycle.
NØ1ØØ GØØ Z25 MØ5 ; ......................... Rapid, tool to 25mm above surface, spindle stop.
NØ11Ø G91 G28 XØ YØ ZØ ; ................. Incremental, return to reference point.
NØ12Ø M3Ø ; ........................................... Program reset.
G172/G173
(RECTANGULAR POCKET CANNED CYCLE)
• NØØ8Ø G172 I-5Ø J-50 KØ PØ Q3 RØ X-25 Y-25 Z-6 ;
• NØØ9Ø G173 IØ KØ P75 T1 S3ØØ R75 F25Ø B35ØØ J2ØØ Z5
•  
• For G172 block,
• I defines the pocket X length (-5Ø).
• J defines the pocket Y length (-5Ø)
• K defines the radius of corner roundness (not applicable to Denford software).
• P defines that Ø = roughing cycle.
• Q defines the pocket Z increment (peck increments in above cycle 2-3mm pecks).
• R defines the Absolute Z 'R' point.
• X defines the pocket corner X (Absolute position relative to the X datum position).
• Y defines the pocket corner Y (Absolute position relative to the Y datum position).
• Z defines the absolute Z base of pocket (-6, ie, a depth of 6mm).
•  
• For G173 block,
• I defines the pocket side finish (Ø as this is a roughing cycle).
• K defines the pocket base finish (Ø as this is a roughing cycle).
• P defines the cut width percentage (75% of tool dia.).
• T defines the pocket tool (tool 1).
• S defines the spindle speed for roughing (3ØØØrpm).
• R defines the roughing feed for Z (75).
• F defines the roughing feed X and Y (25Ø).
• B defines the finishing spindle speed (35ØØ rpm).
• J defines the finishing feed (2ØØ).
• Z defines the safety Z (5mm above 'R' point).
• Program number ØØØ5 is for a two cut roughing cycle.
• PROGRAM NUMBER ØØØ5 - ROUGHING PROGRAM - RECTANGULAR POCKET - G172 AND G173
• [BILLET X75 Y9Ø Z3Ø ; ................................................... Billet size.
• [EDGEMOVE X-37.5 Y-45 ; .............Position of datum from the bottom LH corner of billet.
• [TOOLDEF T1 D6 ZØ ; ...................................................... Tool no. dia. and position.
• O ØØØ5 ; ....................................................................... Program no.
• NØØ4Ø G91 G21 G28 XØ YØ ZØ ; ................................... Metric, reference point.
• NØØ5Ø MØ6 TØ1 ; ......................................................... Tool no.
• NØØ6Ø GØØ XØ YØ Z1Ø S3ØØØ MØ3 ; ...... Absolute, rapid, tool 1Ømm above surface, spindle
speed and start.
• NØØ7Ø GØ1 ZØ F3ØØ ; ................................................ Tool to surface of job, feed set.
• NØØ8Ø G172 I-5Ø KØ PØ Q3 RØ X-25 Y-25 Z-6 ; .............. Rectangular pocket cycle.
• NØØ9Ø G173 IØ KØ P75 T1 S3ØØ R75 F25Ø B35ØØ J2ØØ Z5 ; Rectangular pocket cycle
• NØ1ØØ GØØ Z25 MØ5; ............................. Rapid, tool to 25mm above surface, spindle stop.
• NØ11Ø G91 G28 XØ YØ ZØ ; ....................................... Incremental, return to reference point.
• NØ12Ø M3Ø ; ................................................................ Program reset.
M CODES - M98 (SUB PROGRAM CALL).
M CODES - M99 (SUB PROGRAM END AND RETURN).

• M98 - Sub Program Call.


• This code will cause the machine controller to jump across from the
main program to read a different program in its memory (called a sub
program).
 
• M99 - Sub Program End and Return.
• On the last line of a sub program, the code M99 is entered. This
reverts control back to the main program.
• If an M99 code is programmed at the end of a main program, a
continuous loop will be established.
• If an M99 code is followed by a block number, P_ _ _ _ , control will
return to the program line with the same number as stated in P_ _ _
• (Sample Program M98EX9:)
• (Workpiece Size: X5, Y5, Z1)
• (Tool: Tool #1, 3/32" Spot Drill)
• (Tool #2, 1/4” HSS Drill)
• (Tool #3, 1/2” HSS Drill)
• (Tool Start Position: X0, Y0, Z1)
 
• N2 G90 G80 G40 G54 G20 G17 G50 G94 G64 (safety block)
• N5 G90 G20
• N10 M06 T1 G43 H1
• N15 M03 S1500
• N20 M08 (Coolant on)
• N25 G00 X1 Y1
• N30 G82 X1 Y1 Z-.1 R.1 P0.5 F5 (Start of cycle)
• N35 M98 P1005 (Call subprogram to do rest)
• N40 G80
• N45 G28 X1 Y1
• N50 M09
• N55 M06 T02 G43 H02
• N60 G00 X1 Y1
• N65 M03 S1200
• N70 M08
• N75 G83 X1 Y1 Z-1 R0.1 Q0.1 F5.0 (Start of cycle)
• N80 M98 P1005 (Call subprogram to do rest)
• N85 G80
• N90 G28 X1 Y1
• N95 M09
• N100 M06 T03 G43 H03
• N105 G00 X1 Y1
• N110 M03 S1000
• N115 M08
• N120 G73 X1 Y1 Z-1 R0.1 Q0.1 F5.0 (Start of cycle)
• N125 M98 P1005 (Call subprogram to do rest)
• N130 G80
• N135 G00 Z1
• N140 X0 Y0
• N145 M09
• N150 M05
• N155 M30

• O1005 (Subprogram)
• N5 X2
• N10 X3
• N15 X4
• N20 Y2
• N25 X3
• N30 X2
• N35 X1
• N40 M99 (Return from subprogram)
WHAT IS CANNED CYCLE?
• Canned cycle or fixed cycle may be defined as a set of
instructions, inbuilt or stored in the system memory, to
perform a fixed sequence of operation. The canned cycles
can be brought into action with a single command and as
such reduce the programming time and effort. Canned
cycles are used for repetitive and commonly used
machining operation. The canned cycles are stored under
G code address. G81 to G89 are reserved for fixed canned
cycle.

G80 Cancel Drilling Canned Cycle


• The G80 code is used to cancel G81 drilling cycle.
• G81 Drilling Canned Cycle Format
• G81 X_ Y_ Z_ R_ F_ K_ ;
X_ Y_: Hole position data
Z_ : Z-depth (tool will travel with feed to Z-depth starting from R
plane)
R_ : The distance from the initial level to point R level
F_ : Cutting feedrate.
K_ : Number of repeats (if required)
• G82 Drilling Canned Cycle Format
• G82 X_ Y_ Z_ P_ R_ F_ K_;
X – Rapid X-axis location
Y – Rapid Y-axis location
Z – Z-depth (feed to Z-depth starting from R plane)
P – Dwell time at Z-depth
R – R-plane (rapid point to start feeding)
F – Feed rate in inches (mm) per minute
K – Number of repeats (if required)
• G82 G99 Z-0.375 P1 R0.1 F7.5
• G83 Peck Drilling Cycle Format
G83 X_ Y_ Z_ R_ Q_ F_ K_ ;
X Y – Hole position data
Z – Z-depth (feed to Z-depth starting from R plane)
R – Position of the R plane
Q – Depth of cut for each cutting feed (depth of each peck)
F – Cutting feed rate
K – Number of repeats (if required)
• Fanuc G84 Peck Rigid Tapping Cycle Format
• G84 X_ Y_ Z_ R_ P_ Q_ F_ K_;
X Y – Hole position.
Z – Z-depth (feed to Z-depth starting from R plane).
• R – Position of the R plane.
P – Dwell time at the bottom of the hole and at point R when a return
is made.
Q – Depth of cut for each cutting feed (Peck depth).
F – The cutting feed rate.
K – Number of repeats (if required).
• CNC G85 Boring Canned Cycle Format with feed
G85 X.... Y.... Z.... R.... F.... ;
• Sequence of moves:
• Op 1) Rapid position to X, Y and Z (the initial level).
• Op 2) Rapid traverse to R point level.
• Op 3) Feed in to the Z depth.
• Op 4) Feed back to R point level.
• If the G98 code is programmed within the cycle, the Next move will be a rapid
traverse to the Initial level.
• If The G99 code is programmed within the cycle, there will be no movement
• G86 Boring Cycle, Spindle Stop, Rapid Out
• G86  X.... Y.... Z.... R.... F....

G87 Back Boring Cycle Rapid Spindle CW


G87 X.... Y.... Z.... P..... Q.... R.... F....
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Spindle stop and orientation. Move the value of Q.
Op 3) Rapid traverse to R point level.
Op 4) Spindle CW and move back the value of Q.
Op 5) Feed in to Z depth (positive direction) and dwell P.
Op 6) Spindle stop and orientate.
Op 7) Move the value of Q.
Op 8) Rapid traverse to R point level.
Op 9) Move back the value of Q and spindle CW.
• G88 Boring Cycle, Spindle Stop, Manual Out
• G89 Boring Cycle, Dwell, Feed Out
• G89 X.... Y.... Z.... P.... R.... F....
LOOPS AND UNCONDITIONAL
JUMP (G25):
• The unconditional jump is used to repeat a set of statements a
number of times.
Example: N10

• In the above example, the program statements from N70 to N100 are repeated once
when the statement N160 is executed. Usually the G25 is used after a mirror
statement. Illustrative example geometry and its program are given below
• Example:

• Illustrative example for programming loops


Mirror
The mirroring command is used when features of components shares symmetry about one or more axes and
are also dimensionally identical.
By using this code components can be machined using a single set of data and length of programs can be
reduced.
G10 cancellation of mirroring image
G11 Mirror image on X axis
G12 Mirror image on Y axis
G13 Mirror image on Z axis
Example:
SHIFTING ORIGIN
• G92 code is used to temporarily shift the origin to the reference
point specified.

Example: G92 X-100 Y-80


SCALING
• Scaling function is used to program geometrically similar components with
varying sizes.
Syntax: G72 Kk, where k is the scaling factor.
• The scaling command can be cancelled by using the statement G72 K1.0.
PATTERN
ROTATION
Pattern rotation is used to obtain a pattern of similar features. G73
code is used to rotate the feature to form a pattern.
Syntax G73 Aa, where 'a' is the angle of rotation. This command is
cumulative, and the angle gets added up on time the program is
executed. So all the rotational angle parameters should be cancelled
using the code G73.
The unconditional jump code G25 is used in conjunction with this
code to achieve the desired rotation.
SAMPLE MILLING PROG.
• # 1 Name of Prog.
• N10 G90 G94 G21 G54 LF.
• N20 M06 T01 LF…………………….. T01 END MILL 10 MM. DIA.
• N30 M03 S2000 LF.
• N40 G00 X0 Y0 Z3 LF.
• N50 G01 G41 X0 Y0 F0.5 LF.
• X0 Y0 Z-1 F0.5 LF.
• X0 Y70 LF.
• X40 Y100 LF.
• X90 Y100 LF.
• G02 X100 Y90 CR=10 F0.3 LF.
• G01 X100 Y20 F0.5 LF.
• G03 X80 Y0 CR=20 F0.3 LF.
• G01 X0 Y0 Z-1 F0.5 LF
• G01 G40 X0 Y0 Z3 F0.5 M05 LF.
• M06 T02 LF……………. T02 END MILL 8 MM. DIA.
• M03 S2000 LF.
• G00 X50 Y50 Z3 F0.5 LF.
• G01 G42 X50 Y50 Z-1 F0.5 LF.
• X50 Y75 LF.
• X75 Y75 LF.
• X75 Y50 LF.
• X50 Y50 LF.
• G01 G40 X50 Y50 Z3 M05 F0.5 LF.
• M06 T03 LF…………………………… T03 DRILL TOOL 20 MM. DIA.
• M03 S1000 LF.
• G00 X10 Y10 Z3 LF.
• G81 X10 Y10 Z-5 R3 F0.3 LF.
• G80 M05 LF.
• M06 T04 LF…………………………. T04 DRILL TOOL 09 MM. DIA.
• M03 S1000 LF.
• G81 X90 Y90 Z-5 R3 F0.3 LF.
• G80 M05 LF.
• M06 T05 LF………………………….. T05 TAP TOOL 10 MM. DIA.
• M03 S500 LF
• G84 X90 Y90 Z-5 R3 P2 Q2 F0.2 LF.
• G80 M05 LF.
• G00 X0 Y0 Z50 LF.
• G28 U0 W0 LF.
• M30
THANK YOU

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy