0% found this document useful (0 votes)
15 views77 pages

CNC Programming Techniques Overview

This document describes the G codes used for programming numerical control machine tools. It presents the different positioning modes, unit systems, preparatory movements, feed rates, and auxiliary functions. It also addresses reference systems, tool compensation, fixed cycles, and APT language.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views77 pages

CNC Programming Techniques Overview

This document describes the G codes used for programming numerical control machine tools. It presents the different positioning modes, unit systems, preparatory movements, feed rates, and auxiliary functions. It also addresses reference systems, tool compensation, fixed cycles, and APT language.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SYS856

Advanced techniques
in computer-aided manufacturing

Course notes

The programming of numerically controlled machine tools

Jean-François Chatelain, Eng. PhD.


Professor

Writing: January 2004


Revision: August 2007
TABLE OF CONTENTS

1 DESCRIPTION OF CODE G ................................................................. 7


1.1 Presentation of a machining instruction .............................................................7
1.2 Specification of the positioning mode .....................................................................11
1.3 Specification of the unit system....................................................................................13
1.4 The preparatory movement codes .....................................................................15
1.5 Feed speed specification...............................................................................27
1.6 Auxiliary functions (M codes) ...............................................................................31
1.7 The specification of tool changes ......................................................................33
1.8 The structure of a typical program.................................................................33
2 REFERENCE SYSTEMS AND TOOL OFFSET........................ 39
2.1 Reference systems..............................................................................................39
2.1.1 Definition of a reference frame with code G92.........................................................43
2.1.2 Definition of a reference system with codes G54 to G59 ...........................................43
2.1.3 Reference system program defined from a piece marker.......................47
2.1.4 Reference positions of the MOCN .........................................................................49
2.2 The compensation of tools ..................................................................................51
2.2.1 Command used to initiate the compensation in length...............................57
2.2.2 Cancellation of length compensation..........................................................59
2.2.3 Measurement of tools by comparison to a standard......................................................59
2.2.4 Tool beam offset..................................................................................61
3 FIXED CYCLES
3.1 Introduction
3.2 Typical movements of a cycle.................................................................77
3.3 Specification of a cycle in absolute mode (G90) ............................................................83
3.4 Specification of a cycle in relative mode (G91) .............................................................85
3.5 Simple drilling cycle (G81).................................................................85
3.6 Deep hole drilling cycle with peck drilling 'DEEP hole' or 'Peck drilling'.........87
3.7 Tapping cycle (G74, G84)......................................................................................89
3.8 Fine boring cycles or boring cycles with the boring bar .............91
3.9 Drilling and countersinking cycles...................................................................................93
3.10 Various Boreholes...............................................................................................................93
3.11 Cancellation of cycles and special conditions ..........................................................9
4 THE SUITABLE LANGUAGE ............................................................................................................ 99
4.1 Introduction....................................................................................................................99
4.2 Surface bumpers modifiers...........................................................................103
4.3 Continuous movement instructions .............................................................................105
4.3.1 Use of the INDIRP and INDIRV directions........................................................113
4.3.2 Return on the surface modifiers 'stop'................................................113
4.4 Use of point-to-point movements....................................................................117
4.5 Departure instruction GO..............................................................................................119
4.6 Other forms of surface specification 'part'................................................125
TABLE DES FIGURES
Figure 1-1 Specification of a machining instruction .....................................................................9
Figure 1-2 Movements specified in absolute mode G90 ...............................................................11
Figure 1-3 Specified movements in relative mode G91 ................................................................13
Figure 1-4 Synchronized and unsynchronized fast forwarding .......................................................15
Figure 1-5 Advance speed..........................................................................................................17
Figure 1-6 Circular interpolations G02 and G03 .........................................................19
Figure 1-7 Specification of circular interpolation ...................................................................21
Figure 1-8 Problems related to circular interpolation.........................................................21
Figure 1-9 Specification of a circular interpolation with the radius..........................................23
Figure 1-10 Circular interpolation in absolute and relative
Figure 1-11 Plans G17, G18 and G19
Figure 2-1 Machine, part, and program coordinate systems.............................................39
Figure 2-2 Expression of machine, part, and program referentials...........................................41
Figure 2-3 Position of the program reference expressed in machine coordinates.......................41
Figure 2-4 Definition of a program reference with G92
Figure 2-5 Table defining the offsets of program references .........................................45
Figure 2-6 Interpretation of reference program systems ..................................................45
Figure 2-7 Program reference and part reference..............................................................47
Figure 2-8 Reference positions...................................................................................................49
Figure 2-9 Length compensation
Figure 2-10 Effect of tool length compensation.............................................................53
Figure 2-11 Normalized length of a tool with a CAT type tool holder .................................53
Figure 2-12 Definition table of tools (CNC)...............................................................55
Figure 2-13 Optical presetting bench or tool measurement by probing on MOCN................55
Figure 2-14 Comparator for tool measurement ......................................................................57
Figure 2-15 Characteristic parameters of the tools ........................................................................57
Figure 2-16 Tool length compared to a standard...........................................................61
Figure 2-17 NC trajectory offset.........................................................................................63
Figure 2-18 Left shift and right shift ......................................................................63
Figure 2-19 Specification of a shift with negative value......................................................65
Figure 2-20 Activation of G41 or G42 on a linear movement..............................................67
Figure 2-21 Application of a compensation on a circular arc................................................67
Figure 2-22 Adding a linear movement for the application of compensation ....................69
Figure 2-23 Tangential approach and application of compensation..........................................69
Figure 2-24 Tangential approach and application of compensation..........................................71
Figure 2-25 Correction of trajectories at the intersection of two segments .................................71
Figure 2-26 Shift of trajectories in the case of incoming angles .........................................73
Figure 2-27 Types of contours causing failures in certain controllers..........................................73
Figure 3-1 Typical movements of a drilling cycle...............................................................79
Figure 4-1 Imaginary cube encompassing the part to be obtained by machining...........................................99
Figure 4-2 Surface "guide" of the tool ........................................................................................101
Figure 4-3 Surfaces "guide", "piece" and "stop" ..................................................................101
Figure 4-4 Modifiers applied to bounded surfaces .............................................................103
Figure 4-5 Tool direction changes during the trajectory ......................................105
Chapter 1
1 Description of G codes
The programming principles of machine tools are generic. However, the whole of
codes M, G, and T used in NC programming may vary from one controller manufacturer to another.
another, allowing them to stand out from the competition. Some manufacturers
will offer the standardized codes according to ISO to which an additional library of features
may be offered to optimize production, particularly by using advanced routines of
programming. Other suppliers will prefer a language in G code or for their
proper conversational type language. The G, M, and T codes as well as the presented examples
This text is specific to FANUC controllers, which are widely used in the northern industry.
American.

1.1 Presentation of a machining instruction

Figure 1-1 presents a machining instruction including several words, such as N, G, M, T.


The machining instruction, called a block, is presented on a single line and all the codes of this
lines are activated simultaneously. Thus, three axes X, Y, and Z can be specified on the same
block for a 3-axis simultaneous machine while a 5-axis simultaneous machine will be able to accept
blocks including three linear movements and two rotary movements whose actions will be
accomplished simultaneously in addition to being synchronized (all axes start and finish their
movement at the same time). Any machining block can start with a block number or
sequence number identified by the letter "N" followed by four or five numerical values, in
function of the format accepted by the controller. All the register formats can be found in the
Programming manuals related to the controller equipped with the machine tool. The associated N register
The FANUC15M controller includes four numeric values allowing for distinct numbering.
of 9999 machining blocks. The numbering is optional and can be applied with a value
incrementing with a skip in the numbering. For example, an incremental numbering
From 2 units to every 2 machining blocks would take the following form:

Example: N0002 G00 X5 Y10


G01 X8 Y12
N0004 X12 Y18

According to the sequence number, the preparatory function codes are programmed. They are
recognized by the word 'G'. These are codes for initializing the required modes for
the interpretation of a movement, for example the choice of the unit system, the advance system,
of the plan used for interpolation, the type of movement, and so on. For the block
Of the NC instructions presented in Figure 1-1, the following meaning can be found for the ...
different codes used. More details as well as a more comprehensive list of available codes
will be presented in the following sections.
G02 Circular motion.
Code G (preparatory) specified with 2 digits from 0 to 99.
X + 05.3 Notes specifying the coordinates associated with the movement
(5 digits before the decimal point, and three decimals)
possible in the metric system
Y + 05.3
Z + 05.3
I + 05.3 J + 05.3 K + 05.3 as above
U + 05.3 V + 05.3 W + 05.3 as above
A + 03.3 B + 03.3 C + 03.3 angular coordinates
F05.2 Definition of feed rate
S05 Definition of the spindle rotation speed in rpm
M03 Definition of auxiliary functions (pin start)
T05 Specification of the tool number to 2 digits
D03 Specification of the registration number for tool sharpeners

The plus sign (+) is taken by default, as well as the leading zero before the decimal point. The spaces
between the words are not necessary. In fact, each space takes up 1 byte of memory, which
should be avoided as much as possible.

From the above formats, we can see that the linear coordinates can be programmed.
with an accuracy of 1 micron and angular coordinates within 1 thousandth of a degree. This
is obviously not related to the accuracy of the movement provided by the operating parts of the
machine.

Block number
Preparatory functions or models: (Letter-address G)
Coordinates of the point to reach

N100 G90 G02 X100 Y150 175 J125 S 1000 F150 T1 D1 M3 M8

Definition of Call for interpolation


absolute quotes circular
Center coordinates
letter-addresses I and J

Spindle speed

Advance speed
Tool number and associated register

Auxiliary functions: letter-address M

Figure 1-1 Specification of a machining instruction

SYS856 9
Advanced techniques in computer-aided manufacturing
1.2 Positioning mode specification

There are two commands that allow you to specify the machine positioning mode for
all the movements that will follow the introduction of the code.

G90 command for specifying movements in absolute mode


G91 command for specifying movements in relative (incremental) mode

These commands are modal; they remain active as long as the other command.
of the same family is not specified. As illustrated in the following figure, when the mode of
positioning is set to absolute (G90), the coordinates of the points defining the trajectory
are all specified in relation to the program reference system.

N1G90 X50.0 Y30.0 G 90 Movement to P1 in absolute


N2 X200.0 Y30.0 Movement from P1 to P2
N3 X200.0 Y90.0 Movement from P2 to P3
N4 X50.0 Y90.0 Movement from P3 to P4
N5 X0 Y0 Move P4 to the origin of program Op

120 30
60
P4
30
P1 P3

P2

Zero point of the program


X

P4 P3

90 60

30 P1 P2
X
50 150
200

Figure 1-2 Movements specified in absolute mode G90

SYS856 11
Advanced techniques in computer-aided manufacturing
In the case of the relative or incremental positioning mode, the coordinates of a point of the
The trajectories to be achieved are expressed relative to the current position of the tool (Figure 1-3).

Figure 1-3 Movements specified in relative mode G91

1.3 Specification of the unit system

Two commands allow the specification of the unit system associated with a program.

G20 imperial units system


G21 metric unit system

One or the other of these modal commands must be specified at the beginning of the program and must not
never be changed afterwards. Some controllers cannot convert the values of
shifts of tools and reference systems from one unit to another during execution
program.

The G20 and G21 codes particularly affect the following parameters that must be expressed
in the chosen unit system:

The tool feed rate "Feedrate" (F)


The geometric data characterizing the trajectory (XYZ coordinates and radii of
circle for example)
Reference systems G54-G59
The tool offsets in length (H) and radius (D)

SYS856 13
Advanced techniques in computer-aided manufacturing
1.4 The preparatory G codes of the movement

Rapid movement G00

The G00 code allows for maximum speed movement of each of the specified axes in this
mode in order to reach the requested position. This is a modal command that remains active.
as long as an order belonging to the same group is not specified. The
The group corresponding to tool movements includes the following G codes:

Group (G00, G01, G02, G03)

G00 Synchronized and non-synchronized

The unsynchronized movement is carried out at maximum speed for each of the axes.
movement does not end simultaneously for each axis. The axis with the most displacement
who will be the first to finish their action (on the basis of identical maximum speed for
each axis). In a synchronized movement, all axes complete their movement in
simultaneous. It is recommended to prioritize synchronized quick movement. The adjustment is
performed from the machine parameters table of the controller.

40

G00X80Y40

Unsynchronized

Synchronized

80 x

Figure 1-4 Synchronized and Unsynchronized Fast Forward

Linear interpolation G01

This is a linear advance movement performed from a current point to a programmed point. The
The coordinates of the point to be reached are specified in the current block as well as in the following blocks.
the introduction of interpolation code G01 (modal code). This movement is performed at the speed
pre-programmed in advance through the word 'F' (feedrate). This movement being
synchronized, the speed component along each of the axes is proportionally expressed
to the individual distances traveled.

SYS856 15
Advanced techniques in computer-aided manufacturing
40

G01 X80 Y40 F200;


F = 200

Current 80

L= 40 2+ 80 2
80
Component of speed along x: Fx= ⋅ 200
L

40
Component of velocity along y: Fy= ⋅ 200
L

Figure 1-5 Feed Rate

Example 1.1:

0→ 1 G91 G00 X100 Y200;


1→ 2 G01 X300 F300;
2→ 3 G00 Y-70;
3→ 4 G01 X-300 F70;
4→ 0 G00 X-100 Y-130;

SYS856 17
Advanced techniques in computer-aided manufacturing
Circular interpolation G02, G03

It is a circular advance movement made from a current position to a point.


programmed. The coordinates of the point to be reached as well as the radius of the arc, or the position of the
the center, are specified in the current block as well as in the following blocks the introduction of the code
circular interpolation of modal type. This movement is carried out at the feed rate
programmed through the word 'F'. The G02 code describes a clockwise trajectory
while the G03 translates to a counter-clockwise movement.

G2

G02: clockwise direction

G3

G03: counter-clockwise

Figure 1-6 Circular interpolations G02 and G03

The parameters to specify when entering the G02 or G03 code are as follows (Figure
1-7) :

1. The coordinates of the point to be reached, accompanied by the words X, Y, and Z

2. The radius of the arc or the coordinates of the center of the arc accompanying the
letters I, J, and K

SYS856 19
Advanced techniques in computer-aided manufacturing
Figure 1-7 Specification of circular interpolation

Pour la méthode recourant à la spécification du centre, ce dernier doit être situé à l’intérieur d’une
Zone of acceptable tolerance relative to the theoretical center. The distance separating the point from
The departure of the arc with the specified center must be sufficiently close to the distance separating the point.
arrival with this same center. If this distance exceeds the limit admissible by the CNC, a
alarm will be triggered (Figure 1-8). In addition, for certain controllers, the coordinates 'i, j, k'
are specified in relation to the starting point of the circular trajectory.

In the case of the method specifying the radius of the arc, two trajectories are possible.
since the center can take two positions, as shown in Figure 1-9. The ambiguity is
resolved by specifying a positive radius if the desired trajectory is the arc subtended by a
acute angle and a negative radius for the arcs subtended by an obtuse angle (> 180 degrees, arc the
longer).

Figure 1-8 Problems related to circular interpolation

SYS856 21
Advanced techniques in computer-aided manufacturing
B B→ C (270o) G02 X -50 Y0 R-50
x
50 G02 B→ C (90o) G02 X -50 Y0 R50

With I, J, K (no ambiguity)


50
G02 X -50 Y0 IO J-50 F300
A
C

Figure 1-9 Specification of a circular interpolation with the radius

Circular interpolations are interpreted differently depending on a mode of specification, either


in absolute or in relative. The following figure illustrates the difference between the two specifications.

N10 G90 G17 G0 X0 Y0 N10 G90 G17 G0 X0 Y0


N15 G1 X100 Y-75 N15 G1 X100 Y-75
N20 G3 X50 Y136.8 150 J25 N20 G91 G3 X-50 Y211.8 I-50 J100
N25 G1 X0 Y0 N25 G90 G1 X0 Y0
circle defined in absolute circle defined in relative /B

Figure 1-10 Absolute and relative circular interpolation

SYS856 23
Advanced techniques in computer-aided manufacturing
The following example presents the specification of circular interpolations according to the two modes.
possibilities.

Example 1.2:

B
+
80

R40

A
40

R60

C
20 x

50 90 150 X

METHOD R METHOD I, J, K
A→ B G90 G03 X90 Y80 RY0 F300 ; G90 G03 X 90 Y80 I0 J40 F300
B→ C G02 X150 Y20 R60 F301; G02 X 150 Y20 I0 J-60 F301
A→ B G91 G03 X 40 Y 40 R 40 F 300; G91 G03 X 40 Y 40 I 0 J 40 F 300
B→ C G91 G02 X 60 Y -60 R60 F301 G91 G02 X 60 Y -60 I 0 J -60 F 301

Interpolation plans :

The specification of circular interpolation being in a plane, this interpolation plane must therefore
to be selected before the order is activated. The three planes XY, ZX, and YZ are
respectively activated via codes G17, G18, and G19 (Figure 1-11). By default, all the
Controllers work in the XY plane (G17). These codes are of modal type.

SYS856 25
Advanced techniques in computer-aided manufacturing
G17 = XY
G18 = ZX
G19 = YZ

G17 by default

Figure 1-11 Plans G17, G18 and G19

1.5 Specification of the feed rate

Feed per minute G94

G94 G01 X_Y_Z_F20; F inch/min


mm/min

Advance per revolution G95

G95 G01 X_Y_Z_F1.2; F inches/rev.


mm/rev.

Reverse Time Advance G93

G93 G91 G01 X100. F5.;


Y50.F10.;

Calculation of the advance:

a) linear interpolation G01

speed (after the minute


)
F=
distance po
distance = Δx 2+ Δy 2+ Δz 2

SYS856 27
Advanced techniques in computer-assisted manufacturing
b) circular interpolation (G02, G03)

speed mm/min
F=
circumferential distance mm

Example 1.3: For a feed rate at the tool tip of 500 mm/min and a
a displacement of 100 mm, the reverse time advance is calculated as follows:

⎛ F= 500mm/min = 5 ⎞
⎜ ⎟
⎝ 100 ⎠

G93 G91 G01 X 100 F5

The feed rate F must be specified for each instruction.

Why the advance in reverse time?

The advance speed is the result of the speeds of each axis, linear or rotational (without any
distinction).

c
Y
G01 F91 Xa Yb ZcFf ; b a
X
a⋅ f
According toxFx=
L
b⋅f
According toyFy= L= a 2+ b 2+ c 2
L
c⋅ f
According to z Fz=
L

F= Fx2+ Fy2+ Fz2


2 2 2
a 2f b 2f c 2f
= + +
L2 L2 L2
a 2+ b 2+ c 2
F= f =f
a 2+ b 2+ c 2

SYS856 29
Advanced techniques in computer-aided manufacturing
When a rotary axis is controlled, it is considered a linear axis with units in
degrees. A linear compensation is made, which skews the reached speed.

G01G91 X100. C90 F200 ;

90⋅ 200
Advance along the rotational axis Fc= L= 1002+ 90 2
L
100 . 200
Fx=
L

1.6 Auxiliary functions (M codes)

Auxiliary functions allow the activation of different options exhausting the machine. The
The following list presents the available codes with the Hitachi Seiki machine tool.

M0 machine stop
M01 optional stop
M03 clockwise broach (CW spindle ON)
M04 counterclockwise spindle ON
M05 stop spindle
M06 automatic tool change (auto tool change sequence)
M08 jet fluid (flood coolant)
M09 stop coolant
M19 stop spindle and orient
M50 fluid through the pin (THRU coolant)

M30 End of program and rewind


M02 End of program

M68 B axis clamping self-locking


M69 B axis CLAMP off

M78 self-locking axis A (A axis CLAMP ON)


M79 A axis CLAMP off

M99 Return from a subroutine (ENDSUB)

G65 Subroutine call (CALSUB)

SYS856 31
Advanced techniques in computer-aided manufacturing
1.7 The specification of tool changes

The tool change sequence is variable and depends directly on the machine rather than
the controller equipping it. In the case of the Hitachi Seiki machine tool with changer
of the tool, the following sequence must be followed:

T0;
T0 M06;
T01;
TXX M06 provokes physical change
T01 M06; TXXXX prepares the tool, chain rotation for
T02; the position of change
G90 X0 Y0 Z0;

machining with T1

T02 M06;
T07;

machining with T2

T07 M06;
T0;

machining with T7

T0 M06;
M2

The T0 tool is a 'dummy' tool. It is used to initialize the machine with a free state.
tool in the spindle.

1.8 The structure of a typical program

A path programming approach for tool trajectories in G-code is proposed to standardize


the programs and ensure not to forget any essential information for proper functioning
from the machine.

1. program start section


2. section initialization
3. sequence of change of a first tool
4. spindle startup, watering and others as needed
5. first approach movement broken movements
simultaneity of axes in rapid

SYS856 33
Advanced techniques in computer-aided manufacturing
machining
7. withdrawal movements to references
8. brooch, watering and others (stop)
9. change of tool
10. end of program

Example of program
Start section

N1 00005; end of block program number


N2 (example of program); FANUC '0' number
comment

(Hitachi no end of block)

Section initialization

G20 G40 G49 G50 G64 G69 (imperial, cutcomφ , cutcom L, scaleoff
G80 G90 machining mode, rotation modeOFF,
M69 M79 cycleOFF, ABS)
(clamp B (tilt)OFFclamp Aoff

Change of a first tool

G91 G30 G0 Z0
G30 X0 Y0
G30 A0 B0
T0
T0 M6
TXX

G91 G30 Z0
G30 X0 Y0 Sequence
G30 A0 B0 of changing tool
(Hitachi)
TXX M6
TXX

Machining

S1000 M3 (broach CW 1000 RPM)


M8 (watering ON)

SYS856 35
Advanced techniques in computer-aided manufacturing
G90 G43 G00 Z_HXX activation compensation length

G94 G01 X_ Y_ Z_F cutting movements, feed specification

M5 M9 Stop the spindle and the watering


G40 G49 G80 always disable cycles and compensations when
the use is finished
G40 with linear motion
G49 with movement along Z

Change of tool at the end

G91 G30 Z0
X0 Y0
To M6

End of program.

M30

SYS856 37
Advanced techniques in computer-aided manufacturing
Chapter 2
Reference systems and tool offsets
2.1 Reference systems

The programming of tool paths for a given part always refers to a system of
coordinates from which the points of the trajectory are expressed. This system is chosen in
the FAO system used for programming. The machine tools all operate from
of a machine coordinate system whose origin, called 'machine zero' Om, constitue
the first reference position. The correspondence between the two reference systems must
to be established in the controller so that it can carry out the transformation operations
required for each tool movement expressed in G code with respect to the program reference
OPThe correspondence is easy to establish, the theoretical position of these two reference frames being
known and often physically represented in the customized configuration of the system
FAO of a company. In the case where the assembly of the part in the assembly system is
persistent and repetitive, the theoretical correspondence of reference systems does not pose any
problem. In the case of an imprecise mounting of the part in relation to the reference system
Machine, the exact position of the reference system program must be determined.
Specifically, this operation can be carried out using a tactile probe to determine
the intersection of three faces of the piece, which will become the origin of the program reference frame. In
the cases where this palpation is impossible to determine the program reference, a reference
piece Opmust be established through physical probing, and the theoretical relationship between this part reference and
The program reference must be entered as a compensation input in the controller.

Figure 2-1Machine, part, and program coordinate systems


Ultimately, the numerical parameters expressing the relative position of the program reference
In relation to the machine reference, they must be entered into the reference shift table.
"working offset" of the machine controller. If these values are impossible to determine, a
tangible reference will be identified as reference part, and the parameters of this latter
constitute the entries of the shift table. The known theoretical correspondence between the
The program reference and the part reference is established either in the NC program or
directly in the offset table by additional offset parameters.

Op

OP

Om

Figure 2-2Expression of machine, part, and program referential

Zm (contact tool with faces


of the room)
Ym
Zp
Om

Xm Yp

(Op)m= (5; - 3,5; - 12,8)


Op Xp

Figure 2-3Position of the program reference expressed in machine coordinates

SYS856 41
Advanced techniques in computer-aided manufacturing
There are two methods to establish program reference systems, either by using a
G92 command manually entered with the machine controller editor or using
offset tables of the reference frame, these being referenced using a G code in the
program identifying the reference frame in which movement coordinates are expressed.

2.1.1 Definition of a reference system with code G92

The X, Y, and Z coordinates accompanying the G92 code specify the current position of the tool.
coupe expressed in the reference system program that we want to define. Having palpated the piece
to know the position of the program origin in the machine's reference frameFigure 2-3 ) the
The procedure generally used to define the program reference with the G92 code is to
position the tool at machine zero (G91G28X0Y0Z0) and enter the coordinates with a sign
inverse in order to properly indicate the position of the tool in relation to the program referenceFigure
2-4).

G92 X -5 Y3.5 Z12.8

Om G92

(Om)p

Op

Figure 2-4Definition of a program reference point with G92

2.1.2 Definition of a reference system with codes G54 to G59

When the machine tool controller has the functions of reference shifting (it
it is often an option to acquire), it is possible to define and change the system of
reference very easily directly from the NC machining program. For the Fanuc 15M control, six
reference systems programs can be defined and used within the same program. The
parameters defining these reference systems can be modified at any time through a
command G10 accompanied by the offset values for each axis of the machine. The
The following figure illustrates the program reference shift table as found on
the machine controller console.

SYS856 43
Advanced techniques in computer-aided manufacturing
Offset System 1 System 2 System 3 System 4 System 5 System 6
G54 G55 G56 G57 G58 G59
X 4 8 25 12 4 1
Y -2 5 20 -8 -4 2
Z 0 0 3 2 0 0
A 0 0 0 0 90 0
B 0 0 0 0 0 0
C 90 0 0 0 0 0

Figure 2-5Table defining the shifts of program references

Figure 2-6 shows the coordinates of points A, B, C, and D according to the programs
Machining refers to the reference system G54 or G55.

YM YP2
YP1

5 2

G55 XP2
G54 B
D
4 XP1

8
XM
OM 4

G92 X-4 Y-4 Z0 G54 G55

A X0 Y2 Z0 X0 Y2 Z0 X-4 Y1 Z0
B X2 Y0 Z0 X2 Y0 Z0 X-2 Y-1 Z0
C X0 Y-2 Z0 X0 Y-2 Z0 X-4 Y-3 Z0
D X-2 Y0 Z0 X-2 Y0 Z0 X-6 Y-1 Z0

Figure 2-6Interpretation of reference systems program

Returning to the machine reference system is always possible using the G53 code.

G53 X xmY ymFrom A to Bm A amB bmC cm

SYS856 45
Advanced techniques in computer-aided manufacturing
2.1.3 Reference system program defined from a part marker

When the part cannot be directly felt to define the program reference frame, a
The reference system must be defined. There are two simple ways to define the reference point.
program from the known theoretical position of the origin program in relation to the reference frame
part. The first is to use the G92 command applied to the G54 system, defined as
being the reference point as felt. The offset parameters considered with G92
corresponding to the theoretical position of the origin of the reference frame expressed in the frame
Program. The following figure illustrates the definition of the program reference using G92.

Yp

G54
YP1
Op
Xp

G541

X1P
O1P

Om

(Op)PPositioning command: X at -10, Y at 10, Z at 0

Figure 2-7Reference program and reference part

The other way to specify the program reference is to compensate the G54 defined as reference.
part using the G10 command directly in the NC program.

SYS856 47
Advanced techniques in computer-aided manufacturing
2.1.4 Reference positions of the MOCN

It is possible to preset up to four reference positions through the parameters.


machines protected in the controller's memory. The adjustable parameters defining the positions
Reference for the Fanuc controller can be found at addresses numbers 1240 to 1243. The figure
the following presents four different reference positions accessible through the
command G30. These references are persistent as long as an intervention
Directly on the controller is not intended for alteration by an authorized person. These
reference positions are added to the machine reference which is activated using the G28 code. The
movement to the other four reference positions is respectively activated through the
code G30(P1), G30P2, G30P3 and G30P4, according to the syntax explained below. It should be noted that
The second reference position identified by G30 corresponds to the change position.
of tool and is reserved for this purpose.

YM

2eref.

1reref. 3andref. 4eref.

OM
XM

Machine reference (OM) : G28 (1rereference)


1reréférence : G30(P1)
2ereference: G30P2 (change tool for ATC*important)
3ereference: G30P3
4andreference: G30P4

Figure 2-8Reference positions

The technique for positioning the tool at either of the reference positions is the
next :

G91 G28 G0 Z0;


G91 G28 G0 X0 Y0;
G91 G28 G0 A0 B0 C0;

SYS856 49
Advanced techniques in computer-aided manufacturing
This is a relative displacement of 0 units along each of the axes compared to the position of
reference specified by G28 or G30. The movement is broken into three blocks to avoid
any collision between the spindle and the fixture. The movement to the reference positions is
always a tool withdrawal, so the first axis to move is the tool axis, the Z axis. Afterwards,
Before activating the rotary axes, it is preferable to move the tool away from the fixture using the X axes.
and Y. The command is completed by positioning the axes of rotation to their position of
respective reference.

2.2 The compensation of the tools

In the previous sections, the notion of tool positioning is often referred to.
It is important to specify that the positioning of the tool calculated by the FAO systems considers
Actually, as a reference point, the position of the center of the tool at its tip.
However, the machine controller moves the axes by default in such a way as not to position not
the tip of the tool but rather the reference point that consists of the central point of the face of the
broochFigure 2-9 It is therefore essential to inform the controller of the length of the tool.
loaded in the pin and to command a length compensation through a
instruction in code G.

Figure 2-9Length compensation

SYS856 51
Advanced techniques in computer-aided manufacturing
In the case where the tool length compensation is not activated, a damaging collision
for the machine can occur. Let us take the example presented in the following figure. A
move to position ZP= 0 is commanded while a tool is loaded in the spindle and
that no compensation has been demanded by the programmer. In theory, the movement will have
to effect the movement of the lower face of the spindle at the surface of the table, this
which causes a collision and the breakage of the machine. The length Ltool(Figure 2-11must be measured
and entry into the tool compensation table of the controller (Figure2-12). The order
Activating length compensation must also be specified in the program afterwards.
from every tool loading or following each return to a reference position. The G43 codes and
G44 allows this compensation (the use of these codes is presented in the following section).

No collision
compensation in specified length!

Atool

Figure 2-10Effect of tool length compensation

Figure 2-11Standard length of a tool with a CAT type tool holder

SYS856 53
Advanced techniques in computer-assisted manufacturing
The tool length definition table includes two parameters: the nominal length and
the wear compensation. The tool diameter is similarly compensated by means of the same
table. The nominal length is used by the FAO system for planning the
trajectories. In real life, it is difficult to set up a cutting tool exactly according to the
specified nominal length. In addition, during the useful life of the tool, a certain wear in
length and diameter will be observed. Thus, the true length as measured using a
probe or a preset stationFigure 2-13) constitutes the sum of the nominal value and
of wear. The wear parameter should explicitly appear in the table, as it
may be adjusted according to the machining time. If such measuring devices are not
available, a comparator can do the job at low costFigure 2-14 . TheFigure 2-15
summarize well the important parameters to consider when measuring tools, both in
milling only in turning. Considering the three types of tool measurement systems, the system
The optical presetting, dedicated to this task, allows for the control of angles and corner radii.

Length Rayon
T Name
Name Unsure Name Unsure
001 EM05 7,500 -0.010 0 -0.005
002 BEM025
.
.
.
Figure 2-12Definition table of tools (CNC)

Example of calculation made by the machine controller when the length compensation is
activated (G43). The example pertains to the EM05 tool, namely the T1 tool, appearing at the table of the
Figure 2-12:

Compensated Z coordinate = Z (Z P+ A) A= A name+ A not sure


(transparent to the user) A= 7,500− 0.010= 7,490

Program movement ZP= 0


Actual displacement of the Z axis = 7.490

Figure 2-13Optical presetting bench or tool measurement by probing on CNC

SYS856 55
Advanced techniques in computer-aided manufacturing
Figure 2-14Comparator for measuring tools

Figure 2-15Characteristic parameters of the tools

2.2.1 Command used to initiate length compensation

As mentioned above, the useful G codes for activating length compensation are
G43 and G44. These codes must accompany a movement along the Z axis during activation and
the H register associated with the storage address of the offset information must be specified at
default of what, some FANUC models will take the value of the register associated with the number
of tool. Other models will fall into alarm mode. The length compensation MUST be
activated at the first movement in Z following the tool change, otherwise a collision is to
to foresee.
G43 Zxx H01

SYS856 57
Advanced techniques in computer-aided manufacturing
2.2.2 Cancellation of compensation in length

The cancellation of length compensation is done using code G49, or also through
from the sequence G43 H00, the register H00 assigns a zero length to the current tool, which
implicitly causes the cancellation of the compensation. It is very important to know that the codes
Returning to a reference position G28, G30, G30P2, G30P3 and G30P4 cancel
automatically the tool compensations. It is therefore imperative to reactivate the compensation
in length following any return to a reference position, otherwise collisions
become inevitable.

G49
or G43 H00
or a return to a reference position G28 G30 G30P2G30P3G30P4

Code G44 also allows for length compensation. The compensation in this case is
applied downwards. The programmed Z value is subtracted from the value equal to the length
specified tool in the H register. The use of G44 is not widespread. It is recommended to
choose a type of compensation and stick to it for all machining programs to avoid
a possible confusion that could jeopardize the integrity of the machines. The example below
presents the use of the two compensation codes G43 and G44.

Example 2.1:
Length compensation:
Program NC Z commanded H01 = 200 Compensation
G54 G90 G00 X0 Y0 ;
G43 Z0 H01 ; 0 200 200 + 0
G01 Z-30 F500 ; -30 170 200 + (-30)
Z-100 ; -100 100 200 + (-100)
G49 Z0 ; 0 Collision (-200) 0
Z commanded H02 = -150 Compensation
G44 Z0 H02 0 150 150
G01 Z-30 -30 120 -(-150) + (-30)
Z-100 -100 50 -(-150) + (-100)

G44 compensation downwards direction Z - : Z = z -A


G43 compensation upwards direction Z + : Z = z +A

2.2.3 Measurement of tools by comparison to a standard

Devices for measuring tools have been presented above. Another very
simple and direct, without resorting to any device, is often used. It is the comparison
from the tool to a standard. As illustrated in the following figure, the technique involves pressing the tool
on a reference element and note the machine Z coordinate, then redo
the exercise with a standard rather than with the cutting tool. The tool length is deduced by
comparison of machine Z values observed, knowing the standard length.

SYS856 59
Advanced techniques in computer-aided manufacturing
ZM

XM
On
ZO

ZG

Ao

standard LG
TABLE/REF.

Z G= 300
Z G+ LG= Z The+ A O Z The= 280
( G− Z O
A O= Z ) + LG LG= 20
A O= (300− 280+) 20= 40mm

Figure 2-16Tool length compared to a standard

2.2.4 Tool Radius Offset

The offset of the tool rays allows for the programmed trajectory in CNC, or directly
in code G, to be compensated by a radial value equal to the specification given in the table of
controller. Just like the tool length, the compensation parameters include a value
nominal (geometric) and a wear value. When the trajectory is developed by hand
"rise", without the aid of a FAO tool, it is common practice to resort to full compensation
from the tool path code G representing the trajectory of the tool center along the
nominal geometry of the drawing. When a CAD system is used, the calculation of the
trajectory compensation is carried out by the software based on the nominal radius of the tool
cutter, as specified in the tool library within the CAD software. Thus, the
the nominal compensation parameter of the radius entered in the controller table is zero, whereas
The wear parameter slightly compensates for the radial difference from the nominal.
and the actual value as measured for the tool. The following figure illustrates a tool path
programmed from a nominal geometry, as well as the offset trajectory of an equal value
in the tool's radius, as measured using a preset station for example. Regarding
the direction of the shift, two G codes allow for a right shift of the
planned trajectory or a shift to the left of the latter. A shift to the
left of a shift to the right when looking in the direction of the tool's movement. An observer
looking in the direction of movement will see a shift to the left or right depending on the
tool position in relation to the trajectory. TheFigure 2-18 illustrates well the difference between these
shifts. When the specified offset value is negative, then the direction is inverted. The
shift to the right becomes to the left and vice versaFigure 2-19).

SYS856 61
Advanced techniques in computer-aided manufacturing
Figure 2-17Trajectory shift NC

Left shift: G41


Shift to the right: G42

Figure 2-18Shift to the left and shift to the right

SYS856 63
Advanced techniques in computer-aided manufacturing
Figure 2-19Specification of an offset with a negative value

The specification of the offset on the tool radius is done through G41 codes, for a
left shift, or G42, for a right shift. The code must accompany a
real movement along one of the axes of the plane in which the offset is applied. The code must
also to be accompanied by the 'D' register allowing to identify the address where the values of
compensation are specified. The number accompanying the register is not necessarily the one
of the tool.

Specification using a register: G41 X Y Z D01

Cancellation of the offset:

Just like the length offset, the cancellation of tool radius offset can be done by
two dedicated codes. It can also be done indirectly through codes of
return to reference positions :

G40 accompanied by a movement


G41 or G42 accompanied by D0 (register D without value)

or again

G28 G30 G30P3 G30P4

As mentioned above, the shifts in radius are always applied in a plane of


reference, either of the XY, ZX or YZ planes. These reference planes are referred to by the
respectively codes G17, G18 and G19Figure 1.11).

SYS856 65
Advanced techniques in computer-aided manufacturing
The radius offset requires the controller to perform a calculation with each movement made. Thus,
certain application rules must be followed by the NC programmer to ensure
the applicability of ordered compensations. As illustrated in theFigure 2-20, the first rule
to be respected concerns the activation of compensation on a linear movement only (G00
or G01). The machine tool controller does not provide for the calculation aimed at the activation of a
compensation on a circular path (G02 and G03). The tool approaching a movement
circular must necessarily be in radius offset mode to avoid any anomaly. The
Figure 2-21illustrates the difficulty that controllers have in compensating for a radius on a movement
circular. To activate a compensation when the first cutting motion is an arc
circular, it involves adding a linear approach movement that precedes the arc of the circle and
order the G41 or the G42 on the added linear motionFigure 2-22 The movement
can be quick or in advance speed without making a difference regarding the
compensation.

G17 G41 G01 Xx2 Yy2 D01 (activation of compensation on a linear movement)
X x3 Yy3 (movement to point 3)
G40 Xx4 Yy4 (complete cancellation of the delay upon arrival at point 4)

Figure 2-20Activation of G41 or G42 on a linear movement

P2

The CNC cannot


calculate this
interpolation/trajectory.

Figure 2-21Application of compensation on a circular arc

SYS856 67
Advanced techniques in computer-aided manufacturing
P3 G41G01Xx 2 Yy 2 Δ01
G02 P3
P2
G40 P4

P1

Figure 2-22Addition of a linear motion for the application of the compensation

The technique of adding linear motion to an arc is very common since the
circular arcs are generally used to approach the workpiece during machining of
Profiles of parts. Thus, the tangential circular inlet must be fully compensated in radius.
in order to achieve maximum dimensional accuracy for the machined geometry. TheFigure 2-23
illustrate the approach of tangential circular entry with a linear motion, performed a priori,
from which the compensation is activated. TheFigure 2-24 show the importance of an entry
adequate in the material during the machining of profiles. In fact, in this specific case, the entry with a
an angle greater than 90 degrees causes excessive material removal ("gouging") in the part
useful for obtaining the final piece!

G41

¾ tangential approach in the room

Figure 2-23Tangential approach and application of compensation

SYS856 69
Advanced techniques in computer-aided manufacturing
o 90

cut
excessive

Figure 2-24Tangential approach and application of compensation

The controllers have different calculation algorithms allowing for transparent introduction.
simplifying movements or optimizing the programmed trajectories. TheFigure 2-25 and there
Figure 2-26 illustrate some examples of the types of movements made in different contexts.
situations.

Figure 2-25Correction of trajectories at the intersection of two segments

SYS856 71
Advanced techniques in computer-aided manufacturing
bisector R center
normal

R
contour to execute point to calculate

Figure 2-26Shift of trajectories in the case of incoming angles

In some cases, the controller's read-ahead, limited to two blocks, does not allow for
to adequately compensate the trajectories. This triggers alarms for the controllers so that
to avoid excessive cuts in the piece, resulting from algorithmic aberrations or
Mathematics. TheFigure 2-27name two examples. All scenarios are addressed in
exhaustively in the programming manuals accompanying the machine tool. It is
important to take note of, especially during the advanced development of post-processors.

Figure 2-27Types of outlines that fail certain controllers

Ultimately, 2D compensation cases are always applied in a trihedral plane.


normal for a machine tool. Most machines support this type of compensation, while
managering exceptional situations at a different level. New technologies in terms of
controllers allow for 3D compensation. This compensation is implemented by considering the
tool orientation vector at a given point of the trajectory, which allows for a maximum of
dimensional and geometric precision in the case of 3-axis machining of complex surfaces or
again in the case of multi-axis machining. In multi-axis, the radius compensation according to the plans
G17, G18, or G19 is no longer effective. The 3D compensation option then becomes very useful.
for high precision machining.

SYS856 73
Advanced techniques in computer-aided manufacturing
The following example summarizes the use of tool compensations.

Example 2.2:

Profile machining considering tool compensations.

z y

80

60
40
40
z0
20 20
20
x
G54 100

D01= 15 mm – 0.02
T01 (END Millφ30)
TO1 MO6

G90 G54 G00 X40;


G43 Z-20 H01
G17 G41 G01 X 100 Y20 D01 F120
Y60
X 140 Y80
G02 X 180 Y40 R40
X 160 Y20 R20
G01 X 90
G00 Z30
G40 X 0 Y 0
G91 G28 Z0
X 0Y0
M30

SYS856 75
Advanced techniques in computer-aided manufacturing
Chapter 3
The fixed cycles
3.1 Introduction

Fixed cycles are application routines developed by machine manufacturers.


in order to improve the efficiency of programming and machining features
repetitive like all kinds of holes. The cycles are resident in the controllers of
machines and are easily usable through a simple G-code syntax, making
intervene with multiple parameters controlling the machining. In general, all machines are
equipped with basic drilling cycles, such as those shown below. Some machines
offer a much wider range of cycles that allow for machining of
pockets and islets of different geometries. This chapter will present typical movements
of a drilling cycle, then detail the different cycles, namely: simple drilling, drilling
deep with deburring, tapping, fine boring cycle and counter boring cycle. Two
Examples will demonstrate the use of cycles in machining multiple holes.

3.2 Typical movements of a cycle

For all the diagrams presented in this chapter, the solid lines represent a
movements at forward speed while the dotted lines are associated with displacements
rapidly. As illustrated in figure 3.1, there are mainly five typical movements involved
during a machining cycle procedure. The first movement concerns the positioning of
the tool above the first hole to be drilled, in the selected drilling plan using the codes
G17 to G19. The initial level, namely level Z (in the case of G17), is defined as being the plan
z0associated with the coordinate of the displacement point preceding the activation of the cycle. It is about the
withdrawal plan of the tool at the end of the cycle sequence. The second movement is the
quick approach maneuver until reaching the R level, clearance plan. Subsequently,
the drilling movement at feed speed is carried out until the specified depth, then
A bottom hole operation is activated in the case of particular cycles. It should be noted that the
drilling movement #3 can be interrupted in the case of certain types of cycles (drilling
deep). Movement #5 or #6 describes a quick return or fast forward movement, depending on
the type of cycle. The return can be made to two distinct positions, depending on the choice of
Programmer. The first stop position is plan R. The latter is chosen when a
a succession of holes are drilled without the presence of obstacles (islands) between each of them.
The small recess above the surface helps to minimize movement as much as possible.
fast and thus make the drilling of numerous successive holes as efficient as possible. The
the second withdrawal plan is the initial plan (level Z). It allows for a passage above the
obstacles and successfully completes a sequence of multiple drillings by housing the tool in a position
secure. The selection of the return plan is made through codes G99 (level R) and G98
(level Z). The type of increment G90 or G91 as well as the reference plane must
also be specified for all cycles. The default plan is the G17.
1 initial position (return)
fast
x0y0 z0 level Z = z0
advance
6
2
level R (clear none)

x1y1z1

5
3

4 specified depth

Z coordinate relative to level Z (G90)


(point Z)

1 quickly position hole 1 at x y

2 fast to the leading point R

3 drilling ahead to point Z

4 fund operation

5 or 6 quick return to level R or Z

Figure 3-1Typical movements of a drilling cycle

The general syntax of loops in G-code includes, depending on the type of loop, one or more of
following parameters (SEICOS controller of Hitachi Seiki):

G__ GΔΔ X_ Y_ Z_ R_ P_ Q_ L_ F_ E_

98 # de position prof. start Delay depth K (fanuc) advance speed


or 99 cycle the hole in the background
feed at the bottom
intermittent repetition of
return

SYS856 79
Advanced techniques in computer-aided manufacturing
A G code is used to identify the cycle that will be activated during the processing of information by the
machine controller. The position of the hole in the interpolation plane must be specified from
the same as its total depth. The R level is specified by the word R. The value
accompagnant ce mot est spécifiée relativement au niveau initial Z. Pour certains cycles, une
The hole bottom timing value is specified using the word P. It represents a pause.
expressed in milliseconds, forcing the tool to remain stationary. Regarding the cycles of
deep drilling, the Q parameter defines a drilling depth achieved by
intermittence, that is to say a total piercing through a succession of small drilling movements of
Depth Q. The number of intermittences is specified through the repetition parameter.
"L". The F word specifies the feed rate during the cut. If the return speed differs from the
fast speed or the specified forward speed, it is possible to use the word E in order to
specify a different speed.

Like other machining movements, cycles can be expressed in relative mode.


or absolute. There is a slight difference in the interpretation of movements depending on the use
in one way or another. The following two sections present the nuances differentiating these
operating procedures.

SYS856 81
Techniques avancées en fabrication assistée par ordinateur
3.3 Specification of a cycle in absolute mode (G90)

An example of a program allowing drilling in two positions and coming from a system of
FAO (in CL language) could have the following form:

G0T0/ x0an,d0,z0 (-300, 200, -100)


CYCLE/DRILL, DEPTH, 50, MPM, 7.0, CLEAR, 5
G0T0/x1, and1, z1 (-200, 200, -200)
G0T0/x2,y2,z2 (-100, 200, -200)
CYCLE/OFF

R− 95
G98

G99

The conversion to G code of this program takes the following form in absolute mode:

G17 G90 G99 GΔΔ X− 200 Y− 200Z− 150 R− 95 F7


X− 100 (Drilling/cycle applied at point 2)
G80 (End of cycle)

SYS856 83
Advanced techniques in computer-aided manufacturing
3.4 Specification of a cycle in relative mode (G91)

The same program specified in relative mode would rather have the following specification:

G98
R− 95

G99

G17 G91 G99 GΔΔ X− 100 Y− 100Z− 55 R− 95 F7

3.5 Simple drilling cycle (G81)

The simple drilling is activated through G-code G81. It is a movement at speed.


advance to the bottom of the hole then a quick withdrawal. The words X, Y, Z, R and F are required to
the specification.

G81 X _ Y _ Z _ R _ F_
x0y0z0
Z

G98

R
x1y1z1

G99

SYS856 85
Advanced techniques in computer-aided manufacturing
3.6 Deep hole drilling cycle with 'DEEP hole' or 'Peck drilling'

This drilling cycle applies to deep holes requiring repetitive chip clearance.
during the cut. This is why the drilling is done intermittently. Two codes are
usable for deep drilling are the G73 and G83. In the first case, a tool retract in
rapid is performed over a distance δ, while the G83 code dictates a return to the R plane after
each intermittent movement, which allows for better chip removal, therefore a
finished of upper surface. The value δ is calculated from

Quick return of Return to plan R after each


after each G73 interruption intermittence G83

G98 G98

R
Q G99
Q
d
Q d
Q

Q d

machine parameter =0.05''

from the drilling depth Q from which a margin 'd' is subtracted, the value of which is
specified in the machine controller as a fixed parameter. The number of repetitions "L"
is greater than or equal to the total depth of the hole divided by the intermittence.

⎡ depth ⎤
⎢ L≥ Q ⎥
⎣ ⎦

The syntax associated with the drilling cycle with reaming is as follows:

G73 X _ Y _ Z _ R _ Q _ F_ L _
G83

SYS856 87
Advanced techniques in computer-aided manufacturing
3.7 Tapping cycle (G74, G84)

The tapping cycle allows the machining of threaded holes according to a conventional "pitch" (G84) or
an inverted "step" (G74). Since it is a rigid tapping, not all machines are
necessarily able to support the movements of this cycle. In the case of the G74 cycle, the
The programmer starts the process by activating the pin in the counterclockwise direction (CCW).
Rapid movement positions the tool at plane R, then the cut is made according to the length.
specified. At the bottom of the hole, the pin temporarily changes its direction of rotation to allow
the removal of the tool without damaging the machined threads. The return to the R plane or the initial Z level is
ends with the initial rotation of the spindle. The opposite of the process describes tapping.
conventional 'step' fillets.

G74 turn left Conventional G84


(as a programmer)
brooch SAH (M04) M03

SAH (auto) SH SH (auto)


Z G98
G98

R R SH (G99)

fond (SAH)
brooch
(SH)

(G74) (G84)

In the case of the tapping cycle, the machine operator should not intervene during
the execution of the cutting movement by changing the rotation speeds or feed through
of the "feedrate override" and "spindle override" potentiometers. One way to prevent it is
to set the controller in tapping mode via G-code G63. This setting is necessary
to ensure the integrity of the machine part assembly.

G63G74X _ Y _ Z _ R _ P _ F

Following the tapping, the machining mode can be reactivated via the G64 command.

SYS856 89
Advanced techniques in computer-aided manufacturing
3.8 Fine boring cycles or boring cycles with the boring bar

The fine boring cycle allows the production of holes with great precision. A boring bar is
used with this type of cycle. A hole bottom operation allows the spindle to stop for
remove the tool from the machined surface. The tool is then quickly withdrawn from the hole.
retraction of the tool tip by a specified value indicated by the word Q prevents
damaging the part during tool withdrawal. The difference between G76 and G87 codes is
direction in which the machining is performed. Pushing machining is performed from top to bottom
of a hole with a withdrawal without contact with the reamed wall. The boring by pulling involves positioning
the tool at the bottom of the hole then machining by pulling the tool, either from bottom to top of the hole.

( G76 , G87 ) G76 X _ Y _ Z _ R _ Q _ P _ F

by pushing timing at
by pulling bottom of the hole
value of
disengagement at
bottom of the hole

Z
G98
R

G99

Since 'Q' is a modal value for all cycles, and its meaning differs
in the cases of boring and drilling deburring, it becomes very important to always define it at
new when activating a cycle (do not consider the default values).

Given that the tool must be moved a distance 'q' in a fixed direction and
predetermined in the execution routine of the cycle, the tool tip must be
preferentially oriented during the loading of the tool into the spindle. The orientation of the
The brooch must therefore be activated via code M19 prior to the execution of the cycle.

M19 allows the orientation of the pin

SYS856 91
Advanced techniques in computer-aided manufacturing
3.9 Drilling and Counterboring Cycles

This cycle allows for drilling with a reamer to achieve holes of a precise depth at
flat bottom. The cycle is activated by G-code G82 and involves a timing parameter in
bottom of the hole in order to improve the surface finish and the precision of the hole. The other movements of the
cycles are identical to simple drilling.

G82 X _ Y _ Z _ R _ P _ F _

timing at the bottom of the hole

3.10 Various Boreholes

Several boring modes are also available as basic cycles for most of the
machine manufacturers. For Hitachi Seiki, the G85, G86, G88, and G89 cycles offer
variants in terms of movement to meet most needs in the field
precision hole machining.

G85 G86 G88 G89

return stop boring bar timing


in advance deep down + to the pointZ(fond) background + return
quick return temporizationP vit. advance
then stop tool
manual clearance

3.11 Cancellation of cycles and special conditions

The cancellation code for cycles is G80. This code can be specified alone on a block or be
accompanied by movements.

G80: cancellation of cycles

Indirectly, any cycle will also be canceled when the G00, G01, G02, or G03 codes are
activated while the machine is in active machining cycle mode.

It is also important to mention that tool corrections are always ignored in


fixed cycle mode and that the reactivation of diameter compensations is required according to a
cycle.

SYS856 93
Advanced techniques in computer-aided manufacturing
Example 3.1:simple drilling cycle (G81)

Zp

Xp

Current position of the tool x p= 0 yp = 0zp = 0

P1 (1.5 ; 0 ;−1.5 ) P22.5( ; 0 ; − 1.5 )

The program allows for the successive drilling of holes at points P1 and P2 with a retraction to the plane.
R is read as follows:
G90 G0Z−1.0
G99 G17 G81 X 1.5 Z−1.6 R− 0.45F6.0

X 2.5
G80
G0 Z0 (withdrawal to the source)

The specified Z depth as a cycle parameter is calculated as such for a drill of diameter
equal to 1 inch and an angle of 120 degrees at the tool tip (a margin of 0.05 inch is
considered in order to properly break through the part with a complete drilling):

φ1.0

φ/2 0.5
δ Tg 60= δ= ≈ 0.3
δ Tg 60

Z = − (0.5+ 0.75+ 0.3+ 0.05 ) = −1.6

SYS856 95
Advanced techniques in computer-aided manufacturing
Example 3.2:Drilling cycle with pecking G83

X current position of the tool Z0

Zp-1.0 Z

0.75 R
r = 0.05''

3 inches

The diameter of the hole is equal to 1 inch. Considering intermittent cutting movements of
0.75 inches, and a total depth of 4.1 inches, the number of intermittences is calculated as
suit

Depth: 3.75″ + 0.35 = 4.1total depth inches


depth in intermittence3.4inches withQ = 0.75″

G90 G0Z−1.0
G17 G98 G83 Z− 4.10 Q 0.75 L4 F6.0

SYS856 97
Advanced Techniques in Computer-Aided Manufacturing
Chapter 4
The APT language

4.1 Introduction

The name given to the APT language comes from 'Automatically Programmed Tool'. It is about
of a language that is very rich in possibilities, which allows to define both geometry in the form
syntax as well as the required specifications for machining simple and complex parts.
Before the advent of CAD software, this language was the reference in the field of
numerical control machining. Programs in APT language must be compiled, which
which allows the calculation of tool paths and the conversion of programs into CL syntax
"Cutter Location", translatable as post-processing NC in order to produce compatible G code at
a given machine tool technology. This language allows for three-dimensional cuts
(simultaneous multi-axes according to the machines) by directing the tool in an imaginary cube using
construction geometry not necessarily belonging to the piece. The tool moving in
3D must be guided along the desired trajectory.

+Z

CUBE
IMAGINARY

ROOM +X

-Y

Figure 4-1Imaginary cube enclosing the part to be obtained by machining


Figure 4-2Surface "guide" of the tool

The trajectory planning approach is based on the specification of three types of surface.
to guide the tool. At theFigure 4-2 , the tool moves straight and is guided by two
converging surfaces. The first surface, called 'guide', directs the side of the cutting tool.
while another surface called 'piece (part)' allows contact from below with the tool. It
This is the floor on which the tool rests. The planes can be imaginary to guide.
the tool according to a trajectory by the programmer. In order to change direction or stop the
knife, a 3eImaginary surface is used. This surface is called the stopping surface.

Figure 4-3Surfaces « guide », « pièce » et « butée »

In summary, given that each surface has a function, we have assigned a name to them.
functional

Surface guiding the side of the tool: "guide" orDrive Surface


Surface guiding the underside of the tool: "piece" orPart Surface
Stopping or turning area: stop orCheck Surface
SYS856 101
Advanced techniques in computer-aided manufacturing
Reminder: The 'piece' surface, like the others, is infinite (without borders) and
does not necessarily belong to the play.

4.2 Modifiers to 'stop' surfaces

In order to dictate the exact places to stop the knife or to change its direction.
movement, modifiers are used in conjunction with the main words used to
describe the trajectories. The word TO will dictate the stopping of the tool "before" the stopping surface, the word ON
dictate the stop 'on' the bumped surface while the word PAST will dictate a stop beyond the
stop surfaceFigure 4-4).

TO the stop surface "check"


General ON the stop surface "check"
PAST the abutment surface

SO MUCH
Particular
PSTAN

Figure 4-4Modifiers applied to stopping surfaces

When the tool movement incorporates either of the modifiers TO, ON, or PAST
applied to the stop surface, the tool may undergo a change of direction if either one of the
minor words available for this purpose are used in the instruction. To direct the tool toward the
right when it has reached the stop surface, the word RIGHT must be specified. Similarly, the
The words LEFT, FORWARD, BACK, GOUP, GODOWN allow respectively for
changes of direction to the left, forward, backward, upwards or downwards
(Figure 4-5).

SYS856 103
Advanced techniques in computer-aided manufacturing
Figure 4-5Changes in the direction of the tool during the trajectory

4.3 Continuous Movement Instructions

The specification of the continuous tool movement instructions is given according to the format
basic general following:

GOLF TO
GORGT (symbol) PAST (symbol)
GOFWD Drive Surface ON Check Surface
GOBACK guide SO MUCH stop
GOUP PSTAN
godown
Major key Minor key, modifier
stop surface

Figure 4-6Syntax of a continuous movement


SYS856 105
Advanced techniques in computer-aided manufacturing
A major word appearing before the slash allows for a change of direction during
the reaching of a stop surface. The change of direction involves a new surface
guide for driving the tool to a new stop surface, affected by a modifier of
surface.

Example 4.1 :(GOLFT et GORGT)

GOLF direction
L1
previous
GOLFT/L1, TO, L2
GOLF
DS CS
L2

GORGT
GORGT
GORGT/L1, TO, L2

direction
previous

SYS856 107
Advanced techniques in computer-aided manufacturing
Example 4.2 :(GOFORWARD and GOBACK)

SYS856 109
Advanced techniques in computer-aided manufacturing
Example 4.3:(GOUP and GODOWN)

WAREHOUSE

P1
PL2
PL1

PL3
GOTO/P1
GO/TO, PL2, TO, PLPS, TO, PL1 Same direction as
GODOWN/PL2, TO, PL3 the negative direction
of the tool axis.

SYS856 111
Techniques avancées en fabrication assistée par ordinateur
4.3.1 Use of INDIRP and INDIRV directions

In some cases, it may be necessary to use the words INDIRP (toward a point)
you INDIRV (in the direction of a vector) to indicate the direction of movement rather than
to use the words GORGT or GOLFT, for example. We specify the direction INDIR(P,V) then
GOFWD :

Figure 4-7INDIRP and INDIRV

4.3.2 Return on the surface modifiers 'stop'

TO : The movement ends when the knife reaches the side of the surface.
stop

PAST: The movement ends when the knife completely exceeds the
stop

ON: The movement ends when the center of the knife is on the surface
stop

SO MUCH: Can only be used if the "guide" surface is tangent to the surface
"stop". The movement ends at the point where the knife, the guide and the
The "stop" surfaces are mutually tangent.

PSTAN: Can only be used when the "piece" surface is tangent to the surface.
"stop": the movement ends at the point where the knife, the "piece" surface
and the "stop" surface are mutually tangent to each other.

SYS856 113
Advanced techniques in computer-aided manufacturing
Example 4.4 :(TO, ON, PAST)

Example 4.5:(SO MUCH, PSTAN)

PLΔS

SYS856 115
Advanced techniques in computer-aided manufacturing
4.4 Use of point-to-point movements

Until now in the presented examples, the GOTO instruction has been used in a few
reprises. It is actually a movement to a given point in absolute mode. For a
movement in relative mode, the instruction GODLTA/ X, Y, Z is mandatory.

Normally, an APT program always starts with defining a starting position. The
The starting point can be specified via GOTO but also by an instruction.
dedicated to this effect, either the FROM instruction.

FROM/P1 ; FROM/5, 0, 6
GOTO/Point4 ; GO/Departure ; GOTO/1, 1, 2

Symbols

Until now, we have not specified a statement allowing us to consider the surface.
piece. In fact, this one must be specified once, and then it remains modal as long as
as long as there is no explicit change to this surface.

+Z
GOTO / P2

P3
P1 GOTO
P4 P2
+Y

P7
P5 +X

P6
−Y

+Z

+Y

−X +X

−Z
−Y

Figure 4-8Point-to-point movement

SYS856 117
Advanced techniques in computer-aided manufacturing
4.5 Departure instruction GO

Before specifying a continuous tool movement instruction, it is necessary to define


a departure instruction through the major word GO:

TO TO TO
GO ON , Drive [Link] , Part Surf., ON , Check Surf.
PAST guide PAST piece PAST stop
modal
The modifiers TO, ON, and PAST are optional. The default modifier is TO.

TO TO TO
GO/ ON , DSURF , ON , PSURF , ON , CSURF
PAST PAST PAST

DSURF

P1
DSURF

PSURF

Figure 4-9Departure instruction GO


SYS856 119
Advanced techniques in computer-aided manufacturing
In the case where only two surfaces are specified in the GO/ instruction, the surface
With the 'stop' omitted, the tool will take the shortest path to the surface.
guide, which means a movement perpendicular to the guide surfaceFigure 4-10).

TO TO
(specification of 2
GO / ON , Drive Suf., ON , Part Surf.
surfaces only
PAST PAST

Figure 4-10Specification of two surfaces with GO

If only one surface is specified, either the 'guide' surface or the 'part' surface is assumed.
as being the XY plane (Z=0) and the tool will take the shortest path for its
initial positioning.

TO (1 surface
ON , Drive specified, either the
GO
PAST Surf. surface " guide "

Figure 4-11Specification of a surface with GO

SYS856 121
Advanced techniques in computer-aided manufacturing
The direction of the initial movement can also be specified with INDIRP, INDIRV.
(Figure 4-12andFigure 4-13).
INDIRP/ds-point, ps-point, cs-point (1 to 3 points)
INDIRP/P1 DS
/3, 5, 10 DS
/P1, P2 DS, PS
/3, 5, 10, 5, 7, 4 DS, PS
/, P2 PS
/, P3 CS
...
V1 = vector / 1, 0, 0
INDIRV/V1 INDIRV/1, 0, 0
INDIRV/V1, V2
drive point direction pointing towards the surface(s)

Figure 4-12Usefulness of INDIRV


As illustrated in theFigure 4-13, the direction is ambiguous without using INDIRV.

Y Z
S1 S1

SUMMON
P1
INDIRV
P1
PL1
Z
X
X

GOTO/P1
INDIRV/-1, 0, 0
GO/TO, S1, TO, PL1

Figure 4-13Ambiguity of machining direction

SYS856 123
Advanced techniques in computer-assisted manufacturing
4.6 Other forms of surface specification 'part'

There are two commands to specify a 'part' surface, namely PSIS and AUTOPS.
These commands can be used at any time to change the "piece" surface which is
modal since its initialization through the command GO.

4.6.1 PSIS : Part


( SurfaceIS)

The specified surface becomes the modal surface. The GO instruction allows specifying the surface.
"piece" at the beginning of the sequence. Subsequently, the only instructions allowing for its change
are PSIS, AUTOPS.

GO/TO, PL1, TO, PL2, ON, L1 PL2 is a Surf piece


GOFWD/PL1, TO, CYL1 $$ moves along the line along PL1 and PL2
PSIS/CYL1
GOFWD/PL1, TO, PL3

Figure 4-14Use of PSIS

4.6.2 AUTOPS

This word generates a plane parallel to the [Link] through the current position of the cutting tool.
This plan then becomes the modal "piece" surface.

Example: GOTO/0, 0, 1.5


GO/PAST, L1, L2
AUTPOS
GORGT/L1, L3

SYS856 125
Advanced techniques in computer-aided manufacturing
Example 4.6:

APT program describing the illustrated movements

CUTTER/1.0
TOLER/0.001
FROM/SP
GO/TO, BSURF, TO, PSURF, TO, ASURF
GORGHT/BSURF, PAST, CSURF
GOLFT/CSURF, PAST, DSURF
GOLFT/DSURF, PAST, ASURF
GOTO/SP

4.7 Tool Diameter Specifications

By using the words available in APT to operate the tool, it is clear that the system needs
of its diameter in order to automatically calculate the trajectory of its center 'CL' during the
compilation. The instruction allowing this specification is CUTTER. The parameters of
CUTTER includes the diameter and corner radius of the tool.

CUTTER/d
CUTTER/d, r
diameter corner radius

If we specify CUTTER/0, then we obtain an unshifted trajectory.

SYS856 127
Advanced techniques in computer-aided manufacturing
4.8 Machining Tolerances

The APT language approximates the movement of the knife along a curvilinear trajectory by
generating a series of linear movements that do not deviate from the actual trajectory of a
greater than given tolerances:

4.8.1 OUTTOL / t1

Outer tolerance applied to the outer side of the theoretical machined surface. The application of
OUTTOL is conservative, it leaves an excess of material.

OUTTOL/t1 Excess material to leave on the part

t1

OUTTO1

Figure 4-15OUTTOL

4.8.2 INTOL / t2

Inner tolerance applied to the internal side of the theoretically machined surface. The application of
INTOL provokes aundercutexcessive material removal.

Figure 4-16INTOL

When one wishes to obtain an internal tolerance of 0 and a specific external tolerance,
The statement TOLER / t1 allows this specification.

SYS856 129
Advanced techniques in computer-aided manufacturing
4.8.3 TOLER/t1

The default values in APT are: OUTTOL/0.0005


INTOL/0

OUTTOL, INTOL and TOLER are modal instructions.

t2

t1

Figure 4-17Combination of OUTTOL and INTOL

4.9 Simplification of programs by adding tool offsets

The APT language positions the tool offset from a surface by aligning its tangent surface.
on the surface of the piece. In addition to specifying the tool movements using TO, ON, PAST, this
which has the effect of a shift, it is usually advisable to explicitly specify the shift
with the help of specific words. This will allow for the simplification of programs by ignoring the
words specifying the constraints related to "stop" surfaces.

4.9.1 Offset of the 'guide' surfaces

TLLFT (tool left) : The knife is on the left side of the surface relative to the movement.
TLRGT (tool rightThe knife is on the right side of the surface relative to the movement.
TLON (tool on) : The knife is on the 'guide' surface with no offset.

L2 L2

L1 L1

P1
GOTO/P1 GOTO/P1 GOTO/P1
GO/TO, L1 GO/PAST, L1 GO/ON, L1
TLRGT TLLFT TLON
GORGT/L1, TO, L2 GORGT/L1, L2 GORGT/L1, L2

Figure 4-18Types of tool offsets

SYS856 131
Advanced techniques in computer-aided manufacturing
Example of a program referring to offsets:

GO/TO, L1 L2
TLLFT L1
GOLFT/L1, TO, L2
GOLFT/L2, ON, L3
L5
TLON
GOLFT/L3, TO, L4
TLLFT L3
GOLFT/L4, L5

L4

4.9.2 Shift of "part" surfaces

This offset dictates the position of the tool relative to the 'workpiece' surface. There are two types of
shift, either TLOFPS and TLONPS.

TLOFPS (Tool off Part Surface) : The cutter is offset from the part surface.

TLONPS (Tool on Part Surface) : The cutter center is positioned on the part surface.

The default offset is TLOFPS.

Figure 4-19Offset of the surface 'part'

4.10 Simplification of movement instructions

In a series of movements, the "stop" surfaces generally become the surfaces


"guide" for subsequent movements. This means that we must specify the same symbol.
twice, first as CS, secondly as DS in the following statement.
In order to eliminate the need to specify the same symbol twice, APT provides a way
to omit both the specification of the CS and also the modifier symbol (TO, ON,
PAST, SO MUCH, PSTAN.

SYS856 133
Advanced techniques in computer-aided manufacturing
The 'buffer' surface is said to be 'implicit' according to this formulation. The format is as follows:

GOLF
GORGT / drive surface
GOFWD
GOBACK

APT looks forward to the CS for the current statement while referring to the DS of the next statement in
movement. The offset associated with the CS is deducted from the current offset for the guide surface
(TLLFT, TLRGT, TLON). The possible combinations are shown in the table below:

DS offset Word Decoded CS

TLLFT GOLF TO 1
TLLFT FEAR PAST -2-
TLRGT GOLF PAST
TLRGT GORGT TO
TLLFT, TLRGT, TLON GOFWD SO MUCH
TLLFT, TLRGT, TLON GOBACK SO MUCH
TLON GOLF ON
TLON GORGT ON

Figure 4-20Simplification of movements

Example 4.7:

Referring to theFigure 4-21 , the simplification of the existing program (old form)
becomes the simplified specification of the instructions as presented in the right column.

Old form New form


GOTO/P1 GOTO/P1
GO/PAST, L1 GO/PAST, L1
TLLFT TLLFT
GORGT/L1, T0, C1 GORGT/L1
GOLFT/C1, TO, L2 GOLFT/C1
GOFWD/L2, PAST, L3 GOFWD/L2
GORGT/L3, PAST, L1 GORGT/L3, PAST, L1ÅComplete instruction

SYS856 135
Advanced techniques in computer-aided manufacturing
Figure 4-21Simplification of a program

4.11 Integrated advance speed in instructions

It is possible to integrate the feed rates into the movement instructions. One can
also use the postprocessor word 'FEEDRATE' to do this.

GO/TO, L1, 25 Same as: FEDRAT/25


GO/TO, L1

4.12 Additional offset for tool radius

THICK/ps-thick, ds-thick, cs-thick, cs2-thick


THICK/ 0.25,0 $$ .25 for ps, 0 for others
THICK/ 0, 0.5, -1.5 $$ 0 at ps, 0.5 at ds, -1.5 for others

If the value of 'thick' is negative, it corresponds to the cancellation of the tool radius offset.

Specification of offsets

GOTO/P1
GO/PAST, L1
TLLFT Æ TLLFT, GORGT/L1
GORGT/L1

SYS856 137
Advanced techniques in computer-aided manufacturing
4.13 Steps required to define a machining sequence in APT

In summary, the following steps are necessary for defining machining sequences in
APT language.

1. Definition of the tool: CUTTER


2. Specification of tolerances TOLER, INTOL and/or OUTTOL
3. Starting statement GO/ to move the tool on the 'guide' and 'piece' surfaces and
define the modal 'piece' surface.
4. Specification of the tool offset TLLFT, TLRGT, TLON and TLOFPS, TLONPS for the
surfaces "guide" and "piece" (optional).
5. Definition of the first movement of the tool along the 'guide' and 'workpiece' surfaces
specified. Statements of movement that describe the movement of the cutting tool
(GORGT, GOLFT, GOUP, …)
6. Continue the specification of continuous movements.
Include postprocessor words to specify cutting parameters and others
actions.

Geometry must be defined beforehand (before the description of any movement.


of tool).

4.14 Geometry, auxiliary words and PP words

4.14.1 Major words vs minor words

The major words are located before the " / " and indicate an instruction to execute (movement p.r.
to surfaces). The words used to qualify the instructions are called minor words.
(limits, boundaries of movement: the 3 surfaces). They can be found to the right of the « / ». Not to be
confusing with the symbols (variables) or constants used to define the coordinates or
geometry.

4.14.2 Description of the geometry

When describing movements, we refer to symbols or variables allowing


to identify geometric elements. It is necessary that these symbols are previously
defined through geometric statements. For a point, an example of a symbol is given at
the following figure.

Figure 4-22Example of a symbol for a point

SYS856 139
Advanced techniques in computer-aided manufacturing
Rules regarding the names of symbols:

6 characters maximum
At least one character must be a letter

P54321 567891
(ok ) (not ok )
Logically, the name chosen for the symbols should be meaningful, either associated with the type of
geometry.

P1, PT1, PNT1 (point)


LI, LN1, LTN1 (line)
C1, CIR1 (circle)

[Link] The line in APT

Specification example:

P1 = POINT/5, 6, 0
P2 = POINT/17, 9, 0
L1 = LINE/P1, P2

Six different ways to describe a line in APT. The different possibilities allow for
reducing the calculations required to specify the line in formation of the given 2D drawing.

L2 = LINE/P2, ATANG1, 20 angle with respect to the X-axis.

SYS856 141
Advanced techniques in computer-aided manufacturing
[Link] The circle in APT

Example of specification:

C1 = CIRCLE / 10, 10, 0, 7


center
rayon

A circle must always be specified even if the movement occurs over a portion of that circle.
(arc of a circle). It is the movement instruction that will allow for movement along the arc.

[Link] The plan in APT

Example of specification:

PLNI = PLANE / P1, P2, P3

4.14.3 Postprocessor Statements

[Link] Words without parameters

FINI, END generate an end of program code


STOP - generate a machine stop code
OPSTOP - generate an optional stop code
RAPID - generate a fast movement code
GOHOME go to the HOME position (G28...)
RETRCT - withdrawal of the tool from the defined CLRPLN plan.

[Link] Words with parameters

Major / (minor), digital

MACHINE / name, number specify the post-processor to be used for the translation

SYS856 143
Advanced techniques in computer-aided manufacturing
FEDRAT / 10 FEDRAT / num, (IPM, IPR, …)
SPINDL / 1 000 SPINDL / (CLW, CCLW), num
COOLNT / (ON, OFF)
DELAY / 2

CYCLE/DRILL, DEPTH, depth, IPM, feed, CLEAR, r, (return)

CYCLE/FACE, DEPTH, depth, IPM, feed, CLEAR, r, (return),


DWELL, seconds
REV, revs
CYCLE/OFF

UNITS/ Feet
Inches
mm
cm

LOADTL/M

CUTCOM/ LEFT ⎡ XYPLAN⎤ [OSETNO,OFFSET ]


RIGHT ⎢ XYZ ⎥
⎢ ⎥
⎢ YZPLAN ⎥
⎢ ⎥
⎣ ZXPLAN ⎦

CUTCOM/ ON
OFF

CUTCOM/ON, LENGTH [OFFSET] ⎡ NOW ⎤ /OFF, LENGTH


⎢ NEXT ⎥
⎣ ⎦

[Link] Words with strings of characters

PARTNO / 'NO. 123-765 OP 10'


PART NO. 123-765 OP 10

PPRINT comments for the listing


PPRINT / comments for the listing

INSERT N0100 x -25 m32


Usage to be determined by the POSTPROCESSOR
INSERT / ‘ N0100 x -25 m32 ’

We will see other syntaxes during the presentation of the concepts associated with post-processors.

SYS856 145
Advanced techniques in computer-aided manufacturing
4.15 Multi-axis programming

The APT language generates the axis orientation in multi-axis machining mode. This is the role of
post-processor subsequently converts these orientation vectors into machine axis rotation.

If the axis is not specified in multi-axis, then APT assumes a vector 0, 0, 1 as orientation.
The available statements in APT for multiaxis are MULTAX and TLAXIS.

4.15.1 Tool axis vector output

MULTAX Modal condition for the exit or non-exit of the vector


MULTAX/ON i, j, k tool orientation in the CL-file.
MULTAX/OFF

⇒ 6 values are output at each point, the coordinates x, y, z, and the vector i, j, k.

4.15.2 Tool Orientation Control

TLAXIS/i, j, k Fixed orientation of the tool (modal)


/vector
/1 Fixed orientation mode

Keep the last variable orientation in fixed orientation mode.

A TLAXIS statement has no effect until a movement is specified.

Specification of the fixed axis in FROM and GOTO

FROM/point, vector
/x, y, z, i, j, k

GOTO/point, vector
/x, y, z, i, j, k
/point, i, j, k
/ x, y, z, vector
/pnt, vec

pntvec = PNTVEC/10.5, 7.25, 15, 1, 0, 1

SYS856 147
Advanced techniques in computer-aided manufacturing
GOTO/P1 Defect (0,0, 1)
TLAXIS/1,0, 0 orientation of the axis parallel to X
GOTO/P2

Corresponds to

GOTO/P1 (same)
GOTO/P2, 1, 0, 0

In multi-axis, the specification of a single value per GODLTA means a movement according to
the axis. It is a withdrawal if the value is positive or a plunge if the value is negative.

Figure 4-23Tool orientation

SYS856 149
Advanced techniques in computer-aided manufacturing
4.15.3 Changes to tool axis variables

Application to the statements of starting motion and to the statements of continuous motion.

A TLAXIS statement that initiates a variable orientation of the tool must specify the information
following:

Which surface will govern/determine the tool axis?driveorpart surface)?


How the axis will be oriented relative to the normal of the control surface in one
given point?

The following forms are possible:

TLAXIS/NORMPS normal at the surface 'piece'

TLAXIS/NORMDS normal to the surface "guide"

TLAXIS/PARLEL, 1 parallel to the rules of a ruled surface


(surface "piece")

TLAXIS/PARLEL, 2 parallel to the rules of a ruled surface


(surface " guide ")

TLAXIS/ATANGL, 1, angle at a normal PS angle

TLAXIS/ATANGL, 2, angle at a normal DS angle

TLAXIS/ATANGL, 1, angle 1 at a normal PS angle of 1

TLAXIS/CUTANGL, angle 2 with angle of attack angle 2

TLAXIS/ATANGL, 2, angle 1 at a normal DS angle of 1

TLAXIS/CUTANGL, angle 2 with lead/log attack angle 2

TLAXIS/ATANGL, 1, angle, vector 4 axes made for PS

TLAXIS/ATANGL, 2, angle, vector 4 axes made for DS

SYS856 151
Advanced techniques in computer-aided manufacturing
Exercise 4.1:

Develop the APT program to machine the contour of the illustrated part.

5 C2

r=1
4

3 P3 P2

L3
L2
2

C3
1 + + C1
r = 0.5 P1 r = .5
L1
0
1 2 3 4 5
1.5 3.5

SYS856 153
Advanced techniques in computer-aided manufacturing

You might also like