CNC Training

download CNC Training

of 202

description

Catalogs MTSCNC training sofware

Transcript of CNC Training

  • CNC-Turning

    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 / 349 960 25 World Wide Web: http://www.mts-cnc.com email: [email protected]

  • CNC-Turning

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

    1.1 System overview...................................................................................................................................7

    1.1.1 CNC turning machine..............................................................................................................8

    1.1.2 CNC control...........................................................................................................................10

    1.1.3 Collision monitoring...............................................................................................................11

    1.2 Operating modes................................................................................................................................12

    1.2.1 Setup mode...........................................................................................................................12

    1.2.2 Programming Mode...............................................................................................................14

    1.2.3 Automatic mode....................................................................................................................16

    1.3 Screen representation and manipulation............................................................................................17

    1.3.1 System start..........................................................................................................................17

    1.3.2 Screen representation...........................................................................................................18

    1.3.3 Menu structure......................................................................................................................19

    1.3.4 Data management.................................................................................................................20

    1.4 Special functions of the software........................................................................................................22

    1.4.1 3D representation..................................................................................................................22

    1.4.2 Programming aids.................................................................................................................23

    1.4.3 Setting-up automatics, set-up sheet......................................................................................24

    1.4.4 Status management..............................................................................................................25

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

    2.1 Machine coordinate system................................................................................................................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 G50.........................................29

    2.3 Specifying the necessary location of the work part zero point............................................................30

    3 NC commands for programming OKUMA 5020 L...................................................33

    3.1 Absolute value input and incremental value input G90/G91...............................................................33

    3.2 Linear Interpolation and Machine Functions.......................................................................................35

    3.2.1 Rapid traverse G00...............................................................................................................35

    3.2.2 Linear Interpolation in Slow Feed Motion G01......................................................................37

    3.2.3 Dwell time G04......................................................................................................................42

    3.2.4 Switching to dimension unit inch or mm................................................................................42

    3.2.5 Spindle speed S....................................................................................................................43

    3.2.6 Select Lower Spindle Speed Range M41..............................................................................43

    3.2.7 Select Higher Spindle Speed Range M42.............................................................................43

    3.2.8 Constant Speed Cutting G96................................................................................................44

    3.2.9 Cancel Constant Speed Cutting G97....................................................................................44

  • Contents

    4 MTS TeachWare CNC-Turning Students Book

    3.2.10 Maximum Spindle Speed Limitation G50............................................................................44

    3.2.11 Feedrate F in mm per minute G94......................................................................................45

    3.2.12 Feedrate F in mm per revolution G95.................................................................................45

    3.2.13 Programmed Stop M00.......................................................................................................46

    3.2.14 Optional Stop M01...............................................................................................................46

    3.2.15 Program End M02...............................................................................................................46

    3.2.16 Program End with Resetting M30.......................................................................................46

    3.2.17 Activate spindle in clockwise rotation M03.........................................................................47

    3.2.18 Activate spindle in counter - clockwise rotation M04..........................................................47

    3.2.19 Deactivate spindle M05.......................................................................................................47

    3.2.20 Mounting a tool T.................................................................................................................48

    3.2.21 Activate Coolant M08..........................................................................................................48

    3.2.22 Deactivate Coolant M09......................................................................................................48

    3.2.23 Activate Feedrate Override dial M48...................................................................................49

    3.2.24 Cancel Feedrate Override dial M49.....................................................................................49

    3.2.25 Subprogram CALL...............................................................................................................50

    3.2.26 End of Subprogram RTS.....................................................................................................50

    3.3 Tool Offset Compensation..................................................................................................................51

    3.4 Tool Nose Compensation...................................................................................................................52

    3.4.1 Selection of Tool Compensation Values T............................................................................54

    3.4.2 Position of the Tool Nose Compensation..............................................................................55

    3.4.3 Tool Nose Compensation Left G41.......................................................................................56

    3.4.4 Tool Nose Compensation Right G42.....................................................................................57

    3.4.5 Cancel Tool Nose Compensation G40..................................................................................58

    3.4.6 Taper cutting with tool nose compensation...........................................................................593.4.6.1 Taper Cutting with G01 X...Z.................................................................................593.4.6.2 Taper Cutting with an angle A...............................................................................63

    3.5 Circular interpolation...........................................................................................................................67

    3.5.1 Circular Interpolation Clockwise G02....................................................................................67

    3.5.2 Circular Interpolation CounterClockwise G03........................................................................69

    3.5.3 Circular Interpolation with Radius Input.................................................................................74

    3.6 Automatic Chamfering........................................................................................................................79

    3.6.1 Automatic 45 Chamfering G75.............................................................................................80

    3.6.2 Automatic Rounding G76......................................................................................................84

    3.7 Thread Cutting G33............................................................................................................................91

    3.8 Taper Thread Cutting G33..................................................................................................................95

    4 Compound Fixed Cycles.............................................................................................. 99

    4.1 Longitudinal Thread Cutting Cycle G71..............................................................................................99

    4.2 Longitudinal Grooving Fixed Cycle G73...........................................................................................109

    4.3 Transverse Grooving Fixed Cycle G74.............................................................................................113

    4.4 Right-Hand Tapping Cycle G77........................................................................................................117

    4.5 Left-Hand Tapping Cycle G78..........................................................................................................121

  • Contents

    MTS GmbH Berlin 5

    5 Subprogram technology.............................................................................................125

    5.1 Purpose, function and use of subprograms of a CNC turning machine...........................................125

    5.1.1 Subprogram CALL..............................................................................................................125

    5.1.2 End of Subprogram RTS.....................................................................................................125

    5.2 Nesting several subprograms...........................................................................................................131

    6 Lathe Auto - Programming Function LAP.................................................................136

    6.1 Contour Definition.............................................................................................................................136

    6.2 Survey...............................................................................................................................................137

    6.3 Bar Turning Rough Cut Cycle G85...................................................................................................137

    6.4 Contouring Rough Cut Cycle G86....................................................................................................149

    6.5 Finish Cut Cycle G87........................................................................................................................155

    7 Workshop-Oriented Programming ............................................................................156

    7.1 Introduction.......................................................................................................................................156

    7.2 Example............................................................................................................................................157

    7.3 Exercise............................................................................................................................................164

    8 Examples and Exercises............................................................................................168

    8.1 Pawn:................................................................................................................................................168

    8.2 Bishop:..............................................................................................................................................174

    8.3 Knight:..............................................................................................................................................180

    8.4 Queen:..............................................................................................................................................186

    8.5 Tower:...............................................................................................................................................192

    8.6 King:.................................................................................................................................................198

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 7

    1 Introduction into working with the CNC simulator turning

    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 allprogram functions with the function keys and enter machine commands and NC program blocks assequences of 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-Turning Students Book

    1.1.1 CNC turning machine

    The CNC Turning Simulator simulates a 2-axis turning machine. In the CNC simulation all positioning andfeed movements appear to be made by the tool carrier, so the chuck and the work part have a fixed positionand the tool moves in both coordinates.

    Figure 3Schematic of the machine configuration

    The work part can be clamped by using: lathe chuck with step jaws, collet chuck, collet, face driveror lathe centres.

    Figure 4CNC Turning,workpart and clampingdefinition;"Clamping Fixture Selection" menu.

    Figure 5CNC Turning, clamping between centers.

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

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 9

    The following tool types are available in the Tool Manager:

    Right handed corner cutter Left handed corner cutter Copying tool

    Circular tip turning tool Boring tool (postaxial) Boring tool (preaxial)

    External recessing tool Inside recessing tool (postaxial) Inside recessing tool (preaxial)

    Axial recessing tool Right handed threading tool Left handed threading tool

    Available tools in the CNC-Simulator

  • Chapter 1

    10 MTS TeachWare CNC-Turning Students Book

    Inside threading tool (postaxial) Inside threading tool (preaxial) Twist drill

    Centring drill Insert boring tool Freeform tool

    Available tools in the CNC-Simulator

    1.1.2 CNC control

    The standard configuration for the CNC simulator is the control Okuma LB15.

    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.

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 11

    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 workpart machining, collision monitoring is performed and the results are displayed as errormessages. The entire machine tool space with workpart, fixtures, tool system etc. is taken into account.During machining the internally followed mathematical model computes the actually resulting workpartcontour using the programmed tool paths during program execution, with a tolerance range of less than 1mm. As the simulation can be performed for different tool qualities and materials etc., the error and collisionmonitoring function does not check the programmed feedrate or speed nor does it use coolant.

  • Chapter 1

    12 MTS TeachWare CNC-Turning Students Book

    1.2 Operating modesThe CNC Simulator for Turning represents a 2D-turning machine. The following three modes can be used forprocessing:

    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 specialinteractive menu. Blank dimensions must be specified and the clamping device be selected.

    Figure 7CNC Turning, Setup Mode menu

    The Simulator for Turning provides 12 tools in the turret. Tools from the tool file can be mounted in all toolpositions (from T01 to T12) as default setting, so as to simulate the equipment of an actual machine tool.This configuration means that the turret is automatically equipped with this tool selection each time thesimulator system is booted.

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 13

    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 bespecified, so that the offset can be computed in the control system. A total of 99 offset value storage files areavailable.

    Figure 8Set of Tools in the turret

    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.

  • Chapter 1

    14 MTS TeachWare CNC-Turning Students Book

    1.2.2 Programming ModeThe 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 errormessages 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

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 15

    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 ismachined manually and the corresponding linear travel commands complying with ISO6983 are generatedand automatically inserted in the NC program.

    Figure 11Teach-In, CNC Turning:

    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 12WOP Interface, CNC Turning:

  • Chapter 1

    16 MTS TeachWare CNC-Turning Students Book

    1.2.3 Automatic mode

    The automatic mode is used to run and test programs created by the CNC Simulator, the INCAD CAMsystem or some other NC-Programming system, in real-time simulation under consideration of collisionmonitoring. Since the machine and control configuration of the simulator allows a reality-identicalperformance of the machine tool in terms of geometrical and technological parameters as well as those of theCNC control, the program evaluation takes place under conditions highly identical with the actual work partmachining operations.

    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 13Example 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.

    Figure 14Traverse Path Monitoring for an NC program range

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 17

    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 15Example 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 16Menu of MTS programs

    The highlighted rectangular boxes beside "CNC-Turning" indicate the currently selected configuration. Selectthe desired program by pressing a function key.

    F1 The function key F1 launches the CNC Turning Simulators

    F8

    F8

    The function key F8 starts the exit procedure. Confirm again with the function key F8

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

  • Chapter 1

    18 MTS TeachWare CNC-Turning Students Book

    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 17Screen 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 turning simulation displays the work part and the cutter.

    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 on necessary machining information. In the Main Menu none of the modes areactive, therefore, no information is shown. In Setup Mode and Automatic Mode this column containsinformation on the current machine and system status like feedrate, spindle 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.

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 19

    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 worksituation, the function keys at the bottom of the screen give you guidance all the time. On the other hand youcan benefit from this operating concept because you are able to make use of the operating functions withoutprior 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 .

    CNC-Simulator Setup Mode Reference Points

    Turret Tool Management

    Reversible Tip

    Tool Holder

    Tool Adapter

    Feedrate / Speed

    Spindle / Coolant

    Manual Treating

    Chuck managementChuck

    Workpiece file

    Part / Chuck

    Setup form

    Status management

    Measuring

    Turning

    WOP-Contours

    Entity dimensioning

    Point dimensioning

    Surface finish

    Threads

    Display 3D-Display

    Section display

    Zoom

    Turning

    WOP-Contours

    Aids

    Graphics-Print

    Traverse Paths

    Single block

    Interactive Programming

    Automatic mode

    Automatic mode

    Teach in

    Editor

    WOP-Surface

    WOP-Surface

    WOP-SurfaceNC-EditorNC-Programmanage.

    Figure 18Schematic of the processing options of the CNC Turning Simulator (simplified).

  • Chapter 1

    20 MTS TeachWare CNC-Turning Students Book

    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 toolmanagement includes options for editing the available tool files, i.e. modification of existing tools and deletionof those no longer required.

    Figure 19CNC Turning, 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 mounting, use F5.

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

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 21

    Having started in the main menu by selecting the tool type, and subsequently selecting the Create Tool

    function by pressing F1 , the Data Entry menu for defining the tool is loaded.

    Figure 20CNC Turning, Define/Delete Tools; defining a left-hand corner 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 Mounting 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 movesautomatically to the next input field.

    [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 obtaininformation on the parameters.

    F8 Create tool: When the data entry for all tool and tool adapter parameters has beencompleted, 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.

  • Chapter 1

    22 MTS TeachWare CNC-Turning Students Book

    1.4 Special functions of the softwareThe CNC Simulator incorporates some special functions which effectively support processing and NCprogramming:

    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 Turning Simulators. To displaymachining inside the work part, any work part can be cut out.

    Figure 21CNC Turning, 3D View

    Figure 22CNC Turning, 3D Display, full part with intersections

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 23

    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 ispreceded by a table of contents or a schematic function display. In this manner, you have almost the entireset of programming instructions available, without having to interrupt programming.

    Figure 23CNC Turning, 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. Thecorresponding program message is displayed, "Help screen: _______

    Confirm the name entry by pressing . If a help screen with that name isavailable, it is then loaded. If not, the error message: "Help screen not found" isdisplayed.

    Strg and You can use the Strg + keys on the PC keyboard to recall the previous helpscreen.

  • Chapter 1

    24 MTS TeachWare CNC-Turning Students Book

    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 interactiveprogramming the CNC Simulator is set-up automatically with the Setup Sheet Interpreter according to thestored 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 mainmenu. The CNC Simulator is then set-up automatically.

    Figure 24CNC Turning, Set-up Sheet menu

    Figure 25CNC Turning, example of a Set-up Sheet (excerpt)

  • Introduction into working with the CNC simulator turning

    MTS GmbH Berlin 25

    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 statusincludes:

    exact work part geometry clamping method turret 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 insections 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 26CNC Turning, Status Manager

    Figure 27CNC Turning, 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.

  • NC-Programmierung Drehen

    26 MTS TeachWare CNC-Turning Students Book

    2 Coordinate systems and Zero point shiftsFor programming it is possible to use two different kinds of coordinate systems such as

    machine coordinate system and work part 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.

    In most Lathes the machine zero point is located in the rotation axis of the spindle and on the stop face of thelathe chucks.

    +X

    M

    +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 cannot be changed, either by changing the work part coordinate system orby setting a local coordinate system or by programming other commands or actions at the machine.

  • 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 partcoordinate system is defined by the programmer and can be changed. The location of the point of origin forthe work part coordinate system, also called work part zero point W, can be, in general, specified as desired.

    W

    Work part zero point W

    The work part zero point W is the origin of the work part coordinate system. Its location is specified by theprogrammer according to practical criteria. The ideal location of the work part zero point allows thedimensions to be directly taken from the drawing. In case of turning the work part zero point is generally in thecenter of the left or right side of the completed part, depending on which side the dimensioning was startedfrom.

    W

    +X

    +Z W

    +X

    +Z

    Work part zero point in the left side Work part zero point in the right side

  • Chapter 2

    28 MTS TeachWare CNC-Turning Students Book

    2.2.1 Define the work part coordinate system

    The work part coordinate system may be defined by three different methods:

    1. predefine the work part zero point W by setting system variables,

    2. shift the predefined work part zero point W in the NC-program with the command G50 or

    3. define the work part zero point W in the machine by touching the work part.

    1. The work part zero point W can be predefined using system vaiables without being programmed in thecontrol system. Preferably this work part zero point W is located in the rotation axis and on the stopface of the lathe chucks.

    W

    Predefined work part zero point W

    2. In the NC program the command G50 serves to define the coordinates X and Z of a new work partzero point W relative to the predefined work part zero point by setting system variables.

    W

    zero offset valuePedefined work part zero point W

    3. The work part zero point W can be defined in the machine by touching the work part and than enteredin the control.

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 29

    2.2.2 Setting the work part coordinate system with the command G50

    Command: G50Work part coordinate system G50

    Function: A new work part coordinate system is set with the command G50NC-Block: G50 [X...] [Z...]Optional Addresses: X X-Coordinate of the Work part coordinate system relative to

    the predefined work part zero point (zero offset in X)Z Z-Coordinate of the Work part coordinate system relative to

    the predefined work part zero point (zero offset in Z)

    Programming example: G50 X100 Z150

    Note: All coordinates entered after the command G50 refer to this new work part zeropoint W.After the reset of the control, all zero offset values are canceled and the predefinedwork part zero point is active again.No tool offset number is allowed to be programmed in the NC-block with thecommand G50.

  • Chapter 2

    30 MTS TeachWare CNC-Turning Students Book

    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 isspecified by the programmer according to practical criteria. The ideal location of the work part zero pointallows the programmer to take the dimensions directly from the drawing.

    W

    +X

    +Z

    For practical reasons the work part zero point W isselected in turning in the right-hand plane surfaceand in the rotation axis.

    The work part zero point is set with reference to themachine zero point M or to the predefined work partzero point by setting the system variables.

    Work part zero point

    wM

    z w

    Using the operation functions described below thedistance in the Z-direction between the machinezero point M and the work part zero point W isspecified.

    This value zw, also called the zero point shift, isthen entered into the CNC control.

    ProcedureStarting situation: All machining tools have been measured and are available on the turret head.

    The clamping device is prepared and the work part has been correctly clamped.

    1. Switch on the spindle (counterclockwise rotation).2. Change the tool to set the work part zero point, i.e. rotate the turret head to the corresponding position, for

    instance T02.Note: The rotation area of the turret has to be checked first to avoid collision during rotation.

    3. Touch the front plane area of the work part:move carefully with the tool using the hand wheelor using the corresponding arrow keys of the keyboard of the CNC controluntil the cutting edge reaches a marking on the work part.

    4. Enter the desired plane area allowance (e.g. 0.5 mm) on the CNC control.Actuate with the zero key.(The dimensions are used to face the front surface in z=0)

    5. The CNC control then stores the value of the zero point shift zw.The work part zero point W is clearly specified since the X coordinate zero is located on the rotation axis.

    6. Because of eventual allowance the front side needs to be faced. This needs to be considered whenprogramming the NC program.

  • Coordinate systems and Zero point shifts

    MTS GmbH Berlin 31

    Setting the work part zero point W in the CNC simulator

    By setting the work part zero point W the relation between the machine based and work part basedcoordinate system is created. The work part zero point corresponds to the drawing zero point. Consequently,the drawing dimensions can be used in programming.Using the operation steps described below the distance between the machine zero point M and the work partzero point W can be specified. This Z value is also called the zero shift zw.

    M W

    z w

    Starting situation:

    All machining tools are dimensioned and availableon the turret head.

    The work part is clamped in chuck jaws. The work part zero point is located on the front

    plane surface, whereby an allowance of 1mm hasto be considered.

    Description Entry

    1. Call CNC turning in the main menu. F1 (Turning)2. Select setup mode. F3 (Setup mode)3. Switch on the spindle in counterclockwise

    rotation.Type M04 using the keyboard andconfirm.

    4. Change the tool for the definition of the workpart zero point.

    Type T0404 using the keyboard and confirm.

    5. Move the lathe tool in rapid speed so that it islocated in front of the front plane surface witha distance of approx. 5mm to the front planesurface.

    +Z

    +X

    Using the numeric keyboard press thecorresponding arrow key simultaneously withthe shift key:

    + 4

    for rapid speed in -Z direction

    + 2

    for rapid speed in -X direction

    5 +Z-Z

    0Ein fg

    +X

    -X

    64

    ,E ntf

    3B ild

    7Pos 1

    8

    2

    6

    4

    8

    2

    Travel direction options:

    ( + Z - direction )( - Z - direction )( + X - direction )( - X - direction )

  • Chapter 2

    32 MTS TeachWare CNC-Turning Students Book

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

    F3

    F5

    F2

    (Technology)

    (Increment)

    (Increment 0.1)

    7 Move the lathe tool in negative Z-direction untilit touches the plane surface of the work part .4

    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

    F1

    F8

    (Tool datum)

    (Set datum)

    (Set Z coord.)

    Type z+1using the keyboard and confirm

    with (allowance of 1mm).

    The Z value can be checked for the currentzero point using the displayed coordinates.

    9. Take the tool off in +Z direction and in+X direction .

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

    + 6 for rapid speed in +Z direction

    + 8 for rapid speed in +X direction

    10. Quit the setup mode F8

    F8

    F8

    (Quit)

    (Quit)

    (Quit)

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 33

    3 NC commands for programming OKUMA 5020 L

    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, isprogrammed in absolute coordinates, regardless of the current tool position.

    NC-Block: G90

    Note: When absolute dimensioning (G90) is operative, the X-coordinate is programmedrelative to the diameter of the workpiece.

    Absolute Dimensioning:

    In the absolute system all

    dimensions refer to the origin

    (zero point) of the coordinate

    system, which is also called

    the dimensioning 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:

    N025 G90

    ...

    N090 G00 X+40 Z-50

    ...

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

  • Chapter 3

    34 MTS TeachWare CNC-Turning Students Book

    Command: G91Activate Incremental Dimensions

    Function: When the command G91 is programmed, the programmed coordinates of thetarget 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 currentposition.

    NC-Block: G91

    Note: When incremental dimensioning (G91) is operative, the X-coordinate isprogrammed relative to the radius of the workpiece.

    Incremental Dimensioning:

    Contrary to the absolute

    system, the incremental

    dimensioning system is based

    on specifying the distance

    between a current 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:

    N025 G91

    ...

    N095 G01 Z-30

    ...

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

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 35

    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 asprogrammed by the X- and Z- coordinates. These coordinates may either beprogrammed in the absolute system (G90) or in the incremental system (G91).

    Note: When absolute dimensioning (G90) is operative, the X-coordinate is programmedrelative to the diameter of the workpiece.When incremental dimensioning (G91) is operative, the X-coordinate isprogrammed relative to the radius of the workpiece.

    -Z

    +X

    -Z

    +X

    Example for absolute dimensioning Example for incremental dimensioningIf a tool movement parallel to an axis is desired, the respective target coordinate will be identical with that ofthe 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 toolmanufacture. Consequently, the rapid traverse rate cannot be defined in the address F. Positioning is doneseparately for each axis. The traveled path is generally not a straight line.

    Z

    X

    Real movement for G00

  • Chapter 3

    36 MTS TeachWare CNC-Turning Students Book

    Command: G00Rapid traverse

    Function: The tool will move at the maximum possible speed to the target position asprogrammed by the X- and Z- coordinates. These coordinates may either beprogrammed in the absolute system (G90) or in the incremental system (G91).

    NC-Block: G00 [X...] [Z...] [T...] [M...]

    Optional Addresses: X X-Coordinate of the Target Point

    Z Z-Coordinate of the Target Point

    T Tool Function

    M Additional Function

    Programming Example

    for Absolute Dimensioning:

    N025 G90

    ...

    N100 G00 X+30 Z+5

    The tool moves to the point X=30/Z=5.The X-coordinate is programmed relative to the diameter!

    Programming Example

    for Incremental Dimensioning:

    N025 G91

    ...

    N100 G00 X-12,5 Z-35

    The tool moves in the direction X by the value -12.5 and in the direction Z by the value -35 .Positioning the tool at X+30 / Z+5 will be possible only if the tool has been positioned at X+55, Z+40 (startposition) in the preceding block.The X-coordinate is programmed relative to the radius!

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 37

    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 asprogrammed by the X- and Z- coordinates. These coordinates may either beprogrammed in the absolute system (G90) or in the incremental system (G91).

    NC-Block: G01 [X...] [Z...] [F...] [S...] [T...] [M...]

    Optional Addresses: X X-Coordinate of the Target Point

    Z Z-Coordinate of the Target Point

    F Feedrate

    S Speed

    T Tool Function

    M Additional Function

    Note: When absolute dimensioning (G90) is operative, the X-coordinate is programmedrelative to the diameter of the workpiece.

    When incremental dimensioning (G91) is operative, the X-coordinate isprogrammed relative to the radius of the workpiece.

    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.

    If a tool movement parallel to an axis is desired, the respective target coordinate will be identical with that ofthe current tool position. It does not have to be programmed, since the coordinate address is self-retentive.

    Programming Example

    with parallel movement

    to an axis:

    N025 G90

    ...

    N090 G01 Z-50

    ...

  • Chapter 3

    38 MTS TeachWare CNC-Turning Students Book

    Command: G01Linear Interpolation

    Function: The tool will move at the programmed feedrate to the target position asprogrammed by the X- and Z- coordinates. These coordinates may either beprogrammed in the absolute system (G90) or in the incremental system (G91).

    NC-Block: G01 [X...] [Z...] [F...] [S...] [T...] [M...]

    Optional Addresses: X X-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:

    N025 G90

    ...

    N100 G01 X+140 Z-90

    The tool moves to the point X=140, Z=-90.The X-coordinate is programmed relative to the diameter!

    Programming Example

    for Incremental Dimensioning:

    N025 G91

    ...

    N100 G01 X+20 Z-60

    The tool moves in the direction X by the value 20 and in the direction Z by the value-60 .Positioning the tool at X+140, Z-90 will be possible only if the tool has been positioned at X+100, Z-30 (startposition) in the previous block.The X-coordinate is programmed relative to the radius!

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 39

    Exercise:Create an NC-program for the following bolt with linear movements parallel to the axes.

  • Chapter 3

    40 MTS TeachWare CNC-Turning Students Book

    Use the following configuration:

    PARTCYLINDER D060.000 L082.000MATERIAL AlMg 1::AluminiumDENSITY 002.70

    MAIN SPINDLE WITH WORKPARTCHUCK KITAGAWA B-208STEP JAW WM-KIT_01.002TYPE OF CHUCK EXTERNAL CHUCK OUTSIDE STEP JAWCHUCKING DEPTH E18.000RIGTH SIDE OF THE PART: Z+174.500

    TAILSTOCKTAILSTOCK POSITION Z+1100.000

    CURRENT TOOLT04

    TOOLST01 LEFT CORNER TOOL CL-SVJCR-2020/R/1604 ISO30T02 LEFT CORNER TOOL CL-SVJCR-2020/R/1604 ISO30T03 FRONT GROOVING TOOL RA-MBS-E5N-2.5/20/055-075/R ISO30T04 LEFT CORNER TOOL CL-SCLCR-2020/R/1204 ISO30T05 INSIDE TURNING TOOL POST BI-SVQBL-1010/L/0702 ISO30T06 NTERN. THREADING TOOL POSTAX TI-ITTR-2016/R/60/2.00 ISO30T07 TWIST DRILL DR-08.00/075/R/HSS ISO30T08 RECESSING TOOL ER-SGTFL-2012/L/03.0-0 ISO30T09 CENTER DRILL CD-04.00/056/R/HSS ISO30T10 LEFT THREADING TOOL TL-LHTR-2020/R/60/2.50 ISO30T11 INSIDE TURNING TOOL POST BI-SVQBL-1212/L/0702 ISO30T12 REVERSIBLE TIP DRL DI-22.00/051/R/HMT ISO30

    ACCURATE OFFSET

    Finished part:

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 41

    Solution:Note: All following example programs have been so configured that the Work part zero point is located

    on the right plane surface. For processing on the Lathe either the zero point has to be setmanually or it has to be programmed in the NC-program using the G50 command.In the MTS-simulator the zero point shift $G54 is required for simulation!

    NC-program

    $G54 Z173.5O10188

    N010 G0 X500 Z500 T040404 M3 M42 M63N015 G96 S160N020 G50 S3000N025 G0 X62 Z0.N030 G1 X-1 F0.3 M8N035 G0 X54 Z2.N040 G1 Z-44.8N045 X61N050 G0 Z2.N055 X48N060 G1 Z-44.8N065 X54N070 G0 Z2.N075 X42N080 G1 Z-44.8N085 X48N090 G0 Z2.N095 X36N100 G1 Z-14.8N105 X42N110 G0 Z2.N115 X32N120 G1 Z-14.8N125 X36N130 G0 Z2.N135 X500 Z500 M9N140 T020202 G96 S280 M42 M3 M63N145 G50 S4000N150 G0 X30 Z2.N155 G1 Z-1. M8 F0.1N160 X40N165 Z-45

    N170 X62N175 G0 X500 Z500 M5 M9N180 M2

  • Chapter 3

    42 MTS TeachWare CNC-Turning Students Book

    3.2.3 Dwell time G04

    Command: G04Dwell

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

    NC-Block: G04 [F...]

    Optional Addresses: F Dwell time in seconds

    3.2.4 Switching to dimension unit inch or mm

    Inch data input or mm data input

    The standard dimension unit is the metric system. The inch system is an optional extension. Thereforeneither the command G20 nor the command G21 is available for machines in standard model.

    All coordinate values must be specified in millimeters. Accordingly the technology data concerning thefeedrate must be specified in millimeters per minute (mm/min).

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 43

    3.2.5 Spindle speed S

    Command: SSpindle speed

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

    NC-Block: ...S...

    Programming Example: N100 ... S1500 ...

    Note: Before programming the spindle speed the desired spindle speed range must bespecified by using the command M41 or M42.

    M41 from 75 to 1100 revolutions per minute

    M42 from 75 to 4500 revolutions per minute

    3.2.6 Select Lower Spindle Speed Range M41

    Command: M41Select lower spindle speed range

    Function: The command M41 select the lower spindle speed range for heavy duty cutting inthe optimal spindle speed range from 440 to 1100 revolutions per minute

    NC-Block: ...M41...

    Programming Example: N100 ...M41 S500 ...

    Note: Before programming the spindle speed S the desired spindle speed range must bespecified by using the command M41 or M42.

    All spindle speeds are availlable, however the programmed spindle speeds shouldbe in the selected range.

    3.2.7 Select Higher Spindle Speed Range M42

    Command: M42Select higher spindle speed range

    Function: The command M42 select the higher spindle speed range for heavy duty cutting inthe optimal spindle speed range from 1100 to 4500 revolutions per minute

    NC-Block: ...M42...

    Programming Example: N100 ...M42 S3000 ...

    Note: Before programming the spindle speed S the desired spindle speed range must bespecified by using the command M41 or M42.

    All spindle speeds are availlable, however the programmed spindle speeds shouldbe in the selected range.

  • Chapter 3

    44 MTS TeachWare CNC-Turning Students Book

    3.2.8 Constant Speed Cutting G96

    Command: G96Constant Speed Cutting

    Function: The command G96 serves to program a constant cutting speed.

    NC-Block: G96 [S...]

    Optional Addresses: S Cutting Speed in m per min.

    Programming Example: N100 G96 F120The Cutting Speed is 120mm per min

    With turning operations the surface cutting speed is dependent on the programmed spindle speed as well ason the current X-coordinate of the tool nose. To keep the cutting speed constant, the result from themultiplication of the speed and the tool nose coordinate in X must be kept as a constant value in the controlsystem. When smaller X-coordinate values are specified, the spindle speed will increase accordingly.

    Note: When the machining requires small X-coordinate values, the command G50 shouldbe programmed to limit the spindle speed, so as to avoid exceeding the maximumspeed permissible with the clamping device.

    The constant cutting speed remains operative until it is deactivated by G97 or isoverwritten by another G96 command.

    The command G96 cannot used for the thread cutting program.

    3.2.9 Cancel Constant Speed Cutting G97

    Command: G97Cancel Constant Speed Cutting

    Function: The command G97 serves to cancel the constant cutting speed command G96.

    NC-Block: G97 [S...]

    Optional Addresses: S Spindle Speed in revolutions per minute (RPM).

    Programming Example: N100 G97 S2000The Spindle Speed is now constant 2000 revolutions per minute (RPM).

    3.2.10 Maximum Spindle Speed Limitation G50

    Command: G50Spindle speed limitation

    Function: When a constant cutting speed (G96) is programmed for cross turning down to azero diameter, the spindle will accelerate to its maximum speed. To preventpossibly serious problems with the workpiece clamping, the programming of aspindle speed limitation (G50) together with the constant cutting speed isrecommended.

    NC-Block: G50 [S...]

    Programming Example: N100 G50 S1500

    Note: The maximum spindle speed limitation is active until another G50 command isprogrammed.

    The G50 command must be programmed in a separate NC block.

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 45

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

    Programming Example: N100 G94 F120The feedrate is 120mm per minute

    3.2.12 Feedrate F in mm per revolution G95

    Command: G95Feedrate F in mm per revolution

    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.

    Programming Example: N100 G95 F0.2The feedrate is 0.2mm per revolution

    Note: For using the Feedrate in mm per revolution the spindle must be rotated for the axisto move.

  • Chapter 3

    46 MTS TeachWare CNC-Turning Students Book

    3.2.13 Programmed Stop M00

    Command: M00Programmed Stop

    Function: After the execution of a block which contains the command M00, the programexecution is 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.

    3.2.14 Optional Stop M01

    Command: M01Optional Stop

    Function: If the Optional Stop Switch on the machine operation panel is turned on, theprogram execution is stopped in the same way as M00. After the execution of ablock which contains the command M01, all operations, for example spindlerotation or coolant, stop temporarily. The program can berestarted by pressing thestart push-button.

    If the Optional Stop Switch is off, the command M01 is ignored. The operationproceeds 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.

    3.2.15 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 performed the rewind (search of the begin of the program).

    NC-Block: ...M02

    3.2.16 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 beencompleted. The spindle and the coolant pump are deactivated and the automaticprogram run is terminated.

    NC-Block: ...M30

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 47

    3.2.17 Activate spindle in clockwise rotation M03

    Command: M03Activate spindle in clockwise rotation

    Function: The command M03 activates the spindle rotation in clockwise direction.

    NC-Block: ...M03

    M03

    line of view

    M03:

    Spindle rotation clockwise

    The sense of rotation is determined asseen from the drive, i.e. in the line of viewof the positive Z-axis.

    3.2.18 Activate spindle in counter - clockwise rotation M04

    Command: M04Activate spindle in counter - clockwise rotation

    Function: The command M04 activates the spindle rotation in the counterclockwise direction.

    NC-Block: ...M04

    M04

    line of view

    M04:

    Spindle rotation counterclockwise

    The sense of rotation is determined asseen from the drive, i.e. in the line of viewof the positive Z-axis.

    3.2.19 Deactivate spindle M05

    Command: M05Deactivate spindle

    Function: The command M05 stops the spindle rotation.

    NC-Block: ...M05

  • Chapter 3

    48 MTS TeachWare CNC-Turning Students Book

    3.2.20 Mounting a tool T

    Command: TMounting a tool

    Function: The command T mounts a tool, which is selected by the digits following the addresscharacter T.

    NC-Block: ... T00 00 00...

    The digits describe the number of the tool and the number of the compensation storage.

    T 00 00 00

    tool offset number

    tool number

    tool nose compensation number

    Note: For using the tool nose compensation number see chapter Selection of ToolCompensation Values T.

    3.2.21 Activate Coolant M08

    Command: M08Activate Coolant

    Function: The command M08 activates the coolant pump.NC-Block: ...M08

    3.2.22 Deactivate Coolant M09

    Command: M09Deactivate Coolant

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

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 49

    3.2.23 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 controlled from 0% to 200%.

    NC-Block: ...M48

    3.2.24 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

  • Chapter 3

    50 MTS TeachWare CNC-Turning Students Book

    3.2.25 Subprogram CALL

    Command: CALLSubprogram Call

    Function: A subprogram called by the command CALL is executed by the control system.After this, the execution of the main program will be continued from the position inthe program line, where the subprogram had been invocated.

    NC-Block: CALL O[...]

    Optional Addresses: O Number of the subprogram

    Programming Example: N100 CALL O3001 (Call the subprogram 3001)

    3.2.26 End of Subprogram RTS

    Command: RTSEnd of Subprogram

    Function: The command RTS (ReTurn form Subprogram) marks the end of a subprogram.

    NC-Block: RTS

    At the end of each defined subprogram, the command RTS must be programmed to cause the controlsystem to return to the main program, respective to the subprogram from which the current subprogram hasbeen called.

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 51

    3.3 Tool Offset CompensationUsing the tool offset compensation values it is easy to program a work part without consideration of theactually applicable tool lengths or overhangs. The available work part drawing data can be directly used forprogramming. The tool data, lengths as well as overhangs of the turning machines are automaticallyconsidered by the CNC control.

    B

    L

    B

    Q

    L

    B tool setup point

    L length = distance of the cutting tip to the toolset-in point in Z

    Q overhang = distance of the cutting tip to thetool setup point in X

    Tool offset compensation values

    In computing the tool movements the control system relates all programmed coordinates to the tool setuppoint which is situated at the stop face of the tool mounting.

    It follows that the distance between the theoretical cutting point of the tool nose and the tool setup point mustbe determined for every tool, so that the actual tool path can be computed. Each of these differential values isstored as a tool offset compensation value in a corresponding compensation value storage. When aprogrammed tool change is to be executed in the course within NC program, the system reads in theapplicable compensation value storage, to account for the tool geometry in computing the tool path.

  • Chapter 3

    52 MTS TeachWare CNC-Turning Students Book

    3.4 Tool Nose CompensationThe actual cutting point of the reversible tip changes during the course of machining, according to the toolmovement direction.

    R M

    P

    P Theoretical tool nose M Tool nose Centre

    In computing the tool motion the control system assumes the movement of the theoretical cutting point of thetool nose along the programmed contour. Every time the tool executes a programmed movement which is notparallel to either the X- or Z-axis, deviations from the desired contour and the corresponding dimensions areunavoidable, due to the radius of the tool tip employed.

    If tool nose compensation is not selected, the actual machining will deviate from the programmed contour onthe rising and falling segments of a contour, due to the radius of the tool tip.

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 53

    When tool nose compensation is activated, the control system computes the path of the centre of the toolnose, equidistant to the contour, accounting for the radius.

    - - - Offset Path M Tool Nose Centre

    If the tool nose compensation is selected the system computes the motion of the tool nose centre on anoffset path equidistant to the contour, i.e. the actual cutting point moves exactly along the programmedcontour of the workpiece.

    With each tool the theoretical cutting point of the tool nose must be defined by the tool nose compensationvector to make sure that the control system can compute the path of the actual cutting point in the executionof a cycle. The tool nose compensation vector defines the theoretical position of the tool nose (in thedirections X and Z) relative to its centre.

    Example: Radius 0,4I =-0,400K=-0,400

    Example: Radius 0,4I =-0,400K=-0,231

  • Chapter 3

    54 MTS TeachWare CNC-Turning Students Book

    Alternatively the tool nose compensation vector can be determined by eight tooling quadrants. This iscommon practice and applicable to standard cases.

    tooling quadrants tool nose compensation vectors

    The tool management (see Simulator Operation Manual) predefines a TNC vector for every tool available inthe Simulator system.

    3.4.1 Selection of Tool Compensation Values T

    For programming with tool offset and tool nose compensation it is necessary to select the tool compensationvalues of the actual tool by using the T command.

    Command: TTool selection command

    Function: Select the tool on the specified turret position with or without the tool nosecompensation.

    NC-Block: ... T00 00 00...

    Depending on the quantity of the subsequent digits the tool nose compensation is activated or not.

    4 digit command T00 00 without the tool nose compensation6 digit command T00 00 00 with the tool nose compensation

    The digits describe the number of the tool and the number of the compensation storage.

    T 00 00 00

    tool offset number

    tool number

    tool nose compensation number

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 55

    3.4.2 Position of the Tool Nose CompensationSince machining can be done in two ways the NC control has to be informed if machining is to take place onthe left (command G41) or right (command G42) of the programmed contour.Outside machining:

    G41 G42

    1

    2

    1

    2

    machining direction of the tool left of the contour programmed contour

    machining direction of the tool right of the contour

    programmed contour

    Inside machining:

    G41 G42

    1

    2

    1

    2

    machining direction of the tool left of the contour programmed contour

    machining direction of the tool right of the contour

    programmed contour

  • Chapter 3

    56 MTS TeachWare CNC-Turning Students Book

    3.4.3 Tool Nose Compensation Left G41

    Command: G41Compensation to the left of the contour (in the cutting direction)

    Function: When the tool nose compensation is operative, only the work part contour pointsare programmed and the control system must be informed whether the tool shallmove left or right of the programmed contour. The qualifications left or right apply tothe direction in which the tool travels along the contour

    NC-Block: G41 G01 [X...] [Z...] [F...]

    Optional Addresses: X X-Coordinate of the Target Point

    Z Z-Coordinate of the Target Point

    F Feedrate

    Note: The command of the NC-block specifying G41 should be G00 or G01. When G41 isspecified by the commands G02 or G03 an alarm message is displayed.

    For using the tool nose compensation the actual tool must be selected with the6 digit Tool command

    Programming Example:

    N25 T030303...N100 G41N105 (contour description)...N170 G40

    machiningdirection

    programmedcontour

    programmedcontour

    path of thetheoreticaltool nose

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 57

    3.4.4 Tool Nose Compensation Right G42

    Command: G42Compensation to the right of the contour (in the cutting direction)

    Function: When the tool nose compensation is operative, only the work part contour pointsare programmed and the control system must be informed whether the tool shallmove left or right of the programmed contour. The choiceof left or right applies tothe direction in which the tool travels along the contour

    NC-Block: G42 G01 [X...] [Z...] [F...]

    Optional Addresses: X X-Coordinate of the Target Point

    Z Z-Coordinate of the Target Point

    F Feedrate

    Note: The command of the NC-block specifying G42 should be G00 or G01. When G42 isspecified by the commands G02 or G03 an alarm message is displayed.

    For using the tool nose compensation the actual tool must be selected with the6 digit Tool command

    Programming Example:

    N25 T030303...N100 G42N105 (contour description)...N170 G40

    machiningdirection

    path of thetheoreticaltool nose

    programmedcontour

  • Chapter 3

    58 MTS TeachWare CNC-Turning Students Book

    3.4.5 Cancel Tool Nose Compensation G40

    Command: G40Cancel the tool nose compensation

    Function: The command G40 cancels the tool nose compensation activated by thecommands G41 or G42.

    NC-Block: G40 G01 [X...] [Z...] [F...]

    Optional Addresses: X X-Coordinate of the Target Point

    Z Z-Coordinate of the Target Point

    F Feedrate

    Note: The command of the NC-block specifying G40 should be G00 or G01. When G40 isspecified by the command G02 or G03 an alarm message is displayed.

    No tool changing functions can be programmed.

    At the end of the program the cutter radius compensation must be canceled, sincethe center of the tool cannot be positioned at the end point, and remains deviatedby the cutter radius compensation value.

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 59

    3.4.6 Taper cutting with tool nose compensation

    In turning, tool nose correction is used, due to the fact that the control calculates the travel paths based on atheoretical tool nose of the lathe tool. This theoretical tool nose moves along the programmed path.

    Since the actual tool dimensions, i.e. tool nose radius of the lathe tool, are not considered errors areunavoidable. In tool movements which are not parallel to X or Z axis considerable dimension and formdeviations are the result. These errors can be avoided by using tool nose compensation in the CNC control.

    12

    4

    3

    3

    5

    programmed contour

    theoretical cutting point

    theoretical tool tip

    actual tool tip

    incorrect deviation from theprogrammed contour

    Error in turning: taper is not true-to-size according to the programmed contour

    3.4.6.1 Taper Cutting with G01 X...Z...

    Command: G01Linear Interpolation

    Function: The tool moves at the programmed feedrate to the target position as programmedby the X- and Z- coordinates. These coordinates may either be programmed in theabsolute system (G90) or in the incremental system (G91).

    NC-Block: G01 [X...] [Z...] [F...] [S...] [T...] [M...]

    Optional Addresses: X X-Coordinate of the Target Point

    Z Z-Coordinate of the Target Point

    F Feedrate

    S Speed

    T Tool Function

    M Additional Function

    Note: When absolute dimensioning (G90) is operative, the X-coordinate is programmedrelative to the diameter of the workpiece.

    When incremental dimensioning (G91) is operative, the X-coordinate isprogrammed relative to the radius of the workpiece.

  • Chapter 3

    60 MTS TeachWare CNC-Turning Students Book

    Exercise:Create an NC-program for the following taper bolt with the coordinates X and Z.

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 61

    Use the following configuration:

    PARTGEOMETRY X+032.000 Z+163.700

    G01 X+022.200 Z+173.500G01 X+000.000 Z+173.500G01 X+000.000 Z+092.500G01 X+060.000 Z+092.500G01 X+060.000 Z+128.700G01 X+043.600 Z+128.700G03 X+042.000 Z+129.500 I+000.000 K+000.800G01 X+042.000 Z+133.700G01 X+032.031 Z+158.622G03 X+032.000 Z+158.779 I+000.784 K+000.157G01 X+032.000 Z+163.700M30MATERIAL AlMg 1::AluminiumDENSITY 002.70

    MAIN SPINDLE WITH WORKPARTCHUCK KITAGAWA B-208STEP JAW WM-KIT_01.002TYPE OF CHUCK EXTERNAL CHUCK OUTSIDE STEP JAWCHUCKING DEPTH E18.000RIGHT SIDE OF THE PART: Z+173.500

    TAILSTOCK POSITION Z+1100.000

    CURRENT TOOL T01

    TOOLST01 LEFT CORNER TOOL CL-SVJCR-2020/R/1608 ISO30T02 LEFT CORNER TOOL CL-SVJCR-2020/R/1604 ISO30T03 FRONT GROOVING TOOL RA-MBS-E5N-2.5/20/055-075/R ISO30T04 LEFT CORNER TOOL CL-SCLCR-2020/R/1204 ISO30T05 INSIDE TURNING TOOL POST BI-SVQBL-1010/L/0702 ISO30T06 NTERN. THREADING TOOL POSTAX TI-ITTR-2016/R/60/2.00 ISO30T07 TWIST DRILL DR-08.00/075/R/HSS ISO30T08 RECESSING TOOL ER-SGTFL-2012/L/03.0-0 ISO30T09 CENTER DRILL CD-04.00/056/R/HSS ISO30T10 LEFT THREADING TOOL TL-LHTR-2020/R/60/2.50 ISO30T11 INSIDE TURNING TOOL POST BI-SVQBL-1212/L/0702 ISO30T12 REVERSIBLE TIP DRL DI-22.00/051/R/HMT ISO30

    ACCURATE OFFSET

    Finished part:

  • Chapter 3

    62 MTS TeachWare CNC-Turning Students Book

    Solution:

    NC-program

    $G54 Z173.5O10190

    N010 G0 X500 Z500 T040404 M3 M42 M63N015 G96 S160N020 G50 S3000N025 G0 X62 Z0N030 G1 X-1 F0.15 M8N035 G0 X500 Z500N040 T010101 G96 S180 M3 M42 M63N045 G50 S3500N050 G0 X62 Z5N055 G0 G42 X16 Z2N060 G1 X20 Z0

    N065 G1 X30 Z-10

    N070 G1 Z-15

    N075 G1 X40 Z-40

    N080 G1 Z-45N085 X62N090 G40N095 G0 X500 Z500 M9 M5N100 M2

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 63

    3.4.6.2 Taper Cutting with an angle A

    Command: G01 with an angle ALinear Interpolation

    Function: The tool moves at the programmed feedrate to the target position as programmedby the X- coordinate and taper angle A or by the Z- coordinate and taper angle A.

    NC-Block: G01 [X...] [Z...] [A...] [F...] [S...] [T...] [M...]

    Optional Addresses: X X-Coordinate of the Target Point

    Z Z-Coordinate of the Target Point

    A Taper angle

    F Feedrate

    S Speed

    T Tool Function

    M Additional Function

    Note: The angle command can be uesd with the following commands: G00, G01, G31,G32, G33, G34 and G35.

    The angle A is measured in the X-Z-plane. The positive direction of the Z-axis is theangle zero. The angle A is positive in the counterclockwise direction and negativ inthe clockwise direction:

    Z

    X

    P1

    P2 P1

    P2P1

    P2

    A=-120 A=+240A=+120

    Programming: G01 X... A... or

    G01 Z... A...

    Programming Example

    for Absolute Dimensioning:

    N025 G90

    ...

    N100 G01 X+140 A+161,565

    or

    N100 G01 Z-90 A+161,565

    A=+161,565

  • Chapter 3

    64 MTS TeachWare CNC-Turning Students Book

    Exercise:Create an NC-program for the following taper bolt with G01 with angles.

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 65

    Use the following configuration:

    PARTGEOMETRY X+032.000 Z+163.700

    G01 X+022.200 Z+173.500G01 X+000.000 Z+173.500G01 X+000.000 Z+092.500G01 X+060.000 Z+092.500G01 X+060.000 Z+128.700G01 X+043.600 Z+128.700G03 X+042.000 Z+129.500 I+000.000 K+000.800G01 X+042.000 Z+133.700G01 X+032.031 Z+158.622G03 X+032.000 Z+158.779 I+000.784 K+000.157G01 X+032.000 Z+163.700M30MATERIAL AlMg 1::AluminiumDENSITY 002.70

    MAIN SPINDLE WITH WORKPARTCHUCK KITAGAWA B-208STEP JAW WM-KIT_01.002TYPE OF CHUCK EXTERNAL CHUCK OUTSIDE STEP JAWCHUCKING DEPTH E18.000RIGHT SIDE OF THE PART: Z+173.500

    TAILSTOCK POSITION Z+1100.000

    CURRENT TOOL T01

    TOOLST01 LEFT CORNER TOOL CL-SVJCR-2020/R/1608 ISO30T02 LEFT CORNER TOOL CL-SVJCR-2020/R/1604 ISO30T03 FRONT GROOVING TOOL RA-MBS-E5N-2.5/20/055-075/R ISO30T04 LEFT CORNER TOOL CL-SCLCR-2020/R/1204 ISO30T05 INSIDE TURNING TOOL POST BI-SVQBL-1010/L/0702 ISO30T06 NTERN. THREADING TOOL POSTAX TI-ITTR-2016/R/60/2.00 ISO30T07 TWIST DRILL DR-08.00/075/R/HSS ISO30T08 RECESSING TOOL ER-SGTFL-2012/L/03.0-0 ISO30T09 CENTER DRILL CD-04.00/056/R/HSS ISO30T10 LEFT THREADING TOOL TL-LHTR-2020/R/60/2.50 ISO30T11 INSIDE TURNING TOOL POST BI-SVQBL-1212/L/0702 ISO30T12 REVERSIBLE TIP DRL DI-22.00/051/R/HMT ISO30

    ACCURATE OFFSET

    Finished part:

  • Chapter 3

    66 MTS TeachWare CNC-Turning Students Book

    Solution:

    NC-program

    $G54 Z173.5O10190

    N010 G0 X500 Z500 T040404 M3 M42 M63N015 G96 S160N020 G50 S3000N025 G0 X62 Z0N030 G1 X-1 F0.15 M8N035 G0 X500 Z500N040 T010101 G96 S180 M3 M42 M63N045 G50 S3500N050 G0 X62 Z5N055 G0 G42 X16 Z2N060 G1 X20 Z0

    N065 G1 X30 A153.435

    N070 G1 Z-15

    N075 G1 X40 A168.69

    N080 G1 Z-45N085 X62N090 G40N095 G0 X500 Z500 M9 M5N100 M2

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 67

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

    G02 in clockwise direction, or inG03 counterclockwise direction.

    Z

    X G02 G03

    Directions for Circular Interpolations.

    3.5.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...] [Z...] [I...] [K...] [F...]...

    Optional Addresses: X X-Coordinate of the End Point

    Z Z-Coordinate of the End Point

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

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

    Note: The addresses I and K are always programmed in the incremental system,regardless of the selected value command system (G90 or G91).

    F Feedrate

    The tool moves at the programmed feedrateclockwise on a circular arc to the target position asdefined by the coordinates in X and Z.

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

    X G02

  • Chapter 3

    68 MTS TeachWare CNC-Turning Students Book

    Command: G02Circular Interpolation Clockwise G02

    Function: The tool moves clockwise on a circular arc to the target position.

    NC-Block: G02 [X...] [Z...] [I...] [K...] [F...]...

    Programming Example

    with Absolute Coordinates:

    N025 G90

    ...

    N110 G01 X+80 Z-40

    N115 G02 X+140 Z-106 I+45 K-20

    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:

    N025 G91

    ...

    N115 G02 X+30 Z-66 I+45 K-20

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 69

    3.5.2 Circular Interpolation CounterClockwise G03

    Command: G03Circular Interpolation CounterClockwise G03

    Function: The tool moves counterclockwise on a circular arc to the target position.

    NC-Block: G03 [X...] [Z...] [I...] [K...] [F...]...

    Optional Addresses: X X-Coordinate of the End Point

    Z Z-Coordinate of the End Point

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

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

    Note: The addresses I and K are always programmed in the incremental system,regardless of the selected value command system (G90 or G91).

    F Feedrate

    The tool moves at the programmed feedratecounter-clockwise on a circular arc to thetarget position as defined by the coordinatesin X and Y.

    Z

    X G03

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

  • Chapter 3

    70 MTS TeachWare CNC-Turning Students Book

    Command: G03Circular Interpolation CounterClockwise G03

    Function: The tool moves counterclockwise on a circular arc to the target position.

    NC-Block: G03 [X...] [Z...] [I...] [K...] [F...]...

    Programming Example

    with Absolute Coordinates:

    N025 G90

    ...

    N110 G01 X+80 Z-50

    N115 G03 X+140 Z-80 I-15 K-45

    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:

    N025 G91

    ...

    N115 G03 X+30 Z-30 I-15 K-45

  • NC commands for programming OKUMA 5020 L

    MTS GmbH Berlin 71

    Exercise:Create an NC-program for the following bolt with circular interpolation by using the coordinates I and K.

  • Chapter 3

    72 MTS TeachWare CNC-Turning Students Book

    Use the following configuration:

    PARTCYLINDER D070.000 L107.000MATERIAL AlMg 1::AluminiumDENSITY 002.70

    MAIN SPINDLE WITH WORKPARTCHUCK KITAGAWA B-208STEP JAW WM-KIT_01.002TYPE OF CHUCK EXTERNAL CHUCK OUTSIDE STEP JAWCHUCKING DEPTH E18.000RIGHT SIDE OF THE PART: Z+199.500

    TAILSTOCKTAILSTOCK POSITION Z+1100.000

    CURRENT TOOLT04

    TOOLST01 LEFT CORNER TOOL CL-SVJCR-2020/R/1608 ISO30T02 LEFT CORNER TOOL CL-SVJCR-2020/R/1604 ISO30T03 FRONT GROOVING TOOL RA-MBS-E5N-2.5/20/055-075/R ISO30T04 LEFT CORNER TOOL CL-SCLCR-2020/R/1204 ISO30T05 INSIDE TURNING TOOL POST BI-SVQBL-1010/L/0702 ISO30T06 NTERN. THREADING TOOL POSTAX TI-ITTR-2016/R/60/2.00 ISO30T07 TWIST DRILL DR-08.00/075/R/HSS ISO30T08