You are on page 1of 87

M a t h e m a t i s c h Te c h n i s c h e

Software-Entwicklung GmbH

Introduction to FANUC 21iM


programming key with TopMill

© MTS GmbH • Kaiserin-Augusta-Allee 101 • D-10553 Berlin • Tel.: +49 / 30 / 349 960 - 0 • Fax: +49 / 30 / 349 960 - 25
Fanuc 21 iM
Version 7.3 – 26.06.2010

© MTS Mathematisch Technische Software-Entwicklung GmbH 2009


Kaiserin-Augusta-Allee 101 - 10553 Berlin - (030) 34 99 60 0

Alle Rechte, auch die fotomechanische Wiedergabe und der Speicherung in elektronischen Medien, vorbehalten.

2 © MTS GmbH 2010


Directory

1. Basics CNC milling machine systems


1.1. Coordinate systems MCS / WCS
1.2. Define the workpiece coordinate system
1.3. Tool offset compensation
1.4. Most needed and available tool types for programming (tool equipment)

2. Basics CNC commands for programming FANUC 21i


2.1. NC-program and NC-block structure
2.2. Linear Interpolation G00 / G01
2.3. Circular Interpolation G02 / G03 with radius or I and J
2.4. Tool call command G43 / G44
2.5. Constant spindle speed G97
2.6. Feedrate G94 / G95
2.7. Reference position G28 / G30 P2-P4
2.8. Auxiliary functions M

3. Cutter radius compensation (CRC)


3.1. The path of the tool middle point in milling
3.2. Cutter radius compensation with G41 / G42
3.3. Cutter radius compensation off G40

4. Canned cycles
4.1. General explanations for canned cycles
4.2. Travel distance along the drilling axis G90 / G91
4.3. Return point level G98 / G99
4.4. Canned cycles with repetitions in G91 mode
4.5. Deactivating commands for canned cycles
4.6. High speed peck drilling cycle G73
4.7. Left handed tapping cycle G74
4.8. Drilling cycle, spot drilling G81
4.9. Drilling cycle with dwell G82
4.10. Peck drilling cycle G83
4.11. Tapping cycle G84
4.12. Reaming (Boring) cycle G85
4.13. Reaming (Boring) cycle with spindle stop G86
4.14. Reaming (Boring) cycle with dwell G89

5. Functions to simplify programming


5.1. Chamfering at the crossing of two elements
5.2. Rounding of the crossing of two elements
5.3. Absolute and incremental programming with G90 / G91
5.4. Programming with inch / metric conversation G20 / G21
5.5. Scaling and mirror function G51
5.6. Local coordinate system G52
5.7. Coordinate system rotation G68

6. Example 1 – practise G codes, subprogram technology and canned cycles


6.1. Technical drawing Example 1
6.2. Setup layout for blank and clamping
6.3. Tool equipment for Example 1
6.4. Setup dialog for TopMill
6.5. Program input Example 1 (NC-editor mode)

System TopMill FANUC 21i 3


7. Example 2 – independently exercise to practise the knowledge
7.1. Technical drawing Example 2
7.2. Setup layout for blank and clamping
7.3. Tool equipment for Example 2
7.4. Setup dialog for TopMill
7.5. Program input Example 2 (NC-editor mode)

8. Example 3 – independently exercise to practise the knowledge


8.1. Technical drawing Example 3
8.2. Setup layout for blank and clamping with jaw chuck
8.3. Tool equipment for Example 3
8.4. Setup dialog for TopMill
8.5. Program input Example 3 (NC-editor mode)

4 © MTS GmbH 2010


1. Basics CNC milling machine systems

1.1. Coordinate systems MCS / WCS

For CNC – programming two different coordinate systems are used:


• machine coordinate system and
• workpiece coordinate system.
Machine coordinate system (MCS):
The point of origin for the machine coordinate system
is also called machine zero point (M).

The MCS is defined and determined by the machine


manufacturer and cannot be changed by the pro-
grammer.

Usually the machine zero point of a CNC mill is


located at the left front machine corner front.
.
With G53 the zero offset will be cancelled for one NC-
block and the MCS is active for this block.

Workpiece coordinate system (WCS):


The workpiece zero point (W) is the origin of the
workpiece coordinate system.

The location of W is specified by the programmer and


in the case of milling usually at top side left front
corner or at the centre of the workpiece surface of the
completed part.

The location of W allows the dimensions to be directly


taken from the technical drawing.

1.2. Define the workpiece coordinate system

The workpiece zero point W is set with reference to


the machine zero point M.
The distance between M and W is called the zero
point shift and is programmed with the commands
G54 until G59 in the CNC programs.

You have to touch the sides and the surface of the


workpiece with a measured tool to store the zero point
shift values in the settings of the control. Otherwise
the programmer can enter these values directly, if they
are known.

A set workpiece coordinate system can be changed by


shifting its origin in the current program.

System TopMill FANUC 21i 5


1.3. Tool offset compensation

The tool offset compensation values make it easy to


program a workpiece without consideration of the
actually applicable tool length and radii.

The tool data lengths in distance to the tool holder


reference point and the tool radii are automatically
considered by the CNC control.

T tool holder reference point


L length distance of the cutting tip to point T in
Z coordinate
R radius value of the cutting tool

1.4. Most needed and available tool types for machining (tool equipment)

In the current state of TopMill the software handles 33 tool types with more than 670 milling tools, extendable
by the user to create your real tools like on the CNC mill in your workshop.

A note to our readers: You can find the description to create the respective tool data of a new tool in the
“Introduction to TopMill CNC simulator milling version 7.3”.

with sphere diameter Ø10 Ø16 until Ø32 at the large end and cutting edge angle
with 45° and 60°

Ø16 until Ø32 at the large end and cutting edge Ø4 until Ø12 and with point angle 90° and 120°
angle with 45° and 60°

with shaft diameter Ø8 until Ø20 for radii between 1mm until 20mm

6 © MTS GmbH 2010


Ø6,3 until Ø20 and with point angle 60°,90° Ø4 until Ø10 and with point angle 60°and 90°
and 120° teeth number 4

long tools with Ø4 until Ø40 short tools with Ø4 until Ø40

solid carbide milling cutter Ø2 until Ø20 long tools with Ø4 until Ø40

short tools with Ø4 until Ø40 solid carbide milling cutter Ø2 until Ø20

solid carbide milling cutter Ø2 until Ø20 60° with Ø3, Ø4 and Ø6

System TopMill FANUC 21i 7


Ø50 until Ø160 and teeth number between Ø14 until Ø32
4 until 8

Ø10,5 until Ø32,5 and cutting edge length from Ø3 until Ø30
2mm until 8mm

Ø4 until Ø20 Ø40 until Ø100 and teeth number between 6 until 10

Ø40 until Ø100 and teeth number between Ø50 until Ø160 and teeth number between
6 until 10 10 until 18

Ø2 until Ø40 Ø6 until Ø16 and point angle 90° and 120°

8 © MTS GmbH 2010


Ø2,5 until Ø11 with shaft Ø3,4 until Ø18 taps for M3 until M16 and also for fine metric threads
point angle of step 90° and 180°

for thread lead 0,5mm until 2,5mm Ø11 until Ø60 and cutting edge length from 4mm until
28mm

long drills with Ø2 until Ø20 short drills with Ø2 until Ø20

solid carbide drills Ø4,2 until Ø17,5

A note to our readers: All other available turning tool types you can find in the setup dialog “tool system
(turret equipment)”.

System TopMill FANUC 21i 9


2. Basics CNC commands for programming FANUC 21i

2.1. NC-program and NC-block structure

The NC-program obtains NC-sentences, called NC-blocks with the NC-block number.

These NC-blocks are containing words, called NC-words.

The NC-word obtains a NC-address as a big address letter with an address value.

These address values can be positive or negative decimal number with decimal point.

CNC-program structure

NC-block structure

10 © MTS GmbH 2010


2.2. Linear Interpolation G00 / G01

G0 – rapid traverse

Function: The G0 command moves a tool with the


maximum speed to the position in the workpiece
coordinate system as programmed by X- and Y-
coordinates.

NC-block: G0 X-15 Y-15

G1 – linear interpolation

Function: The tool will move with the programmed


feed- rate to the target position as programmed by X-
and Y-coordinates.

NC-block: G1 X0 Z-Y120 F…

Note: The explanation for the technical term feedrate


you can find at page12.

2.3. Circular Interpolation G02 / G03 with radius or I and J

G2 – circular interpolation clockwise with radius


(CW)

Function: The tool will move clockwise on a circular


arc at the programmed radius to the target position as
programmed by X- and Y-coordinates.

R - radius of circular arc

NC-block: G2 X15 Y0 R40 F…

System TopMill FANUC 21i 11


G3 – circular interpolation counter-clockwise with
radius (CCW)

Function: The tool will move counter-clockwise on


a circular arc at the programmed radius to the target
position as programmed by X- and Z-coordinates.

R - radius of circular arc

NC-block: G3 X65 Y40 R40 F…

The second option to program a circular arc is to enter the incremental distance between the starting point
and the circle centre in X-coordinate with the address I and in Y-coordinate with J. Following some graphics
explanations:

The direction of the arc parameter I and J with their


minus and plus signs.

12 © MTS GmbH 2010


G2 – circular interpolation clockwise with circle
centre incremental to the start point (CW)

Function: The tool will move clockwise on a circular


arc to the target position.

I - distance between the start and circle centre point


in X-coordinate
J - distance between the start and circle centre point
in Y-coordinate

NC-block: G2 X15 Y0 I-20 J0 F…

G3 – circular interpolation counter-clockwise with


circle centre incremental to the start point (CCW)

Function: The tool will move counter-clockwise on


a circular arc to the target position.

I - distance between the start and circle centre point


in X-coordinate
J - distance between the start and circle centre point
in Y-coordinate

NC-block: G3 X65 Y40 I0 J-20 F…

2.4. Tool call command G43 / G44

T – calling a tool

Function: The command T calls a tool in a selected magazine position with the codes H and D for tool offset.

System TopMill FANUC 21i 13


NC-blocks:

N35 T08 M06

N40 S…. F…. M…

N45 G43 G0 Z5 H08 (tool length offset call)

N50 G0 X… Y…

N55 G41 G1 X-15 Y-15 D08 (tool radius offset call)

2.5. Constant spindle speed G97

1
G97 – constant spindle speed (min- ) Function: With G97 all S values are in rev./min).

NC-block: G97 S… The S value is depending on the diameter of the milling


tool for the specified processing.

2.6. Feedrate G94 / G95

G94 – Feedrate F in mm per minute

Function: The command G94 serves to program the


feedrate. The unit of measurement is millimetres per
minute.

NC-block: G94 F…

G95 – Feedrate F in mm per revolution

Function: The command G95 serves to program the


feedrate per revolution. The measuring unit is milli-
metres.

NC-block: G95 F…

14 © MTS GmbH 2010


2.7. Reference position G28 / G30 P2 - P4

G28, G30 P2 – P4 – reference position

Function: With G28 the tool moves to a fixed position


on a machine tool with rapid traverse.
For example the G28 position is used as a position at
which tools are automatically changed.
Up to four reference points can be specified on a
machine and their coordinates are adjusted in the
parameters No. 1240 to 1243.

X.. Y… Z…. - intermediate position coordinates

NC-block: G28 X... Y… Z…

2.8. Auxiliary functions M

The command types of auxiliary functions are diverse function for specifying spindle start, spindle stop
program end, and so on. All auxiliary functions are M – code commands.

M0 - programmed stop All operations, for example spindle rotation or coolant,


stop temporarily.
NC-block: M0
To continue the program you need only to press the
Function: After the execution of a block which contains NC-start button.
the command M00, the program execution is stopped.
This function allows the operator to gauge the work-
piece, remove the chips or to manually change the
tool.

M1 - optional stop After the execution of a block which contains the


command M01, all operations, for example spindle
NC-block: M1 rotation or coolant, stop temporarily.

Function: If the optional stop function on the machine The program can be restarted by pressing the NC-
operation panel is turned on, the program execution is start button.
stopped in the same way as M00.
If the optional stop switch is off, the command M01 is
ignored. The operation proceeds to the next block.

System TopMill FANUC 21i 15


The viewing direction for spindle rotation.

Function: The sense of rotation is determined as


seen from the drive, id est. in the line of view of the
positive Z-axis.

M3 - activate spindle in counter clockwise rotation


(CCW)

Function: The command M03 activates the spindle


rotation in the clockwise direction.

NC-block: M3…

M4 - activate spindle in counter clockwise rotation


(CCW)

Function: The command M04 activates the spindle


rotation in the counter clockwise direction.

NC-block: M4…

M5 – spindle stop

Function: The command M05 stops the spindle


rotation.

NC-block: M5…

16 © MTS GmbH 2010


M8 - activate coolant

Function: The command M08 activates the coolant


pump.

NC-block: M08…

Note: There are machines were a second coolant


pump can be activated by the command M7.

M9 – deactivate coolant Function: The command M09 deactivates the coolant


pump.
NC-block: M9…

M30 – main program end with resetting Function: This command informs the control system
that the current program run has been completed.
NC-block: M30
The spindle and the coolant pump are deactivated and
the automatic program run is terminated.

The command M30 performs a reset to the program


begin. The command M02 has the same function as
the command M30.

M98 – subprogram call Function: When machining of the same contour or


pattern appears at many portions of a program, a
NC-block: M98 P4321 separated program is created. This is called as
subprogram.
The main program calls the subprogram O4321 to
activate for example a contour macro. When execution of the subprogram is finished, the
sequence of work returns to the main program

Function: A subprogram call can have up to 999


repetitions.

A subprogram can call one another subprogram.

Subprogram calls can be nested up to four levels

M99 – subprogram end Function: This command informs the control system
that the called subprogram run has been completed.
NC-block: M99

System TopMill FANUC 21i 17


3. Cutter radius compensation (CRC)

3.1. The path of tool the tool middle point in milling

In computing the tool motion the control system assumes the movement of the theoretical middle point of the
milling tool along the programmed contour.

Every time the tool executes a programmed movement which is shifted away from the real contour with the
value of the tool radius.

The deviations from the desired contour and the corresponding dimensions are unavoidable, because the
radius middle point creates the contour.

To see the effects of the tool radius and to see the difference between the radius middle point and the actual
needed contour creating point we can investigate workpieces with the function for quality analysis in TopMill
which is called <Measure/3D>.

18 © MTS GmbH 2010


3.2. Cutter radius compensation with G41/G42

When cutter radius compensation is activated with the command G41/G42, the control system computes the
path of the centre of the tool radius, equidistant to the contour, accounting for the radius of the current tool.

If the cutter radius compensation is selected the motion of the tool radius centre goes on an offset path
equidistant to the contour, i.e. the actual cutting point moves exactly along the programmed contour
around the workpiece.

By activating the cutter radius compensation, only the workpiece contour points are programmed and the
control must be informed whether the tool shall move left or right of the programmed contour.

So the control has to be informed that the tool takes place on the left with the command G41 or right with
command G42 of the programmed contour.

The qualifications left or right apply to the direction in which the tool travels along the contour (direction
of the feedrate).

G41: Compensation to the left of the contour (in the cutting direction)

Function: The command of the NC-block specifying G41 should be G00 or G01. When G42 is
specified by the commands G02 or G03 an alarm message is displayed.
G41 is also called downcut or climb milling.

NC-block: G41 G01 X... Y...

System TopMill FANUC 21i 19


G42: Compensation to the right of the contour (in the cutting direction)

Function: The command of the NC-block specifying G42 should be G00 or G01. When G42 is
specified by the commands G02 or G03 an alarm message is displayed.
G42 is also called upcut or conventional milling

NC-block: G42 G01 X... Y...

20 © MTS GmbH 2010


4. Canned cycles

4.1. General explanations for canned cycles

Function: Canned cycles make it easier for the programmer to create programs.

With canned cycles often used operations in can be specified in a single NC block with a G code – without
these canned cycles normally more than one NC block is required and so the canned cycles can shorten
programs.

A canned cycle consists of a sequence of five operations:

• rapid traverse positioning of axes X and Y – 1


• rapid traverse up to point R level – 2
• hole machining – 3
• operation at the bottom of a hole – 4
• retraction to point R – 5(1) or point SP – 5(2)

4.2. Travel distance along the drilling axis G90 / G91

G90 – absolute command

Function: With the command G90 the parameters R and Z are absolute values in distance to the workpiece
zero point coordinate.

NC-block: G90 G81 X … Y… Z-12 R+3 F…

System TopMill FANUC 21i 21


G91 – incremental command

Function: With the command G90 the parameters R and Z are absolute values in distance to the workpiece
zero point coordinate.

NC-block: G91 G81 X … Y… Z-15 R-12 F…

22 © MTS GmbH 2010


A note to our readers: You can find other detailed information to program G90 and G91 in the chapter:
“5.3. Absolute and incremental programming with G90 / G91”.

4.3. Return point level G98 / G99

Function: When the tool is reaching the bottom of a hole the tool may be returned to the point R or to the initial
level point SP (start point).

G98 – return to initial level

Function: With the command G98 the tool moves up from the bottom of the hole to the initial level SP in
Z coordinate at the end of the cycle.

NC-block: G98 G81 X … Y… Z-12 R+3 F…

System TopMill FANUC 21i 23


G99 – return to point R level

Function: With the command G98 the tool moves up from the bottom of the hole to the initial level SP in
Z coordinate at the end of the cycle.

NC-block: G99 G81 X … Y… Z… R… F…

24 © MTS GmbH 2010


4.4. Canned cycles with repetitions in G91 mode

Function: To repeat holes with equally distances the cycle can specify the number of repetitions with
parameter K.

K is active only within the NC block where it is specified and the position of the first hole needs incremental
mode programming with G91.

If the parameter K is specified in absolute mode G90, the drilling cycle works again on the same coordinate
position.

NC-block: G0 X0 Y0 Z5

G99 G91 G81 X20 Y20 Z-20 R-2 K4 F300

4.5. Deactivating commands for canned cycles

Function: The code G80 cancelled a canned cycle in a program. Also a group 01 G code like G00, G01, G02
and G03 deactivate a canned cycle.

NC-block: G80

System TopMill FANUC 21i 25


4.6. High-speed peck drilling cycle G73

N…G98 (G99) G73 X… Y… Z… R… Q… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
Q - depth of cut for each cutting infeed
F – cutting feedrate
K – number of repetitions (only with G91)

Applications: deep drill holes, material with bad cutting property

Function: The drill dips into the workpiece for the infeed value Q and drives back 1mm to break the chips
(intermitted infeed).
It dips in again etc. until the end depth is reached. At the end the tool retracts with rapid speed.

The retraction distance value for chip breaking is adjusted by machine parameter No. 5114 – usually 1
or 2mm.

26 © MTS GmbH 2010


4.7. Left handed tapping cycle G74

N…G98 (G99) G74 X… Y… Z… R… P… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
P – dwell time on the thread ground
F – lead of the thread (cutting federate)
K – number of repetitions (only with G91)

Applications: for tapping left-hand threads

Function: The tapping is performed by turning the spindle counter clockwise and when the bottom of the
thread has been reached, the spindle is turning clockwise for retraction.

Feedrate overrides are deactivated during left-hand tapping and a feed hold does not stop the spindle until the
return operation of the tap is completed.

System TopMill FANUC 21i 27


4.8. Drilling cycle, spot drilling G81

N…G98 (G99) G81 X… Y… Z… R… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
F – cutting feedrate
K – number of repetitions (only with G91)

Applications: short drill holes, material with good cutting property

Function: This cycle is used for normal drilling. The drill tool cuts down to the end depth with feedrate and
retracts from the bottom

28 © MTS GmbH 2010


4.9. Drilling cycle with dwell G82

N…G98 (G99) G82 X… Y… Z… R… P… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
P – dwell time on the thread ground
F – cutting feedrate
K – number of repetitions (only with G91)

Applications: short drill holes, material with good cutting property

Function: This cycle is used for normal drilling. The drill tool cuts down to the end depth with feedrate and
dwells turning to clean the hole ground.

After dwelling it retracts from the bottom with rapid speed.

The cycle G82 is used to machine drill holes more accurately with respect to depth as G81.

System TopMill FANUC 21i 29


4.10. Peck drilling cycle G83

G83 - variant 1: chip removing to initial level point SP (start point)

N…G98 G83 X… Y… Z… R… Q… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
Q - depth of cut for each cutting infeed
F – cutting feedrate
K – number of repetitions (only with G91)

Applications: deep drill holes, soft material with long chips

Function: The drill dips into the workpiece for the infeed value Q and drives back to the start plane with G98
or to the withdrawal plane with G99. So the cycle breaks chips and removes it from the hole.

Than the tool traverses with rapid speed until 1mm over the previous drilling depth and dips in again for the
infeed Q so often, until the end depth is reached.

At the end the tool retracts with rapid speed.

The retraction distance value for chip breaking is adjusted by machine parameter No. 5114 – usually 1
or 2mm.

30 © MTS GmbH 2010


G83 - variant 2: chip removing to R point level (withdrawal plane)

N…G99 G83 X… Y… Z… R… Q… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
Q - depth of cut for each cutting infeed
F – cutting feedrate
K – number of repetitions (only with G91)

System TopMill FANUC 21i 31


4.11. Tapping cycle G84

N…G98 (G99) G84 X… Y… Z… R… P… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
P – dwell time on the thread ground
F – lead of the thread (cutting federate)
K – number of repetitions (only with G91)

Applications: for tapping right-hand threads

Function: The tapping is performed by turning the spindle clockwise and when the bottom of the thread has
been reached, the spindle is turning counter clockwise for retraction.

Feedrate overrides are deactivated during right-hand tapping and a feed hold does not stop the spindle until
the return operation of the tap is completed.

32 © MTS GmbH 2010


4.12. Reaming (Boring) cycle G85

N…G98 (G99) G85 X… Y… Z… R… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
F – cutting feedrate
K – number of repetitions (only with G91)

Applications: reaming a drill hole

Function: The tool traverses down to the end depth with feedrate and retracts up to the point R level with
the same feedrate.

Depending on G98 the tool retracts with rapid speed from point R level to the initial level point SP.

System TopMill FANUC 21i 33


4.13. Reaming (Boring) cycle with spindle stop G86

N…G98 (G99) G86 X… Y… Z… R… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
F – cutting feedrate
K – number of repetitions (only with G91)

Applications: reaming cycle with spindle stop at the hole ground

Function: The tool traverses down to the end depth with federate. At the hole ground the spindle stops and
the tool retracts with rapid speed.

34 © MTS GmbH 2010


4.14. Reaming (Boring) cycle with dwell G89

N…G98 (G99) G89 X… Y… Z… R… P… F… K…

NC-block: X/Y - hole position coordinates


Z - absolute (with G91 incremental) drilling depth
R - absolute (with G91 incremental) value of the withdrawal plane
P – dwell time on the hole ground
F – cutting feedrate
K – number of repetitions (only with G91)

Applications: reaming a drill hole with dwell time

Function: The tool traverses down to the end depth with feedrate and dwells on the hole ground. The tool
retracts up to the point R level with the same feedrate.

Depending on G98 the tool retracts with rapid speed from point R level to the initial level point SP.

System TopMill FANUC 21i 35


5. Functions to simplify programming

Chamfering and vertex rounding values can be programmed by directly inputting these values.
They can be inserted automatically between the following geometrical elements:

• between linear interpolation and linear interpolation blocks


• between linear interpolation and circular interpolation blocks
• between circular interpolation and linear interpolation blocks
• between circular interpolation and circular interpolation blocks

Note: The shortcut “IP” stands for intersection point.

5.1. Chamfering at the crossing of two elements

C – chamfer between arbitrary lines

Function: A chamfer can be pasted if the distance


from the virtual (IP) corner point to the start point (SP)
and end point (EP) is programmed.

The virtual corner point is the corner point that would


be existed, when chamfering were not performed.

NC-block: G1 X…Y… ,C… (IP)

G1 X… Y… (EP)

5.2. Rounding at the crossing of two elements

R – rounding between arbitrary lines

Function: For rounding you have to pay attention for


the same functionality like described by chamfering.

NC-block: G1 X…Y… ,R…

G1 X… Y… (EP)

36 © MTS GmbH 2010


5.3. Absolute and incremental programming with G90 / G91

There are two ways to program travels of tools, the absolute command G90 and the incremental command
G91.

In the absolute command G90 the coordinate value of the target position is programmed.

By incremental programming with G91 the move distance between the start and target point is pro-
grammed, so we can say, that with the incremental command G91 you can specify the distance from
the previous tool position to the next tool position.

G90 – absolute coordinates programming

G91 – incremental coordinates programming

Function: In order to enter the right direction of the tool


movement with U and W the values have minus or
plus signs.

NC-block absolute: G90 G1 X+20 Y+10

NC-block incremental: G91 G1 X-80 Y-90

5.4. Programming with inch / metric conversation G20 / G21

The G code must be specified in an independent NC block before setting the coordinate system at the
beginning of a program.

The unit system for the following values are changed after inch / metric conversation:

• feedrate command by F code


• positional command for axis X, Y and Z in G90 and G91 mode
• workpiece zero point value
• tool offset value

G20 – inch input

G21 – metric input

System TopMill FANUC 21i 37


5.5. Scaling and mirror function G51

G51 – scaling up or down and mirror image


(negative sign with micron value)

Function: A programmed shape can be magnified or


reduced (scaling)-not working in TopMill.
Otherwise, when a negative magnification is specified,
a mirror image is applied- it’s working in TopMill.

I-1000 J+1000 - mirror in X axis with same size


I+1000 J-1000 – mirror in Y axis with same size
I-1000 J-1000 – mirror in X and Y axis with same size

NC-block: G51 I-1000 J-1000

G50 – cancel scaling and mirror Function: The commands G51 and G50, used to
cancel scaling and mirror, may be specified in a
NC-block: G50 separate NC block which contains no other
commands.

5.6. Local coordinate system G52

G52 – local coordinate system

Function: With G52 the actual coordinate zero point


can be shifted for the values X, Y and Z.
With this function a sub coordinate system to the
existing coordinate system (G54-G59) can be created.

G52 cancels the tool offset temporary in cutter


compensation. Tool move commands immediately
after the G52 NC block need to be in absolute mode.

NC-block: G52 X… Y… Z…

G52 – cancel local coordinate system Function: The commands G52 is also used to cancel
the local coordinate system
NC-block: G50 X0 Y0 Z0
.

38 © MTS GmbH 2010


5.7. Coordinate system rotation G68

G68 – coordinate system rotation

Function: A programmed shape can be rotated.


Further, when there is a pattern comprising some
identical shapes in the position rotated from a shape,
the time required for programming and the length of a
program can be reduced by creating a subprogram of
a shape and calling it after rotation with 68.

X / Y - centre of rotation
R - angle of rotation

NC-block: G68 X… Y… R…

G69 – cancel rotation Function: The G69 command, used to cancel coor-
dinate system rotation, may be specified in an NC
NC-block: G69… block which contains other commands also.

A note to our readers for the following program examples: To get detailed information and introduction about:

• handling with TopMill CNC simulator milling,


• setup dialog,
• NC editor,
• different simulation modes in MTS,
• measuring and inspection of workpieces,
• tools in MTS administration and
• dialog programming…

please read the “Introduction to TopMill CNC simulator turning version 7.3”.

System TopMill FANUC 21i 39


6. Example 1 – practise G codes, subprogram technology and canned cycles

6.1. Technical drawing Example 1

40 © MTS GmbH 2010


6.2. Setup layout for blank and clamping

Blank dimension: 100 mm x 100 mm x 27 mm - unalloyed construction steel (S235 JR + C)

System TopMill FANUC 21i 41


6.3. Tool equipment for Example 1

face end mill Ø80 mm end mill rough HSS short Ø40 mm

• T01 • T02
• vc= 200 m/min • vc= 50 m/min
• fz= 0.1 mm • fz= 0.1 mm
• z=6 • z=6
• R=40 mm • R=20.5 mm

end mill rough HSS short Ø20 mm

• T03
• vc= 50 m/min
end mill finish HSS short Ø40 mm
• fz= 0.1 mm
• z=4
• T04
• R=10.5 mm
• vc= 70 m/min
• fz= 0.08 mm
• z=4
• R=20 mm

end mill rough finish SC Ø12 mm


end mill finish HSS short Ø20 mm
• T06
• T05 • vc= 150 m/min
• vc= 70 m/min • fz= 0.05 mm
• fz= 0.05 mm • z=4
• z=4 • R=6.5 mm
• R=10 mm

42 © MTS GmbH 2010


twist drill Ø8.5 mm

spotting drill tool shank diameter Ø12 mm • T08


• point angle 118°
• T07 • vc= 40 m/min
-1
• vc= 30 m/min • n= 1500 min
-1
• n= 795 min • F= 0.1mm – 0.15mm
• F= 0.1mm – 0.15mm • M3= rotation direction
• M3= rotation direction

tap M10
Angular cutter typ B Ø16 mm x 4 mm
• T09
• T11
• vc= 15 m/min
-1 • vc= 50 m/min
• n= 470 min
• fz= 0.05 mm
• F= 1.5mm (lead of threading)
• z=6
• M3= right hand threading
• angle= 45°
• R=4.5 mm

twist drill Ø6 mm

• T12
• point angle 118° twist drill Ø19 mm
• vc= 40 m/min
• n= 2100 min
-1 • T13
• F= 0.1mm • point angle 118°
• M3= rotation direction • vc= 40 m/min
-1
• n= 670 min
• F= 0.15mm
• M3= rotation direction

System TopMill FANUC 21i 43


end mill finish HSS short Ø12 mm

• T14
• vc= 70 m/min
• fz= 0.06 mm
• z=4
• R=6 mm

44 © MTS GmbH 2010


6.4. Setup dialog for TopMill

In the following example program we use the knowledge about canned cycles, also the kind of programming
with subprogram technology and coordinate system rotation.

The setup of the workpiece starts with the setup dlg. File in TopMill.

To start now with Exercise 1 we open the main menu and click on <Setup dlg. File> or press in order to
access the setup dialog menu.

The setup dialog as the begin of every program has always the same dialog boxes and the are:

• general information
• workpiece
• workpiece clamping
• zero register and
• tool system.

Please enter the highlighted “General Information”:

System TopMill FANUC 21i 45


Please enter the highlighted values for “Workpiece” for workpiece type, length, width and height:

46 © MTS GmbH 2010


Please enter in the highlighted “Workpiece clamping” the clamping device type, vise with vise jaws, type of
chuck, clamping orientation, chucking depth, parallel underlay and choose the right workpiece position ZMT in
the pull down menu:

System TopMill FANUC 21i 47


Please enter the highlighted “Zero register” with specification of the zero offset value and blank allowance:

48 © MTS GmbH 2010


Please exchange the tools in the highlighted “Tool system” and click on <OK> to create the setup sheet:

As next we create the program for Exercise 1 with zero point, tool calls, technology data for the tools and
cycles.

Also we practise the contour description with subprogram technology with repetitions and coordinate system
rotation.

Following it is necessary to change in the <NC-editor> mode.

System TopMill FANUC 21i 49


6.5. Program input Example 1 (NC-editor mode)

In the opened NC-editor it is possible now to enter the program line by line with the help of dialog
programming.

work step 1 : face cutting the workpiece height 25 mm

Starting with the zero point call of the workpiece, we must enter the tool exchange. In this example we are
working at first with a face end mill with a cutting head of Ø80 mm. We cut 2 mm of the blank surface to
create the finished surface Z=0 coordinate.

original program sentences comments to the current line

O0001 main program number

N1 G54 activate workpiece zero point

N2 T1 M6 tool call

N3 G97 S790 G94 F480 M3 spindle speed, feedrate and tool rotation direction

N4 G43 G0 Z10. H1 rapid traverse with safety distance in Z coordinate and


activating the tool length compensation

N5 G0 X-35 Y-95 rapid traverse with safety distance for face cutting in X
and Y coordinate

N6 G0 Z0 start point at finished surface Z coordinate

N7 G1 Y95 first cut 2 mm over half workpiece width

N8 G0 X35 rapid traverse for starting the second cut

N9 G1 Y-95 second cut 2 mm over half workpiece width

N10 G28 G91 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

machining step diagram during face cutting

50 © MTS GmbH 2010


work step 2 : rough cutting the hexagon contour

Next we have to mill the hexagon. To produce a roughly milled hexagon we are using a modified correction
value of tool number 2 with a cutting head of 40 mm and a radius correction value of 20.5 mm.
The result is an allowance with 0.5 mm on the border of the contour to give the possibility for finishing the
border later on.
We are cutting the depth of the hexagon with 3 infeeds in the depth and therefore we create a subprogram.
This subprogram is running 3 times.

N11 T2 M6 tool call

N12 S400 F240 M3 spindle speed, feedrate and tool rotation direction

N13 G90 programming in absolute mode

N14 G43 G0 Z10. H2 rapid traverse with safety distance in Z coordinate and
activating the tool length compensation

N15 G0 X80 Y0 rapid traverse with safety distance for hexagon cutting
in X and Y coordinate

N16 Z0 start point at finished surface Z coordinate

N17 M98 P31111 subprogram call with 3 repetitions

N18 G28 G91 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

The best way to enter a subprogram is to write the command M30 at the end of the main program.
Behind this command you can enter an arbitrary number of subprograms.
The advantage of this kind of programming is that you can see all inputted programs in the editor mode of
TopMill with a fast look at the screen.

%1111 subprogram identification (without leading zeros)

O1111 (roughing the hexagon) subprogram number

N161 G91 Z-3.2 incremental infeed step in Z coordinate

N162 G90 programming in absolute mode

N163 G41 G1 X37. Y0. D2 linear interpolation to the contour point P1 of the
hexagon and activating the tool radius compensation

N164 X18.5 Y-32.043 linear interpolation to the contour point P2

N165 X-18.5 linear interpolation to the contour point P3

N166 X-37 Y0 linear interpolation to the contour point P4

N167 X-18.5 Y32.043 linear interpolation to the contour point P5

System TopMill FANUC 21i 51


N168 X18.5 linear interpolation to the contour point P6

N169 X37 Y0 linear interpolation to the contour point P1

N170 G40 X80 Y0 cancel cutter radius compensation and move to the
X and Y start point like in the main program

N171 M99 subprogram end

machining step diagram during rough cutting the


hexagon

work step 3 : finishing the hexagon contour

For the next work step we enter the same contour like in roughing and for softly approaching and departure
we insert circular interpolations with radii of 30 mm.

N19 T4 M6 tool call

N20 S517 F248 M3 spindle speed, feedrate and tool rotation direction

N21 G90 programming in absolute mode

N22 G43 G0 Z10. H4 rapid traverse with safety distance in Z coordinate and
activating the tool length compensation

N23 X80 Y0 rapid traverse with safety distance for hexagon cutting
in X and Y coordinate

N24 Z0 start point at finished surface Z coordinate

N25 M98 P11112 subprogram call

N26 G28 G91 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

52 © MTS GmbH 2010


%1112 subprogram identification (without leading zeros)

O1112 (finishing the hexagon) subprogram number

N172 G1 Z-10 infeed to the finishing depth in Z coordinate

N173 G90 programming in absolute mode

N174 G41 G1 X67. Y30. D4 start point for softly approaching with R30 mm to P1
and activating the tool radius compensation

N175 G3 X37 Y0 I0 J-30 circular interpolation as softly approaching with


R30 mm to the contour point P1 of the hexagon

N176 G1 X18.5 Y-32.043 linear interpolation to the contour point P2

N177 X-18.5 linear interpolation to the contour point P3

N178 X-37 Y0 linear interpolation to the contour point P4

N179 X-18.5 Y32.043 linear interpolation to the contour point P5

N180 X18.5 linear interpolation to the contour point P6

N181 X37 Y0 linear interpolation to the contour point P1

N182 G3 X67 Y-30 I30 J0 circular interpolation as softly departure away from
contour point P1 with R30 mm

N183 G40 G1 X80 Y0 cancel cutter radius compensation and move to the
X and Y start point like in the main program

N184 M99 subprogram end

machining step diagram during finishing the


hexagon

work step 4 : spot drilling for M10 threads

We use the spot drill in order to produce a chamfer on the M10 threads with an Ø11.5 mm and 90° angle.

N27 T7 M6 tool call


-1
N28 S800 M3 G95 F0.12 spindle speed, feedrate mm/min , rotation direction

N29 G90 programming in absolute mode

System TopMill FANUC 21i 53


N30 G43 G0 Z10. H7 rapid traverse with safety distance in Z coordinate and
activating the tool length compensation

N31 G0 X0 Y0 rapid traverse to the circle middle point in X and Y


coordinate

N32 G98 G90 G81 X-38.184 Y-38.184 Z-15.75 R-8. spot drilling in absolute mode with return point by
initial level

N33 X38.184 spot drilling hole 2

N34 Y38.184 spot drilling hole 3

N35 X-38.184 spot drilling hole 4

N36 G80 cancel drilling cycle

machining step diagram during spot drilling for


M10 threads

work step 6 : spot drilling to Ø6.4 mm for drill holes Ø6 mm

We continue the work with the same tool in order to make 6 spot drills to an Ø6.4 mm.

N37 G99 G90 G81 X30. Y0. Z-3.2 R2. spot drilling in absolute mode with return point by
R level

N38 M98 P51113 subprogram with five repetitions and coordinate


system rotation

N39 G69 cancel coordinate system rotation

N40 G80 cancel drilling cycle

N41 G28 G91 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

54 © MTS GmbH 2010


%1113 subprogram identification

O1113 (6 x spot drilling) subprogram number

N185 G68 G91 X0. Y0. R60. incremental coordinate system rotation with an angle
of 60°

N186 G90 X30. Y0. spot drill position in absolute mode

N187 M99 subprogram end

machining step diagram during spot drilling


Ø6.4 mm

work step 7 : peck drilling the core diameter Ø8.5 mm for M10 treads

Following we work with the peck drilling cycle G83 which has more functions than G81. With this cycle we can
set a chip breaking with the pecking depth parameter. We are practising different modes in order to use G83.

N42 T8 M6 tool call

-1
N43 S1500 F0.15 M3 spindle speed, feedrate mm/min , rotation direction

N44 G90 programming in absolute mode

N45 G43 G0 Z10. H8 rapid traverse with safety distance in Z coordinate and
activating the tool length compensation

N46 G98 G90 G83 X-38.184 Y-38.184 Z-23. Q4. R-7. spot drilling 1 in absolute mode with return point by
initial level

N47 G80 cancel drilling cycle

N48 G98 G91 G83 X76.368 Z-16. Q4. R-17. spot drilling 2 in incremental mode with return point by
initial level

N49 G80
cancel drilling cycle

N50 G99 G91 G83 Y76.368 Z-16. Q4. R-17. spot drilling 3 in incremental mode with return point by
R level

System TopMill FANUC 21i 55


N51 G80 cancel drilling cycle

N52 G98 G90 G83 X-38.184 Y38.184 Z-23. Q4. R-7. spot drilling 4 in absolute mode with return point by
initial level

N53 G80 cancel drilling cycle

N54 G28 G91 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

machining step diagram during peck drilling


core Ø8,5 mm

work step 8 : peck drilling the diameter Ø6

Now we can see the advantage of creating subprograms, because we are apply a second time subprogram
number O1113 in order to make the 6 drill holes with Ø6.4 mm like in work step 6.

N55 T12 M6 tool call


-1
N56 S2100 F0.1 M3 spindle speed, feedrate mm/min , rotation direction

N57 G90 G43 G0 Z10 H12 programming in absolute mode, rapid traverse with
safety distance in Z coordinate and activating the tool
length compensation

N58 G99 G90 G83 X30. Y0. Z-27. Q4. R2. spot drilling in absolute mode with return point by
R level

N59 M98 P51113 subprogram with five repetitions and coordinate


system rotation

N60 G69 cancel coordinate system rotation

N61 G80 cancel drilling cycle

N62 G28 G91 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

56 © MTS GmbH 2010


%1113 subprogram identification

O1113 (6 x spot drilling) subprogram number

N185 G68 G91 X0. Y0. R60. incremental coordinate system rotation with an angle
of 60°

N186 G90 X30. Y0. spot drill position in absolute mode

N187 M99 subprogram end

machining step diagram during peck drilling


6 x Ø6 mm

work step 9 : pre-drilling for slot and circular pocket with Ø19

In Fanuc 21iM control we haven’t got pocket cycles, were we can work with different feedrates for infeed and
geometry planes.
So it is usefully to make pre-drilling before cutting pockets to spare the milling tool when it dips into the
workpiece. In this case we work with G82 to see drilling with dwell time.

N63 T13 M6 tool call

-1
N64 S670 F0.15 M3 spindle speed, feedrate mm/min , rotation direction

N65 G0 X0 Y0 positioning in X and Y coordinate

N66 G90 G43 G0 Z10. H13 programming in absolute mode, rapid traverse with
safety distance in Z coordinate and activating the tool
length compensation

N67 G98 G90 G82 X0. Y0. Z-11.9 R2. P1 spot drilling in absolute mode with return point by
initial level, dwell time one second

N68 G28 G91 G0 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

System TopMill FANUC 21i 57


machining step diagram after pre-drilling
Ø19 mm

work step 10 : rough cutting the circular pocket

We are going to mill the circular pocket. To produce a roughly milled pocket we are using again a modified
correction value of tool number 3 with a cutting head of Ø20 mm and a radius correction value 10.5mm.
The depth will be cut with subprogram technology in a few of steps.

N69 T3 M6 tool call

N70 S800 F320 M3 spindle speed, feedrate and rotation direction

N71 G90 programming in absolute mode

N72 G0 X0 Y0 positioning in X and Y coordinate

N73 G43 G0 Z2 H3 rapid traverse with safety distance in Z coordinate and


activating the tool length compensation

N74 G1 Z0 start point at finished surface Z coordinate

N75 M98 P21114 subprogram with two executions

N76 G28 G91 G0 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

%1114 subprogram identification

O1114 (roughing the circular pocket) subprogram number

N188 G91 G1 Z-2.9 incremental infeed step in Z coordinate

N189 G90 programming in absolute mode

N190 G41 G1 X25 Y0 D3 linear interpolation to the pocket contour and


activating the tool radius compensation

N191 G3 X25 Y0 I-25 J0 circular interpolation full circle

N192 G40 G1 X0 Y0 cancel cutter radius compensation and move to the


X and Y start point like in the main program

N193 M99 subprogram end

58 © MTS GmbH 2010


machining step diagram after roughing the
circular pocket

work step 11 : rough cutting the slot

To create the slot in the middle of the workpiece we are using again a modified correction value of tool
number 6 with a cutting head of Ø12 mm and a radius correction value 6.5mm.
The depth will be cut also with subprogram technology in a few of steps with a solid carbide milling tool.

N77 T6 M6 tool call

N78 S3980 F795 M3 spindle speed, feedrate and rotation direction

N79 G90 programming in absolute mode

N80 G0 X0 Y0 positioning in X and Y coordinate

N81 G43 G0 Z2 H6 rapid traverse with safety distance in Z coordinate and


activating the tool length compensation

N82 G1 Z-6 start point at the circular pocket ground Z coordinate

N83 M98 P21115 subprogram with two executions

N84 G28 G91 G0 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

%1115 subprogram identification

O1115 (roughing the slot) subprogram number

N194 G91 G1 Z-2.9 incremental infeed step in Z coordinate

N195 G90 programming in absolute mode

N196 G41 G1 X10 Y0 D6 linear interpolation to the slot contour and activating
the tool radius compensation

N197 G1 Y10 linear interpolation vertical

N198 G3 X-10 Y10 I-10 J0 circular interpolation direction ccw

N199 G1 Y-10 linear interpolation vertical

N200 G3 X10 Y-10 I10 J0 circular interpolation direction ccw

System TopMill FANUC 21i 59


N201 G1 X10 Y0 linear interpolation vertical

N202 G40 G1 X0 Y0 cancel cutter radius compensation and move to the


X and Y start point like in the main program

N203 M99 subprogram end

machining step diagram during roughing the slot

work step 12 : finishing the circular pocket

For the next work step we enter the same contour like in roughing directly in the main program.

N85 T4 M6 tool call

N86 S1100 F350 M3 spindle speed, feedrate and rotation direction

N87 G90 programming in absolute mode

N88 G0 X0 Y0 positioning in X and Y coordinate

N89 G43 G0 Z2 H4 rapid traverse with safety distance in Z coordinate and


activating the tool length compensation

N90 G1 Z-6 infeed to the circular pocket ground Z coordinate

N91 G41 G1 X25 Y0 D4 linear interpolation to the pocket contour and


activating the tool radius compensation

N92 G3 X25 Y0 I-25 J0 circular interpolation full circle

N93 G40 G1 X0 Y0 cancel cutter radius compensation and move to the


X and Y start point

N94 G28 G91 G0 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

60 © MTS GmbH 2010


machining step diagram during finishing the
circular pocket

work step 13 : finishing the slot

In this work step we enter the same contour like in slot roughing directly in the main program.

N95 T14 M6 tool call

N96 S1850 F440 M3 spindle speed, feedrate and rotation direction

N97 G90 programming in absolute mode

N98 G0 X0 Y0 positioning in X and Y coordinate

N99 G43 G0 Z2 H14 rapid traverse with safety distance in Z coordinate and
activating the tool length compensation

N100 G1 Z-12 infeed to the slot ground Z coordinate

N101 G41 G1 X10 Y0 D14 linear interpolation to the slot contour and activating
the tool radius compensation

N102 G1 Y10 linear interpolation vertical

N103 G3 X-10 Y10 I-10 J0 circular interpolation direction ccw

N104 G1 Y-10 linear interpolation vertical

N105 G3 X10 Y-10 I10 J0 circular interpolation direction ccw

N106 G1 X10 Y0 linear interpolation vertical

N107 G40 G1 X0 Y0 cancel cutter radius compensation and move to the


X and Y start point

N108 G28 G91 G0 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

System TopMill FANUC 21i 61


machining step diagram during finishing the slot

work step 14 : tapping M10

For tapping we use the canned cycle G84 – right hand tapping. The feedrate is the lead of the thread.

N109 T9 M6 tool call

N110 S470 F1.5 M3 spindle speed, feedrate and rotation direction

N111 G0 X0 Y0 rapid traverse to the workpiece middle point in X and


Y coordinate

N112 G43 G0 Z10 H9 rapid traverse with safety distance in Z coordinate and
activating the tool length compensation

N113 G98 G90 G84 X38.184 Y38.184 Z-18. R-7. tapping cycle in absolute mode with return point by
initial level for tapped hole 1

N114 X-38.184 tapping cycle for tapped hole 2

N115 Y-38.184 tapping cycle for tapped hole 3

N116 X38.184 tapping cycle for tapped hole 4

N117 G80 cancel tapping cycle

N118 G28 G91 G0 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

machining step diagram during tapping M10

62 © MTS GmbH 2010


work step 15 : deburring the circular pocket – chamfer 0.2 mm x 45°

Now we are starting the burr removing on all contour elements with a chamfer 0.2 mm by 45 degrees. At first
the circular pocket.
The tool we are using is an angular cutter tool type B with a cutting head of Ø16 mm by 45 degrees. The
practical application of this tool is a changed radial offset from 4 mm to 4.5 mm to produce a chamfer not with
the bottom cutting edge (avoidance sharp edges at the chamfer). If we want to mill a chamfer 0.2mm x 45° we
have to give a depth value of 0.7 mm.

N119 T11 M6 tool call

N120 S995 F300 M3 spindle speed, feedrate and rotation direction

N121 G90 programming in absolute mode

N122 G0 X0 Y0 positioning in X and Y coordinate

N123 G43 G0 Z2 H11 rapid traverse with safety distance in Z coordinate and
activating the tool length compensation

N124 G1 Z-0.7 infeed to the Z coordinate for burr removing

N125 G41 G1 X25 Y0 D11 linear interpolation to the circular pocket contour and
activating the tool radius compensation

N126 G3 X25 Y0 I-25 J0 circular interpolation full circle

N127 G40 G1 X0 Y0 cancel cutter radius compensation and move to the


X and Y start point

machining step diagram during deburring the


circular pocket

work step 15 : deburring the circular slot – chamfer 0.2 mm x 45°

N128 G1 Z-6.7 infeed to the Z coordinate for burr removing

N129 G41 G1 X10 Y0 D11 linear interpolation to the slot contour and activating
the tool radius compensation

N130 G1 Y10 linear interpolation vertical

N131 G3 X-10 Y10 I-10 J0 circular interpolation direction ccw

N132 G1 Y-10 linear interpolation vertical

System TopMill FANUC 21i 63


N133 G3 X10 Y-10 I10 J0 circular interpolation direction ccw

N134 G1 X10 Y0 linear interpolation vertical

N135 G40 G1 X0 Y0 cancel cutter radius compensation and move to the


X and Y start point

N136 G0 Z10 rapid traverse direction Z + coordinate

machining step diagram during deburring the slot

work step 16 : deburring the hexagon – chamfer 0.2 mm x 45°

N137 X80 Y0 positioning in X and Y coordinate

N138 G1 Z-0.7 infeed to the Z coordinate for burr removing

N139 G90 programming in absolute mode

N140 G41 G1 X67. Y30. D11 start point for softly approaching with R30 mm to P1
and activating the tool radius compensation

N141 G3 X37 Y0 I0 J-30 circular interpolation as softly approaching with


R30 mm to the contour point P1 of the hexagon

N142 G1 X18.5 Y-32.043 linear interpolation to the contour point P2

N143 X-18.5 linear interpolation to the contour point P3

N144 X-37 Y0 linear interpolation to the contour point P4

N145 X-18.5 Y32.043 linear interpolation to the contour point P5

N146 X18.5 linear interpolation to the contour point P6

N147 X37 Y0 linear interpolation to the contour point P1

N148 G3 X67 Y-30 I30 J0 circular interpolation as softly departure away from
contour point P1 with R30 mm

N149 G40 G1 X80 Y0 cancel cutter radius compensation and move to the
X and Y start point like in the main program

N150 G0 Z10 rapid traverse direction Z + coordinate

64 © MTS GmbH 2010


machining step diagram during deburring the
hexagon

work step 17 : deburring the blank rectangle – chamfer 0.2 mm x 45°

N151 X70 Y70 positioning in X and Y coordinate

N152 G1 Z-10.7 infeed to the Z coordinate for burr removing

N153 G41 X50 Y50 D11 start point for linear approaching and activating the
tool radius compensation

N154 Y-50 linear interpolation vertical

N155 X-50 linear interpolation horizontal

N156 Y50 linear interpolation vertical

N157 X50 linear interpolation horizontal

N158 G40 X70 Y70 cancel cutter radius compensation and move to the
X and Y start point

N159 G28 G91 G0 Z0 reference point with an incremental distance to the


adjusted Z coordinate of 0 mm

N160 M30 main program end

machining step diagram during deburring the


blank rectangle

System TopMill FANUC 21i 65


7. Example 2 – independently exercise to practise the knowledge

7.1. Technical drawing Example 2

66 © MTS GmbH 2010


7.2. Setup layout for blank and clamping

Blank dimension: 120 mm x 120 mm x 32 mm - unalloyed construction steel (S235 JR + C)

System TopMill FANUC 21i 67


7.3. Tool equipment for Example 2

face end mill Ø80mm end mill rough HSS short Ø30mm

• T01 • T02
• vc= 200 m/min • vc= 50 m/min
• fz= 0.1 mm • fz= 0.1 mm
• z=6 • z=5
• R=40 mm • R=15.5 mm

end mill rough HSS short Ø18mm

• T04
indexable insert drill Ø32mm • vc= 50 m/min
• fz= 0.1 mm
• T03 • z=4
• vc= 150 m/min • R=9.5 mm
-1
• n= 1273 min
• F= 0.15 mm
• M3= rotation direction

end mill rough HSS short Ø10mm


end mill rough HSS short Ø14mm
• T06
• T05 • vc= 50 m/min
• vc= 50 m/min • fz= 0.08 mm
• fz= 0.1 mm • z=4
• z=4 • R=5.5 mm
• R=7.5 mm

68 © MTS GmbH 2010


end mill rough HSS short Ø6mm

• T07
• vc= 50 m/min
• fz= 0.06 mm end mill finish HSS short Ø30mm
• z=4
• R=3.5 mm • T08
• vc= 70 m/min
• fz= 0.08 mm
• z=5
• R=15 mm

end mill finish HSS short Ø10mm


end mill finish HSS short Ø14mm
• T10
• T09 • vc= 70 m/min
• vc= 70 m/min • fz= 0.06 mm
• fz= 0.08 mm • z=4
• z=4 • R=5 mm
• R=7 mm

end mill finish HSS short Ø6mm

• T11
• vc= 70 m/min
• fz= 0.05 mm spotting drill tool shank diameter Ø12mm
• z=4
• R=3 mm • T12
• vc= 30 m/min
-1
• n= 795 min
• F= 0.1mm – 0.15mm
• M3= rotation direction

System TopMill FANUC 21i 69


tap M6
twist drill Ø5 mm
• T14
• T13 • vc= 15 m/min
-1
• point angle 118° • n= 795 min
• vc= 40 m/min • F= 1mm (lead of threading)
• n= 2550 min
-1 • M3= right hand threading
• F= 0.08mm
• M3= rotation direction

deburring tool Ø4mm

Angular cutter typ B Ø16 mm x 4 mm • T15


• vc= 50 m/min
• T11 • fz= 0.05 mm
• vc= 50 m/min • z=6
• fz= 0.05 mm • angle= 90°
• z=6 • R=0.55 mm
• angle= 45°
• R=4.5 mm

70 © MTS GmbH 2010


7.4. Setup dialog for TopMill

Please enter the highlighted “General Information”:

System TopMill FANUC 21i 71


Please enter the highlighted values for “Workpiece” for workpiece type, length, width and height:

72 © MTS GmbH 2010


Please enter in the highlighted “Workpiece clamping” the clamping device type, vise with vise jaws, type of
chuck, clamping orientation, chucking depth, parallel underlay and choose the right workpiece position ZMT in
the pull down menu:

System TopMill FANUC 21i 73


Please enter the highlighted “Zero register” with specification of the zero offset value and blank allowance:

74 © MTS GmbH 2010


Please exchange the tools in the highlighted “Tool system” and click on <OK> to create the setup sheet:

Following it is necessary to change in the <NC-editor> mode.

System TopMill FANUC 21i 75


7.5. Program input Example 2 (NC-editor mode)

76 © MTS GmbH 2010


8. Example 3 – independently exercise to practise the knowledge

8.1. Technical drawing Example 3

System TopMill FANUC 21i 77


8.2. Setup layout for blank and clamping with jaw chuck

In this example we have to grip a cylindrically workpiece with a jaw chuck with three jaws. Because of the
avoidance of tool collision with the jaws we have to pay attention to the orientation of the jaw chuck.

Blank dimension: Ø120 mm x 35 mm – free cutting steel (11SMn30+C)

78 © MTS GmbH 2010


8.3. Tool equipment for Example 3

Angular cutter typ B Ø16 mm x 4 mm

face end mill Ø80mm • T11


• vc= 50 m/min
• T01 • fz= 0.05 mm
• vc= 200 m/min • z=6
• fz= 0.1 mm • angle= 45°
• z=6 • R=4.5 mm
• R=40 mm

end mill rough HSS short Ø18 mm


end mill rough HSS short Ø30mm
• T04
• T03 • vc= 50 m/min
• vc= 50 m/min • fz= 0.1 mm
• fz= 0.1 mm • z=4
• z=5 • R=9.5 mm
• R=15.5 mm

T slot cutter HSS Ø18 mm x 8 mm

• T05
• vc= 40 m/min
indexable insert drill Ø20 mm
• fz= 0.05 mm
• z=6
• T06
• R=9 mm
• vc= 150 m/min
• H=8 mm -1
• n= 2390 min
• F= 0.15 mm
• M3= rotation direction

System TopMill FANUC 21i 79


end mill rough HSS short Ø10 mm

• T07
• vc= 50 m/min end mill finish HSS short Ø30mm
• fz= 0.08 mm
• z=4 • T08
• R=5.5 mm • vc= 70 m/min
• fz= 0.08 mm
• z=5
• R=15 mm

end mill finish HSS short Ø10mm

end mill finish HSS short Ø18mm • T10


• vc= 70 m/min
• T09 • fz= 0.06 mm
• vc= 70 m/min • z=4
• fz= 0.08 mm • R=5 mm
• z=4
• R=9 mm

twist drill Ø6.8 mm


spotting drill tool shank diameter Ø12mm
• T12
• T11 • point angle 118°
• vc= 30 m/min • vc= 40 m/min
-1
• n= 795 min
-1 • n= 1870 min
• F= 0.1mm – 0.15mm • F= 0.1 mm
• M3= rotation direction • M3= rotation direction

80 © MTS GmbH 2010


tap M8
Angular cutter typ A Ø16mm x 4 mm
• T13
• vc= 15 m/min • T14
-1
• n= 600 min • vc= 50 m/min
• F= 1.25 mm (lead of threading) • fz= 0.05 mm
• M3= right hand threading • z=6
• angle= 45°
• R=7.2 mm

deburring tool Ø4mm

• T15
• vc= 50 m/min
• fz= 0.05 mm
• z=6
• angle= 90°
• R=0.55 mm

System TopMill FANUC 21i 81


8.4. Setup dialog for TopMill

Please enter the highlighted “General Information”:

82 © MTS GmbH 2010


Please enter the highlighted values for “Workpiece” for workpiece type, length, width and height:

System TopMill FANUC 21i 83


Please enter in the highlighted “Workpiece clamping” the clamping device type, chuck with three jaws, type
of chuck, clamping orientation, chucking depth and choose the right workpiece position ZMT in the pull down
menu:

84 © MTS GmbH 2010


Please enter the highlighted “Zero register” with specification of the zero offset value and blank allowance:

System TopMill FANUC 21i 85


Please exchange the tools in the highlighted “Tool system” and click on <OK> to create the setup sheet:

Following it is necessary to change in the <NC-editor> mode.

86 © MTS GmbH 2010


8.5. Program input Example 3 (NC-editor mode)

System TopMill FANUC 21i 87

You might also like