184

Click here to load reader

CNC Milling

Embed Size (px)

DESCRIPTION

Catalogs MTSCNC training sofwareTopMill

Citation preview

  • CNC-Milling

    MTS TeachWare Students Book

    MTS Mathematisch Technische Software-Entwicklung GmbH Kaiserin-Augusta-Allee 101 D-10553 BerlinPhone: +49 / 30 / 349 960 0 Fax: +49 / 30 / 347 960 25 World Wide Web: http://www.mts-cnc.com email: [email protected]

  • CNC-Milling

    MTS TeachWare Students 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: [email protected]

    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

    MTS GmbH Berlin 3

    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

  • Contents

    4 MTS TeachWare CNC-Milling Students Book

    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

  • Contents

    MTS GmbH Berlin 5

    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

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 7

    1 Introduction into working with the CNC simulator milling

    1.1 System overviewIn 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 1The hardware for the CNC Simulator workplace.

    The CNC Simulator can be used with the input media keyboard and mouse. A PC keyboard is basically allyou 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 sequencesof digits and letters.

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

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

  • Chapter 1

    8 MTS TeachWare CNC-Milling Students Book

    1.1.1 CNC milling machine

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

    Machine zero

    tool moves in Y

    table moves in X and ZReference point

    Workpiece Zero

    Tool reference point

    Tool change point

    Turret reference point

    Figure 3Schematic 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 plateor modular clamping.

    Figure 4jaws

    Figure 5modular 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.

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 9

    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

  • Chapter 1

    10 MTS TeachWare CNC-Milling Students Book

    1.1.2 CNC control

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

    Figure 6Menu 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 likethe 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. Duringmachining the internal model computes the actually resulting work part contour using the programmed toolpaths during program execution, with a tolerance range of about 0.5 mm. As the simulation can be performedfor different tool qualities and materials etc., the error and collision monitoring function does not check theprogrammed feedrate or revolution speed.

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 11

    1.2 Operating modesThe CNC Simulator for Milling represents a 3D-milling machine with vertical spindle position. The followingthree 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 assignedto a NC program. Invoking this NC program will then effect the automatic set-up of the appropriate simulatedmachine 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 7CNC Milling, Setup Mode menu

    The Simulator for Milling provides 16 tools in the magazine. Tools from the tool file can be mounted in all toolpositions (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 thesimulator 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 areavailable.

  • Chapter 1

    12 MTS TeachWare CNC-Milling Students Book

    Figure 8Simulator 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 CNCSimulators; it serves to establish the zero position for incremental measuring along the axes. Approach of thereference point is also a precondition for defining the work part zero and for execution of NC programs in theAutomatic Mode.

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

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 13

    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 andchecks the syntax (the formal structure of the NC block) as the block is being entered.

    Figure 9CNC Simulator, NC Editor

    The NC Editor is equipped with a NC-Program Management to delete and print NC programs.

    Figure 10CNC Simulator, NC Editor, Program Management

    Directory path

    Cur. proces. funct.

    Input field

    File information

    Available program files

  • Chapter 1

    14 MTS TeachWare CNC-Milling Students Book

    Interactive Programming is a feature in which the Automatic Mode and Editor complement each other toprovide the simplest and most efficient way to get started with NC programming. The simulation follows stepby 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 andautomatically inserted in the NC program.

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

    Figure 11WOP Interface, CNC Milling:

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 15

    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 themachine tool in terms of geometrical and technological parameters as well as those of the CNC control, theprogram 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 toadd certain supplementary functions, such as zooming (CNC turning), measuring, 3D-view, traverse pathmonitoring, and the calculation of machining cycles and downtimes.

    Figure 12Example of an Automatic Mode menu

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

  • Chapter 1

    16 MTS TeachWare CNC-Milling Students Book

    1.3 Screen representation and manipulationBefore we explain the functional operations such as setting up the machine tool, creating and testing the NCprogram 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 theMTS software, first change to the drive and directory where the MTS programs are stored. Then run the CNCSimulator by entering the command "MTSCNC":

    cd \MTSCNC

    mtscnc

    Change directory

    Confirm

    Start program

    Confirm

    Figure 13Example 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-Softwareavailable in your system.

    Figure 14Menu of MTS programs

    The highlighted rectangular boxes under "Machine" and "Control" indicate the currently selected configurationfiles. Select the desired program by pressing a function key.

    F2 The function key F2 launch the CNC Milling Simulators

    F8

    Strg +

    The function key F8 starts the exit procedure. Use the key combination

    to terminate the program and return to the main MTS program menu.

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 17

    1.3.2 Screen representation

    The screen representation of CNC machining is generally divided into three areas, with work part machiningdisplayed 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 15Screen Layout

    Work rangeThe 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 intop view.

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

    Information ColumnThe right column contains text information on necessary machining information. In the Main Menu none ofthe modes are active, therefore, no information is shown. In Setup Mode and Automatic Mode this columncontains 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 keysThe numbered boxes at the bottom of the screen indicate the program functions that can be selected with thefunction keys during processing.

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

  • Chapter 1

    18 MTS TeachWare CNC-Milling Students Book

    1.3.3 Menu structure

    All program control options of the CNC Simulator are given as context-sensitive menu items, with importantprocedural steps supported by program dialogues. This menu concept of the CNC Simulator is based on theWOP 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 functionalitythe 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 canbenefit from this operating concept because you are able to make use of the operating functions without priorknowledge; 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 .

    CNC-Simulator Setup Mode Reference Points

    Magazine Tool Management

    Tool Holder

    Tool Adapter

    Feedrate / Speed

    Spindle / Coolant

    Manual Treating

    Chuck managementChuck

    Workpiece file

    Part / Chuck

    Setup form

    Status management

    Traverse Paths

    Single block

    Interactive Programming

    Automatic mode

    Automatic mode

    Teach in

    Editor

    WOP-Surface

    WOP-Surface

    WOP-SurfaceNC-EditorNC-Programmanage.

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

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 19

    1.3.4 Data management

    The internal data management functions provide a convenient means for documenting and backing up allwork 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 ISOtool 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 ofthose no longer required.

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

    The screen layout of the Define/Delete Tools main menu is divided into two sections: the upper screen areacontains a listing of all available tool types; the field currently in use is highlighted in color. As usual, furthersteps 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.

    F1 or F5

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

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

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

  • Chapter 1

    20 MTS TeachWare CNC-Milling Students Book

    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 18CNC 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 ahelp graphic or a graphic corresponding to the data of the tool being defined (including the tool adapter). Theinput 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. Tosave time, it is reasonable to define a new tool by first copying the data record of a similar tool, and then tomodify 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 Use ESC to conclude the operation, and to return to the Define/Delete Tools main menu.

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 21

    1.4 Special functions of the softwareThe 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 19CNC Milling,3D View, three-quarter view with intersections

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

  • Chapter 1

    22 MTS TeachWare CNC-Milling Students Book

    1.4.2 Programming aids

    Whenever you need assistance or have a question during the creation or testing of an NC program, you cancall 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 directlydisplayed 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 ofprogramming instructions available, without having to interrupt programming.

    Figure 21CNC 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 functionkey 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 helpscreen.

  • Introduction into working with the CNC simulator milling

    MTS GmbH Berlin 23

    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 usedby 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 forwhich 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 storedinformation, 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 mainmenu. The CNC Simulator is then set-up automatically.

    Figure 22CNC Milling, Set-up Sheet menu

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

  • Chapter 1

    24 MTS TeachWare CNC-Milling Students Book

    1.4.4 Status management

    In addition to the Set-up Sheet function, to facilitate the operation of the software, the CNC Simulator alsoallows 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 menuof the CNC Simulator.

    Figure 24CNC Milling, Status Manager

    Figure 25CNC 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 statususually 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.

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 25

    2 Coordinate systems and Zero point shiftsFor 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 systemThe machine coordinate system of the CNC machine tool is defined by the manufacturer and cannot bechanged. The point of origin for this machine coordinate system, also called machine zero point M, cannot beshifted in its location

    M X

    Y

    Z

    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 bysetting a local coordinate system nor by programming other commands or actions at the machine.

  • Chapter 2

    26 MTS TeachWare CNC-Milling Students Book

    2.1.1 Activating the machine coordinate system

    The machine coordinate system can be activated by manually moving to the reference point. Please checkthe 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) isactive.

    Programming Example:

    N10 G54 X435. Y250. Z132.

    N15 G90 G00 X80. Y60. Z0. P1

    Y

    X

    Z

    P1

    P3P2

    50

    435

    132

    250

    50Y

    X

    Z

    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, forexample the tool changing position.

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

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 27

    2.2 Work part coordinate systemAfter the set-up has been completed, the control system of the machine tool refers to the machine zero asthe 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 thework part coordinate system, also called work part zero point W, can be, in general, specified as desired.

    X

    YZ

    W

    Work part zero point W

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

    X

    YZ

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

  • Chapter 2

    28 MTS TeachWare CNC-Milling Students Book

    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, or2. 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 partzero point relative to the momentary tool position.

    2. In the CNC control six different work part coordinate systems (G54 - G59) may be predefined. In theNC 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: G92Work 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 themomentary 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 activeNC-program.

    Note: The programming values in the addresses X, Y or Z are not the coordinates of thenew 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 systemsare modified by G92.

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 29

    Command: G92Work 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 themomentary tool position in the new work part coordinate system !

    Programming Example

    1 Y

    X

    Z

    W

    The momentary tool position is the left front uppercorner 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.

    (The coordinates after the command G92 specify thecoordinates of the tool position in the new work partcoordinate system!)

    2

    50

    30Y

    X

    Z

    W

    70

    40The momentary tool position is the left front uppercorner of the work part (see left figure).

    50

    Y

    X

    W

    Z

    70

    Next block of the NC program:

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

    The zero point of the new work part coordinate sys-tem is +50mm in the X-Axis and + 70mm in Y-Axisfrom the momentary tool position.

    (The coordinates after the command G92 specify thecoordinates of the tool position in the new work partcoordinate system!)

    30

    WX

    Y

    40

    Z All coordinate values following the G92 commandrefer to the new work part coordinate system.

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

    N110 ...

    N150 G00 X30. Y40. Z2.

    N155 G01 Z10. F100.

    N160 ...

  • Chapter 2

    30 MTS TeachWare CNC-Milling Students Book

    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 referencepoint of the work part and the machine zero point. The value and the direction of this distance may be storedinto 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:

    CONFIGURATIONMACHINE MAKINO FX 650CONTROL FANUC 16M FX650

    BLANK DIMENSIONSX+140.000 Y+125.000 Z+025.000

    VISEMAKFX 160CHUCKED HEIGHT E+031.000SHIFT V+000.000ORIENTATION A0

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 31

    Solution:

    work part coordinate systems$G54 X400 Y240 Z135$G55 X435 Y305 Z135$G56 X415 Y265 Z135$G57 X495 Y332 Z135

    Program02905

    N010 G54N015 G90 G49 G80 G40 G17 G21N020 G91 G28 Z0N025 G91 G28 X0 Y0N030 T1 M6N035 G90 S1800 M3N040 G0 G43 Z20 H17N045 G56N050 G0 X0 Y0 M8N055 G91N060 G98 G73 Z-17 R-38 Q6 F80 L0N065 M98 P905

    N070 G55N075 G0 X0 Y0 M8N080 G91N085 G98 G83 Z-17 R-38 Q6 F80 L0N090 M98 P906

  • Chapter 2

    32 MTS TeachWare CNC-Milling Students Book

    N095 G57N100 G0 X0 Y0 M8N105 G91N110 G98 G82 Z-17 R-38 P2000 F80 L0N115 M98 P907

    N120 G53N125 G54N130 G0 Z20 M5N135 G91 G28 Z0 M9N140 G91 G28 X0 Y0N145 G90 G49 G80 G40N150 M30

    Subprograms0905 0906 0907N10 G91 G99 X0 Y0N15 X20N20 X20N25 X20N30 G98 X20N35 G90 G80N40 M99

    N10 G91 G99 X0 Y0N15 Y15N20 Y15N25 G98 Y15N30 G90 G80N35 M99

    N010 G91 G99 X20 Y0N015 X-20 Y20N020 X-20 Y-20N025 G98 X20 Y-20N030 G90 G80N035 M99

    Finished part:

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 33

    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 theprogrammer to take the dimensions directly from the drawing.

    X

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

    work part zero point in most cases, depending onthe 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 describedbelow the distance is specified between the machine zero point M and the work part zero point W in the threecoordinates 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. Thecorresponding correction values were entered into the CNC control. The zero setting tool is clamped and thespindle rotation is switched on.

    1. Resetting Z direction

    W

    ZY

    X

    The machine table with the clamped work part ismoved below the work spindle (in X and Y) in whichthe reset tool is clamped.

    Now the tool is recessed in Z direction to the workpart surface (X, Y plane), with the spindle switchedon, until a small marking is done on the work part(touching the work part) surface.

    After this the Z axis is reset and the Z value of thework part zero point W is transferred and storedinto the CNC control using the IST key.

    Resetting in Z

  • Chapter 2

    34 MTS TeachWare CNC-Milling Students Book

    2. Resetting in X direction

    W

    ZY

    2

    1

    X

    The tool is removed again and taken into the newresetting position for the X axis. With the spindleswitched on it is taken onto the side surface of thework part (Y, Z plane) in X direction until a smallmarking is made on the work part surface (touchingthe work part).

    When touching the work part in X axis the radius ofthe applied tool has to be considered when con-firming the value with the IST key, as the centerpoint coordinates of the tool are always used in NCprogramming.

    If the milling tool of the adjacent figure has, for in-stance, a radius of 15 mm, then the value X= -15 isentered into the NC control and confirmed with IST.

    Resetting in X

    3. Resetting in Y direction

    W

    ZY

    2

    1

    3X

    The last step is to take the tool to the resetting po-sition for the Y axis. With the spindle switched on,the tool is taken into Y direction, to the front surfaceof the work part (X, Z Plane) until a small markingis done on the work part surface (touching the workpart).

    When touching the work part in Y the radius of theapplied tool has to be considered when entering thevalue for the IST value take-over as in NC pro-gramming the center point coordinates of the toolare always used.

    If the tool of the adjacent figure has, for instance, aradius of 15 mm then the value Y= -15 is enteredinto the CNC control and confirmed with IST.

    Resetting in Y

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 35

    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 partzero point W in the three coordinates X, Y and Z is defined.

    Please note that only the tool moves in the MTS simulator!

    W

    Z Y

    X

    Starting situation:

    All machining tools are dimensioned andavailable in the magazine.

    The work part is adjusted and clampedon the machine table in the simulator.

    The location of the work part zero pointshould be the left top corner of the workpart.

    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 zeropoint.

    Type "T0202 using the keyboard and

    confirm.

    5. Setting the zero point in Z directionTake the tool in rapid speed to a position ap-prox. 5mm above the work part surface.

    W

    ZY

    X

    Using the numeric keyboard press the corre-sponding arrow key together with the shift key:

    Ex.: + 2 for rapid speed in -Z direction.

    5 +X-X

    0Einfg

    +Z

    -Z

    +Y

    -Y

    64

    ,Entf

    3Bild

    9Bild

    7Pos 1

    1Ende

    8

    2

    6

    4

    9Bild

    1Ende

    8

    2

    Further travel direction options:

    ( + X direction )

    ( - X direction )

    ( + Y direction )

    ( - Y direction )

    ( + Z direction )

    ( - Z direction )

  • Chapter 2

    36 MTS TeachWare CNC-Milling Students Book

    6. Switch the increment from 1mm to 0,1mm or0,01mm for further machining.

    F3

    F5

    F2

    (technology)

    (increment)

    (increment 0.1)

    7 Move the tool in negative Z direction until ittouches the surface of the work part. 2

    ESC

    F8

    Press the arrow key on the numeric keyboard

    Then press

    and

    (quit).

    8. Set the work part zero point in Z. F4

    F4

    F3

    F8

    (tool/ datum)

    (set datum)

    (set Z coord.)

    Type in the data on the keyboard 0 and

    confirm it.

    Check Z by setting the zero point and usingthe displayed coordinate values.

    9. Setting the zero point in X directionWithdraw the tool in +Z direction.

    Using the numeric keyboard press the arrow

    key together with the shift key:

    + 8 for rapid speed in +Z direction

    10. Take the tool in rapid speed to the new zerosetting position approx. 5mm off the side sur-face.

    W

    ZY

    2

    1

    X

    Press the corresponding arrow key on thenumeric keyboard

    together with the shift key:

    1) in -X direction

    + 4 for rapid speed in -X direction

    2) in -Z direction

    + 2 for rapid speed in -Z direction

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 37

    11. Move the tool in positive X direction until ittouches the surface of the work part. 6

    ESC

    F8

    Press the arrow key on the numeric keyboard.

    Then press

    and

    (return).

    12. Set the work part zero point in X.

    Please note the tool radius!

    So, enter for the X coordinate the negativevalue of the radius of the applied tool, for in-stance -10.

    F4

    F4

    F1

    F8

    (tool, zero point)

    (set datum)

    (set X coordinate)

    Type "-10 using the keyboard and confirm.

    Check the X by setting the zero point usingthe displayed coordinate values.

    13. Setting the zero point in Y directionTake off the tool in -X direction and then in +Zdirection.

    Using the numeric keyboard press the arrowkey together with the shift key:

    + 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-ting position approx. 5mm off the front side.

    W

    ZY

    2

    1

    3X

    Using the numeric keyboard press the corre-sponding arrow key together with the shift key:

    1) in +X direction

    + 6 for rapid speed in +X direction

    2) in -Y direction

    + 1Ende for rapid speed in -Y direction

    3) in -Z direction

    + 2 for rapid speed in -Z

    15. Take the tool in positive Y direction until ittouches the surface of the work part. 9

    Bild

    ESC

    F8

    Press the arrow key on the numeric keyboard.

    Then press

    and

    (quit).

  • Chapter 2

    38 MTS TeachWare CNC-Milling Students Book

    16. Set the work part zero point in Y.

    Please, note the tool radius!

    So, enter for the Y coordinate the negativevalue of the radius, for instance -10.

    F4

    F4

    F2

    F8

    (tool/datum)

    (set datum)

    (set Y coord.)

    Type "-10 using the keyboard and confirm

    key.

    Check the Y by setting the zero point usingthe displayed coordinate values.

    17. Withdraw the tool in -Y and then in +Z direc-tion.

    use the numeric keyboard and press the arrowkey together with the shift key:

    + 1Ende for rapid speed in -Y direction, then

    + 8 for rapid speed in +Z

    18. F8 (quit)

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

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 39

    3 NC commands for programming FANUC 16 M

    3.1 Absolute value input and incremental value input G90/G91

    Command: G90Activate Absolute Dimensions

    Function: When the command G90 is programmed, all subsequent coordinate values relateto 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 inthe 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 incrementaldimensioning).

  • Chapter 3

    40 MTS TeachWare CNC-Milling Students Book

    Command: G91Activate 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 bespecified 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 theirposition 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 absolutedimensioning).

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 41

    3.2 Linear Interpolation and Machine Functions

    3.2.1 Rapid traverse G00

    Command: G00Rapid 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 mm, 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 withthat of the current tool position. It does not have to be programmed separately, since the coordinate addressis 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 theZ-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 inthe 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.

  • Chapter 3

    42 MTS TeachWare CNC-Milling Students Book

    Command: G00Rapid 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 mm, 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.

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 43

    3.2.2 Linear Interpolation in Slow Feed Motion G01

    Command: G01Linear 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 mm, 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 withthat 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 withinthe same NC-block, these commands will be executed prior to moving the tool to the target position.

  • Chapter 3

    44 MTS TeachWare CNC-Milling Students Book

    Command: G01Linear 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.

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 45

    3.2.3 Going to the reference point G28

    Command: G28Automatic 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 referencepoint 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

    The cutter moves from

    its present position to

    the programmed inter-

    mediate point and finally

    to the reference point.

    Starting point

    Intermediate pointReference point

    Generally the command G28 is used for a tool changing. If the Automatic Reference Point Return has beenactivated 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

    for Absolute Dimensioning:

    (The position is X+50 Y+30 Z+2)

    N085 G54 G90

    N090 G28 X+100. Y+100. Z+100.

    (The intermediate point is on X+100 Y+100 Z+100)

    Programming Example

    for Incremental Dimensioning:

    (The position is X+50 Y+30 Z+2)

    N085 G91

    N090 G28 X+50. Y+70. Z+98.

    (The intermediate point is on X+100 Y+100 Z+100)

    X, Y and Z are commanded by the coordinate valueof the intermediate point in work coordinate systemindependent of the present position.

    X, Y and Z are commanded by the movement dis-tance between the present position and the inter-mediate point.

  • Chapter 3

    46 MTS TeachWare CNC-Milling Students Book

    3.2.4 Return from the reference point G29

    Command: G29Automatic Return from the Reference Point

    Function: The function Automatic Return from the Reference Point enables the tool to movefrom 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 mayeither 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

    The cutter moves from

    the reference point to

    the intermediate point

    (programmed in the last

    G28 command) and fi-

    nally to the programmed

    target position. Target point

    Reference pointIntermediate point

    Generally the command G29 is used after a tool changing. If the Automatic Return from the Reference Pointhas been activated for a program part, the following must be observed:

    When the coordinate system is modified after automatic reference point return, an intermediatepoint is created in the new coordinate system.

    Programming Example

    for Absolute Dimensioning:

    (The position is X+50 Y+30 Z+2)

    N085 G90

    N090 G28 X+100. Y+100. Z+100.

    (The intermediate point is on X+100 Y+100 Z+100)

    N095 T01

    N100 G29 X+50. Y30. Z+2.

    Programming Example

    for Incremental Dimensioning:

    (The position is X+50 Y+30 Z+2)

    N085 G91

    N090 G28 X+50. Y+70. Z+98.

    (The intermediate point is on X+100 Y+100 Z+100)

    N095 T01

    N100 G29 X-50. Y-70. Z-98.

    In G29 X, Y and Z are commanded by the coordi-nate value of the target point in work coordinatesystem independent of the intermediate point.

    In G29 X, Y and Z are commanded by the move-ment distance between the intermediate point andthe target point.

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 47

    3.2.5 Dwell time G04

    Command: G04Dwell

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

    NC-Block: G04 XP

    ...

    ...

    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 P99999999G04 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: G09Exact Stop

    Function: If G09 is programmed as part of an NC-block, only in this NC-block the feedrate willbe decelerated to zero when the programmed contour point is reached. After thestandstill at precisely the programmed position, the tool motion is resumed and thenext 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 suchas lags or overshoots may occur. To move the tool with precision to the programmed coordinates, the G09command must be programmed.

  • Chapter 3

    48 MTS TeachWare CNC-Milling Students Book

    3.2.7 Switching to dimension unit inch G20

    Command: G20Inch Data Input

    Function: This command G20 serves to switch the unit of measurement from millimeters toinches. 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 thecoordinate 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. Atthe 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: G21Millimeter 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 thetechnology 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 thecoordinate 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. Atthe 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 mm, so

    X20 represent X0.02mm.

    For this reason it is important to program values with a decimal point.

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 49

    3.2.9 Feedrate F in mm per minute G94

    Command: G94Feedrate 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 inchesper minute.

    3.2.10 Feedrate F in mm per revolution G95

    Command: G95Feedrate F in mm per minute

    Function: The command G95 serves to program the feedrate per revolution. The measuringunit 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 inchesper minute.

    3.2.11 Spindle speed S

    Command: SSpindle speed

    Function: The spindle speed is programmed in revolutions per minute (RPM).

    NC-Block: S...

    Programming Example: N100 ... S1500 ...

  • Chapter 3

    50 MTS TeachWare CNC-Milling Students Book

    3.2.12 Programmed Stop M00

    Command: M00Programmed 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, stoptemporarily. 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: M01Optional 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 ablock which contains the command M01, all operations, for example spindle rota-tion or coolant, stop temporarily. The program can restart by pressing the startpush-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.

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 51

    3.2.14 Program End M02

    Command: M02Program End

    Function: This command informs the control system that the current program run has beencompleted. The spindle and the coolant pump will be deactivated and the automaticprogram 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: M30Program End with Resetting

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

    NC-Block: ...M30

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

  • Chapter 3

    52 MTS TeachWare CNC-Milling Students Book

    3.2.16 Activate spindle in clockwise rotation M03

    Command: M03Activate 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: M04Activate 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: M05Deactivate 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: M06Mounting 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 theworkspindle the command M06 must be separately programmed.

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 53

    3.2.20 Activate Coolant 1 M07

    Command: M07Activate 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: M08Activate 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: M09Deactivate Coolant

    Function: The command M09 deactivates the coolant pump.

    NC-Block: ...M09

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

  • Chapter 3

    54 MTS TeachWare CNC-Milling Students Book

    3.2.23 Mirror in the X-Axis M21

    Command: M21Mirror 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: M22Mirror 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: M23Cancel mirror functions

    Function: The command M23 cancels the mirror functions M21 and M22. It means, that allmoves are in the same direction as the programmed direction.

    NC-Block: ... M23

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

  • NC commands for programming FANUC 16 M

    MTS GmbH Berlin 55

    3.2.26 Activate Feedrate Override dial M48

    Command: M48Activate Feedrate Override dial

    Function: The command M48 activates the feedrate override dial on the operation panel onthe 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: M49Cancel Feedrate Override dial

    Function: The command M49 deactivates the feedrate override dial on the operation panel onthe machine. The feedrate override fixes to 100%.

    NC-Block: ...M49

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

  • Chapter 3

    56 MTS TeachWare CNC-Milling Students Book

    3.2.28 Subprogram Call M98

    Command: M98Subprogram Call

    Function: A subprogram called by the command M98 is executed by the control system. Afterthis, the execution of the main program will be continued from the position in theprogram 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: M99End 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 beencalled.

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

  • Interpolation with cutter radius compensation

    MTS GmbH Berlin 57

    4 Interpolation with cutter radius compensation

    4.1 Selection of machining planes G17-G19A work part can be machined in each of the three possible planes (X Y, Z X or Y Z). The respective third axisis 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. Inthe below table the G-commands are listed with their corresponding machining planes and downfeed axes.

    Plane Selection(G-Command)

    Coordinate Plane(Machining Plane)

    Feed AxisTool Axis

    G17 XY - Plane Z

    G18 ZX - Plane Y

    G19 YZ - Plane X

    Command: G17Selecting the machining plane G17

    Function: The G-commands G17 serve to select the XY machining plane.

    NC-Block: ... G17 ...

    Command: G18Selecting the machining plane G18

    Function: The G-commands G18 serve to select the ZX machining plane.

    NC-Block: ... G18 ...

    Command: G19Selecting the machining plane G19

    Function: The G-commands G19 serve to select the YZ machining plane.

    NC-Block: ... G19 ...

  • Chapter 4

    58 MTS TeachWare CNC-Milling Students Book

    4.2 Circular interpolationCircular interpolations can be moved in two opposite directions.

    G02 in clockwise direction, or inG03 counter-clockwise direction.

    X

    Y G02 G03

    Directions for Circular Interpolations.

    4.2.1 Circular Interpolation Clockwise G02

    Command: G02Circular 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 thecircle center in the X-direction).

    J Circle Center Incremental (distance between the starting position and thecircle center in the Y-direction).

    K Circle Center Incremental (distance between the starting position and thecircle 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 feedrateclockwise on a circular arc to the target position asdefined by the coordinates in X and Y.

    These coordinates may either be programmed inthe absolute system (G90) or in the incrementalsystem (G91). X

    Y G02

  • Interpolation with cutter radius compensation

    MTS GmbH Berlin 59

    Command: G02Circular 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 inthe 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.

  • Chapter 4

    60 MTS TeachWare CNC-Milling Students Book

    4.2.2 Circular Interpolation Counter-Clockwise G03

    Command: G03Circular 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 thecircle center in the X-direction).

    J Circle Center Incremental (distance between the starting position and thecircle center in the Y-direction).

    K Circle Center Incremental (distance between the starting position and thecircle 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 feedratecounter-clockwise on a circular arc to the targetposition as defined by the coordinates in X and Y.

    X

    Y G03

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

  • Interpolation with cutter radius compensation

    MTS GmbH Berlin 61

    Command: G03Circular 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 inthe 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.

  • Chapter 4

    62 MTS TeachWare CNC-Milling Students Book

    4.3 Machining Plane, Sense of Rotation, Coordinates of a Circular ArcThe G-commands G17, G18 and G19 serve to select a machining plane par example for circular interpola-tions. It is p