Upload
hanhan
View
254
Download
9
Embed Size (px)
Citation preview
CNC Machinery
Module 4: CNC Programming "Turning"
PREPARED BY
IAT Curriculum Unit
August 2009
© Institute of Applied Technology, 2009
ATM 313 – CNC
Module 4: CNC Programming "Turning"
2
ATM 313 – CNC
Module 4: CNC Programming "Turning"
3
Module 4: CNC Programming "Turning"
Module Objectives:
1. Identify the different parts that compose the program.
2. Utilize both preparatory functions (G-codes) and miscellaneous functions (M-codes).
3. Demonstrate the ability to write a program to manufacture a simple
workpiece using the MTS simulator.
4. Use some canned cycles in turning supported by the (SINUMERIK 840D) controller.
5. Utilize subprograms programs.
6. Verify the program graphically on the computer.
Module Contents
Topic Page No.
1 Structure of NC-program 4
2 Preparatory, additional and switching functions 5
3 How to write an NC program 7
4 Practical Tasks 12
ATM 313 – CNC
Module 4: CNC Programming "Turning"
4
1. . Structure of an NC Program:
The NC program consists of a series of commands with which the CNC
machine tool is instructed to manufacture a certain work part. Fig. 4.1
1.1 Program beginning: it consists of a character (%) which informs the
controller that an NC Program will follow. Everything stands before
this character is ignored by the controller.
The first line in the NC Program contains the program name.
1.2 Program core: it consists of a sequence of blocks (Lines). Each block
contains the technical and geometric information that the controller
requires for the correspondent machining step. It starts always with
the block Number (N) e.g. N10, then the instructions or commands
follow.
1.3 Program end: it consists of one block having one command which is
M30.
Fig. 4.1 Structure of an NC Program
ATM 313 – CNC
Module 4: CNC Programming "Turning"
5
2.Preparatory, additional and switching functions:
Four groups of instructions can be differentiated:
2.1 G-functions:
G functions are codes determine the geometric part of the NC
program. Some important G-Codes in the table below:
Function Description
G00 Rapid positioning; the tool will move to the target
point in rapid speed
G01 Feed rate positioning; the tool will move to the
target point according the feed rate speed
G02 Arc clockwise
G03 Arc counter clockwise
G04 Dwell; the tool will hold in place for a specific
amount of time, and then continues; e.g. G04 X5,
the tool will wait for 5 seconds.
G20 Inch units
G21 Metric units
G54 Work piece coordinate setting
G90 Absolute positioning; the tool will move to the
target point according to absolute dimensions.
G91 Incremental positioning; the tool will move to the
target point according to incremental dimensions.
G92 Max. Spindle speed limit.
G94 Feed rate (F) in mm/min., mainly for milling
G95 Feed rate (F) in mm/rev., mainly for turning
G96 Constant Cutting Speed
G97 Cancel Constant Cutting Speed
ATM 313 – CNC
Module 4: CNC Programming "Turning"
6
2.2 Coordinates (X, Y & Z): they are used in a block to locate the target
point where the tool should go. In turning machines, tools follow 2
axes only, X & Z.
2.3 Additional and switching functions:
Function Description
F Feed rate
S Speed
T Tool position
M3 Spindle rotation clockwise
M4 Spindle rotation counter clockwise
M5 Spindle stop
M6 Tool change
M7 Flood coolant #1 ON
M8 Flood coolant #2 ON
M9 Coolant OFF
M17 Subprogram end
M30 Program end
TRANS Zero point Shift
ATM 313 – CNC
Module 4: CNC Programming "Turning"
7
2.4 Cycles:
A cycle allows performing a complete machining operation by specifying
just one code.
Cycle Description
Cycle 81 Drilling; to make a hole in one phase.
Cycle 83 Deep Drilling (Pecking); to make a deep hole,
which requires introducing the tool with several
phases.(Chip-breaking and chip removal)
Cycle 93 Recessing; to make an internal or external groove.
Cycle 95 Canned cycle (roughing and finishing cycle); to
cut the material following a pre-set contour using a
subprogram.
Cycle 97 Tapping; to make an internal or external thread.
3. How to write an NC program:
The program beginning consists of a character or a command (ex. %) which informs the CNC-control that a NC-program will follow. The first line in the NC program contains the program name (ex. TP0147). The NC-program names can contain alphanumerical (containing letters and numbers) or numerical characters. For most CNC-controls, 2-6 digit character sequences are used for identification. An NC-program consists of order sequence of blocks. They contain the geometric and technical information that the CNC-control requires for each machining step. Everything stands before the character % for commenting the program is ignored by the control. Program end M30 The program end is commanded with M30. Important note Everything that stands before the character % for commenting the program is ignored by the control. Comments are also allowed within the program, these must be set in brackets.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
8
Example 1:
Rapid traverse in absolute
dimensioning.
N30 G90
N40 G00 X30 Z5
The tool will move to the target
point with rapid speed, following
the absolute dimensioning system
is shown in Fig. 4.2.
Example 2:
Rapid traverse in incremental
dimensioning.
N70 G91
N80 G00 X-12.5 Z-35
The tool will move to the target
point with rapid speed, following
the incremental dimensioning
system shown in Fig. 4.3.
Fig. 4.2: Rapid Traverse in absolute dimensioning.
Fig. 4.3: Rapid traverse in incremental
dimensioning.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
9
Example 3:
Feed rate traverse in absolute
dimensioning.
N120 G90
N130 G01 X140 Z-90
The tool will move in linear motion
to the target point with feed rate
speed, following the absolute
dimensioning system as illustrated
in Fig. 4.4.
Example 4:
Feed rate traverse in incremental
dimensioning.
N50 G91
N60 G01 X20 Z-60
The tool will move in linear motion
to the target point with feed rate
speed, following the incremental
dimensioning system as illustrated
in Fig. 4.5.
Fig. 4.4: Feed rate traverse in absolute dimensioning.
Fig. 4.5: Feed rate traverse in incremental dimensioning.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
10
Arcs clockwise and counter
clockwise.
When an arc is to be machined, the
interpolation parameters I, J & K
must be specified. These
parameters are used to define the
center of a circle for circular
movements as explained by Fig.
4.6.
• "I" is the distance between
the starting position and the
circle center in the X-
direction.
• "J" is the distance between
the starting position and the
circle center in the Y-
direction.
• "K" is the distance between
the starting position and the
circle center in the Z-
direction.
Since in turning there is no Y-axis,
then J is always zero and no need
to mention it in the block;
Fig. 4.6: I, and K parameters.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
11
Example 5:
Programming using G02 for
clockwise Arc. See Fig. 4.7
N50 G01 X80 Z-40
N60 G02 X140 Z-106 I+45 K-20
Example 6:
Programming using G03 for
Counterclockwise Arc. Refer to Fig.
4.8
N50 G01 X80 Z-50
N60 G03 X140 Z-80 I-15 K-45
Fig. 4.7: Programming using G02.
Fig. 4.8: Programming using G03.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
12
Practical Tasks
Practical Task (1)
Title: Facing
Create an NC program making 1 mm facing. The workpiece shown in the
drawing below is the finished part.
Parameters:
o Chuck type: outside.
o Chucking depth: 15 mm
o Material: Aluminum Almg1
o Zero point: right workpiece side
o Tool: Left Corner Tool, CL-SCLCL – 2020 L 1208 ISO30
o Max. spindle speed limit: 2000 RPM
o Constant cutting speed: 200 m/min
o Feed rate: 0.2 mm/rev.
o Spindle rotation: counter clockwise
ATM 313 – CNC
Module 4: CNC Programming "Turning"
13
*Hints:
1-To create an NC program, use the following procedure:
a. Setup form (tools) using setup mode; described in module 3.
b. Setup sheet using setup dialog; described in module 3.
c. Main program using editor.
2-While programming in “editor” you can always use the function
“renumber” to reorganize the blocks numbers.
3-You can use “shift + insert” to insert a new line above.
Solution:
N10 G54
N15 G92 S2000
N20 T1 D1 M6
N25 G96 S200 F0.2 M4
N30 G0 X43 Z0
N35 G1 X-2
N40 G1 Z2
N45 G0 X150 Z150
N50 M30
ATM 313 – CNC
Module 4: CNC Programming "Turning"
14
Practical Task (2)
Title: Turning
Using the same tool used in practical task (1), create an NC Program to
produce the finished workpiece shown in the drawing below. It is needed to
make a 1 mm facing operation prior to parallel turning; all dimensions are
in mm.
Parameters:
o Chuck type: outside.
o Chucking depth: 15 mm
o Material: Aluminum Almg1
o Zero point: right workpiece side
o Tool: Left Corner Tool, CL-SCLCL – 2020 L 1208 ISO30
o Max. spindle speed limit: 2000 RPM
o Constant cutting speed: 200 m/min.
o Feed rate: 0.3 mm/rev.
o Spindle rotation: counter clockwise
ATM 313 – CNC
Module 4: CNC Programming "Turning"
15
*Hint:
If the tool is moving along one axis, no need to mention the
coordinate on the second axis.
Possible solution:
N10 G54
N15 G92 S2000
N20 T1 D1 M6
N25 G96 S200 F0.3 M4
N30 G0 X42 Z0
N35 G1 X-2
N40 G1 Z2
N45 G0 X45 Z0
N50 G1 X38 Z0
N55 G1 X38 Z-40
N60 G1 X40 Z-40
N65 G0 X40 Z0
N70 G1 X36 Z0
N75 G1 X36 Z-40
N80 G1 X38 Z-40
N85 G0 X38 Z0
N90 G1 X34 Z0
N95 G1 X34 Z-40
N100 G1 X36 Z-40
N105 G0 X36 Z0
N110 G1 X32 Z0
N115 G1 X32 Z-40
N120 G1 X34 Z-40
N125 G0 X34 Z0
N150 G1 X30 Z0
ATM 313 – CNC
Module 4: CNC Programming "Turning"
16
N155 G1 X30 Z-40
N240 G1 X31 Z-40
N245 G0 X31 Z0
N250 G0 X150 Z150
N255 M30
Practical Task (3)
Title: Turning (using cycle 95)
Create an NC Program to produce the finished workpiece shown in the
drawing below using cycle 95. It is needed to make a 1 mm facing
operation prior to taper turning; all dimensions are in mm.
Parameters:
o Chuck type: outside.
o Chucking depth: 15 mm
o Material: Aluminum Almg1
o Zero point: right work part side
o Tools:
Pos#1: Left Corner Tool, CL-SCLCL – 2020 L 1208
Pos#2: Left Corner Tool, CL-SVJCL – 2020 L 1604
o Max. spindle speed limit: 2000 RPM
o Constant cutting speed: 200 m/min
o Feed rate: 0.3 mm/rev
o Spindle rotation: counter clockwise
ATM 313 – CNC
Module 4: CNC Programming "Turning"
17
Possible solution:
1-Subprogram (L1205):
Use the editor to write the following subprogram.
N20 G1 X40 Z0
N25 G1 X20 Z-40
N25 G1 X40 Z-40
N30 G1 X42 Z-40
N30 M17
Save the subprogram under the name L1205.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
18
2-Main program:
N10 G54
N15 G92 S2000
N20 T1 D1 M6
N25 G96 S200 F0.3 M4
N30 G0 X42 Z0
N35 G1 X-2
N40 G1 Z2
N45 G0 X42 Z2
N50 G0 X150 Z150
N55 T2 D1 M6
N60 G0 X42 Z2
N65 CYCLE95 ("L1205",2,0,0,0,0.2,0.1,0.1,1)
N70 G0 X150 Z150
N80 M30
ATM 313 – CNC
Module 4: CNC Programming "Turning"
19
Practical Task (4)
Title: Recessing (using Cycle 93)
Create an NC Program to produce the finished work part shown in the
drawing below. It is needed to make 1 mm facing operation and using cycle
95 for parallel turning. All dimensions are in mm. All chamfers are 1mm x
45°. (Use absolute dimensioning).
Parameters:
o Chuck type: outside.
o Chucking depth: 15mm
o Material: Aluminum Almg1
o Zero point: right work part side
o Tools:
Pos#1: Left Corner Tool, CL-SCLCL – 2020 L 1208
Pos#2: Recessing Tool, ER-SGTFL – 1212 L 1.85
o Max.spindle speed limit: 2000 RPM.
o Constant cutting speed: 200 m/min. for parallel turning and 125
for recessing.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
20
o Feed rate: 0.3 mm/rev. for parallel turning and 0.08 mm/rev.
for recessing.
o Spindle rotation: counter clockwise
*Hint:
You can use the “start-tag” / “end-tag” commands in “editor”
to copy/paste similar programs already done.
Possible solution:
1.Subprogram:
Use the editor to write the following subprogram.
N10 G1 X30 Z1
N15 G1 X30 Z0
N75 G1 X30 Z-60
N80 G1 X42 Z-60
N65 M17
Save the subprogram under the name L89.
2.Main program:
N10 G54
N15 G92 S2000
N20 T1 D1 M6
N25 G96 S200 F0.3 M4
N30 G0 X42 Z0
N35 G1 X-2
N40 G1 Z2
N45 G0 X42 Z2
N50 G1 X41 Z2
ATM 313 – CNC
Module 4: CNC Programming "Turning"
21
CYCLE95 ("L89",2,0.2,0.2,0.2,0.2,0.1,0.1,3)
N360 G1 X42 Z-39
N250 G0 X150 Z150
N255 T2 D1 M6
N260 G96 S125 F0.08 M4
N265 G0 X32 Z-10
N270 G1 X30 Z-10
N280 CYCLE93 (30,-10,7.5,2,0,0,0,-1,-1,0,0,0.2,0.3,1.5,1,5)
N285 G0 X32 Z-27.5
ATM 313 – CNC
Module 4: CNC Programming "Turning"
22
N290 G1 X30 Z-27.5
N295 CYCLE93 (30,-27.5,5,5,0,0,0,-1,-1,0,0,0.2,0.3,1.5,1,5)
N300 G1 X32 Z-42.5
N305 G1 X30 Z-42.5
N310 CYCLE93 (30,-42.5,7.5,2,0,0,0,-1,-1,0,0,0.2,0.3,1.5,1,5)
N315 G0 X150 Z150
N320 M30
ATM 313 – CNC
Module 4: CNC Programming "Turning"
23
Practical task (5)
Title: Threading (using cycle 97)
Create an NC Program to produce the finished work part shown in the
drawing below. It is needed to make 1 mm facing operation prior to parallel
turning. All dimensions are in mm.
Parameters:
o Chuck type: outside.
o Chucking depth: 15mm
o Material: Aluminum Almg1
o Zero point: right work part side
o Tools:
Pos#1: Left Corner Tool, CL-SCLCL – 2020 L 1208
Pos#2: Left Threading Tool, TL-LHTR –2020 R 60 2.5
o Max. spindle speed limit: 2000 RPM
o Constant cutting speed: 200 m/min. for parallel turning
o Spindle Speed for threading: 800 RPM
o Feed rate: 0.3 mm/rev.
o Spindle rotation: counter clockwise for parallel turning and
clockwise for threading
ATM 313 – CNC
Module 4: CNC Programming "Turning"
24
Possible solution:
1-Subprogram (L90): N10 G1 X20 Z2 N15 G1 X20 Z0 N75 G1 X20 Z-40 N80 G1 X40 Z-40 N55 M17 2-Main program: N10 G54
N15 G92 S2000
N20 T1 D1 M6
N25 G96 S200 F0.3 M4
N30 G0 X42 Z0
N35 G1 X-2
N40 G1 Z2
N45 G0 X41 Z2
N50 CYCLE95 ("L90",2,0.2,0.25,0,0.1,0.15,0.1,1)
N50 G0 X150 Z150
N250 T2 D1 M6
N255 M5
N260 G97 S800 F0.3 M4
ATM 313 – CNC
Module 4: CNC Programming "Turning"
25
N265 CYCLE97 (2.5,,0,-35,20,20,10,0,1.25,0.02,29,0,30,4,3,1)
ATM 313 – CNC
Module 4: CNC Programming "Turning"
26
((The following are the tables and information required to fill the
parameters of cycle 97))
IANG:
ATM 313 – CNC
Module 4: CNC Programming "Turning"
27
N270 G1 X70 Z0
N275 G0 X150 Z150
N270 M30
ATM 313 – CNC
Module 4: CNC Programming "Turning"
28
Practical task (6)
Title: CNC Turning Project.
Using the MTS Simulation software, create an NC Program in order to
manufacture the mechanical shaft shown in the technical drawing below.
1. Technical Drawing Overall diameter = 60mm; All chamfers are 1 x 45°
2. Machining Steps
a. Facing
b. Parallel Turning
c. Recessing
d. Threading
e. Center Drilling
f. Drilling
ATM 313 – CNC
Module 4: CNC Programming "Turning"
29
Hints:
• It is up to the programmer to choose the suitable setup
parameters according to the material and the dimensions
of the finished work part.
• Direction of rotation is related to the tool in use.
3. Programming Steps
a-Tools Preparation:
i.Tool in position 1 – Left Corner Tool CL-SCLCL – 2020 L 1208 ISO30
ii.Tool in position 5 – Recessing Tool
ER-SGTFL – 2012 L 02.00-0 ISO30
iii.Tool in position 6 – Left Threading Tool TL-LHTR – 2020 R 60 3.5 ISO30
iv.Tool in position 7 – Spotting Drill DR-15.00 034 L HSS ISO30
ATM 313 – CNC
Module 4: CNC Programming "Turning"
30
v.Tool in position 9 – Twist Drill DR-15.00 067 L HSS ISO30
b- Subprogram (L150):
N10 G1 X26 Z2
N15 G1 X30 Z-1
N20 G1 X30 Z-20
N25 G1 X33 Z-20
N30 G1 X35 Z-21
N35 G1 X35 Z-30
N40 G1 X38 Z-30
N45 G1 X40 Z-31
N50 G1 X40 Z-60
N55 G1 X41 Z-60
N60 G3 X45 Z-62 I0 K-2
N65 G1 X45 Z-70
N70 G1 X60 Z-100
N75 G1 X60 Z-110
N80 G1 X65 Z-110
N85 M17
ATM 313 – CNC
Module 4: CNC Programming "Turning"
31
C- Main Programming
i- Machine Setup: in order to set the machine, a setup sheet is created,
where all the following has to be mentioned:
1. Chucking device
2. Chuck’s dimensions
3. Chucking depth
4. Blank part’s dimensions
5. Material
6. Zero point location
7. Tool’s set
1-Selecting the chuck type
ATM 313 – CNC
Module 4: CNC Programming "Turning"
32
2- Defining workpart dimensions, material and zero point
3- Selecting tool equipment
ATM 313 – CNC
Module 4: CNC Programming "Turning"
33
The following is the automatically generated Setup Sheet: {) {{ 15.04.2008 14:47 { { CONFIGURATION { MACHINE MTS01 TM-016_-R1_-060x0646x0920 { CONTROL SINUMERIK 840DT { { PART { CYLINDER D+060.000 L+142.000 { MATERIAL "N\Aluminium\AlMg1" { DENSITY 002.70 { { MAIN SPINDLE WITH WORKPART { CHUCK "Chuck Turning\Jaw chuck\KFD-HS 130" { STEP JAW "Jaw\Step jaw\HM-110_130-02.003" { CHUCKING DEPTH E25.000 {{ Right side of the part: Z+235.000 { { TOOLS { T01 "DIN69880 V 30\Left corner tool\CL-SCLCL-2020 L 1208 ISO30" { T02 EMPTY { T03 EMPTY { T04 EMPTY { T05 "DIN69880 V 30\Recessing tool\ER-SGTFL-2012 L 02.0-0 ISO30" { T06 "DIN69880 V 30\Left threading tool\TL-LHTR-2020 R 60 3.50 ISO30" { T07 "DIN69880 V 30\Spotting drill\DR-15.00 034 L HSS ISO30" { T08 EMPTY { T09 "DIN69880 V 30\Twist drill\DR-15.00 067 L HSS ISO30" { T10 EMPTY { T11 EMPTY { T12 EMPTY { T13 EMPTY { T14 EMPTY { T15 EMPTY { T16 EMPTY { { TOOL COMPENSATION { D01 T01 Q3 R000.800 X+070.000 Z+045.000 G000.000 E005.005 I-000.800 K-000.800 A+004.375 L011.855 N01 { D02 T02 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D03 T03 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000
ATM 313 – CNC
Module 4: CNC Programming "Turning"
34
I+000.000 K+000.000 A+000.000 L000.000 N01 { D04 T04 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D05 T05 Q3 R000.200 X+060.000 Z+041.000 G002.000 E000.000 I-000.200 K-000.200 A+000.000 L012.000 N01 { D06 T06 Q8 R000.505 X+070.000 Z+042.699 G000.000 E000.000 I-000.505 K+000.000 A+000.000 L000.000 N01 { D07 T07 Q7 R000.000 X+000.000 Z+106.000 G015.000 E045.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D08 T08 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D09 T09 Q7 R000.000 X+000.000 Z+140.000 G015.000 E059.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D10 T10 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D11 T11 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D12 T12 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D13 T13 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D14 T14 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D15 T15 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { D16 T16 Q0 R000.000 X+000.000 Z+000.000 G000.000 E000.000 I+000.000 K+000.000 A+000.000 L000.000 N01 { { WORKPART ZEROPOINTS {{ Right side of the part: Z+235.000 { G54 X000.000 Z+233.000 { {) ii- Main Program: N10 G54
N15 G92 S2000
N20 G00 X150 Z150
ATM 313 – CNC
Module 4: CNC Programming "Turning"
35
a-Facing
N25 T1D1 M6
N30 G96 S200 F0.2 M4
N35 G00 X65 Z0
N40 G01 X-2
N45 G01 Z2
b-Parallel Turning
N50 G00 X26 Z5
ATM 313 – CNC
Module 4: CNC Programming "Turning"
36
N55 CYCLE95 ("L150",2,0,0,,0.2,0.1,0.1,1)
N60 G00 X150 Z150 c- Recessing
N65 T5 D1 M6
N70 G96 S125 F0.08 M4
N75 G00 X45 Z-50
N80 CYCLE93 (40,-50,5,2.5,0,0,0,-1,-1,0,0,0.2,0.3,0.5,1,5)
N85 G00 X45 Z-35
N90 CYCLE93 (40,-35,5,2.5,0,0,0,-1,-1,0,0,0.2,0.3,0.5,1,5)
N95 G00 X150 Z150
ATM 313 – CNC
Module 4: CNC Programming "Turning"
37
d- Threading
N100 T6 D1 M6
N110 M5
N115 G97 S1000 M3
N120 G00 X35 Z10
N125 CYCLE97 (,30,0,-15,30,30,8,0,2.15,0.02,29,0,15,3,3,1)
N130 G00 X150 Z150
e- Center Drilling
N135 T7 D1 M6
N140 M5
N145 G96 S100 M4
N150 G00 X0 Z5
N155 G01 Z-5
N160 G01 Z5
N165 G00 X150 Z150
ATM 313 – CNC
Module 4: CNC Programming "Turning"
38
f- Drilling
N170 T9 D1 M6
N175 G96 S1000 F0.2 M4
N180 G00 X0 Z5
N185 G01 Z-15
N190 G01 Z5
N230 G00 X150 Z150
N235 M30
Finished Part
ATM 313 – CNC
Module 4: CNC Programming "Turning"
39
Student's Notes:
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
ATM 313 – CNC
Module 4: CNC Programming "Turning"
40
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
ATM 313 – CNC
Module 4: CNC Programming "Turning"
41
Work Sheet
Part (A):
1.Write (T) for true and (F) for false following statements:
1. The character (%) informs the controller that an NC
program will follow.
2. Everything before (%) is processed by the controller.
3. The first line in an NC program is the Number (N)
4. The first line in a block is the program’s name
5. An NC program is a sequence of blocks
2. Complete the following sentences:
1- The ____________________ consists of a series of commands with which the CNC machine tool is instructed to manufacture a certain work part. 2- ___________________ is the first word in a block. 3- The _____________________ are codes determine the geometric
part of the NC-program.
4- A ___________________ allows performing a complete machining
operation by specifying just one code.
5- Everything stands before ___________ is ignored by the control.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
42
Part (B):
1. Complete the following tables:
Function Description
F
S
Tool position
M3
M4
M5
Tool change
Coolant OFF
M30
Function Description
G00
G01
G02
G03
G90
Incremental positioning
ATM 313 – CNC
Module 4: CNC Programming "Turning"
43
Part (C):
a - Write a block to move the cutting tool from starting point to target point using feed rate positioning and incremental mode.
N20 ………………………………………………
N30 ……………………………………………..
. B - Write a command to move the tool tip from starting point to target point Using rapid positioning and absolute mode.
N20 ………………………………………………
N30 ……………………………………………..
ATM 313 – CNC
Module 4: CNC Programming "Turning"
44
C - Complete the following NC program blocks using absolute dimensioning mode.
N20 ………………………………………………
N30 …………………………………………….. D - Complete the following NC program blocks using absolute dimensioning mode.
N20 …………………………………………………
N30 ………………………………………………..
ATM 313 – CNC
Module 4: CNC Programming "Turning"
45
Part (D): 1. What is the G code used to select the metric units of measurement?
a. G21 b. G20 c. G96 d. G19
2. What is the M code used to switch on the coolant?
a. M03 b. M08 c. M04 d. M09
3. What is the M code used to end a subprogram? a. M17 b. M05 c. M30 d. M02
4. In TOPTURN editor, "shift+insert" is used to:
a. Delete a line
b. Create a line below
c. Create a line above
d. None of the above
5. While programming in MTS "editor" the function ___________________
is used to reorganize the blocks numbers.
a. Dialog program
b. Renumber
c. Link programs
d. WOP
ATM 313 – CNC
Module 4: CNC Programming "Turning"
46
6. Match each code with its function. Write the corresponding
number in the space provided.
1 G96 _____ Feed in mm/min.
2 M07 ______ Constant cutting speed
3 G94 ______ Feed in mm/rev.
4 G20 ______ Coolant ON
5 G95 ______ Input inch units
7. Complete the following table:
Cycle Description
Tapping (threading) cycle
Roughing and finishing cycle
Deep drilling cycle
Recessing cycle
ATM 313 – CNC
Module 4: CNC Programming "Turning"
47
Part (E) 1. Write a program to do facing by cutting only 1 mm (at Z0) for the work part shown in the figure. Given that:
Work part diameter D= 50 mm Tool = T03 Constant cutting Speed = 300 m/min in
counterclockwise direction. Max. spindle speed = 2000 RPM Feed = 0.2 mm/rev
2. Write a short program to produce the shape shown below:
Needed: To do 1mm facing (Z=-1) then straight turning according to the drawing above, using one tool. Given: - Blank diameter 54 mm
Speed limit: 2000 RPM Constant speed: 200 m/min in counterclockwise direction. Feed Rate: 0.02 mm/min.
ATM 313 – CNC
Module 4: CNC Programming "Turning"
48
N15 G54
N20 _________________________
N30 _________________________
N40 _________________________
N50 _________________________
N55 _________________________
N60 _________________________
N70 _________________________
N80 _________________________
N90 _________________________
N100 ________________________
N110 ________________________
N120 ________________________
2. Read the following NC-program carefully, then answer the questions below: N310 G54
N315 G92 S3000
N320 T1 D1
N325 G96 S200 F0.2 M4
N330 G0 X42 Z0
N335 G1 X-2
N340 G1 Z2
N345 G0 X100 Z100
N350 T2 D1
N355 G0 X20 Z5
N360 CYCLE95 ("L142",2,0,0,,0.2,0.15,0.1,1)
ATM 313 – CNC
Module 4: CNC Programming "Turning"
49
N365 G0 X70 Z70
N370 T5 D1
N375 G0 X21 Z2
N380 M5
N385 M3
N390 CYCLE97 (,20,0,-35,20,20,10,0,1.53,,29,0,30,4,3,1)
N395 G0 X100 Z100
N400 M30
1. From the program shown above, the maximum spindle speed
is__________
A.2000 RPM
B.1500 RPM
C.3000 RPM
. D.2500RPM
2. G00 X100 Z100 Means
A. tool changing point
B. zero point shift
C. cutting speed and feed rate rotation direction for finishing
. D. constant spindle speed and rotation direction
3. In the block N360 CYCLE95 ("L142",2,0,0,,0.2,0.15,0.1,1), L142 means
A. main program
B. subprogram
C. depth of cutting
. D. tool number
ATM 313 – CNC
Module 4: CNC Programming "Turning"
50
4. Cycle 97 is used to make
A. roughing
B. recessing
C. threading
D. finishing
5. Cycle 95 could be used for
A. roughing
B. recessing
C. threading
D. taper undercut
6. M30 means
A. program end
B. subprogram end
C. program stop
D. none of the above
7. T5 D1 block is used to:
A. switch the spindle on
B. call tool number 5
C. compensate tool 1
D. switch the spindle off
8. The block G96 S200 F0.2 M4 stands for:
A. speed limit max 200 rpm
B. constant cutting speed of 200 m/min
C. cutting speed limit of 2000 rpm
D. speed limit min 2000 rpm
9. The G code which is used to select the work part zero point is
A. G21
B. G45
C. G54
D. G50
ATM 313 – CNC
Module 4: CNC Programming "Turning"
51
10. “G01 X=-2” in a facing operation is used to:
A. Change tool number 2
B. Move in rapid traverse to X=-2
C. Remove the pin at the end of the part caused by the tool tip
D. Create an arc counter clockwise
Part (F):
a) Study the following drawing and then answer the questions below
if the recessing starts from the right side.
1. Complete the missing data in the following table.
Start point in X Start point in Z Width of recess Depth
2. For the second recess complete the missing data in the following table Start point in X Start point in Z Width of recess Depth
ATM 313 – CNC
Module 4: CNC Programming "Turning"
52
b) Give the listed parameters for the grooving cycle shown in the figure below:
1. Start Point in X: 70 mm
2. Start Point in Z: 60 mm
3. Groove Width: __ mm
4. Groove Depth: __ mm
5. Angle contour – longitudinal axis: __ °
6. Flank Angle Start Point: __ °
7. Flank Angle Opposite: __ °
8. Radius / Chamfer outside start point: __ mm
9. Radius / Chamfer outside opposite: __ mm
10. Chamfer inside start point: __ mm
11. Chamfer inside opposite: __ mm
References: 1. Turning Programming Manual – MTS 2. CNC technology – NCADU