Heidenhain Programming
Heidenhain Programming
6
Programming:
Programming Contours
Edited by Foxit PDF Editor
Copyright (c) by Foxit Software Company, 2004 - 2007
6.1 Tool movements
6.1 Tool movements For Evaluation Only.
Path functions
A workpiece contour is usually composed of several contour elements L
such as straight lines and circular arcs. With the path functions, you L CC
can program the tool movements for straight lines and circular arcs.
L
FK Free Contour Programming C
If a production drawing is not dimensioned for NC and the dimensions
given are not sufficient for creating a part program, you can program
the workpiece contour with the FK free contour programming and
have the TNC calculate the missing data.
With FK programming, you also program tool movements for straight
lines and circular arcs.
Miscellaneous functions M
With the TNC’s miscellaneous functions you can affect
n Program run, e.g., a program interruption
Y
n Machine functions, such as switching spindle rotation and coolant
supply on and off
80
n Contouring behavior of the tool
CC
60
Subprograms and Program Section Repeats
0
R4
40
If a machining sequence occurs several times in a program, you can
save time and reduce the chance of programming errors by entering
the sequence once and then defining it as a subprogram or program
section repeat. If you wish to execute a specific program section only
under certain conditions, you also define this machining sequence as X
10 115
a subprogram. In addition, you can have a part program call a separate
program for execution.
Programming with subprograms and program section repeats is
described in Chapter 9.
Functions
Programming tool movements for workpiece
machining Z
You create a part program by programming the path functions for the
individual contour elements in sequence. You usually do this by
entering the coordinates if the end points of the contour elements
Y
given in the production drawing. The TNC calculates the actual path of
X
the tool from these coordinates, and from the tool data and radius
compensation.
The TNC moves all axes programmed in a single block simultaneously.
100
Movement parallel to the machine axes
The program block contains only one coordinate. The TNC thus moves
the tool parallel to the programmed axis.
Depending on the individual machine tool, the part program is
executed by movement of either the tool or the machine table on
which the workpiece is clamped. Nevertheless, you always program
path contours as if the tool moves and the workpiece remains
stationary. Z
Example:
L X+100 Y
X
L Path function for “straight line” 50
X+100 Coordinate of the end point
The tool retains the Y and Z coordinates and moves to the position
X=100 (see figure at upper right). 70
Movement in the main planes
The program block contains two coordinates. The TNC thus moves the
tool in the programmed plane.
Example:
L X+70 Y+50
Z
The tool retains the Z coordinate and moves in the XY plane to the
position X=70, Y=50 (see figure at center right). Y
Three-dimensional movement X
The program block contains three coordinates. The TNC thus moves
the tool in space to the programmed position.
Example:
Y ZX, also
WU, ZU, WX X X
XCC
X YZ, also
VW, YW, VZ
Pre-positioning
Before running a part program, always pre-position the tool to prevent
the possibility of damaging it or the workpiece.
Coordinates ?
Departure
Overview: Types of paths for contour approach
and departure
The functions for contour approach APPR and departure DEP are
activated with the APPR/DEP key. You can then select the desired
path function with the corresponding soft key:
PS R0
Abbreviation Meaning
APPR Approach
DEP Departure
L Line
C Circle
N Normal (perpendicular)
Radius compensation
The tool radius compensation is programmed together with the first
contour point PA in the APPR block. The DEP blocks automatically
remove the tool radius compensation.
Contour approach without radius compensation: If you program the
APPR block with R0, the TNC will calculate the tool path for a tool
radius of 0 mm and a radius compensation RR! The radius
compensation is necessary to set the direction of contour approach
and departure in the APPR/DEP LN and APPR/DEP CT functions.
R
straight line that connects tangentially to the contour. The auxiliary
R
15
PA
point PH is separated from the first contour point PA by the distance 20 RR
LEN.
U Use any path function to approach the starting point PS. 10
U Initiate the dialog with the APPR/DEP key and APPR LT soft key: PH PS
U Coordinates of the first contour point PA RR R0
Example NC blocks
7 L X+40 Y+10 RO FMAX M3 Approach PS without radius compensation
8 APPR LT X+20 Y+20 Z-10 LEN15 RR F100 PA with radius compensation RR, distance PH to PA:
LEN=15
9 L Y+35 Y+35 End point of the first contour element
10 L ... Next contour element
R
perpendicular to the first contour element. The auxiliary point PH is
R
separated by the distance LEN plus the tool radius from the first PA
contour point PA. 20 RR
15
U Use any path function to approach the starting point PS.
U Initiate the dialog with the APPR/DEP key and APPR LCT soft key: 10
PH PS
U Coordinates of the first contour point PA
RR R0
U Length: Distance to the auxiliary point PH. Always
enter LEN
as a positive value! X
10 20 40
U Radius compensation RR/RL for machining
Example NC blocks
7 L X+40 Y+10 RO FMAX M3 Approach PS without radius compensation
8 APPR LN X+10 Y+20 Z-10 LEN15 RR F100 PA with radius comp. RR
9 L X+20 Y+35 End point of the first contour element
10 L ... Next contour element
R
R
a circular arc that is tangential to the first contour element. PA
20 RR
The arc from PH to PA is determined through the radius R and the CCA=
center angle CCA. The direction of rotation of the circular arc is 180°
automatically derived from the tool path for the first contour element. 0
10 R1
U Use any path function to approach the starting point PS. PS
PH R0
U Initiate the dialog with the APPR/DEP key and APPR CT soft key:
RR
U Coordinates of the first contour point PA
X
U Radius R of the circular arc 10 20 40
n If the tool should approach the workpiece in the
direction defined by the radius compensation: Enter
R as a positive value.
n If the tool should approach the workpiece opposite
to the radius compensation:
Enter R as a negative value.
U Center angle CCA of the arc
Example NC blocks
7 L X+40 Y+10 RO FMAX M3 Approach PS without radius compensation
8 APPR CT X+10 Y+20 Z-10 CCA180 R+10 RR F100 PA with radius comp. RR, radius R=10
9 L X+20 Y+35 End point of the first contour element
10 L ... Next contour element
R
R
end point PN. The line lies in the extension of the last contour element.
PA
PN is separated from PE by the distance LEN. 20
20 RR PE
U Program the last contour element with the end point PE and radius
compensation. RR
12.5
0
U Initiate the dialog with the APPR/DEP key and DEP LT soft key: 10 R1
PS
U LEN: Enter the distance from the last contour element PN R0
PE to the end point PN. PH R0
RR
X
X
10 20 40
Example NC blocks
23 L Y+20 RR F100 Last contour element: PE with radius compensation
24 DEP LT LEN12.5 F100 Depart contour by LEN=12.5 mm
25 L Z+100 FMAX M2 Retract in Z, return to block 1, end program
Example NC blocks
23 L Y+20 RR F100 Last contour element: PE with radius compensation
24 DEP LN LEN+20 F100 Depart perpendicular to contour by LEN=20 mm
25 L Z+100 FMAX M2 Retract in Z, return to block 1, end program
R8
180° RR
U Initiate the dialog with the APPR/DEP key and DEP CT soft key:
U Center angle CCA of the arc
Example NC blocks
23 L Y+20 RR F100 Last contour element: PE with radius compensation
24 DEP CT CCA 180 R+8 F100 Center angle=180°,
arc radius=8 mm
25 L Z+100 FMAX M2 Retract in Z, return to block 1, end program
Coordinates
Overview of path functions
Function Path function key Tool movement Required input
Line L Straight line Coordinates of the end points of
the straight line
Circle C Circular arc around a circle center Coordinates of the arc end point,
CC to an arc end point direction of rotation
Circular Arc CR Circular arc with a certain radius Coordinates of the arc end point,
arc radius, direction of rotation
Circular Arc CT Circular arc with tangential Coordinates of the arc end point
connection to the preceding and
subsequent contour elements
FK Free Contour Straight line or circular path with see “Path Contours—FK Free
Programming any connection to the preceding Contour Programming,” page
contour element 158
The TNC moves the tool in a straight line from its current position to
the straight-line end point. The starting point is the end point of the Y
preceding block.
40
U Coordinates of the end point of the straight line
15
Further entries, if necessary:
U Radius compensation RL/RR/R0
10
U Feed rate F
U Miscellaneous function M
Example NC blocks
7 L X+10 Y+40 RL F200 M3 20 X
10
8 L IX+20 IY-15
9 L X+60 IY-10 60
Example NC blocks X
7 L X+0 Y+30 RL F300 M3
8 L X+40 IY+5
9 CHF 12 F250
Y 12
10 L IX+5 Y+0
12
5
30
A chamfer is possible only in the working plane.
The corner point is cut off by the chamfer and is not part
of the contour.
A feed rate programmed in the CHF block is effective only
in that block. After the CHF block, the previous feed rate
becomes effective again. 5 X
40
Example NC blocks
5
5 L X+10 Y+40 RL F300 M3
6 L X+40 Y+25 X
10 40
7 RND R5 F100
8 L X+10 Y+5
You can define a circle center CC for circles that are programmed with
the C key (circular path C). This is done in the following ways:
n Entering the Cartesian coordinates of the circle center, or
Z
n Using the circle center defined in an earlier block, or Y
n Capturing the coordinates with the ACTUAL-POSITION-CAPTURE
key. CC
Example NC blocks
X CC
5 CC X+25 Y+25
or
10 L X+25 Y+25
11 CC
Duration of effect
The circle center definition remains in effect until a new circle center
is programmed. You can also define a circle center for the secondary
axes U, V and W.
Before programming a circular path C, you must first enter the circle
center CC. The last programmed tool position before the C block is
used as the circle starting point. Y
U Move the tool to the circle starting point.
U Coordinates of the circle center
The starting and end points of the arc must lie on the CC
circle. 25
X
25 45
U Feed rate F
X
Full circle
For a full circle, program two CR blocks in succession:
The end point of the first semicircle is the starting point of the second.
The end point of the second semicircle is the starting point of the first.
Y
Central angle CCA and arc radius R
The starting and end points on the contour can be connected with four
arcs of the same radius: 1
Smaller arc: CCA<180°
Enter the radius with a positive sign R>0 DR+
40
ZW
Larger arc: CCA>180° R R
Enter the radius with a negative sign R<0
2
The direction of rotation determines whether the arc is curving
outward (convex) or curving inward (concave):
Convex: Direction of rotation DR– (with radius compensation RL)
X
Concave: Direction of rotation DR+ (with radius compensation RL) 40 70
Example NC blocks
3
10 L X+40 Y+40 RL F200 M3 Y
11 CR X+70 Y+40 R+20 DR- (arc 1)
ZW
or
or
U Miscellaneous function M
X
25 45
Example NC blocks
7 L X+0 Y+25 RL F300 M3
8 L X+25 Y+30
9 CT X+45 Y+20
10 L Y+0
Y 10
31
95
4
10
20
1
5
21
20 X
5 95
95
R3
85
R10
0
40
X
5 30 40 70 95
CC
50
X
50
Coordinates
Overview
With polar coordinates you can define a position in terms of its angle
PA and its distance PR relative to a previously defined pole CC (see
“Fundamentals,” page 158).
Polar coordinates are useful with:
n Positions on circular arcs
n Workpiece drawing dimensions in degrees, e.g. bolt hole circles
Circular arc CP + Circular path around circle center/ Polar angle of the arc end point,
pole CC to arc end point direction of rotation
Circular arc CTP + Circular arc with tangential Polar radius, polar angle of the arc
connection to the preceding end point
contour element
Helical interpolation + Combination of a circular and a Polar radius, polar angle of the arc
linear movement end point, coordinate of the end
point in the tool axis
Example NC blocks
12 CC X+45 Y+25 X
XCC
The tool moves in a straight line from its current position to the
straight-line end point. The starting point is the end point of the
preceding block. Y
U Polar coordinates radius PR: Enter the distance
from the pole CC to the straight-line end point.
30
U Polar coordinates angle PA: Angular position of the 60°
straight-line end point between –360° and +360°. 60°
Example NC blocks X
45
12 CC X+45 Y+25
13 LP PR+30 PA+0 RR F300 M3
14 LP PA+60
15 LP IPA+60
16 LP PA+180
18 CC X+25 Y+25
19 LP PR+20 PA+0 RR F250 M3
20 CP PA+180 DR+ X
25
5
0
R2
R3
Example NC blocks 30°
35
12 CC X+40 Y+35 CC
Helical interpolation
A helix is a combination of a circular movement in a main plane and a
liner movement perpendicular to this plane.
Z
A helix is programmed only in polar coordinates.
Y CC
Application
n Large-diameter internal and external threads
X
n Lubrication grooves
Work Radius
Internal thread Direction
direction comp.
Right-handed Z+ DR+ RL
Left-handed Z+ DR– RR
Right-handed Z– DR RR
Left-handed Z– DR+ RL
External thread
Right-handed Z+ DR+ RR
Left-handed Z+ DR– RL
Right-handed Z– DR RL
Left-handed Z– DR+ RR
Programming a helix
5
270°
revolutions, program the helix in a program section repeat
(see “Program Section Repeats,” page 344) 25 X
12 CC X+40 Y+25
13 L Z+0 F100 M3
14 LP PR+3 PA+270 RL F50
15 CP IPA-1800 IZ+5 DR-
Y
100
31
21
60°
5
R4
CC
50 1 41
61 51
5
X
5 50 100
Y
100
M64 x 1,5
CC
50
X
50 100
...
8 L Z-12.75 R0 F1000
9 APPR PCT PR+32 PA-180 CCA180 R+2 RL F100
Contour Programming
Fundamentals
Workpiece drawings that are not dimensioned for NC often contain
unconventional coordinate data that cannot be entered with the gray
path function keys. You may, for example, have only the following data
on a specific contour element:
n Known coordinates on the contour element or in its proximity
n Coordinate data that are referenced to another contour element
n Directional data and data regarding the course of the contour
You can enter such dimensional data directly by using the FK free
contour programming function. The TNC derives the contour from the
known coordinate data and supports the programming dialog with the
interactive programming graphics. The figure to the upper right shows
a workpiece drawing for which FK programming is the most
convenient programming method.
If you wish to run FK programs on old TNC models, use the conversion
function (see “Converting an FK program into HEIDENHAIN
conversational format,” page 47).
The machine tool builder may use other colors for the FK
graphics.
NC blocks from a program that you called with PGM CALL
are displayed in another color.
If you press the gray FK button, the TNC displays the soft keys you can
use to initiate an FK dialog: See the following table. Press the FK
button a second time to deselect the soft keys.
If you initiate the FK dialog with one of these soft keys, the TNC shows
additional soft-key rows that you can use for entering known
coordinates, directional data and data regarding the course of the
contour.
Example NC blocks
7 FPOL X+20 Y+30
8 FL IX+10 Y+20 RR F100
9 FCT PR+15 IPA+30 DR+ R15 10 X
20
Direction and length of contour elements
AN
Chord length LEN of the arc LEN
Example NC blocks
27 FLT X+25 LEN 12.5 AN+35 RL F200
28 FC DR+ R6 LEN 10 A-45
29 FCT DR- R15 LEN 15
Example NC blocks
Auxiliary points
You can enter the coordinates of auxiliary points that are located on
the contour or in its proximity for both free-programmed straight lines
and free-programmed circular arcs. Y
Auxiliary points on a contour
The auxiliary points are located on a straight line or on the extension 60.071 R10
of a straight line, or on a circular arc. 53
X coordinate of an auxiliary
point
P1 or P2 of a straight line
Y coordinate of an auxiliary
point X
P1 or P2 of a straight line 50
42.929
X coordinate of an auxiliary
point
P1, P2 or P3 of a circular arc
Y coordinate of an auxiliary
point
P1, P2 or P3 of a circular arc
Example NC blocks
Relative data
Data whose values are based on another contour element are called
relative data. The soft keys and program words for entries begin with
the letter “R” for Relative. The figure at right shows the entries that Y
should be programmed as relative data.
20
The coordinates and angles for relative data are always
programmed in incremental dimensions. You must also
enter the block number of the contour element on which 20 45°
the data are based. 90°
R20
20°
The block number of the contour element on which the 10
relative data are based can only be located up to 64 FPOL
positioning blocks before the block in which you program
the reference. 35 X
10
If you delete a block on which relative data are based, the
TNC will display an error message. Change the program
first before you delete the block.
Example NC blocks
12 FPOL X+10 Y+10
13 FL PR+20 PA+20
14 FL AN+45
15 FCT IX+20 DR– R20 CCA+90 RX 13
16 FL IPR+35 PA+0 RPR 13
20
Distance from a straight line to a parallel contour 95°
12.5
element
105° 15°
Example NC blocks
12.5 X
17 FL LEN 20 AN+15
18 FL AN+105 LEN 12.5 20
19 FL PAR 17 DP 12.5
20 FSELECT 2
21 FL LEN 20 IAN+95
22 FL IAN+220 RAN 18
15
R10
Example NC blocks
CC
12 FL X+10 Y+10 RL
10
13 FL ...
14 FL X+18 Y+35
15 FL ... X
10 18
16 FL ...
17 FC DR– R10 CCA+0 ICCX+20 ICCY-15 RCCX12 RCCY14
Y
100
R1
5
75
R18
30
R15
20
X
20 50 75 100
10
Y 10
R20
55
R30 60°
30
X
30
Y
R1
0
50
R36
R24
R1,5
R5
30
R
R6 6 R5 X
-10
0
R4
R6
-25
R5
0
12 44 65 110
Interpolation
Function
If you wish to machine contours that are described in a CAD system
as splines, you can transfer them directly to the TNC and execute
them. The TNC features a spline interpolator for executing third-
degree polynomials in two, three, four, or five axes.
The TNC executes the spline block according to the following third-
degree polynomials:
X(t) = K3X · t3 + K2X · t2+ K1X · t + X
Z(t) = K3Z · t3 + K2Z · t2 + K1Z · t + Z
whereby the variable t runs from 1 to 0. The incrementation of t
depends on the feed rate and the length of the spline.
Input ranges
n Spline end point: –99 999.9999 to +99 999.9999
n Spline parameter K: –9.999 999 99 to +9.999 999 99
n Exponent for spline parameter K: -255 to +255 (whole number).
7
Programming:
Miscellaneous functions