Miss Neepa M. Patel, MPSTME, Mumbai.
4.CNC
Part Programming
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Part Programming Using CAD/CAM
Miss Neepa M. Patel, MPSTME, Mumbai.
2
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Part Programmer's Job
Miss Neepa M. Patel, MPSTME, Mumbai.
3
Two main tasks of the programmer:
1.Define the work part geometry
2.Specify the tool path and operation sequence
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Part Programmer's Job
Miss Neepa M. Patel, MPSTME, Mumbai.
4
Study the drawing
Decide the sequence of operations
Select the m/c tool
Select the cutting tools
Decide the tool path
Determine the machining parameters like : spindle
speed, feed rate, depth of cut
Decide the other parameters like :
starting/stopping of m/c, coolant on/off etc.
Write the part program
Test the part program
Document the part program
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Common CNC Machining Operations
Miss Neepa M. Patel, MPSTME, Mumbai.
5
Turning
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Common CNC Machining Operations
Miss Neepa M. Patel, MPSTME, Mumbai.
6
Drilling Milling
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
7
A Block of Information
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
A Block of Information
Miss Neepa M. Patel, MPSTME, Mumbai.
8
Each line of program == 1 block
Each block is composed of several instructions, or (words)
Sequence and format of words:
N3 G2 X+1.4 Y+1.4 Z+1.4 I1.4 J1.4 K1.4 F3.2 S4 T4 M2
sequence destination dist to center of tool
no coordinates circle
feed rate spindle speed
preparatory
function
MISS. NEEPA M. PATEL, MPSTME miscellaneous function 28-02-2020
Types of Words
Miss Neepa M. Patel, MPSTME, Mumbai.
9
N - sequence number prefix
G - preparatory words
Example: G00 = PTP rapid traverse move
X, Y, Z - prefixes for x, y, and z-axes
F - feed rate prefix
S - spindle speed
T - tool selection
M - miscellaneous command
Example: M07 = turn cutting fluid on
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
10
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
G-codes
Miss Neepa M. Patel, MPSTME, Mumbai.
11 G00 - Rapid move (not cutting)
G01 - Linear move
G02 - Clockwise circular motion
G03 - Counterclockwise circular motion
G04 - Dwell
G05 - Pause (for operator intervention)
G08 - Acceleration
G09 - Deceleration
G17 - x-y plane for circular interpolation
G18 - z-x plane for circular interpolation
G19 - y-z plane for circular interpolation
G20 - turning cycle or inch data specification
G21 - thread cutting cycle or metric data specification
G24 - face turning cycle
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
G-codes
Miss Neepa M. Patel, MPSTME, Mumbai.
12
G25 - wait for input to go low
G26 - wait for input to go high
G28 - return to reference point
G29 - return from reference point
G31 - Stop on input
G33-35 - thread cutting functions
G35 - wait for input to go low
G36 - wait for input to go high
G40 - cutter compensation cancel
G41 - cutter compensation to the left
G42 - cutter compensation to the right
G43 - tool length compensation, positive
G44 - tool length compensation, negative
G50 - Preset position
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
G-codes
Miss Neepa M. Patel, MPSTME, Mumbai.
13 G71 - set metric units or stock removal
G72 - indicate finishing cycle
G72 - 3D circular interpolation clockwise
G73 - turning cycle contour
G73 - 3D circular interpolation counter clockwise
G74 - facing cycle contour
G74.1 - disable 360 deg arcs
G75 - pattern repeating
G75.1 - enable 360 degree arcs
G76 - deep hole drilling, cut cycle in z-axis
G77 - cut-in cycle in x-axis
G78 - multiple threading cycle
G80 - fixed cycle cancel
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
G-codes
Miss Neepa M. Patel, MPSTME, Mumbai.
14 G81-89 - fixed cycles specified by machine tool manufacturers
G81 - drilling cycle
G82 - straight drilling cycle with dwell
G83 - drilling cycle
G83 - peck drilling cycle
G84 - taping cycle
G85 - reaming cycle
G85 - boring cycle
G86 - boring with spindle off and dwell cycle
G89 - boring cycle with dwell
G90 - absolute dimension program
G91 - incremental dimensions
G92 - Spindle speed limit
G93 - Coordinate system setting
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
G codes
Miss Neepa M. Patel, MPSTME, Mumbai.
15
G94 - Feed rate in mm/min.
G95 - Feed rate in
G96 - Surface cutting speed
G97 - Rotational speed rpm
G98 - withdraw the tool to the starting point or feed per minute
G99 - withdraw the tool to a safe plane or feed per revolution
G101 - Spline interpolation
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
M-Codes control machine functions.
Miss Neepa M. Patel, MPSTME, Mumbai.
16
M00 - program stop
M01 - optional stop using stop button
M02 - end of program
M03 - spindle on CW
M04 - spindle on CCW
M05 - spindle off
M06 - tool change
M07 - fluid with coolant
M08 - mist with coolant
M08 - turn on accessory (e.g. AC power outlet)
M09 - coolant off
M09 - turn off accessory
M10 - turn on accessory
M11 - turn off accessory or tool change
M17 - subroutine end
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
M-Codes control machine functions.
Miss Neepa M. Patel, MPSTME, Mumbai.
17
M20 - tailstock back
M20 - Chain to next program
M21 - tailstock forward
M22 - Write current position to data file
M25 - open chuck
M25 - set output #1 off
M26 - close chuck
M26 - set output #1 on
M30 - end of tape (rewind)
M35 - set output #2 off
M36 - set output #2 on
M38 - put stepper motors on low power standby
M47 - restart a program continuously, or a fixed number of times
M71 - puff blowing on
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
M-Codes control machine functions.
Miss Neepa M. Patel, MPSTME, Mumbai.
18
M72 - puff blowing off
M96 - compensate for rounded external curves
M97 - compensate for sharp external curves
M98 - subprogram call
M99 - return from subprogram, jump instruction
M101 - move x-axis home
M102 - move y-axis home
M103 - move z-axis home
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
G-Codes (Preparatory Functions)
Miss Neepa M. Patel, MPSTME, Mumbai.
19
G00 Rapid positioning
G01 Linear interpolation
G02 Circular interpolation clockwise (CW)
G03 Circular interpolation counter clockwise (CCW)
G17 XY plane selection ,Z = tool Axis
G28 Zero Return or home position of the tool
G33 Thread cutting
G40 Cutter dia. compensation cancel
G41 Cutter dia. compensation left
G42 Cutter dia. compensation right
G43 Tool length compensation positive (+) direction
G44 Tool length compensation minus (-) direction
G49 Tool length compensation cancels
G71 metric mode programming
G90 Absolute programming
G91 Incremental programming
G94 Feed Rate programming in mm/min
G95 Feed Rate mm per revolution
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Basic of part programming
Miss Neepa M. Patel, MPSTME, Mumbai.
20
Rapid Positioning G00 Linear Interpolation G01
This is to command the cutter to move from This is to command the cutter to move from the
the existing point to the target point at the existing point to the target point along a
fastest speed of the machine straight line at the speed designated by the F
(feed rate) address.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Basic of part programming
Miss Neepa M. Patel, MPSTME, Mumbai.
21
This is to command the cutter to move from the existing point to the target point
along a circular arc in clockwise direction or counter clockwise direction.
G03
G02
Clockwise Circular Interpolation Counter Clockwise Circular Interpolation
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Cutter Offset
Miss Neepa M. Patel, MPSTME, Mumbai.
22
Cutter path must be offset from actual part outline by a
distance equal to the cutter radius
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Cutter dia. compensation
Miss Neepa M. Patel, MPSTME, Mumbai.
23
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Cutter Radius. Compensation
Miss Neepa M. Patel, MPSTME, Mumbai.
24
Cutter radius compensation on left G41. i.e.
the cutter stays to the left of the programmed
path when the tool radius is positive.
To turn cutter radius compensation on right
G42. i.e. the cutter stays to the right of the
programmed path when the tool radius is
positive.
In short if left to right movement then G41 and
right to left G42.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Cutter dia. compensation
Miss Neepa M. Patel, MPSTME, Mumbai.
25
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Tool length compensation: G43
Miss Neepa M. Patel, MPSTME, Mumbai.
26
The distance of a given tool tip from the surface of
the work piece is known as tool length offset
“H”.(H01,H02,H03….)
When the particular tool is called, the necessary
information for the tool offset is called from the
tool register( i.e. register no.H01).
Meanwhile the tool length compensation is
activated by using G43. The MCU then shifts the Z
axis by the amount stored in offset register( in this
fig. 10 mm offset from work piece).G43 is used to
communicate the length of tool registered in
register number H01 to the MCU.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Tool length compensation: G43
Miss Neepa M. Patel, MPSTME, Mumbai.
27
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
28 Tool length compensation and Tool
Dia. Compensation ON
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
29 Tool length compensation
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
M-Codes (Miscellaneous Functions)
Miss Neepa M. Patel, MPSTME, Mumbai.
30
M02 End of program
M03 Spindle start (forward CW)
M04 Spindle start (reverse CCW)
M05 Spindle stop
M06 Tool change
M08 Coolant on
M09 Coolant off
M10 Chuck - clamping
M11 Chuck - unclamping
M12 Tailstock spindle out
M13 Tailstock spindle in
M17 Tool post rotation normal
M18 Tool post rotation reverse
M30 End of tape and rewind or main program end or End of the program.
M98 Transfer / call to subprogram
M99 End of subprogram
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
CNC Drilling and milling Operations
Miss Neepa M. Patel, MPSTME, Mumbai.
31
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
1.)Write a part programming by using G codes and M
Miss Neepa M. Patel, MPSTME, Mumbai.
32 codes for below fig. and consider necessary sizes for
drilling operation.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
1.) Drilling operation. Assume Feed rate 200 mm/min. and Spindle speed
600 rpm.
Miss Neepa M. Patel, MPSTME, Mumbai.
33 N01 G90 G94 G71 G17 G49 ;
N02 M03 M08 T01 F200 S600;(T01 DRILLING TOOL DIA. 10 MM)
N03 G00 X10 Y10 G43 H01 Z5;
N04 G01 Z-10 F200;
N05 G00 Z5;
N06 G00 X90 Y10; N17 G00 G43 H02 Z10;
N07 G01 Z-10 F200; N18 G00 X50 Y50 M03 M08;
N19 G01 Z-10 F200;
N08 G00 Z5;
N20 G00 X200 Y200 Z10 G49 M05 M09 ;
N09 G00 X90 Y90 N21 G28 U0 V0 ;
N10 G01 Z-10 F200; N22 M30;
N11 G00 Z5;
N12 G00 X10 Y90;
N13 G01 Z-10 F200;
N14 G00 X0 Y0 Z5 G49 M05 M09;
N15 G28 U0 V0 ; MISS. NEEPA M. PATEL, MPSTME
N16 M06 T02 F200 S600 ;(T02 DRILLING TOOL DIA. 20 MM) 28-02-2020
2.)Write a part programming by using G codes and M codes for
Miss Neepa M. Patel, MPSTME, Mumbai.
34 below fig. and consider necessary sizes for drilling and milling
operation.(Thickness of the work piece is 10 mm)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
2.) Only Drilling operation. Assume Feed rate 200 mm/min. and
Spindle speed 600 rpm.
Miss Neepa M. Patel, MPSTME, Mumbai.
35 N01 G90 G94 G71 G17 G49 ;
N02 M03 M08 F200 S600 T01;(T01 DRILLING TOOL DIA. 8 MM)
N03 G00 X20 Y30 G43 H01 Z10;
N12 G00 G43 H02 Z10;
N04 G01 Z-10 F200; N13 G00 X90 Y10 M03 M08;
N05 G00 Z10; N14 G01 Z-10 F200;
N15 G00 Z10;
N06 G00 X20 Y60 ; N18 G00 X90 Y30 ;
N07 G01 Z-10 F200; N17 G01 Z-10 F200;
N18 G00 Z10 ;
N08 G00 Z10 ;
N19 G00 X0 Y0 G49 M05 M09 ;
N09 G00 X0 Y0 G49 M05 M09 ; N20 G28 U0 V0;
N21 M30;
N10 G28 U0 V0;
N11 M06 F200 S600 T02 ;(T02 DRILLING TOOL DIA. 6 MM)
using
MISS. NEEPA M. PATEL, MPSTME
G43/G49
28-02-2020
2.) Only Drilling operation. Assume Feed rate 200 mm/min. and
Spindle speed 600 rpm. W/P thickness 10mm.
Miss Neepa M. Patel, MPSTME, Mumbai.
36 N01 G90 G94 G71 G17 ;
N02 M03 M08 F200 S600 T01;(T01 DRILLING TOOL DIA. 8 MM)
N03 G00 X20 Y30 Z5; (5 mm offset distance)
N12 G00 Z5;
N04 G01 Z-10 F200; N13 G00 X90 Y10 M03 M08;
N05 G00 Z5; N14 G01 Z-10 F200;
N15 G00 Z5;
N06 G00 X20 Y60 ; N18 G00 X90 Y30 ;
N07 G01 Z-10 F200; N17 G01 Z-10 F200;
N18 G00 Z5 ;
N08 G00 Z5 ;
N19 G00 X0 Y0 M05 M09 ;
N09 G00 X0 Y0 M05 M09 ; N20 G28 U0 V0;
N21 M30;
N10 G28 U0 V0 ;
N11 M06 F200 S600 T02 ;(T02 DRILLING TOOL DIA. 6 MM)
Without
MISS. NEEPA M. PATEL, MPSTME
G43/G49
28-02-2020
2.) Milling and Drilling operation. Assume Feed rate 200 mm/min. and Spindle speed 600 rpm.
Miss Neepa M. Patel, MPSTME, Mumbai.
37 N01 G90 G94 G71 G17 G40 G49 ;
N02 M03 M08 F200 S600 T01;(T01 MILLING TOOL DIA. 10 MM)
N03 G43 H01 Z10;
N04 G42 G00 X0 Y0 ;
N05 G01 Z-10 F200;
N06 G01 X100 Y0 F200;
N07 G01 X100 Y40 F200;
N08 G01 X40 Y40 F200;
N09 G01 X40 Y75 F200 ;
N10 G01 X0 Y75 F200 ;
N11 G01 X0 Y0 F200;
N12 G00 Z10;
N13 G40 G49 M05 M09;
MISS. NEEPA M. PATEL, MPTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
38
N14 M06 F200 S600 T02 ;(T02 DRILLING TOOL DIA. 6 MM)
N15 G00 G43 H02 Z10;
N16 G00 X90 Y10 M03 M08;
N23 M03 M08 F200 S600 T03;(T03 Drilling tool dia. 8 mm )
N17 G01 Z-10 F200; N24 G43 H01 Z10;
N18 G00 Z0; N25 G00 X20 Y30;
N26 G01 Z-10 F200;
N19 G00 X90 Y30 ; N27 G00 Z10;
N20 G01 Z-10 F200; N28 G00 X20 Y60 ;
N29 G01 Z-10 F200;
N21 G00 Z10 ; N30 G00 Z10 ;
N22 G00 X0 Y0 G49 M05 M09 ; N31 G00 X0 Y0 G49 M05 M09 ;
N32 G28 U0 V0;
N33 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
3.) Write a part programming by using G codes and M codes for below
Miss Neepa M. Patel, MPSTME, Mumbai.
39 fig. Assume 10 mm diameter for milling cutter and consider necessary
sizes for drilling operation.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
3.) for Milling and Drilling operation. Assume Feed rate 200 mm/min. and
Spindle speed 600 rpm.
Miss Neepa M. Patel, MPSTME, Mumbai.
40
N01 G90 G94 G71 G49 ;
N02 M03 M08 F200 S600 T01;(T01 DRILLING TOOL DIA. 8 MM)
N03 G43 H01 Z10;
N04 G00 X10 Y10;
N05 G01 Z-10 F200;
N06 G00 Z10;
N07 G00 X90 Y30;
N08 G01 Z-10 F200;
N09 G00 Z10;
N10 G00 X0 Y0 M05 M09 G49;
N11 M06 M03 M08 G40 F200 S600 T02 ;(T02 MILLING TOOL DIA. 10 MM)
N12 G42 X0 Y0 G43 H02 Z10;
N13 G01 Z-10;
N14 G01 X70 Y0; MISS. NEEPA M. PATEL, MPSTME 28-02-2020
N15 G01 X70 Y20 F200 ;
Miss Neepa M. Patel, MPSTME, Mumbai.
41
N16 G01 X100 Y20 F200;
N17 G01 X100 Y 40 F200;
N18 G01 X50 Y 40 F200;
N19 G01 X50 Y20 F200;
N20 G01 X0 Y20 F200;
N21 G01 X0 Y0 F200;
N22 G00 Z10 G49 M05 M09;
N23 G00 X150 Y100;
N24 G28 U0 V0 G40 ;
N25 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
4.)Write a part programming by using G codes and M codes
Miss Neepa M. Patel, MPSTME, Mumbai.
42 for below fig. Assume 5 mm diameter for milling cutter and
consider necessary sizes for drilling operation
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
3.) For Milling operation, assume Feed rate 200 mm/min. and Spindle speed
600 rpm.
Miss Neepa M. Patel, MPSTME, Mumbai.
43
N01 G90 G94 G71 G40 G49 ;
N02 M03 M08 F200 S600 T01;(T01 MILLING TOOL DIA. 10 MM)
N03 G43 H02 Z10;
N04 G00 G42 X0 Y0;
N05 G01 Z-10 F200;
N06 G01 X120 Y0 F200;
N07 G02 X150 Y30 R30 F200;
N08 G01 X150 Y100 F200;
N09 G01 X50 Y100 F200;
N10 G01 X0 Y50 F200;
N11 G01 X0 Y0 F200; MISS. NEEPA M. PATEL, MPSTME 28-02-2020
N12 G00 Z10 ;
Miss Neepa M. Patel, MPSTME, Mumbai.
44
N13 M05 M09 G49;
N14 M06 M03 M08 F200 S600 T02 ;(T02 DRILLING TOOL DIA.10 MM)
N15 G00 X25 Y25 G43 H02 Z10;
N16 G01 Z-10;
N17 G00 Z10;
N18 G00 X125 Y75 ;
N19 G01 Z-10 F200;
N20 G00 Z10;
N21 G00 X300 Y300 G49 M05 M09;
N22 G28 U0 V0
N23 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
6. & 7)Write a NC part program to machine a component, shown in
Miss Neepa M. Patel, MPSTME, Mumbai.
45 fig., by using an end mill of 10 mm diameter. Assume suitable data for
machining parameters. Consider work piece thickness is 12 mm.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
8 & 9.)Write a CNC part program to machine a component, shown in
Miss Neepa M. Patel, MPSTME, Mumbai.
fig., by using an end mill of 10 mm diameter. Assume suitable data for
46
machining parameters. Consider work piece thickness is 10 mm.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
10.)Write a NC part program to machine a component,
Miss Neepa M. Patel, MPSTME, Mumbai.
47 shown in fig., by using an end mill of 10 mm diameter.
Assume suitable data for machining parameters. Consider
work piece thickness is 10 mm. (Note :- don’t use G40,G41
And G42)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
11.)Write a CNC part program to machine a
Miss Neepa M. Patel, MPSTME, Mumbai.
48
component, shown in fig., by using an end mill of 10
mm diameter. Assume suitable data for machining
parameters.
(Note :- don’t use
G40,G41 And G42)
MISS. NEEPA M. PATEL, MPSTME
28-02-2020
12.)Develop a CNC program, using G and M code, to cut a slot for the
Miss Neepa M. Patel, MPSTME, Mumbai.
49 component shown in fig., by using an end mill of diameter 6 mm. The
depth of slot is 2 mm. Assume suitable data for feed, speed etc.
work piece thickness is 10mm.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
13.)Write a CNC part program to machine a component, shown in fig.,
by using an end mill of 10 mm diameter. work piece size is 50 x 90 x
Miss Neepa M. Patel, MPSTME, Mumbai.
50 20 mm. The depth of slot is10 mm. For creating “S” slot ,assume
suitable data for machining parameters.
(Note :- don’t use G40,G41
And G42
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Write a CNC part program to machine a component,
Miss Neepa M. Patel, MPSTME, Mumbai.
51
shown in fig., by using an end mill of 6 mm diameter.
The work piece thickness is 10 mm. Assume suitable
data for machining parameters.
28-02-2020
MISS. NEEPA M. PATEL, MPSTME
14.)Write a CNC part program to machine a component, shown in fig.,
Miss Neepa M. Patel, MPSTME, Mumbai.
52
by using an end mill of 10 mm diameter. work piece size is 100 x 60 x
10 mm. Assume suitable data for machining parameters.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
CNC Turning Operation
53
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Turning operation
Miss Neepa M. Patel, MPSTME, Mumbai.
54
In a diameter programming mode the X axis coordinate references
to the diameter of the job. This means that for every 1 mm
programmed movement, the tool actually moves by 0.5 mm
radially.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Turning operation
Miss Neepa M. Patel, MPSTME, Mumbai.
55
G95 feed rate mm/rev
G21 metric mode
G90 Absolute method
G18 ZX plane selection
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
56 Turning Operation in CNC machine
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Turning Operation in CNC machine
Miss Neepa M. Patel, MPSTME, Mumbai.
57
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Turning Operation in CNC machine –G96
Miss Neepa M. Patel, MPSTME, Mumbai.
58
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Example for turning operation
Miss Neepa M. Patel, MPSTME, Mumbai.
59
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Example for turning operation
Miss Neepa M. Patel, MPSTME, Mumbai.
60
28-02-2020
MISS. NEEPA M. PATEL, MPSTME
Example for turning operation
Miss Neepa M. Patel, MPSTME, Mumbai.
61
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Example for turning operation
Miss Neepa M. Patel, MPSTME, Mumbai.
62
N01 G90 G95 G18 G21;
N02 M03 M08 F0.35 S600;
N03 G00 X22 Z0.5;
N04 G01 X0;
N05 G01 Z0;
N06 G01 X20;
N07 G00 X15;
N08 G01 Z-15;
N09 G01 X20 Z-20 F0.35;
N10 G01 Z-35;
N11 G00 X50 Z50;
N12 G28;
N13 M05 M09 ;
N14 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Taper Turning
Miss Neepa M. Patel, MPSTME, Mumbai.
63
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
For turning operation in CNC m/c
Miss Neepa M. Patel, MPSTME, Mumbai.
64
For step turning use For TAPPER turning use
G00 X50 Z2 G00 X50 Z2
G01 X25 Z-20;
G00 X25 Z0; G00 X60 Z60 ;
G01 Z-20; For tapper use G02/G03/G01 then
give X and Z distances together.
G00 X60 Z60 ;
For step turning give X and Z
distance separately.
And use G02/G03/G01 with Z
only. MISS. NEEPA M. PATEL, MPSTME 28-02-2020
For turning operation in CNC m/c
Miss Neepa M. Patel, MPSTME, Mumbai.
65
For TAPPER turning use
G00 X50 Z2
G01 X25 Z-20;
G00 X60 Z60 ;
For tapper use G02/G03/G01
then give X and Z distances
together.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
66 1.)Write a manual part program for finishing component as
shown in fig. Assume the speed and feed on the turning centre
as 400 r.p.m. and 0.35 mm/rev respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
67
N01 G90 G95 G18 G21;
N02 M03 M08 F0.35 S400;
N03 G00 X40 Z2;
N04 G01 X20 ;
N05 G01 Z-30 ;
N06 G01 X30 ;
N07 G01 Z-60 ;
N08 G01 X40 ;
N09 G00 X50 Z10 M05 M09 ;
N10 G28;
N11 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
2.) Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
68 as shown in fig. Assume the speed and feed on the turning
centre as 400 r.p.m. and 0.35 mm/rev respectively.
N01 G90 G95 G18 G21;
N02 M03 M08 F0.35 S400;
N03 G00 X40 Z2;
N04 G01 Z-20 ;
N05 G02 X0 Z0 R20 F0.35 ;
N06 G00 X50 Z10 M05 M09 ;
N07 G28;
N08 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
4.)Write a manual part program for finishing component as
Miss Neepa M. Patel, MPSTME, Mumbai.
69 shown in fig. Assume the speed and feed on the turning
centre as 400 r.p.m. and 0.35 mm/rev respectively.
N01 G90 G95 G18 G21;
N02 M03 M08 F0.35 S400;
N03 G00 X50 Z2;
N04 G01 Z-20 ;
N05 G03 X10 Z0 R20 F0.35 ;
N06 G00 X60 Z10 M05 M09 ;
N07 G28;
N08 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
5.)Write a manual part program for finishing component as
Miss Neepa M. Patel, MPSTME, Mumbai.
70 shown in fig. Assume the speed and feed on the turning
centre as 400 r.p.m. and 0.35 mm/rev respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
71
N01 G90 G95 G18 G21;
N02 M03 M08 F0.35 S400;
N03 G00 X50 Z2;
N04 G01 X0 ;
N05 G01 Z0 ;
N06 G01 X50 ;
N07 G01 X12 ;
N08 G01 Z-18;
N09 G01 X20 Z-23 ;
N10 G01 Z-40;
N11 G01 X50 Z-50;
N12 G00 X60 Z10 M05 M09 ;
N13 G28;
N14 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
6.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
72 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev respectively.
N01 G90 G95 G18 G21;
N02 M03 M08 F0.35 S400;
N03 G00 X100 Z2;
N04 G01 X0 ;
N05 G01 Z0 ;
N06 G01 X100 ;
N07 G01 X50 ;
N08 G01 Z-25 ;
N09 G02 X60 Z-30 R5;
N10 G01 Z-60;
N11 G01 X100 Z-80 F0.35;
N12 G00 X120 Z10 M05 M09;
N13 G28;
N14 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
7.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
73 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
8.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
74 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
9.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
75 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Solution :09 OR
Miss Neepa M. Patel, MPSTME, Mumbai.
76
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
10.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
77 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
11.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
78 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Solution :11
Miss Neepa M. Patel, MPSTME, Mumbai.
79 N01 G90 G95 G18 G21 M03 M08 F0.35 S400;
N02 G00 X60 Z2;
N03 G01 X0;
N04 G01 Z0;
N05 G01 X26;
N06 G01 X35 Z-10 F0.35;
N07 G01 Z-40;
N08 G01 X50;
N09 G03 X60 Z-45 R5 F0.35;
N10 G01 Z-50
N11 G00 X70 Z70 M05 M09;
N12 G28;
N13 M30;
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
12.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
80 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
13.)Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
81 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
14.) Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
82 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Write a part program using G - code and M - Code for finishing a forged
component as shown in fig. Assume the speed and feed on the turning center are
Miss Neepa M. Patel, MPSTME, Mumbai.
83 200 rpm and 0.35 mm/rev. Illustrate the meaning of each code used in the
program. All dimensions are in mm.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
N20 G00 G95 G21; (Rapid, Per Revolution Feed Rate, Metric Mode)
Miss Neepa M. Patel, MPSTME, Mumbai.
N40 S500 M03 M07; (Spindle Speed 500 rpm, Clockwise ON, Coolant
84 ON)
N50 G00 X36. Z0. ; (Rapid to point 1)
N60 G01 X40 Z-2. F0.3; (Finish turn till point 2 at 0.3 mm/spindle
revolution)
N70 Z-7.; (Finish turn till point 3)
N80 X36. Z-15.; (Finish turn till point 4)
N90 X40. Z-17.; (Finish turn till point 5)
N100 Z-22.; (Finish turn till point 6)
N110 G03 X40. Z-42. R40. ; (Anticlockwise Interpolation, End points, Radius,
point 7)
N120 G02 X50. Z-47. R5. ; (Clockwise Interpolation, End points, Radius,
point 8)
N130 G00 X52. ; (Rapid retrieval till point 9)
N140 G28 U0. W0. M09; (Return to Home Zero, Coolant OFF)
N150 M05; (Spindle OFF)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
N160 M30; (Signals end of Program or Reset Tape Mode)
Miss Neepa M. Patel, MPSTME, Mumbai.
85
28-02-2020
MISS. NEEPA M. PATEL, MPSTME
16.) Write a manual part program for finishing component
Miss Neepa M. Patel, MPSTME, Mumbai.
86 as shown in fig. Assume the speed and feed on the
turning centre as 400 r.p.m. and 0.35 mm/rev
respectively.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Write a manual part program for finishing component as
Miss Neepa M. Patel, MPSTME, Mumbai.
87 shown in fig. Assume the speed and feed on the turning
centre as 400 rpm. and 0.35 mm/rev respectively.
http://www.helmancnc.com/g02-g03-g-code-circular-interpolation-example-program/
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Extra slides for understand the part programs
Miss Neepa M. Patel, MPSTME, Mumbai.
88
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
Three Major Phases of A CNC Program (Extra slides for understand the part programs)
89
• The following shows the three major phases of a CNC program.
%
: 1001 Program set up
N5 G90 G20
N10 M06 T2
N15 M03 S1200
N20 G00 X1.00 Y1.00
N25 Z0.125
N30 G01 Z-0.125 F5.0
Material removal
N35 G01 X2.0 Y2.0
N40 G00 Z1.0
N45 X0 Y0
N50 M05 System shutdown
N55 M30
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
(Extra slides for
understand the part
Miss Neepa M. Patel, MPSTME, Mumbai.
90 programs)
1. Program Setup
The program setup contains all the instructions that prepare the
machine for operation.
% Program start flag
: 1001 Four-digit program number
N5 G90 G20 Use absolute units and inch programming
N10 M06 T2 Stop for tool change, use tool #2
N15 M03 S1200 Turn the spindle on CW to 1200 rpm
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
(Extra slides for
understand the
Miss Neepa M. Patel, MPSTME, Mumbai.
91 part programs)
2. Material Removal
The material removal phase deals exclusively with the actual cutting
feed moves.
N20 G00 X1.0 Y1.0 Rapid move to (X1, Y1) from origin
N25 Z0.1 Rapid down to Z1.0 just above the part
N30 G01 Z-0.125 F5.0 Feed down to Z-0.125 at 5 ipm
N35 X2.0 Y2.0 Feed diagonally to X2 and Y2
N40 G00 Z1.0 Rapid up to Z1 (clear the part)
N45 X0 Y0 Rapid back home X0 Y0
3. System shutdown
The system shutdown phase contains the G- and M-codes that turn
off all the options that were turned on in the setup phase.
N50 M05 Turn the spindle off
N55 M30 End of program
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Manual Part Programming Example
Miss Neepa M. Patel, MPSTME, Mumbai.
(Extra slides
92
for understand
5” the part
2.5” programs)
p4
p2 p3 p5
1”
Tool size = 0.25 inch,
5” Feed rate = 6 inch per minute,
Cutting speed = 300 rpm,
Tool start position: 2.0, 2.0
Programming in inches
45°
(4, 4)
p1 Motion of tool:
p0 p1 p2 p3 p4 p5 p1 p0
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
1. Set up the programming parameters
Miss Neepa M. Patel, MPSTME, Mumbai.
93
(Extra slides for
5”
understand the part
2.5”
p3
p4
p5
programs)
p2
1”
Programming in inches
5”
Use absolute coordinates
Feed in ipm
45°
N010 G70 G90 G94 G97 M04
(4, 4)
p1
Spindle speed in rpm
p0 (2, 2)
Spindle CCW
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
2. Set up the machining conditions
Miss Neepa M. Patel, MPSTME, Mumbai.
94 (Extra slides for understand the
5” part programs)
2.5”
p4
p2 p3 p5
1”
Machine moves in XY-plane
Use full-circle interpolation
5”
Feed rate
Spindle speed
45°
N020 G17 G75 F6.0 S300 T1001 M08
(4, 4)
p1
Tool no.
p0 (2, 2) Flood coolant ON
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
3. Move tool from p0 to p1 in straight line
Miss Neepa M. Patel, MPSTME, Mumbai.
(Extra slides for
95
understand the
5”
2.5”
part programs)
p4
p2 p3 p5
Linear interpolation
1”
target coordinates
5” N030 G01 X3.875 Y3.698
45°
(4, 4)
p1
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
4. Cut profile from p1 to p2 (Extra slides for
Miss Neepa M. Patel, MPSTME, Mumbai.
96 understand the part
5” programs)
2.5”
p4
p2 p3 p5
1”
Linear interpolation
5” target coordinates
N040 G01 X3.875 Y9.125
45°
or
(4, 4)
N040 G01 Y9.125
p1
p0 (2, 2) X-coordinate does not change no need to program it
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
(Extra slides for
5. Cut profile from p2 to p3
Miss Neepa M. Patel, MPSTME, Mumbai.
understand the part
97 programs)
5”
2.5”
p2 p3
p4
p5 Linear interpolation
target coordinates
1”
N050 G01 X5.634 Y9.125
5”
y = 9 + 0.125 = 9.125
(6.5 - x)2 + 0.1252 = (1 - 0.125)2
x = 5.634
45° p3
(x, y)
(4, 4)
p1 (6.5, 9)
.125
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
1”
6. Cut along circle from p3 to p4
Miss Neepa M. Patel, MPSTME, Mumbai.
98
5” (Extra slides for
2.5” understand the
p4
p2 p3 p5 part programs)
1”
circular interpolation, CCW motion
5”
target coordinates
45° N060 G03 X7.366 Y9.125 I6.5 J9.0
(4, 4)
coordinates of center of circle
p1
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
7. Cut from p4 to p5
Miss Neepa M. Patel, MPSTME, Mumbai.
99
5”
2.5” (Extra slides for
p4
p2 p3 p5 understand the
part programs)
1”
5”
Linear interpolation
45° target coordinates (Y is unchanged)
(4, 4) N070 G01 X9.302
p1
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
8. Cut from p5 to p1 (Extra slides for
Miss Neepa M. Patel, MPSTME, Mumbai.
100 understand the part
5” programs)
2.5”
p4
p2 p3 p5
1”
5”
Linear interpolation
target coordinates (see step 3)
45°
N080 G01 X3.875 Y3.698
(4, 4)
p1
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
9. Return to home position, stop program (Extra slides for
Miss Neepa M. Patel, MPSTME, Mumbai.
understand the part programs)
101
5”
2.5”
p4
p2 p3 p5
1”
Linear interpolation
5” target coordinates (see step 3)
N090 G01 X2.0 Y2.0 M30
45°
end of data
(4, 4)
N100 M00
p1
p0 (2, 2) program stop
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
University Questions
Miss Neepa M. Patel, MPSTME, Mumbai.
102 Short note on AS/RS & AGVs
Define FMS layout with its components and list down its adv.
and limitations.
Types of FMS Layout.
Write a note on NC tool motion control system.
Explain NC Coordinate system.
Adv. and Limitations of NC/CNC m/c tool system.
Types of Machining Centers for CNC/NC or According to Axis
and types of operations.
Elements/Components of NC m/c
Elements/Components of CNC m/c
Define Robots. Write down its components and list down its
application in current duration.
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Final
University Questions
Miss Neepa M. Patel, MPSTME, Mumbai.
103 Exam
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
Miss Neepa M. Patel, MPSTME, Mumbai.
104
MISS. NEEPA M. PATEL, MPSTME 28-02-2020