You are on page 1of 184

CNC-Milling

MTS TeachWare Student’s Book

MTS Mathematisch Technische Software-Entwicklung GmbH • Kaiserin-Augusta-Allee 101 • D-10553 Berlin


Phone: +49 / 30 / 349 960 0 • Fax: +49 / 30 / 347 960 25 • World Wide Web: http://www.mts-cnc.com • email: mts@mts-cnc.com
CNC-Milling

MTS TeachWare Student’s Book

© MTS Mathematisch Technische Software-Entwicklung GmbH

Kaiserin-Augusta-Allee 101 • D-10553 Berlin

Phone: +49 / 30 / 349 960 0

Fax: +49 / 30 / 349 960 25

eMail: mts@mts-cnc.com

World Wide Web: http://www.mts-cnc.com

Created by Bernd Koch & Bernd Mrosko, 1998.

All rights reserved, including photomechanical reproduction and storage on electric media
Contents

Contents

1 Introduction into working with the CNC simulator milling..........................................7


1.1 System overview................................................................................................................................... 7
1.1.1 CNC milling machine............................................................................................................... 8
1.1.2 CNC control........................................................................................................................... 10
1.1.3 Collision monitoring ............................................................................................................... 10
1.2 Operating modes ................................................................................................................................ 11
1.2.1 Setup mode ........................................................................................................................... 11
1.2.2 Programming Mode............................................................................................................... 13
1.2.3 Automatic mode .................................................................................................................... 15
1.3 Screen representation and manipulation............................................................................................ 16
1.3.1 System start .......................................................................................................................... 16
1.3.2 Screen representation ........................................................................................................... 17
1.3.3 Menu structure ...................................................................................................................... 18
1.3.4 Data management................................................................................................................. 19
1.4 Special functions of the software........................................................................................................ 21
1.4.1 3D representation.................................................................................................................. 21
1.4.2 Programming aids ................................................................................................................. 22
1.4.3 Setting-up automatics, set-up sheet...................................................................................... 23
1.4.4 Status management .............................................................................................................. 24

2 Coordinate systems and Zero point shifts .................................................................25


2.1 Machine coordinate system................................................................................................................ 25
2.1.1 Activating the machine coordinate system............................................................................ 26
2.1.2 Select the Machine coordinate system G53.......................................................................... 26
2.2 Work part coordinate system ............................................................................................................. 27
2.2.1 Define the work part coordinate system................................................................................ 28
2.2.2 Setting the work part coordinate system with the command G92 ......................................... 28
2.2.3 Setting the work part coordinate system with the commands G54 - G59 ............................. 30
2.3 Specifying the necessary location of the work part zero point............................................................ 33

3 NC commands for programming „FANUC 16 M“ .......................................................39


3.1 Absolute value input and incremental value input G90/G91............................................................... 39
3.2 Linear Interpolation and Machine Functions....................................................................................... 41
3.2.1 Rapid traverse G00 ............................................................................................................... 41
3.2.2 Linear Interpolation in Slow Feed Motion G01 ...................................................................... 43
3.2.3 Going to the reference point G28.......................................................................................... 45
3.2.4 Return from the reference point G29 .................................................................................... 46
3.2.5 Dwell time G04 ...................................................................................................................... 47
3.2.6 Exact Stop G09 ..................................................................................................................... 47

© MTS GmbH • Berlin 3


Contents

3.2.7 Switching to dimension unit inch G20.................................................................................... 48


3.2.8 Switching to dimension unit millimeter G21........................................................................... 48
3.2.9 Feedrate F in mm per minute G94 ........................................................................................ 49
3.2.10 Feedrate F in mm per revolution G95 ................................................................................. 49
3.2.11 Spindle speed S .................................................................................................................. 49
3.2.12 Programmed Stop M00 ....................................................................................................... 50
3.2.13 Optional Stop M01............................................................................................................... 50
3.2.14 Program End M02 ............................................................................................................... 51
3.2.15 Program End with Resetting M30....................................................................................... 51
3.2.16 Activate spindle in clockwise rotation M03 ......................................................................... 52
3.2.17 Activate spindle in counter - clockwise rotation M04 .......................................................... 52
3.2.18 Deactivate spindle M05 ....................................................................................................... 52
3.2.19 Mounting a tool M06 ............................................................................................................ 52
3.2.20 Activate Coolant 1 M07 ....................................................................................................... 53
3.2.21 Activate Coolant 2 M08 ....................................................................................................... 53
3.2.22 Deactivate Coolant M09 ...................................................................................................... 53
3.2.23 Mirror in the X-Axis M21 ...................................................................................................... 54
3.2.24 Mirror in the Y-Axis M22 ...................................................................................................... 54
3.2.25 Cancel mirror functions M23 ............................................................................................... 54
3.2.26 Activate Feedrate Override dial M48 ................................................................................... 55
3.2.27 Cancel Feedrate Override dial M49..................................................................................... 55
3.2.28 Subprogram Call M98.......................................................................................................... 56
3.2.29 End of Subprogram M99 ..................................................................................................... 56

4 Interpolation with cutter radius compensation ........................................................57


4.1 Selection of machining planes G17-G19 ............................................................................................ 57
4.2 Circular interpolation ........................................................................................................................... 58
4.2.1 Circular Interpolation Clockwise G02 .................................................................................... 58
4.2.2 Circular Interpolation Counter-Clockwise G03 ...................................................................... 60
4.3 Machining Plane, Sense of Rotation, Coordinates of a Circular Arc .................................................. 62
4.4 Cutter radius compensation................................................................................................................ 70
4.5 Tool length compensation................................................................................................................... 79
4.6 Coordinate rotation ............................................................................................................................. 82
4.7 Cancel coordinate rotation.................................................................................................................. 82

5 Cycles............................................................................................................................ 85
5.1 Function and use of cycles on a CNC milling machine....................................................................... 85
5.2 Canned cycles (drilling functions) ....................................................................................................... 87
5.2.1 Definition................................................................................................................................ 87
5.2.2 Survey.................................................................................................................................... 91
5.2.3 Application ............................................................................................................................. 92
5.2.4 high-speed peck drilling cycle G73........................................................................................ 94
5.2.5 left-hand tapping cycle G74................................................................................................... 98

4 MTS TeachWare • CNC-Milling • Student’s Book


Contents

5.2.6 fine boring cycle G76........................................................................................................... 102


5.2.7 drilling cycle, spot drilling cycle G81.................................................................................... 104
5.2.8 drilling cycle, counterboring cycle G82 ................................................................................ 108
5.2.9 peck drilling cycle G83 ........................................................................................................ 112
5.2.10 tapping cycle G84.............................................................................................................. 116
5.2.11 boring cycle (reaming) G85 ............................................................................................... 120
5.2.12 boring cycle with retraction in rapid traverse G86 ............................................................. 124
5.2.13 boring cycle / back boring cycle G87................................................................................. 128
5.2.14 boring cycle G88 ............................................................................................................... 130
5.2.15 boring cycle with dwell time (reaming) G89....................................................................... 132
5.2.16 A program example FANUC 16M with explanations......................................................... 136
5.3 Macros.............................................................................................................................................. 141
5.3.1 Definition ............................................................................................................................. 141
5.3.2 Survey ................................................................................................................................. 143
5.3.3 Application........................................................................................................................... 144
5.3.4 finishing inside of circle macro P9110................................................................................. 145
5.3.5 deep cutting of circular pocket macro P9120...................................................................... 147
5.3.6 finish cutting inside of square macro P9130 ....................................................................... 149
5.3.7 deep cutting of square pocket macro P9140 ...................................................................... 151
5.3.8 bolt hole circle macro P9180............................................................................................... 153
5.3.9 positioning on arc macro P9190.......................................................................................... 156
5.3.10 matrix maching macro P9200 ........................................................................................... 159

6 Subprogram technology.............................................................................................162
6.1 Purpose, function and use of subprograms of a CNC milling machine............................................ 162
6.1.1 Subprogram Call M98 ......................................................................................................... 162
6.1.2 End of Subprogram M99 ..................................................................................................... 162
6.2 Subprograms with incremental or absolute input value.................................................................... 163
6.3 Nesting several subprograms........................................................................................................... 167

7 Workshop-Oriented Programming ............................................................................169


7.1 Introduction....................................................................................................................................... 169
7.2 Example:........................................................................................................................................... 170
7.3 Exercise 1 : counter-form ................................................................................................................. 177
7.4 Exercise 2 : stamping ....................................................................................................................... 181

© MTS GmbH • Berlin 5


Introduction into working with the CNC simulator milling

1 Introduction into working with the CNC simulator milling


1.1 System overview
In the first chapter you find a general overview of the system configuration.

The minimum hardware requirement for a single CNC Simulator workplace is:
• a personal computer with a hard disk and diskette drive,
• a monitor,
• a PC keyboard and additionally
• a mouse.
This can be supplemented by a printer for hardcopies and NC- program listings

Figure 1
The hardware for the CNC Simulator workplace.

The CNC Simulator can be used with the input media keyboard and mouse. A PC keyboard is basically all
you need to use the CNC Simulator. A mouse can be used to activate the function keys. You select all pro-
gram functions with the function keys and enter machine commands and NC program blocks as sequences
of digits and letters.

The function keys displayed on the screen are usually labeled with a short text indicating the subsequent
editing steps.

Figure 2
CNC Turning, Main menu, Function keys with text notes for the processing options available
as an alternative to text labels on the function keys, CNC symbols and other icons can be displayed.

© MTS GmbH • Berlin 7


Chapter 1

1.1.1 CNC milling machine


The CNC Milling Simulator simulates a 3-axis milling machine with vertical spindle position. In the CNC
simulation all positioning and feed movements appear to be made by the tool carrier, so the machine table
and the work part have a fixed position and the tool moves in all three coordinates.

tool moves in Y

Machine zero table moves in X and Z


Reference point

Turret reference point

Tool reference point

Workpiece Zero

Tool change point

Figure 3
Schematic of the machine configuration

In the MAKINO CNC Milling machine the tool moves in Y- and Z-direction and the machine table moves in X-
direction.

The work part can be clamped by using:·


• jaws,
• magnetic plate·or
• modular clamping.

Figure 4 Figure 5
jaws modular clamping

The magazine holds may up to 99 tool positions (pockets) in which the tools are inserted from the tool man-
ager. In the actual configuration we use 16 tools.

8 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

The following tool types are available in the Tool Manager:

End mills Face milling cutters Reamers Step drills

Slot milling tools Radius cutters Taps Core drills

T-slot cutters Corner tool (Type A) Drills Concave type cutters

Shell end mills Corner tool (Type B) Insert tip drills Side milling tools

© MTS GmbH • Berlin 9


Chapter 1

1.1.2 CNC control


The standard configuration for the CNC simulator is the control FANUC 16 M FX 650.

Figure 6
Menu of MTS programs

It is also possible to generate NC-programs for different CNC-controls by reconfiguring the CNC-simulator.
These can be done in an advanced training phase.
1.1.3 Collision monitoring
Reality-oriented simulation of machining processes is based on the fact that the CNC Simulators function like
the actual machine tools in the workshop :

During work part machining, collision monitoring is performed and the results are displayed as error mes-
sages. The entire machine tool space with work part, fixtures, tool system, etc. is taken into account. During
machining the internal model computes the actually resulting work part contour using the programmed tool
paths during program execution, with a tolerance range of about 0.5 mm. As the simulation can be performed
for different tool qualities and materials etc., the error and collision monitoring function does not check the
programmed feedrate or revolution speed.

10 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

1.2 Operating modes


The CNC Simulator for Milling represents a 3D-milling machine with vertical spindle position. The following
three modes can be used for processing:
• Setup Mode,
• Programming Mode and the
• NC Programming.

1.2.1 Setup mode


In the set-up mode (or manual mode) all necessary preparatory activities can be carried out, such as
• definition of the blank,
• selection of a clamping device,
• selection of tools,
• specifying tool compensation values,
• moving to the reference point and
• touching the work part to define the zero point.

Once a machine status has been defined in this way, it can be registered in a “set-up form” which is assigned
to a NC program. Invoking this NC program will then effect the automatic set-up of the appropriate simulated
machine tool.

The procedure of manually setting up the blank and the chuck is carried out with the help of a special interac-
tive menu. Blank dimensions must be specified and the clamping device be selected.

Figure 7
CNC Milling, Setup Mode menu

The Simulator for Milling provides 16 tools in the magazine. Tools from the tool file can be mounted in all tool
positions (from T01 to T16) as default setting, so as to simulate the equipment of an actual machine tool.
This configuration means that the magazine is automatically equipped with this tool selection each time the
simulator system is booted.

Only tools previously defined can be employed for machining in the CNC Simulators. Therefore, as a rule,
after program start or after any change in the allocation of tools the applicable offset values must be speci-
fied, so that the offset can be computed in the control system. A total of 99 offset value storage files are
available.

© MTS GmbH • Berlin 11


Chapter 1

Figure 8
Simulator for Milling. Set of Tools in the Magazine

As with the set-up of the actual machine tool, the approach of the reference point is indispensable in the CNC
Simulators; it serves to establish the zero position for incremental measuring along the axes. Approach of the
reference point is also a precondition for defining the work part zero and for execution of NC programs in the
Automatic Mode.

Setting the work part zero is possible in any position by “zeroing” the coordinates. Usually this will be effected
by touching the work part.

12 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

1.2.2 Programming Mode


The Programming Mode provides four ways of generating an NC program:
• Editor,
• Interactive Programming,
• Teach In and
• Workshop-Oriented Programming (WOP).
Each of these modes is designed to meet specific requirements, and with their clear layout and error mes-
sages they all offer user guidance during program generation.

An Editor is available for direct input of NC blocks. It has a special programming interface for NC blocks and
checks the syntax (the formal structure of the NC block) as the block is being entered.

Figure 9
CNC Simulator, NC Editor
The NC Editor is equipped with a NC-Program Management to delete and print NC programs.

Directory path
Cur. proces. funct.

Input field

File information

Available program files

Figure 10
CNC Simulator, NC Editor, Program Management

© MTS GmbH • Berlin 13


Chapter 1

Interactive Programming is a feature in which the Automatic Mode and Editor complement each other to
provide the simplest and most efficient way to get started with NC programming. The simulation follows step
by step the creation of an NC program , including collision monitoring.

A special form of interactive programming is the Teach-In function. As in Setup Mode, the work part is ma-
chined manually and the corresponding linear travel commands complying with ISO6983 are generated and
automatically inserted in the NC program.

To make it easy to program even complex contours, the editor and the interactive programming function have
a dialogue-driven WOP Interface. The inputs are supported by a user guidance system with explanatory
graphics.

Figure 11
WOP Interface, CNC Milling:

14 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

1.2.3 Automatic mode


The automatic mode is used to run and test programs created by the CNC Simulator, the INCAD CAM sys-
tem or some other NC-Programming system, in real-time simulation under consideration of collision monitor-
ing. Since the machine and control configuration of the simulator allows a reality-identical performance of the
machine tool in terms of geometrical and technological parameters as well as those of the CNC control, the
program evaluation takes place under conditions highly identical with the actual work part machining opera-
tions.

You have the choice between different simulation modes, such as a flying change, as well as the option to
add certain supplementary functions, such as zooming (CNC turning), measuring, 3D-view, traverse path
monitoring, and the calculation of machining cycles and downtimes.

Figure 12
Example of an Automatic Mode menu

Since the simulations can be run with different tool qualities and work part materials, etc., the programmed
feed rates and rpm values are not subject to error and collision monitoring. Therefore an individual check
before transferring an NC program to a CNC control system is necessary.

© MTS GmbH • Berlin 15


Chapter 1

1.3 Screen representation and manipulation


Before we explain the functional operations such as setting up the machine tool, creating and testing the NC
program in Automatic Mode, etc., we first want to discuss the screen display and menu operations in general.

1.3.1 System start


When you switch on your PC, the MS-DOS operating system prompt indicates the current drive. To run the
MTS software, first change to the drive and directory where the MTS programs are stored. Then run the CNC
Simulator by entering the command "MTSCNC":

cd \MTSCNC Change directory

Confirm

mtscnc Start program

Confirm

Figure 13
Example of the DOS commands for starting the CNC Simulator

Once you have launched the program, the menu (see figure) appears with the choice of the MTS-Software
available in your system.

Figure 14
Menu of MTS programs
The highlighted rectangular boxes under "Machine" and "Control" indicate the currently selected configuration
files. Select the desired program by pressing a function key.

F2 The function key F2 launch the CNC Milling Simulators

F8 The function key F8 starts the exit procedure. Use the key combination
Strg to terminate the program and return to the main MTS program menu.
+

16 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

1.3.2 Screen representation


The screen representation of CNC machining is generally divided into three areas, with work part machining
displayed graphically and dynamically in the work space window and the necessary text information in the
"Information Column" beside it. It contains the information you need in your current work situation.

Figure 15
Screen Layout

Work range
The upper part of the screen shows a graphic representation of the working area of the CNC machine tool,
including clamping devices, work part and tool. The milling simulation displays the work part and the cutter in
top view.

This applies to the Main Menu and to Setup and Automatic Mode. In other operating functions this screen
window always contains a graphical representation of the current work situation.

Information Column
The right column contains text information on necessary machining information. In the Main Menu none of
the modes are active, therefore, no information is shown. In Setup Mode and Automatic Mode this column
contains information on the current machine and system status like feedrate, revolution speed
• current tool coordinates,
• spindle speed, feedrate, active tool and compensation register,
• cutting speed,
• coolant and spindle engine status etc.

Function keys
The numbered boxes at the bottom of the screen indicate the program functions that can be selected with the
function keys during processing.

The two lines above the function keys are reserved for the program dialogue. After starting an NC program
the current NC blocks are shown on the upper line. The bottom line is reserved for error messages.

© MTS GmbH • Berlin 17


Chapter 1

1.3.3 Menu structure


All program control options of the CNC Simulator are given as context-sensitive menu items, with important
procedural steps supported by program dialogues. This menu concept of the CNC Simulator is based on the
WOP operating concept ("Workshop-Oriented Programming"), which was developed in Germany for CNC-
Controllers.
The only disadvantage of the WOP operating concept is, however, the fact that with increasing functionality
the number of submenus correspondingly grows. But as the available options are shown in each work situa-
tion, the function keys at the bottom of the screen give you guidance all the time. On the other hand you can
benefit from this operating concept because you are able to make use of the operating functions without prior
knowledge; since the work sequences are structured functionally and most of the menus are self-explanatory.

If in doubt, return to your starting point by pressing F8 or ESC


.

NC-Programmanage. NC-Editor WOP-Surface

Editor WOP-Surface

Interactive Programming Teach in

Automatic mode WOP-Surface

Automatic mode

Single block

Traverse Paths

Chuck Chuck management

Part / Chuck

Workpiece file

Tool Holder

Magazine Tool Management

Tool Adapter

CNC-Simulator Setup Mode Reference Points

Feedrate / Speed

Spindle / Coolant

Manual Treating

Setup form

Status management

Figure 16
Schematic of the processing options of the CNC Milling Simulator (simplified).

18 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

1.3.4 Data management


The internal data management functions provide a convenient means for documenting and backing up all
work results. These functions include:
• NC Program Manager;
• Tool Manager;
• Clamping Fixture Manager;
• Saving created work parts;
• Saving current editing progress;
• Generating various set-up sheets and
• Managing configuration files.

Example: The CNC Simulator has its own tool management function. The program provides almost all ISO
tool types and tools as standard options, and allows all common tools to be defined. Naturally, the tool man-
agement includes options for editing the available tool files, i.e. modification of existing tools and deletion of
those no longer required.

Figure 17
CNC Milling, Define/Delete Tools; Main Menu.

The screen layout of the Define/Delete Tools main menu is divided into two sections: the upper screen area
contains a listing of all available tool types; the field currently in use is highlighted in color. As usual, further
steps for specifying or editing tool data are indicated on the function keys at the bottom of the screen.

Select the desired step only by pressing the function keys rather than with the mouse.

or Use the cursor keys or to select the tool type.

Create Tool/Tool Adapter: To generate a new tool of the current tool type, select

F1 or F5 F1 ; to define a new tool adapter, use F5 .

F8 or ESC
Return: Use F8 or ESC
to conclude the current operation

© MTS GmbH • Berlin 19


Chapter 1

Having started in the main menu by selecting the tool type, and subsequently selecting the Create Tool func-
tion by pressing F1 , the Data Entry menu for defining the tool is loaded.

Figure 18
CNC Milling, Define/Delete Tools; defining a slot cutter.

The screen layout of the Data Entry menu is divided into three areas: the window on the left contains either a
help graphic or a graphic corresponding to the data of the tool being defined (including the tool adapter). The
input fields for the complete data record are located on the right.

You define a tool by manually entering the geometrical data, as well as the tool name and rotation direction.
The desired tool adapter data can be automatically copied by selecting the Select Tool Adapter function. To
save time, it is reasonable to define a new tool by first copying the data record of a similar tool, and then to
modify the data to meet your requirements.

Use the key to move from input field to input field.

or Use the cursor keys or to move the cursor within the input field.

INS or Use the key INS


to insert a character, and the key to delete one.

If you confirm the entry in the input field with the key, the cursor moves auto-
matically to the next input field.

[Tool Name] [Tool Name] Enter the tool name or number in this input field.

[Parameter] The entries required for a tool depend on the tool type. Use the help graphics to obtain in-
formation on the parameters.

F8 Create tool: When the data entry for all tool and tool adapter parameters has been com-
pleted, you save the tool under a certain name by pressing F8 .

ESC ESC
Use to conclude the operation, and to return to the Define/Delete Tools main menu.

20 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

1.4 Special functions of the software


The CNC Simulator incorporates some special functions which effectively support processing and NC pro-
gramming:
• 3D representation
• Programming aids for ISO commands
• Setting-up automatics, set-up sheet
• Status management

1.4.1 3D representation
A function supporting CNC training is given by the option to display, at any time, 3D Views of the work part,
seen from different viewing angles. The program features 3D displays in Milling Simulators. To display ma-
chining inside the work part, any work part quadrants can be cut out.

Figure 19
CNC Milling,3D View, three-quarter view with intersections

Figure 20
CNC Milling, 3D Display, full part with intersections

© MTS GmbH • Berlin 21


Chapter 1

1.4.2 Programming aids


Whenever you need assistance or have a question during the creation or testing of an NC program, you can
call for help. The available help functions provide basic ISO-based NC programming information.

The programming aids and control information are available in the form of "help screens", and are directly
displayed in the graphic window on the monitor. As a rule, they contain a short informative text, a context-
based graphic display, and an application example referring to the subject.

Based on subject matter, the help screens are divided into groups; for better orientation, each group is pre-
ceded by a table of contents or a schematic function display. In this manner, you have almost the entire set of
programming instructions available, without having to interrupt programming.

Figure 21
CNC Milling, Programming Aid for clockwise circular interpolation

Accessing the Programming Aids is possible from almost all working situations within the CNC Simulator; the
<?> key is used for this purpose during:
• Setup Mode,
• Automatic Mode,
• Interactive Programming, and·
• Teach-In Programming.

Since the "?" (question mark) character may be used in NC programming comment texts, the F6 function
key is used for calling help functions while working with the Editor or Interactive Programming.

Subsequently you enter the name of the help screen (for example „G02“) in the dialogue line. The corre-
sponding program message is displayed, "Help screen: _______“

Confirm the name entry by pressing . If a help screen with that name is avail-
able, it is then loaded. If not, the error message: "Help screen not found" is dis-
played.

Strg and You can use the Strg


+ keys on the PC keyboard to recall the previous help
screen.

22 MTS TeachWare • CNC-Milling • Student’s Book


Introduction into working with the CNC simulator milling

1.4.3 Setting-up automatics, set-up sheet


A Set-up Sheet contains all the information needed to set-up the machine by the operator. This sheet is used
by the MTS-Software for an automatic set-up of the simulated machine tool when starting an NC program.
This information includes:
• blank/work part geometry
• clamping fixture and method
• tool in working position and magazine configuration
• offset values of the tools used
A Set-up Sheet can be created for every current machine tool situation. It is prefixed to the NC program for
which the set-up sheet was created. During the NC program load in Automatic Mode or for interactive pro-
gramming the CNC Simulator is set-up automatically with the Setup Sheet Interpreter according to the stored
information, but the Set-up Sheet Interpreter must be active.

To have a machine tool status loaded automatically during the CNC Simulator start, you can specify the Set-
up Sheet describing that status in the configuration.

F4 Automatic Setup: this function is activated by pressing the function key F4 from the main
menu. The CNC Simulator is then set-up automatically.

Figure 22
CNC Milling, Set-up Sheet menu

Figure 23
CNC Milling, example of a Set-up Sheet (excerpt)

© MTS GmbH • Berlin 23


Chapter 1

1.4.4 Status management


In addition to the Set-up Sheet function, to facilitate the operation of the software, the CNC Simulator also
allows you to save any editing status as a "Status File" and to load it again later on. The editing status in-
cludes:
• exact work part geometry
• clamping method
• magazine configuration, compensation values and current working tool
• current technology values
The machining of work parts can thus be interrupted and resumed at a later time, or it can be done in sec-
tions without having to repeat previous operation steps.

F6 Status: the Status Manager is activated by pressing the function key F6 from the main menu
of the CNC Simulator.

Figure 24
CNC Milling, Status Manager

Figure 25
CNC Milling, File Selection window with existing status files

Like the Set-up Sheet, the Status Manager saves time. With the difference, however, that a processing status
usually also includes the work part machining steps stored in an NC program. To keep your system well-
organized, we recommend to save the current status always together with the reference to the NC program.

24 MTS TeachWare • CNC-Milling • Student’s Book


Coordinate systems and Zero point shifts

2 Coordinate systems and Zero point shifts


For programming it is possible to use three different kinds of coordinate systems such as
• machine coordinate system,
• work part coordinate system and
• local coordinate system
which are subsequently described.

2.1 Machine coordinate system


The machine coordinate system of the CNC machine tool is defined by the manufacturer and cannot be
changed. The point of origin for this machine coordinate system, also called machine zero point M, cannot be
shifted in its location

Y
M X

Machine zero point M

After turning on the control the machine coordinate system can be activated by moving to the reference point.
The machine coordinate system does not change neither by changing the work part coordinate system nor by
setting a local coordinate system nor by programming other commands or actions at the machine.

© MTS GmbH • Berlin 25


Chapter 2

2.1.1 Activating the machine coordinate system


The machine coordinate system can be activated by manually moving to the reference point. Please check
the operation manual of your machine for the necessary operating steps.

Example:
To move to the reference point press the

key and the Start key together.

Another possibility is to first program the command G28 (Automatic Reference Point Return) in your NC pro-
gram (see chapter Going to the reference point G28).

2.1.2 Select the Machine coordinate system G53


When the command G53 is programmed all coordinate values relate to the machine zero point. The com-
mand G53 is valid only in the same programmed block and in the absolute dimensioning system (G90). Oth-
erwise the command G53 has no effect and the last programmed work part coordinate system (G54-G59) is
active.

Programming Example:

N10 G54 X435. Y250. Z132.

N15 G90 G00 X80. Y60. Z0. P1

Z Z Y
Y
P1
50
P2
P3
X
132

50
0
25

X
435
N20 G53 X465. Y280. P2

N25 G00 X65. Y10. P3

The command G53 is used for moving to a special declared position in the machine coordinate system, for
example the tool changing position.

Note: Cancel the cutter radius compensation, the tool length compensation and the offset
values before programming the command G53.

26 MTS TeachWare • CNC-Milling • Student’s Book


Coordinate systems and Zero point shifts

2.2 Work part coordinate system


After the set-up has been completed, the control system of the machine tool refers to the machine zero as
the predefined origin of the coordinate system.
When programming tool motions, however, the work part coordinate system is used. The work part coordi-
nate system is defined by the programmer and can be changed. The location of the point of origin for the
work part coordinate system, also called work part zero point W, can be, in general, specified as desired.

Z
Y
W X

Work part zero point W

The zero point of the coordinate system is preferably placed on the outer edge of the work part. For more
easier calculation of the points needed for programming the outer edges of the upper area or the lower area
are be preferred.

Z
Y

Work part zero point in the left upper outer edge Work part zero point in the left lower outer edge

© MTS GmbH • Berlin 27


Chapter 2

2.2.1 Define the work part coordinate system


The work part coordinate system may be defined by two different methods:
1. with the command G92, or
2. with the command G54 - G59.
1. In the NC program the command G92 serves to define the coordinates X, Y and Z of the work part
zero point relative to the momentary tool position.

2. In the CNC control six different work part coordinate systems (G54 - G59) may be predefined. In the
NC program the desired work part coordinate system can be selected by the commands G54 - G59.

2.2.2 Setting the work part coordinate system with the command G92

Command: G92
Work part coordinate system G92
Function: A new work part coordinate system is set with the command G92
NC-Block: G92 [X...] [Y...] [Z...]
Optional Addresses: X X-Coordinate of the Work part coordinate system relative to the tool position
Y Y-Coordinate of the Work part coordinate system relative to the tool position
Z Z-Coordinate of the Work part coordinate system relative to the tool position
The coordinates following the G92 command specify the coordinates of the
momentary tool position in the new work part coordinate system !

Programming example: G92 X0. Y0. Z0.

The command G92 sets a new work part zero point relative to the momentary tool position in the active
NC-program.

Note: The programming values in the addresses X, Y or Z are not the coordinates of the
new work part coordinate system !
They are the coordinates of the momentary tool position in the new work part coor-
dinate system!
Before moving in the axis specify the G92 command.
If the command G92 is programmed while using G54 - G59, all coordinate systems
are modified by G92.

28 MTS TeachWare • CNC-Milling • Student’s Book


Coordinate systems and Zero point shifts

Command: G92
Work part coordinate system G92
Function: A new work part coordinate system is set with the command G92
NC-Block: G92 [X...] [Y...] [Z...]
Optional Addresses: X X-Coordinate of the Work part coordinate system relative to the tool position
Y Y-Coordinate of the Work part coordinate system relative to the tool position
Z Z-Coordinate of the Work part coordinate system relative to the tool position
The coordinates following the G92 command specify the coordinates of the
momentary tool position in the new work part coordinate system !

Programming Example

1 Y The momentary tool position is the left front upper


Z corner of the work part (see left figure).

G90 G92 X0. Y0. Z0.

The zero point of the new work part coordinate sys-


tem is the momentary tool position.
X
(The coordinates after the command G92 specify the
W coordinates of the tool position in the new work part
coordinate system!)
2 Y
30
Z
The momentary tool position is the left front upper
corner of the work part (see left figure).
40

50
70

X
W

Y Next block of the NC program:


Z G90 G92 X-50. Y-70. Z0.

W The zero point of the new work part coordinate sys-


tem is +50mm in the X-Axis and + 70mm in Y-Axis
50 from the momentary tool position.
70

X (The coordinates after the command G92 specify the


coordinates of the tool position in the new work part
coordinate system!)

Z Y All coordinate values following the G92 command


30 refer to the new work part coordinate system.

W N100 G90 G92 X-50. Y-70. Z0.


40

X
N110 ...
N150 G00 X30. Y40. Z2.
N155 G01 Z10. F100.
N160 ...

© MTS GmbH • Berlin 29


Chapter 2

2.2.3 Setting the work part coordinate system with the commands G54 - G59
Six different work part coordinate systems can be used, for example, to program complex or repetitive con-
tours. The coordinates of the respective zero point may measured as the distance between the reference
point of the work part and the machine zero point. The value and the direction of this distance may be stored
into the NC control.

Each stored zero point will be activated with the corresponding command (G54 - G59) in the NC program.

Note: Coordinate values of all zero points always relate to the machine zero point.

Exercise:
Create an NC-program for the following plate with respect to the newly defined work part zero points.

Use the following configuration:

CONFIGURATION
MACHINE MAKINO FX 650
CONTROL FANUC 16M FX650
BLANK DIMENSIONS
X+140.000 Y+125.000 Z+025.000
VISE
MAKFX 160
CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0°

30 MTS TeachWare • CNC-Milling • Student’s Book


Coordinate systems and Zero point shifts

Solution:

work part coordinate systems


$G54 X400 Y240 Z135
$G55 X435 Y305 Z135
$G56 X415 Y265 Z135
$G57 X495 Y332 Z135

Program
02905
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0
N025 G91 G28 X0 Y0
N030 T1 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H17
N045 G56
N050 G0 X0 Y0 M8
N055 G91
N060 G98 G73 Z-17 R-38 Q6 F80 L0
N065 M98 P905

N070 G55
N075 G0 X0 Y0 M8
N080 G91
N085 G98 G83 Z-17 R-38 Q6 F80 L0
N090 M98 P906

© MTS GmbH • Berlin 31


Chapter 2

N095 G57
N100 G0 X0 Y0 M8
N105 G91
N110 G98 G82 Z-17 R-38 P2000 F80 L0
N115 M98 P907

N120 G53
N125 G54
N130 G0 Z20 M5
N135 G91 G28 Z0 M9
N140 G91 G28 X0 Y0
N145 G90 G49 G80 G40
N150 M30

Subprograms
0905 0906 0907
N10 G91 G99 X0 Y0 N10 G91 G99 X0 Y0 N010 G91 G99 X20 Y0
N15 X20 N15 Y15 N015 X-20 Y20
N20 X20 N20 Y15 N020 X-20 Y-20
N25 X20 N25 G98 Y15 N025 G98 X20 Y-20
N30 G98 X20 N30 G90 G80 N030 G90 G80
N35 G90 G80 N35 M99 N035 M99
N40 M99

Finished part:

32 MTS TeachWare • CNC-Milling • Student’s Book


Coordinate systems and Zero point shifts

2.3 Specifying the necessary location of the work part zero point

The work part zero point W is the origin of the work part-referenced coordinate system. Its location is speci-
fied by the programmer according to practical criteria. The ideal location of the work part zero point allows the
programmer to take the dimensions directly from the drawing.

Z For milling, the outer corner point is chosen as the


Y work part zero point in most cases, depending on
the fact which corner point is selected as the refer-
ence point when dimensioning the work part.

Work part zero point

The work part zero point is set with reference to the machine zero point M. With the operations described
below the distance is specified between the machine zero point M and the work part zero point W in the three
coordinates X, Y and Z. These values are then entered into the CNC control.

Procedure

Starting situation:
The work part is adjusted and firmly clamped in the machine table. All tools are gauged to each other. The
corresponding correction values were entered into the CNC control. The zero setting tool is clamped and the
spindle rotation is switched on.

1. Resetting Z direction

Y The machine table with the clamped work part is


moved below the work spindle (in X and Y) in which
Z the reset tool is clamped.

Now the tool is recessed in Z direction to the work


part surface (X, Y plane), with the spindle switched
on, until a small marking is done on the work part
(touching the work part) surface.
W
X After this the Z axis is reset and the Z value of the
work part zero point W is transferred and stored
into the CNC control using the IST key.

Resetting in Z

© MTS GmbH • Berlin 33


Chapter 2

2. Resetting in X direction

1 The tool is removed again and taken into the new


resetting position for the X axis. With the spindle
switched on it is taken onto the side surface of the
work part (Y, Z plane) in X direction until a small
Y marking is made on the work part surface (touching

Z 2 the work part).

When touching the work part in X axis the radius of


the applied tool has to be considered when con-
firming the value with the IST key, as the center
point coordinates of the tool are always used in NC
W programming.
X If the milling tool of the adjacent figure has, for in-
stance, a radius of 15 mm, then the value X= -15 is
entered into the NC control and confirmed with IST.

Resetting in X

3. Resetting in Y direction

The last step is to take the tool to the resetting po-


sition for the Y axis. With the spindle switched on,

1 Y the tool is taken into Y direction, to the front surface


of the work part (X, Z Plane) until a small marking
Z is done on the work part surface (touching the work
part).
2 When touching the work part in Y the radius of the
3 applied tool has to be considered when entering the
W value for the IST value take-over as in NC pro-
gramming the center point coordinates of the tool
X are always used.

If the tool of the adjacent figure has, for instance, a


radius of 15 mm then the value Y= -15 is entered
into the CNC control and confirmed with IST.
Resetting in Y

34 MTS TeachWare • CNC-Milling • Student’s Book


Coordinate systems and Zero point shifts

Setting the work part zero point W in the CNC simulator

Using the below described operation steps the distance between the machine zero point M and the work part
zero point W in the three coordinates X, Y and Z is defined.

Please note that only the tool moves in the MTS simulator!
Starting situation:
Z Y
• All machining tools are dimensioned and
available in the magazine.
• The work part is adjusted and clamped
on the machine table in the simulator.
• The location of the work part zero point
should be the left top corner of the work
W part.
X

Work part zero point

Description Entry

1. Call CNC milling in the main menu. F2 (milling)


2. Select the set-up mode. F3 (set-up mode)
3. Switch on the spindle in clockwise rotation. Type "M03“ using the keyboard and
confirm.
4. Change the tool to define the work part zero Type "T0202“ using the keyboard and
point.
confirm.
5. Setting the zero point in Z direction Using the numeric keyboard press the corre-
Take the tool in rapid speed to a position ap- sponding arrow key together with the shift key:
prox. 5mm above the work part surface.
Ex.: + 2 for rapid speed in -Z direction.
Y
Z

W
X

Further travel direction options:


+Z +Y
6
( + X direction )
7 8 9 4
Pos 1 Bild ( - X direction )
-X +X 9
4 5 6 Bild ( + Y direction )
1
Ende ( - Y direction )
1 2 3 8
-Y Ende Bild ( + Z direction )
-Z 2
0 , ( - Z direction )
Einfg Entf

© MTS GmbH • Berlin 35


Chapter 2

6. Switch the increment from 1mm to 0,1mm or F3 (technology)


0,01mm for further machining.
F5 (increment)

F2 (increment 0.1)

7 Move the tool in negative Z direction until it Press the arrow key on the numeric keyboard
touches the surface of the work part.
2
Then press
ESC
and

F8 (quit).
8. Set the work part zero point in Z. F4 (tool/ datum)

F4 (set datum)

F3 (set Z coord.)
Type in the data on the keyboard „0“ and

F8 confirm it.
Check Z by setting the zero point and using
the displayed coordinate values.

9. Setting the zero point in X direction Using the numeric keyboard press the arrow
Withdraw the tool in +Z direction.
key together with the shift key:

+ 8 for rapid speed in +Z direction


10. Take the tool in rapid speed to the new zero Press the corresponding arrow key on the
setting position approx. 5mm off the side sur- numeric keyboard
face.
together with the shift key:
1 1) in -X direction

Y + 4 for rapid speed in -X direction


Z 2 2) in -Z direction

+ 2 for rapid speed in -Z direction

W
X

36 MTS TeachWare • CNC-Milling • Student’s Book


Coordinate systems and Zero point shifts

11. Move the tool in positive X direction until it Press the arrow key on the numeric keyboard.
touches the surface of the work part. 6
Then press
ESC
and
F8 (return).

12. Set the work part zero point in X. F4 (tool, zero point)
Please note the tool radius!
F4 (set datum)
So, enter for the X coordinate the negative
value of the radius of the applied tool, for in- F1 (set X coordinate)
stance -10.
Type "-10“ using the keyboard and confirm.

F8
Check the X by setting the zero point using
the displayed coordinate values.

13. Setting the zero point in Y direction Using the numeric keyboard press the arrow
Take off the tool in -X direction and then in +Z key together with the shift key:
direction.
+ 4 for rapid speed in -X direction then

+ 8 for rapid speed in +Z direction.


14. Take the tool in rapid speed to the new reset- Using the numeric keyboard press the corre-
ting position approx. 5mm off the front side. sponding arrow key together with the shift key:

1 Y 1) in +X direction

Z + 6 for rapid speed in +X direction


2) in -Y direction
2
1 for rapid speed in -Y direction
3 + Ende
W 3) in -Z direction
X + 2 for rapid speed in -Z

15. Take the tool in positive Y direction until it Press the arrow key on the numeric keyboard.
touches the surface of the work part.
9
Bild Then press
ESC
and

F8 (quit).

© MTS GmbH • Berlin 37


Chapter 2

16. Set the work part zero point in Y. F4 (tool/datum)


Please, note the tool radius!
F4 (set datum)
So, enter for the Y coordinate the negative
value of the radius, for instance -10. F2 (set Y coord.)
Type "-10“ using the keyboard and confirm

F8 key.
Check the Y by setting the zero point using
the displayed coordinate values.

17. Withdraw the tool in -Y and then in +Z direc- use the numeric keyboard and press the arrow
tion. key together with the shift key:
1 for rapid speed in -Y direction, then
+ Ende

+ 8 for rapid speed in +Z


18. F8 (quit)
19. Quit the set-up mode menu. F8 (quit)

38 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3 NC commands for programming „FANUC 16 M“

3.1 Absolute value input and incremental value input G90/G91

Command: G90
Activate Absolute Dimensions
Function: When the command G90 is programmed, all subsequent coordinate values relate
to the work part zero. The target position, to which the tool shall move, is pro-
grammed in absolute coordinates, regardless of the current tool position.
NC-Block: G90

Absolute Dimensioning:

In the absolute system all dimensions refer


to the origin (zero point) of the coordinate
system, which is also called the dimen-
sioning reference point.

Please note that in the absolute system the target points must be programmed according to their position in
the coordinate system with reference to the origin of that system.

Programming Example
with Absolute Coordinates:

N085 G90
N090 G00 X+30. Y+30. Z+2.
N095 G01 Z-6.
N100 G01 X+110. Y+75.

The absolute coordinate system remains operative until it is deactivated by G91 (activating the incremental
dimensioning).

© MTS GmbH • Berlin 39


Chapter 3

Command: G91
Activate Incremental Dimensions
Function: When the command G91 is programmed, the programmed coordinates of the tar-
get position relate to the actual tool position; i.e. the values (distances) must be
specified by which the tool shall move in the respective axis from the current posi-
tion.
NC-Block: G91

Incremental Dimensioning:

Contrary to the absolute system, the in-


cremental dimensioning system is based
on specifying the distance between a cur-
rent point and its preceding point on an
axis. Because in this system a sequence of
additive dimensions is produced, it is called
incremental.

In the incremental system the coordinate values of the target points must be programmed according to their
position relative to the starting point, with the appropriate positive or negative sign attached.

Programming Example
with Incremental Coordinates:

N085 G00 X+30. Y+30. Z+2.


N090 G91
N095 G01 Z-8.
N100 G01 X+80. Y+45.

The incremental coordinate system remains operative until it is deactivated by G90 (activating the absolute
dimensioning).

40 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2 Linear Interpolation and Machine Functions

3.2.1 Rapid traverse G00

Command: G00
Rapid traverse
Function: The tool will move at the maximum possible speed to the target position as pro-
grammed by the X- Y- and Z- coordinates. These coordinates may either be pro-
grammed in the absolute system (G90) or in the incremental system (G91).
Note: The FANUC CNC-Control has two possibilities to program values
1) with a decimal point, the input increment is mm, so
X20. represents X20mm or
2) without a decimal point, the input increment is µm, so
X20 represents X0.02mm.
For this reason it is important to program values with a decimal point.

If a tool movement parallel to one or two axes is desired, the respective target coordinate will be identical with
that of the current tool position. It does not have to be programmed separately, since the coordinate address
is self-retentive.

The rapid traverse rate in the G00-command is independently set for each axis by the machine tool manu-
facture. Consequently, the rapid traverse rate cannot be defined in the address F..

Positioning is done separately for each axis. The traveled path is generally not a straight line.

Rapid traverse

The cutter moves from its current position


(starting point) to the programmed target
position (end point).

The programmed feed adjustment Z, relative to the current tool position, determines the order of tool move-
ments in the axes.

• If the infeed is in the positive Z-direction (from the current tool position), the tool will move first in the
Z-axis and subsequently in the X- and Y- direction.
• If the infeed is in the negative Z-direction (from the current tool position), the tool will move first in
the XY plane and then in the Z-direction.

If a tool change or a change of spindle speed have been programmed within the same NC-block, these func-
tions will be executed prior to moving the tool to the target position.

© MTS GmbH • Berlin 41


Chapter 3

Command: G00
Rapid traverse
Function: The tool will move at the programmed feedrate to the target position as pro-
grammed by the X- Y- and Z- coordinates. These coordinates may either be pro-
grammed in the absolute system (G90) or in the incremental system (G91).
NC-Block: G00 [X...] [Y...] [Z...] [T...] [M...]
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
T Tool Function
M Additional Function

Note: The FANUC CNC-Control has two possibilities to program values


1) with a decimal point, the input increment is mm, so
X20. represents X20mm or
2) without a decimal point, the input increment is µm, so
X20 represents X0.02mm.
For this reason it is important to program values with a decimal point.

Programming Example
for Absolute Dimensioning:

N090 G00 X+30. Y+65. Z+12.


N095 G90
N100 G00 X+105. Y+35. Z+2.

Programming Example
for Incremental Dimensioning:

N090 G00 X+30. Y+65. Z+12.


N095 G91
N100 G00 X+75. Y-30. Z-10.

42 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2.2 Linear Interpolation in Slow Feed Motion G01

Command: G01
Linear Interpolation
Function: The tool will move at the programmed feedrate to the target position as pro-
grammed by the X- Y- and Z- coordinates. These coordinates may either be pro-
grammed in the absolute system (G90) or in the incremental system (G91).
NC-Block: G [X...] [Y...] [Z...] [F...] [S...] [T...] [M...]
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
F Feedrate
S Speed
T Tool Function
M Additional Function

Note: The FANUC CNC-Control has two possibilities to program values


1) with a decimal point, the input increment is mm, so
X20. represents X20mm or
2) without a decimal point, the input increment is µm, so
X20 represents X0.02mm.
For this reason it is important to program values with a decimal point.

If a tool movement parallel to one or two axes is desired, the respective target coordinate will be identical with
that of the current tool position. It does not have to be programmed, since the coordinate address is self-
retentive.

Linear Interpolation in Three Axes

The tool moves at the specified feedrate


from its current position (starting point) to
the programmed target point.

If a tool change, a change of the feedrate and/or a change of spindle speed have been programmed within
the same NC-block, these commands will be executed prior to moving the tool to the target position.

© MTS GmbH • Berlin 43


Chapter 3

Command: G01
Linear Interpolation
Function: The tool will move at the programmed feedrate to the target position as pro-
grammed by the X- Y- and Z- coordinates. These coordinates may either be pro-
grammed in the absolute system (G90) or in the incremental system (G91).
NC-Block: G [X...] [Y...] [Z...] [F...] [S...] [T...] [M...]
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
F Feedrate
S Speed
T Tool Function
M Additional Function

Programming Example
for Absolute Dimensioning:

N085 G90
N090 G00 X+30. Y+30. Z+2.
N095 G01 Z-6.
N100 G01 X+110. Y+75.

Programming Example
for Incremental Dimensioning:

N085 G00 X+30. Y+30. Z+2.


N090 G91
N095 G01 Z-8.
N100 G01 X+80. Y+45.

44 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2.3 Going to the reference point G28

Command: G28
Automatic Reference Point Return
Function: The reference point is a fixed point on the machine. The function Automatic Refer-
ence Point Return enables the tool to move to the reference point.
X, Y and Z are the commands to move to an intermediate point of the reference
point return. These coordinates may either be programmed in the absolute system
(G90) or in the incremental system (G91).
NC-Block: G28 [X...] [Y...] [Z...]
Optional Addresses: X X-Coordinate of the Intermediate Point
Y Y-Coordinate of the Intermediate Point
Z Z-Coordinate of the Intermediate Point

It is possible to simultaneously command by three axes, by two axes or only by one axis. In the G28 block,
the specified axis performs positioning at the intermediate point first and then positioning from the intermedi-
ate point to the reference point. Both positionings are performed at the rapid traverse rate of each axis.

Automatic Reference Point Return

Intermediate point
The cutter moves from Reference point
its present position to
the programmed inter-
mediate point and finally
to the reference point.

Starting point

Generally the command G28 is used for a tool changing. If the Automatic Reference Point Return has been
activated for a program part, the following must be observed:
• Before specifying G28, tool radius compensation must be canceled in principle.
• Cancel tool length compensation in the block which follows the G28 command block.

Programming Example Programming Example


for Absolute Dimensioning: for Incremental Dimensioning:
(The position is X+50 Y+30 Z+2) (The position is X+50 Y+30 Z+2)
N085 G54 G90 N085 G91
N090 G28 X+100. Y+100. Z+100. N090 G28 X+50. Y+70. Z+98.
(The intermediate point is on X+100 Y+100 Z+100) (The intermediate point is on X+100 Y+100 Z+100)
X, Y and Z are commanded by the coordinate value X, Y and Z are commanded by the movement dis-
of the intermediate point in work coordinate system tance between the present position and the inter-
independent of the present position. mediate point.

© MTS GmbH • Berlin 45


Chapter 3

3.2.4 Return from the reference point G29

Command: G29
Automatic Return from the Reference Point
Function: The function Automatic Return from the Reference Point enables the tool to move
from the reference point to the specified position by passing the intermediate point.
X, Y and Z are the commands to move to the target point. These coordinates may
either be programmed in the absolute system (G90) or in the incremental system
(G91). The coordinates of the intermediate point are used from the last G28 Com-
mand.
NC-Block: G28 [X...] [Y...] [Z...]
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point

Automatic Return from the Reference Point

Intermediate point
The cutter moves from Reference point
the reference point to
the intermediate point
(programmed in the last
G28 command) and fi-
nally to the programmed
target position. Target point

Generally the command G29 is used after a tool changing. If the Automatic Return from the Reference Point
has been activated for a program part, the following must be observed:
• When the coordinate system is modified after automatic reference point return, an intermediate
point is created in the new coordinate system.

Programming Example Programming Example


for Absolute Dimensioning: for Incremental Dimensioning:
(The position is X+50 Y+30 Z+2) (The position is X+50 Y+30 Z+2)
N085 G90 N085 G91
N090 G28 X+100. Y+100. Z+100. N090 G28 X+50. Y+70. Z+98.
(The intermediate point is on X+100 Y+100 Z+100) (The intermediate point is on X+100 Y+100 Z+100)
N095 T01 N095 T01
N100 G29 X+50. Y30. Z+2. N100 G29 X-50. Y-70. Z-98.
In G29 X, Y and Z are commanded by the coordi- In G29 X, Y and Z are commanded by the move-
nate value of the target point in work coordinate ment distance between the intermediate point and
system independent of the intermediate point. the target point.

46 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2.5 Dwell time G04

Command: G04
Dwell
Function: The tool movement is halted for the specified dwell time.

G04 
 X ...
NC-Block: 
 P ...
Optional Addresses: X Dwell time in seconds (X0.001 to X99999.999)
P Dwell time in seconds (P1 to P99999999)

It is possible to delay a shift to the next block operation by commanding G04. This command must be pro-
grammed in a separate NC-block. The dwell time ranges from 0.001 sec to 99999.999 sec.

For the programming the following must be observed:


• A decimal point cannot be used in the address P.
• The dwell time ranges from 0.001 sec to 99999.999 sec:
G04 P1 to G04 P99999999
G04 X0.001 to G04 X99999.999
• Command the G04 block independently.
• Although the addresses P and X can be used, use the address P because usually the address X is
used for the X-axis movement command.

3.2.6 Exact Stop G09

Command: G09
Exact Stop
Function: If G09 is programmed as part of an NC-block, only in this NC-block the feedrate will
be decelerated to zero when the programmed contour point is reached. After the
standstill at precisely the programmed position, the tool motion is resumed and the
next contour point, as programmed in the subsequent NC-block, is approached.
NC-Block: ... G09 ...

Since NC-programs are executed continuously, i.e. without interrupting the feed motion, position errors such
as lags or overshoots may occur. To move the tool with precision to the programmed coordinates, the G09
command must be programmed.

© MTS GmbH • Berlin 47


Chapter 3

3.2.7 Switching to dimension unit inch G20

Command: G20
Inch Data Input
Function: This command G20 serves to switch the unit of measurement from millimeters to
inches. All coordinate values must be specified in inches. Accordingly the technol-
ogy data concerning the feedrate will be altered from millimeters per minute
(mm/min) to inches per minute (in/min).
The G20 command must be programmed in a separate NC-block before setting the
coordinate system at the beginning of the program.

NC-Block: G20

Inches will be the active unit of measurement only until the system is switched back to the millimeter unit. At
the end of each program (M30) the control system will automatically return to the millimeter data input.

Note: The FANUC CNC-Control has two possibilities to program values


1) with a decimal point, the input increment is inch, so
X20. represent X20 inch or
2) without a decimal point, the input increment is thousandth inch, so
X20 represent X0.02 inch.
For this reason it is important to program values with a decimal point.

3.2.8 Switching to dimension unit millimeter G21

Command: G21
Millimeter Data Input
Function: This command G21 serves to switch the unit of measurement from inches to milli-
meters. All coordinate values must be specified in millimeters. Accordingly the
technology data concerning the feedrate will be altered from inches per minute
(in/min) to millimeters per minute (mm/min).
The G21 command must be programmed in a separate NC-block before setting the
coordinate system at the beginning of the program.

NC-Block: G21

Inches will be the active unit of measurement only until the system is switched back to the millimeter unit. At
the end of each program (M30) the control system will automatically return to the millimeter data input.

Note: The FANUC CNC-Control has two possibilities to program values


1) with a decimal point, the input increment is mm, so
X20. represent X20mm or
2) without a decimal point, the input increment is µm, so
X20 represent X0.02mm.
For this reason it is important to program values with a decimal point.

48 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2.9 Feedrate F in mm per minute G94

Command: G94
Feedrate F in mm per minute
Function: The command G94 serves to program the feedrate. The unit of measurement is
"Millimeters per Minute".
NC-Block: G94 [F...]
Optional Addresses: F Feedrate in mm per minute.
F must be programmed with a decimal point!
Programming Example: N100 G94 F120.

Note: If the unit of measurement has been switched from millimeters to inches (see NC-
Command G20), the programmed feedrate will be interpreted accordingly in inches
per minute.

3.2.10 Feedrate F in mm per revolution G95

Command: G95
Feedrate F in mm per minute
Function: The command G95 serves to program the feedrate per revolution. The measuring
unit is millimeters.
NC-Block: G95 [F...]
Optional Addresses: F Feedrate in mm per revolution.
F must be programmed with a decimal point!
Programming Example: N100 G95 F0.2

Note: If the unit of measurement has been switched from millimeters to inches (see NC-
Command G20), the programmed feedrate will be interpreted accordingly in inches
per minute.

3.2.11 Spindle speed S

Command: S
Spindle speed
Function: The spindle speed is programmed in revolutions per minute (RPM).
NC-Block: S...
Programming Example: N100 ... S1500 ...

© MTS GmbH • Berlin 49


Chapter 3

3.2.12 Programmed Stop M00

Command: M00
Programmed Stop
Function: After the execution of a block which contains the command M00, the program exe-
cution will be stopped. All operations, for example spindle rotation or coolant, stop
temporarily. The program can restart by pressing the start push-button.
NC-Block: ...M00

This function allows the operator to gauge the work part, remove the chips or to manually change the tool.

Note: In one block only one M code can be specified!


Specify the command M00 inside a block that the tool does not cut a work part.

3.2.13 Optional Stop M01

Command: M01
Optional Stop
Function: If the Optional Stop Switch on the machine operation panel is turned on, the pro-
gram execution will be stopped in the same way as M00. After the execution of a
block which contains the command M01, all operations, for example spindle rota-
tion or coolant, stop temporarily. The program can restart by pressing the start
push-button.
If the Optional Stop Switch is off, the command M01 is ignored. The operation pro-
ceeds to the next block.
NC-Block: ...M01

This function allows the operator to gauge the work part, remove the chips or to manually change the tool.

Note: In one block only one M code can be specified!


Specify the command M01 inside a block so that the tool does not cut a work part.

50 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2.14 Program End M02

Command: M02
Program End
Function: This command informs the control system that the current program run has been
completed. The spindle and the coolant pump will be deactivated and the automatic
program run is terminated.
The command M02 does not preformed the rewind (search of the begin of the pro-
gram).
NC-Block: ...M02

Note: In one block only one M code can be specified!

3.2.15 Program End with Resetting M30

Command: M30
Program End with Resetting
Function: The command M30 has the same function as the command M02. However the
command M30 performs the rewind (search of the begin of the program). This
command informs the control system that the current program run has been com-
pleted. The spindle and the coolant pump will be deactivated and the automatic
program run is terminated.

NC-Block: ...M30

Note: In one block only one M code can be specified!

© MTS GmbH • Berlin 51


Chapter 3

3.2.16 Activate spindle in clockwise rotation M03

Command: M03
Activate spindle in clockwise rotation
Function: The command M03 activates the spindle rotation in the clockwise direction.
NC-Block: ...M03

Note: In one block only one M code can be specified!

3.2.17 Activate spindle in counter - clockwise rotation M04

Command: M04
Activate spindle in counter - clockwise rotation
Function: The command M04 activates the spindle rotation in the counter - clockwise direc-
tion.
NC-Block: ...M04

Note: In one block only one M code can be specified!

3.2.18 Deactivate spindle M05

Command: M05
Deactivate spindle
Function: The command M05 stops the spindle rotation.
NC-Block: ...M05

Note: In one block only one M code can be specified!

3.2.19 Mounting a tool M06

Command: M06
Mounting a tool
Function: The command M06 mounts a tool, which is preselected by the tool function T.
NC-Block: ...[T...] M06
Optional Addresses: T Tool Function

The T-command is only for allocating a specified tool to the tool changing position. To mount this tool to the
workspindle the command M06 must be separately programmed.

52 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2.20 Activate Coolant 1 M07

Command: M07
Activate Coolant 1
Function: The command M07 activate the first coolant pump.
NC-Block: ...M07

Note: In one block only one M code can be specified!

3.2.21 Activate Coolant 2 M08

Command: M08
Activate Coolant 2
Function: The command M08 activates the second coolant pump.
NC-Block: ...M08

Note: In one block only one M code can be specified!

3.2.22 Deactivate Coolant M09

Command: M09
Deactivate Coolant
Function: The command M09 deactivates the coolant pump.
NC-Block: ...M09

Note: In one block only one M code can be specified!

© MTS GmbH • Berlin 53


Chapter 3

3.2.23 Mirror in the X-Axis M21

Command: M21
Mirror in the X-Axis
Function: The command M21 switches the signs of the coordinates of the X-Axis. It means,
that movements in the X-Axis are opposite to the programmed direction.
NC-Block: ... M21

The modal command M21 is active until M23 (Cancel mirror functions) is specified.

Note: In one block only one M code can be specified!

3.2.24 Mirror in the Y-Axis M22

Command: M22
Mirror in the Y-Axis
Function: The command M22 switches the signs of the coordinates of the Y-Axis. It means,
that movements in the Y-Axis are opposite to the programmed direction.
NC-Block: ... M22

The modal command M22 is active until M23 (Cancel mirror functions) is specified.

Note: In one block only one M code can be specified!

3.2.25 Cancel mirror functions M23

Command: M23
Cancel mirror functions
Function: The command M23 cancels the mirror functions M21 and M22. It means, that all
moves are in the same direction as the programmed direction.
NC-Block: ... M23

Note: In one block only one M code can be specified!

54 MTS TeachWare • CNC-Milling • Student’s Book


NC commands for programming „FANUC 16 M“

3.2.26 Activate Feedrate Override dial M48

Command: M48
Activate Feedrate Override dial
Function: The command M48 activates the feedrate override dial on the operation panel on
the machine. The feedrate override can be mounted every 10% from 0% to 200%.
NC-Block: ...M49

Note: In one block only one M code can be specified!

3.2.27 Cancel Feedrate Override dial M49

Command: M49
Cancel Feedrate Override dial
Function: The command M49 deactivates the feedrate override dial on the operation panel on
the machine. The feedrate override fixes to 100%.
NC-Block: ...M49

Note: In one block only one M code can be specified!

© MTS GmbH • Berlin 55


Chapter 3

3.2.28 Subprogram Call M98

Command: M98
Subprogram Call
Function: A subprogram called by the command M98 is executed by the control system. After
this, the execution of the main program will be continued from the position in the
program line, where the subprogram has been invocated.
NC-Block: M98 [P...] [L...]
Optional Addresses: P Number of the subprogram
L Number of repeated callings

Programming Example: N100 M98 P400 L5 (Call the subprogram O400 five times)
N100 M98 P400 (Call the subprogram O400 fonce)

Note: The Subprogram Call M98 must be programmed in a separate NC-Block.

3.2.29 End of Subprogram M99

Command: M99
End of Subprogram
Function: The command M99 marks the end of a subprogram.
NC-Block: M99

At the end of each defined subprogram, the command M99 must be programmed to cause the control sys-
tem to return to the main program, resp. to the subprogram from which the current subprogram has been
called.

Note: The Subprogram End M99 must be programmed in a separate NC-Block.

56 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

4 Interpolation with cutter radius compensation


4.1 Selection of machining planes G17-G19
A work part can be machined in each of the three possible planes (X Y, Z X or Y Z). The respective third axis
is the feed axis and therefore also the tool axis. The G-commands G17, G18 and G19 serve to select a ma-
chining plane for circular interpolation, tool radius compensation, coordinate rotation or for hole drilling.

For a 3-axis milling machine with vertical spindle position the standard machining plane is the XY-plane. In
the below table the G-commands are listed with their corresponding machining planes and downfeed axes.

Plane Selection Coordinate Plane Feed Axis


(G-Command) (Machining Plane) Tool Axis
G17 XY - Plane Z

G18 ZX - Plane Y

G19 YZ - Plane X

Command: G17
Selecting the machining plane G17
Function: The G-commands G17 serve to select the XY machining plane.
NC-Block: ... G17 ...

Command: G18
Selecting the machining plane G18
Function: The G-commands G18 serve to select the ZX machining plane.
NC-Block: ... G18 ...

Command: G19
Selecting the machining plane G19
Function: The G-commands G19 serve to select the YZ machining plane.
NC-Block: ... G19 ...

© MTS GmbH • Berlin 57


Chapter 4

4.2 Circular interpolation


Circular interpolations can be moved in two opposite directions.
G02 in clockwise direction, or in
G03 counter-clockwise direction.

Y G02 G03

X
Directions for Circular Interpolations.

4.2.1 Circular Interpolation Clockwise G02

Command: G02
Circular Interpolation Clockwise G02
Function: The tool will move clockwise on a circular arc to the target position.
NC-Block: G02 [X...] [Y...] [Z...] [I...] [J...] [K...] [F...]...
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
I Circle Center Incremental (distance between the starting position and the
circle center in the X-direction).
J Circle Center Incremental (distance between the starting position and the
circle center in the Y-direction).
K Circle Center Incremental (distance between the starting position and the
circle center in the Z-direction).
Note: The addresses I, J and K are always programmed in the incremental system, re-
gardless of the selected value command system (G90 or G91).
F Feedrate

The tool will move at the programmed feedrate


Y G02
clockwise on a circular arc to the target position as
defined by the coordinates in X and Y.

These coordinates may either be programmed in


the absolute system (G90) or in the incremental
system (G91).
X

58 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Command: G02
Circular Interpolation Clockwise G02
Function: The tool will move clockwise on a circular arc to the target position.
NC-Block: G02 [X...] [Y...] [Z...] [I...] [J...] [K...] [F...]...

Programming Example
with Absolute Coordinates:

N085 G90
N090 G00 X+55. Y+35. Z+2.
N095 G01 Z-5.
N100 G02 X+95. Y+75. I+30. J+10.

Please note that in the absolute system the target points must be programmed according to their position in
the coordinate system with reference to the origin of that system.

Programming Example
with Incremental Coordinates:

N085 G00 X+55. Y+35. Z+2.


N090 G91
N095 G01 Z-7.
N100 G02 X+40. Y+40. I+30. J+10.

© MTS GmbH • Berlin 59


Chapter 4

4.2.2 Circular Interpolation Counter-Clockwise G03

Command: G03
Circular Interpolation Counter-Clockwise G03
Function: The tool will move counter-clockwise on a circular arc to the target position.
NC-Block: G03 [X...] [Y...] [Z...] [I...] [J...] [K...] [F...]...
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
I Circle Center Incremental (distance between the starting position and the
circle center in the X-direction).
J Circle Center Incremental (distance between the starting position and the
circle center in the Y-direction).
K Circle Center Incremental (distance between the starting position and the
circle center in the Z-direction).
Note: The addresses I, J and K are always programmed in the incremental system, re-
gardless of the selected value command system (G90 or G91).
F Feedrate

The tool will move at the programmed feedrate


counter-clockwise on a circular arc to the target
Y G03
position as defined by the coordinates in X and Y.

X
The coordinates for the target position may either be programmed in the absolute system (G90) or in the
incremental system (G91).

60 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Command: G03
Circular Interpolation Counter-Clockwise G03
Function: The tool will move counter-clockwise on a circular arc to the target position.
NC-Block: G03 [X...] [Y...] [Z...] [I...] [J...] [K...] [F...]...

Programming Example
with Absolute Coordinates:

N085 G90
N090 G00 X+55. Y+25. Z+2.
N095 G01 Z-5.
N100 G03 X+100. Y+70. I+15. J+30.

Please note that in the absolute system the target points must be programmed according to their position in
the coordinate system with reference to the origin of that system.

Programming Example
with Incremental Coordinates:

N085 G00 X+55. Y+25. Z+2.


N090 G91
N095 G01 Z-7.
N100 G03 X+45. Y+45. I+15. J+30.

© MTS GmbH • Berlin 61


Chapter 4

4.3 Machining Plane, Sense of Rotation, Coordinates of a Circular Arc


The G-commands G17, G18 and G19 serve to select a machining plane par example for circular interpola-
tions. It is possible to program clockwise or counter-clockwise circular arcs in the following three planes:
• G17 X Y - plane,
• G18 Z X - plane or
• G19 Y Z - plane.
Depending on the selected plane the starting point, the target point and the circle center use other coordi-
nates!

For example:
In the ZX-plane the X- and the Z-coordinates are used for the target point. The addresses I and K
which correspond to the X- and the Z-coordinates are used for the circle center.

G 02 R... 
G18   [X...] [Z...]   [F...]
G 03  I... K...

An overview of the circular interpolations in the possible machining planes is given in the following table.

Direction Command Description

1 Selection of Planes G17 Interpolation in the XY-plane

G18 Interpolation in the ZY-plane

G19 Interpolation in the YZ-plane

2 Sense of Rotation G02 clockwise

G03 counter-clockwise

3 Absolute Coordinates of the target point in the work part


Position of the Dimensions G90 2 Axis coordinate system
target Point from X,Y,Z
Incremental Distance between the starting position and the
Dimensions G91 target point with an algebraic sign

4 Distance between the starting posi- 2 Axis Distance between the starting position and the
tion and the circle center from I,J,K circle center with an algebraic sign

Circular Radius R Radius of the circle

5 Cutting Feed F Cutting feed along the circular arc

62 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Command: G17 G02 or G03


Circular Interpolation in the XY-plane
Function: The tool will move in the XY-plane on a circular arc to the target position.

G 02 R... 
NC-Block: G17   [X...] [Y...]   [F...]
G 03  I... J...
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
R Radius of the circular arc (optional statement)
I Circle Center Incremental (distance between the starting position and the
circle center in the X-direction).
J Circle Center Incremental (distance between the starting position and the
circle center in the Y-direction).
Note: The addresses I and J are always programmed in the incremental system, regard-
less of the selected value command system (G90 or G91).
F Feedrate

Z G17 Z G17

Y Y

G02 G03

X X
G02 clockwise interpolation in the XY-plane G03 counter-clockwise interpolation in the XY-plane

© MTS GmbH • Berlin 63


Chapter 4

Command: G18 G02 or G03


Circular Interpolation in the ZX-plane
Function: The tool will move in the ZX -plane on a circular arc to the target position.

G 02 R... 
NC-Block: G18   [X...] [Z...]   [F...]
G 03  I... K...
Optional Addresses: X X-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
R Radius of the circular arc (optional statement)
I Circle Center Incremental (distance between the starting position and the
circle center in the X-direction).
K Circle Center Incremental (distance between the starting position and the
circle center in the Z-direction).
Note: The addresses I and K are always programmed in the incremental system, regard-
less of the selected value command system (G90 or G91).
F Feedrate

Y G18 Y G18

-Z -Z

G02 G03

X X
G02 clockwise interpolation in the XZ-plane G03 counter-clockwise interpolation in the XZ-plane

64 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Command: G19 G02 or G03


Circular Interpolation in the YZ-plane
Function: The tool will move in the YZ -plane on a circular arc to the target position.

G 02 R... 
NC-Block: G19   [Y...] [Z...]   [F...]
G 03  J... K...
Optional Addresses: Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
R Radius of the circular arc (optional statement)
J Circle Center Incremental (distance between the starting position and the
circle center in the Y-direction).
K Circle Center Incremental (distance between the starting position and the
circle center in the Z-direction).
Note: The addresses J and K are always programmed in the incremental system, re-
gardless of the selected value command system (G90 or G91).
F Feedrate

X G19 X G19

Y Y

G02 G03

-Z -Z
G02 clockwise interpolation in the YZ-plane G03 counter-clockwise interpolation in the YZ-plane

© MTS GmbH • Berlin 65


Chapter 4

Command: G02 or G03 with Radius R


Circular Interpolation with radius input
Function: The tool will move on a circular arc with the radius R to the target position.

G17
NC-Block: G18 G 02 [X...] [Y...] [Y...] [R...] [F...]
  G 03
G19
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
R Radius of the circular arc
F Feedrate

A circular arc can specify the starting point, the target point and the circle center. Another possibility is to pro-
gram the circular arc without the circle center however with the radius R.

Depending on the moving angle there are two cases of movements:


1. moving angle < 180°, R is the radius of the circular arc.
2. moving angle ≥ 180°, specify the radius R negative!

α < 180°
R4
0
Target Point β > 180°
β
R4
0 α
X
Starting Point
Circular Interpolations with Radius Input

Programming Example:

Moving Angle < 180° Moving Angle > 180°

Absolute
G54 G90 G17 G02 X40. Y40. R40. F120. G54 G90 G17 G02 X40. Y40. R-40. F120.
Dimensions

Incremental
G91 G17 G02 X40. Y40. R40. F120. G91 G17 G02 X40. Y40. R-40. F120.
Dimensions

66 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Programming Examples for circular interpolation:

The next two NC programs describe the following contour. In the first program the addresses I and J are
used for the circular interpolations. In the second program the circular interpolations are programmed by us-
ing the radius with the address R.

Y
100

R80

Circle 2

Circle 1 Circle 3
R20 X
-80 R40 40 45

-20

-40

© MTS GmbH • Berlin 67


Chapter 4

Programming Example for circular interpolation with the addresses I and J


CONFIGURATION MACHINE MAKINO FX 650
CONTROL FANUC 16M FX650
BLANK DIMENSIONS X+150.000 Y+150.000 Z+025.000
PART POSITION X+400.000 Y+230.000
Top front left corner of the part X+400.000 Y+230.000 Z+135.000
MATERIAL AlMg 1::Aluminium
VISE MAKFX 160
CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0°
CURRENT TOOL T01
TOOLS T01 SLOT MILLING TOOL MS-10.0/045L HSS ISO 1641
TOOL COMPENSATION D01 R005.000 Z+138.000
$G54 X490. Y275. Z135.
0100
N005 G54
N010 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N030 T1 M6
N040 G90 S1500 M3
N050 G0 G43 Z20 H17
N060 Z2. M8
N070 X0. Y0.
N080 G91
N090 G0 X40. Y-40.
N100 G1 Z-7. F150
N110 X-120. F200
N120 Y20.
N130 G2 X40. Y40. I40. J0. F100
N140 G3 X80. Y80. I0. J80.
N150 G1 X5. F200
N160 Y-80.
N170 G3 X-20. Y-20. I0. J-20.
N180 G1 X20. Y-40.
N190 G90 G0 Z20 M9
N200 G91 G28 Z0 M5
N210 G90 G80 G49 G40
N220 M30

68 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Programming Examples for circular interpolation with the address R


CONFIGURATION MACHINE MAKINO FX 650
CONTROL FANUC 16M FX650
BLANK DIMENSIONS X+150.000 Y+150.000 Z+025.000
PART POSITION X+400.000 Y+230.000
Top front left corner of the part X+400.000 Y+230.000 Z+135.000
MATERIAL AlMg 1::Aluminium
VISE MAKFX 160
CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0°
CURRENT TOOL T01
TOOLS T01 SLOT MILLING TOOL MS-10.0/045L HSS ISO 1641
TOOL COMPENSATION D01 R005.000 Z+138.000
$G54 X490. Y275. Z135.
0100
N005 G54
N010 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N030 T1 M6
N040 G90 S1500 M3
N050 G0 G43 Z20. H17
N060 Z2. M8
N070 G0 X40. Y-40.
N080 G1 Z-5. F150
N090 X-80. F200
N100 Y-20.
N110 G2 X-40. Y20. R40. F100
N120 G3 X40. Y100. R80.
N130 G1 X45. F200
N140 Y20.
N150 G3 X25. Y0. R20. F100
N160 G1 X40. Y-40. F200
N170 G0 Z20. M9
N180 G91 G28 Z0 M5
N190 G91 G28 X0 Y0
N200 G90 G80 G40 G40
N210 M30

© MTS GmbH • Berlin 69


Chapter 4

4.4 Cutter radius compensation


Using the cutter radius compensation it is easy to program a work part without directly considering the appli-
cable tool radii. The available work part drawing data can be directly used for programming. The tool data
radii are then automatically considered by the CNC control.

To enable the tool to generate the programmed contour with high precision the tool center point has to travel
on a path running parallel to the programmed path. This tool center point path is called equidisant.

Milling center point paths (equidisant)

2 work part contour

Milling center point paths

One equidisant is the tool center point path running in constant distance to the programmed path (contour) of
the work part. In discontinuous path transitions, i.e. in the inner and outer corners, the transitions become
equidisants, for instance, through insertion of arcs, in accordance with the control-specific rules.

a) In case of inner corners an arc corresponding to the radius of the milling machine is created.
b) In case of outer corner the tool makes a compensating arc.

1 2 1

work part contour Milling center point path


a) Inner corner in milling b) Outer corner in milling

Since machining can be done in two ways the NC control has to be informed if machining is to take place on
the left (command G41) or right (command G42) of the programmed contour.

1 2 left of the contour G41

right of the contour G42

3 programmed contours

Machining directions in milling radius correction

70 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Command: G41
Compensation to the left of the contour (in the cutting direction)
Function: When the cutter radius compensation (CRC) is operative, only the work part con-
tour points are programmed and the control system must be informed whether the
cutter shall move left or right of the programmed contour. The qualifications left or
right apply to the direction in which the tool travels along the contour

G17
NC-Block: G18 G41 G01 [X...] [Y...] [Z...] [D...] [F...]
 
G19
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
D Offset number
F Feedrate
Depending on the selected machining plane there are three possibilities for the necessary coordinates:
G17: G41 G01 [X...] [Y...] [D...] [F...]
G18: G41 G01 [X...] [Z...] [D...] [F...]
G19: G41 G01 [Y...] [Z...] [D...] [F...]
Note: The command of the block which specifies G41 should be G00 or G01. When G41
is specified by the commands G02 or G03 an alarm goes off.
The machining plane (G17, G18 or G19) must be specified before starting the cut-
ter radius compensation.
As long as the cutter radius compensation is operative, no zero shifts can be ef-
fected.
No tool changing functions can be programmed.
Machining cycles cannot be defined or invoked.
Radii of inner corner roundings must be greater than the cutter radius.
Two consecutive movements in Z cannot be programmed.

The following figures demonstrate the milling radius correction by the command G41 which depends on the
position of the tool with reference to the contour to be machined in outside and inside machining.

G41 G41
Milling radius correction in outside machining Milling radius correction in inside machining

© MTS GmbH • Berlin 71


Chapter 4

Command: G42
Compensation to the right of the contour (in the cutting direction)
Function: When the cutter radius compensation (CRC) is operative, only the work part con-
tour points are programmed and the control system must be informed whether the
cutter shall move left or right of the programmed contour. The qualifications left or
right apply to the direction in which the tool travels along the contour

G17
NC-Block: G18 G42 G01 [X...] [Y...] [Z...] [D...] [F...]
 
G19
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
D Offset number
F Feedrate
Depending on the selected machining plane there are three possibilities for the necessary coordinates:
G17: G42 G01 [X...] [Y...] [D...] [F...]
G18: G42 G01 [X...] [Z...] [D...] [F...]
G19: G42 G01 [Y...] [Z...] [D...] [F...]
Note: The command of the block which specifies G42 should be G00 or G01. When G42
is specified by the commands G02 or G03 an alarm goes off.
The machining plane (G17, G18 or G19) must be specified before starting the cut-
ter radius compensation.
As long as the cutter radius compensation is operative, no zero shifts can be ef-
fected.
No tool changing functions can be programmed.
Machining cycles cannot be defined or invoked.
Radii of inner corner roundings must be greater than the cutter radius.
Two consecutive movements in Z cannot be programmed.

The following figures demonstrate the milling radius correction by the command G42 which depends on the
position of the tool with reference to the contour to be machined in outside and inside machining.

G42 G42
Milling radius correction in outside machining Milling radius correction in inside machining

72 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Command: G40
Cancel the cutter radius compensation
Function: The command G40 cancels the cutter radius compensation activated by the com-
mands G41 or G42.
NC-Block: G40 G01 [X...] [Y...] [Z...] [F...]
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
F Feedrate
Depending on the selected machining plane there are three possibilities for the necessary coordinates:
G17: G40 G01 [X...] [Y...] [F...]
G18: G40 G01 [X...] [Z...] [F...]
G19: G40 G01 [Y...] [Z...] [F...]
Note: The command of the block which specifies G40 should be G00 or G01. When G40
is specified by the command G02 or G03 an alarm goes off.
No tool changing functions can be programmed.
At the end of the program the cutter radius compensation must be canceled, since
the center of the tool cannot be positioned at the end point, and remains deviated
by the cutter radius compensation value.

Programming with the cutter radius compensation

When the cutter radius compensation is applied, the following three steps must be considered:
1. Start-up the cutter radius compensation
2. Offset mode
3. Cancel the cutter radius compensation

Start-up the cutter radius compensation


This is the movement with which the system activates the cutter radius compensation. However, a few condi-
tions must be fulfilled beforehand. The machining plane and the offset number must be selected. The CNC-
control reads the next two NC-blocks to initialize the cutter radius compensation. An additional movement
must be programmed in the machine plane (example b), otherwise (example a) the cutter radius compensa-
tion is not considered, i.e. the tool center moves to the next programmed point without compensation.

If an infeed is subsequently programmed in two steps (see block 12 and 13), then for the next block the same
distance must be programmed in the machining plane as in the block before the infeed (see block 11 and
12).

Offset mode
In the offset mode, the cutter radius is considered for all movements (G00-G03). The CNC-control reads the
respective next two NC-blocks in order to calculate the basis for the travel movements. In these NC-blocks it
is therefore necessary to also program movements in the machining plane.

Cancel the cutter radius compensation


When the cutter radius compensation is canceled, a travel motion must be programmed in the machining
plane.

© MTS GmbH • Berlin 73


Chapter 4

Example a Example b
$G54 X388 Y270 Z135 $G54 X388 Y270 Z135
03000 04000
N002 G54 N002 G54
N003 G90 G49 G80 G40 G17 G21 N003 G90 G49 G80 G40 G17 G21
N004 G91 G28 Z0 M9 N004 G91 G28 Z0 M9
N005 T1 M6 N005 T1 M6
N006 G90 S1500 M3 N006 G90 S1500 M3
N007 G0 G43 Z20 H17 N007 G0 G43 Z20 H17
N008 X0 Y0 M8 N008 G0 X0 Y0 M8
N009 G91 N009 G91
N010 G41 G0 X15 Y10 D1 N010 G41 G0 X15 Y9 D1
N011 N011 Y10
N012 Z-38 N012 Z-38
N013 G1 Z-12 F150 N013 G1 Z-12 F150
N014 Y40 F250 N014 Y40 F250

N015 X50 N015 X50


N016 Y-30 N016 Y-30
N017 G1 X-65 N017 G1 X-65
N018 G0 Z20 M9 N018 G0 Z20 M9

N019 G40 X-15 Y-20 N019 G40 X-15 Y-20


N020 G90 G0 Z20 M9 N020 G90 G0 Z20 M9
N021 G91 G28 Z0 M5 N021 G91 G28 Z0 M5
N022 G90 G80 G49 G40 N022 G90 G80 G49 G40
N023 M30 N023 M30

74 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Tool approach and retreat movements

The cutter radius compensation is activated within a block. This means that the cutter radius compensation
must at the latest be selected when the first contour point is approached.

Activate Cutter Radius Compensation

Additionally, contour-parallel or tangential approaching motions are also often programmed.

Contour-parallel Approach Tangential Approach in a Quadrant

© MTS GmbH • Berlin 75


Chapter 4

The cutter radius compensation can only be deactivated after the last contour point has been reached.
Hence, the cutter radius compensation is canceled after this travel motion.

Cancel Cutter Radius Compensation

As for approach motions, contour-parallel or tangential movements are also programmed for tool withdrawal.

Contour-parallel Retreat Tangential Retreat

76 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Programming Example
CONFIGURATION MACHINE MAKINO FX 650
CONTROL FANUC 16M FX650
BLANK DIMENSIONS X+150.000 Y+150.000 Z+025.000
PART POSITION X+400.000 Y+230.000
Top front left corner of the part X+400.000 Y+230.000 Z+135.000
MATERIAL AlMg 1::Aluminium
VISE MAKFX 160
CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0°
CURRENT TOOL T01
TOOLS T01 SLOT MILLING TOOL MS-10.0/045L HSS ISO 1641
TOOL COMPENSATION D01 R005.000 Z+138.000

$G54 X490 Y275 Z135


0100
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 T1 M6
N025 G90 S1500 M3
N030 G0 G43 Z20 H17
N035 Z2 M8
N040 X50 Y-50
N045 G1 Z-5 F150
Activate cutter radius compensation
N050 G1 X48 Y-48 G41 D1
Tangential approach in a quadrant
N055 G3 X40 Y-40 R8
N060 G1 X-80 F200
N065 Y-20
N070 G2 X-40 Y20 R40 F100

N075 G3 X40 Y100 R80

© MTS GmbH • Berlin 77


Chapter 4

N080 G1 X45 F200


N085 Y20
N090 G3 X25 Y0 R20 F100

N095 G1 X40 Y-40 F200


Tangential retreat in a quadrant
N100 G3 X48 Y-48 R8
Cancel cutter radius compensation
N105 G40 G1 X50 Y-50
N110 G90 G0 Z20 M9
N115 G91 G28 Z0 M5
N120 G90 G80 G49 G40
N125 M30

78 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

4.5 Tool length compensation

Using the tool compensation values it is easy to program a work part without directly considering the applica-
ble tool lengths or tool radii. The available work part drawing data can be directly used for programming. The
tool data, lengths as well as radii of the milling machines or indexable inserts are automatically considered by
the CNC control.

L1 L3
L2

T-slot cutter drill core drill

When programming an NC-program in absolute dimensioning, the control requires a coordinate system as
well as information on the lengths of all employed tools. For this it is necessary to measure the length L, i.e.
the distance between the tool setup point B and the cutting tip, and to enter it into the control.

B B tool setup point

L length = distance of the cutting tip to the


tool setup point in Z
L

R radius of the milling tool

R
Tool compensation values

A tool length compensation with reference to the reference point enables the adjustment between the set and
actual tool length, as in the case of finishing the tool. This tool length value has to be available to the control.

© MTS GmbH • Berlin 79


Chapter 4

It is possible to offset the movement command in the Z-direction on the plus or minus side with the compen-
sation value by commanding:
G43 plus side offset
G44 minus side offset

To use the tool length compensation, the required compensation storage is usually specified with the com-
mand G43.

Command: G43
Tool length compensation in plus side offset
Function: For the programmed movement in the Z-direction, the command G43 considers the
compensation value in the selected compensation storage on the plus side.
NC-Block: G43 [Z...] [H...]
Optional Addresses: Z Z-Coordinate of the Target Point
H offset number
Note: An offset number for the compensation value of the tool is specified by the H ad-
dress. In the FANUC control 32 codes are available (from H01 to H32).
H00 deactivates the tool length compensation!

Programming example: G90 G00 G43 Z2 H03

with G43

H03
2

G90 G00 G43 Z2 H03

80 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Command: G44
Tool length compensation in minus side offset
Function: For the programmed movement in the Z-direction, the command G43 considers the
compensation value in the selected compensation storage on the minus side.
NC-Block: G44 [Z...] [H...]
Optional Addresses: Z Z-Coordinate of the Target Point
H offset number

Command: G49
Cancel tool length compensation
Function: Immediately cancels the tool length compensation activated by the commands G43
and G44.
NC-Block: ... G49 ...
Note: The tool length compensation also can be canceled by programming the command
G43 or G44 with the parameter H00

© MTS GmbH • Berlin 81


Chapter 4

4.6 Coordinate rotation

Command: G68
Coordinate rotation
Function: With the command G68 the current coordinate system is rotated by a certain angle.
All coordinates entered hereafter refer to the rotated coordinate axes.

G17
NC-Block: G18 G68 [α...] [β...] [R...]
 
G19
Optional Addresses: α Coordinate of the center of rotation in the selected machining plane
β Coordinate of the center of rotation in the selected machining plane
R Rotation angle

center of rotation
α
rotation angle

X
β

1 2

W
Programming Example:
Depending on the selected machining plane there are three possibilities of the coordinates:
G17 X Y - plane G17 G68 [X...] [Y...] [R...] ;
G18 Z X - plane G18 G68 [Z...] [X...] [R...] or
G19 Y Z - plane. G19 G68 [Y...] [Z...] [R...]
Note: The coordinates of the center of the rotation are always in absolute values.
The machining plane (G17, G18 or G19) need not be specified in the same block
with the command G68.
If no values for α and β are specified the actual position becomes the center of
rotation !

4.7 Cancel coordinate rotation

Command: G69
Cancel coordinate rotation
Function: With the command G69, the rotated coordinate system is turned back to its original
position. All coordinates entered hereafter refer to the original coordinate axes.
Note: The command G69 can be specified in the same block with other commands.

82 MTS TeachWare • CNC-Milling • Student’s Book


Interpolation with cutter radius compensation

Exercise:

The aluminum plate outlined in the drawing with the blank dimensions of 100x90x25 is to be machined on a
vertical milling machine (machining plane G17).

contour depth 5mm

pocket depth 15 mm
R
center of rotation

2 rotation angle
3 4

CONFIGURATION MACHINE MAKINO FX 650


CONTROL FANUC 16M FX650
BLANK DIMENSIONS X+100.000 Y+090.000 Z+025.000
PART POSITION X+400.000 Y+250.000
Top front left corner of the part X+400.000 Y+250.000 Z+135.000
MATERIAL AlMg 1::Aluminium
VISE MAKFX 160
CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0°
CURRENT TOOL T02
TOOLS T01 SLOT MILLING TOOL MS-14.0/053L HSS ISO 1641
T02 SLOT MILLING TOOL MS-20.0/075L HSS ISO 1641
TOOL COMPENSATION D01 R007.000 Z+148.000
D02 R010.000 Z+147.000

© MTS GmbH • Berlin 83


Chapter 4

$G54 X400 Y250 Z135


$G57 X450 Y295 Z135
O 068
N015 G54
N020 G90 G49 G80 G40 G17 G21
N025 G91 G28 Z0 M9
N030 G91 G28 X0 Y0
N035 T02 M6
N040 G90 S1800 M3
N045 G0 G43 Z20 H18
N050 X115 Y50
N055 Z2
N060 G1 Z-5 F200 M8
N065 G1 G41 X95 Y30 R20 D2 F200
N070 G1 Y20
N075 G2 X80 Y5 R15
N080 G1 X20
N085 G2 X5 Y20 R15
N090 G1 Y70
N095 G2 X20 Y85 R15
N100 G1 X80
N105 G2 X95 Y70 R15
N110 G1 Y30
N115 G3 X115 Y10 R20
N120 G40 G1 Y30
N125 G0 Z20 M9
N130 G91 G28 Z0 M5
N135 T01 M6
N140 G90 S1800 M3
N145 G0 G43 Z20 H17
N150 X50 Y45
N155 G57
Coordinate rotation with the angle 45° at the position X50 Y45
N160 G68 R45
N165 G91 M8
Rectangular pocket cycle
N170 G65 P9140 U40 V30 D2 R-18 Z-17 F90 S40 H15 Q6 M1
Cancel coordinate rotation
N175 G69 G80 G90
N180 G0 Z20 M9
N185 G91 G28 Z0 M5
N190 G90 G49 G40
N195 M30

84 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5 Cycles
5.1 Function and use of cycles on a CNC milling machine
In CNC-controls, predefined machining cycles are available which can be invoked with specific commands.
Similar to subprograms, they contain prevalent command sequences. These machining cycles can be divided
into three different types:
• drilling cycles
• milling cycles
• special cycles

Drilling cycles
For drilling cycles, also called canned
cycles in the FANUC-control, specific
drilling, reaming or threading tasks are
Z programmed by a command in conjunc-
tion with information on the required pa-
initial point rameter. The CNC-control then executes
all operations, e.g. for threading.
safety plane

depth

Milling cycles
For milling cycles, also called macro in
the FANUC-control, specific milling op-
erations, e.g. circular or rectangular
pockets, are executed. For these cycles,
the CNC-control must perform extensive
calculations, e.g. to generate the individ-
ual travel motions for a rectangular
pocket.

Z initial point
safety plane

depth

© MTS GmbH • Berlin 85


Chapter 5

Special cycles
Belonging to the special cycles are e.g.
various drill patterns. Combined with
drilling cycles, e.g. holes on a circle or in
a row can thus be easily programmed.

Safety planes
Multiple repetition of these cycles is common e.g. with drilling holes on a divided circle or on a straight line.

In the execution of a repeated cycle the


Z tool will be retracted to the initial point
before moving (in rapid traverse motion)
to the next target position.

Programming the Z-coordinate of this


initial point initial point (the Y- or X-coordinate ac-
cordingly, if G18 or G19 have been pro-
safety plane grammed in the machining plane selec-
tion) is not necessary, it will be estab-
lished from the actual tool position at the
X moment of the cycle invocation.

depth

Please make sure that the Z-coordinate of this initial point (i.e. the position of the retracted tool) is sufficiently
defined above the work part contour. After the cycle is invoked, the tool must be positioned to the
Z-coordinate of this initial point. Subsequently the tool will be moved in the rapid traverse mode from this Z-
position down to the safety plane.

After completion of the cycle the tool is retracted in a rapid motion to the Z-coordinate of the initial point.

86 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.2 Canned cycles (drilling functions)


5.2.1 Definition
A canned cycle is a preset sequence of commands in a CNC-control and can shorten the programming by
using them for recurrent geometric elements. The canned cycle then defines the geometry and machining
sequence.

Sequence of a canned cycle


The basic sequence of a canned cycle is subsequently illustrated.

1
initial point

2 6

3 5
Z
4

1 positioning in X and Y 4 operation at the bottom of the hole


2 move to the safety plane 5 retract to the safety plane
3 drilling 6 retract to the Z-coordinate of the initial point

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

© MTS GmbH • Berlin 87


Chapter 5

A canned cycle is programmed with the corresponding G-command and optional addresses.

 G91  G98
    G... X... Y... Z... R... P... Q... F... L...
 G90  G99

optional addresses
G90 / G91 select the dimensioning type for the coordinates of the depth and the safety plane
G98 / G99 select the return point level
G specifies the canned cycle mode
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
Q cutting amount by programming G73 or G83
shift amount by programming G76 or G87
F feedrate
L number of repeats
If L is not specified, the canned cycle is only executed once.
If L0 is specified, then the data for the cycle is only stored, but the cycle is not performed!

A canned cycle is defined by the previously described command and executed according to L.

The canned cycle data remains stored until it is deactivated with the command G80. Therefore, following the
definition for canned cycle, it is executed for every programmed travel movement until it is deleted by the
command G80.

Note: These subsequent travel movements are programmed by the coordinate specifica-
tions, not by G00, G01, G02!
Otherwise the canned cycle is deleted!

Command: G80
cancel the canned cycle
Function: The selected canned cycle and its data is deleted.
NC-Block: G80 [X...] [Y...] [Z...] [F...] [S...] [T...] [M...]
Optional Addresses: X X-Coordinate of the Target Point
Y Y-Coordinate of the Target Point
Z Z-Coordinate of the Target Point
F Feedrate
S Speed
T Tool Change
M Additional Function
Note: The data for safety plane and depth is also deleted.
The feedrate F remains even after the canned cycle is deactivated.

88 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Absolute - incremental dimensioning

For programming canned cycles, the applied dimensioning systems must be particularly considered!

According to whether an absolute (G90) or incremental (G91) dimensioning system was selected, the input
for depth (Z-position of the bottom of the hole) and for the Z-position of the safety plane must be changed
(see following examples).

Infeed for G90


Input for depth and the safety plane pertain to the value Z=0 in the work part coordinate system!

Programming example: G90


G81 X... Y... Z-10 R2 Q... F... L...

G90
initial point

R= 2
Z=-10
Z = 0 (work part
R 2mm coordinate system)

10mm
Z

Infeed for G91


The input for depth and the safety plane pertain to the initial point!

Programming example: G91


G81 X... Y... Z-12 R-98 Q... F... L...

G91
initial point

R=-98
100 mm Z=-12
Z = 0 (work part
R 2mm coordinate system)

10mm
Z

© MTS GmbH • Berlin 89


Chapter 5

Return point level (G98,G99)

Tool withdrawal after machining is controlled by the G-commands G98 and G99.

G98: return to the initial point


G99: return to the safety plane R

For G98, the tool returns in rapid traverse to the initial point after the drilling depth Z has been reached. The
Z-coordinate for the initial point is the last Z-position of the tool before the cycle was defined!

G98
initial point

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

For G99, the tool returns in rapid traverse to the safety plane (R) after the drilling depth Z has been reached.

G99
initial point

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

90 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.2.2 Survey
Subsequently, the canned cycles for the control FANUC 16 M are listed. The availability of the cycles varies
according to machine.

G-Code Drilling Operation at the bottom Retraction Application


-Z direction of a hole +Z direction

G73 intermittent - rapid traverse high -speed peck drill-


feed ing cycle

G74 cutting feed spindle CW cutting feed left-hand tapping cycle

G76 cutting feed spindle orientation rapid traverse fine boring cycle

G81 cutting feed - rapid traverse drilling cycle


spot drilling cycle

G82 cutting feed dwell Time rapid traverse drilling cycle


counterboring cycle

G83 intermittent - rapid traverse peck drilling cycle


feed

G84 cutting feed spindle CCW cutting feed tapping cycle

G85 cutting feed - cutting feed boring cycle

G86 cutting feed spindle Stop rapid traverse boring cycle

G87 cutting feed spindle Stop rapid traverse boring cycle


back boring cycle

G88 cutting feed dwell Time manual/ boring cycle


spindle Stop rapid traverse

G89 cutting feed dwell Time cutting feed boring cycle

The defined canned cycles are deactivated with the command G80.

G-Code Drilling Operation at the bottom Retraction Application


-Z direction of a hole +Z direction

G80 - - - cancel

© MTS GmbH • Berlin 91


Chapter 5

5.2.3 Application
The simulator is to be set-up according to the following set-up sheet for all subsequent program examples.

Set-up-sheet
CONFIGURATION MACHINE MAKINO FX 650
CONTROL FANUC 16M FX650

BLANK DIMENSIONS X+150.000 Y+150.000 Z+025.000

PART POSITION X+400.000 Y+230.000


Top front left corner of the part X+400.000 Y+230.000 Z+135.000

MATERIAL AlMg 1::Aluminium

VISE MAKFX 160


CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0°

CURRENT TOOL T01


TOOLS T01 SLOT MILLING TOOL MS-10.0/045L HSS ISO 1641
T02 SLOT MILLING TOOL MS-20.0/075L HSS ISO 1641
T03 CORE DRILL DC-08.0/060 HSS ISO 3294
T04 DRILL DR-05.00/087 HSS ISO 235
T05 TAP MS-16.0/063L HSS ISO 1641
T06 FACE MILLING CUTTER TA-M06.0/1.00 HSS ISO 2857
T07 RADIUS CUTTER DR-05.00/087 HSS ISO 235
T08 REAMER MS-08.0/011K HSS ISO 1641
T09 CORE DRILL ME-20.0/038K HSS ISO 1641
T10 T-SLOT CUTTER RE-D10.0/H7 HSS ISO 521
T11 CORNER TOOL TYPE A RC-12/06.0/12 HSS ISO 1641
T12 CORNER TOOL TYPE B CA-20/08.0/60 HSS ISO 3859
T13 INSERT TIP DRILL CB-20/08.0/60 HSS ISO 3859
T14 STEP DRILL DI-20.00/54.00-HM 90 ISO 9766
T15 CONCAVE MILLING TOOL DS-11.5/06.4-090 HSS ISO 3439
T16 DRILL DC-16.0/090 HSS ISO 3294

TOOL COMPENSATION D01 R010.000 Z+143.000


D02 R010.000 Z+147.000
D03 R000.000 Z+112.500
D04 R000.000 Z+176.500
D05 R008.000 Z+135.000
D06 R000.000 Z+132.500
D07 R000.000 Z+176.500
D08 R004.000 Z+104.000
D09 R010.000 Z+106.000
D10 R000.000 Z+183.000
D11 R006.000 Z+135.500
D12 R010.000 Z+104.500
D13 R005.381 Z+104.500
D14 R000.000 Z+154.000
D15 R000.000 Z+195.500
D16 R000.000 Z+118.500
D17 R025.000 Z+100.000
D18 R008.000 Z+110.000
D19 R008.000 Z+117.000
D20 R000.000 Z+142.500
D21 R004.000 Z+110.000
D22 R011.000 Z+147.000
D25 R009.000 Z+135.000

92 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Drilling positions

The program examples are designed so that a master program defines the respective cycle. The individual
drilling positions are specified in a subprogram (O7300.FNC) and can be applied by all cycles

Note: The individual positions are only programmed with the coordinates, i.e. without the
commands G00, G01, G02 or G03!

O7300.FNC
N10 G90 X18 Y18 M8 first position
N15 Y82 second position
N20 X82 third position
N25 G98 Y18 fourth position

N30 G80
N35 M99

© MTS GmbH • Berlin 93


Chapter 5

5.2.4 high-speed peck drilling cycle G73

Command: G73
high-speed peck drilling cycle
Function: The fixed cycle G73 is used for high-speed peck drilling with chip breaking. After
infeed, the tool is withdrawn by the value d for chip breaking. This value can be set
in the CNC-control. After the complete infeed depth has been reached, the tool is
returned in rapid traverse to the initial point.
NC-Block: G98 G73 X... Y... Z... R... Q... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
Q cutting amount
F feedrate

G98 G73
initial point

Q d

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
d : lift-off value Q : cutting amount

94 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G73 high-speed peck drilling with G98

$G54 X400 Y250 Z140

O 7398
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G49 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M3
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

drilling with G73


N065 T04 M06
N070 G90 S2200 M3
N075 G0 G43 Z20 H20
N080 G98 G73 Z-35 R2 Q15 F80 L0 G98 return to the initial point
G73 high-speed peck drilling cycle
Z-35 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
Q15 cutting amount 15mm
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for drilling)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for drilling
N095 G0 Z20 M09
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 95


Chapter 5

Command: G73
high-speed peck drilling cycle
Function: The fixed cycle G73 is used for high-speed peck drilling with chip breaking. After
infeed, the tool is withdrawn by the value d for chip breaking. This value can be set
in the CNC-control. After the complete infeed depth has been reached, the tool is
returned in rapid traverse to the safety plane.
NC-Block: G99 G73 X... Y... Z... R... Q... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
Q cutting amount
F feedrate

G99 G73
initial point

Q d

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
d : lift-off value Q : cutting amount

96 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G73 high-speed peck drilling with G99

$G54 X400 Y250 Z140

O 73
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G49 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

drilling with G73


N065 T04 M06
N070 G90 S2200 M3
N075 G0 G43 Z20 H20
N080 G99 G73 Z-35 R2 Q15 F80 L0 G99 return to the safety plane R
G73 high-speed peck drilling cycle
Z-35 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
Q15 cutting amount 15mm
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for drilling)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for drilling
N095 G0 Z20 M09
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 97


Chapter 5

5.2.5 left-hand tapping cycle G74

Command: G74
left-hand tapping cycle
Function: The fixed cycle G74 is for manufacturing left-hand threads. Speed S and the spin-
dle rotation direction M04 is programmed before the tapping cycle is defined. After
the thread depth has been reached, the control automatically switches to M03 for
withdrawal. The rotation direction is switched back to M04 after the safety plane has
been reached. For the fixed cycle G74, the safety plane should be at least 7mm
above the surface of the work part. The parameter P (dwell time) is only effective in
programming if it has also been set in the control. The value resulting from the mul-
tiplication of the spindle speed (1/min) and pitch of the thread to be manufactured
must be programmed in the address F.

F = spindle speed (1/min) • thread pitch (mm)

NC-Block: G98 G74 X... Y... Z... R... P... F...


Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G98 G74

initial point

M04

R
>7mm M04

tapping Z
M03

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
M03 : spindle rotation clockwise M04 : spindle rotation counter-clockwise

98 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G74 left-hand tapping cycle G98

$G54 X400 Y250 Z140

O 7498
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G98 G73 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5

left-hand tapping with G74


N105 T06 M06
N110 G90 S1000 M04
N115 G0 G43 Z20 H22
N120 G98 G74 Z-30 R7 P1000 F1000 L0 G98 return to the initial point
G74 left-hand tapping cycle
Z-30 thread depth
R7 Z-position of the safety plane
P1000 dwell time at the bottom of the hole (1 sec)
F1000 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for tapping)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for tapping
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 99


Chapter 5

Command: G74
left-hand tapping cycle
Function: The fixed cycle G74 is for manufacturing left-hand threads. Speed S and the spin-
dle rotation direction M04 is programmed before the tapping cycle is defined. After
the thread depth has been reached, the control automatically switches to M03 for
withdrawal. The rotation direction is switched back to M04 after the safety plane has
been reached. For the fixed cycle G74, the safety plane should be at least 7mm
above the surface of the work part. The parameter P (dwell time) is only effective in
programming if it has also been set in the control. The value resulting from the mul-
tiplication of the spindle speed (1/min) and pitch of the thread to be manufactured
must be programmed in the address F.
F = spindle speed (1/min) • thread pitch (mm)

NC-Block: G99 G74 X... Y... Z... R... P... F...


Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G99 G74

initial point

M04

R
>7mm M04

tapping Z
M03

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
M03 : spindle rotation clockwise M04 : spindle rotation counter-clockwise

100 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G74 left-hand tapping cycle G99

$G54 X400 Y250 Z140

O 74
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G98 G73 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5

left-hand tapping with G74


N105 T06 M06
N110 G90 S1000 M04
N115 G0 G43 Z20 H22
N120 G99 G74 Z-30 R7 P1000 F1000 L0 G99 return to the safety plane R
G74 left-hand tapping cycle
Z-30 thread depth
R7 Z-position of the safety plane
P1000 dwell time at the bottom of the hole (1 sec)
F1000 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for tapping)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for tapping
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 101


Chapter 5

5.2.6 fine boring cycle G76

Command: G76
fine boring cycle
Function: The fine boring cycle G76 is used for finishing, whereby a boring bar is used. Addi-
tionally, after an oriented spindle stop the tool can be shifted to and removed
through the center of the hole. Shift Q is incrementally defined in mm. Alternatively,
it can be programmed with the parameter I for the X-direction and with the pa-
rameter J for the Y-direction. On the backside of the hole, the tool is again posi-
tioned in the center so that this side can be machined (e.g. counter-boring). Fol-
lowing the boring operation, an oriented spindle stop is again activated and the tool
is shifted, so that it can be removed from the bore hole.

 Q. . . F. . . 
NC-Block: G98 G76 X... Y... Z... R...  
 I. . . J. . . F. . .
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
Q shift amount I X- coordinate of the shift amount
J Y- coordinate of the shift amount
F feedrate

G98 G76
initial point

Q
Q Z
oriented
spindle stop
- - - - : rapid traverse R : safety plane
: cutting feed Z : depth
Q : shift amount

102 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Command: G76
fine boring cycle
Function: The fine boring cycle G76 is used for finishing, whereby a boring bar is used. Addi-
tionally, after an oriented spindle stop the tool can be shifted to and removed
through the center of the hole. Shift Q is incrementally defined in mm. Alternatively,
it can be programmed with the parameter I for the X-direction and with the pa-
rameter J for the Y-direction. On the backside of the hole, the tool is again posi-
tioned in the center so that this side can be machined (e.g. counter-boring). Fol-
lowing the boring operation, an oriented spindle stop is again activated and the tool
is shifted, so that it can be removed from the bore hole.

 Q. . . F. . . 
NC-Block: G99 G76 X... Y... Z... R...  
 I. . . J. . . F. . .
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
Q shift amount I X- coordinate of the shift amount
J Y- coordinate of the shift amount
F feedrate

G99 G76
initial point

R Q

Q
Q Z
oriented
spindle stop
- - - - : rapid traverse R : safety plane
: cutting feed Z : depth
Q : shift amount

© MTS GmbH • Berlin 103


Chapter 5

5.2.7 drilling cycle, spot drilling cycle G81

Command: G81
drilling cycle, spot drilling cycle
Function: The drilling cycle G81 is used for centering and for drilling minimal depths. The tool
travels to the safety plane R in rapid traverse with respect to the current tool posi-
tion and feeds at the programmed rate F.
NC-Block: G98 G81 X... Y... Z... R... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G98 G81

initial point

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

104 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G81 drilling cycle, spot drilling cycle with G98

$G54 X400 Y250 Z140

O 8198
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering with G81


N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G98 G81 Z-3 R2 F80 L0 G98 return to the initial point
G81 drilling cycle, spot drilling cycle
Z-3 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N045 M98 P7300 subprogram call (4 positions for centering)


N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5
N065 G90 G49 G40
N070 M30

© MTS GmbH • Berlin 105


Chapter 5

Command: G81
drilling cycle, spot drilling cycle
Function: The drilling cycle G81 is used for centering and for drilling minimal depths. The tool
travels to the safety plane R in rapid traverse with respect to the current tool posi-
tion and feeds at the programmed rate F.
NC-Block: G99 G81 X... Y... Z... R... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G99 G81

initial point

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

106 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G81 drilling cycle, spot drilling cycle with G99

$G54 X400 Y250 Z140

O 81
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering with G81


N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 G99 return to the safety plane R
G81 drilling cycle, spot drilling cycle
Z-3 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N045 M98 P7300 subprogram call (4 positions for centering)


N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5
N065 G90 G49 G40
N070 M30

© MTS GmbH • Berlin 107


Chapter 5

5.2.8 drilling cycle, counterboring cycle G82

Command: G82
drilling cycle, counterboring cycle
Function: The fixed cycle G82 is specifically used for drilling blind holes. By programming a
dwell time, high accuracy for the programmed drilling depth is guaranteed. The tool
travels to the safety plane R in rapid traverse with respect to the current tool posi-
tion and feeds at the programmed rate F. Once the programmed depth is attained
and after a possible dwell time, the tool returns in rapid traverse to the initial point.
NC-Block: G98 G82 X... Y... Z... R... P... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G98 G82

initial point

dwell time

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

108 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G82 drilling cycle, counterboring cycle with G98

$G54 X400 Y250 Z140

O 8298
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

counterboring with G82


N065 T01 M06
N070 G90 S1200 M03
N075 G0 G43 Z20 H17
N080 G98 G82 Z-20 R2 P2000 F80 L0 G98 return to the initial point
G82 drilling cycle, counter boring cycle
Z-20 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
P2000 dwell time at the bottom of the hole
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for counterboring)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for counterboring
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 109


Chapter 5

Command: G82
drilling cycle, counterboring cycle
Function: The fixed cycle G82 is specifically used for drilling blind holes. By programming a
dwell time, high accuracy for the programmed drilling depth is guaranteed. The tool
travels to the safety plane R in rapid traverse with respect to the current tool posi-
tion and feeds at the programmed rate F. Once the programmed depth is attained
and after a possible dwell time, the tool moves in rapid traverse to the safety plane
R.
NC-Block: G99 G82 X... Y... Z... R... P... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G99 G82

initial point

dwell time

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

110 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G82 drilling cycle, counterboring cycle with G99

$G54 X400 Y250 Z140

O 82
N005 G54
N010 G90 G49 G80 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

counterboring with G82


N065 T01 M06
N070 G90 S1200 M03
N075 G0 G43 Z20 H17
N080 G99 G82 Z-20 R2 P2000 F80 L0 G99 return to the safety plane R
G82 drilling cycle, counter boring cycle
Z-20 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
P2000 dwell time at the bottom of the hole
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for counterboring)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for counterboring
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 111


Chapter 5

5.2.9 peck drilling cycle G83

Command: G83
peck drilling cycle
Function: The fixed cycle G83 is used for deep hole drilling. Since the tool is moved in rapid
traverse to the safety plane R after every feed, a thorough chip removal is guaran-
teed. Therefore overheating of the tool because of chip accumulation is avoided.
The feed of Q is at feedrate and incremental with respect to the safety plane R and
it is always positively programmed. After chip removal in rapid traverse, the tool is
positioned in rapid traverse for the next feed. The control-specific value d defines
the distance of the positioning point for the next infeed Q with respect to the current
drilling depth. Usually the parameter d is preset to 0,1mm on the CNC-control. After
this position has been reached, the next infeed is activated at feedrate.
NC-Block: G98 G83 X... Y... Z... R... Q... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
Q cutting amount
F feedrate

G98 G83
initial point

Q d

Q
d
Q
Z

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
d : lift-off value Q : cutting amount

112 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G83 peck drilling with G98

$G54 X400 Y250 Z140

O 8398
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

peck drilling with G83


N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G98 G83 Z-35 R2 Q15 F80 L0 G98 return to the initial point
G83 peck drilling cycle
Z-35 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
Q15 cutting amount 15mm
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for drilling)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for drilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 113


Chapter 5

Command: G83
peck drilling cycle
Function: The fixed cycle G83 is used for deep hole drilling. Since the tool is moved in rapid
traverse to the safety plane R after every feed, a thorough chip removal is guaran-
teed. Therefore overheating of the tool because of chip accumulation is avoided.
The feed of Q is at feedrate and incremental with respect to the safety plane R and
it is always positively programmed. After chip removal in rapid traverse, the tool is
positioned in rapid traverse for the next feed. The control-specific value d defines
the distance of the positioning point for the next infeed Q with respect to the current
drilling depth. Usually the parameter d is preset to 0,1mm on the CNC-control. After
this position has been reached, the next infeed is activated at feedrate.
NC-Block: G99 G83 X... Y... Z... R... Q... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
Q cutting amount
F feedrate

G99 G83
initial point

Q d

Q
d
Q
Z

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
d : lift-off value Q : cutting amount

114 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G83 peck drilling with G99

$G54 X X400 Y250 Z140

O 83
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

peck drilling with G83


N065 T04 M06
N070 G90 G43 Z20 H20
N075 G0 S2200 M03
N080 G99 G83 Z-35 R2 Q15 F80 L0 G99 return to the safety plane R
G83 peck drilling cycle
Z-35 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
Q15 cutting amount 15mm
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for drilling)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for drilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 115


Chapter 5

5.2.10 tapping cycle G84

Command: G84
tapping cycle
Function: The fixed cycle G84 is for cutting metric and Withworth right-hand threads. The
spindle rotation direction M03 as well as the spindle speed S must be programmed
before defining the tapping cycle. After the thread depth has been reached, the
spindle is automatically switched to rotation direction M04 and moved back to the
safety plane. For this cycle, the safety plane should be programmed at least 7mm
above the work part surface. Dwell time P is only effective for programming if it is
also set in the CNC-control. The value to be programmed for feedrate F is the mul-
tiplication of spindle speed and thread pitch.

F = spindle speed (1/min) • thread pitch (mm)

NC-Block: G98 G84 X... Y... Z... R... P... F...


Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G98 G84

initial point

M03

R
>7mm M03

tapping Z
M04

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
M03 : spindle rotation clockwise M04 : spindle rotation counter-clockwise

116 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G84 tapping cycle with G98

$G54 X400 Y250 Z140

O 8498
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H04
N080 G98 G83 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5

tapping with G84


N105 T05 M05
N110 G90 S1000 M03
N115 G0 G43 Z20 H05
N120 G98 G84 Z-30 R7 P1000 F1000 L0 G98 return to the initial point
G84 tapping cycle
Z-30 thread depth
R7 Z-position of the safety plane
P1000 dwell time at the bottom of the hole (1 sec)
F1000 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for tapping)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for tapping
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 117


Chapter 5

Command: G84
tapping cycle
Function: The fixed cycle G84 is for cutting metric and Withworth right-hand threads. The
spindle rotation direction M03 as well as the spindle speed S must be programmed
before defining the tapping cycle. After the thread depth has been reached, the
spindle is automatically switched to rotation direction M04 and moved back to the
safety plane. For this cycle, the safety plane should be programmed at least 7mm
above the work part surface. Dwell time P is only effective for programming if it is
also set in the CNC-control. The value to be programmed for feedrate F is the mul-
tiplication of spindle speed and thread pitch.

F = spindle speed (1/min) • thread pitch (mm)

NC-Block: G99 G84 X... Y... Z... R... P... F...


Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G99 G84

initial point

M03

R
>7mm M03

tapping Z
M04

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
M03 : spindle rotation clockwise M04 : spindle rotation counter-clockwise

118 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G84 tapping cycle with G99

$G54 X400 Y250 Z140

O 84
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G98 G83 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
tapping with G84
N105 T05 M05
N110 G90 S1000 M03
N115 G0 G43 Z20 H21
N120 G99 G84 Z-30 R7 P1000 F1000 L0 G99 return to the safety plane R
G84 tapping cycle
Z-30 thread depth
R7 Z-position of the safety plane
P1000 dwell time at the bottom of the hole (1 sec)
F1000 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for tapping)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for tapping
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 119


Chapter 5

5.2.11 boring cycle (reaming) G85

Command: G85
boring cycle (reaming)
Function: The fixed cycle G85 is for reaming. The speed for reaming as well as the spindle
rotation direction must be programmed before this cycle is defined. The tool moves
in rapid traverse from the initial position to the safety plane R and reams the hole to
the programmed depth at feedrate. The tool then returns to the initial point at feed
rate, while maintaining rotation direction.
NC-Block: G98 G85 X... Y... Z... R... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G98 G85

initial point

M03

R
M03

reaming Z
M03

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
M03 : spindle rotation clockwise

120 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G85 boring cycle (reaming) with G98

$G54 X400 Y250 Z140

O 8598
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G90 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G99 G83 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5

reaming with G85


N105 T07 M06
N110 G90 S1000 M03
N115 G0 G43 Z20 H23
N120 G98 G85 Z-25 R2 F50 L0 G98 return to the initial point
G85 boring cycle (reaming)
Z-25 reaming depth
R2 Z-position of the safety plane
F50 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for reaming)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for reaming
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 121


Chapter 5

Command: G85
boring cycle (reaming)
Function: The fixed cycle G85 is for reaming. The speed for reaming as well as the spindle
rotation direction must be programmed before this cycle is defined. The tool moves
in rapid traverse from the initial position to the safety plane R and reams the hole to
the programmed depth at feedrate. The tool then moves to the safety plane R at
feed rate and while maintaining rotation direction.
NC-Block: G99 G85 X... Y... Z... R... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G99 G85

initial point

M03

R
M03

reaming Z
M03

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth
M03 : spindle rotation clockwise

122 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G85 boring cycle (reaming) with G99

$G54 X400 Y250 Z140

O 85
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G90 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G99 G83 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5

reaming with G85


N105 T07 M06
N110 G90 S1000 M03
N115 G0 G43 Z20 H23
N120 G99 G85 Z-25 R2 F50 L0 G99 return to the safety plane R
G85 boring cycle (reaming)
Z-25 reaming depth
R2 Z-position of the safety plane
F50 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for reaming)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for reaming
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 123


Chapter 5

5.2.12 boring cycle with retraction in rapid traverse G86

Command: G86
boring cycle with retraction in rapid traverse
Function: The fixed cycle G86 is used for boring holes in a single operation. The tool moves
in rapid traverse to the safety plane and then feeds at the programmed rate to the
specified hole depths. A spindle stop is activated at the bottom of the hole. The tool
is then removed in rapid traverse to the initial point.
NC-Block: G98 G86 X... Y... Z... R... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G98 G86
G8G861
initial point

Z
spindle stop

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

124 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G86 boring with retraction in rapid traverse with G98

$G54 X400 Y250 Z140

O 8698
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

drilling with G86


N065 T08 M06
N070 G90 S2000 M03
N075 G0 G43 Z20 H24
N080 G98 G86 Z-25 R2 F80 L0 G98 return to the initial point
G86 boring cycle with retraction in rapid traverse
Z-25 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for drilling)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for drilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 125


Chapter 5

Command: G86
boring cycle with retraction in rapid traverse
Function: The fixed cycle G86 is used for boring holes in a single operation. The tool moves
in rapid traverse to the safety plane and then feeds at the programmed rate to the
specified hole depths. A spindle stop is activated at the bottom of the hole. The tool
is then removed in rapid traverse to the safety plane R.
NC-Block: G99 G86 X... Y... Z... R... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G99 G86

initial point

Z
spindle stop

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

126 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G86 boring with retraction in rapid traverse with G99

$G54 X400 Y250 Z140

O 86
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

drilling with G86


N065 T08 M06
N070 G90 S2000 M03
N075 G0 G43 Z20 H24
N080 G99 G86 Z-25 R2 F80 L0 G99 return to the safety plane R
G86 boring cycle with retraction in rapid traverse
Z-25 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
F80 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N085 M98 P7300 subprogram call (4 positions for drilling)


N090 G0 G80 G90 X120 Y120 cancel the canned cycle for drilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G90 G49 G40
N110 M30

© MTS GmbH • Berlin 127


Chapter 5

5.2.13 boring cycle / back boring cycle G87

Command: G87
boring cycle / back boring cycle
Function: The fixed cycle G87 can be used as a normal boring cycle or as a back boring cy-
cle. Programming shift Q specifies a back boring cycle. The cycle behavior during
execution varies depending on this parameter.
NC-Block: G98 G86 X... Y... Z... R... F... (Q...)
Parameter: (Q) shift amount

Command: G87
boring cycle
Function: If Q is not programmed, G87 is interpreted as a normal boring cycle. After the tool
is moved in rapid traverse to the safety plane, the infeed to the programmed depth
is achieved in one machining operation. A spindle stop is activated at the bottom of
the hole. The tool must then be manually moved back to the safety plane R. Then
the control returns the tool in rapid traverse to the initial point.
NC-Block: G98 G87 X... Y... Z... R... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G98 G87

initial point

manual

Z
spindle stop

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

128 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Command: G87
boring cycle
Function: If Q is not programmed, G87 is interpreted as a normal boring cycle. After the tool
is moved in rapid traverse to the safety plane, the infeed to the programmed depth
is achieved in one machining operation. A spindle stop is activated at the bottom of
the hole. The tool must then be minimally lifted from the bottom by hand before the
control moves to the safety plane in rapid traverse.
NC-Block: G99 G87 X... Y... Z... R... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
F feedrate

G99 G87

initial point

manual
Z
spindle stop

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

© MTS GmbH • Berlin 129


Chapter 5

5.2.14 boring cycle G88

Command: G88
boring cycle
Function: The fixed cycle G88 is for boring holes in a single infeed. After the tool is moved in
rapid traverse to the safety plane, the infeed to the programmed depth is achieved
in one machining operation. A spindle stop is activated at the bottom of the hole
after a programmed dwell time. The tool must then be manually moved back to the
safety plane R. The control then returns the tool in rapid traverse to the initial point.
NC-Block: G98 G88 X... Y... Z... R... P... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G98 G88

initial point

manual

Z
spindle stop
after dwell

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

130 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Command: G88
boring cycle
Function: The fixed cycle G88 is for boring holes in a single infeed. After the tool is moved in
rapid traverse to the safety plane, the infeed to the programmed depth is achieved
in one machining operation. A spindle stop is activated at the bottom of the hole
after a programmed dwell time. The tool must then be minimally lifted from the
bottom by hand before the control moves to the safety plane in rapid traverse.
NC-Block: G99 G88 X... Y... Z... R... P... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G99 G88

initial point

manual
Z
spindle stop
after dwell

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

© MTS GmbH • Berlin 131


Chapter 5

5.2.15 boring cycle with dwell time (reaming) G89

Command: G89
boring cycle with dwell time (reaming)
Function: The fixed cycle G89 is for reaming drilled holes. It guarantees a clean wipe of the
hole bottom. The reaming speed as well as the spindle rotation direction must be
programmed before the cycle is defined. The tool travels from the initial position to
the safety plane R in rapid traverse and reams the hole at feedrate to the pro-
grammed depth. The tool dwells there at the programmed dwell time P and returns
then to the safety plane R at feedrate while maintaining rotation direction. It then
moves in rapid traverse to the initial point.
NC-Block: G98 G89 X... Y... Z... R... P... F...
Optional Addresses: G98 return to the initial point
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G98 G89

initial point

reaming Z
dwell time

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

132 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G89 boring cycle with dwell time(reaming) with G98

$G54 X400 Y250 Z140

O 8998
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G99 G83 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5

reaming with G89


N105 T07 M06
N110 G90 S1000 M03
N115 G0 G43 Z20 H23
N120 G98 G85 Z-25 R2 P2000 F50 L0 G98 return to the initial point
G85 boring cycle (reaming)
Z-25 reaming depth
R2 Z-position of the safety plane
P2000 dwell time at the bottom of the hole
F50 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for reaming)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for reaming
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 133


Chapter 5

Command: G89
boring cycle with dwell time (reaming)
Function: The fixed cycle G89 is for reaming drilled holes. It guarantees a clean wipe of the
hole bottom. The reaming speed as well as the spindle rotation direction must be
programmed before the cycle is defined. The tool travels from the initial position to
the safety plane R in rapid traverse and reams the hole at feedrate to the pro-
grammed depth. The tool dwells there at the programmed dwell time P and moves
then to the safety plane R at feedrate while maintaining rotation direction.
NC-Block: G99 G89 X... Y... Z... R... P... F...
Optional Addresses: G99 return to the safety plane R
X, Y coordinates of the hole position
Z depth (Z-position of the bottom of the hole)
R Z-position of the safety plane
P dwell time at the bottom of the hole
F feedrate

G99 G89

initial point

reaming Z
dwell time

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

134 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the canned cycle: G89 boring cycle with dwell time(reaming) with G99

$G54 X400 Y250 Z140

O 89
N005 G54
N010 G90 G49 G80 G40 G17 G21
N015 G91 G28 Z0 M9
N020 G91 G28 X0 Y0

centering
N025 T03 M06
N030 G90 S2200 M03
N035 G0 G43 Z20 H19
N040 G99 G81 Z-3 R2 F80 L0 centering
N045 M98 P7300 subprogram call (4 positions for centering)
N050 G0 G80 G90 X120 Y120 cancel the canned cycle for centering
N055 G0 Z20 M9
N060 G91 G28 Z0 M5

predrilling
N065 T04 M06
N070 G90 S2200 M03
N075 G0 G43 Z20 H20
N080 G99 G83 Z-35 R2 Q15 F80 L0 predrilling
N085 M98 P7300 subprogram call (4 positions for predrilling)
N090 G0 G80 G90 X120 Y120 cancel the canned cycle for predrilling
N095 G0 Z20 M9
N100 G91 G28 Z0 M5

reaming with G89


N105 T07 M06
N110 G90 S1000 M03
N115 G0 G43 Z20 H23
N120 G99 G85 Z-25 R2 P2000 F50 L0 G99 return to the safety plane R
G85 boring cycle (reaming)
Z-25 reaming depth
R2 Z-position of the safety plane
P2000 dwell time at the bottom of the hole
F50 feedrate
L0 The data for the cycle only stored,
but the cycle is not performed!

N125 M98 P7300 subprogram call (4 positions for reaming)


N130 G0 G80 G90 X120 Y120 cancel the canned cycle for reaming
N135 G0 Z20 M9
N140 G91 G28 Z0 M5
N145 G90 G49 G40
N150 M30

© MTS GmbH • Berlin 135


Chapter 5

5.2.16 A program example FANUC 16M with explanations


An example of a program using canned cycles is subsequently described in detail. (NC-Programmdatei:
FX1909.FNC).

Block Commands Description


No.
O1909 O program number O and program name
N05 G54 G54 select work cordinate system one
N10 G90 G80 G40 G49 G17 G21 G90 absolute dimensioning
G80 cancel canned cycle
G40 cancel cutter radius compensation
G49 cancel tool length compensation
G17 XY-plane
G21 metric input
N20 G91 G28 Z0 M9 G91 incremental dimensioning
G28 reference point return
Z0 coordinate
M9 deactivate coolant
N30 G91 G28 X0 Y0 G91 incremental dimensioning
G28 reference point return
X0 coordinate
Y0 coordinate
N40 T01 M06 T01 select the tool T01
M06 mounting the tool
N50 G90 S1600 M3 G90 absolute dimensioning
S1600 spindle speed
M3 activate the spindle in clockwise rotation
N60 G0 G43 Z20 H17 G0 rapid traverse
G43 tool length compensation +
Z20 coordinate
H17 select the compensation offset
N70 X-20 Y-20 Z2 X-20 coordinate
Y-20 coordinate
N80 Z-8 M08 Z-8 coordinate
M08 activate coolant
N90 G41 G01 X5 D01 F250 G41 cutter radius compensation left
G01 linear interpolation in slow feed motion
X5 coordinate
D01 offset number
F250 feedrate in mm/min
N100 Y110 Y110 coordinate
N110 G0 X95 G0 rapid traverse
X95 coordinate
N120 G1 Y-10 G01 linear interpolation in slow feed motion
Y-10 coordinate
N130 G40 G0 X-20 Y-20 G40 cancel cutter radius compensation
G0 rapid traverse
X-20 coordinate
Y-20 coordinate
N140 Z-6 Z-6 coordinate
N150 G41 G1 X10 D1 G41 cutter radius compensation left
G1 linear interpolation in slow feed motion
X10 coordinate
D1 offset number
N160 G1 Y82 G1 linear interpolation in slow feed motion
Y82 coordinate

136 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Block Commands Description


No.
N170 G2 X18 Y90 R8 G2 circular interpolation clockwise
X18 coordinate of the center of the circular arc
Y90 coordinate of the center of the circular arc
R8 radius of the circular arc
N180 G1 X82 G1 linear interpolation in slow feed motion
X82 coordinate
N190 G2 X90 Y82 R8 G2 circular interpolation clockwise
X90 coordinate of the center of the circular arc
Y82 coordinate of the center of the circular arc
R8 radius of the circular arc
N200 G1 Y18 G1 linear interpolation in slow feed motion
Y18 coordinate
N210 G2 X82 Y10 R8 G2 circular interpolation clockwise
X82 coordinate of the center of the circular arc
Y10 coordinate of the center of the circular arc
R8 radius of the circular arc
N220 G1 X18 G1 linear interpolation in slow feed motion
X18 coordinate
N230 G2 X10 Y18 R8 G2 circular interpolation clockwise
X10 coordinate of the center of the circular arc
Y18 coordinate of the center of the circular arc
R8 radius of the circular arc
N240 G3 X-10 Y38 R20 G3 circular interpolation counter-clockwise
X-10 coordinate of the center of the circular arc
Y38 coordinate of the center of the circular arc
R20 radius of the circular arc
N250 G40 G0 X-20 Y-20 G40 cancel cutter radius compensation
G0 rapid traverse
N260 Z-4 Z-4 coordinate
N270 G41 G0 X15 D1 G41 cutter radius compensation left
G0 rapid traverse
X15 coordinate
D1 offset number
N280 G1 Y65 G1 linear interpolation in slow feed motion
Y65 coordinate
N290 X35 Y85 X35 coordinate
Y85 coordinate
N300 X65 X65 coordinate
N310 X85 Y65 X85 coordinate
Y65 coordinate
N320 Y35 Y35 coordinate
N330 X65 Y15 X65 coordinate
Y15 coordinate
N340 X35 X35 coordinate
N350 X5 Y45 X5 coordinate
Y45 coordinate
N360 G40 G0 X-20 Y-20 G40 cancel cutter radius compensation
G0 rapid traverse
X-20 coordinate
Y-20 coordinate
N370 Z-2 Z-2 coordinate
N380 G41 X25 D1 G41 cutter radius compensation left
X25 coordinate
D1 offset number
N390 G1 Y50 G1 linear interpolation in slow feed motion
Y50 coordinate

© MTS GmbH • Berlin 137


Chapter 5

Block Commands Description


No.
N400 G2 X25 Y50 I25 G2 circular interpolation clockwise
X25 coordinate
Y50 coordinate
I25 X-coordinate of the center of the circular arc
N410 G40 G1 Y65 G40 cancel cutter radius compensation
G1 linear interpolation in slow feed motion
Y65 coordinate
N420 G0 Z5 M9 G0 rapid traverse
Z5 coordinate
M9 deactivate coolant
N430 G91 G28 Z0 M5 G91 incremental dimensioning
G28 reference point return
Z0 coordinate
M5 deactivate spindle
N440 G91 G28 X0 Y0 G91 incremental dimensioning
G28 reference point return
X0 coordinate
Y0 coordinate
N450 T02 M06 T02 select the tool T02
M06 mounting the tool
N460 G90 S1800 M3 G90 absolute dimensioning
S1800 spindle speed
M3 activate the spindle in clockwise rotation
N470 G0 G43 Z20 H18 G0 rapid traverse
G43 tool length compensation +
Z20 coordinate
H18 select the compensation offset
N480 X50 Y50 Z2 M08 X50 coordinate
Y50 coordinate
Z2 coordinate
M08 activate coolant
N490 G1 Z-4 F50 G1 linear interpolation in slow feed motion
Z-4 coordinate
F50 Feedrate in mm/min
N500 G42 G1 X38 Y53 D2 G42 cutter radius compensation right
G1 linear interpolation in slow feed motion
X38 coordinate
Y53 coordinate
D2 offset number
N510 G2 X50 Y65 R12 F200 G2 circular interpolation clockwise
X50 coordinate
Y65 coordinate
R12 radius of the circular arc
F200 feedrate in mm/min
N520 G2 J-15 G2 circular interpolation clockwise
J-15 Y-coordinate of the center of the circular arc
N530 G2 X62 Y53 R12 G2 circular interpolation clockwise
X62 coordinate
Y53 radius of the circular arc
N540 G40 G1 X50 Y50 G40 cancel cutter radius compensation
G1 linear interpolation in slow feed motion
X50 coordinate
Y50 coordinate
N550 G0 Z20 M9 G0 rapid traverse
Z20 coordinate
M9 deactivate coolant

138 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Block Commands Description


No.
N560 G91 G28 Z0 M05 G91 incremental dimensioning
G28 reference point return
Z0 coordinate
M05 deactivate spindle
N570 G91 G28 X0 Y0 G91 incremental dimensioning
G28 reference point return
X0 coordinate
Y0 coordinate
N580 T03 M06 T03 select the tool T03
M06 mounting the tool
N590 G90 S2200 M03 G90 absolute dimensioning
S2200 spindle speed
M03 activate the spindle in clockwise rotation
N600 G0 G43 Z20 H19 G0 linear interpolation in slow feed motion
G43 tool length compensation +
Z20 coordinate
H19 select the compensation offset
N610 X0 Y0 Z2 X0 coordinate
Y0 coordinate
Z2 coordinate
N620 G99 G81 Z-5 R2 F80 L0 G99 return to the safety plane R
G81 canned cycle for centering
Z-5 depth (Z-position of the bottom of the hole)
R2 Z-position of the safety plane
F80 Feedrate in mm/min
L0 the data for the cycle only stored,
but the cycle is not performed!
N630 M98 P1910 M98 subprogram call
P1910 name of the subprogram
N640 G0 Z20 M9 G0 rapid traverse
Z20 coordinate
M9 deactivate coolant
N650 G91 G28 Z0 M5 G91 incremental dimensioning
G28 reference point return
Z0 coordinate
M5 deactivate spindle
N660 T04 M06 T04 select the tool T04
M06 mounting the tool
N670 G90 S1000 M03 G90 absolute dimensioning
S1000 spindle speed
M03 activate the spindle in clockwise rotation
N680 G0 G43 Z20 H20 G0 linear interpolation in slow feed motion
G43 tool length compensation +
Z20 coordinate
H20 select the compensation offset
N690 X0 Y0 Z2 X0 coordinate
Y0 coordinate
Z2 coordinate
N700 G99 G83 Z-10 Q6 R2 F50 L0 G99 return to the safety plane R
G83 peck drilling cycle
Z-10 Depth (Z-position of the bottom of the hole)
Q6 cutting amount
R2 Z-position of the safety plane
F50 feedrate in mm/min
L0 The data for the cycle only stored,
but the cycle is not performed!

© MTS GmbH • Berlin 139


Chapter 5

Block Commands Description


No.
N710 M98 P1910 M98 subprogram call
P1910 name of the subprogram
N720 G0 Z20 M9 G0 rapid traverse
Z20 coordinate
M9 deactivate coolant
N730 G91 G28 Z0 M5 G91 incremental dimensioning
G28 reference point return
Z0 coordinate
M5 deactivate spindle
N740 T05 M06 T05 select the tool T05
M06 mounting the tool
N750 G90 S150 M03 G90 absolute dimensioning
S150 spindle speed
M03 activate the spindle in clockwise rotation
N760 G0 G43 Z20 H21 G0 linear interpolation in slow feed motion
G43 tool length compensation +
Z20 coordinate
H21 select the compensation offset
N770 X0 Y0 Z2 X0 coordinate
Y0 coordinate
Z2 coordinate
N780 G99 G84 Z-8 R4 F150 L0 G99 return to the safety plane R
G84 tapping cycle
Z-8 depth (Z-position of the bottom of the hole)
R4 Z-position of the safety plane
F50 feedrate in mm/min
L0 the data for the cycle only stored,
but the cycle is not performed!
N790 M98 P1910 M98 subprogram call
P1910 name of the subprogram
N800 G0 Z20 M9 G0 rapid traverse
Z20 coordinate
M9 deactivate coolant
N810 G91 G28 Z0 M05 G91 incremental dimensioning
G28 reference point return
Z0 coordinate
M05 deactivate spindle
N820 G91 G28 X0 Y0 G91 incremental dimensioning
G28 reference point return
X0 coordinate
Y0 coordinate
N830 G90 G49 G80 G90 absolute dimensioning
G49 cancel tool length compensation
G80 cancel canned cycle
N840 M30 M30 program end

140 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.3 Macros
Similar to canned cycles, macros are standard programs which are installed in the control and can be used
for easier programming.

5.3.1 Definition
In milling cycles, also called macros in the FANUC-control, specific milling operations are executed, e.g. cir-
cular pockets. For these macros, the CNC- control must perform extensive calculations, e.g. to generate the
individual travel motions for a circular pocket.

Sequence of a macro
The basic sequence of a macro is subsequently illustrated.

initial point

R
4

2
3
Z

1 move to the safety plane R 3 milling operation


2 multiple infeed in Z-direction 4 retract to the initial point

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

© MTS GmbH • Berlin 141


Chapter 5

A macro is programmed with the command G65, the macro number (P....) and the optional addresses.

G65 P9180... X... Y... I... R... D... A... S

optional addresses

A starting angle of the first hole by 9180, 9190

B pitch angle

C approach circle radius

D cutter radius offset number


quantity by 9190
number of holes in X direction by 9200

F feedrate

H cutting width per pass


number of holes in Y direction by 9200

I cutting circle radius by 9110


radius of corner arc by 9130
radius of circle by 9180, 9190

M setting mode for R and Z

Q cutting direction by 9110

infeed per pass by 9120, 9130, 9140

R Z-position of the safety plane

S approach feedrate
subprogram number by 9180, 9190

U lateral side length


pitch in X direction by 9200

V longitudinal side length


pitch in Y direction by 9200

X X coordinate of circular center by 9180

Y Y coordinate of circular center by 9180

Z depth (Z-position of the bottom of the pocket)

142 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.3.2 Survey

Subsequently, the macros for the control FANUC 16 M are listed. The availability of the cycles varies ac-
cording to machine.

G-Code Number of Macro Description

G65 P 9110 finishing inside of circle

G65 P 9120 deep cutting of circular pocket

G65 P 9130 finish cutting inside of square pocket

G65 P 9140 deep cutting of square pocket

G65 P 9180 bolt hole circle

G65 P 9190 positioning on arc

G65 P 9200 matrix machining

© MTS GmbH • Berlin 143


Chapter 5

5.3.3 Application
The simulator is to be set-up according to the following set-up sheet for all subsequent program examples.

Set-up-sheet
CONFIGURATION MACHINE MAKINO FX 650
CONTROL FANUC 16M FX650

BLANK DIMENSIONS X+150.000 Y+150.000 Z+025.000

PART POSITION X+400.000 Y+230.000


Top front left corner of the part X+400.000 Y+230.000 Z+135.000

MATERIAL AlMg 1::Aluminium

VISE MAKFX 160


CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0°

CURRENT TOOL T01


TOOLS T01 SHELL END MILL MW-040/032 HSS ISO 2586
T02 SLOT MILLING TOOL MS-20.0/075L HSS ISO 1641
T03 DRILL DR-05.00/087 HSS ISO 235
T04 TAP TA-M06.0/1.00 HSS ISO 2857
T05 SLOT MILLING TOOL MS-16.0/063L HSS ISO 1641
T06 FACE END MILL MF-063/40/22 HM 90
T07 DRILL DR-05.00/087 HSS ISO 235
T08 SLOT MILLING TOOL MS-08.0/011K HSS ISO 1641
T09 SIDEMILL ME-20.0/038K HSS ISO 1641
T10 REAMER RE-D10.0/H7 HSS ISO 521
T11 RADIUS CUTTER RC-12/06.0/12 HSS ISO 1641
T12 ANGULAR CUTTER TYP A CA-20/08.0/60 HSS ISO 3859
T13 CORNER TOOL TYPE B CB-20/08.0/60 HSS ISO 3859
T14 REVERSIBLE TIP DRL DI-20.00/54.00-HM 90 ISO 9766
T15 STEP DRILL DS-11.5/06.4-090 HSS ISO 3439
T16 CORE DRILL DC-16.0/090 HSS ISO 3294

TOOL COMPENSATION D01 R020.000 Z+098.000


D02 R010.000 Z+147.000
D03 R000.000 Z+176.500
D04 R000.000 Z+132.500
D05 R008.000 Z+135.000
D06 R031.500 Z+106.000
D07 R000.000 Z+176.500
D08 R004.000 Z+104.000
D09 R010.000 Z+106.000
D10 R000.000 Z+183.000
D11 R006.000 Z+135.500
D12 R010.000 Z+104.500
D13 R005.381 Z+104.500
D14 R000.000 Z+154.000
D15 R000.000 Z+195.500
D16 R000.000 Z+118.500
D18 R008.000 Z+110.000
D19 R008.000 Z+117.000
D20 R000.000 Z+142.500
D21 R004.000 Z+110.000
D22 R011.000 Z+147.000
D25 R009.000 Z+135.000

144 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.3.4 finishing inside of circle macro P9110

Command: G65 P9110


finishing inside of circle
NC-Block: G65 P9110 I... D... R... Z... F... C... S... Q... M...
Optional Addresses: I cutting circle radius
D cutter radius offset number
R Z-position of the safety plane
Z Z-position of the bottom of the pocket
F feedrate
C approach circle radius
S approach feedrate
Q cutting direction
M setting mode for R and Z

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

Note: The offset value must be less than the approach circle radius.
The cutter radius compensation is used.
Specify Q1. for counterwise cutting direction and omit Q for counter-clockwise cut-
ting direction.
Specify M1. for incremental values of R and Z.
Omit M for absolute values of R and Z.

© MTS GmbH • Berlin 145


Chapter 5

Programming Example for the macro: G65 P9110 finishing inside of circle

$G54 X400 Y250 Z140

O 110
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T02 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H18
N045 X50 Y50 M8
N050 G65 P9120 I30 D22 H15 Z-20 R2 Q6 F90 S45 deep cutting of circular pocket
Note: the cutter radius offset number D22 is used for the roughing of the pocket !
N055 G90 S2200 M3
N060 G65 P9110 I30 D2 R-18 Z-20 F60 C12 S100 Q1 P9110 finishing inside of circle
I30 cutting circle radius
D2 cutter radius offset number
R-18 Z-position of the safety plane
Z-20 Z-position of the bottom of the pocket
F60 feedrate
C12 approach circle radius
S100 approach feedrate
Q1 counterwise cutting direction

N065 G0 Z20 M9
N070 G91 G28 Z0 M5
N075 G90 G49 G80 G40
N080 M30

146 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.3.5 deep cutting of circular pocket macro P9120

Command: G65 P9120


deep cutting of circular pocket
NC-Block: G65 P9120 I... D... H... R... Z... F... S... Q... M...
Optional Addresses: I cutting circle radius
D cutter radius offset number
H cutting width per pass
R Z-position of the safety plane
Z Z-position of the bottom of the pocket
F feedrate
S approach feedrate
Q infeed per pass
M setting mode for R and Z

nitial point

Q
Q
Z

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

Note: Specify H so that it is less than the cutter diameter.


Only the counter-clockwise cutting direction is available..
Specify Q1. for counterwise cutting direction and omit Q for counter-clockwise cut-
ting direction.
Specify M1. for incremental values of R and Z.
Omit M for absolute values of R and Z.

© MTS GmbH • Berlin 147


Chapter 5

Programming Example for the macro: G65 P9120 deep cutting of circular pocket

$G54 X400 Y250 Z140

O 120
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T02 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H18
N045 X50 Y50 M8
N050 G65 P9120 I30 D2 H15 Z-20 R2 Q6 F60 S30 P9120 deep cutting of circular pocket
I30 cutting circle radius
D2 cutter radius offset number
H15 cutting width per pass
Z-20 Z-position of the bottom of the pocket
R2 Z-position of the safety plane
Q6 infeed per pass
F60 feedrate
S30 approach feedrate

N055 G0 Z20 M9
N060 G91 G28 Z0 M5
N065 G90 G49 G80 G40
N070 M30

148 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.3.6 finish cutting inside of square macro P9130

Command: G65 P9130


finish cutting inside of square
NC-Block: G65 P9130 U... V... C... D... R... Z... F... S... I... Q... M...
Optional Addresses: U lateral side length
V longitudinal side length
C approach circle radius
D cutter radius offset number
R Z-position of the safety plane
Z Z-position of the bottom of the pocket
F feedrate
S approach feedrate
I radius of corner arc
Q cutting direction
M setting mode for R and Z

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

Note: Don´t specify I if no corner circle is inserted.


The offset value must be less than the approach circle radius
and less than the radius of corner arc.
Specify Q1. for counterwise cutting direction
and omit Q for counter-clockwise cutting direction.
Specify M1. for incremental values of R and Z.
Omit M for absolute values of R and Z.

© MTS GmbH • Berlin 149


Chapter 5

Programming Example for the macro: G65 P9130 finish cutting inside of square

$G54 X400 Y250 Z135

O 130
N010 G54
N020 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T2 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H18
N045 X50 Y50 M8
N050 G65 P9140 U80 V70 D22 R2 Z-20 Q6 F90 S40 H15
Note: the cutter radius offset number D22 is used for the roughing of the pocket !
N055 S2200 M3
N060 G65 P9130 U80 V70 C20 D2 R2 Z-20 F60 S100 I15 Q1 P9130 finish cutting inside
of square pocket
U80 lateral side length
V70 longitudinal side length
C20 approach circle radiusv
D2 cutter radius offset number
R2 Z-position of the safety plane
Z-20 Z-position of the bottom
of the pocket
F60 feedrate
S100 approach feedrate
I15 radius of corner arc
Q1 counterwise cutting direction
N065 G0 Z20 M9
N070 G91 G28 Z0 M5
N075 G90 G49 G80 G40
N080 M30

150 MTS TeachWare • CNC-Milling • Student’s Book


Chapter 5

Programming Example for the macro: G65 P9140 deep cutting of square pocket

$G54 X400 Y250 Z135

O 140
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T2 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H18
N045 X50 Y50 M8
N050 G65 P9140 U80 V70 D2 R2 Z-20 Q6 F90 S40 H15 P9140 deep cutting of square pocket
U80 lateral side length
V70 longitudinal side length
D2 cutter radius offset number
R2 Z-position of the safety plane
Z-20 Z-position of the bottom of the pocket
Q6 infeed per pass
F90 feedrate
S40 approach feedrate
H15 cutting width per pass
N055 G0 Z20 M9
N060 G91 G28 Z0 M5
N065 G90 G49 G80 G40
N070 M30

152 MTS TeachWare • CNC-Milling • Student’s Book


Chapter 5

Programming Example for the macro: G65 P9140 deep cutting of square pocket

$G54 X400 Y250 Z135

O 140
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T2 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H18
N045 X50 Y50 M8
N050 G65 P9140 U80 V70 D2 R2 Z-20 Q6 F90 S40 H15 P9140 deep cutting of square pocket
U80 lateral side length
V70 longitudinal side length
D2 cutter radius offset number
R2 Z-position of the safety plane
Z-20 Z-position of the bottom of the pocket
Q6 infeed per pass
F90 feedrate
S40 approach feedrate
H15 cutting width per pass
N055 G0 Z20 M9
N060 G91 G28 Z0 M5
N065 G90 G49 G80 G40
N070 M30

152 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.3.8 bolt hole circle macro P9180

Command: G65 P9180


bolt hole circle
NC-Block: G65 P9180 X... Y... I... D... A... S...
Optional Addresses: X X coordinate of circular center
Y Y coordinate of circular center
I radius of circle
D number of holes equally spaced
A starting angle of the first hole
S subprogram number called

initial point

hole position 5
hole position

A
R
X
(X,Y)

for example drilling cycle G81

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

There are two possibilities to use the bolt hole circle:


1) for drilling:
G90 G98 G81 Z-3 R2 F80 L0
G65 P9180 X... Y... I... D... A...
G80 X... Y...

2) for multi-block machining


G65 P9180 X... Y... I... D... A... S...

Note: Use the absolute input value (G90) for positioning.


Don´t specify S by programming a canned cycle (first possibility).
The subprogram must be programmed with incremental
value input (second possibility).

© MTS GmbH • Berlin 153


Chapter 5

Programming Example for the macro: G65 P9180 bolt hole circle for drilling

$G54 X400 Y250 Z135

O 180
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T03 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H19 M8
N045 G98 G83 Z-20 R2 Q6 F80 L0 definition of a peck drilling cycle
N050 G65 P9180 X50 Y50 I30 D6 A0 P9180 bolt hole circle
X50 X coordinate of circular center
Y50 Y coordinate of circular center
I30 radius of circle
D6 number of holes equally spaced
A0 starting angle of the first hole

N055 G80
N060 G0 Z20 M9
N065 G91 G28 Z0 M5
N070 G90 G49 G40
N075 M30

154 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the macro: G65 P9180 bolt hole circle for multi-block machining

$G54 X400 Y250 Z135

O 180
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T03 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H19
N045 Z2 M8
N055 G65 P9180 X50 Y50 I30 D6 A0 S9180 P9180 bolt hole circle
X50 X coordinate of circular center
Y50 Y coordinate of circular center
I30 radius of circle
D6 number of holes equally spaced
A0 starting angle of the first hole
S9180 subprogram number called

N060 G80
N065 G0 Z20 M9
N070 G91 G28 Z0 M5
N075 G90 G49 G40
N080 M30

Subprogram 9180
N10 G91
N15 G1 Z-7 F80
N20 G0 Z7
N25 G90
N40 M99

© MTS GmbH • Berlin 155


Chapter 5

5.3.9 positioning on arc macro P9190

Command: G65 P9190


positioning on arc
NC-Block: G65 P9190 X... Y... I... B... D... A... S...
Optional Addresses: X X coordinate of circular center
Y Y coordinate of circular center
I radius of circle
B pitch angle
D number of holes
A starting angle of the first hole
S subprogram number called

initial point

hole position 5
hole position

A
R

X Q d
(X,Y)

Q
d
Q
Z

for example peck drilling cycle G83

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

There are two possibilities to use the bolt hole circle:


1) for drilling:
G90 G98 G83 Z-30 Q15 R2 F80 L0
G65 P9190 X... Y... I... B... D... A...
G80 X... Y...

2) for multi-block machining


G65 P9180 X... Y... I... B... D... A... S...

Note: Use the absolute input value (G90) for positioning.


Don´t specify S by programming a canned cycle (first possibility).
The subprogram must be programmed with incremental
value input (second possibility).

156 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the macro: G65 P9190 positioning on arc for drilling

$G54 X400 Y250 Z135

O 190
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T03 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H19 M8
N045 G98 G83 Z-20 R2 Q6 F80 L0 definition of a peck drilling cycle
N055 G65 P9190 X50 Y50 I30 B25 D6 A60 P9190 positioning on arc
X50 X coordinate of circular center
Y50 Y coordinate of circular center
I30 radius of circle
B25 pitch angle
D6 number of holes
A60 starting angle of the first hole

N060 G80
N065 G0 Z20 M9
N070 G91 G28 Z0 M5
N075 G90 G49 G40
N080 M30

© MTS GmbH • Berlin 157


Chapter 5

Programming Example for the macro: G65 P9190 positioning on arc for multi-block machining

$G54 X400 Y250 Z135

O 190
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T03 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H19
N045 Z2 M8
N055 G65 P9190 X50 Y50 I30 B25 D6 A60 S9180 P9190 positioning on arc
X50 X coordinate of circular center
Y50 Y coordinate of circular center
I30 radius of circle
B25 pitch angle
D6 number of holes
A60 starting angle of the first hole
S9180 subprogram number called
N060 G80
N065 G0 Z20 M9
N070 G91 G28 Z0 M5
N075 G90 G49 G40
N080 M30

Subprogram 9180
N10 G91
N15 G1 Z-7 F80
N20 G0 Z7
N25 G90
N40 M99

158 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

5.3.10 matrix maching macro P9200

Command: G65 P9200


matrix maching
NC-Block: G65 P9200 X... Y... U... D... V... H... S...
Optional Addresses: X X coordinate of the first hole
Y Y coordinate of the first hole
U pitch in X-direction
D number of holes in X-direction
V pitch in Y-direction
H number of holes in Y-direction
S subprogram number called

U U
initial point

V
U+ U- M03
V- V-
2 3

V
R
H pieces
>7mm M03

1 4
U+ U- tapping Z
V- V+

M04
D pieces
for example tapping cycle G84

- - - - : rapid traverse R : safety plane


: cutting feed Z : depth

There are two possibilities to use the bolt hole circle:


1) for drilling:
G90 G98 G84 Z-30 R7 P1000 F1000 L0
G65 P9200 X... Y... U... D... V... H...
G80 X... Y...

2) for multi-block machining


G65 P9200 X... Y... U... D... V... H... S...

Note: Use the absolute input value (G90) for positioning.


Don´t specify S by programming a canned cycle (first possibility).
The subprogram must be programmed with incremental
value input (second possibility).

© MTS GmbH • Berlin 159


Chapter 5

Programming Example for the macro: G65 P9200 matrix machining for drilling

$G54 X400 Y250 Z135

O 200
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T03 M6
N035 G90 S1800 M3
N040 G0 G43 Z20 H19 M8
N045 G99 G83 Z-20 R2 Q6 F80 L0 definition of a peck drilling cycle
N050 G65 P9200 X10 Y10 U20 D5 V20 H5 P9200 matrix machining
X10 X coordinate of the first hole
Y10 Y coordinate of the first hole
U20 pitch in X-direction
D5 number of holes in X-direction
V20 pitch in Y-direction
H5 number of holes in Y-direction

N055 G80
N060 G0 Z20 M9
N065 G91 G28 Z0 M5
N070 G90 G49 G40
N075 M30

160 MTS TeachWare • CNC-Milling • Student’s Book


Function and use of cycles

Programming Example for the macro: G65 P9200 matrix machining for multi-block machining

$G54 X400 Y250 Z135

N010 O 200
N015 G54
N020 G90 G49 G80 G40 G17 G21
N025 G91 G28 Z0 M9
N030 G91 G28 X0 Y0
N035 T03 M6
N040 G90 S1800 M3
N045 G0 G43 Z20 H19
N050 Z2 M8
N055 G65 P9200 X10 Y10 U20 D5 V20 H5 S9180 P9200 matrix machining
X10 X coordinate of the first hole
Y10 Y coordinate of the first hole
U20 pitch in X-direction
D5 number of holes in X-direction
V20 pitch in Y-direction
H5 number of holes in Y-direction
S9180 subprogram number called
N060 G80
N065 G0 Z20 M9
N070 G91 G28 Z0 M5
N075 G90 G49 G40
N080 M30

© MTS GmbH • Berlin 161


Chapter 6

6 Subprogram technology

6.1 Purpose, function and use of subprograms of a CNC milling ma-


chine

A subprogram is a program that is called from an NC-program. All commands in this subprogram are exe-
cuted after it is invoked. The CNC-control then returns to the main program and executes the subsequent
commands.

It is practical to use subprograms when specific program sections need to be repeatedly executed. For ex-
ample, if a contour operation is to be executed in multiple infeeds or after one or more zero point shifts, then
the contour can be programmed only once in a subprogram. This subprogram is then invoked for machining.

These subprograms can be invoked from any NC-program, thereby allowing program elements for recurrent
machining operations to be programmed. As a result, the programming work is considerably minimized. This
is applied for machining identical contours as well as for boring drills.

6.1.1 Subprogram Call M98

Command: M98
Subprogram Call
Function: A subprogram called by the command M98 is executed by the control system. After
this, the execution of the main program will be continued from the position in the
program line, where the subprogram has been invoked.
NC-Block: M98 [P...] [L...]
Optional Addresses: P Number of the subprogram
L Number of repeated callings

Programming Example: N100 M98 P400 L5 (Call the subprogram O400 five times)
N100 M98 P400 (Call the subprogram O400 once)

Note: The Subprogram Call M98 must be programmed in a separate NC-Block.

6.1.2 End of Subprogram M99

Command: M99
End of Subprogram
Function: The command M99 marks the end of a subprogram.
NC-Block: M99

At the end of each defined subprogram, the command M99 must be programmed to cause the control sys-
tem to return to the main program, resp. to the subprogram, from which the current subprogram has been
called.

Note: The Subprogram End M99 must be programmed in a separate NC-Block.

162 MTS TeachWare • CNC-Milling • Student’s Book


Subprogram technology

6.2 Subprograms with incremental or absolute input value

When using subprograms it is necessary to consider the programming type, i.e. with incremental or absolute
input value. If programming with absolute input value is selected, then the programmed machining will always
be executed at the same point in the work part coordinate system. For changing the machining position it is
necessary to program a corresponding zero point shift before each subprogram call.

The advantage of incremental values is that a zero point shift must not be programmed. Similar to canned
cycles, the tool is moved to the target starting position before the subprogram is called. The incremental input
value programming (G91) is selected in the subprogram and the travel movements are then incrementally
programmed. Before the subprogram has ended, the absolute input value programming (G90) must again be
selected.

Note: When using incremental input value programming, switching between incremental
and absolute input value programming should only take place in the subprogram.

Programming Example
Main NC-program UNTERCC.FNC
$G54 X400 Y250 Z135
O2000
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T02 M6
N035 G97 S2500 M03 F150
N040 G90 G0 X20 Y40 absolute input value G90
N045 G43 Z20 H18
N050 Z2
N055 M98 P2001 L3 subprogram call number 2001 execute three times
N060 G0 Z2
N065 X50 Y40
N070 M98 P2001 L3 subprogram call number 2001 execute three times
N075 G0 Z2
N080 X80 Y40
N085 M98 P2001 L3 subprogram call number 2001 execute three times
N090 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G91 G28 X0 Y0
N110 G90 G49 G80 G40
N115 M30

Subprogram number 2001

N010 G91 M8 select incremental input value G91


N015 G1 Z-3 F150 move in Z-direction with cutting feed
N020 G2 Y25 I0 J12.5 circular interpolation clockwise
N025 G1 Y-25 linear interpolation
N030 G90 M9 select absolute input value G90
N035 M99

© MTS GmbH • Berlin 163


Chapter 6

Subsequently, the program sequence with the individual subprogram calls is shown.

main program
O2000
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T02 M6
N035 G97 S2500 M03 F150
N040 G90 G0 X20 Y40 first start position
N045 G43 Z20 H18
N050 Z2 subprogram
N055 M98 P2001 L3 N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
2. execution N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
3. execution N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
N060 G0 Z2
N065 X50 Y40 second start position
subprogram
N070 M98 P2001 L3 N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
2. execution N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
3. execution N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
N075 G0 Z2

164 MTS TeachWare • CNC-Milling • Student’s Book


Subprogram technology

N075 G0 Z2
N080 X80 Y40 third start position
subprogram
N085 M98 P2001 L3 N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
2. execution N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99
3. execution N010 G91 M8
N015 G1 Z-3 F150
N020 G2 Y25 I0 J12.5

N025 G1 Y-25
N030 G90 M9
N035 M99
N090 G0 Z20 M9
N095 G91 G28 Z0 M5
N100 G91 G28 X0 Y0
N105 G90 G49 G80 G40
N110 M30

© MTS GmbH • Berlin 165


Chapter 6

Programming Example
Main NC-program UNTERPR.FNC

Programming will be with incremental input value (G91) and the depth of 7 mm should be reached with three
program repetitions by using the subprogram technique.

$G54 X400 Y250 Z135

N010 O1000
N015 G54
N020 G90 G49 G80 G40 G17 G21
N025 G91 G28 Z0 M9
N030 G91 G28 X0 Y0
N035 T02 M6
N040 G97 S2500 M03 F150
N045 G90 G0 X15 Y40
N050 G43 Z20 H18
N055 Z2
N060 M98 P1001 L3
N065 G0 Z2
N070 X45 Y40
N075 M98 P1001 L3
N080 G0 Z2
N085 X75 Y40
N090 M98 P1001 L3
N095 G0 Z20 M9
N100 G91 G28 Z0 M5
N105 G91 G28 X0 Y0
N115 G90 G49 G80 G40
N120 M30

Subprogram number 1001

N010 G91 M8
N015 G1 Z-3 F150
N020 G3 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99

166 MTS TeachWare • CNC-Milling • Student’s Book


Subprogram technology

6.3 Nesting several subprograms

Subprograms are usually invoked by the main program. However, it is also possible for a subprogram to call
another subprogram. This process is called nesting subprograms. The FANUC control allows a maximum of
4 subprograms to be nested.

Programming will be with incremental input value (G91) and the depth of 7 mm should be reached with three
program repetitions.

Programming Example with nesting

Main NC-program UNTERVS.FNC

$G54 X400 Y250 Z135


O1000
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T02 M6
N035 G97 S2500 M03 F150
N040 G90 G0 X15 Y40
N045 G43 Z20 H18
N050 Z2
N055 M98 P1004

N060 G91 G28 Z0 M9


N065 G91 G28 X0 Y0
N070 G90 G49 G80 G40
N 075 M30

© MTS GmbH • Berlin 167


Chapter 6

Subprogram number 1004


N010 M98 P1001 L3
N015 M98 P1002
N020 M98 P1003
N025 G90 G0 Z20 M5
N030 M99

Subprogram number 1001


N010 G91 M8
N015 G1 Z-3 F150
N020 G3 Y25 I0 J12.5
N025 G1 Y-25
N030 G90 M9
N035 M99

Subprogram number 1002


N10 G90
N15 G0 Z2
N20 X45 Y40
N25 M98 P1001 L3
N010 G90
N015 M99

Subprogram number 1003


N10 G90
N15 G0 Z2
N20 X75 Y40
N25 M98 P1001 L3
N010 G90
N015 M99

168 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

7 Workshop-Oriented Programming

7.1 Introduction

According to the Standard ISO 6983, a workpart contour is programmed with the commands "G01" (linear
interpolation), "G02" (circular interpolation, clockwise) or "G03" (circular interpolation, counter-clockwise), and
by defining the coordinates of the target point or center of a circle, respectively. Considering this, the defini-
tion of contours which cannot be measured according to NC standards might require extensive calculation.

Modern CNC control systems as well as the CNC Simulator feature additional commands for segment con-
tour programming allowing the integration of data with reference to length, angles and radii, as well as tan-
gential transition conditions. Consequently it is possible to program many contours without additional calcula-
tions.

The "Workshop Oriented Programming", abbreviated "WOP" stands for a programming interface for CNC
technologies worked out (even if not standardized) by the German Federal Ministry of Research and Tech-
nology within the framework of one of its projects. With this method, data entry takes place with function keys
only, and with the help of a program dialogue. Parallel to the data entry, the workpart geometry is graphically
displayed in a fashion similar to a CAD program and, if several solutions are possible, all solution options are
presented for selection.

Blank

Programmed contour

Last created NC block


Function keys

Figure 26
WOP Interface for CNC Milling

Frequently, the entered parameter values result in several possible variants of the contour segment being
programmed. In such cases the WOP Interface switchs to the Alternative Selections menu to enable you for
the selection of the desired contour alternative.

The change into the Alternative Selections takes place automatically, and you cannot continue programming
until after having selected one contour variant, or until after canceled the current programming session.

Please note that the Alternative Selection menu displays solutions that are mathematically possible, irrespec-
tive of the fact that the solution might not be feasible from the technical or logical point of view.

© MTS GmbH • Berlin 169


Chapter 7

7.2 Example:

The bowl of the drawing is to be manufactured as individual workpart on a CNC vertical milling machine.

Create an NC-program and save it under the name SCHALE.

Use the WOP (Workshop Oriented Programming) for programming the contour.

The starting point of the contour is on the intersection of the middleline and of the right circular arc.

blank 200mm x 100mm x 20mm

material AlMg1

depth of the contour: 6 mm

bowl

WORK PLAN

Machining Sequence Tool Tool Name

1 contour milling 6mm depth 08 shell end mill


MW-040/032 HSS ISO 2586

170 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

depth of the contour: 6 mm

bowl

© MTS GmbH • Berlin 171


Chapter 7

Setting-up the CNC machine

After starting, the MTS-simulator is automatically set-up with blank, clamping and turret allocation. If the fol-
lowing set-up data does not conform with the current set-up data, then it must be changed in the set-up op-
eration.

set-up sheet

CONFIGURATION
MACHINE MAKINO FX 650
CONTROL FANUC 16M FX650
BLANK DIMENSIONS
X+200.000 Y+100.000 Z+020.000
PART POSITION
X+400.000 Y+250.000
LEFT FRONT UPPER CORNER OF THE WORKPART
X+400.000 Y+250.000 Z+132.000
MATERIAL
AlMg 1:Aluminium
VISE
MAKFX 160
CHUCKED HEIGHT E+033.000
SHIFT V+000.000
ORIENTATION A90°
CURRENT TOOL
T08
TOOLS
T01 SLOT MILLING TOOL MS-06.0/0820 HSS ISO 1641
T02 SLOT MILLING TOOL MS-20.0/075L HSS ISO 1641
T03 DRILL DR-05.00/087 HSS ISO 235
T04 DRILL DR-05.00/087 HSS ISO 235
T05 SLOT MILLING TOOL MS-10.0/045L HSS ISO 1641
T06 TAP TA-M06.0/1.00 HSS ISO 2857
T07 SLOT MILLING TOOL MS-05.0/0820 HSS ISO 1641
T08 SHELL END MILL MW-040/032 HSS ISO 2586
TOOL COMPENSATION
D01 R003.000 Z+110.000
D02 R010.000 Z+147.000
D03 R000.000 Z+176.500
D04 R000.000 Z+176.500
D05 R005.000 Z+138.000
D06 R000.000 Z+132.500
D07 R002.500 Z+110.000
D08 R020.000 Z+098.000

172 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

NC programming

Before using the WOP programming create a new NC program named SCHALE, set up the simulator and
program with the editor the first NC blocks.

Do the following steps:


1. call the editor
(set up the simulator if necessary)
2. program the first NC blocks
3. create the contour with WOP
4. complete the NC program with the editor

1) Call the editor.

Description Entry

a. Call CNC milling in the main menu. F2 (Milling)


b. Select the CNC editor. F1 (CNC-Editor)
c. Select a program or create a new one or select a program or

write SCHALE for the new NC program, with

F1 (Edit program) confirm

2) Program the first NC blocks.

$G54 X400 Y250 Z132

O100

N010 G54

N015 G90 G49 G80 G40 G17 G21

N020 G91 G28 Z0 M9

N025 G91 G28 X0 Y0

N030 T08 M6

N035 G90 S950 M3

N040 G43 Z20 H24 T2 M8

N045 G0 X240 Y80

N050 Z2

N055 Z-6

N060 G1 G41 X210 D8 F300

N065 G3 X180 Y50 R30

© MTS GmbH • Berlin 173


Chapter 7

3) Create the contour.

Select the WOP menu . F5 (WOP)


Begin the contour description. F1 (Create contour)
1. Select the contour entity „right arc“. F3 (arc right) and enter the following values:
NOTE: Don´t confirm with , use the AW 270

arrow keys or for jumping over B 40 confirm with

the not used fields. F8 (term. input)


NC block: G72 A+270 B+40

2. Select the contour entity „tangential right arc“. F4 (arc right tangentl.) enter the following value:
B 113 confirm with
F8 (term. input)
NC block: G72 B+113 O000

3. Select the contour entity „tangential right arc“. F4 (arc right tangentl.), enter the following values:
B 15
I 35
J 65 change between the two solutions with
F1 (alternative), select the desired solution with

F2 (select) and confirm with

F8 (term. input)
NC block: G72 I+35 J+65 O070 B+15 O000

4. Select the contour entity „tangential left arc“. F6 (arc left tangentl.) enter the following value:
B 80 confirm with
F8 (term. input)
NC block: G73 B+80 O000

5. Select the contour entity „tangential right arc“. F4 (arc right tangentl.), enter the following values:
Xe 180
Ye 50
I 140
J 50 change between the two solutions with
F1 (alternative), select the desired solution with

F2 (select) and confirm with

F8 (term. input)
NC block: G72 X+180 Y+50 I+140 J+50 O70 O000

Terminate the WOP menu . F8 (end of menu)


F8 (WOP END)

174 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

4) Program the following NC blocks.

After leaving the WOP system NC blocks with G02 or G03 commands are generated:

N070 G02 X+152.785 Y+012.098 Z-006.000 I+140.000 J+050.000 O070

N075 G02 X+022.500 Y+056.709 Z-006.000 I-036.118 J+107.072

N080 G02 X+041.358 Y+078.586 Z-006.000 I+012.500 J+008.291

N085 G03 X+118.423 Y+083.681 Z-006.000 I+033.910 J+072.458

N090 G02 X+180.000 Y+050.000 Z-006.000 I+021.577 J-033.681

Complete the NC program with the retreat movement and the lasts NC blocks.

N095 G3 X210 Y20 R30

N100 G40

N105 G0 Z20 M9

N110 G91 G28 Z0 M5

N115 G91 G28 X0 Y0

N120 G90 G49 G80 G40

N125 M30

© MTS GmbH • Berlin 175


Chapter 7

Solution:

$G54 X400 Y250 Z132

O100

N010 G54

N015 G90 G49 G80 G40 G17 G21

N020 G91 G28 Z0 M9

N025 G91 G28 X0 Y0

N030 T08 M6

N035 G90 S950 M3

N040 G43 Z20 H24 T2 M8

N045 G0 X240 Y80

N050 Z2

N055 Z-6

N060 G1 G41 X210 D8 F300

N065 G3 X180 Y50 R30

N070 G02 X+152.785 Y+012.098 Z-006.000 I+140.000 J+050.000 O070

N075 G02 X+022.500 Y+056.709 Z-006.000 I-036.118 J+107.072

N080 G02 X+041.358 Y+078.586 Z-006.000 I+012.500 J+008.291

N085 G03 X+118.423 Y+083.681 Z-006.000 I+033.910 J+072.458

N090 G02 X+180.000 Y+050.000 Z-006.000 I+021.577 J-033.681

N095 G3 X210 Y20 R30

N100 G40

N105 G0 Z20 M9

N110 G91 G28 Z0 M5

N115 G91 G28 X0 Y0

N120 G90 G49 G80 G40

N125 M30

176 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

7.3 Exercise 1 : counter-form

The counter-form of the drawing is to be manufactured as individual workpart on a CNC vertical milling ma-
chine.

Create an NC-program and save it under the name GEGENFOR.

Use the WOP (Workshop Oriented Programming) for programming the contour.

The starting point of the contour is the starting point of the circular arc on the right side.

blank 130mm x 100mm x 20mm

material AlMg1

depth of the contour: 6 mm

counter-form

WORK PLAN

Machining Sequence Tool Tool Name

1 contour milling 6mm depth 01 slot milling tool


MS-06.0/0820 HSS ISO 1641

© MTS GmbH • Berlin 177


Chapter 7

depth of the contour: 6 mm

counter-form

178 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

1) Program the first NC blocks.

$G54 X400 Y250 Z137


O1407
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T1 M6
N035 G90 S2300 M3
N040 G0 G43 Z20 H17 T2 M8
N045 X140 Y70
N050 Z2
N055 Z-6
N060 G1 G41 X130 Y60 D1 F200
N065 G3 X120 Y40 R20
N070 G1 Y20

2) Create the contour with WOP.


After leaving the WOP system NC blocks with G01, G02 or G03 commands are generated:

N075 G02 X+110.000 Y+010.000 I+110.000 J+020.000 O070


N080 G01 X+085.853 Y+010.000
N085 G03 X+082.194 Y+008.756 I-000.000 J-006.000
N090 G02 X+070.000 Y+004.608 I-012.194 J+015.852
N095 G02 X+057.806 Y+008.756 I+000.000 J+020.000
N100 G03 X+054.147 Y+010.000 I-003.658 J-004.756
N105 G01 X+015.000 Y+010.000
N110 G02 X+010.000 Y+015.000 I+000.000 J+005.000
N115 G01 X+010.000 Y+070.000
N120 G02 X+030.000 Y+090.000 I+020.000 J+000.000
N125 G01 X+056.340 Y+090.000
N130 G03 X+070.000 Y+084.608 I+013.660 J+014.608
N135 G03 X+083.660 Y+090.000 I+000.000 J+020.000
N140 G01 X+085.000 Y+090.000

3) Program the following NC blocks.

N145 G1 X120 Y70


N150 Y40
N155 G3 X140 Y20 R20
N160 G40 G1 Y30
N165 G0 Z20 M9
N170 G91 G28 Z0 M5
N175 G91 G28 X0 Y0
N180 G90 G49 G80 G40
N185 M30

© MTS GmbH • Berlin 179


Chapter 7

Solution:
BLANK DIMENSIONS X+130.000 Y+100.000 Z+020.000
PART POSITION X+400.000 Y+250.000
Top front left corner of the part X+400.000 Y+250.000 Z+137.000
MATERIAL AlMg 1::Aluminium
VISE MAKFX 160
CHUCKED HEIGHT E+038.000
SHIFT V+000.000
ORIENTATION A0ø
CURRENT TOOL T01
TOOLS
T01 SLOT MILLING TOOL MS-06.0/0820 HSS ISO 1641

$G54 X400 Y250 Z137


O1407
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T1 M6
N035 G90 S2300 M3
N040 G0 G43 Z20 H17 T2 M8
N045 X140 Y70
N050 Z2
N055 Z-6
N060 G1 G41 X130 Y60 D1 F200
N065 G3 X120 Y40 R20
N070 G1 Y20
N075 G02 X+110.000 Y+010.000 I+110.000 J+020.000 O070
N080 G01 X+085.853 Y+010.000
N085 G03 X+082.194 Y+008.756 I-000.000 J-006.000
N090 G02 X+070.000 Y+004.608 I-012.194 J+015.852
N095 G02 X+057.806 Y+008.756 I+000.000 J+020.000
N100 G03 X+054.147 Y+010.000 I-003.658 J-004.756
N105 G01 X+015.000 Y+010.000
N110 G02 X+010.000 Y+015.000 I+000.000 J+005.000
N115 G01 X+010.000 Y+070.000
N120 G02 X+030.000 Y+090.000 I+020.000 J+000.000
N125 G01 X+056.340 Y+090.000
N130 G03 X+070.000 Y+084.608 I+013.660 J+014.608
N135 G03 X+083.660 Y+090.000 I+000.000 J+020.000
N140 G01 X+085.000 Y+090.000
N145 G1 X120 Y70
N150 Y40
N155 G3 X140 Y20 R20
N160 G40 G1 Y30
N165 G0 Z20 M9
N170 G91 G28 Z0 M5
N175 G91 G28 X0 Y0
N180 G90 G49 G80 G40
N185 M30

180 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

7.4 Exercise 2 : stamping

The stamping of the drawing is to be manufactured as individual workpart on a CNC vertical milling machine.

Create an NC-program and save it under the name STANZWOP.

Use the WOP (Workshop Oriented Programming) for programming the contour.

The starting point of the contour is the starting point of the circular arc on the right side.

blank 100mm x 100mm x 25mm

material AlMg1

depth of the contour: 6 mm

stamping

WORK PLAN

Machining Sequence Tool Tool Name

1 contour milling 6mm depth 01 slot milling tool


MS-06.0/0820 HSS ISO 1641

© MTS GmbH • Berlin 181


Chapter 7

depth of the contour: 6 mm

stamping

182 MTS TeachWare • CNC-Milling • Student’s Book


Workshop-Oriented Programming

1) Program the first NC blocks.

$G54 X400 Y250 Z135


O01
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T01 M6
N035 G90 S950 M3
N040 G0 G43 Z20 H17 M8
N045 X130 Y130
N050 Z2
N055 G1 Z-6 F200
N060 G41 D1
N065 G01 X+125.000 Y+125.000

2) Create the contour with WOP.


After leaving the WOP system NC blocks with G01, G02 or G03 commands are generated:

N070 G03 X+095.000 Y+095.000 Z-005.000 I+125.000 J+095.000 O070


N075 G01 X+095.000 Y+019.000 Z-005.000
N080 G01 X+085.000 Y+009.000 Z-005.000
N085 G01 X+015.000 Y+009.000 Z-005.000
N090 G01 X+005.000 Y+019.000 Z-005.000
N095 G01 X+005.000 Y+061.388 Z-005.000
N100 G02 X+012.541 Y+077.033 Z-005.000 I+020.000 J+000.000
N105 G01 X+027.345 Y+088.822 Z-005.000
N110 G02 X+033.574 Y+091.000 Z-005.000 I+006.230 J-007.822
N115 G01 X+062.997 Y+091.000 Z-005.000
N120 G02 X+069.226 Y+088.822 Z-005.000 I+000.000 J-010.000

3) Program the following NC blocks.

N125 G01 X+087.671 Y+074.134 Z-005.000


N130 G02 X+095.000 Y+061.388 Z-005.000 I-012.459 J-015.645
N135 G1 X95 Y40
N140 G3 X125 Y10 R30
N145 G40
N150 G0 Z20 M9
N155 G91 G28 Z0 M5
N160 G91 G28 X0 Y0
N165 G90 G49 G40 G80
N170 M30

© MTS GmbH • Berlin 183


Chapter 7

Solution:
BLANK DIMENSIONS X+100.000 Y+100.000 Z+025.000
PART POSITION X+400.000 Y+250.000
Top front left corner of the part X+400.000 Y+250.000 Z+135.000
MATERIAL AlMg 1::Aluminium
VISE MAKFX 160
CHUCKED HEIGHT E+031.000
SHIFT V+000.000
ORIENTATION A0ø
CURRENT TOOL T01
TOOLS
T01 SHELL END MILL MW-040/032 HSS ISO 2586

$G54 X400 Y250 Z135


O01
N010 G54
N015 G90 G49 G80 G40 G17 G21
N020 G91 G28 Z0 M9
N025 G91 G28 X0 Y0
N030 T01 M6
N035 G90 S950 M3
N040 G0 G43 Z20 H17 M8
N045 X130 Y130
N050 Z2
N055 G1 Z-6 F200
N060 G41 D1
N065 G01 X+125.000 Y+125.000
N070 G03 X+095.000 Y+095.000 Z-005.000 I+125.000 J+095.000 O070
N075 G01 X+095.000 Y+019.000 Z-005.000
N080 G01 X+085.000 Y+009.000 Z-005.000
N085 G01 X+015.000 Y+009.000 Z-005.000
N090 G01 X+005.000 Y+019.000 Z-005.000
N095 G01 X+005.000 Y+061.388 Z-005.000
N100 G02 X+012.541 Y+077.033 Z-005.000 I+020.000 J+000.000
N105 G01 X+027.345 Y+088.822 Z-005.000
N110 G02 X+033.574 Y+091.000 Z-005.000 I+006.230 J-007.822
N115 G01 X+062.997 Y+091.000 Z-005.000
N120 G02 X+069.226 Y+088.822 Z-005.000 I+000.000 J-010.000
N125 G01 X+087.671 Y+074.134 Z-005.000
N130 G02 X+095.000 Y+061.388 Z-005.000 I-012.459 J-015.645
N135 G1 X95 Y40
N140 G3 X125 Y10 R30
N145 G40
N150 G0 Z20 M9
N155 G91 G28 Z0 M5
N160 G91 G28 X0 Y0
N165 G90 G49 G40 G80
N170 M30

184 MTS TeachWare • CNC-Milling • Student’s Book