Sie sind auf Seite 1von 37

Chair of

Machine Tools
Prof. Dr.-Ing. Christian Brecher
Exercise 8 Machine Tools II
Topic: Manual programming of NC machines
Assistant
responsible:
Dipl.-Ing. Sebastian Bauer
S.Bauer@wzl.rwth-aachen.de
WZL, 53B R424
Tel.: 0241 / 80-28478



Index
1 Basics of manual NC programming 1
1.1 Introduction 1
1.2 NC programming 1
1.2.1 Writing NC programmes 1
1.2.2 Structure of a NC programme 4
1.2.2.1 Coordinate systems and reference points 4
1.2.2.2 Presentation of information 7
1.2.3 Tool offset compensation 8
1.2.3.1 Cutting-edge radius compensation 9
1.2.3.2 Milling cutter radius compensation 10
1.2.4 Additional commands for programme input 10
1.2.4.1 Combined contours 11
1.2.4.2 Sub-routines 13
1.2.4.3 Cycles 14
1.3 References 14
2 Exercise 15
2.1 Programming exercise 15
2.2 Solution 17
Exercise 8, WZM II


2.3 Programming key 22
2.4 Coding sheet 23
3 Bonus task 25
3.1 Introduction 25
3.2 NC programme for test part 29


Manual programming of NC machines, WZM II
1
1 Basics of manual NC programming
1.1 Introduction
Numerically controlled (NC) machine tools are used to increase the level of
automation in the field of one-off and small-batch manufacturing (batch sizes
approximately 1-100 pieces). Compared to automatic lathes NC-machine tools have
the advantage of greater flexibility. Especially for manufacturing complex geometries
NC machines are superior to conventional machines.
The following sections describe the fundamentals of manually programming NC
machines. Semi-automatic and automatic (computer-based) programming methods
will not be covered here.
1.2 NC programming
Programming NC machines means to assemble control information which contains
precise working instructions for the machine tool in the correct order.
The control information is usually transmitted to the machine in ASCII format via
floppy disc or DNC (Distributed Numerical Control) these days, in recent years USB-
connected storage devices have come into use as well. The punched paper tape
formerly used as a data medium is now employed only on very old machines.
The control information must have an agreed systematic structure so that the
numerical control can interpret it.
1.2.1 Writing NC programmes
In conventional manufacturing, the machine operator translates the production task
into control instructions for the machine (technical drawing data manual switching
and motion events). In NC manufacturing, by contrast, this work is transferred to the
programming department (technical drawing data switching and traversing
instructions as control information).
Manual programming of NC machines, WZM II
2
The various programming methods in practical use may be classified as
manual methods (direct programming)
semi-automatic programming and
automatic (computer-aided) programming.
The choice of method will depend primarily on the type, quantity and complexity of
the manufactured parts and on the percentage of repetition parts. For example,
choosing a computer-aided approach necessitates that hard- and software be
purchased for automatic programming with programming systems like APT or
EXAPT. In consequence, this method is only used when the number and scope of
NC programmes which have to be prepared seems to economically justify this extra
cost or when it is essential because the complex geometry of the work pieces does
not permit manual programming. This exercise deals solely with manual NC
programming.
Geometry:
- rawpiece geometry
- workpiece geometry
- tolerances
- workingsteps
Technology:
- material
- cutter's material
- surface quality
- vc, Q
c
, ...
Production facilities:
- workspace
- clamping devices
- tools
- torque
- maximun rpm
- maximum speed
- preciseness
- auxiliary devices

Fig. 1: Information needed to generate a NC-Programm
Manual programming requires detailed planning of each individual machining step by
the programmer, based on given requirements (Fig. 1). Starting from the technical
drawing of the part, the programmer has to choose a suitable machine tool and
determine the clamping position of the work piece. The machining sequence is
recorded in a working plan and the required tools are stored in a tool plan. Because
of the part geometry must be converted into a tool path curve, the most time-
consuming task is determining the geometrical dimensions. If there are large
Manual programming of NC machines, WZM II
3
differences in volume between the blanks and the finished parts, determining the
number of cutting passes by means of an appropriate cut division will also be
necessary.
One example is shown in the following exercise. The different types of interpolation
an NC is capable of require that the full part contour is split into individual contour
elements which correspond to these interpolation capacities, as shown in Fig. 2.
Elements: Line
Circle

Fig. 2: Transforming the part geometry into contour elements
Technological parameters like depth-of-cut, feed and cutting speed are selected from
standard value tables and also stored on the information medium. On older NC
machines, it is generally necessary to adapt these values from cut to cut to maintain
constant cutting conditions over changing part dimensions caused by the machining
progress. Newer machines, which are usually equipped with powerful CNCs, provide
useful aids to the programmer. Modern lathes for example have facilities for
automatically maintaining a constant cutting speed. Taking into account the current
working diameter, the speed of rotation and the feed rate are automatically adapted
accordingly. Additional technological data include tool changes, cooling lubricant
on/off or machine stop.
After defining all working steps required to manufacture the part, the programmer
enters this control information in tabular form on a coding sheet.
Manual programming of NC machines, WZM II
4
1.2.2 Structure of a NC programme
1.2.2.1 Coordinate systems and reference points
The geometrical information or path parameters specify the paths traversed by the
tool. These can be programmed in incremental or absolute dimensions (Fig. 3).
Incremental dimensions mean that the length of the section to be traversed is given.
In absolute programming, the traversed points are specified by giving the distance
from a reference point along the coordinate axes. If a machine is restricted to
incremental or to absolute dimensions, as is frequently the case with older NC
controls (this often depends on the type of measuring system they use) it will be
helpful to use incremental or absolute dimensions in the technical drawing itself.
Modern CNC controls can be programmed either in incremental or in absolute
dimensions, irrespective of the installed measuring systems. In this case, the control
computer inside the CNC converts the incremental or absolute dimensions, referred
to a reference point, into an internal traversed path representation that is suitable to
the measuring systems.
50
20

2
0


4
0

a) G90: absolute to a preset origin

2
0

30
b) G91: relative to the last point
z z
x x

Fig. 3: Position data in absolute and incremental dimensions
In order to be able to programme, it is necessary to establish a coordinate system.
Assuming that the part is fixed and the tool is in motion, the system shown in Fig. 4
can be used to specify the part axes.
Manual programming of NC machines, WZM II
5
+X
+Z
+Z
+Y
+X
+Y
+X
+Z
+Y
+X
+Z
+X
+Z
+C'
+Z
+W'
+Y'
+X'
+Z
+Y
+X'
+W'
+Z
+Y
+Y
+X'
+W
+A
+X
+Z
+Y
+A
+B
+C
+Y
+X
+Z
right handed, right-angled
coordinate system
Lathe
X, Y, Z, A, ... tool movement
X', Y', Z', A', ... workpiece movement
DIN 66217

Fig. 4: Coordinate systems
The z-axis of a right-handed coordinate system is invariably parallel to the axis of
rotation of the tool spindle. It is perpendicular to the part clamping surface defined by
the x- and y-axes, the x-axis being as horizontal as possible.
If the part is in motion and the tool is fixed, the corresponding axes are referred to as
machine axes, which are antiparallel to the part axes and designated by an
apostrophe.
In the initial state of the NC control, all absolute path information is referred to the
machine coordinate origin or zero point M (
Fig. 5).
Manual programming of NC machines, WZM II
6

Fig. 5: Reference points of an NC lathe
For machining, however, it is usually advisable to refer to the part zero point W. The
control system can internally perform a coordinate transformation using zero shifting
(ZMW, XMW) for this purpose.
At the beginning of the operation, the tool position relative to the part must be
defined. Using a special instruction (reference point traverse), the tool carriage is
traversed so that the carriage reference point F is identical with the reference point
R, which has an exactly defined position on the machine. Prior to the actual
machining operation, the required tools are inserted into the carriage with their
respective tool pre-positions and the clamping dimensions (ZFP, XFP, see
Fig. 5 and cf. chapter 1.2.3) are entered in the tool file. The programmer thus knows
the precise starting position of the tool tip in the working space of the machine and
can calculate the tool motion paths starting from this point. Any deviations of the tool
dimensions from the ideal values, e.g. as a result of wear, may be entered in the
A M
R
W
E
A
M
R
W
E
F, N
F
XEP, ZEP
XWR, ZWR
XMR, ZMR
ZMW
ZMW
X
M
R
,

X
W
R
ZMR
ZWR
X
E
P
ZEP
P

L

n
g
e

N
E
machine origin
clamping stop
workpiece reference point
tool reference point
slide, tool holder
reference point
tool change position
reference point
tool lengths from clamping point
distances part origin to reference point
distances between machine origin
and reference point
distances between machine origin
and path origin
tool tip
diameter
l
e
n
g
t
h
Spindle
tool
P
Manual programming of NC machines, WZM II
7
compensation value memory of the NC control. These compensation values are,
however, valid only for this respective tool.
1.2.2.2 Presentation of information
The structure of control programmes for NC machines, often also referred to as part
or NC programmes, is laid down in DIN 66025. The NC programme is composed of a
series of blocks, each block representing one working step of the machine. The
individual data in a block are termed words or NC functions. Selected words are
given in the programming key in Appendix 1. The words themselves may be sub-
divided into address characters and a code. Table 1 reviews the most common
address characters.

Address
character
Meaning
N block number (number)
G path parameter
X, Y, Z path dimensions (absolute or incremental)
F Feed
S Speed
T Tool
M miscellaneous functions
Table 1: Address characters
Table 2 lists some words formed by combining the address character G with various
codes:
Word Meaning
G00 rapid traverse
G01 linear interpolation
G02 clockwise circular interpolation (cw = clockwise)
G03 anti-clockwise circular interpolation (ccw = counter-clockwise)
G04 dwell time
G33 thread cutting
G90 absolute dimension input
G91 incremental dimension input
Table 2: Selected G words
Manual programming of NC machines, WZM II
8
In order to traverse an arc, one needs to know not only the path end point (X,Z) but
also the centre point of the arc. The position of the centre point is given in the
functions I and K (Fig. 6).
G02
G03
G02
G02
G03
G03
x
y
z
z
x
E
G03
A
Z
K

I


X

M
Example:
Programming of a circlular movement within
the x-z-plane for turning
A: starting point
E: end of the circular arc
M: center
N047 G03 X1800 Z-1800 I-1000 K-2800
Encoding (G-functions) of circular
arcs in the three planes determined
by an orthogonal, right handed
coordinate system.
G02: circular arc, clockwise (cw)
G03: circular arc, counter clockwise (ccw)

Fig. 6: Programming circles
1.2.3 Tool offset compensation
Programming the traversed paths, one refers directly to the part contour. The control
must transform these traversing instructions in such a way that the contour-forming
cutting edges of the tool are guided along this contour. Depending on the machining
process, various corrective calculations must be performed to compensate for the
real tool dimensions (Fig. 7) ). These dimensions are determined when the tool is set
up and are stored in the compensation value memory of the control. During the
machining operation, they are retrieved from this memory and included in the
computation.
The tool-clamping position of the tools has to be compensated both for turning and
for milling. It is taken into account as an offset value in calculating the path. Other
factors considered are the cross-path distance for turning and the cutter radius for
milling.
Manual programming of NC machines, WZM II
9
tool setting point
length L
cutter radius R
length L
Q

Fig. 7: Tool dimensions for compensation calculations
1.2.3.1 Cutting-edge radius compensation
cutting edge radius r
s
idealized tip of the tool
(no compensation)
monitored part of
the cutting edge
programmed contour
produced contour
A
detail A

Fig. 8: Cutting-edge radius compensation for turning
Lathe tools have a radius at the tip of the cutting edge in order to reduce scoring
during the turning operation and to increase cutting-edge stability. Customary radii
range from 0.4 to 0.8 mm for finishing and up to 1 mm for roughing tools. It is
necessary to compensate the cutting-edge radius when computing the traverse
paths to avoid violating the contour (Fig. 8).
Manual programming of NC machines, WZM II
10
1.2.3.2 Milling cutter radius compensation
When compensating the cutter radius computing an equidistant path from the
programmed contour so that the programmed contour can be generated. Because
additional collision checks on inside contours are needed in this calculation (Fig. 9a)
and because intermediate blocks have to be inserted on the outside contours (Fig.
9b), the cutter radius compensation entails a much greater computing effort than the
cutting-edge radius compensation for turning.
R
R
avoided
collision
programmed
endpoints
virtual
endpoint
remaining
material
cutter location
path
R
cutter location
path
automatically
generated circular arc

Fig. 9: Milling cutter radius compensation a) inside contour b) outside contour
In order to place the offset path on the correct side of the programmed contour, it is
also important to specify whether the cutter is to the left (G41) or to the right (G42) of
the programmed contour (in the direction of travel) when activating the
compensation.
1.2.4 Additional commands for programme input
Programming complex parts solely with the standardised instructions listed in DIN
66025 is extremely time-consuming. Virtually all modern control systems therefore
provide extended instruction sets for user-friendly programming. The disadvantage of
these extended sets is that they are not standardised. As a result, programmes
containing instructions of this kind cannot be transferred to other control systems, or
can be transferred only with considerable conversion effort.
Manual programming of NC machines, WZM II
11
1.2.4.1 Combined contours
G11 X... Z... B... R... K... L... X1=... Z1=... B1=... R1=... K1=... L1=... F.. S.. T.. M..
aiming point
angle
(lieu X,Z)
radius
width of
chamfer
length
(lieu X, Z)
aiming point
angle
(lieu X1=,Z1=)
radius
width of
chamfer
length
(lieu X1=, Z1=)
technological
data
1. Line
2. Line

Fig. 10: Combined contour programming using the G11 instruction (Source: TRAUB)
Combined contours can be used to programme a number of contour elements in a
single NC block. Fig. 10 shows an example. Using the instruction in Fig. 10, two or
three traversing instructions can be combined into one while the control unit can
compute unknown coordinate values automatically.

Manual programming of NC machines, WZM II
12
L
R
L1
K1
B
B1
1.aiming point
1. line
starting point
1. line
aiming point
2. line
aiming point of
next scentence

Fig. 11a: Polar coordinates
X
X1
Z Z1
K
R1
1.aiming point
1. line
aiming point
2. line
starting point
1. line
aiming point of
next scentence

Fig. 11b: Cartesian coordinates
Fig. 10 and Fig. 11a/b explain how exactly the G11 instruction is to be used.
Basically this specific instruction can be programmed with polar as well as Cartesian
coordinates. The following example programmes the contour of the part shown in
Fig. 12. Beginning at P1, the first section of the contour is programmed in polar
coordinates and the second section, from P2 onwards, with Cartesian coordinates.
The entire contour is then re-entered using the G01/G02 instructions for comparison.
1. Contour from P1 to P2 in polar coordinates:

G11 B90 R7 L60 B1=0 K1=20 L1=88

2. Contour from P2 to P1 in Cartesian coordinates;

G11 X100 Y7 R20 X1=12 Y1=7 K1=20

3. Contour using G01/G02:

G01 X12 Y80
G02 X19 Y87 I7 J0
G01 X80
G01 X100 Y67
G01 Y27
G02 X80 Y7 I-20 J0
G01 X32
G01 X12 Y27
Manual programming of NC machines, WZM II
13
10
5
W
Z
X
W
8
7


1
0
0


80
100
120
6
4


6
7


32
120
2
7


12
7


P1
P2
X
Y
R7
R20

Fig. 12: workpiece drawing
1.2.4.2 Sub-routines
Sub-routines are used if a particular series of instructions is repeated frequently in a
programme, for example when programming drilling patterns. In such cases, it is
useful to store the relevant series of instructions in a sub-routine which can be
invoked repeatedly from the main programme. This technique reduces the total size
of the programme and makes it easier to understand by saving the relevant
information for the instruction series centrally. Optional transfer of parameters from
Manual programming of NC machines, WZM II
14
the main programme to the sub-routine also enables the programmer to use the sub-
routine for different applications.
1.2.4.3 Cycles
Cycles are sub-routines permanently implemented in the control system. Most
control systems provide cycles for standard tasks in the corresponding machining
operations. For turning these are, for example, roughing or chamfer-turning cycles;
for milling, cycles for milling slots and pocket holes are frequently provided. Drilling
cycles are relevant to both machining technologies. Fig. 13 shows a cycle for slot
milling.
cutter location path
cutter location path

Fig. 13: Slot milling cycle

1.3 References
1. Weck, M.; Brecher, C. Werkzeugmaschinen / Fertigungssysteme, Band
4: Automatisierung von Maschinen und Anlagen
Springer-Verlag, Berlin, 2006
2. N.N. DIN 66025, Teil 1 und Teil 2: Programmaufbau fr
numerisch gesteuerte Arbeitsmaschinen
Beuth-Verlag, Berlin, 1983
3. Kief H.B. NC/CNC Handbuch, Carl Hanser Verlag,
Mnchen Wien, 1999
Manual programming of NC machines, WZM II
15
2 Exercise
2.1 Programming exercise
In order to manufacture a part (Fig. 14) on an NC lathe, a NC programme must be
written. The lathe, tools, self-centring chuck and clamping position are given.
15 25 15 15 10


4
0


5
0


1
0
0


6
0


60
190
Futter Spannbacken
M
R
W

Fig. 14: Technical drawing of the part
Two tools stored in position 1 and position 2 of a tool-changer shall be used for the
operation. Compensation value memories 6 and 7 are chosen for any tool length
compensations. Tool 1 is to be used for roughing and tool 2 for finishing. The tools
have no cutting-edge radius and are placed pre-adjusted in the tool carrier.
chuck yaw
Manual programming of NC machines, WZM II
16
Owing to the work material/tool material combination and the installed machine
power, a constant cutting speed of 100 m/min is to be used. In order to ensure good
chip formation, the decisive parameters for the chip cross-section have been chosen
as follows:

Depth-of-cut: a = 10 mm
Feed (roughing): s
1
= 0.5 mm/rev.
Feed (finishing): s
2
= 0.1 mm/rev.

The pre-processed blank has the following dimensions:

Diameter: D = 100 mm
Length: L = 80 mm

The finishing allowance is to be 1 mm.
The feed rate can be programmed only in mm/min. With absolute dimension
programming, the x-axis must be programmed in diameter values; with incremental
dimensions, simple traverse displacements are entered in the x-axis.

Create the NC programme and fill out the coding sheets (see chapter 2.4).
Manual programming of NC machines, WZM II
17
2.2 Solution
Step 1
The allowance is removed in a series of longitudinal cuts (Fig. 15). Points 118
mark the end points of the NC blocks representing tool movements.
15 25 15 15 10
2
0


5


starting point of the
roughing operation
(tool 1)
starting point of the
finishing operation
(tool 2)
1 2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
safety distance
z
x

Fig. 15: Cut division
Considering the maximum depth-of-cut of 10 mm and the finishing allowance of 1
mm, three cuts are needed for roughing and one cut for finishing.
The coordinate values for the first cut (1-2) are calculated as an example. Xs, and Zs
are the coordinates of the corresponding end-of-block point.
Manual programming of NC machines, WZM II
18

z
s
40
r
b
h
2
6
5
0
x
s


According to the drawing: mm r 24 =
h mm x
s
= 50
b mm z
s
= 40
It may be stated that:
2 2 2
b h r + =

2 2
h r b =

For the first step, taking mm a h 10 = = , the result is:
mm mm b = =
mm x =
2 , 1

mm z =
2

For the second step, taking mm h = = :
mm x =
6 , 5

mm z =
6

Manual programming of NC machines, WZM II
19
Point x[mm] z[mm]
1
2
3
4
5
6
7
.
.
Step 2
The technology values for the speed and feed rate are determined.
According to the task:
v = 100 m/min = const.
s
1
= 0,5 mm/Umdr. (roughing)
s
2
= 0,1 mm/Umdr. (finishing)
The following relationship between the cutting speed, the turned part diameter and
the speed is:
n d v =
Using
d
v
n

=
it follows, that for Step 1:
=
1
n
and for the feed rate: n s u =
=
1
u

Manual programming of NC machines, WZM II
20
For the remaining steps, it follows that:
Cut Feed d [mm] n [min
-1
] u [mm/min]
1 - 2 s
1

5 - 6 s
1

9 - 10 s
1

10 - 11 s
1

12 - 13 s
1

14 - 15 s
2

15 - 16 s
2

17 - 18 s
2


Step 3
A zero shift is used to move the machine zero point M to the part zero point W. This
simplifies defining the movement instructions, since the dimension data from the
part drawing can largely be transferred to the NC programme.
Generally speaking, there are two different methods of zero shifting.
The first uses instructions G53 to G59 and shifts the zero point starting from a
reference point known to the control. A reference point in this sense could, for
example, be the machine zero point M or a previously defined part reference point
W.

Example: G54 X0 Z60

Instruction G54, refers the part coordinate system to the machine zero point. The
machine coordinate system is shifted by a value of 0 mm in the x-axis and by a value
of 60 mm in the z-axis.
Manual programming of NC machines, WZM II
21
The second method of zero shifting is to set the actual value memory using
instruction G92. The values for the current position are set in the memory and can
therefore be used to specify the part zero point indirectly.
If, for example, the carriage reference point F is at the reference point and if the
distance of the reference point R from the part zero point W in the different axes
(XWR, ZWR) is known (60 mm in the X- and 130 mm in the Z-axis, Y=0), these
values can be set in the actual value memory and establish the position of the
reference point in relation to the part zero point.

Example: G92 X60 Z130

(Note: There is no need for zero shifting if the position of the tool at the beginning of
the machining operation is known and if all dimensions are programmed
incrementally.)
1


Step 4
The NC programme is drafted and is encoded with the aid of the programming key
(see chap. 2.3).


1
It should be noted here that the use of these instructions often varies on different control systems. It
is, for example, possible that, when instruction G54 is invoked, the magnitude of the shift need not be
specified explicitly in the NC programme, but has already been communicated to the control before the
beginning of the operation. Instruction G54 will then only retrieve the saved values.

Manual programming of NC machines, WZM II
22
2.3 Programming key
Code Function and meaning
% Start of programme
: 1 to 9999 Main block
N Block number
/: Maskable main block
/N Maskable block
G 00 Rapid traverse
01 Linear interpolation
02 Clockwise circular interpolation
03 Counter-clockwise circular interpolation
33 Thread cutting
G 04 Dwell time defined in ms at address X
G 17 Plane selection X-Y
15 Plane selection X-Z
19 Plane selection Y-Z
G 39 Corner correction for cutter radius path compensation
G 40 Cancel tool compensation
41 Tool path compensation left, tool left of part
42 Tool path compensation right, tool right of part
G 53 No zero shifting
G 54 Zero shifting 1
55 Zero shifting 2
G 70 Input system inches
71 Input system metrical
G 80 Cancel work cycle
81 to 89 Work cycles
G 90 Absolute dimension inputs
91 Incremental dimension inputs
G 92 Set actual value memory
G 94 Feed in mm/min at address F
95 Feed in mm/U at address F
D 1 to 99 Tool compensation number
X 0 to 99999,999 Displacement information in mm
1 to 99999,999 Dwell time in ms
Y 0 to 99999.999 Displacement information in mm
Z 0 to 99999,999 Displacement information in mm
4
th
axis 0 to 99999,999 Displacement information in mm or degrees
Possible addresses A, B, C, U, V, W
R 0 to n Parameters (e.g. for sub-routines)
I 0 to 99999,999 Interpolation parameters for X-axis for circular interpolation
or
1 to 2000,000 Thread lead in mm
J 0 to 99999,999 Interpolation parameters for Y-axis for circular interpolation
or
1 to 2000.000 Thread lead in mm
K 0 to 99999,999 Interpolation parameters for Z-axis for circular interpolation
or
1 to 2000,000 Thread lead in mm
F 0 to Fmax Feed in mm/min or mm/U
S 0 to Smax Spindle speed in min-1
T 1 to 9999 Tool number
H 1 to 999 Auxiliary function
L 01 to 99 Number of sub-routine to be invoked
M 00 Programmed stop, unconditional
01 Programmed stop, conditional
02 End of programme without rewind, in final block of programme
30 End of programme with rewind to start of programme, in last block of
programme
M 03 Spindle rotation clockwise
04 Spindle rotation counter-clockwise
05 Spindle stop
M 00 to 99 Extra functions, some freely programmable
( Start of comment
) End of comment
LF End of block
only valid for one NC-block (current line of program), all others are modal
Manual programming of NC machines, WZM II
23
2.4 Coding sheet
Comment Spindle speed Feed
x[mm] z[mm] n[min
-1
] u[mm/U]
Beginning of program
1 Zero shift
2 Spindle on, Tool 1
3 Absolute dimensioning
4 Infeed R->1
5 1st cut 1->2
6 Retract 2->3
7 Move back 3->4
8 Infeed 4->5
9 2nd cut 5->6
10 Retract 6->7
11 Move back 7->8
12 Infeed 8->9
13 Incremental dimensioning
14 3rd cut 9->10
15 Dwell time
16 4th cut 10->11
17 5th cut 11->12
18 Dwell time
19 6th cut 12->13
20 Absolute dimensioning
21 Return to R R
22 Tool change
23 Infeed R->14
24 Incremental dimensioning
25 7th cut 14->15
26 Dwell time
27 8th cut 15->16
28 9th cut 16->17
29 Dwell time
30 10th cut 17->18
31 Absolute dimensioning
32 Return to R, Sp. off
33 End of program
Movement
Manual programming of NC machines, WZM II
24


N G X Z I K F S T M
%
N10
N20
N30
N40
N50
N60
N70
N80
N90
N100
N110
N120
N130
N140
N150
N160
N170
N180
N190
N200
N210
N220
N230
N240
N250
N260
N270
N280
N290
N300
N310
N320
N330

Manual programming of NC machines, WZM II
25
3 Bonus task
3.1 Introduction
The machining operation for a flute shall be demonstrated on a TRAUB TNS 65 D
lathe (Fig. 16). The technical drawing of the flute is shown in Fig. 17. The raw
material is an aluminium shaft section measuring 30x130. All machining steps,
including drilling and milling, can be performed on this machine. Powered tools are
available for milling and drilling. The part can be transferred to a counter-spindle for
rear-side machining.

Fig. 16: Lathe TRAUB TNS 65 D
The lathe has two tool carriages which can work simultaneously. For example, one
carriage can carry out a roughing operation while the second, slightly offset, performs
the finishing step. This greatly reduces manufacturing times. The NC programme
runs on two separate channels, one for each cut. Each channel behaves like an
autonomous NC programme, but both channels are run simultaneously.
In order to avoid collisions between the two carriages, however, it is essential to
synchronise the channels. Synchronising labels (exclamation marks ! are used as
synchronising labels on the TRAUB TX 8D) are integrated in the programme code.
When the programme for a carriage reaches one of these labels, it waits until the
Manual programming of NC machines, WZM II
26
programme for the other carriage has also reached it. Both programmes are then
continued.
A separate NC programme is written for each tool carriage. These run in the two
channels, designated $1 for carriage 1 and $2 for carriage 2. The table below lists
the two programmes alongside one another. The synchronising labels (!) are easily
recognized. The second programme begins with an exclamation mark. It continues
only when the first programme also reaches an exclamation mark. In this case, two
exclamation marks are in fact placed one after the other to ensure that the two
programmes never run simultaneously. At each exclamation mark, machining is
effectively switched to the other carriage.
In the machining operation, both tool carriages are used, but for the sake of simplicity
they never contact the part simultaneously. The turret of the first carriage contains
the powered tools (milling cutters and drills) and the counterspindle. The second
carriage holds the lathe tools for roughing and finishing.

Manual programming of NC machines, WZM II
27

Fig. 17: Workpiece: Flute
Manual programming of NC machines, WZM II
28
For easier understanding of the rather more complex NC programme (8 pages), the
actual machining steps have been stored in sub-routines (SR). The main programme
reproduced below lays down only the general sequence of machining steps,
indicating which tool carriage is used for each step. The individual sub-routines are
invoked by instruction G22, the number of the sub-routine being specified at address
A (in this case 8017 8030).

Carriage 1 Carriage 2 Comment
$1 $2 Select carriage
G59 X0 Z294.7 Part additive zero shifting
G22 A8018 SR prepare
! ! Synchronising label
G59 X0Z294.7 Part additive zero shifting
G22 A8017 SR prepare
! !
G22 A8019 SR press down part
! !
G22 A8020 SR rough mouthpiece
! !
G22 A8022 SR drill holes in mouthpiece
G22 A8023 SP mill mouthpiece
G22 A8024 SR mill air gap
! !
G22 A8021 SR finish mouthpiece contour
! !
G22 A8025 SR transfer to counterspindle
G59 Z364.7 Part additive zero shifting
G22 A8026 SR position counterspindle
! !
G59 Z364.7 Part additive zero shifting
G22 A8027 SR rough second side
G22 A8028 SR finish second side contour
G59 X0 Z0 Part zero shifting OFF
! !
G22 A8029 SR drill and bore
G22 A8030 SP flush flute
G59 X0 Z0 Part zero shifting OFF
! !
M30 M30 End of programme
Table 3: Main programme for machining the flute
The complete NC programme is listed in the appendix. Some of the machining steps,
especially the milling operations, are highly complex and too specific to be dealt with
in detail as part of this exercise. However, those who are interested should not feel
deterred from taking a closer look at the NC programme.

Manual programming of NC machines, WZM II
29
3.2 NC programme for test part
Main programme 20 (flute)
%
O20 (00-00 -0000 00:00)
$1 NC channel for carriage 1
(FL0ETE HAUPTPR0GRAMM)
G59 X0 Z294.7 Additive zero shifting
G22 A8018 Sub-routine prepare
!
!
G22 A8019 Sub-routine press down part
!
!
G22 A8022 Sub-routine drill holes in mouthpiece
G22 A8023 Sub-routine mill mouthpiece
G22 A8024 Sub-routine mill air gap
!
!
G22 A8025 Sub-routine transfer to counterspindle
G59 Z364.7
G22 A8026 Sub-routine position counterspindle
!
!
G22 A8029 Sub-routine drill and bore
G22 A8030 Sub-routine flush flute
G59 X0 Z0
!
M30 End of programme
$2 NC channel for carriage 2
!
G59 X0 Z294.7
G22 A8017 Sub-routine prepare
!
!
G22 A8020 Sub-routine rough mouthpiece
M10
!
!
G22 A8021 Sub-routine finish mouthpiece contour
!
!
G59 Z364.7
G22 A8027 Sub-routine rough second side
G22 A8028 Sub-routine finish second side
G59 X0Z0
!
!
M30 End of programme
%

Sub-routine 8017 (prepare carriage 2)
%
O8017 (00-00 -0000 00:00)
$1
(FL V0RBEREITEN)
G26 Rapid traverse to tool change position
T101 Select roughing tool
M99 End of sub-routine
%
Manual programming of NC machines, WZM II
30
Sub-routine 8018 (prepare carriage 1)
%
O8018 (00-00 -0000 00:00) Sub-routine 8018
$1
(FL V0RBEREITEN)
M71 Release tailstock
G28 R869 Reference point traverse
M72 Fix tailstock
M29 Tailstock quill back
G27 Rapid traverse to tool change position
bottom
T505 Select tool pressure pin
M99 End of sub-routine
%
Sub-routine 8019 (press down part)
%
O8019 (00-00 -0000 00:00)
$1
(FL ANDRUECKEN)
G00 Z10
X0
Z-5
M11 Release part
M10 Clamp part
G04 X1 Wait 1 second
G27 Rapid traverse to tool change position
M07 Cooling lubricant ON high pressure
M99 End of sub-routine
%
Sub-routine 8020 (rough mouthpiece)
%
O8020 (00-00 -0000 00:00)
$2
( FL MUNDSTK.SCHRUPP)
G27 Rapid traverse to tool change position
T505
G00 Z0
X35
M07 Cooling lubricant ON high pressure
G96 S250 M04
G01 X-1 F0.1
X25.5
Z-87 F0.2
X30
G00 Z1
X22
G01 Z-8
X25.5 Z-16.5
G97 M05 Speed constant
G26 Rapid traverse to tool change position
M09 Cooling lubricant OFF
M99 End of sub-routine
%
Sub-routine 8021 (finish mouthpiece contour)
%
O8021 (00-00 -0000 00:00)
$2
(FL MUNDSTK.K0NTUR)
Manual programming of NC machines, WZM II
31
G27 Rapid traverse to tool change position
T303
G00 Z1
X15 M07
G96 S250 M04
G46 Cutting-edge radius compensation ON
G01 X19 Z0 F0.1
G03 P19 Q-1.5
G02 X19 Z-4.1 R1.5
G01 Z-8
X25.5 Z-16.5
Z-55
G03 I-18 K0
G02 X22.577 Z-77.895 R20
G03 X25.5 Z-85 I-16.539 K-7.105
G01 X32
G00 Z-8
X25
G01 Z-55 F0.05
G03 I-18 K0 F0.1
G02 X22.077 Z-77.895 R20
G03 X25 Z-85 I-16.539 K-7.105
G40
G01 X32
G97 M05 Spindle rotation constant
G26 Rapid traverse to tool change position
M07 Cooling lubricant ON high pressure
M99 End of sub-routine
%
Sub-routine 8022 (drill holes in mouthpiece)
%
O8022 (00-00 -0000 00:00)
$1
(FL L-L0ECHER)
G27 Rapid traverse to tool change position
T101
B 063200 M22 M23
G97 M05 Speed constant
G94 Feed in mm/min
M17 C-axis operation ON
G28 C0 Reference point traverse
M73 C-axis damping brake closed
G01 X50 Z2 F5000
G01 X15 Z1 F5000
G01 Z-2 F64 M07
G00 Z1
G83 Z-25D4H15 F140
G00 Z1
M74 C-axis damping brake open
G00 C-54
M73 C-axis damping brake closed
G01 Z-2 F64
G00 Z1
G83 Z-23 D4 H15 F140
G00 Z1
M74 C-axis damping brake open
G00 C-27
M73 C-axis damping brake closed
G01 Z-2 F64
G00 Z1
G83 Z-25 D4 H15 F140
G00 Z1
M74 C-axis damping brake open
Manual programming of NC machines, WZM II
32
G00 C27
M73 C-axis damping brake closed
G01 Z-2 F64
G00 Z1
G83 Z-25 D4 H15 F140
G00 Z1
M74 C-axis damping brake open
G00 C54
M73 C-axis damping brake closed
G01 Z-2 F64
G00 Z1
G83 Z-23 D4 H15 F140
G00 Z1
M18 C-axis operation OFF
M22 M25
G27 Rapid traverse to tool change position
M09 Cooling lubricant OFF
M99 End of sub-routine
%
Sub-routine 8023 (mill mouthpiece)
%
O8023 (00-00 -0000 00:00)
$1
(FL MUNDSTK.FRAESEN)
G97 M05 Speed constant
G94 Feed in mm/min
G27 Rapid traverse to tool change position
T1111 Tool ball-end mill cutter
M07 Cooling lubricant ON high pressure
M17 C-axis operation ON
G28 C0 Reference point traverse
B061600 M22 M23 Auxiliary spindle ON
G00 X42 Z-16.5
G11 Milling function ON
G17 Milling plane face
G02 X-12.5 Y-16.875 P0 A0 F1000
G01 X-12.5 Y21 A0 F80
X-12.4
X-12.4 Y-21 F40
G00 Z1
G10
M18 C-axis operation OFF
M22 M25
G27 Rapid traverse to tool change position
M09 Cooling lubricant OFF
M99 End of sub-routine
%
Unterprogramm 8024 (Luftspalt frsen)
%
O8024 (00-00 -0000 00:00)
$1
(FL L-FRAESEN)
G26 Rapid traverse to tool change position
T909
M17 C-axis operation ON
G28 C0 Reference point traverse
G00 Z-22
X90 M07
B 060300 M22 M24
G94 Feed in mm/min
G11 Milling function ON
Manual programming of NC machines, WZM II
33
G17 Milling plane face
G00 X45 Y0
Z-35.670
G02 X41.25 Y-17.984 P0 A0 F5000
M73 C-axis damping brake closed
G01 Y17.984 F400
G02 X39.75 Y-21.094 P0 A0 F5000
G00 Z-33.072
G01 Y21.094 F400
G02 X38.25 Y-23.705 P0 A0 F5000
G00 Z-30.474
G01 Y23.705 F400
G02 X36.75 Y-25.970 P0 A0 F5000
G00 Z-27.876
G01 Y25.970 F400
G02 X35.25 Y-27.972 P0 A0 F5000
G00 Z-25.278
G01 Y27.972 F400
G02 X33.45 Y-30.101 P0 A0 F5000
G00 Z-22.160
G01 Y30.101 F400
G02 X33.36 Y-30.201 P0 A0 F5000
G00 Z-22
G01 Y30.201 F400
Y-30.201 F200
G00 Z20
G10
M18 C-axis operation OFF
M22 M25
G27 Rapid traverse to tool change position
M09 Cooling lubricant OFF
M99 End of sub-routine
%
Sub-routine 8025 (transfer to counterspindle)
%
O8025 (00-00 -0000 00:00)
$1
(FL UEBERNEHMEN GEGENSPINDEL)
G27 Rapid traverse to tool change position
T707 Select counterspindle
G00 Z5
X0
G97 M05 Speed constant
M22 M25
M67
G94 Feed in mm/min
G01 Z-41 F1000
M66
G04 X1
M11
G04 X1
G01 Z29
M99 End of sub-routine
%
Sub-routine 8026 (position counterspindle and turn)
%
O8026 (00-00 -0000 00:00)
$1
(FL GEGENSP.P0SITI0N+DREHEN)
G27 Rapid traverse to tool change position
T707 Select counterspindle
Manual programming of NC machines, WZM II
34
G00 Z-41
X0
B062500 M22 M23
M99 End of sub-routine
%
Sub-routine 8027 (rough second side)
%
O8027 (00-00 -0000 00:00)
$2
(FL 2.SEITE SCHRUPPEN)
G26 Rapid traverse to tool change position
T404
G00 Z-120
X32
G94 Feed in mm/min
G01 X-1 F500
G46 Cutting-edge radius compensation ON
G01 X24
X25.2 Z-119.5
Z-78
G40
G26 Rapid traverse to tool change position
M99 End of sub-routine
%
Sub-routine 8028 (finish contour second side)
%
O8028 (00-00 -0000 00:00)
$2
(FL 2.SEITE K0NTUR)
G26 Rapid traverse to tool change position
T303
G00 Z-78
X25
G94 M07 Feed in mm/min
G01 Z-102.056 F250
G03 P22 Q-102.056
G02 X24 Z-105.41 R1.5
G03 P22 Q-106.528
G02 X24 Z-109.882 R1.5
G03 X25 Z-111 P22 Q-111
G01 Z-122
G40
G26 Rapid traverse to tool change position
M09 Cooling lubricant OFF
M99 End of sub-routine
%
Sub-routine 8029 (drill and bore)
%
O8029 (00-00 -0000 00:00)
$1
(FL B0HREN + AUSDREHEN)
G27 Rapid traverse to tool change position
G94 Feed in mm/min
B060800 M22 M23
M32
G59 X-330.65 Z378.3
T1313
G00 X0 Z1 M53
G83 Z-98D20H15 F120
Manual programming of NC machines, WZM II
35
G00 Z1
G27 Rapid traverse to tool change position
T1414
G00 X0 Z1
G01 Z-92 F1000
Z-98.1 F100
G04 X1
G00 Z1
G27 Rapid traverse to tool change position
T1515
G00 X0 Z1
G01 Z-34 F120
G00 Z1
G27 Rapid traverse to tool change position
T1616
G00 X23.5 Z1
B062000 M22 M24
G01 Z0 F200
X22.5 Z-0.5
Z-9.5
X21.6
Z-28
X21
G00 Z1
G27 Rapid traverse to tool change position
M22 M25
M09 M33
T1700
M99 End of sub-routine
%
Sub-routine 8030 (flush flute)
%
O8030 (00-00 -0000 00:00)
$1
(FL SPUELEN)
G27 Rapid traverse to tool change position
T505
M07 Cooling lubricant ON high pressure
G04 X5
M17 C-axis operation ON
G28 C0 Reference point traverse
G04 X2
G00 C60
G04 X2
G00 C120
G04 X2
G00 C180
G04 X2
G00 C240
G04 X2
G00 C360
G04 X2
G00 M18 C-axis operation OFF
T707
B063000 M22 M23
M53
G04 X4
M55 M09
M22 M25
M99 End of sub-routine
%

Das könnte Ihnen auch gefallen