0% found this document useful (0 votes)
338 views88 pages

Note CNC Programming

G0 - Rapid traverse G1 - Feed rate X/U, Z/W - Linear axis end points A - Angle for angular axis F - Feed rate S - Spindle speed B - Tool number T - Tool offset number M - Miscellaneous functions The G0 and G1 instructions are used to program straight line motions at either rapid traverse (G0) or feed rate (G1). Additional parameters specify the end point coordinates, feed rate, spindle speed, tool number, and miscellaneous functions like coolant on/off. Together these instructions provide positioning and material removal motions in CNC turning programs. 1.3. CIRCULAR

Uploaded by

ppki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
338 views88 pages

Note CNC Programming

G0 - Rapid traverse G1 - Feed rate X/U, Z/W - Linear axis end points A - Angle for angular axis F - Feed rate S - Spindle speed B - Tool number T - Tool offset number M - Miscellaneous functions The G0 and G1 instructions are used to program straight line motions at either rapid traverse (G0) or feed rate (G1). Additional parameters specify the end point coordinates, feed rate, spindle speed, tool number, and miscellaneous functions like coolant on/off. Together these instructions provide positioning and material removal motions in CNC turning programs. 1.3. CIRCULAR

Uploaded by

ppki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 88

PR T 0 6 .

6 0
CO MP U TER N UM ERI C AL CO N TRO L TE C H NO LO GY

PRT 06.60

CNC Turning & Programming


11 (ISO)
Ta b l e o f C o n t e n t s

Course Outline In General ………………………………………………………………………………… Ι


Assessment Scheme…………………………………………………………..………………………… …. Ι
Summary of Course Objectives……………………………………………………………………..……… ΙΙ
References………………………………………………………………………………………..…………… ΙΙ
Course Contents…………………………………………………………………………………..………… ΙΙΙ

CHAPTER 1 BASIC PROGRAMMING REVIEW ........................ 3


1.1. TRAVERSING INSTRUCTION (TX 8F CONTROLLER) .................................. 3
1.2. STRAIGHT LINE AT RAPID TRAVERSE G0 AND FEED TRAVERSE G1 ..... 4
1.3. CIRCULAR ARC G2 AND G3............................................................................... 6
1.4. GEOMETRY PATHS WITH TRANSITION ELEMENTS (D/R) ....................... 10
1.5. G1 GEOMETRY PATH USING A (ANGLE) FUNCTION ................................. 12
1.6. G2 /G3 GEOMETRY PATHS (TANGENTIAL TRANSITION) ......................... 15
1.7. G2/G3 GEOMETRY PATHS (NON-TANGENTIAL TRANSITION)................ 16
1.8. G1 / G2 / G3 GEOMETRY PATHS (SURVEY)................................................... 17
CHAPTER 2 A U T O M AT I C D E F I N I T I O N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1
O F G E O M E T R Y PAT H S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1
2.1. G101 GEOMETRY PATHS 1, LONGITUDINAL .............................................. 21
2.2. G102 GEOMETRY PATHS 1, FACE .................................................................. 22
2.3. G105 GEOMETRY PATHS 2, LONGITUDINAL .............................................. 23
2.4. G106 GEOMETRY PATHS 2, FACE .................................................................. 24
CHAPTER 3 CANNED CYCLE ............................................. 27
3.1. ROUGHING CYCLES ......................................................................................... 27
3.2. G70 LONGITUDINAL CONTOUR ROUGHING CYCLE ................................. 28
3.3. G71 LONGITUDINAL CONTOUR ROUGHING CYCLE ................................. 31
3.4. G72 FACE CONTOUR ROUGHING CYCLE .................................................... 32
3.5 G83 DEEP HOLE DRILLING CYCLE ............................................................... 35
3.6. G76 THREAD CHASING CYCLE ..................................................................... 37
3.7. G82 TAPPING CHASING CYCLE ..................................................................... 40
CHAPTER 4 S U B - R O U T I N E A N D PA R A M E T R I C P R O G R A M M I N G
TECHNIQUES 43
4.1. SUB-ROUTINE TECHNIQUE............................................................................ 43
4.1.1 G 22 – SUB-ROUTINE CALL-UP ....................................................................... 43
4.1.2. SUB-ROUTINE TECHNIQUE ............................................................................ 45
4.2 GENERIC SUBROUTINES ................................................................................. 47
CHAPTER 5 DRIVEN TOOLS .............................................. 57
5.1. MACHINING WITH POSITIONED WORK SPINDLE ..................................... 57
AND WITH DRIVEN TOOLS ............................................................................................ 57
5.1.1. TOOL PARALLEL TO WORK SPINDLE .......................................................... 57
5.1.2. TOOLS AT RIGHT ANGLE TO THE WORK SPINDLE ................................... 57
5.1.3 MILLING WITH SAWBLADES AND SIDE-AND-FACE CUTTERS .............. 58
5.2. PRODUCTION METHOD USING SPEED-CONTROLLED AND POSITION-
CONTROLLED WORK SPINDLE (C AXIS). .................................................... 59
5.3. SURVEY OF DRIVING POSSIBILITIES ........................................................... 60
5.4 CALL-UP IN NC PROGRAM .............................................................................. 61
CHAPTER 6 C – AXIS AND MILLING FUNCTION.................. 65
6.1 C AXIS INSTRUCTIONS .................................................................................... 66
6.2 C AXIS SELECTION ON THE MAIN SPINDLE ............................................... 69
6.3 C AXIS PROGRAM FORMAT ............................................................................ 70
6.4. POLYFORM INSTRUCTIONS (TRAUB MACHINE CONTROLLER) ........... 73
6.5 MILLING ON G17 PLANE .................................................................................. 73

P a g e II
COURSE OUTLINE IN GENERAL

Module COMPUTER NUMERICAL CONTROL TECHNOLOGY

Module Code PRT 06

Sub module CNC TURNING & PROGRAMMING 11 (ISO)

Submodule Code PRT 06.60

Prerequisites PRT 06.50

Semester 4

Weight tage 2

Hours 20 hours

Laboratory / Workshop CNC TURNING

Machines / Equipments 1) CNC TURNING MACHINE


2) OHP
3) WHITE BOARD
4)

Prepared By MUHAMAD RIDUAN BIN MAT BAHARI

ASSESSMENT SCHEME :

1. PROGRAMMING TEST (END OF SUBMODULE) 60 %


2. THEORY TEST (END OF SUBMODULE) 30 %
3. QUIZ, ATTENDANCE ETC. 10 %
4.
5.
6.

SUMMARY OF COURSE OBJECTIVES :


At the end of this course, the students will be able to understand and appreciate the
concept of parametric programming. They will be exposed to the parametric programming
technique and the milling operation of CNC Turning.

Page I
REFERENCES :
1. Practical CNC-Training for planning and shop-Hanser Publishers
2. Introduction to Computer Numerical Control-Barry Leathem-Jones

COURSE CONTENTS :

Chapter 1 Review of basic programming 5 Hours

Chapter 2 Automatic definition of geometry paths 2 Hours

Chapter 3 Canned cycle 2 Hours

Chapter 4 Subroutine and parametric programming techniques 6 Hours

Chapter 5 Driven tools 1 Hours

Chapter 6 C – Axis and milling functions 4 Hours

P a g e II
Chapter 1

Basic programming review

Page 1
LESSON PLAN

PRT 06.60 CNC Turning & Programming 11 (ISO) Location CNC LAB

Chapter
Basic programming review
1 Prepared by MUHAMAD
RIDUAN

Objectives

1. At the end of this topic, the students will be able to:

 Understand the concepts of contour programming technique.

2.  Write and explain the contour programming technique of CNC turning.

3.  Use the special functions in the program.

4.

5.

6.

7.

8.

9.

10.

References Media

1. LECTURE NOTE 1. TRANSPARENCIES

2. STUDENT‟S HANDOUT 2. WHITE BOARD

3. 3. POWER POINT

4. 4. OHP

5. 5.

Page 2
CHAPTER 1 BASIC PROGRAMMING REVIEW

1.1. TRAVERSING INSTRUCTION (TX 8F CONTROLLER)

G00 - Straight line at rapid traverse


G01 - Straight line at feed rate
G02 - Circular arc, clockwise
G03 - Circular arc, counterclockwise

Note : Leading zero may be dropped


G0 - G1 - G2 - G3 - etc.

The motion of the tool nose is considered.

The contour of a workpiece is composed of the geometric entitles lines and arc.
Programming of a line requires the path information G0 or G1 ; that of an arc, G2 or G3.
G0 (for rapid traverse) and G1 (for feed rate) are used for programming a line.
G2 (for feed rate, clockwise) and G3 (counterclockwise) are used for programming
arcs.

Program :

G0 X20 Z2 M8
G1 Z-15 F0.2
G2 X40 Z-25 R10
G1 Z-40
G3 X60 Z-50 R10
G1 Z-75

The motion of the tool nose is considered.

Page 3
1.2. STRAIGHT LINE AT RAPID TRAVERSE G0 AND FEED TRAVERSE G1

G0 / G1 X/U.. Z/W.. A.. F.. S.. B.. T.. M..

M instructions

Tool call-up

B instruction

Spindle speed or cutting speed

Feed, R axis

Angle

Coordinates of target point in absolute or incremental dimension

Through the G0 instruction the tool (tool nose) moves at rapid traverse, i.e. with
the fastest possible speed to the target point. The tool path is determined by the
CNC control through linear interpolation; i.e. the path runs in a straight line
(shortest distance start point to target point) whereby the monitors the maximum
permissible rapid traverse speed for each axis. The rapid traverse speed may be
changed in the machine data of the CNC control.

Page 4
The target point is programmed by input of the addresses X and Z. Feed F is valid
for machines with tailstock axis R. The address T (tool call-up) should not be
used during a G0 move for indexing to another tool station, but only for “switching”
to an existing second tool nose(e.g. for a recessing tool). The G0 instruction
automatically effects a precision stop (G9). When programming G0 the (possibly
previously) programmed feed rate F remain in effect and is reactivated for example
with G1.

Example : Straight line G0

G0 X20 Z2 M8

Coolant

Coordinate of target point

Example : Straight line G1

G1 Z-15 F0.2

Feed (mm/rev)

G1 X40 Z-25 F0.2

Program with G0:

G0 X20 Z2
G1 Z-15 F0.2
G1 X40 Z-25

Feed 0.2 is modal

Page 5
1.3. CIRCULAR ARC G2 AND G3

Circular Arc : Clockwise G2 and Counter clockwise G3

I,K
G2 / G3 X/U.. Z/W.. P,Q.. R.. D/C.. H.. F.. E.. S.. B.. M..

M instruction

B instruction

Spindle speed or cutting


speed

Feed of transition elements

Feed rate

Intersection point input

Transition chamfer transition radius

Circle center point input (I/K incremental dim.; P/Q absolute


dim., R radius

Coordinates of target point in absolute or incremental dimension

Page 6
Instructions G2/G3 cause the tool (tool nose) to move the target point
clockwise/counter clockwise on a circular arc path. The start point of the
circular arc is determined through the preceding block (but could also be calculated
by the control).

The target point is programmed in the G2/G3 block with X and Z (but could also be
calculated by the control).

These are three possibilities for the input of the circular arc :

1. Programming radius R.

G2 X.. Z.. R.. G3 X.. Z.. R..

2. Programming the coordinated P and Q of the centre point whereby P and


Q are referenced to the workpiece zero point.

G2 X.. Z.. P.. Q.. G3 X.. Z.. P.. Q..

3. Programming the coordinates I and K or the centre point whereby I and K


are reference to the start point of the circular arc.

G2 X.. Z.. I.. K.. G3 X.. Z.. I.. K..

Note:

 If radius is entered, there are two possibilities for the center point (see M1 –
M2) next page.
 The control calculated only M1

Page 7
Therefore radius programming R is only permitted when the angle  is smaller than
180. When  equal or is greater than 180, the center point must be programmed
with P and Q or with I and K. As with G1, it is possible with G2/G3 to program a
transition chamfer D or transition radius C at the target point. Differing from G1,
here the transition radius must be called C, since the address R is already used for
the radius of the circular arc.

As with G1, there is the feed F and the (possibly reduced) feed E for transition
elements. Another address is the intersection point input H. It is required when the
start point or the target point of the circular arc is unknown.

Example: Circular arc G2

G0 X30 Z1 M8
G1 Z-25 F0.2
G2 X50 Z-35 R10
G1 Z-55

Page 8
Example: Circular arc G2

G0 X30 Z1 M8
G1 Z-25 F0.2
or G2 X50 Z-35 P50 Q-25
or G2 X50 Z-35 I10 K0
G1 Z-55

Example: Circular arc G3

G0 X30 Z1 M8
G1 Z-25 F0.2
G3 X50 Z-35 R10
G1 Z-55

Example: Circular arc G3

G0 X30 Z1 M8
G1 Z-25 F0.2
or G3 X50 Z-35 P30 Q-35
or G3 X50 Z-35 I0 K10
G1 Z-55

Page 9
1.4. GEOMETRY PATHS WITH TRANSITION ELEMENTS (D/R)

To break or round sharp


edges, a transition chamfer
D or a transition radius R
can be added to the end of
G1, so that a line G1 transits
into the next line G2 with a
chamfer or a radius. The size
of the transition elements is
not limited.

If the chamfer length (actual,


measurable length) must be
programmed, D is written with a
minus sign, e.g. D-0.2. D
without the sign expresses the
chamfer width with reference on
the Z axis. The programmed
(modal) feed F may be too great
for small chamfers (e.g. only G1 X.. Z.. D0.2 E0.08
0.2mm). Therefore it is possible
to program the feed during the Chamfer
transition chamfer (or radius) Chamfering feed rate
separately in the G1 block in E.

Chamfer feed E is modal (self


retaining), i.e. that is valid for all
transition chamfers D (or transition
radii R) until it is reprogrammed.
The transition from G1 into G2/G3
is also possible with a chamfer or
a radius.
G1 Z-20 R6
G3 X96 Z-48 R28

P a g e 10
Important: A block with transition chamfer D (or transition radius R) must be followed
by G1 or G2/G3 in the next block for the purpose of direction identification.
This next traverse must be greater than the transition element.

Formula for the minimum path W:

Wmin =D/R + 0.1 + Rs [mm] Example;

Chamfer D = 0.2mm, cutter radius Rs = 0.4mm


Cutter radius
W min = 0.2 + 0.1 + 0.4 = 0.7 mm

G0 X0 Z1 M8 G0 X0 Z1 M8
G1 Z0 F0.2 G1 Z0 F0.2
G1 X40 D0.5 E0.1 G1 X40 R0.5 E0.1
G1 Z-30 G1 Z-30

G0 X0 Z1 M8 G0 X0 Z1 M8
G1 Z0 F0.2 G1 Z0 F0.2
G1 A100 D-2 E0.08 G1 A100 R2 E0.08
G1 X86 Z-35 A-30 G1 X86 Z-35 A-30

P a g e 11
1.5. G1 GEOMETRY PATH USING A (ANGLE) FUNCTION

Angle A without target point coordinates X, Z.

The geometry processor of the TX 8F control, with help of angle A, carries out
intersection points calculations.
The machine does not work directly our of the program store, but rather out of a
buffer store. This buffer store always contains one block in advance ; i.e when
the machine carries out a move, it already “knows” what the next program block
contains.

In the example above, the first program block is G1 A…


The buffer store already contains the next block G1 X.. Z.. A….
Therefore the unknown point can be calculated (back) form angle A and the known
target point X and Z.

An unknown point must be followed by a known point with X, Z and the


corresponding angle A.

G1 A..
G1 X.. Z.. A..

Example:

G1 A105
G1 X100 Z-50 A-30

P a g e 12
Example:

G0 X40 Z1 M8
G1 Z-25 F0.2
G1 X20 A210 F0.1
G1 A180 F0.2
G1 X60 Z-85 A-45

a) G1 X.. Z.. b) G1 X.. A..

c) G1 Z.. A..

d) G1 A..
G1 X.. Z.. A..

S = start point
A = positive angle input
A - = negative angle input

There are four possibilities of programming a taper with the G1 command.

P a g e 13
The geometry processor calculated the missing X or Z coordinate based on Angle A.
Measure angle A from the start point S. Draw a horizontal auxiliary line to the right (=0).
Measure the angle counterclockwise from this auxiliary line until you reach the leg of the
traversing travel.
This is the positive angle input.
The angle input must be in the decimal mode. Convert minutes and seconds into decimal
degrees.
20’ = 0.333 30’ = 0.5

Examples : Angle A

G1 Z-25 F0.2
G1 X20 A210 F0.1
G1 Z-65 F0.2
G1 X60 A135

G1 X20 A-45 F0.1


G1 Z-42.32 F0.2
G1 X40 A30
G1 Z0

P a g e 14
1.6. G2 /G3 GEOMETRY PATHS (TANGENTIAL TRANSITION)

Line – circular arc Circular arc-line

G1 A ... G3 R..
G2 X.. Z.. R..

Permitted only for Permitted only for


Tangential transition Tangential transition

Known point G1 X.. Z.. A..

Known point

Note :
Radius input R may be used within the geometry path G2/G3 only with tangential transition.

If the transition is not tangential, the coordinates of the circle center point P and Q must be
programmed.

G.2 P.. Q..


G1 X.. Z.. A..

Example : Non-tangential transition

P a g e 15
1.7. G2/G3 GEOMETRY PATHS (NON-TANGENTIAL TRANSITION)

If the transition is not tangential, the line intersects the arc twice. Therefore, it is necessary
to specify the position of the intersection point H 0 or H 1. In addition, the arc center
point must be programmed with P and Q.

The intersection point that lies nearest the


known point (of the line) is H 0.

LINE – CIRCULAR ARC

G1 A…
G1 A…
G2 (G3) X… Z… P… Q… H0
G2 (G3) X… Z… P… Q… H1

CIRCULAR ARC – LINE

G3 (G2) P… Q… H0 G3 (G2) P… Q… H1
G1 X…Z… A… G1 X…Z… A…

P a g e 16
Special case:
The known point (of the line) lies within the arc. Even if there is only one intersection
point, it is necessary to specify H 0 or H 1.

Example for H 0 Example for H 1

1.8. G1 / G2 / G3 GEOMETRY PATHS (SURVEY)

Line – angle
G 1 X.. A..
or
G 1 Z.. A..

Line – line
G 1 A..
G 1 X.. Z.. A -..

Line + chamfer – line


G 1 A.. D.. (or D - )
G 1 X.. Z.. A -..

Line + radius – line


G1 A.. R..
G 1 X.. Z.. A -..

Line + radius
Line –circular arc (tangential)
G1 A..
G3 (or G2) X.. Z.. R..

Arc + Line
Circular arc – line (tangential)
G2 (or G 3) R..
G1 X.. Z.. A - ..

P a g e 17
Circular arc – line H 0 (non-
tangential)
G 3 (or G 2) P.. H 0
G1 X.. Z.. A -..

Circular arc – line H1 (non-


tangential)
G 3 (or G 2) P.. Q.. H 1
G 1 X.. Z.. A - ..

Line – circular arc H 0 / H 1


G1 A 180
G2 X.. Z.. P.. Q.. H 0 (H 1)

Circular arc + chamfer – line (non-


tangential)
G 3 (or G 2) P.. Q.. D-.. H1 G 1 X..
Z.. A..

Circular arc + radius –line


(non-tangential)
G 3 (or G 2) P.. Q.. C.. H 1
G 1 X.. Z.. A - ..

Circular arc-circular arc (tangential)


G3 (or G 2) P.. Q..
G 2 (or G3) X.. Z.. R-..

Note:
The circular arcs must curve in
opposite directions.
One of them must be programmed with
center point P,Q.

P a g e 18
Chapter 2

Automatic Definition of Geometry


paths

P a g e 19
LESSON PLAN

PRT 06.60 CNC Turning & Programming 11 (ISO) Location CNC LAB

Chapter
Automatic Definition of Geometry paths
2 Prepared by Muhamad Riduan

Objectives

1. At the end of this topic, the students will be able to:

 Appreciate the contour of automatic definition of programming technique.

2.  Write and define automatic programming technique of CNC turning.

3.  Use the special command of the G codes in the program.

4.

5.

6.

7.

8.

9.

10.

References Media

1. LECTURE NOTE 1. TRANSPARENCIES

2. STUDENT‟S HANDOUT 2. WHITE BOARD

3. 3. POWER POINT

4. 4. OHP

5. 5.

P a g e 20
CHAPTER 2 AUTOMATIC DEFINITION
OF GEOMETRY PATHS

2.1. G101 GEOMETRY PATHS 1, LONGITUDINAL

G101 X… Z… I… K… A… B… R… F…

X… Z… Target point coordinates in


absolute dimension

I… K… Centre point coordinates for


radius R2

A… Angle 1 at start point

B… Angle 2 at end point

R… Radius R1

F… Feed rate

*Variant 1:
- If the first arc is defined by the radius, the second arc must be described by the
centre point coordinates I and K.
- There are only tangential transitions.

G101 X… Z… P… Q… A… B… R… F…

X… Z… Target point coordinates in


absolute dimension

P… Q… Centre point coordinates for


radius R2

A… Angle 1 at start point

B… Angle 2 at end point

R… Radius R1

F… Feed rate

*Variant 2:
- If the first arc is defined by the centre point coordinates P and Q, the second arc
must be described by the radius.
- There are only tangential transitions.

P a g e 21
2.2. G102 GEOMETRY PATHS 1, FACE

G102 X… Z… I… K… A… B… R… F…

X… Z… Target point coordinates in


absolute dimension

I… K… Centre point coordinates for


radius R2

A… Angle 1 at start point

B… Angle 2 at end point

R… Radius R1

F… Feed rate

*Variant 1:
- If the first arc is defined by the radius, the second arc must be described by the
centre point coordinates I and K.
- There are only tangential transitions.

G102 X… Z… P… Q… A… B… R… F…

X… Z… Target point coordinates in


absolute dimension

P… Q… Centre point coordinates for


radius R2

A… Angle 1 at start point

B… Angle 2 at end point

R… Radius R1

F… Feed rate

*Variant 2:
- If the first arc is defined by the centre point coordinates P and Q, the second arc
must be described by the radius.
- There are only tangential transitions.

P a g e 22
2.3. G105 GEOMETRY PATHS 2, LONGITUDINAL

G105 X… Z… I… K… A… B… C… R… F…

X… Z… Target point coordinates in


absolute dimension

I… K… Centre point coordinates for


radius R2

A… Angle 1 at start point


nd
B… Angle 2 at 2 transition

C… Angle 3 at end point

R… Radius R1

F… Feed rate

*Variant 1:
- If the first arc is defined by the radius, the second arc must be described by the
centre point coordinates I and K.
- There are only tangential transitions.

G105 X… Z… P… Q… A… B… C… R… F…

X… Z… Target point coordinates in


absolute dimension

P… Q… Centre point coordinates for


radius R2

A… Angle 1 at start point


nd
B… Angle 2 at 2 transition

C… Angle 3 at end point

R… Radius R1

F… Feed rate

*Variant 2:
- If the first arc is defined by the centre point coordinates P and Q, the second arc
must be described by the radius.
- There are only tangential transitions.

P a g e 23
2.4. G106 GEOMETRY PATHS 2, FACE

G106 X… Z… I… K… A… B… C… R… F…

X… Z… Target point coordinates in


absolute dimension

I… K… Centre point coordinates for


radius R2

A… Angle 1 at start point


nd
B… Angle 2 at 2 transition

C… Angle 3 at end point

R… Radius R1

F… Feed rate

*Variant 1:
- If the first arc is defined by the radius, the second arc must be described by the
centre point coordinates I and K.
- There are only tangential transitions.

G106 X… Z… P… Q… A… B… C… R… F…

X… Z… Target point coordinates in


absolute dimension

P… Q… Centre point coordinates for


radius R2

A… Angle 1 at start point


nd
B… Angle 2 at 2 transition

C… Angle 3 at end point

R… Radius R1

F… Feed rate

*Variant 2:
- If the first arc is defined by the centre point coordinates P and Q, the second arc
must be described by the radius.
- There are only tangential transitions.

P a g e 24
Chapter 3

Canned Cycle

P a g e 25
LESSON PLAN

PRT 06.60 CNC Turning & Programming 11 (ISO) Location CNC LAB

Chapter
Canned Cycle
3 Prepared by Muhamad Riduan

Objectives

1. At the end of this topic, the students will be able to:

 Appreciate the use of canned cycle in the programming technique.

2.  Write and explain the basic programming technique using canned cycle of
CNC turning.

3.  Use the canned cycle in CNC turning program.

4.

5.

6.

7.

8.

9.

10.

References Media

1. LECTURE NOTE 1. TRANSPARENCIES

2. STUDENT‟S HANDOUT 2. WHITE BOARD

3. 3. POWER POINT

4. 4. OHP

5. 5.

P a g e 26
CHAPTER 3 CANNED CYCLE

3.1. ROUGHING CYCLES

Generally, several roughing passes are required before the workpiece is ready for finish
cutting. If the roughing cuts are programmed as single blocks, the calculations are rather
complicated. The TX8F features several cycles that execute these geometry
calculations automatically.

G70 – Longitudinal Roughing Cycle G71 – Longitudinal Roughing Cycle

The finished contour for the roughing cycle can be programmed in two ways:
1. The finished contour towards which roughing is performed is stored in the main
program. Contour start and end are always marked by a block number. The
block number for the contour end must always be greater than that for the
contour start. A block number must never exist in duplicate.

 If the roughing cuts are to be executed with tool nose radius compensation (TRC),
„G46‟ must be programmed in the finish contour. Then the control takes over the
quadrant (P) and the tool nose radius  from the tool data file.

G96 V180 T0505 M4


G0 X100 Z2
G71 P50 Q60 I0.5 K0.I D3 F0.3 E0.1
G26
N50 G46
G0 X20 Z1
:
:
} FINISHING CONTOUR

N60 G40
:

P a g e 27
 When defining the finished contour, the first block must be a traverse motion
(G0 or G1 in both axes (X.. and Z..) to the start point of the finished contour.
From the position of the start point and end point the control recognized the
start point for roughing outside or roughing inside.

2. The finished contour towards which rough-cutting takes is stored as a subroutine.


 The finished contour can consist of maximum 50 blocks.
 As a rule, a descending contour section within G70 is automatically
ignored.
 If the finished contour of G71 and contain a descending contour section,
it will be turned in the roughing cycle by programming G88 and ignored if
G89 id programmed.

G96 V180 T0505 M4


G0 X100 Z2
UP (subroutine)
G71 A520 I0.5 K0.I D3 F0.3 E0.1 O520
G26 46
G0 X20 Z1
: :
: :
:
:
:
} FINISHING CONTOUR
: :
M99

3.2. G70 LONGITUDINAL CONTOUR ROUGHING CYCLE

G70 Longitudinal Contour Roughing Cycle for Tools with Approach Angle J 90

Application: The longitudinal roughing cycle G70 is used when tools with an
approach angle smaller than 90 are employed.

P a g e 28
G70 A.. P.. Q.. I.. K.. D.. J.. F.. S..

Spindle speed or
cutting speed
Feed rate

Approach angle of tools

Depth of cut

Machining allowance in Z direction

Machining allowance in X direction

Definition of finished contour


A: The finished contour is stored in a sub-routine.
P and Q: The finished contour is stored between the block numbers P and
Q.

The approach angle is programmed under the address J. It should be chosen


to be approximately 1 - 2 smaller than a actual angle of the tool. As a function
of this angle J and the depth of cut programmed under D, the control calculates,
after G70 call-up, the individual roughing cuts, taking into account the finishing
allowances (I and K) for the subsequent finishing cuts.

With the roughing cycle G70 all


roughing cuts are executed with the
entire cutting depth D. Therefore it is
necessary to calculate the depth of
cut accurately.
When calculation the depth of cut D,
the value entered under I must be
taken into account (see example in
next page).
When using G70, the start point of
the finished contour must be fixed in
+Z direction from the workpiece, in
accordance with the approach angle
and the depth of cut.

THE TOOL MUST BE MEASURED AS


SHOWN. (ATC)

P a g e 29
Example with G70:

(ROUGHING)
G96 V160 T101 M04
G0 X90 Z5
G70 P50 Q60 10.8 K.0.1 D6.33 J73 F0.4
G26


 (FINISHING)
G96 V180 T505 M04
N50 G46
G0 X25 Z5
G1 Z-36 F0.15
G1 X24.4 A210 F0.1
G1 Z-40 F0.15
G1 X65 R5 E0.1
G1 Z81
G1 X64.4 A210 F0.1
G1 Z-85 F0.15
G1 X90
N60 G40
G26



M30

P a g e 30
3.3. G71 LONGITUDINAL CONTOUR ROUGHING CYCLE

Application: The longitudinal roughing cycle G71 is used for external and
internal machining.

G71 A.. P.. Q.. I.. K.. D.. F.. E..

Feed rate with descending


contour
Feed rate
Depth of cut
Machining allowance in Z direction
Machining allowance in X direction
Definition of finished contour
A: The finished contour is stored in a sub-routine.
P and Q: The finished contour is stored between the block numbers P and Q.

If the finished contour contains a


descending contour section, it will be
turned in the roughing cycle by
programming G88 before G71. To
cancel G88 we program G89 before
G71. Machining of the descending
contour section must be suppressed by
G89 in case the form of the roughing
tool is not suitable for the operation.

For machining a descending contour


section, the feed rate can be reduced.

P a g e 31
This reduced feed rate is programmed under the address E.

If no value is entered under E, the control automatically uses the feed rate value
programmed under F. After completion of the roughing cycle on a descending contour
section, the tool is automatically retracted. The retract distance (lifting travel) is to be
set as parameter with a value of max. 99.999 mm in TOOL/PARAM  H7 menu  H3
= set up 1 # 15 G71 retraction.

If the infeed for the last roughing cut is smaller than the set parameter value min.
cutting depth, the last roughing cut is executed with this parameter value. It is defined
in TOOL/PARAM  H7 menu  H3 = set up 1 # 13 small allowance.

The modified cutting depth for the preceding roughing cuts is automatically recalculated
by the control.

Example:



(ROUGHING)
G96 V160 T0404 M4
G0 X100 Z2
G88
G71 P50 Q60 I0.5 K0.05 D4 F0.35 E0.12
89
G26 M9


 (FINISHING)
G96 V200 T0505 M4
N50 G46
G0 X26 Z1 M08
G1 X30 D2 F0.15 E0.1
G1 Z-15
G1 X65 R5
G1 Z-45
G1 X38 A205 F0.1
G1 Z-120 R6 F0.15
G1 X100 D2
G1 W-4
N60 G40

G26 M09



M30

P a g e 30
Example: using G88 and G89



 (ROUGHING)
G96 V150 T2020 M08
G0 X30 Z2
G88
G71 P51 Q61 I0.5 K0.1 D3.5 F0.25 E0.1
G89
G27


 (FINISHING)
G96 V180 T404 M04
N51 G46
G0 X120 Z1.5
G1 A270 R10 E0.1
G1 X70 Z-35 A20
G1 X60
G1 Z-62
G1 U0.3 A150 F0.08
G1 Z-65 R0.6
G1 X40
G1 Z-75
G1 X29
N61 G40
G27



M30

P a g e 31
3.4. G72 FACE CONTOUR ROUGHING CYCLE

G72 A.. P.. Q.. I .. K.. D.. F.. E..

Feed rate with descending contour

Feed rate

Depth of cut

Machining allowance in Z direction

Machining allowance in X direction

Definition of finished contour


A: The finished contour is stored in a sub-routine.
P and Q : The finished contour is stored between the block numbers P and Q.

The face roughing cycle G 72 is used for outside and inside machining.
If the finished contour contains a descending contour section, the rough-turning operation
will be programmed with G 88 before G 72, but ignored by programming G 89 before G 72.
Machining of the descending contour section must be suppressed with G 89 in cases where
the form of the roughing tool is not suitable for the operation.
For machining a descending contour section
it is possible to reduce the feed rate.
This reduced feed rate is programmed
under the address E.

P a g e 32
If there is no input for E, the control automatically uses the feed rate value programmed for
F. After completion of the roughing operation of the descending contour section, the tool is
automatically retracted for the shoulder.
The lifting travel can be set as a parameter (SET UP – pattern 6 #9) with a value of 999
max.

If the infeed for the last roughing cut is smaller then the set parameter value “minimal cutting
depth” (SET UP –pattern 6 #6), then the last roughing cut is executed with that parameter
value. The changed cutting depth for the preceding roughing cuts is automatically
recalculated by the control.

Example : G 72 – Face contour roughing cycle (external)

 .....
 ….
 (Roughing)
G96 V100 T0505 m4
G0 X145 Z1 M8
G88
G72 P70 Q80 I0.1 K0.5 D3 F0.3 E0.1
G89
G26 M5 M9
 .....
 ….
 (Finishing)
G96 V120 T0808 M4
N70 G46
G0 X142 Z-35 M8
G1 X100 R10 F0.2 E0.1
G1 Z-8 D1
G1 X80
G1 Z-16 A245 F0.1
G1 X25 R5 F0.15
G1 Z0.5 D2
G1 U-3
N80 G40
G27 M5 M9
 .....
 ….
M30

P a g e 33
Example : G 72 – Face contour roughing cycle (internal)

As a basic rule, finishing should be performed in the same direction as roughing.


Should, however, be necessary to reverse the finishing direction for technical reasons, it is
necessary to store the finished contour (which is necessary for calculation of the roughing
cuts) in a sub-routine.

 .....
 ….
 (Roughing)
G96 V100 T0505 m4
G0 X30 Z2 M8
G89
G72 A520 I0.1 K0.5 D3 F0.3 E0.1
G27 M5 M9
 ..... sub-routine
 …. finishing contour
roughing cycle
 (Finishing)
G96 V120 T0808 M4 O520
G46 G46
G0 X150 Z1 M8 G0 X33 Z-40
G1 Z0 F0.2 G1 X85
G1 X140 R3 E0.1 G1 Z-25
G1 Z-12 G1 A90
G1 X110 G1 X110 Z-12 A220
G1 Z-25 A220 G1 X140
G1 X85 G1 Z0 R3
G1 X150
G1 Z-37
G40
G1 X85.6 A150 M99
G1 Z-40 R0.6
G1 X34
G40
G27 M5 M9
 .....
 ….
M30

P a g e 34
3.5 G83 DEEP HOLE DRILLING CYCLE

G 83 X/U / Z/W.. D.. H.. F..

Feed rate
Number of relief cycles
For remaining drilling depth
First drilling depth

Drilling depth for longitudinal or cross hole


drilling in absolute or incremental dimension

Note :
a = Safety distance for rapid traverse.
The safety distance is set in SET UP – pattern 6 #7 (free parameter data 2) as
a parameter with up to max. 999

P a g e 35
Example : G83 – Deep hole drilling cycle

Deep drilling cycles are necessary for holes that are deeper than three times the diameter.
Before call-up of G83 it is necessary to approach the start point in rapid traverse G 0 or feed
G1. The first drilling depth is programmed under address D with reference to the start point.
The remaining drilling depth is divided into equal distances by input of address H ( number
of relief cycles).

The drill point is programmed.

G 97 S1= 480 T 0101 M3


G0 X0 Z5 M8
G 83 Z- 90 D 35 H3 F 0.2
G 27 M 9

Note :
- Used for concentric and eccentric holes (with rotating tools)
- The drill cycles G 83 and G 84 may also be used for cross holes (with driven tools). In
that case the target point is programmed with X rather than with Z.

P a g e 36
3.6. G76 THREAD CHASING CYCLE

G 76 X/U.. Z/W.. I/J .. K.. H.. F/E.. A.. D..

Depth of cut of last chasing pass

Input of infeed angle

Thread pitch
F : 3 digits after decimal point
E : 5 digits after decimal point

Number of chasing passes

Depth of thread

I : taper of taper thread


J: angle input for taper thread max. +/-45

Coordinates of thread end point


in absolute or incremental dimension

P a g e 37
Cylindrical or tapered outside and inside thread can be produced with the thread
chasing cycle G 76. The input of angle J for tapered threads is limited to +/- 45
degrees. I.e. the feed (pitch) is referenced to the Z axis.
Prerequisite is a spindle speed (G 97 S..) on the main spindle as well as a fed
(pitch) in mm/rev (G95). Before stating G 76, a start point in the X and Z axis must
be approached. This start position and the X position programmed in the cycle is
used by the control to compare inside and outside threads.
The start position in the Z axis must be selected so that the tool reaches the preset
containing rate (spindle speed x feed rate) before it starts the actual cutting
operation. Also, the brake condition of the feed drives must be taken into
consideration. The control automatically divided the individual cuts in the cycle G 76
with consideration of the thread depth programmed with K and the number of
passes programmed with H. For this division the last infeed (programmed under
address D) is taken into consideration.
The infeed in the G 76 cycles occurs at an angle (programmed under address A) up
to the max. flank angle.

If a thread without thread recess is turned, an additional thread run-out can be


switched on under an angle of 45 or 60 degrees by programming M35. (Cancel with
M 36). The length of the run-out as well as the run-out angle are set by parameter
(SETUP –pattern 6 #2 and #3).

For a tapered thread, angle J becomes negative for a descending taper.

P a g e 38
Example : G 76 – Thread chasing cycle

N3 G97 S1=1000 T0303 M3


G0 X40 Z4 M8
G76 X33.1 Z-29 K0.93 H8 F1.5 A55 D0.03
G26 M5 M9

N3 G97 S1=1000 T0808 M3


G0 X20 Z4 M8
G76 X24 Z-24 K0.55 H8 F1.0 A55 D0.03
G27 M5 M9

N3 G97 S1=1000 T0909 M3


G0 X36 Z6 M35 M8
G76 X30.838 Z-19.1 K1.479 H10 F2.309 D0.03
M36
G26 M5 M9

P a g e 39
3.7. G82 TAPPING CHASING CYCLE

G 82 Z / W… F… S…

Spindle speed

Thread pitch

Depth of cut in absolute or incremental dimension

Overrun travel of tool holder


(floating tool holder dependent
on spindle speed and thread pitch)

The threading cycle G82 may be used for tapping or threading with tap and dies.

Prerequisite is a spindle speed (G97 S….) on the main spindle as well as a feed rate
(thread pitch) in mm/rev (G95).

* The feed rate must be (depending on pitch and spindle speed) up to 20% less than
the pitch (floating tool holder).

N5 G97 S300 T0505 M3


G0 X0 Z5 M8
G82 Z-10 F1.1
G26 M5 M9

CAUTION: This cycle must not be used on driven tools.

P a g e 40
Chapter 4

Sub-routine and Parametric


Programming Techniques

P a g e 41
LESSON PLAN

PRT 06.60 CNC Turning & Programming 11 (ISO) Location CNC LAB

Chapter Subroutine and Parametric Programming


Techniques
4 Prepared by Muhamad Riduan

Objectives

1. At the end of this topic, the students will be able to:

 Appreciate the use of subroutine and parametric in the programming Techniques.


2.  Understand and explain the basic concepts of subroutine and parametric
program.

3.  Write the parametric programming technique using addresses and L


parameter in CNC turning.

4.

5.

6.

7.

8.

9.

10.

References Media

1. LECTURE NOTE 1. TRANSPARENCIES

2. STUDENT‟S HANDOUT 2. WHITE BOARD

3. 3. POWER POINT

4. 4. OHP

5. 5.

P a g e 42
CHAPTER 4 SUB-ROUTINE AND PARAMETRIC
PROGRAMMING TECHNIQUES

4.1. SUB-ROUTINE TECHNIQUE

4.1.1 G 22 – SUB-ROUTINE CALL-UP

G 22 A.. P..Q.. H..

Number of successive
sub-routine repetitions

Call-up start block number


and end block number

Call-up of sub-routine
No. 8000 – 8999 : user sub-routines
No. 9000 – 9999 : TRAUB sub-routines

For workpiece with identical program sections or identical contour segments, such
repetitious program sections and contour segments can be programmed as sub-
routines (e.g. recesses, part families).
When needed, they are called up with a G 22 instruction from the main program.
A determines which sub-routine should be called up (see example 1).
If the sub-routine designated with A is used only partially rather than entirely (for
example, between two certain block numbers), P and Q are used (see example 2).
Examples 3 and 4 show section from the sub-routine or main program (from No. P
or to No. Q)
H determines how often the sub-routine or the program segment should be
executed.
If H is not programmed, the sub-routine becomes effective through G 22 and is
executed once (acts like H 1).

Note:
- Every program may be used as a sub-routine as long as it is closed with M 99.
- Sub-routines may be tiered (nested) up to eight times (see example 6).

P a g e 43
Example 1 :

Example 2 :

Example 3 :

Example 4 :

Example 5 :

Example 6 :

P a g e 44
4.1.2. SUB-ROUTINE TECHNIQUE

Example : G 22 – Subroutine call-up

Example 1:

The same axial hole diameter 11 mm and thread M12 x 1 are to be produced on
several workpieces. A subroutine is programmed for these operations. The
subroutine must end with M99 = subroutine end.

Subroutine program
%
O8000
(Centering)
N3 G97 S1=1000 T0303 M3
G0 X0 Z1 M8
G1 Z-6 F0.1
G4 X1
G27 M5 M9
(Drilling core hole)
N4 G97 S1=800 T0404 M3
G0 X0 Z1 M8
Call-up in main program
G1 Z-25 F0.1
G4 X1 O12345

G27 M5 M9 G59 X0 Z200


(Tapping)  ….
 ….
N3 G97 S1=400 T0505 M3  ….
G0 X0 Z4 M8 G22 A8000
 ….
G1 Z-15 F0.9
 ….
G4 X1  ….
G27 M5 M9  ….
M30
M99
%

P a g e 45
Example 2:

When performing complete machining using driven tools, it often happens that a
certain section of the main program must be repeated.

Main program
%
O5789
G59 X0 Z200
 ….
 ….
 ….
N3 T0303 M5
G94 S3=1000 M303
G0 X30 Z2 M8
N100
 …. Drilling 1 hole
 …. and positioning
 …. Main spindle by 90
 ….
N200
G22 P100 Q200 H3 (repeat three times)
 ….
 ….
M30
%

P a g e 46
4.2 GENERIC SUBROUTINES

General

The subroutines describes so far are programmed so far are programmed with
definite numerical values (e.g. 20 mm thread depth or hole circle  30mm). It is
also possible to omit such numerical values and to determine them for each
individual case when calling up the subroutine. Subroutines where certain values are
not fixed, are called GENERIC SUBROUTINES.
Instead for numerical values, parameter from the L parameter memory are used.
Prior to calling up the subroutine, these L parameters are replaces by the correct
numerical values.

The following parameters are available :


L 01 to L 50
L 101 to L 150

For several subsystems please note :


Here, each subsystems itself has the parameters L 101 to L 150 which can be called
up by the respective subsystem.
Consequently, L 101 to L 150 exist twice ($1 and $2). All subsystems have access to
the parameters L 01 to L 50.

The generic subroutine is called up by G 22 A…

Prior to this, the valued must be assigned to the parameters in the main program :
L1 = 20 value assignment
L2 = 25 value assignment
G 22 A… subroutine call-up

The parameters can also be combined with each other by calculation functions:
L 2 = [L1 + 5] (see calculation functions)

P a g e 47
Instructions for creating a generic subroutine

1. Replaced the variable dimensions of workpiece drawing with L parameters


(see example next page).
2. If the feed rate and the cutting speed are also variable (different materials),
substitute here to L parameter. This creates a parameter list. (see example).
3. Program the workpiece using these parameters. This creates a generic
subroutine.
4. Before calling up this generic sub program, assign the specific values to the
individual L parameters in the main program.
5. Check this parameter assignment after the first test run.

Note:
If the values are to be calculated by the control, they must be put in
square bracket (see calculation function).

Example : Generic Subroutines Workpiece with parameters

%
O8007
(Centering)
N3 G97 V30 XL2 T0303 M3
G0 X0 Z1 M8
G1 Z-[L2/2] F0.1
G27 M5 M9 Call-up and value assignment in main
(Drilling core hole) program.

N4 G97 V30 XL1 T0404 M3 O12345 Parameter list


G0 X0 Z1 M8 G59 X0 Z200 L1 = core hole diameter
 …. L2 = thread diameter
G1 Z-L4 F0.1  …. L3 = thread length
G27 M5 M9  …. L4 = drilling length
L1=11 L5 = thread pitch
(Tapping) L2=12
N3 G97 S1=400 T0505 M3 L3=15
L4=25
G0 X0 Z4 M8 L5=1
G82 Z-L3 F[L5*0.9] G22 A8000
 ….
G27 M5 M9
 ….
M99  ….
%  ….
M30

P a g e 48
Survey :

Calculations, Jump and Comparison functions

Instruction Symbol Meaning Example

Bracket open ( only for text (Drilling)

Bracket closed ) only for text (Threading)

Square bracket open [ for calculations [ 5 + L1 ]

Square bracket closed ] for calculations [ 2 * L1 ]

Value assignment = result L 1 = 50

+ + addition L 1 = [5 + 3]
- - subtraction L 2 = [3 - 1.5]

X * multiplication L3=[4*0,5]

: / division L4=[12/3]

Sine SIN sine L 5 = SIN [20]

Cosine COS cosine L6 = COS [20]

Tangent TAN tangent L 7 = TAN [15]

Arc tangent ATN inverse tangent L 8 = ATN [15]/[20]

Square root SQRT square root L 9 = SOR [25]

Round RND round up/down L10=RND[L2]

Round down FIX round down L 11 = FIX [L 6]

Round up FUP round up L12=FUP[L8]

Jump GOTO unconditional jump GOTO 50

Jump if... IF conditional jump IFL.....GOTO 5

Equals EQ comparison = IFL 1 EQL 2 GOTO 5

Not equal to NE comparison ≠ IFL 1 NEL 3 GOTO 30

Greater than GT comparison > IFL 2 GTL 4 GOTO 1

Less than LT comparison < IFL 3 LT 1.2 GOTO 25

Equal to or greater than GE comparison  IFL 6 GEL 9 GOTO 55

Equal to or less than LE comparison  IFL 3 LEL 5 GOTO 22

Alarm No. 1-9 ERR alarm display ERR2

P a g e 49
4.3. MACRO CALL-UP G 201 TO G299

With the instruction G 201 to G 299 it is possible to activate a certain work sequence
as simply as with a cycle. This “definite work sequence” is programmed as a generic
subroutine; its values are defined (as in a cycle) through the addresses A to Z,
e.g. G201 A.. B.. C.. (for possible addresses see table).
Macros are used wherever standard processes require various sets of dimensions
(e.g. bar stop, plug cut of grooves, gauging, etc.). The pertinent sub-routine is
automatically is activated by the control through the macro call-up.
In this sub-routine the control does not operate with addresses A to Z, but rather with
the pertinent L-parameters L 501 to L 522 (see table).
The relationship between macro call-up and the applicable sub-routine can be seen
from the diagram shown below.
Address Parameter
Relationship of macro call-up A L501
and applicable cub-routine. B L502
C L503
D L504
Macro call-up
E L505
Main program F L506
H L507
 ….. I L508
 ….. J L509
Sub-routine program. K L510
 …..
M L511
G231 A.. B.. C.. O9831
P L512
 ….
 ….. Q L513
 ….
 …..  …. R L514
 …..  …. S L515
 …. T L516
M30  ….
U L517
 ….
M99 V L518
W L519
X L520
Note: Y L521
Since work-connected macros (from TRAUB) already Z L522
exist or being produced, customers may use only
Addresses G – L – N – O
are not possible.
call-ups G251 to G299.

P a g e 50
Instructions for creation of Macros

1. Replace the variable dimensions of the workpece drawing with addresses A to


Z.
2. Program the workpiece by use of these addresses. This results in a program
concept with which the control is not yet able to work.
3. Replace the addresses A to Z in this program concept with the related
parameters L 501 to L 522.
4. Write a the program start a sub-routine number from 9851 to 9899 and at the
program end M99. This results in a generic sub-routine.
5. Call up this generic sub-routine with the macro instructions G 251 to G 299
with the addresses A to Z (see example G 248).

Note:
- With enough practice and experience it is possible to skip Step 2 (program
concept).
- The addresses G (like G-function), L (like parameters), N (like block
numbers), and ) (like program) must not be used.

Example : Groove plunging G 248 S.. X.. Z.. B.. D.. F.. W.. T..

Sequence:
Center plunge
Left plunge
Right plunge

S = start diameter
X = target point diameter
Z = target point length
B = groove width
D = chamfer
F = feed in mm/rev
W = tool width
T = tool ATC left

P a g e 51
Example Macro program: (Groove plunging)

Program concept Generic sub-routine with L 501 to L 522


with the addresses A to Z

T[T] %
G0 Z -[Z-[B-W]/2] 0 9848
G0 X [S + 2] T L 516
G1 X [X+0.1] F[F] G0 Z-[L522-[L502-L519]/2]
G0 X [S+1] G0 X[L515+2]
G0 Z -[Z+ D+ 0.5+ 0.7] G 1 X[L520+0.1] FL506
G1 Z-[Z] D[D+0.5] E[F/2] G0 X[L515+1]
G1 X [X] G0 Z-[L522+L504+0.5+0.7]
G1 Z-[Z-0.1] G1 Z-L522 D[L504+0.5] E[L506/2] G 1 XL520
G0 X[S+1] G1 Z-[L522-0.1]
T [T + 2020] G0 X[L515+1]
G0 Z -[Z- B - D-0.5-0.7] T [L516 + 2020]
G1 Z-[Z-B] D[D+0.5] G0 Z -[L522- L502 - L504- 0.5 - 0.7]
G1 X [X] G1 Z-[L522-L502] D[L504+0.5]
T[T] G 1 X L 520
G1 Z -[Z-0.05] T L 516
G 1 X [S + 2] G 1 Z -[L522 - 0.05]
G0 X[L515+2]
Call-up in the main program M99
%
%
O2525
G59 X0 Z150
 ….
 ….
(plunge cutting)
N4 G96 V100 T0404 M8
(1ST plunging)
G248 S30 X20 Z15 B4 D0.5 F0.1 W3 T0404
G0 X52
(2ND plunging)
G248 S50 X40 Z40
(3RD plunging)
G248 Z55
G26 M9
 ….
 ….
M30
%

P a g e 52
Example Macro program: (external turning)

Parameter list:
T = tool call-up for roughing
U = tool call-up for finishing
F = feed in mm/rev

%
O9885 (Program concept)
G26
G96 V100 T [ T ] M4
G0 X[ M+5 ] Z0
G1 X-1 F[ F ] Z2
G0 X[M+5] Z2
G88
G71 P10 Q20 I0.5 K0.1 D2 F[ F*2 ] E [ F*0.5 ]
G89
G26 M5 M9
G96 V120 T[ U ] M4
L1 = [ [ TAN A * H ] * 2 ]
L2 = [ B – L1 – 2 ]
G0 X L2 Z2
N10 G46
G0 X L2 Z2
G1 Z0 F [ F ] M8
G1 A90
G1 X [ B ] Z [ H ] A - [ A ]
G1 Z- [ K ]
G2 X [ E ] Z [ J ] R [ R ]
G1 Z- [ P ]
G1 X [ M ] D [ D ]
G1 W- [D+2 ]
N20 G40
G26 M6 M9
M99
%

P a g e 53
Application the macro program in the main program:

O223344

%
G59 X0 Z200
G92 S2000 Q1000
G26
 …
 …
G285 A30 B60 D5 E100 H25 J75 K38 M150 P108 R50 T0101 U0202
 …
 …
M30

P a g e 54
Chapter 5

Driven Tools

P a g e 55
LESSON PLAN

PRT 06.60 CNC Turning & Programming 11 (ISO) Location CNC LAB

Chapter
Driven Tools

5 Prepared by Muhamad Riduan

Objectives

1. At the end of this topic, the students will be able to:

 Identified the possibilities of machining using driven tools.

2.

3.

4.

5.

6.

7.

8.

9.

10.

References Media

1. LECTURE NOTE 1. TRANSPARENCIES

2. STUDENT‟S HANDOUT 2. WHITE BOARD

3. 3. POWER POINT

4. 4. OHP

5. 5.

P a g e 56
CHAPTER 5 DRIVEN TOOLS

5.1. MACHINING WITH POSITIONED WORK SPINDLE


AND WITH DRIVEN TOOLS

5.1.1. TOOL PARALLEL TO WORK SPINDLE

It is possible to produce holes and threads parallel to the work spindle.


Face grooves can be milled with end mill cutters.
With spindle positioning or the numerically-controlled C axis it is possible to
produce various operations on the face as shown in these illustrations.

 Drilling, tapping, key-way


milling in Z direction.
 Tool axis inside and outside
X – Z plane of the machine.

5.1.2. TOOLS AT RIGHT ANGLE TO THE WORK SPINDLE

Plain and threaded holes may be produced.


Grooves parallel to the rotation axis can be milled with end mill cutters.
In connection with a spindle positioning device, it is possible to produce cross
holes at various spacing.

 Drilling, tapping, key-way milling in


X direction.
 Tool axis inside and outside X – Z
plane of the machine.

P a g e 57
5.1.3 MILLING WITH SAWBLADES AND SIDE-AND-FACE CUTTERS

Slots can be machined with saw blades in cross or plunge milling operations.
In combination with spindle positioning, it is possible to produce multi-edges
faces. Efficiency can be increased with use of paired cutters. Through
simultaneous X and Z movement slots with curved bottom surfaces san be
produced.

Radial slotting with slide-and-face Milling of flats and slot with side –
cutter. and-face cutters (straight milling).

Milling if flats and slots with side-and-face cutters (plunge milling).

P a g e 58
5.2. PRODUCTION METHOD USING SPEED-CONTROLLED AND POSITION-
CONTROLLED WORK SPINDLE (C AXIS).

Milling with end milling cutters.


Grooves that are parallel to the spindle axis, grooves on faces and those outside the
X-Z plane can be produced with end milling cutters.
With the necessary auxiliary equipment and systems it is possible to produce
circumferential and helical-shape groove to interpolation between the spindle rotation
(C axis) and Z axis. Also, by interpolation of C axis and X axis, spiral-shapes
grooves can be cut, and key faces produced with plain milling cutters. (See also
Chapter C axis and TRAUB - POLYFORM).

Circumferential face slots, spiral Circumferential, longitudinal and


grooves, polygon milling with end helical-shaped groove milling with end
milling cutter.. milling cutter.

Polygon milling with side-and-face cutter.

P a g e 59
5.3. SURVEY OF DRIVING POSSIBILITIES

Driven tools can be mounted in each of the 12 tools station, with one exception:

- If the machine is provided with an in-process gauging control, station 11 of the tool
carriers W1 and W2 cannot be equipped with driven tools.

P a g e 60
5.4 CALL-UP IN NC PROGRAM

Tool carrier

Spindle speed S3=….


Nmax = 10000rpm

Clockwise rotation : M 303 (23)


Counter-clockwise rotation : M 304 (24)

Drives off M 305 (25)

Determining the spindle speed

- Caution :
When determining the spindle speed, a transmission ratio must be taken into account
for some toolholders.

Determining the direction of rotation

- The direction of rotation of the driven tools is specified as viewed from the tools
drive.

Caution :
For some toolholders (for driven tools) the direction of rotation is reversed by an
intermediate pinion in the holder.

For the direction of rotation to be programmed, therefore, refer to the corresponding


toolholder catalogue.

Important:
Prior to the T call-up, the tool drive must be switched OFF!

P a g e 61
Example for calling up a driven tool:
Tool carrier
N6 T 606 M5 / M 205
G94
S3 = 1500 M303 / M304



M 305

Tapping / threading (taps, dies)*

When cutting threads by means of driven tools with the main spindle being
stopped, the thread must be programmed in G1 format.

Example : Cross hole and cross thread, pitch 1.0

G0 X 50 Z-20 Clockwise rotation


M 303 S3=300 (reversal of spindle rotation)
G1 U-15 F 270** thread cutting
G1 U 15 F 300 M 304 thread return and
change of direction of rotation

* Transmission ratio of tool must be taken into account!


** The feed rate is calculated from spindle speed x pitch – 10%

P a g e 62
Chapter 6

C – Axis and milling functions

P a g e 63
LESSON PLAN

PRT 06.60 CNC Turning & Programming 11 (ISO) Location CNC LAB

Chapter
C Axis – and milling functions

6 Prepared by Muhamad Riduan

Objectives

1. At the end of this topic, the students will be able to:

 Understand and explain the basic concept of programming using C – axis.

2.  Understand and write the programming format of C – axis and milling at the
CNC turning machine.

3.  Identified the possibilities of machining using C – axis and milling function of


CNC turning.

4.

5.

6.

7.

8.

9.

10.

References Media

1. LECTURE NOTE 1. TRANSPARENCIES

2. STUDENT‟S HANDOUT 2. WHITE BOARD

3. 3. POWER POINT

4. 4. OHP

5. 5.

P a g e 64
Chapter 6 C – AXIS AND MILLING FUNCTION

POLYFORM

P a g e 65
6.1 C AXIS INSTRUCTIONS

G 28 – Reference point C axis

G 28 X.. Z.. C..

Input C0

G 00 – Rapid traverse

G 00 X/U.. Z/W.. C..

rotary motion of C axis in absolute


or incremental dimension, dependent
on G 90/G 91 (in degrees)

G 01 – Feed rate

G 01 X/U.. Z/W.. C.. F..

feed rate

rotary motion of C axis in absolute


or incremental dimension, dependent
on G 90/G 91 (in degrees)

G 59 – Zero point shift

G 59 X.. Z.. C..

Zero point shift of C axis

By using the C axis, drilling and milling operations can be performed (positioned on
the workpiece) in addition to turning operations.

The traverse movement of the C axis is programmed under the address C.

The feed rate is entered in mm/min (G94). It can, however, be converted into
degrees/min by means of the macro G261 (see next page).

P a g e 66
The C axes of the main spindle or the opposed spindle can both be defined in the
slide $1 program and the slide $2 program.

On the main spindle, the C axis is


- activated by M17 and
- deactivated by M18

- These functions must be entered in a separate block.

Caution :
- Before programming M17/M217, the main spindle and the opposed spindle,
resp, must be stopped by M 5/M 205.
- During C axis mode, no. M 5/ M 205 and no speed S1/S2 must be
programmed.

Angle programming of the C axis can take place in


absolute dimension (G90) or
incremental dimension (G91).

If a zero point shift takes place in the C axis by means of the instruction G59 C.., it
will be modified only be programming a new zero point shift.

Therefore, the zero point shift must be reset by G59 C0 at the end of the C axis
mode.

Caution :
- When traversing at feed rate, the feed rate of the C axis must be calculated in
“degrees per minute”.

P a g e 67
A macro is available for the feed calculations of traverse movements with the C axis.
In this macro (G261) the feed rate is calculated, taking into account the machining
diameter and the number of degrees to be traversed.
Within the machining program, the feed rate stored in parameter L3 or L4 can be
programmed under the address F.

L3 = feed rate calculation with unit (º/min)


L4 = feed rate calculation with unit (mm/min)

Macro :
%
09861
L3 = FUP [[360/[L504 *3.14]] * [L506 * L522 *L502]]
L4 = FUP [L506 * L522 * L502]
M99
%

Application in main program (only C axis):


T303 M5
M17
G28 C0
G94
G90
G261 B… D... F… Z... macro call-up* For feed rate calculation


G00 X… Z…C…
G01 X… F…
G01 C… FL3 C axis feed rate value from parameter L3
G01 Z-… FL4 linear feed rate from Parameter L4


*B = milling cutter speed RPM
D = machining diameter mm/inch
F = feed rate in mm/tooth mm/inch
Z = number of teeth of milling cutter

P a g e 68
6.2 C AXIS SELECTION ON THE MAIN SPINDLE

Absolute programming

M5 spindle stop
M17 C axis ON
G 28 C0 Approach to reference point C axis
G90 selection absolute programming
G94 feed rate mm/min

 workpiece program

G95
M18 C axis OFF

Incremental programming (with reference point)

M5 spindle stop
M17 C axis ON
G28 C0 Approach to reference point C axis
G91 selection incremental programming
G94 feed rate mm/min

 workpiece program

G90 selection absolute programming
G95
M18 C axis OFF

P a g e 69
6.3 C AXIS PROGRAM FORMAT

Below you will find the program format including the G3 block and details concerning
this block.

Recommended program format

T101 M5 TOOL CALL-UP AND SPINDLE STOP

M303 S3=1000 ROT. DRIVE ON TX 8F

G90

G94 mm/min

M17 C AXIS ON

G28 CO C AXIS REFERENCE POINT

G0 Z-10 Z AXIS TO POSITION

G0 X122 X AXIS TO POSITION

G11 MILLING ON

G17 X AND C INTERPOLATION PLANE

G0 X61 Y0

G3 X33.166 Y10 P0 A0 F3000


or
G3 X33.166 Y10 R60 F3000

X = calculated value
Y = width across flats
P = centre X axis
A = centre Y axis
R = radius
F = feed rate

P a g e 70
C axis

Programming example :

Working on stationary main spindle

Positioning the C axis


On main spindle

T606 M5 tool call-up, spindle stop


M 303 S3=1500 dir. of rotation, Speed of driven tool
M17 c axis clutch ON
G 91 selection incremental programming
G94 feed rate mm/min
G 0 Z3
G0 X40 M8 positioning to pitch circle dia.
G1 Z-12 F100
G0 Z3
G0 C120 positioning by 120º
G1 Z-12
G0 Z3
G0 C120 positioning by 120º
G1 Z-12
G0 Z3
G26 M9 M305 approaching tool changing point rot. tool
drive OFF
G90
G95
M18 C axis clutch OFF
Switching of rot. encorder (main spindle)

P a g e 71
C axis

Programming example :

Milling on the face

On main spindle

T606 M5 tool call-up, spindle stop


M 303 S3=1500 dir. of rotation,
Speed of driven tool
M17 c axis clutch ON
G 91 selection incremental programming
G94 feed rate mm/min
G261 B1500 D50 F0,02 Z3 macro call-up for
feed rate calculation
G0 X50 M8 positioning to milling diamater
G1 Z-3 F100
G1 C90 FL3 traverse movement C axis
Feed rate from macro calculation
G0 Z3
G26 M305 M9 approaching tool changing point rot. tool
drive OFF
G90
G95
M18 C axis clutch OFF
Switching of rot. encorder (main spindle)

Note : The centre point of an arc to be milled must lie on the spindle centre
line.

P a g e 72
6.4. POLYFORM INSTRUCTIONS (TRAUB MACHINE CONTROLLER)

G10 Milling function OFF

G11 Milling function ON

G90 Absolute input for C and Y axis

G91 Incremental input for C and Y axis

6.5 MILLING ON G17 PLANE

The instruction G17 selects the plane face. The traverse movements are
programmed under the addresses X and Y (see coordinate system). If the input is
made on the machine, the key Y must be pressed; this superimposes the address C.

Coordinate system TURNING

X+

Z- Z+

X-
Coordinate system MILLING

Y+ Z+

X- X+

Z- Y-

P a g e 73
G17 – Milling plane face / traverse cut

The instruction G17 selects the plane face / transverse cut. Programming of the
traverse movements takes place under the addresses Y and X. If the input is
performed on the machine, key Y must be pressed. This superimposes the address
C. A movement in the Z axis (infeed) must be programmed as a separate block.
After selection of G17, the following G functions are permissible:

G00, G01, G02, G03,


G04, G22, G40, G41,
G42, G83, G90, G91
and macro call-up.

Within G17 all geometry


inputs like G01, G02/G03
are possible.

P a g e 74
Coordinate system and workpiece zero point when POLYFORM milling in the
G17 plane (face).

Axis definition with POLYFORM

G17 plane (face)

Programming example : to mill Slot

N9 T909 M5
G94
M17
M303 S3=600
G90
G0 X46 Z-3
G11
G17
G3 X19,621 Y12 P0 A0
F1000
G1 X-20 F100
G10
G0 X60
G26 M305
M18
G95

P a g e 75
G17 plane (face)
Programming example : to mill Square

N3 T303 M5
G94
M17
M303 S3=500
G90
G0 Z-5
G0 X33.5
G11
G17
G3 X-11.15 Y12.5 P0 A0
F1000
G1 X-12.5 F100
G1 Y-12.5
G1 X12.5
G1 Y8
G10
G0 X60
G26 M305
M18
G95

P a g e 76
Example : Milling a square profile with a 20mm width AF. Material and milling
cutter diameter are the same as for the flat rate.

Recommended program format : see next page.

P7 P3

P4
P8

P1

P2

P5 P6

P1 to P2 activating the compensation in G0


without traversing movement
P2 to P3 G3 block
P3 to P4 G1 block
P4 to P5 G1 block
P5 to P6 G1 block
P6 to P7 G1 block
P7 to P8 deactivating the compensation in G0
without traversing movement

P a g e 77
Width AF = 20mm
Milling cutter diameter = 30mm

Positioning point A = turning ø + safety clearance + milling cutter ø


30 + 2+2 + 12
= 46 mm

Positioning point B = turning radius + safety clearance


15 + 2
= 17 mm

P7 P3

P4
P8

12mm

20mm

P1

P2

P5 P6

30mm
A

A = positioning point in X before selecting the calculation aid G11 = diameter

B = comp. positioning in X after the calculation aid G11, milling plane G17 and
MRC with G = radius

P a g e 78
(G3 with known coordinate) G3 with unknown coordinate
 
 
T0101 M5 T0101 M5
M303 S3=3000 M303 S3=3000
G94 G94
M17 M17
G28 C0 G28 C0
G90 G90
G0 Z-5 G0 Z-5
G0 X46 G0 X46
G11 G11
G17 G17
G42 G42
G0 X17 Y0 G0 X17 Y0
G3 X13.748 Y10 C0.1 F3000 E100 G3 P0 A0 H1 C0.1 F3000 E100
G1 X-10 F100 G1 X-10 Y10 A0 F100
G1 Y-10 G1 Y-10
G1 X10 G1 X10
G1 Y10 G1 Y10
G0 X16 A90 G0 X16 A90
G40 G40
G10 G10
M18 M18
G95 G95
G26 M25 G26 M25
 
 
 
 

P a g e 79
Example : Milling a hexagon profile with a 20mm width AF. Material and milling
cutter diameter are the same as for the square.

Material diameter 30 mm
Milling cutter diameter 12 mm
Safety distance 2 mm
Width AF 20 mm

1. Start and end point are determined by calculation.

2. Start and end point are determined by the control system.

12mm

20mm

P1

P2

30mm
A

The two programming possibilities are shown on the next page.

P a g e 80
Intersection points H0 / H1

(Details concerning the intersection points H0/H1:


See programming Instructions)

Program with calculated Program with intersection


Start and end point point H1; start point is
Calculated by control system

T0101 M5 T0101 M5
M303 S3=2000 M303 S3=2000
G94 G94
M17 M17
G28 C0 G28 C0
G90 G90
G0 Z-5 G0 Z-5
G0 X46 G0 X46
G11 G11
G17 G17
G42 G42
G0 X17 Y0 G0 X17 Y0
G3 X13.748 Y10 P0 A0 C0.1 G3 P0 A0 H1 C0.1 F3000 E100
F3000 E100
G1 X-5.774 F100 G1 X-5.774 Y10 A0 F100
G1 Y0 A240 G1 X-11.547 Y0
G1 X-5.774 A300 G1 X-5.574 Y-10
G1 X5.774 G1 X5.574
G1 Y0 A60 G1 X11.547 Y0
G1 X5.774 A120 G1 X5.574 Y10
G1 X5.574 G1 X5.574
G0 Y16 A180 G0 Y16 A180
G40 G40
G10 G10
G95 G95
M18 M18
G26 M25 G26 M25

P a g e 81

You might also like