Rexroth MTC 200 NC Programming Instructions

Size: px
Start display at page:

Download "Rexroth MTC 200 NC Programming Instructions"

Transcription

1 Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth MTC 200 NC Programming Instructions R Edition 01 Application Manual

2 About this Documentation NC Programming Instructions Title Type of Documentation Rexroth MTC 200 NC Programming Instructions Application Manual Document Typecode Internal File Reference Document Number, B303-01/EN Purpose of Documentation This documentation describes the programming of NC functions of MTC 200 controller family. Record of Revisions Description Release Date Notes Document Number, B303-01/EN 02/2004 Valid from Version 23 Copyright Bosch Rexroth AG Copying this document, giving it to others and the use or communication of the contents thereof without express authority, are forbidden. Offenders are liable for the payment of damages. All rights are reserved in the event of the grant of a patent or the registration of a utility model or design (DIN 34-1). Validity The specified data is for product description purposes only and may not be deemed to be guaranteed unless expressly confirmed in the contract. All rights are reserved with respect to the content of this documentation and the availability of the product. Published by Bosch Rexroth AG Bgm.-Dr.-Nebel-Str. 2 D Lohr a. Main Telephone +49 (0)93 52/40-0 Tx Fax +49 (0)93 52/ Dept. BRC/ESM3 (GeVa, JoLi) Dept. BRC/ESM6 (DiHa) Note This document has been printed on chlorine-free bleached paper.

3 NC Programming Instructions Contents I Contents 1 General Information Notes Program and Data Organization NC Program Organization of Setup Lists Program Structure Advance Program Reverse Program Process-Specific Programming Elements of an NC Block Block Numbers Skipping Blocks NC Word Branch Label Note Comment Comment in the Source Program Available Addresses Motion Commands, Dimension Inputs Coordinate system Motion commands Measurements Absolute Dimension Entry "G90" Incremental Dimensions "G91" Offsets Zero offsets Adjustable Zero Offsets "G54 - G59" Coordinate Rotation with Angle of Rotation "P" Zero Offset Tables "O" Programmable Absolute Zero Offset "G50", Programmable Incremental Zero Offset "G51" Programmable Zero Point of Workpiece "G52" Cancel Zero Offsets "G53" Adjustable General Offset in the Zero Offset Table Read/Write Zero Offset Data from the NC Program via "OTD" Level selection Axis Number, Axis Designation and Axis Meaning

4 II Contents NC Programming Instructions Plane Selection "G17", "G18", "G19" Free Plane Selection "G20", "G21", "G22" Boundary conditions Effects Radius/Diameter Programming "G15" / "G16" Measurement units Measurement Unit Inch "G70" Unit Millimeters "G71" Mirror Imaging of Coordinate Axes "G72" / "G73" Scaling "G78" / "G79" Go to Axes Reference Point "G74" Feed to positive stop Feed to Positive Stop "G75" Cancel All Axis Preloads "G76" Traverse Range Limits Repositioning and NC block restart to the contour Reposition and restart in the automatic operating modes Repositioning and Restarting to Destination Position "G77" NC Program Restart with "ADJUST" and "REPOS" Programming Special NC-Specific Features in NC Program Restart Adaptive Depth "G68" / "G69" Application New Axis Parameter G Codes to Switch to a 2 nd Encoder System Motion Blocks Axes Linear main axes Rotary Main Axes Linear and Rotary Auxiliary Axes Interpolation conditions Following Error-Free Interpolation "G06" Interpolation with Lag Distance "G07" Optimal Speed Block Transition "G08" Velocity-Limited Block Transition "G09" Exact Stop "G61" Rapid NC Block Transition "G62" Programmable Acceleration "ACC" Interpolation functions Linear Interpolation, Rapid Traverse "G00" Linear Interpolation, Feed "G01" Circular Interpolation "G02" / "G03" Helical Interpolation Thread Cutting "G33" Thread Sequences with "G33"

5 NC Programming Instructions Contents III Tapping without Compensating Chuck "G63" / "G64" Tapping "G64" - Speed Reduction Tapping "G65" - Spindle as Lead Axis feed F Word Time Programming "G93" Velocity Programming "G94" Feed Rate per Spindle Revolution "G95" Dwell Time "G04" Basic Connections between Programmed Path Velocity (F) and Axis Velocities Feed Limitation Adaptive Feed Control "G25" / "G26" Spindle speed S Word for the Spindle Speed Specification Select Main Spindle "SPF" Constant Grinding Wheel Peripheral Speed (SUG) "G66" Constant Surface Speed "G96" Spindle Speed Limitation"G92" Additional Spindle Speed Limitations Spindle Speed in RPM "G97" Rotary Axis Programming Effective Radii "RX", "RY", "RZ" NC Program Changeover between Spindle and C Axis Start-up Logic for Endlessly Rotating Rotary Axes Transformations Transformation Functions Select Face Machining "G31" Selection of Lateral Cylinder Surface Machining "G32" Deselection of Transformation "G30" Select Main Spindle for Transformation "SPC" Main Spindle Synchronization Use of Main Spindle Synchronization Functions of Main Spindle Synchronization Permissible Configurations Sequence of a Synchronization Operation NC programming Machine Data for Main Spindle Synchronization Follower and Gantry axes Applications of Follower and Gantry Axes Permissible Configurations Steps of a Follower Operation Auxiliary Functions for Synchronized Operation NC Programming Machine Data for Synchronized Axis Groups Rounding of NC Blocks with Axis Filter "G11" / "RDI" Method of Operation

6 IV Contents NC Programming Instructions Programming Limits and Special Regulations Test Mode Purpose Suppress Auxiliary Function Output Lock Axis and Spindles Test Feed Rapid Run Online Simulation Suppress Tool Transfer and Movements Tool Compensation Setup Lists and Tool Lists Setup List Tool List Current Tool List Equipment Check Operation without Setup List Elements of the Tool Data Record Overview Basic Tool Data Tool Identification Location Data Units Technology Data User Tool Data Tool Group Data Other User Tool Data Tool Edge Data Tool Edge Identification Tool Life Data Geometry Data Geometry Limit Values Wear Factors User Tool Edge Data Grinding Wheel-Specific Tool Data{0><}100{> Tool Code WGD DE Representation Type WGD DE Tool Path Compensation Inactive Tool Path Compensation Active Tool Path Compensation Contour Transitions Establishment of Tool Path Compensation at Start of Contour Removal of Tool Path Compensation at End of Contour Change in Direction of Compensation Activating and Canceling Tool Path Compensation

7 NC Programming Instructions Contents V Canceling Tool Path Compensation "G40" Tool Path Compensation, Left "G41" Tool Path Compensation, Right "G42" Tool Path Correction G41, G42 Behind and Before the Turning Center Inserting an Arc Transition Element "G43" Inserting a Chamfer Transition Element "G44" Constant Feed on Tool Center Line "G98" Constant Feed at the Contour "G99" Tool Length Compensation No Tool Length Compensation "G47" Tool Length Correction, Positive "G48" Tool Length Correction, Negative "G49" Access to Tool Data from NC Program "TLD" D corrections Auxiliary Functions (S, M, Q) General Information on Auxiliary Functions "M" Auxiliary Functions Program Control Commands Spindle Control Commands Spindle Positioning Gear Changes S-Word as Auxiliary Function Q Function Events Definition of NC Events Influencing Events Set NC Event "SE" Reset NC Event "RE" Wait until NC Event is Set "WES" Wait until NC Event is Reset "WER" Conditional Branches for Events Branch if NC Event is Set "BES" Branch if NC Event is Reset "BER" Asynchronous Handling of NC Events Call Subroutine if Event is Set "BEV" Program Branching if NC Event is Set "JEV" Cancel NC Event Monitoring "CEV" Disable NC Event Monitoring "DEV" Enable NC Event Monitoring "EEV" Reading Events in Variable NC Functions to Control Tool Management Conditions Default Plane

8 VI Contents NC Programming Instructions Preparation of Tools and Tool Data Tool Storage Unit Motion Commands of the NC Tool Storage to Reference Position "MRF" Move Tool Storage Unit to Home Position "MHP" Programmed Move Tool into Position "MTP" Programmed Move Magazine Pocket into Position "MMP" MTP/MMP Commands and Tool Correction Freely Position Tool axis "MMA" Move to Free Position "MFP" Move Old Pocket in Position "MOP" Wait until Position is Approached "MRY" Enable Tool Magazine (Storage) for Manual Mode "MEN" Moving Tool Storage Unit with Nonuniform Pocket Distribution Tool Changing Commands of the NC Performing a Complete Tool Change "TCH" Change the Tool from the Magazine to the Spindle "TMS" Tool Change from Spindle to Magazine "TSM" Magazine Pocket Empty? "TPE" Tool Spindle Empty? "TSE" Process and Program Control Commands Process Control Commands Define Process "DP" Select NC Program for Process "SP" Start Reverse Program "RP" Start Advance Program "AP" Wait for Process "WP" Lock Process "LP" Process Complete "POK" Axis Transfer Between Processes "FAX", GAX" Program Control Commands Program End with Reset "RET" Branch with Stop "BST" Programmed Halt "HLT" Branch Absolute "BRA" Jump to Another NC Program "JMP" Subroutines Subroutine Technique Subroutine Structure Subroutine Nesting Jump to NC Subroutine "JSR" Subroutine Call "BSR" Return from NC Subroutine "RTS" Reverse Vectors Set Reverse Vector "REV" Conditional Branches

9 NC Programming Instructions Contents VII Branch if Spindle is Empty "BSE" Branch if T0 Was Set "BTE" Branch upon Reference "BRF" Branch if NC Event is Set "BES" Branch if NC Event is Reset "BER" Branches Depending on Arithmetic Results Branch If Equal to Zero "BEQ" Branch If Not Equal to Zero "BNE" Branch If Greater Than or Equal to Zero "BPL" Branch If Less Than Zero "BMI" Overview Table Variable Assignments and Arithmetic Functions Variables Variable Assignment Angle Unit for Trigonometric Functions "RAD", "DEG" Round Distance "RDI" Mathematical Expressions Operands Operators Parentheses Functions Enhanced NC Syntax (NC Control Structures) Overview Conditions of the Control Structures Block Instructions IF Instruction FOR Instruction WHILE Instruction REPEAT-UNTIL Instruction CONTINUE Instruction BREAK Instruction SWITCH Instruction Conditions of the Control Structures Indexed NC Variables Special NC Functions APR SERCOS Parameters Data Exchange with Digital Drives "AXD" Read/Write Zero Offset (ZO) Data from the NC Program "OTD" Access to Tool Data from NC Program "TLD" Examples: Read/Write D Corrections from the NC Program "DCD" Read/Write Machine Data Purpose of Machine Data

10 VIII Contents NC Programming Instructions Read/Write Machine Data Elements "MTD" Possible Allocations between TLD, MTD, AXD, OTD, DCD Handling AXD Commands Handling OTD Commands Handling TLD Commands Handling DCD Commands Handling MTD Commands Allocations Between TLD, MTD, AXD, OTD and DCD Commands NC Compiler Functions Basics Chamfers and Roundings Macro Technique Enhancing NC Functions by Macro Technique Modal Function Enhanced Look-Ahead Function Graphic NC editor NC Programming Practices Time-Optimized NC Programming Appendix Table of G Code Groups Table of M Function Groups Table of Functions I. G00 through G II. G20 to G III. G40 to G IV. G61 to G V. G90 through G VI. ACC through BTE VII. CEV through MMP VIII. MOP through RTS IX. SE through WP File Header Cycle Header Index Service & Support Helpdesk Service-Hotline Internet Vor der Kontaktaufnahme... - Before contacting us Kundenbetreuungsstellen - Sales & Service Facilities

11 NC Programming Instructions General Information General Information 1.1 Notes A CNC (COMPUTER NUMERICAL CONTROL) is a special computer used to control a machine tool, robot or transfer system. Like a personal computer, the CNC controller has its own operating system, which is specifically designed for numerical applications, as well as so-called controller software installed in this operating system. The controller software translates the CNC program into a language which the controller can understand. Details relating to a particular CNC machine tool, robot, or transfer system may be found in the machine builder's manual. The machine builder's information takes precedence over the information provided in this Programming Manual. The programming examples are based on DIN 66025/ISO Draft 6983/2 along with the additional features implemented by Bosch Rexroth. All geometric values are metric. Combinations in the NC syntax and other functions which are not described in this programming manual may also be executed on the controller. However, we do not warrant the proper functioning of these combinations and functions upon initial shipment and in the event of service. We reserve the right to make changes based on technical advancements. These programming instructions apply to the MTC 200 control system as of version 23VRS Note: This type of field describes a specific functional response that depends on the parameter settings. If the instructions given in these notes are not followed, the function cannot be started or there will be malfunctions during execution (error message). CAUTION This type of field provides information that is mandatory for a faultless execution of the described functions. If the instructions given in these notes are not followed, the execution of the function may lead to serious errors in CNC processing, damage the machine or, in the worst case, lead to personal injuries.

12 1-2 General Information NC Programming Instructions 1.2 Program and Data Organization Data structure of the CNC with user interface on an IBM PC and a mini operating device BTV0x. Data User Interface NC Program List NC List 1 2 Process 0 NC Variable List Process Parameter Set Hard Disc Cur. Tool List 1 2 for Process 0 Zero Point for Process 4 3 Tool List User Interface MDI Block Entry Data BTV0x NC-Event Liste für Prozeß 0 NC Event NC-Variablen 1 2 List for Process 0 Liste für Prozeß NC Variable List for Process CNC Memory Parameters System Parameters Axis Parameter Axis 1 Process Parameter Process 0 Process Parameter Process 0 NC Events Process 0 NC Variables Process 0 NC Cycle Programme Process 0 D Corrections Process NC-Program Memory A Zero Points for Process 0 Data for Process 0 Setup List NC-Program Nr. 1. Nr NC-Program Memory B Zero Points for Process 0 Data for Process 0 Setup List NC-Program Nr. 1. Nr Daten.FH7 Fig. 1-1: CNC data organization Approximately 400 kb available memory is present on the basic version of the CNC. As shown in the figure above, the CNC memory is divided into several areas. The individual areas are described briefly in the following sections. The CNC controller is adapted to the given machine or system by means of parameters. Up to 99 different parameter sets can be managed via the user interface. The parameters are divided into the following areas: System parameters Axis parameters The system parameters define how many processes and axes need to be managed by the CNC controller as well as what type of tool management system is present. The process-specific axes are specified in the axis parameters. The axis is assigned to specific processes in the axis parameters and the corresponding axis limit data for example, maximum axis speed, travel limits are defined here.

13 NC Programming Instructions General Information 1-3 Process parameter Tool List NC events NC variables NC cycle programs D corrections NC program package The process-specific data, for example the default plane, programmable and maximum displayable places to the right of the decimal point, maximum speed for contour mode, etc. are specified in the process parameters. A detailed description of the system, process and axis parameters may be found in the parameter description (DOK-CONTRL-PAR*DES*V23-AW0x-EN-P). The tool list for a process contains the actual tool data for all tools assigned to the process; it therefore represents an image of the magazine which is present at the station. Up to 99 different tool lists can be managed via the user interface. The NC commands for tool handling are described in the "Commands for Tool Management" chapter. A complete description of all data and functions relating to tools is provided in the document "Tool Management" (DOK-MTC200-TOOLMAN*V23-PR0x-EN-P) and in the "Tool Management" user description (DOK-MTC200-TOOLMAN*V23-AW0x-EN-P). NC events are binary variables which can be used by the NC program. A detailed description of NC events and event-dependent functions is provided in the "NC Events" chapter. An NC variable represents a changeable numerical value. A total of 1792 NC variables are available in the CNC (256 NC variables for each process). The section "Variable Assignment and Mathematical Functions" provides a detailed description of what can be accomplished with NC variables. A specific memory area is available in the CNC for NC cycle programs supplied by the machine builder and Bosch Rexroth. Additional information on NC cycle programs is provided in the manual on "NC Cycles." (DOK-MTC200-CYC*DES*V22-AW0x-EN-P). D corrections are additional active registers for the tool geometry data. D corrections act in an additive manner relative to the existing geometry registers L1, L2, L3 and R. D corrections can be used if tool management is present, e.g. as tool reference point offset registers. 99 D corrections are available for each of the 7 processes of the CNC. Each D correction contains the L1, L2, L3 and R registers. The assignment of values in the D correction register can be accomplished by using the CNC user interface or the BTV0x. An NC program package contains all necessary Tool Setup Lists (tool specifications data) and NC programs of all processes used in the machining work. Up to 99 different NC program packages can be managed via the user interface. Dividing the NC memory into two areas, A and B, permits two NC program packages to be managed simultaneously in the CNC. The decision which of the two NC program packages is to be executed is made by the operator via the user interface or via the PLC. While one NC program package is already running, a second NC program package can be loaded into the controller's memory. This will overwrite any NC program package that may already be present in the controller.

14 1-4 General Information NC Programming Instructions NC Program Package Data for Process 0 Setup List(Optional) NC Program NC Program 99 12Paket.FH7 Fig. 1-2: NC program package Setup list Offsets The tool setup list contains a tool data set for each T number used in the NC program. This tool data set defines which tool is to be used and which specifications this tool must meet. If the machine tool builder determines that a setup list is not required, the T number, together with its corresponding data set, is used in the tool list. The setup list should be entered before creating the program, however no later than during creation of the program. Additional information on the setup list is provided in the documentation "Tool Management" (DOK-MTC200-TOOLMAN*V23-PR0x-EN-P). The CNC provides up to 60 zero points (10x G54-G59) for each process. The zero points are assigned to the currently active 'A' or 'B' NC program memory in the CNC memory. Entries in the zero point table in the operator interface are always assigned to the currently active NC program memory. See also the section "Zero Offsets".

15 NC Programming Instructions NC Program NC Program 2.1 Organization of Setup Lists A tool setup list can be created for any process which uses a tool. This list allows any tool name or tool number to be assigned to the T numbers used in the NC program. The Setup list also contains the tool specification data. Setup lists can be organized to be station-specific or program-specific. Station-specific organization Program-specific organization Up to 7 tool setup lists (1 per process) are possible (organized in the NC program package). Up to 693 tool setup lists (7 processes x 99 tool setup lists) are possible. NC Program Package <xx> NC Program Package <xx> Process 6 Process 6 Process 0 Process 1 Process 2 Process 0 Process 2 Process 1 NC Program 1 Setup List 1 NC Program 1 Setup List NC Program 2 Setup List 2 NC Program 2 NC Program 3 Setup List 3 NC Program 3 NC Program 99 Setup List 99 NC Program 99 Program specific Organization Form of the Setup Lists Fig. 2-1: Station specific Organization Form of the Setup Lists Setup lists in program- and station-specific organization Pakete.FH7 When a program-specific organization of the Setup lists is used, the size of the program memory available to NC programs is decreased! Note: The station- or program-specific setup lists are defined in the system parameters. The machine builder must declare in the PLC program whether the CNC will work with or without setup lists. The setup list should be completed when the NC program is written, but no later than when the NC program is transferred into the system. This is the only way that names referencing T numbers in the NC program can be meaningful. The final assignment of the tools which are located in the tool magazine to the T numbers used in the program is made when the program is initiated (optional tool check).

16 2-2 NC Program NC Programming Instructions 2.2 Program Structure The NC program and its command set is based on DIN / ISO Draft 6983/2 and is supplemented by the specific Bosch Rexroth extensions. Each NC program package can contain up to 99 NC programs for each process. Thus, an NC program package can consist of 693 NC programs (7 processes x 99 NC programs). Each NC program can consist of up to 500 NC blocks. NC Program Memory B NC Program Memory A NC-Program 04 Advance Program NC-Cycle Memory Reverse Program Program No. 99 Programm No. 0 Subroutines of the Advance and Reverse Program User Cycles and Subroutines Bosch Rexroth and Machine Builder s Subroutines and Cycles 23Ncorg.FH7 Fig. 2-2: NC program organization An NC program can contain both the advance and the reverse program for an operation. Only one NC program can be loaded into the CNC memory. If subroutines for the reverse program are not found in the current NC program, a search using the number 99 is automatically performed in the NC program. If the subroutine for the cycle is not located in program number 99, a search is performed in program number 0. Program No. 99 Program No. 0 Program number 99 is suitable for frequently used program modules such as user cycles, the tool change subroutine or the reverse program. Program number 0 is reserved for the Bosch Rexroth machining cycles and for the machine builder's cycles. A detailed description of the Bosch Rexroth machining cycles is provided in the documentation "NC cycles". NC programs are assigned to a given process: The NC program assigned to process number 0 (management process) is called a parts program. The NC programs for processes 1 to 6 are called process programs. If a system consists of a number of processes, the parts program in process 0 handles the coordination of all the other processes.

17 NC Programming Instructions NC Program 2-3 Advance Program An advance program consists of a complete sequence of NC blocks needed to produce a workpiece. In addition to the path information needed for machining, the advance program also contains all additional auxiliary functions and branch/jump commands for subroutines and cycles. The advance program ends with the NC block in which RET (end of program with reset) is programmed. Example T4 BSR.M6 T8 MTP G00 G90 G54 X0 Y0 Z50 S5000 M03 G01 X46 Y144 Z2.. RET Tool change SF D50 Next machining tool Home position Pos. at safety distance Reverse Program A reverse program consists of a complete series of NC blocks which describe an operation sequence that is to be performed to establish the reference or home position of a station, regardless of how complicated the required traverse movement may be. As a rule, a reverse program is programmed in program number 0 or number 99 so that it can be used as a subroutine to establish the reference point or home position of a station or machine. The reverse program begins with the NC block in which the label.home is programmed. Other entry points for the reverse program can be defined in the advance program with the assistance of reverse vectors (see chapter 9 "Commands for controlling processes and programs"). If reverse programming is done in a systematic manner without any omissions, the operator can extract the station(s) or the machine from the most complicated machining situations and return to the initial position in the event of errors or malfunctions or in any given EMERGENCY STOP situation. This is done safely and without the risk of collision. Example.HOME Global homing MRF Move tool magazine to reference position D0 Cancel D corrections G40 G47 G53 G90 Cancel corrections G74 Z0 F1000 Move Z-axis to reference position G74 X0 Y0 F1000 Move X and Y axis to referencing position RET Note: It is not necessary to program a reverse program unless the machine builder has specified in the process parameters that a reverse program must be programmed.

18 2-4 NC Program NC Programming Instructions 2.3 Process-Specific Programming {0><}100{>The CNC is organized into a maximum of 7 processes. Each process has its own NC block preparation which combines the data from the NC program with data such as zero points, setup lists, etc. The number of processes is declared in the system parameters. If more than 2 processes are declared, process 0 is generally used to synchronize the other processes. Example Use of a number of processes on a double-slide single-spindle lathe with a milling head: Process 0 Synchronization of processes 1 and 2. Coordinates whether the processes work simultaneously and asynchronously or synchronously. Process 1 Process 1 contains the X and Z axes for the upper turret head. Process 2 Process 2 contains the X and Z axes for the lower turret head, main spindle S1, the C axis, and spindle S2 as the driven tool spindle. Process 1 Program No. 10 N0000 G90 G54 G18 N0001 G00 X20 Z0.. N00xx M030 X Z Process 0 Program No. 10 N0000.START N0001 DP1 DP2 N0002 SP1 10 N0003 SP2 10 N0004 AP1 AP2. N 0078 WP 1 WP 2 C S1 Process 1 Process 2 Process 2 Program No. 10 N0000 G90 G54 G18 N0001 G00 X20 Z0.. N00xx M030 X Z S2 24Dopp.FH7 Fig. 2-3: Double-slide single-spindle lathe for milling work

19 NC Programming Instructions NC Program Elements of an NC Block {0><}100{>An NC block contains data to perform an operating step. The NC block consists of one or more words as well as the NC control commands. The NC block length may not exceed 240 characters; it can be split in no more than four lines. An NC block is comprised of the following elements: Block number, Branch label, NC words (NC control command(s)), Message, Remark in the program, and Remark in the source program. Structure of an NC block: N0020 G54 G01 X50 Y60 F2000 S1500 M03 Program control command Correction call Traverse statement Geometry instruction Technology instruction Auxiliary function Block No. NC words (NC control commands) Fig. 2-4: Structure of an NC block Note: All the elements of an NC block except for function assignments must be separated by at least one space. The priority for the processing of an NC block in the NC memory is as follows (priority dropping from left to right): Block number Branch label G codes Variables Axis values N1234.ENDE X100 Y100 IPO parameter I0 J50 F value S value Aux. function Tool commands Events Process commands Program commands F1000 S800 M03 MTP T6 SE 5 DP 1 HLT Fig. 2-5: Priority for processing an NC block Block Numbers Syntax N = 0-9 Each NC block begins with the letter N followed by a signless, 4-digit decimal integer figure as a block number. The numbering of NC blocks in an NC program always starts with N0000. The numbering of NC blocks is automatically generated by the user interface in steps of 1. When NC blocks are inserted via the user interface, all subsequent NC blocks are automatically renumbered.

20 2-6 NC Program NC Programming Instructions Skipping Blocks In an NC-controlled machine tool, a simple way must be provided to skip NC blocks so that certain functions such as measuring operations, part loading and unloading and the corresponding program NC blocks can be allowed to proceed in a controlled manner or can be skipped. Blocks in a subprogram which are not to be processed each time the program is executed must be identified by a slash "/" at the beginning of the NC block. Note: These blocks are only not processed when the user activates the skip function by pressing the "Skip NC block" machine control key. Example G01 X20 F400 ; Additional measurement cross point / G00 X300 M03 S6500 / G01 Z45 F100 / G00 X370 M05 / HLT In cyclical mode, the CNC skips a series of NC blocks if the operator activates the skip function before the first NC block in this sequence is processed. If the user presses the "Skip NC block" machine control key while a sequence of NC blocks containing the skip marks is being processed, this will have no effect on processing in cyclical mode. The CNC continues to process regardless of this action. During single-block processing mode, the CNC checks whether the skip function is active at the beginning of each NC block. In contrast to cyclical mode, this gives the user the opportunity to control which individual NC blocks are skipped. CAUTION Slash marks used to skip NC blocks stop NC block preparation. Thus, contour mode is not possible if NC blocks are marked to be skipped.

21 NC Programming Instructions NC Program NC Word The NC word contains the DIN instructions and various specific Bosch Rexroth enhanced commands. The NC word is divided into: Function Enhanced commands Geometric instructions Axis positions X Y Technology instructions Spindle speed Feed S F Traverse instructions Auxiliary functions Override calls Enhanced functions Rapid traverse, circular interpolation G G Coolants, tools M T Tool overrides, zero points G G Conditional branch/jump, calculations A word is comprised of the address letter and the numerical value of which the specific machine motions and auxiliary functions are to be initiated. Address letter Numerical value The address letter is generally a text character. The numerical value can have signs and decimal points. The sign is located between the address letter and the numerical value. A positive sign does not need to be entered. Word Format Extended Address Format Address Letter S Address Letter X No. 1 Space Value 500 Value Wort.FH7 Fig. 2-6: Word syntax Example: ; Enhanced address structure for an X1 and Y1 axis G01 X Y F1000 Thread position 1 Z10 Z to safety distance M103 S st spindle 1000 RPM Note: There must be a blank between the address and the numeric value to be assigned. The decimal point is set to achieve the resolutions shown below: X0,00001 = 0.01 µm X0,0001 = 0.1 µm X0,001 = 1 µm etc.

22 2-8 NC Program NC Programming Instructions Leading or following zeros can be ignored in the decimal point format. Decimal point entry is possible in the following addresses: Address letters: I, J, K, P, S, F, contents Note: The maximum number of digits to the right of the decimal point, which can be programmed, is set in the process parameters. Branch Label Syntax. = 0-9, A-Z, a-z A branch label points to a single branch label in a destination NC block. A branch label is always present twice, once in the NC block in which the branch occurs and once in the destination NC block to which the branch is to be performed. A label always marks a program branch, regardless whether the branch is conditional or unconditional. The single branch address (destination label) may be in the same NC program. If the single branch address is not found, it will be searched for at first in program No. 99 and then in program No. 0. In terms of syntax, the label begins with a decimal point followed by at least one and no more than six visible characters. The syntax does not differentiate between lower-case and capital letters. When a label is programmed in an NC block, the label must be the first element in the NC block after the number. Note: Certain branch labels are reserved by their names for the Bosch Rexroth fixed cycles and for those of the machine builder. The "*" sign following the decimal point is reserved for Bosch Rexroth fixed cycles. A branch command using a label is considered to be a program control command and is performed last based on its priority. Machine movements in an NC block are performed before a branch label. Example G54 G90 G00 X0 Z0 G04 F5 BSR.END RET.END M05 G04 F1 RTS Note Syntax [ Text ] Each NC block can contain a message, which will be displayed in the diagnostic menu (station window) in the user interface at the end of NC block processing. The note in the diagnostics line remains active until it is overwritten by a new note. A so-called blank message must be programmed in order to clear the current message in the NC diagnostics line. The message is also cleared from the NC diagnostics line when a program is initiated. An NC block cannot contain more than one message. A message is written in square brackets. It may not exceed a length of 48 characters. All ASCII characters may be used. The message can be in-

23 NC Programming Instructions NC Program 2-9 Comment serted at any location in the NC block; however, with the exception of the comment, it is always the last function to be executed. Example: G01 G54, G90 [ Traverse X to safety distance ] F1000 X500 [ Traverse Z to safety distance ] G01 G51 G90 F1000 Z100 Syntax ( Text ) Each NC block can contain a comment. A comment is written in parentheses. It may not exceed a length of 80 characters. All ASCII characters may be used. The comment can be inserted at any desired location in the NC block. The comment is transferred to the controller memory and is shown in the current NC block display. An NC block cannot contain more than one comment and one message. Example G00 (Move X to start position) X150 (Move Z to start position) G01 Z10 Restriction Messages and hints must not be programmed between individual G functions. Comment in the Source Program Syntax ; Text Each NC block can contain one comment in the source program; this is introduced by a semicolon. All characters following the semicolon are interpreted as a comment. The term "comment in the source program" means that the comment is only present in the source program that is, in the user interface and not in the controller memory. Compared to messages and comments, this type offers the advantage of saving memory space in the controller. If a semicolon is used at the very beginning of an NC block, the entire NC block is marked as a comment and an NC block number is not assigned. Example G01 X250 Y100 F1000 ; Call centered drilling cycle BSR.*ZENBO 6 th drilling position Restriction Comments in the source program must not be programmed between individual NC words.

24 2-10 NC Program NC Programming Instructions 2.6 Available Addresses Address letters available in the CNC: A Reserved for axis name P Angle B Reserved for axis name Q Auxiliary M function C Reserved for axis name R Radius D Corrections S Spindle speed / position E Tool edge number T Tool number F Feed U Reserved for axis name G G Function V Reserved for axis name H Free W Reserved for axis name I Interpolation parameters X Reserved for axis name J Interpolation parameters Y Reserved for axis name K Interpolation parameters Z Reserved for axis name L Variables M Auxiliary M function RX Nominal radius around X N Block number RY Nominal radius around Y O Zero offset table RZ Nominal radius around Z An expanded address syntax is provided for the following addresses: A(1-3) Reserved for axis name B(1-3) Reserved for axis name C(1-3) Reserved for axis name U(1-3) Reserved for axis name V(1-3) Reserved for axis name W(1-3) Reserved for axis name X(1-3) Reserved for axis name Y(1-3) Reserved for axis name Z(1-3) Reserved for axis name S(1-3) Spindle speed / position Fig. 2-7: Address letters available in the CNC The NC syntax is not case sensitive; no distinction is made between upper and lower case. This means that "x400" can be used instead of "X400" when programming an axis position. However, for the sake of legibility, it is generally a good idea to write NC commands in upper case characters. The full ASCII character set may be used for hints and messages.

25 NC Programming Instructions Motion Commands, Dimension Inputs Motion Commands, Dimension Inputs 3.1 Coordinate system The coordinate system defines the location of a point or a series of points in a plane or in space in relation to two or three NC axes. As a rule, the right-hand, orthogonal Cartesian coordinate system having the axes X, Y and Z is used in NC technology. This system relates to the main axes of the machine. Z Y X Z B + - Y R C A - X 31Koord.FH7 Fig. 3-1: Coordinate system All other axes relate to these 3 main axes. A, B and C are rotary or pivoting axes having X, Y or Z as their center axes. The A axis rotates about the X axis, the B axis rotates about the Y axis, and the C axis rotates about the Z axis. The positive direction of rotation of rotary axes corresponds to clockwise rotation when viewed in the positive axis direction. The direction of rotation and the orientation of the axes with respect to each other result from the right-hand rule (see Fig. "Righthand rule"). With milling machines, the main axes are generally named X, Y and Z. With lathes, the names are defined as Z and X. Note: The axis names can be freely defined via the axis parameters. Y-Axis Z-Axis X-Axis positive direction of rotation C -Axis Z-Axis 32Hand.FH7 Fig. 3-2: Right-hand rule

26 3-2 Motion Commands, Dimension Inputs NC Programming Instructions 3.2 Motion commands The path command or movement instruction causes an axis to move. The path command consists of the address letter of the axis address (for example, X, Y or Z) followed by the sign (+, -) to indicate the direction of movement, and the distance to be traveled, the coordinate value. Syntax Syntax : Address Letter Coordinate Value Z Address Letter Equal Sign Variable X Address Letter Space Coordinate Value X Weg.FH7 Fig. 3-3: Syntax for motion commands Examples: Z105.5 or Z=105.5 or Z105.5 X The coordinate value is comprised of: the sign, 6 or 5 digits to the left of the decimal point, the decimal point 4 or 5 digits to the right of the decimal point. If no sign is programmed, the coordinate value is considered to be positive. If the coordinate value only has digits to the left of the decimal point, the decimal point does not need to be entered. Leading or following zeros can be ignored. If a decimal point is programmed, at least one digit to the right of the decimal point must be stated. The number of digits to the left and right of the decimal point may not exceed 10 digits. In the notation using four digits to the right of the decimal point, the maximum value range for coordinates is: to or with five digits to the right of the decimal point: to

27 NC Programming Instructions Motion Commands, Dimension Inputs Measurements Absolute Dimension Entry "G90" The path commands for the axes can be entered in two different ways: as an absolute dimension entry (G90) or as an incremental dimension entry (G91). In absolute dimension entry, all dimensions stated relate to a fixed zero point. When the CNC program boots, the initial setting is G90. G90 remains in effect until it is overwritten with G91. In the NC program, G90 only needs to be programmed to cancel G91. Syntax G90 Example: Y [P2] [P1] [P3] [P4] X 32Absol.FH7 Fig. 3-4: Absolute dimension entry NC program: G00 G90 G54 X0 Y0 Z10 S1000 M03 G01 X50 Y50 F500 BSR.DRILL Y80 BSR.DRILL X100 BSR.DRILL Y50 BSR.DRILL M05 RET.DRILL G01 Z-10 F300 G04 F2 G00 Z3 RTS Start position [P1] Branch to drilling subroutine [P2] Branch to drilling subroutine [P3] Branch to drilling subroutine [P4] Branch to drilling subroutine Spindle OFF Program end Drilling subroutine Drill to depth Z Dwell time 2 seconds Return to safety distance End subroutine

28 3-4 Motion Commands, Dimension Inputs NC Programming Instructions Incremental Dimensions "G91" Incremental positioning defines all subsequent dimensional entries as differences relative to the NC block starting position. Syntax G91 G91 remains in effect until the end of the program or until it is overwritten by G90. Note: The distance that has been programmed for an axis using G91 refers to the last absolute position. If the program coordinate system is altered by shifting, rotation, mirroring, tool correction changes or after axis changeovers (G30, G31, G32, C axis) and axis transfers, the axis must be positioned absolutely before G91 or G90 are utilized. Example: Y [P2] [P1] [P3] [P4] X 33Inkre.FH7 Fig. 3-5: Absolute dimension entry NC program: G00 G90 G54 X0 Y0 Z3 S1000 M03 Start position G01 G91 X50 Y50 F500 [P1] BSR.DRILL Branch to drilling subroutine Y30 [P2] BSR.DRILL Branch to drilling subroutine X50 [P3] BSR.DRILL Branch to drilling subroutine Y-30 [P4] BSR.DRILL Branch to drilling subroutine M05 Spindle OFF RET Program end.drill Drilling subroutine G01 Z-13 F300 Drill to depth Z G04 F2 Dwell time 2 seconds G00 Z13 Return to safety distance RTS End subroutine

29 NC Programming Instructions Motion Commands, Dimension Inputs Offsets Zero points and various reference points used to establish workpiece geometry are defined on all numerically controlled machines. Machine zero point The machine zero point is located in a fixed position at the origin of the machine coordinate system and cannot be moved. Icon for the machine zero point M 34Masch.FH7 Fig. 3-6: Icon for the machine zero point Machine reference point The machine reference point is a defined point located within the working range of the machine. It is used to establish a defined initial position after the machine is powered on. The machine builder in each axis in which incremental positioning is used establishes the machine reference point. Icon for the reference point R 34Refer.FH7 Fig. 3-7: Icon for the reference point Note: The reference dimensions are set in the drive parameters. Workpiece zero point The workpiece zero point is the origin of the workpiece coordinate system. As the program zero point, which the programmer establishes, it is used as the basis for all workpiece dimensions. The reference to the machine zero point is established by the zero offset value when the machine is set up. Icon for the workpiece zero point W 34Werk.FH7 Fig. 3-8: Icon for the workpiece zero point

30 3-6 Motion Commands, Dimension Inputs NC Programming Instructions Examples: Y Table R Workpiece W M X 34Null.FH7 Fig. 3-9: Zero points drilling/milling machines X R M W 35Nulld.FH7 Fig. 3-10: Zero points lathe (machining ahead of the center of rotation)

31 NC Programming Instructions Motion Commands, Dimension Inputs Zero offsets The zero offsets permit the origin of a coordinate axis to be offset by a given value relative to the machine zero point. The position of the machine zero point is permanently stored in the CNC memory and is not changed by the zero offset. Z Z' P Z Angle of Rotation P for the active Plane (G18) Y P X' ZO Zero Offset Y X X 36Nullv.FH7 Fig. 3-11: Zero offsets The following zero offsets are provided in the CNC: Programmable absolute zero offset G50, Programmable incremental zero offset G51, Programmable workpiece zero point G52, Adjustable zero offsets G54 - G59 Adjustable general offset in the zero offset table. Using zero offsets G50, G51 and G54 to G59 and workpiece zero point G52, the coordinate zero point of every NC axis can be applied to any desired coordinate position within or beyond the individual range of movement. It is thereby possible to process an identical NC program at different machine positions. The position of the machine zero point of each axis is specified in the drive parameters as the difference in relation to the reference point. The value entered in the drive parameters corresponds to the coordinate value of the reference point in the machine coordinate system.

32 3-8 Motion Commands, Dimension Inputs NC Programming Instructions Adjustable Zero Offset Memory B MemoryA Nullpunktbank 0 bis 9 9 Offset 2 8 Page 1 0 to G54 bis 1G59 0 G54... G59 Allgemeiner General Offset Offset 9 8 Programmable Workpiece Offset; Setting via NC Program Memory B Memory A G52 G52 Programmable WWorkpiece point Setting via NC-Programm Programmable Workpiece Offset NC- Prg NC- Prg Offset of Maschine Coordinate System Memory B Memory A G53 G53 Machine Coordinate System Machine Coordinate System Variant 1 Variant 2 Variant G50 G51 Absolute Zero Offset Incremental Zero Offset NC- Prg NC- Prg Programmable, absolute and incremental zero offset. Setting via NC program. Deselection via selection of a new zero offset or via G53 Sum 1: 1 + G50 + G51 Fig. 3-12: Complete Zero Offset Sum 2: 2 + G50 + G51 Sum of zero offsets Sum 3: 3 + G50 + G51 nullpunkt_mtc.fh7 The sum of zero offsets is made up of the adjustable zero offsets G54 - G59 or the programmable workpiece zero point G52 and the programmable zero offsets G50, G51 as well as the adjustable general offsets in the zero point table. Note: The programmable zero offsets G50 and G51 become inactive when G52, G53, G54 - G59 are programmed. G59 inactive.

33 NC Programming Instructions Motion Commands, Dimension Inputs 3-9 Adjustable Zero Offsets "G54 - G59" The adjustable zero offsets are entered in the zero offset table for those axes which are present using the user interface. The entered values function as an absolute offset relating to the machine zero point. It is included in the same NC block after the programming of G54 - G59 if the concerned axis is programmed. G54 - G59 are cancelled by G53 or G52. Syntax G54 - G59 Depending on the settings in the process parameters, one of the adjustable zero offsets G54 - G59 may be the power-on status and default when the NC program is started. G59 default state and basic position during the NC program start. Example: 80 Y Y [P5] [P4] [P3] [P2] Enter in the Zero Offset Table in the User Interface with G54: X52.1 Y48.8 [P1] X X 38G54ein.FH7 Fig. 3-13: Adjustable zero offset G54 NC program: G00 G90 G54 X0 Y0 Z10 S1000 M03 G01 X50 Y50 F1000 BSR.DRILL X70 Y60 BSR.DRILL X90 Y70 BSR.DRILL X110 Y80 BSR.DRILL M05 RET.DRILL G01 Z-10 F300 G04 F2 G00 Z3 RTS Starting position [P1] [P2] Branch to drilling subroutine [P3] Branch to drilling subroutine [P4] Branch to drilling subroutine [P5] Branch to drilling subroutine Spindle OFF Program end Drilling subroutine Drill to depth Z Dwell time 2 seconds Return to safety distance End subroutine

34 3-10 Motion Commands, Dimension Inputs NC Programming Instructions Coordinate Rotation with Angle of Rotation "P" Coordinate rotation adapts the coordinate system of the workpiece to the coordinate system of the machine. Rotation angle P is related to the individual zero offsets G54 - G59, G50, G51 and the adjustable general offset. Coordinate rotation is always active in the active plane (for example G17). For adjustable zero offsets G54 - G59 and for the general adjustable offsets, the rotation angle is entered via the user interface into the zero point tables by using the expression PHI. The angle of rotation is programmed using address Pxxx with programmable zero offsets G50 and G51. Syntax G50-G51 P<angle> The total of all active rotational angles is subject to the same conditions as with the zero offsets. As a rule, the angle of rotation is not active until the next active NC block. The angle of rotation is calculated in the control as a modulo value from 0 to 360. This means that a programmed angle of, for example 540, is calculated as 180. Coordinate rotation cannot be programmed with the programmable workpiece zero point G52. Example: 80 Y Y [P2] [P3] X Enter in the Zero Offset Table in the User Interface with G54 : X52.1 Y40 PHI 45 P X 39G54koor.FH7 Fig. 3-14: Adjustable zero offset G54 with coordinate rotation NC program: G00 G90 G54 X0 Y0 Z10 S1000 M03 G01 X40 Y70 F800 BSR.DRILL X80 BSR.DRILL M05 RET.DRILL G01 Z-10 F300 G04 F2 G00 Z3 RTS Starting position [P1] [P2] Branch to drilling subroutine [P3] Branch to drilling subroutine Spindle OFF Drilling subroutine Drill to depth Z Dwell time 2 seconds Return to safety distance End subroutine

35 NC Programming Instructions Motion Commands, Dimension Inputs 3-11 Zero Offset Tables "O" The CNC allows adjustable zero offsets G54 - G59 to be addressed up to ten times using different coordinate values. The zero offset table can be present up to ten times in the CNC. These are called zero offset tables. Note: The number of zero point databases is specified by the machine builder in the process parameters. The selection criterion in the NC program is the NC command O[0-9], which together with a single-digit number the zero offset table number addresses one of up to ten zero offset tables. Syntax O <zero offset table number> The initial setting is zero offset table number 0. If only zero offset table number 0 is to be used, or if this number is the first to be active in the NC program, the number 0 will not need to be programmed separately. If the zero offset table is changed in the NC program, G53 automatically becomes active. Selection of a zero offset table remains modally active until the end of the program. The zero offset table selection is reset by commands RET and BST. NC command O should be programmed in a separate NC block. It must be activated in at least one NC block prior to the selection of a new zero offset. Adjustable Zero offsets Entering and Changing Via User Interface ZO ZO Table O9 O9 ZO ZO Table O8 O8 ZO ZO Table O7 O7 ZO ZO Table O6 O6 ZO ZO Table O5 O5 ZO ZO Table O4 O4 ZO ZO Table O3 O3 ZO ZO Table O2 O2 ZO ZO Table O1 O1 ZO ZO Table O0 O0 G54 ZO Table O9 ZO Table O8 ZO Table O7 ZO Table O6 ZO Table O5 ZO Table O4 ZO Table O3 ZO Table O2 ZO Table O1 ZO Table O0 G59 Switch the Zero Offset Tables to Enter and Change the Zero Offsets Via the User Interface 310bank.FH7 Fig. 3-15: Zero point tables on the user interface

36 3-12 Motion Commands, Dimension Inputs NC Programming Instructions Example: Y Y Y [P1] ZO Pt. Table No. 0 Value G54: X17.5 Y46.5 [P3] [P4] [P2] [P5] Zero Pt. Table No. 1 Entry in the ZO Table with G54: X81.0 Y [P6] [P8] [P7] x x 311Null2.FH7 Fig. 3-16: Calling 2 zero point tables with "G54" NC program: [Zero offset table No. 0 is active] G00 G90 G54 X0 Y0 Z10 S1000 M03 G01 X30 Y30 F1000 BSR.DRILL Y70 BSR.DRILL X70 BSR.DRILL Y30 BSR.DRILL [activate zero offset table no. 1] O1 G00 G54 X0 Y0 G01 X40 Y40 F1000 BSR.DRILL X60 Y60 BSR.DRILL M05 RET.DRILL G01 Z-10 F300 G04 F2 G00 Z3 F1000 RTS Starting position [P1] [P2] Branch to drilling subroutine [P3] Branch to drilling subroutine [P4] Branch to drilling subroutine [P5] Branch to drilling subroutine Starting position [P6] [P7] Branch to drilling subroutine [P8] Branch to drilling subroutine Spindle OFF Program end Drilling subroutine Drill to depth Z Dwell time 2 seconds Return to safety distance End subroutine

37 NC Programming Instructions Motion Commands, Dimension Inputs 3-13 Programmable Absolute Zero Offset "G50", Programmable Incremental Zero Offset "G51" Programmable zero offsets G50 and G51 move the machining zero point with G50 absolute or G51 incremental to the most recently programmed workpiece zero point by the offset values which were defined together with the address letters. Syntax G50 <axis name(s)> <coordinate value(s)> Absolute offset of the machining zero point G51 <axis name(s)> <coordinate value(s)> Incremental offset of the machining zero point In addition, the machining coordinate system can be moved, using G50 (absolute) or G51 (incremental), to the most recently selected workpiece coordinate system in order to rotate the active plane using address letter P. Programmable zero offsets G50 and G51 are active according to NC blocks. The offset remains in effect until the next change of the zero offset or of the coordinate system. No further functions may be programmed in an NC block containing G50 or G51. Example: X X X Z0 X P2 P3 Z P1 P4 P5 G54: Z18.0 X15.0 P Z Z 312g50.FH7 Fig. 3-17: Programmable absolute zero offset "G50" NC program: G00 G90 G54 X0 Z0 BSR.CONT G50 X2 BSR.CONT RET.CONT G01 X10 Z48 F750 X25 Z59 Z92 F1500 X11 Z100 F600 Z113 F1000 G00 X40 Z0 X0 RTS [P0] Branch to the contour subroutine Zero offset X by 2 mm 2. call of the contour subroutine Contour subroutine [P1] [P2] [P3] [P4] [P5] Return to safety distance [P0] Return to main program

38 3-14 Motion Commands, Dimension Inputs NC Programming Instructions Programmable Zero Point of Workpiece "G52" A workpiece zero point can be programmed as the axis position for all axes which are present using programmed workpiece zero point G52. When G52 is performed, the coordinate values to which the G52 command applies are assigned to the current position. This corresponds to the definition of the workpiece zero point in relation to the current position. Syntax G52 <axis> Axes which are not programmed using G52 work in the machine coordinate system. Programming G52 produces a G53 when the change occurs. All zero offsets which are already active are canceled. No further functions may be programmed in an NC block containing G50. Coordinate rotation P cannot be programmed in combination with G52. Example: Y 80 Y Y Fig. 3-18: [P1] G52 X0 Y0 ZO-Table X20 Y30 Call G52 [P5] [P2] [P4] [P3] G52 X-70 Y0 Entry in the Zero Offset Table with would be G52: X90 Y30 x [P1] [P5][P8] [P4] x [P2] [P3] x 313g52.FH7 NC program: G90 G53 G00 X20 Y30 G52 X0 Y0 BSR.CONT G52 X-70 Y0 BSR.CONT RET.CONT G00 X0 Y0 G01 X40 Y20 F1000 X100 Y80 X40 Y20 G00 X0 Y0 RTS Call G52 Branch to the subroutine Call G52 Branch to the subroutine Subroutine [P1] [P2] [P3] [P4] [P5] [P2] Return to main program

39 NC Programming Instructions Motion Commands, Dimension Inputs 3-15 Cancel Zero Offsets "G53" All zero offsets are canceled by programming G53. This causes the workpiece coordinate system to be switched to the machine coordinate system. Syntax G53 Depending on the setting in the process parameters, G53 can be the power-on default and the initial setting when the NC program starts. If G53 is placed in an NC block containing G91, only the position display is switched to the machine s actual system. If the active zero offsets are canceled using G53 when tool path correction is active (G41, G42), a G40 (no tool path correction) is issued internally. The tool correction is rebuilt for the following movement blocks. Adjustable General Offset in the Zero Offset Table By having the general adjustable offset in the zero offset table, the CNC can also offset the workpiece zero point in addition to the adjustable and programmable zero offsets. The adjustable general offset functions in an additive manner to the adjustable and programmable zero offsets. This means that the adjustable general offset does not become active until one of the adjustable or programmable zero offsets has been activated. The adjustable general offset is canceled using G53 and is not calculated until a zero offset is selected again. An angle of rotation can be entered into the zero offset table using the address PHI. This angle is added to the already active angles of rotation. The adjustable general offset can never be active alone due to the conditions described above. Read/Write Zero Offset Data from the NC Program via "OTD" The OTD command (Offset Table Data) can be used to read and write the data in the zero offset table and the zero offsets which have been activated in the NC program from the NC program. Syntax M P O V A OTD([1/2],[0..6],[0..9],[0..9],[1..10]) Axis Offset ZO Table Process NC Memory 35otd.FH7 Fig. 3-19: OTD command syntax Please refer to the section "Reading and writing ZO data from the OTD program" for a detailed description of the OTD command.

40 3-16 Motion Commands, Dimension Inputs NC Programming Instructions 3.6 Level selection Plane selection is an important requirement to correctly perform all movement commands in an NC program. It informs the control of the plane on which machining is performed in order to permit, for example, a correct calculation of the tool correction values. Circular interpolation is also possible only in the selected plane. NC commands G17, G18 and G19 suffice to select a plane that is defined by 2 linear main axes. NC commands G20, G21 and G22 are required to also select a plane that is partially or totally defined by rotary main axes and/or by auxiliary axes. Axis Number, Axis Designation and Axis Meaning Setting axis parameters Each axis has an axis number (1-32), an axis designation and an axis meaning (X, Y, Z, A, B, C, U, V, W, S). During parameterization, an axis number, max. 2 permitted axis designations and max. 4 permitted axis meanings are specified for each axis. Example: Axis parameter for axis number 7 C Axis designation 1 X1 C Axis designation 2 Y3 C Axis meaning (axis functions) X,Z,W Default state Level selection Notation After switching on the machine or terminating the NC program, the first permitted axis designation (X1 in the example) and the first permitted axis meaning (X in the example) apply for each axis. The axis designation and axis meaning of an axis can be changed using NC commands. The following mode of writing is used: Axis designation (axis meaning) Example: B(X) means: The axis with axis designation B has axis meaning X.

41 NC Programming Instructions Motion Commands, Dimension Inputs 3-17 Plane Selection "G17", "G18", "G19" Syntax Description G17 G18 G19 The first permitted axis meaning corresponding to the axis parameters is selected for each axis of the process in the first step. Then the plane defined by the axes with the following axis meanings is selected: 1. Axis 2. Axis Vertical of the plane: of the plane: axis: G17: X Y Z G18: Z X Y G19: Y Z X Notes: The following definitions apply in this document: 1. lin. main axis (abscissa) = axis with axis meaning X 2. lin. main axis (ordinate) = axis with axis meaning Y 3. lin. main axis (applicate) = axis with axis meaning Z G17, G18 or G19 can be called even if there is no axis with X, Y and/or Z as the first axis meaning. Ordinate 2nd Axis [Y] Plane YZ G17 G19 Plane ZX Plane XY G18 Abscissa 1st Axis [X] Applicate 3rd Axis [Z] 314Ebene.EPS Fig. 3-20: Processing planes

42 3-18 Motion Commands, Dimension Inputs NC Programming Instructions Free Plane Selection "G20", "G21", "G22" Syntax G20 axis 1 0 axis 2 0 axis 3 0 G20 axis 1 0 axis 2 0 G21 axis 1 0 axis 2 0 axis 3 0 G21 axis 1 0 axis 2 0 G22 axis 1 0 axis 2 0 axis 3 0 G22 axis 1 0 axis 2 0 axis 1 0 and axis 2 0 are mandatory parameters, axis 3 0 is optional. Axis 1, axis 2 and axis 3 are axis designations. If an axis designation consists of only one letter, a "0" must be added. If it consists of one letter with a subsequent numeral, "=0" must be added. Examples: G20 Z0 C0 X0, G20 X0 Y0 Z0, G20 Y0 Z0, G21 U0 V0, G22 A0 C0, G20 X2=0 U0 W3=0, G21 B1=0 U3=0 V3=0, G22 Z3=0 X0 With vertical axis G20 axis 1 0 axis 2 0 axis 3 0 G21 axis 1 0 axis 2 0 axis 3 0 G22 axis 1 0 axis 2 0 axis 3 0 for the axes with the axis designations axis 1, axis 2, axis 3, the following axis meanings are selected: axis 1 axis 2 axis 3 G20: X Y Z G21: Z X Y G22: Y Z X then the following plane is selected: 1. Axis 2. Axis Vertical of the plane: of the plane: axis: G20: axis 1 (X)axis 2 (Y)axis 3 (Z) G21: axis 1 (Z)axis 2 (X)axis 3 (Z) G22: axis 1 (Y)axis 2 (Z)axis 3 (X) Without vertical axis G20 axis 1 0 axis 2 0 G21 axis 1 0 axis 2 0 G22 axis 1 0 axis 2 0 for the axes with the axis designations axis 1, axis 2, axis 3, the following axis meanings are selected: axis 1 axis 2 G20: X Y G21: Z X G22: Y Z then the following plane is selected: 1. Axis 2. Axis of the plane: of the plane: G20: axis 1 (X)axis 2 (Y) G21: axis 1 (Z)axis 2 (X) G22: axis 1 (Y)axis 2 (Z)

43 NC Programming Instructions Motion Commands, Dimension Inputs 3-19 Examples: The following axes are specified (switched-on status): X2(X), Y(Y), Z(Z), A3(A), B(B), C(C), U(U), V(V), W(W) Selected Vertical plane axis G18 Z(Z) X2(X) Y(Y) G19 Y(Y) Z(Z) X2(X) G20 B0 A3=0 X2=0 B(X) A3(Y) X2(Z) G20 C0 X2=0 C(X) X2(Y) --- G21 Z0 X2=0 Y0 Z(Z) X2(X) Y(Y) G21 U0 C0 Z0 U(Z) C(X) Z(Y) G22 W0 V0 W(Y) V(Z) --- G22 X2=0 Z0 Y0 X2(Y) Z(Z) Y(X) Permitted axis meanings For G20, G21 and G22, only permitted axis meanings may be selected for each participating axis designation. If an axis meaning that is assigned to one axis designation is to be selected for another axis designation, the axis meaning is selected by exchanging the axis meanings. The selection of the axis meanings for G20 axis 1 0 axis 2 0 {axis 3 0} G21 axis 1 0 axis 2 0 {axis 3 0} G22 axis 1 0 axis 2 0 {axis 3 0} is carried out in the order that is prescribed by axis 1 0, axis 2 0 {, axis 3 0}. For each axis, the starting point is the first permitted axis meaning corresponding to the axis parameters. Example: The following axes are parameterized: Axis number Axis designation X1 C Z X2 Axis meaning (axis functionality) X,W C,Y Z,X W,Z G20 Z0 C0 X2=0 leads to Z(X), C(Y), X2(Z) and thus to the following axis meanings: Axis designation : X1 C Z X2 First permissible axis meaning: X C Z W Axis meaning acc. to first selection: Z C X W Axis meaning acc. to second selection: Z Y X W Axis meaning acc. to third selection: W Y X Z NC command G20 Z0 C0 X2=0 is thus permitted with the given axis parameters.

44 3-20 Motion Commands, Dimension Inputs NC Programming Instructions Boundary conditions An axis designation may occur only once within a G20/G21/G22 command, i.e. axis 1 axis 2 axis 3, axis 1 axis 3. Tool magazine axes and spindles are excluded. The working plane may also be spanned by a maximum of two rotary axes. If a third axis (vertical to the plane) is specified, it must be a linear axis. If an NC set contains a G20/G21/G22 command, the only additional axis designations that may be programmed are the ones used for free plane selection. The G17/G18/G19/G20/G21/G22 commands form a group (G code group 2). A change in the plane selection overwrites the previous plane selection and has a modal effect. During switching-on, in the basic status, at the end of the program (BST, RET, JMP, M02 and M30), during a control reset and during a transition to manual mode (if process parameter "Manual axis jogging causes reset" has been set), the NC selects the basis system of coordinates stored in the parameters. This means that it selects the first axis meaning for every axis in the axis parameters under Cxx.053. It also selects the working plane that is saved there (process parameter Bxx.004, default plane selection). Effects Coordinate values Effective radii (RX, RY, RZ) ACC G00, G01 G02, G03 G16 G31 G32 G33 Programmed coordinate values always refer to axis designations. Effective radii are always based on axis meanings, namely the effective radius RX on the axes with the axis meanings X and A, RY on Y and B and RZ on Z and C. For the acceleration factor, programmed coordinate values refer to axis designations. G20, G21, G22 activate G01. Circular interpolation is possible only in the selected plane. The programmed end point refers to axis designations. Interpolation parameter I affects the axis with the axis meaning X. Interpolation parameter J affects the axis with the axis meaning Y. Interpolation parameter K affects the axis with the axis meaning Z. Diameter programming G16 affects the axis with the axis meaning X. Facing machining G31 must not be active at the same time as G20, G21, G22. The coordinate transformation associated with G31 refers to the XY plane (G17). For lateral cylinder surface machining with G32, the effective radius RI refers to axis meaning X. Generally, a plane selection must be carried out with G20 before lateral cylinder surface machining is activated. The programmed end point refers to axis designations. Thread pitch I affects the axis with the axis meaning X. Thread pitch J affects the axis with the axis meaning Y. Thread pitch K affects the axis with the axis meaning Z.

45 NC Programming Instructions Motion Commands, Dimension Inputs 3-21 G41, G42 G48, G49 G50, G51, G52, zero offsets (ZOs) G65 G74, G75, G77 G95 G96 Tool path compensation (radius compensation) affects the selected layer. Tool length compensations L1, L2, L3 affect the following axes: L1: 1. axis of the selected plane L2: 2. axis of the selected plane L3: Vertical axis and thus the axes with the following axis meanings: L1 L2 L3 G17/G20: X Y Z G18/G21: Z X Y G19/G22: Y Z X The length correction includes the sum of length, wear, offset and D-correction. The radius correction (tool path correction) affects the selected plane (machining plane). The coordinate values that are programmed with G50, G51 and G52 refer to axis designations. However, these are entered in the ZO table under the associated active axis meanings. This must be taken into account especially if the axis meaning of an axis has been changed using G20, G21 or G22. If an angle P is programmed with G50 or G51, this angle refers to the selected plane. In the case of thread tapping with G65, only axis designations with axis meanings X, Y, Z but no rotary axes may be programmed. The programmed coordinate values refer to axis designations. In the case of feeding per revolution (G95), the path velocity that is programmed with the F word refers to axis meanings. In addition to referring to the active spindle, constant cutting speed G96 refers to the axis meaning of X as the feed axis. If the selected plane is modified, G96 is deselected and the spindle speed in rpm function (G97) becomes active. Note: Please refer to the description "Free plane selection and lateral cylinder surface machining" for further information about free plane selection. Example: A combined drilling and radial facing slide has the following axes within a process (process 0): Axis designation Permitted axis meanings Comment X X,U Workpiece shift Y Y Workpiece shift Z1 Z,W Drill feed Z2 W,Z Radial facing slide feed U U,X Radial displacement of radial facing slide S1 S1 Main spindle (drill) S2 S2 Tool spindle for boring with radial facing slide

46 3-22 Motion Commands, Dimension Inputs NC Programming Instructions First, a preliminary hole is drilled with G17 on a workpiece that can be displaced in the XY plane (feed axis Z1, main spindle S1). This is then bored in the same process using a radial facing slide with a constant cutting speed. The radial facing slide rotates around the axis with the designation Z2 (feed axis) and is displaced in the radial direction along the axis with the designation U. As a result, the drill hole can principally be drilled to any cylinder-symmetric form referring to Z2. This machining is similar to that of the lathe, requiring as the machining plane the Z2-U plane that is selected with G21 Z2=0 U0 Y0. G96 is used to set the desired constant cutting speed. G code Linear main axes Mean. X Mean. Y Mean. Z Secondary axes Mean. U Mean. V Mean. W Rotary main axes Mean. A Mean. B Mean. C Mach-ining plane Vert. Axis Remarks G17 X Y Z1 U - Z X Y Z G21 Z2=0 U0 Y0 U Y Z2 X - Z Z2 U Y Prelim. drilling (power-up state) Boring w/ radial facing slide S1 Z1 S2 Z2 U Drill Radial Facing Slide Y Workpiece after processing X 317Planschieber.FH7 Fig. 3-21: Boring with a radial facing slide This machining task is not to be executed with either G20 nor G22: If G20 Z2=0 U0 Y0 is used, a subsequent G96 refers to the axis with the designation Z as the feed axis and does not refer to U. With G20 U0 Z0 Y0, tool correction L1 for the radial facing slide tool refers to the axis with the designation U and L2 refers to Z, which is the opposite of what it should be. With G22, the desired utilization of G96 is impossible from the start because the vertical axis contains axis meaning X.

47 NC Programming Instructions Motion Commands, Dimension Inputs 3-23 Example: A turning center possesses the following axes within a process (axes within the turning center (process 0)): Axis designation Axis meaning Comment X1 X Turning slide Y Y For milling Z Z For turning and milling X2 W Milling slide C C For machining on the lateral surface B B Swivel axis for the milling slide U U Tailstock S1 S1 Main spindle S2 S2 Tool spindle for milling X1 X2 B S2 Z Y U C/S1 316Lage.FH7 Fig. 3-22: Position of the axes within the turning center Selection and axis allocation: To perform the individual machining tasks, the planes which are defined by the following axis designations are selected during machine operation: G code Linear main axes Mean. X Mean. Y Secondary axes Mean. Z Mean. U Mean. V Mean. W Rotary main axes Mean. A Mean. B Mean. C Machining plane Vert. Axis Remarks G18 X1 Y Z U - X2 - B C Z X1 Y G20 X2=0 Y0 Z0 X2 Y Z U - X1 - B C X2 Y Z G20 Z0 X2=0 Y0 Z X2 Y U - X1 - B C Z X2 Y G20 Y0 Z0 X2=0 Y Z X2 U - X1 - B C Y Z X2 Turning (= power-on state) Milling (= G17 with X2) Milling (= G18 with X2) Milling (= G19 with X2) G20 Z0 C0 X2=0 G32 RI=80 Z C X2 U - X1 - B Y C Z X2 Lateral cylinder surface machining The following axis meanings must be permitted for the various commands for free plane selection for each axis designation: Free plane selection X1 Y Z X2 C B U G20 X2=0 Y0 Z0 X,W Y Z W,X C B U G20 Z0 X2=0 Y0 X,W Y,Z Z,X W,Y C B U G20 Y0 Z0 X2=0 X,W Y,X Z,Y W,Z C B U G20 Z0 C0 X2=0 X,W Y,C Z,X W,Z C,Y B U

48 3-24 Motion Commands, Dimension Inputs NC Programming Instructions Fig. 3-23: Required permitted axis meanings for various NC commands for free plane selection The permitted axis meanings must be selected for each axis and each process in such a way that the requirements of all the NC commands for free plane selection that occur in the process are fulfilled. 3.7 Radius/Diameter Programming "G15" / "G16" Workpieces that are processed on lathes usually have a circular crosssection. For programming, the CNC offers two possibilities for entering the dimensions of the workpiece: as a diameter dimension and/or as a radius dimension. Syntax G15 G16 Radius programming Diameter programming Note: The power-on default for radius and diameter programming is set by the machine builder in the process parameters. Diameter programming refers exclusively to the X axis. Example [P4] Using diameter programming: [P3] X [P2] [P1] Z 317Durch.fh Durch.FH7 Fig. 3-24: Sample program diameter programming NC program: ; Lathe, G16 is home position through process parameters G01 G90 X40 Z-8 F1000 [P1] Z-30 [P2] X50 Z-63 F500 [P3] Z-100 F1000 [P4] RET The following conditions apply for diameter programming: When declaring an absolute dimension, the programmed X value is interpreted as the diameter negative X values (diameter) are permissible. For circles, circle center points as well as end points are to be declared as the diameter. When declaring an incremental dimension (G91), the diameter difference to the previous position is specified. Based on the old diameter, the tool moves to the new position according to the specified path

49 NC Programming Instructions Motion Commands, Dimension Inputs Measurement units difference. Regarding the start point of circles, the circle center points as well as the end points are to be specified as a diameter difference. The thread lead is interpreted as a radius dimension when machining face threads on a lathe. Functions such as constant surface speed and feed per revolution in the X direction are not affected by diameter programming. If position data are read into an NC variable for the diameter axis, this is the diameter value. The zero offsets for the X axis are programmed in radius. The tool corrections in the X axis are interpreted as radius values. The diameter symbol is used in the position display to indicate the axis in which diameter programming is active. The basic unit to be used in programming is specified by the machine builder in the process parameters. To produce workpieces which are dimensioned in a different dimensioning unit on this machine, the dimensional units can be changed for coordinate values, speed values, and programmable offsets by using G functions. Note: The machine manufacturer defines the base programming unit in process parameter Bxx.001 "Default measurement unit". Measurement Unit Inch "G70" Syntax G70 If millimeters are set in the process parameters as the basic programming unit, the subsequent values are interpreted as inch data and are converted to millimeters internally after G70 has been programmed. Motion commands (coordinate values); for example, X5.5 inches is converted to X139.7 mm; interpolation parameters I, J and K and radius R; feed data F and G95 F for example, F20 inch/min is internally converted to F508 mm/min; programmable offsets G50, G51 and G52; movement commands assigned by means of NC variables (X=@050), interpolation parameters (I=@051), feed rate information (F=@052) and programmed offsets (G50 X=@053). G70 remains in effect until the end of the program or until it is overwritten by G71.

50 3-26 Motion Commands, Dimension Inputs NC Programming Instructions Unit Millimeters "G71" Syntax G71 If inches is set in the process parameters as the basic programming unit, the subsequent values are interpreted as millimeter data and are converted to inches internally after G71 has been programmed. Motion commands (coordinate values); for example, X127mm is converted to X5 inches. interpolation parameters I, J and K and radius R; feed data F and G95 F for example, F1500 mm/min is internally converted to F59.05 inches/min; programmable offsets G50, G51 and G52; movement commands assigned by means of NC variables (X=@050), interpolation parameters (I=@051), feed rate information (F=@052) and programmed offsets (G50 X=@053). G71 remains in effect until the end of the program or until it is overwritten by G70. Example: Ø X 76,2 50,8 45 [P4] [P3] +K ¼ Circle 1 inch +I [P2] [P1] [P0] 318G71.fh ,8 76, Z 318g71.FH7 Fig. 3-25: Millimeters as the basic programming unit, with change to inches G70 NC program: G00 G90 G54 X45 Z100 G01 X50,8 Z90 F800 G70 Z3 F35 G02 X3 Z2 I3 K3 G71 G01 Z5. RET [P0] [P1] Change to inches [P2] [P3] Change to mm [P4]

51 NC Programming Instructions Motion Commands, Dimension Inputs Mirror Imaging of Coordinate Axes "G72" / "G73" The programmable mirror function permits the mirror imaging of any desired coordinate axes within a machining program. When a coordinate axis is mirror imaged, the original contour is machined symmetrically opposite in the same size and at the same distance on the other side of the mirror-imaging axis. The activation and deactivation of mirror imaging is programmed using the G functions in the subroutine. The mirror function can be activated via G73. It remains modally active until it is canceled by G72 or until it is automatically reset at the end of the program (RET, M002/M030) or by BST. G72 sets all mirror imaging axes back to the default position. Syntax G73 <axis name>-1 G72 Mirror function ON Cancel mirror function for all axes Mirroring one axis Mirroring two axes Rule: The signs of the coordinates of the mirror-imaged axis are interchanged. In the case of circular interpolation, the direction of rotation is switched. (G02 G03, G03 G02) The machining direction of the path correction is reversed. (G41 G42, G42 G41) Rule: The signs of the two coordinates of the mirror-imaged axis are interchanged (X-Y, Z-X, Y-Z). In the case of circular interpolation, the direction of rotation remains the same. The machining direction of the path correction remains the same. Zero offsets G54 - G59, G52 and the adjustable offset are not mirror imaged. The programmable zero offsets G50 and G51 are also mirrored in programming when the mirror image function is selected. The G functions for mirror imaging are assigned to G function group 18. Selecting mirror imaging does not result in any axis movement. Tool path correction and NC block preparation are terminated when mirror imaging is selected. Tool lengths are not mirror imaged. When main axes are mirror imaged, the workpiece is always mirror imaged. The position display shows the corresponding workpiece coordinates.

52 3-28 Motion Commands, Dimension Inputs NC Programming Instructions Example: Mirror imaging Y Spieg.fh X 319Spieg.FH7 Fig. 3-26: Correlation when mirror imaging one or more coordinate axes NC program: G00 G54 G90 X0 Y0 BSR.TRIA G50 X50 G73 X-1 BSR.TRIA G72 G50 X-20 Y40 G73 X-1 Y-1 BSR.TRIA G72 G50 X-50 Y20 G73 Y-1 BSR.TRIA G72 RET.TRIA G90 G01 X30 Y30 F1000 X130 X30 Y90 Y30 G00 G54 X0 Y0 RTS (1) No axis mirror-imaged (4) X axis is mirror-imaged (3) X and Y axes are mirror-imaged (2) Y axis is mirror-imaged Subroutine for the triangle Triangle starting point Endpoint = starting point

53 NC Programming Instructions Motion Commands, Dimension Inputs Scaling "G78" / "G79" The scaling function provides programmable scaling factors to change the scale used for the distance to be traveled on all machine axes. The activation and deactivation of the scaling function is programmed using the G functions in the subroutine. Scaling can be activated via G79. It remains modally active until it is canceled by G78 or until it is automatically reset at the end of the program (RET, M002/M030) or by BST. G78 resets all scaled axes back to the default state. Syntax G79 <axis name><scaling factor> G78 The following values are recalculated for scaling: Axis coordinates Interpolation parameters Radius Programmable zero offsets G50 and G51 Thread pitch Effective clearances Scaling ON Scaling for all axes OFF Zero offsets G54 - G59, G52 and the adjustable offset are not mirror scaled. The programmable zero offsets G50 and G51 are also scaled during programming after the scaling G function has been selected. The G functions for scaling are assigned to G function group 19. The scaling factors must always be positive values. For circle radius programming with R using G02/G03 or with the nominal radii RX, RY and RZ, the scaling factors used in the active machining plane must always be quantitatively identical. Selecting scaling does not result in any axis movement. Tool path correction and NC block preparation are terminated when scaling is selected. Tool lengths are not scaled. With circular interpolation, an error message will be issued if the scaling factors have different absolute values. The same applies to rotary axis programming using nominal radii. The numerical value which results after recalculation using the scaling factor appears in the position display. The actual value and the remaining distance correspond to the real axis positions. Scaling factor > 1 Original part is enlarged. Scaling factor < 1 Original part is downsized. In the internal calculation definition, mirror imaging is performed first followed by scaling.

54 3-30 Motion Commands, Dimension Inputs NC Programming Instructions Example: Scaling Y First Traverse Move after Selecting Scaling X 320Skali.fh X 320Skali.FH7 Fig. 3-27: Sample program scaling NC program: G00 G54 G90 X0 Y0 BSR.TRIA G50 X40 Y-70 G79 X0.5 Y0.5 BSR.TRIA G78 G00 G54 G90 X0 Y0 RET.TRIA G90 G01 X25 Y30 F1000 X100 X25 Y70 Y30 RTS (1) Triangle without scaling Move zero point Set the scaling factors (2) Triangle with scaling Cancel scaling Subroutine for the triangle Start position Final position = starting position

55 NC Programming Instructions Motion Commands, Dimension Inputs Go to Axes Reference Point "G74" Movement condition G74 "Go to the axes reference point" allows movements to the reference point with one or more axes in an NC program or via an MDI block entry. Syntax G74 <[axis name][coordinate value=0]> <feed> Example: G74 X0 Z0 F10000 G74 is active only for the NC block in which it is located. In the reference point cycle, each programmed axis is moved at the homing speed that has been entered in the axis parameters. Notes for programming G74 G74 deactivates the tool path and tool length correction using G40, sets the machine zero point (G53), and switches to feed programming (G94) and to absolute dimension entry (G90). The coordinate values of the programmed axes in a G74 NC block must be defined as zero. If a number of axes are programmed in a G74 block, the axis movement of the axes is not performed with interpolation. A feed rate programmed in a G74 NC block will also remain active for other types of interpolation. Note: The reference dimensions and the reference point cycle traversing speed are set by the machine builder in the drive parameters Feed to positive stop The function Feed to positive stop allows one or more axes to feed to a mechanical stop without causing a drive error. Possible applications are to preload an axis slide at the stop position during machining or to use the axis position at the stop as a reference position for further machining. Festanschlag.FH7 Fig. 3-28: Feed to positive stop

56 3-32 Motion Commands, Dimension Inputs NC Programming Instructions Feed to Positive Stop "G75" Path condition G75 "Feed to positive stop" causes the axes which are programmed together with the function in the NC block to travel in the direction of the programmed coordinate value. Syntax G75 <[axis name][coordinate value]> <feed> Example: G75 X100 Z50 F500 G75 is active only for the NC block in which it is located. The axes travel in the direction of the programmed coordinate value using the feed, which is programmed in the G75 block. If a mechanical resistance for example, a mechanical stop is detected during the travel distance, the torque which is defined by axis parameter Cxx.044 (Reduced torque at positive stop) is limited to a percentage of the peak current. The command value is not increased further; the remaining distance and the torque preload are maintained. Notes on "Feed to positive stop": If a feed value is not programmed in the G75 block, traveling will be performed at the speed entered in axis parameter "Max. feed to positive stop". If the programmed final axis position value of an axis is reached, the following error message is generated: "Positive Stop lies beyond the defined range" If the stop yields and wanders during operation, or if the axis slide is forced out of position by a strong opposing force, the axis position is updated. If this results in the NC block start position not being reached or the NC block final position being exceeded, then the error message: "Positive Stop lies beyond the defined range" is issued. The dimensional information in a G75 NC block can be entered in absolute mode (G90) or incremental mode (G91). If a number of axes are programmed in a G75 block, the axis movement of the axes is not performed with interpolation. The stop axis may not be moved between the calls of G75 and G76. Parameters "Reduced torque at positive stop" and "Max. feed to positive stop" are set by the machine builder in the axis parameters.

57 NC Programming Instructions Motion Commands, Dimension Inputs 3-33 Example: Fest.fh7 321Fest.FH7 Fig. 3-29: Feed to positive stop NC program: G00 Z100 M3 S1250 Z axis to starting position G75 Z170 F200 Feed to positive stop.. Programming of movements on the. stop axis is impossible! G76 G01 Z100 F1000 G00 Z0 M5 RET Cancel axis preload Z axis to starting position Z axis to reference point Programmable Torque In "Feed to positive stop G75", the torque at which the positive stop is detected and the holding torque can be adjusted individually. The parameter settings are performed with the AXD commands. Besides axis parameter "Cxx.044 Reduced torque at positive stop", the torque when feeding to the positive stop can be programmed process-dependently via the AXD parameters in the NC or PLC program (P ) Reduced torque of the digital drive (in percent) during movement to the positive stop The positive stop is detected at this torque (P ) Reduced torque of the digital drive (in percent) at the positive stop This value takes effect only if it is less than the value that was entered in the "Reduced torque at positive stop" axis parameter and less than 100%. The positive stop is held at this torque. NC program ; Save preselected AXD(X:P )=200 ; Values required for processing AXD(X:P )=120 ; Write (multiplication factor = 40) G75 X200 F500 ; Drive to positive stop... G76 ; Cancel torque preload AXD(X:P )=@41 ; Saved preselected AXD(X:P )=@42 ; rewrite values The torque at which the positive stop is detected is programmed with AXD parameter "65017 (P )". After the positive stop is detected, the axis is held to the positive stop with the programmed torque in AXD parameter "65018 (P )" until the torque preload is cancelled with G76.

58 3-34 Motion Commands, Dimension Inputs NC Programming Instructions Cancel All Axis Preloads "G76" Path condition G76 "Cancel all axis preloads" causes the preloads on all preloaded axes to be canceled. The actual position value is used as the position command value so that the axis positions can be used as reference positions for further movements. The distance-to-go is ignored. Syntax G76 Notes for programming G76: G76 is active only for the NC block in which it is located. Path condition G76 cannot be programmed together with axis data. G76 cancels the axis preloads on all axes which are preloaded using G75 "Feed to positive stop". If a program is terminated by NC command RET, by a branch with stop BST, when the NC program is manually reset via Control Reset, or if there is a power failure, all axis preloads are automatically canceled Traverse Range Limits Beside the traverse range limits which are defined in axis parameter "Cxx.011" and "Cxx.012", further traverse range limits can be programmed in the changeable software limits. Machine Data Changeable by: - User - NC - PLC Limit X+ Limit X mm mm X PLC Interface Signal Axis Parameter softlimit.fh7 Fig. 3-30: Changeable software limits Note: The position values are written as machine coordinates.

59 NC Programming Instructions Motion Commands, Dimension Inputs 3-35 Machine Data The changeable software limits are adjusted axis-specifically in page 12 of the machine data. STRUCT 12 Programmable traverse range limits Prog. Traverse range limits active BOOL NoNC,NoPLC,NoBOF,NoPwBOF Prog. traverse range limits positive POS NC,PLC,BOF,PwBOF Prog. traverse range limit negative POS NC,PLC,BOF,PwBOF END_STRUCT ARRAY [ Axis No. IP_AXIS 1-12 ] OF STRUCT Machine data elements "Prog. traverse range limit positive" and "Prog. traverse range limit negative" can be modified by the user in the machine data menu, in the NC program and in the PLC. The element "Prog. traverse range limit active", which is intended to visualize the PLC interface signal, can be accessed only in read mode. PLC Interface Signal AxxC.LIMIT AxxS.LIMIT The changeable software limits are activated with the axis control signal. The axis status signal is set as soon as the control signal has reached the NC. Boundary conditions The variable software limits have no influence in NC blocks which were already calculated by block preparation when setting the "AxxC.LIMIT" control signal. The changeable software limits must be less than the adjusted traverse range limits in the axis parameter. If the axis is outside of the changeable software limits upon activation, then the limits are active in the next traverse block. Example: G1 X250 F1500 X100 MTD(12,1,,2)=122.6 X The positive traverse range limit is reduced to mm by the programmable positive traverse range limit (the limit stored in the axis parameter is larger). An error is generated when moving to X200 after the programmable traverse range limit has been set to

60 3-36 Motion Commands, Dimension Inputs NC Programming Instructions 3.14 Repositioning and NC block restart to the contour The functions: reposition and restart to the contour automate traveling back to the contour following a program interruption. After program interruptions in which the operator withdrew the tool from the contour in manual mode to check and replace the inserts on the tool, for example the "Reposition" function allows the operator to return to the point of interruption; the NC block "Restart" function allows him to travel back to the starting point of the NC block. Both functions are available in the manual and program-driven modes. In manual mode, the controller compensates for the difference between the target position and the actual position in the order in which the user presses the jog keys. In the program-driven modes, the axes are moved to their destination positions in the order which is programmed by the machine builder in an NC subroutine. Reposition and restart in the automatic operating modes Operators frequently use reposition and restart in manual mode only to return the axes in the vicinity of the contour. Once the possibility of collisions is eliminated, the operator changes to one of the automatic operating modes (automatic or semi-automatic) or executes the program in manual mode and then continues repositioning or restart by pressing the start key. By changing to an automatic operating mode well enough in advance, tool racing and tool racing marks on the workpiece can be avoided. Following repositioning or restart, the NC resumes program execution without performing an NC restart. X X Initial Position Z Initial Position Z Feed Movement Block End Position Feed Movement Block End Position Block Starting Position Target Position = Interrupt Position Target Position= Block Starting Position Interrupt Position 322Rueck.FH7 Fig. 3-31: Reposition and restart in the automatic operating modes Pressing machine operating key "Reposition" or "Restart" selects the desired function. Pressing the Start key starts the repositioning or restarting; the NC axes are moved accordingly to the destination position in a fixed order. The machine builder can specify the order in which the NC axes are traversed to the contour. This order can be adapted to the given machine configuration. This is especially necessary when additional rotary main axes are present in addition to the spindles and the linear main axes. Program execution resumes without an additional NC start as soon as the NC has reached the destination point.

61 NC Programming Instructions Motion Commands, Dimension Inputs 3-37 Repositioning and Restarting to Destination Position "G77" G77 causes the NC to traverse to the destination position for the programmed feed axes and, in the case of spindles, to restore the status which existed prior to the interruption. With G77, the NC traverses the existing distance-to-go between the destination position and the current position for feed axes (axis meanings: X, Y, Z, U, V, W, A, B, C) by performing an interpolation operation similar to the G00 interpolation. It uses the target position in machine coordinates that was determined at the beginning of the repositioning or restart operation as the target position for the axes. Syntax G77 <[axis name][coordinate value=0]> <feed> Example: G77 X0 Y0 Z0 F1000 Notes for programming G77: G77 is active only for the NC block in which it is located. G77 S[x] 0 ([x]=1-3) causes the NC to restore the most recently active speed for the spindles or causes the NC to traverse to the specified destination position. The NC uses the positioning speed which was previously parameterized for spindle positioning to move to the target position. An additional F or S value is not needed to specify the positioning speed. With rotary axis-capable main spindles (C-axis), the state upon interruption (main spindle/rotary axis mode) must be stored in the PLC. With repositioning or restart, the rotary axis-capable main spindle must be moved to completion in the corresponding interruption state (main spindle/rotary axis mode). X Initial Position Z Feed Movement Block End Position 322Rück2.fh7 Target Position= Block Starting Position Interrupt Position 322Rueck2.FH7 Fig. 3-32: Repositioning and NC block restart to the contour

62 3-38 Motion Commands, Dimension Inputs NC Programming Instructions 3.15 NC Program Restart with "ADJUST" and "REPOS" Task of NC program restart NC program restart is used to establish the states in the controller and the machine that are required to be able to start or resume the working sequence from any block in the NC program. Note: The "NC program restart" function requires cooperation between the NC controller and the PLC. The machine manufacturer usually makes all necessary presets. Programming NC program restart is divided into two sections. All processes that are computed by the NC but not executed are programmed in the "ADJUST" subroutine. The subroutine and, consequently, the NC program restart are invoked using the ".ADJUST" label. The final state after the execution of the subroutine must be the initial state for a return to contour or repositioning process. Using the ".REPOS" label, the "REPOS" subroutine is invoked after the "ADJUST" subroutine. It contains all sequences and functions that enable a correct return to contour or repositioning process to be performed. Note: Subroutine "ADJUST" must be called before the REPOS subroutine (without RTS!). Thus, to be able to correctly reposition to the contour after an NC program restart, the "REPOS" subroutine must immediately follow "ADJUST". The "ADJUST" subroutine enables the machine manufacturer to establish the states that are required for program entry on the machine. In this subroutine, the machine manufacturer mainly provides for the output of the necessary auxiliary functions and for the necessary tool and workpiece changes. If a reverse occurs during the execution of the ADJUST subroutine, the NC branches to the related jump label and continues execution there before it branches to the ".HOME" label. The user can store the ADJUST subroutine in the current NC program, in the 99 program, or in the cycle memory. Primary blocks A primary block can be used with an NC block restart as a start block (with calculation) Primary blocks are used for NC program restart, in particular when tools or workpieces are supplied from a different process or an external source during program execution. DIN (Part 1) defines a colon ":" as the primary block character. The colon must be programmed as the first character within an NC block.

63 NC Programming Instructions Motion Commands, Dimension Inputs 3-39 Example: Primary blocks were programmed in the following programming example in order to provide the operator with a quick program entry during the NC program restart. : ; Section II lathing : T12 M6 G92 S2800 G0 G6 G8 G54 G97 X50 Z20 S1500 M3 G1 X48 F2000 Note: A slash "/" must be programmed before the colon if a primary block is also to be a skipped block. Primary blocks can also be programmed in subroutines. When primary blocks are programmed, it must be ensured that the start block is located before an incremental dimension specification (G91) and before an incremental zero point offset (G51). ADJUST and @129=G(6) ;Retain tool path correction, zero offset ;Retain spindle commands and ;Retain selected (pre-positioned) tool T= MTD(60,,,5) BSR.M6 ;Change to required tool T=@126 MTP ;Pre-position selected tool G=@128 G=@129 ;Set saved zero offset and dimensions G=@127 ;Set saved tool path correction ; Q9500 ;Go to manual mode ;.REPOS G77 S0 MTP ;Adjustment of spindle and magazine (pre-position selected tool) MRY ; ;set auxiliary functions M=@130 M=@131 ; ;Adjustment of the linear axes depending on the selected BEQ.REPOS2 G77 X0 Y0 F2000 G77 Z0 F2000 RTS.REPOS1 G77 Z0 X0 F2000 G77 Y0 F2000 RTS.REPOS2 G77 Y0 Z0 F2000 G77 X0 F2000 RTS ;Wait until magazine mvmt. is complete ;Plane Fig. 3-33: ADJUST and REPOS subroutine

64 3-40 Motion Commands, Dimension Inputs NC Programming Instructions Special NC-Specific Features in NC Program Restart Auxiliary function buffer The last auxiliary function output within the individual M, Q, S, T, and E function groups during the NC block restart can be read at the end of the computing sequence and be sent to the PLC. Note: At the program end and after a control reset, the NC initializes all memories of the M or Q function groups with the value "-1". The sole exceptions are the spindle and gear step groups. In addition to the M, Q, S, T, and E function groups, the NC stores the last 40 M functions of M function group 16 and the last 40 Q functions during the NC program restart within the "M(16) and Q function buffer" page. Note: M19 commands (M19, M119, M219, and M319) are not stored within the "M(16) and Q function buffer" page. Working principle dwell time Transformation for facing/ lateral cylinder surface machining Homing axes Feed against positive stop Spindle Control Commands With certain exceptions, the NC processes the NC commands during a NC program restart in the same way as it does during automatic mode. The exceptions are listed below: The NC does not take any dwell times (G04) into account during the computing run. The transformation for facing (G31) or lateral cylinder surface machining (G32) must be selected at the end of the NC program restart process according to the setting of the "Transformation selection" machine data element of the "NC program restart and REPOS" page within the "ADJUST" subroutine. The drives do not execute the "Homing axes" function (G74) during the NC program restart. Thus, the actual position is not changed when a G74 command is executed. When the NC executes the "Feed against positive stop" (G57) command during the computing run, it does not move the drive concerned. Thus, the motor current is not increased due to the mechanical resistance. With NC-controlled spindles, the NC does not execute the spindle control commands (Mj03, Mj04, Mj05, Mj19; with "j" equal to 1, 2, or 3) during the computing run. It issues the auxiliary functions to the PLC (as in normal operation) only if this has been preselected in the process parameters. The NC retains the states of the spindles with rotary axis capability that are required for the subsequent program entry and stores them in the "NC program restart and REPOS" page. The states that are required for the program entry have been established using G77 Sj=0 (with j equal to " ", "1", "2", 3") and/or G77 C0 (C: axis designation of the rotary axis) according to the necessary modes (same as after an interruption). Which mode is to be selected can be obtained from machine data page 60 "NC program restart and REPOS".

65 NC Programming Instructions Motion Commands, Dimension Inputs 3-41 Example: A spindle with rotary axis capability and the designation S1/C1 requires the mode (spindle/rotary axis mode) that is necessary for further operation to be established after an interruption and/or after the NC program restart in the REPOS subroutine..repos 0, 0,1)-1 BEQ.ADJ_5 ;Page:60, process:0, Data element: 1 (rotary axis mode for S1) G77 S1=0 ;Select spindle mode BRA.ADJ_6.ADJ_5 G77 C1=0 ;Select rotary axis mode.adj_6 : Program control commands and gear switching functions Process control and synchronization commands Recommendation Data exchange with digital drives with SERCOS Interface The NC processes the program control commands (M00, M01, M02, M30) and the gear switching functions (Mj40, Mj41, Mj42, Mj43, Mj44; with j = "1", "2", or "3") without any restrictions, as in the normal program mode. If the machine manufacturer has selected this feature in the process parameters, the NC transfers them to the PLC. During the NC program restart, the NC executes the process control commands (DP, SP, RP, AP, WP, LP and POK) and the process synchronization commands (WES and WER) as in normal operation. It is required, however, that the individual programs have been started in the individual processes as in normal operation. If the other processes are not to be taken into account (i.e. not to be influenced) during NC program restart because they may have already reached the required program locations in normal mode or via NC program restart, a skip slash or a conditional jump instruction that precedes the process control commands or process synchronization commands can be used. During the computer run, data exchange with digital drives (with SERCOS interface) via AXD commands is performed as in normal program operation. This also applies to APR SERCOS parameters that are processed by the APR. Note: AXD commands that bring about a movement must be activated via the PLC using an auxiliary function that is not issued and/or not processed by the PLC during NC program restart

66 3-42 Motion Commands, Dimension Inputs NC Programming Instructions Example: Certain functions (such as AXD commands) are not to be issued to the controller during the NC program restart. There are different ways of implementing this: 1. Conditional jumps Using an event the PLC sets during the NC program restart, specific functions can be skipped that are not to be executed in the NC during the NC program restart. : BES.BP1 1:15 AXD (X:S )=7000 ;new KV factor for X axis AXD (Y:S )=7000 ;new KV factor for Y axis AXD (Z:S )=7000 ;new KV factor for Z axis.bp1 : 2. Implementation in the PLC In this solution, the PLC executes the functions that may not be processed during the NC block restart (e.g. the AXD commands). As long as these functions were activated using an auxiliary function type (e.g. using Q functions), their output to the PLC can easily be implemented during the NC program restart process. To do this, just set the related process parameter: Bxx.057 Q function output during NC program restart Yes/No to No. The related NC program could then look like this: : Q101 ;new KV factor for X axis Q102 ;new KV factor for Y axis Q103 ;new KV factor for Z axis : Axis transfer Read position value Detailed description The NC executes the axis transfer commands (GAX and FAX) as in normal program operation. If the NC comes to a FAX command during the computing run, the NC waits until the axis is requested by a different process (which may also be in an NC program restart process) via GAX. Correspondingly, the NC waits during an axis request using "GAX" until another process (which may also be in an NC program restart process) releases the axis concerned via "FAX". The NC does not interpret the "PMP" and "NMP" commands (which are used to acquire the current actual position of analog drives) during the computing run. Additional and supplemental information about the "NC program restart and REPOS" function can be found in the "NC program restart" description "DOC-MTC200-SATZVOR*Vxx-ANW1-EN-P".

67 NC Programming Instructions Motion Commands, Dimension Inputs Adaptive Depth "G68" / "G69" Adaptive depth assists a 2 nd encoder system which, for example, is used for the compensation of workpiece fixing errors (surface sensors). Syntax G75 <[axis name][coordinate value]> <feed> switches the motor encoder to the 2 nd encoder G68<[axis name][coordinate value]> <feed> switches the 2 nd encoder to the motor encoder The parameters of the 2 nd encoder are set in axis parameters Cxx.087, Cxx.088, Cxx.089, Cxx.090 and Cxx.091. Switching is performed with an extended encoder using G code G69. The encoder system is switched back with the encoder still extended using G68. Application Application 1 For adaptive positioning with a linear sensor. Switching is performed during movement. Application 2 To switch from a motor encoder to an external measuring system. The external measuring system can either be a linear encoder, a rotation encoder for circular axes, or a linear sensor. Switching is performed in a standstill condition, but under power and with controller release. New Axis Parameter Further axis parameters are offered when switching to a 2 nd encoder system if Motor encoder was preselected in the axis parameter "Position encoder setup". Cxx.087 Adaptive control Cxx.088 Reference value of the 2 nd encoder system Cxx.089 Positive travel limits of the 2 nd encoder system Cxx.090 Negative travel limits of the 2 nd encoder system Cxx.091 Permissible sensor deflection in the 1 st encoder system Note: The reference value of the 2 nd encoder system must lie outside of the travel limit in order to exclude the possibility of undesired movements if the workpiece is not reached!

68 3-44 Motion Commands, Dimension Inputs NC Programming Instructions G Codes to Switch to a 2 nd Encoder System Two new G codes exist to switch between the two encoder systems. G69 switches to the 2 nd encoder G68 switches back to the motor encoder. The G codes are modally inactive A switch to the 2 nd encoder is performed under a standstill condition if G code G69 is cancelled when G09 was preselected. In the 2 nd encoder system, the axis coordinate value is being approached as the target position when G08 is preselected. Example of "Switching in a standstill condition": G69 G09 X0 G01 X10 G68 G09 X0 G01 X120 ;Switch to 2 nd encoder system ;Move the axis in the 2 nd encoder system ;Switch to 1 st encoder system ;Move the axis in the 1 st encoder system Example of "Switching on-the-fly": G01 G08 G90 X200 G69 X10 G01 G08 X20 G68 X50 ;Move the axis in the 1 st encoder system ;Switch to 2 nd encoder system ;Move the axis in the 2 nd encoder system ;Switch to 1 st encoder system X50 describes a position in the 2nd encoder system Note: Also see the documentation "Adaptive depth".

69 NC Programming Instructions Motion Blocks Motion Blocks 4.1 Axes Linear main axes Rotary Main Axes The linear main axes span a Cartesian coordinate system. They are identified by means of axis names: 1. linear main axis (symbol: X) 2. linear main axis (symbol: Y) 3. linear main axis (symbol: Z) The axis name (address of the axis as it is to be addressed in the NC program) is freely selectable; however, the meaning of the axis is defined by the position of the axis in the coordinate system (see next fig. "Linear main axes", sequence "Rotary main axes"). In the CNC, the axes are permanently assigned to specific processes; however, they can be forwarded to other processes. An axis cannot be addressed simultaneously in more than one process. Circular interpolations and the tool radius path correction can be performed only within the machining planes spanned by the linear main axes (plane selection with G17, G18, G19, and free plane selection with G20, G21, G22). Rotary main axes rotate about the linear main axes. The axis meanings: 1. rotary main axis (symbol: A) 2. rotary main axis (symbol: B) 3. rotary main axis (symbol: C) indicate which coordinate axis the respective rotary main axis rotates around (see next fig. "Linear main axes"). The axis name (the address of the axis) is freely selectable; however, the axis meaning is defined by the position of the axis in the coordinate system. With absolute positioning (G90), the traverse range is ± degrees. With absolute positioning (G90), the position which is programmed in an absolute statement is traversed via the shortest possible path. With incremental positioning (G91) the traverse range is ± degrees or ± degrees (parameter-dependent). The sign indicates the traverse direction. Ordinate 2nd Axis [Y] [B] Plane YZ G19 G18 Plane ZX G17 Plane XY [A] Abscissa 1st Axis [X] Applicate [C] 3rd Axis [Z] 41Koor.FH7 Fig. 4-1: Linear main axes (X, Y, Z) and rotary main axes (A, B, C) in a Cartesian reference coordinate system

70 4-2 Motion Blocks NC Programming Instructions Linear and Rotary Auxiliary Axes 4.2 Interpolation conditions Following Error-Free Interpolation "G06" Linear and rotary auxiliary axes can occupy any given position within the spatial vicinity. 1. auxiliary axis (symbol: U) 2. auxiliary axis (symbol: V) 3. auxiliary axis (symbol: W) identify this type of axis. Axis meanings U, V and W are completely equivalent. They can be selected for linear and rotary axes, as well as for rotary axis-capable main spindles. Like the other axes, auxiliary axes take part in positioning processes and interpolation movements, and like these reach their programmed final value simultaneously. However, the path feed rate (F value) specified in the NC program does not apply to the auxiliary axes, but to the linear and rotary main axes if they are programmed within an NC block. Syntax G06 A following error-containing algorithm is activated for the axis movements using interpolation condition G06. All of the following path movements are performed in a real path mode. The NC block transitions are not rounded, and they are processed free of interruptions. The path velocity is reduced to nearly zero near contour corners (path bends). The minimized following error mode is realized by means of a dynamic feed forward system. A following error only occurs within the 2 ms limits of the interpolation clock. Virtually lag-free operation can be achieved only if Bosch Rexroth digital drives are used. With analog drives, G06 results in a reducedfollowing error operation. After it is selected, G06 remains modally active until it is canceled by G07 or until it is automatically reset at the end of the program or by BST. This function permits the gain factor to be increased to the machine's maximum mechanical load limits. A higher gain factor produces a better dynamic characteristic of the axis movements.

71 NC Programming Instructions Motion Blocks 4-3 Examples: 404Kreis.fh7 Circle Diameter 160 mm Oscilloscope Function Machining Speed= F8000, Gain Factor=7 G06, G08 Position Values Y Axis [mm] Position Deviation: Position Command Value: Expansion Factor: Axis Number: 2 AxisType: Digital Linear Axis Axis Designation: Y Process: Master Axis Number: 1 Axis Type: Digital Linear Axis Axis Designation: X Process: Master Position Values X Axis [mm] 402Kreis.FH7 Fig. 4-2: Circular interpolation with F8000 mm/min and following error-free interpolation In the circle shown above, the following error is multiplied by an expansion factor of Here is the partial program for the circle plots (see above and following sequences): T11 BSR.M6 Tool change SF D10 G00 G90 G54 G07 G08 X199 Y136 Z5 Start position S5000 M03 Spindle ON G01 Z-5 F1000 Lower cutter into material G41 X199 Y141 F8000 [or F1000] Start point of circular machining G03 X180 Y122 I199 J122 Start circle G01 X180 Y100 Transition element G02 X180 Y100 I100 J100 Full circle 160 G01 X180 Y77 Transition element G03 X198 Y59 I198 J77 Exit circle G00 Z5 Withdraw tool to safety clearance T0 BSR.M6 Tool change RET Program end Due to the compensated following error, the actual contour is nearly ideal from the NC controller point of view. A position deviation of mm occurred only at the transition between the quadrants. The position deviation at the transition between the quadrants can almost be completely compensated by programming a friction torque compensation.

72 4-4 Motion Blocks NC Programming Instructions 404Kreis.fh7 Machining Speed=F8000 Oscilloscope Function Gain Factor=7 G06, G08 Position Value Axis Y [mm] Position Deviation: Position Command Value: Expansion Factor: Position Value Axis X [mm] Circle Section Evaluation in Quadrant Transition Position Deviation 403Kreis.FH7 Fig. 4-3: Circular interpolation with following error-free interpolation, section The next figure shows, for comparison, the same circle at a path feed rate of F1000 mm/min. 404Kreis.fh7 Circle Diameter 160 mm Machining Speed= F1000, Gain Factor=7 G06, G08 Oscilloscope Function Position Values Axis Y [mm] Position Deviation: Position Command Value: Expansion Factor: Axis Number: 2 Axis Type: Digital Linear Axis Axis Designation: Y Process: Master Axis Number: 1 Axis Type: Digital Linear Axis Axis Designation: X Process: Master Position Values Axis X [mm] 404Kreis.FH7 Fig. 4-4: Circular interpolation with F1000 mm/min and following error-free interpolation

73 NC Programming Instructions Motion Blocks 4-5 The figure below shows an evaluation of the position deviation in the transition between the quadrants. 404Kreis.fh7 Machining Speed=F1000 mm/min Position Value Axis Y [mm] Oscilloscope Function Position Deviation: Position Command Value: Expansion Factor: Gain Factor=7 G06, G08 Position Value Axis X [mm] Circle Section Evaluation in Quadrant Transition Position Deviation 405Kreis.FH7 Fig. 4-5: Circular interpolation with following error-free interpolation, section F1000 Interpolation with Lag Distance "G07" Syntax G07 A following error-containing algorithm is activated for the axis movement using interpolation condition G07. It is active and locked until it is overwritten by G06. G07 is reset automatically at the end of the program (RET) or by the BST command. NC block transitions which are not tangential will be rounded. Example:

74 4-6 Motion Blocks NC Programming Instructions 404K reis.fh7 Circle Diameter 160 mm Machining Speed= F8000, Gain Factor=7 G06, G08 Oscilloscope Function Position Values Axis Y [mm] Position Deviation: Position Command Value: Expansion Factor: Axis Number: 2 Axis Type: Digital Linear Axis Axis Designation: Y Process: Master with Axis Number: 1 Axis Type: Digital Linear Axis Axis Designation: X Process: Master with Position Value Axis X [mm] 406Kreis.FH7 Fig. 4-6: Circular interpolation with F8000 mm/min and G07 In the circle shown, the following error was multiplied by an expansion factor of On the other hand, the expansion factor for G06 was a multiplication factor of , which is more than three times the value; this explains the variations of the position deviation. Here is the partial program for the circle plots (see above and following sequences): T11 BSR.M6 Tool change SF D10 G00 G90 G54 G07 G08 X199 Y136 Z5 Start position S5000 M03 Spindle ON G01 Z-5 F1000 Lower cutter into material G41 X199 Y141 F8000 [or F1000] Start point of circular machining G03 X180 Y122 I199 J122 Start circle G01 X180 Y100 Transition element G02 X180 Y100 I100 J100 Full circle 160 G01 X180 Y77 Transition element G03 X198 Y59 I198 J77 Exit circle G00 Z5 Withdraw tool to safety clearance T0 BSR.M6 Tool change RET Program end

75 NC Programming Instructions Motion Blocks 4-7 The diameter of the programmed circle becomes smaller according to the programmed speed and the selected gain factor. The programmed contour will be maintained with increasing accuracy as the programmed speed becomes lower and the selected gain factor becomes larger. 404Kreis.fh7 Machining Speed=F8000 mm/min Position Value Axis Y [mm] Oscilloscope Function Position Deviation: Position Command Value: Expansion Factor: Gain Factor=7 G06, G08 Position Value Axis X [mm] Circle Section Evaluation in Quadrant Transition Position Deviation 407Kreis.FH7 Fig. 4-7: Circular interpolation with G07, section The next figure shows, for comparison, the same circle at a path feed rate of F1000 mm/min. 404K reis.fh7 Circle Diameter 160 mm Machining speed= F1000, Gain Factor=7 G07, G08 Oscilloscope Function Position Value Axis Y [mm] Position Deviation: Position Command Value: Expansion Factor: Axis Number: 2 Axis Type: Digital Linear Axis Axis Designation: Y Process: Master with Axis Number: 1 Axis Type: Digital Linear Axis Axis Designation: X Process: Master with Position Values Axis X [mm] 408Kreis.FH7 Fig. 4-8: Circular interpolation with F1000 mm/min and G07

76 4-8 Motion Blocks NC Programming Instructions The figure below shows an evaluation of the position deviation in the transition between the quadrants. 404Kreis.fh7 Machining Speed=F1000 mm/min Position Value Axis Y [mm] Oscilloscope Function Position Deviation: Position Command Value: Expansion Factor: Gain Factor=7 G07, G08 Position Value Axis X [mm] Circle Section Evaluation in Quadrant Transition Position Deviation 409Kreis.FH7 Fig. 4-9: Circular interpolation with G07, partial view with F1000 mm/min Optimal Speed Block Transition "G08" Syntax G08 Interpolation function G08 is used to adjust the final velocity at the end of the NC block to ensure that the transition to the next NC block occurs at the highest possible velocity. The crucial factor is the maximum velocity jump, which is defined in the axis parameters. In the case of a tangential NC block transition with the same contour velocity, the transition is made at the same velocity. The result is that workpiece surfaces are uniform; no free-cutting marks are produced. In the case of a tangential transition and an active G06, e.g. a transition from a straight line to a small circle, the velocity is reduced to the calculated starting velocity of the next NC block. If G61 (exact stop) is programmed with G08 Optimal speed block transition active, G09 Speed-limited block transition is automatically activated (see next page). G08 can be programmed again if G61 has been cancelled. Function G08 is active with a feed override of 1% 100%. If the feed override is set higher than 100%, the velocity is reduced to 100% in the NC block transitions. The M functions stop NC block execution until they are acknowledged; thus, G08 has no effect in NC blocks in which an M function is programmed. After it has been selected, G08 remains modally active until it is canceled by G09 or until it is automatically reset at the end of the program or by BST. Intermediate NC blocks in which no interpolation movements occur do not cause a velocity change. For example, entering an intermediate NC block containing G01 F7000 would cause a speed drop.

77 NC Programming Instructions Motion Blocks 4-9 Note: The machine builder specifies the maximum feed rate change in the axis parameters. Examples: The velocity diagram (above and following sequence) clearly shows how the NC block transition from the first to the second area is traversed at unreduced velocity. The NC block transition cannot be detected. The feed rate is reduced to F7000 in the NC block transition to the third segment. The velocity is optimally reduced to the NC block starting velocity without overshooting. 404Kreis.fh7 3 Straight Lines X200 --> X0 Oscilloscope Function Signal 1 + Signal 2 [(mm)/min * 10^3] G06 und G08 Axis Number: 1 Axis Type: Dig. Linear Axis Axis Name: X Process: Master with 4 Axes Feed Summed Signal Generation: Signal 1 + Signal 2 Signal 1: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Signal 2: d( f( t ))/dt [(mm)/min] ( f( t ) = Position Deviation ) Feedrate Change between 2nd Section and 3rd Section from F8000 to F Satz.FH7 Fig. 4-10: NC block transitions with G08 and F8000 Sample program for the displayed velocity diagrams in the figures "Block transitions with G08 and F8000" and "Block transition with G08 from F8000 to F7000": G00 G54 G90 G06 G08 X200 G01 F8000 X150 X50 X0 F7000 RET Starting point of the X axis Feed speed 1. segment 2. segment 3. segment with new F value Program end In the following velocity diagram, the change in velocity between the second area with F8000 and the third area with F7000 has been magnified using a zoom function. The optimal velocity NC block transition between the segments can clearly be seen.

78 4-10 Motion Blocks NC Programming Instructions 404Kreis.fh7 Block Transition from F8000 auf F7000 Oscilloscope Function Signal 1 + Signal 2 [(mm)/min * 10^3] G06 und G08 Axis Number: 1 Axis Type: Dig. Linear Axis Axis Name: X Process: Master with 4 Axes Feed Summed Signal Generation: Signal 1 + Signal 2 Signal 1: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Signal 2: d( f( t ))/dt [(mm)/min] ( f( t ) = Position Deviation Feedrate Change between 2nd Section and 3rd Section from F8000 to F Satz.FH7 Fig. 4-11: NC block transition via G08 from F8000 to F7000 Velocity-Limited Block Transition "G09" Syntax G09 Interpolation condition G09 is used to adapt the NC block end velocity in such a way that the maximum velocity change defined in the axis parameters can be used for a stop. Position deviations can be reduced at NC block transitions by using interpolation condition G09. Machining using G09 requires more time, and the surface quality can be adversely affected with free cutting marks. G09 is the power-on default and remains locked and active until it is overwritten by G08. G09 is reset automatically at the end of the program (RET) or by the BST command. Note: The machine builder specifies the maximum feed rate change in the axis parameters.

79 NC Programming Instructions Motion Blocks 4-11 Examples: 404K reis.fh7 3 Straight Lines X200 --> X0 Oscilloscope Function Signal 1 + Signal 2 [(mm)/min * 10^3] G06 und G09 Axis Number: 1 Axis Type: Dig. Linear Axis Axis Name: X Process: Master with 4 Axes Feed Summed Signal Generation: Signal 1 + Signal 2 Signal 1: d( f( t )/dt [(mm)/min] ( f( t )) = Actual Position ) Signal 2: d( f( t ))/dt [(mm)/min] ( f( t ) = Position Deviation ) Feedrate Change between 2nd Section and 3rd Section from F8000 to F Satz.FH7 Fig. 4-12: NC block transitions with G09 and F8000 The velocity diagram (see above figure) clearly shows how the velocity of the axis is reduced to almost 0 between the workpiece areas. The residual velocity at which the transition to the next NC block occurs is derived from axis parameter Cxx.017 Maximum feed rate change w/o ramp. Sample program for the displayed velocity diagrams in the fig. "Block transitions with G09 and F8000" and "Block transition with G09 from F8000 to F7000": G00 G54 G90 G06 G09 X200 G01 F8000 X150 X50 X0 F7000 RET Starting point of the X axis Feed speed 1. segment 2. segment 3. segment with new F value Program end In the following velocity diagram, the change in velocity between the second area with F8000 and the third area with F7000 has been magnified using a zoom function.

80 4-12 Motion Blocks NC Programming Instructions 404K reis.fh7 Block Transition from F8000 auf F7000 Oscilloscope Function Signal 1 + Signal 2 [(mm)/min * 10^3] G06 und G09 Axis Number: 1 Axis Type: Dig. Linear Axis Axis Name: X Process: Master with 4 Axes Feed Summed Signal Generation: Signal 1 + Signal 2 Signal 1: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Signal 2: d( f( t ))/dt [(mm)/min] ( f( t ) = Position Deviation ) Feedrate Change between 2nd Section and 3rd Section from F8000 to F Satz.FH7 Fig. 4-13: NC block transition via G09 from F8000 to F7000 Exact Stop "G61" Syntax G61 With interpolation condition G61, the programmed destination position is approached within the preset exact stop limit. The exact stop limit is defined in the axis parameters by a positioning window. When the positioning window is reached, processing switches to the next NC block and the next axis movement begins. Programming G00 (rapid traverse) automatically activates G61 (exact stop). If G61 is programmed, interpolation condition G08 is reset. G08 can be reactivated if G61 has been cancelled. It is recommended that G61 be selected for machining sharp contoured corners and not for tangential transitions. After it has been selected, G61 remains modally active until it is cancelled by G62 (Rapid NC block transition) or until it is automatically reset at the end of the program or by BST. Note: The machine builder specifies the positioning window in the axis parameters.

81 NC Programming Instructions Motion Blocks 4-13 Examples: 404K reis.fh7 T est-contour: Transition from Straight Line --> Circle Not Tangential, Circle --> Circle T angential Oscilloscope Function Position Values Axis Y [mm] Position Deviation: Position Command Value: Expansion Factor: Feed: F4000 G06, G61 Gain = 7 Position Values Axis X [mm] Transition Straight Line --> Circle Not Tangential Transition Circle--> Circle Tangential Position Deviation in Transition Straight Line --> Circle 414Kontur.FH7 Fig. 4-14: Contour diagram with G61 The "Contour diagram with G61" shown here illustrates how the contour is accurately maintained by G61 in the transitions straight line circle and circle circle. The positioning window for the examples shown here is specified as mm in the axis parameters. The positioning deviation in the non-tangential transition from straight line circle is specified as mm. The transition accuracy could be increased accordingly if the positioning windows axis parameters were reduced. The position deviation is less than mm in the tangential transition circle circle. Sample program for the diagrams shown in Figures "Contour diagram with G61" and "Velocity diagram with G61": G00 G54 G90 G06 G08 X-100 Y-100 G01 G61 X-50 Y-50 F4000 G02 X50 Y-50 I0 J-50 G03 X100 Y-50 I75 J-50 RET Starting point 1. straight line 1. semi-circle 2. semi-circle Program end The following velocity diagram (Fig. "Velocity diagram with G61") shows how the velocity is reduced until the positioning window is reached. When the positioning window is reached, processing switches to the next NC block and the next axis movement starts.

82 4-14 Motion Blocks NC Programming Instructions 404K reis.fh7 Diagram: Transition from Straight Line --> Circle Not Tangential, Circle --> Circle T angential Oscilloscope Function ( (Signal 1) 2 + (Signal 2) 2 ) [(mm)/min * 10^3] Axis Number: 1 Axis Name: X Axis Number: 2 Axis Name: Y Feedrate Summed Signal Generation: ( (Signal 1) 2 + (Signal 2) 2 ) Signal 1: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Signal 2: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Feedrate F4000 G06, G61 Gain = 7 Transition Straight Line --> Circle Not Tangential Transition Circle --> Circle Tangential 415G61.FH7 Fig. 4-15: Velocity diagram with G61 Rapid NC Block Transition "G62" Syntax G62 With interpolation condition G62, processing switches to the next NC block as soon as the command values for all programmed axes in the NC block, which are issued by the interpolator, have reached their programmed final values. The machine does not wait until the actual values have also reached their end positions. Any lag (following error) which may be present is not reduced while the final position is being approached. G62 (Rapid NC block transition) is suppressed if G00 (Rapid traverse) is programmed. Programming G62 rounds off sudden contour changes and non-tangential transitions. G62 is the power-on default and is saved as active until it is overwritten by G61. G62 is reset automatically at the end of the program (RET) or by the BST command. The machining time is reduced when G62 and G08 are programmed.

83 NC Programming Instructions Motion Blocks 4-15 Examples: 404K reis.fh7 T est-contour: T ransition from Straight Line --> Circle Not Tangential, Circle --> Circle T angential Oscilloscope Function Position Values Axis Y [mm] Positions Deviation: Position Command Value: Expansion Factor: Feedrate: F4000 G06, G62 Gain = 7 Position Values Axis X [mm] Transition Straight Line --> Circle Not Tangential Transition Circle --> Circle Tangential Position Deviation in Transition Straight Line --> Circle 416G62.FH7 Fig. 4-16: Contour diagram with G62 The contour diagram shown here with G62 illustrates how the non-tangential transitions (straight line circle) are slurred as a consequence of G62. The contour is traveled at optimal velocity (via G08). At the contour itself, the machining quality is identical to that achieved with G61. If you compare the contour diagrams in "Contour diagram with G61" and "Contour diagram with G62", note that the expansion factor for the position deviation is four times as high in "Contour diagram with G62". Sample program for the diagrams shown in Figures "Velocity diagram with G61" and "Contour diagram with G62": G00 G54 G90 G06 G08 X-100 Y-100 G01 G62 X-50 Y-50 F4000 G02 X50 Y-50 I0 J-50 G03 X100 Y-50 I75 J-50 RET Starting point 1. straight line 1. semi-circle 2. semi-circle Program end In the following velocity diagram with G62, it can be seen how the path velocity in the non-tangential transition straight line circle is reduced by the change of direction. The tangential transition circle circle is traveled at a constant path velocity as a consequence of conditions G62 and G08.g

84 4-16 Motion Blocks NC Programming Instructions 404K reis.fh7 Diagram: Transition from Straight Line --> Circle Not Tangential, Circle --> Circle T angential Oscilloscope Function ( (Signal 1) 2 + (Signal 2) 2 ) [(mm)/min * 10^3] Axis Number: 1 Axis Name: X Axis Number: 2 Axis Name: Y Feed Summed Signal Generation: ( (Signal 1) 2 + (Signal 2) 2 ) Signal 1: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Signal 2: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Feedrate F4000 G06, G62 Gain = 7 Transition Straight Line --> Circle Not Tangential Transition Circle --> Circle Tangential 417G62.FH7 Fig. 4-17: Velocity diagram with G62 Programmable Acceleration "ACC" Syntax ACC <constant><axis designation><value> ACC=<variable><axis designation><value> ACC=<arithmetic expression><axis designation><value> An acceleration limit can be programmed in an NC program using the function ACC (Programmable acceleration). This function is used, for example, to reposition the workpiece holder axes according to the weight of the workpiece. The programmable acceleration limits the maximum path acceleration specified in the parameters. The acceleration factor is programmed in percent of the maximum path acceleration defined in the process parameters. It acts on all axes programmed in an NC block. The acceleration factor ranges from 1% to 100%. An acceleration factor which does not lie within the value range will produce an error message when the program is executed. The acceleration factor can be programmed as a constant as well as a mathematical expression. If the acceleration factor is defined as a constant, it is not possible to program decimal places. If it is defined as a mathematical expression, the value is automatically rounded to a whole number. An acceleration factor programmed using the ACC command remains modally active until it is overwritten by a newly programmed value or is automatically reset to 100% at the end of the program or by the command BST. The ACC command may remain inactive if the "Maximum path acceleration" parameter was set to a very high value which is disproportionate to the maximum possible path acceleration. Note: The machine builder specifies the maximum path acceleration in the process parameters.

85 NC Programming Instructions Motion Blocks 4-17 Examples: G01 ACC 50 X100 G01 X100 G01 X100 ACC with a constant ACC with a variable ACC with a math. expression NC program: G00 G54 G90 G61 G06 X200 Starting point G01 X150 F straight line ACC 40 X50 2. straight line acceleration factor 40%ACC 15 X straight-line acceleration factor 15% RET Program end The process parameter for maximum acceleration was set to 500 mm/sec 2 in the velocity diagram shown here. The acceleration for NC block ACC 40 X50 is therefore 200 mm/sec 2 ; for NC block ACC 15 X-50, it is 75 mm/sec Kreis.fh7 Speed Diagram: 3 Straight Lines in X with Various Acceleration Oscilloscope Function ( (Signal 1) 2 + (Signal 2) 2 ) [(mm)/min * 10^3] Axis Number: 1 Axis Type: Dig. Linear Axis Axis Name: X Process: Master with 4 Axes Feed Summed Signal Generation: ( (Signal 1) 2 + (Signal 2) 2 ) Signal 1: d( f( t ))/dt [(mm)/min] ( f( t ) = Actual Position ) Signal 2: d( f( t ))/dt [(mm)/min] ( f( t ) = Position Deviation ) 418Besch.FH7 Fig. 4-18: Velocity diagram for programmable acceleration

86 4-18 Motion Blocks NC Programming Instructions 4.3 Interpolation functions Linear Interpolation, Rapid Traverse "G00" Syntax G00 The programmed coordinate values using path condition code G00 are approached at maximum path velocity. If G00 applies to more than one axis, the movement is performed with interpolation. A feed rate can be programmed with G00 by using an F word. If a feed rate (F value) is not programmed in the NC block, then the movement occurs at the maximum path velocity entered in the process parameters. The path velocity is limited to the maximum axis velocity entered in the axis parameters, so that linear interpolation is always performed. The F value programmed with G00 remains active for all subsequent movements and interpolation types until it is overwritten by a new F value. Note: The programmed F value for a G00 block is valid only for the NC block in which it has been programmed. In the case of a subsequent G00 block without an F value, the axes are moved at maximum path velocity. Rapid block transition (G62) is suppressed in combination with G00. A transition to the next NC block occurs only if all programmed axes lie within the position window of the programmed coordinate value, which is specified in the axis parameters. With active velocity-optimal NC block transition (G08), a change to velocity-limited NC block transition (G09) is already made in the previous NC block. If G00 is overwritten by a different type of interpolation, G08 is automatically reactivated. G00 remains modally active until it is overwritten by a different code in the same G group (G01, G02, G03). Example: G00 G54 G90 X40 Y40 X120 Y60 F8000 [P1] rapid traverse at maximum path velocity [P2] rapid travel with F word Y 60 P P X 419g0.FH7 Fig. 4-19: Linear interpolation, rapid travel G0

87 NC Programming Instructions Motion Blocks 4-19 Linear Interpolation, Feed "G01" Syntax G01 The axes programmed using code G01 are moved to their programmed coordinate value on a straight line relating to the current coordinate system using the current feed rate. The programmed axes are started simultaneously; all of them reach their programmed end point at the same time. If a new feed rate (F value) is programmed using code G01, the most recently active F value is overwritten. The programmed F value functions as a path feed rate. If a number of axes are being traveled, the velocity component of each individual axis is less than the programmed path feed rate. If an F word was not yet active when the controller was powered on, then G01 must be used to program an F value. G01 remains modally active until it is overwritten by a different code in the same G group (G00, G02, G03). Example: Linear interpolation in 2 axes Y 100 [P3] [P4] [P4] X [P2] [P1] [P1] X Z 420G01.FH7 Fig. 4-20: Linear interpolation, feed rate G01 with 2 axes NC program: G00 G90 G54 G06 G08 Movement commands, interpolation conditions Starting position, spindle ON [P1] Machining start position X0 Y0 Z10 S3000 M03 G01 X26.26 Y18 Z5 F2000 Z-5 Feed Z axis Y80 F1200 [P2] linear interpolation, 1 axis X41 Y93.5 [P3] linear interpolation, 2 axes X111 [P4] linear interpolation, 1 axis G00 Z10 M05 Z axis to safety distance RET

88 4-20 Motion Blocks NC Programming Instructions Example: Linear interpolation in 3 axes Y 100 [P3] [P3] [P2] X [P2] [P1] [P1] X Z G013.FH7 Fig. 4-21: Linear interpolation, feed rate G01 with 3 axes NC program: G00 G90 G54 G06 G08 Circular Interpolation "G02" / "G03" Movement commands, interpolation conditions Starting position, spindle ON [P1] Machining start position X0 Y0 Z10 S3000 M03 G01 X40 Y25.5 Z5 F2000 Z-5 Feed Z axis X95.74 Y80 Z-10 F1200 [P2] linear interpolation, 3 axes X100 Y100 Z10 F2000 [P3] Z axis to safety distance M05 Spindle OFF G00 X0 Y0 Return to starting point RET Program end Syntax Circular movement - clockwise G02<end point ><interpolation parameter [I,J,K]> or G02<end point><radius [R]> Circular movement - counterclockwise G03<end point ><interpolation parameter [I,J,K]> or G03<end point><radius [R]> The programmed path condition G02 or the programmed tool G03 is moved along a circular path to the programmed end point using the effective or programmed feed rate (F value). The programmed axes are started simultaneously; all of them reach their programmed end point at the same time. Circular movement is activated using: G02 in the clockwise direction and G03 in the counterclockwise direction in the direction of the programmed end point (see Fig. "Circular programming depending on planes"). The tool is moved around the programmed center point of the circle. A circular motion can be performed in each plane using the corresponding selection (plane selection with G17, G18, G19 and free plane selection with G20, G21, G22). The programmed center of the circle and the end points must lie on the same machining plane as the starting point.

89 NC Programming Instructions Motion Blocks 4-21 Ordinate 2nd Axis [Y] Plane YZ G02 G03 G19 G02 G02 Plane ZX G18 G17 Plane XY G03 G03 Abscissa 1st Axis [X] Applicate 3rd Axis [Z] 422Kreis.FH7 Fig. 4-22: Circular programming depending on planes The radius and the starting angle of the arc are calculated from the starting point and the center point. A radius which is determined based on the end point and the center point, and that perhaps differs, is ignored. This means that the end point can only be used to calculate the final angle. Thus, the programmed end point may not always lie on the arc. The programmed end point can therefore differ from the traveled end point. With incremental data input (G91), the center point and the end point are expressed in relation to the starting point; with absolute input (G90), they are expressed in relation to the current zero point. When programming using absolute data input, the value of the starting point is assigned to the coordinate value of an unprogrammed address letter (X, Y, Z, I, J, K); with incremental input, the value 0 is assigned. Since the starting point and end point are identical for a full circle, only the center point needs to be entered when programming a full circle. A circle or an arc is defined by the programmed axis commands and the parameters for interpolation. The previous NC block defines the starting point of the circle. The end point of the circle is defined by the axis value data X, Y and Z in the G02/G03 NC block. The center point of the circle is defined by the entered interpolation parameters I, J and K or directly via radius R. Interpolation Parameters I, J, K Interpolation parameters are assigned to the axes which are used in a circular interpolation. These parameters are parallel to the axes, and their signs depend on the direction in which they are oriented in relation to the center point of the circle. Based on DIN , interpolation parameters I, J and K are assigned to axes X, Y and Z. If coordinate values are not programmed using addresses I, J and K, the corresponding starting point is assigned with absolute dimension programming. The default value is 0 with incremental dimension programming. With G91 programming, the interpolation parameters define the distance from the starting point of the circle to the center point; with G90 programming, the distance from the current zero point to the center point is defined.

90 4-22 Motion Blocks NC Programming Instructions Y End point Center Point +I (G90) -I (G91) +J (G90) Starting Point -J (G91) X 423Kreis.FH7 Fig. 4-23: Example: Circular interpolation with interpolation parameters Full circle in the X-Y plane with G90 Y 100 CP = Center Point I=60 [P1] CP J= X 424Voll.FH7 Fig. 4-24: Full circle with G90 NC program: G00 G90 G54 G06 G08 Movement commands, interpolation conditions Starting position, spindle ON Starting point of circle X0 Y0 Z10 S3000 M03 G01 X40 Y37.24 F2000 Z-10 F500 Feed Z axis G02 X40 Y37.24 I60 J60 Full circle in clockwise direction Alternatively: G02 I60 J60 With full circle, without circle end point G00 Z10 Z axis to safety distance M05 Spindle OFF X0 Y0 Return to starting point RET Program end

91 NC Programming Instructions Motion Blocks 4-23 Example: Full circle in the X-Y plane with G91 Y 100 I=20 CP = Center Point CP J= [P1] X 425g90.FH7 Fig. 4-25: Full circle with G91 NC program: G00 G90 G54 G06 G08 Movement commands, interpolation conditions Starting position, spindle ON Starting point of circle in chain dimension X0 Y0 Z10 S3000 M03 G91 G01 X40 Y37.24 F2000 Z-20 F500 Feed Z axis G02 X0 Y0 I20 J22.76 Full circle in clockwise direction Alternatively: G02 I20 J22.76 With full circle, without circle end point G00 G90 Z10 Z axis to safety distance (G90) M05 Spindle OFF X0 Y0 Return to starting point RET Program end Example: Machining on a lathe in Z-X plane Ø X 200 CP = Circle Center Point 160 [P5] [P4] +K KM 120 +I 80 [P3] [P2] [P1] Z 426Dreh.FH7 Fig. 4-26: Circular programming for lathe, behind center of rotation

92 4-24 Motion Blocks NC Programming Instructions Example of programming using absolute dimension input (G90) G00 G16 G90 G54 G06 G08 M03 S2000 X69 Z136.5 G01 X40 Z128.5 F500 Z100 G02 X160 Z60 I160 K100 G01 Z10 G00 X200 M05 RET Movement commands, interpolation conditions Spindle ON [P1] Starting position [P2] linear interpolation [P3] circle starting point [P4] ¼ circle in clockwise direction [P5] machining end position X axis to safety distance Spindle OFF Program end Example of programming using incremental dimension input (G91): G00 G16 G90 G54 G06 G08 Movement commands, interpolation conditions M03 S2000 Spindle ON X69 Z136.5 [P1] Starting position G01 G91 X11 Z-8 F500 [P2] linear interpolation Z-28.5 [P3] circle starting point G02 X40 Z-40 I40 K0 [P4] ¼ circle in clockwise direction G01 Z-50 [P5] machining end position G90 G00 X200 X axis to safety distance M05 Spindle OFF RET Program end Circle Radius Programming In order to take over dimensions directly from the workpiece drawings, an option is provided to directly define circular paths in the NC program via the specified radius. A distinct circular path is produced within a semicircle (180 ) only if G02 or G03 programming is used (see Fig. "Circle radius programming, determining the sign to be used for the radius"). For this reason, it is important to indicate whether the traveling angle will be greater or less than 180. The radius entry must be preceded by a minus sign for arcs with angles exceeding 180. Syntax for circle radius G02 R+... with a traveling angle to 180 programming in the G17 plane X... Y... G03 R-... with a traveling angle > 180

93 NC Programming Instructions Motion Blocks 4-25 Example: Defining the arc Ø X 100 R= [S] [E] R= Z 427Kvor.FH7 Fig. 4-27: Circle radius programming, determining the sign to be used for the radius G01 X... Z... G02 X... Z... R±30 As can be seen in the above example, two possibilities would result for this programmed circle. Selecting the sign (R+30 or R-30) determines which circle is traveled. The direction of movement in relation to the circle end point is determined by G02 or G03. Circle radius programming is not permissible with a traveling angle of 0 or 360. The axes will remain at their starting points. If the circle end point is missing, the axis will remain at its starting point. No movement takes place. The programmed radius is active in the current machining plane (plane selection with G17, G18, G19 and free plane selection with G20, G21, G22). Example: Circle radius programming in the Z-X plane Ø X [P5] [P4] 40 Circle Center Point 120 R +I 80 [P3] [P2] [P1] Z 428Dreh.FH7 Fig. 4-28: Circle radius programming on a lathe, behind center of rotation

94 4-26 Motion Blocks NC Programming Instructions NC program: G00 G90 G54 G06 G08 M03 S2000 X69 Z136.5 G01 X40 Z128.5 F500 Z100 G02 X160 Z60 R40 G01 Z10 G00 X200 M05 RET Movement commands, interpolation conditions Spindle ON [P1] Starting position [P2] linear interpolation [P3] circle starting point [P4] ¼ circle in clockwise direction [P5] machining end position X axis to safety distance Spindle OFF Program end Helical Interpolation Helical interpolation is a combined circular and linear interpolation which is used to produce a spiraling tool path. Circular interpolation takes place in the selected plane (plane selection with G17, G18, G19 and free plane selection with G20, G21, G22) while linear interpolation occurs simultaneously in a third axis which is perpendicular to the plane of circular interpolation. In helical interpolation, an arc and a straight line erected perpendicular to the end point of the arc are both programmed in the same NC block. The axis movements are coordinated in such a way that the tool moves at a constant pitch in a helical path. Z Y X 429Schrau.FH7 Fig. 4-29: Helical Interpolation No more than one coil (corresponding to a full circle) can be programmed in an NC block. Programming a corresponding number of individual coils can only produce a number of coils in sequence. The programmed feed rate (F value) relates to the actual tool path. All other conditions are the same as in circular interpolation.

95 NC Programming Instructions Motion Blocks 4-27 Example: Y Helical interpolation in the X-Y plane with G90 X CP = Center Point [P4] I=62.5 [P2] [P1] CP J=30 [P3] [P4] [P1] X Z G90s.FH7 Fig. 4-30: Helical interpolation with G90 Example of programming using absolute dimension input (G90) G00 G90 G54 G06 G08 Movement commands, interpolation conditions X0 Y0 Z10 S5000 M03 Starting position, spindle ON G01 X40 Y20 Z5 F2000 [P1] Z axis to safety distance Z-2,5 Z axis to machining depth X40 Y30 [P2] starting point of half coil G02 X85 Y30 I62.5 J30 Z-5 [P3] helix in clockwise direction G01 X85 Y10 [P4] clear X and Y G00 Z5 Z axis to safety distance M05 Spindle OFF X0 Y0 Z10 Return to starting position RET Program end Example: Helical interpolation in the X-Y plane with G91 Y I=22.5 CP = Center Point [P4] X [P2] [P1] CP [P3] [P4] J=0 [P1] X Z G91s.FH7 Fig. 4-31: Helical interpolation with G91 Example of programming using absolute dimension input (G91) G00 G90 G54 G06 G08 Movement commands, interpolation conditions X0 Y0 Z10 S5000 M03 Starting position, spindle ON G91 G01 X40 Y20 Z-5 F2000 [P1] Z axis to safety distance Z-7.5 Z axis to machining depth Y10 [P2] starting point of half coil G02 X45 I22.5 J0 Z-2.5 [P3] helix in clockwise direction G01 Y-20 [P4] clear X and Y G00 Z10 Z axis to safety distance M05 Spindle OFF X-85 Y-10 Z5 Return to starting position RET Program end

96 4-28 Motion Blocks NC Programming Instructions Thread Cutting "G33" The G33 function "Thread cutting" can be used to cut single or multiple point longitudinal threads, face threads and tapered threads with a constant lead. djhhfdjhjf Thread Lead 1 Thread Pass Longitudinal Thread 432Laeng.FH7 Fig. 4-32: Longitudinal thread Syntax G33 <end point [X,Y,Z]> <lead [I,J,K]> <starting angle [P]> The thread length is the difference between the starting point and the end point that is programmed in NC block G33. The thread entering and exiting path in which the feed rate is accelerated or reduced must be considered. The coordinate values can be programmed using absolute (G90) or incremental (G91) positioning data. The thread lead is entered in address I, J and K; however, no more than one interpolation parameter can be programmed in a single-thread NC block. Interpolation parameters I, J and K are programmed as incremental values without sign. Interpolation parameters I, J and K are assigned to axes X, Y and Z. Via address P, the thread starting angle can be programmed from 0 to 360. By programming a thread starting angle, it is possible to cut multiple coils without shifting the start point. If a starting angle is not programmed via address P, it is assumed that the starting angle is 0. Clockwise or counterclockwise threads are produced by defining the direction of rotation of the spindle: M03 or M04. If G33 is used to select a different spindle for thread cutting, the spindle must be activated by means of the "SPF <spindle number>" command prior to NC block G33. The first spindle is always active in the power-on state. The spindle must start at the desired speed prior to or in the G33 NC block. In any case, positioning without lag G06 must always be used for thread cutting in conjunction with G33 since this function has a positive influence on the thread quality. G33 belongs to the group of blockwise active G codes. G33 does not remain active at the end of an NC block. The thread is cut from the current starting point up to the programmed end point of the NC block, while movements are possible in several axes (tapered threads). No more than 500 threads can be cut per thread NC block. If more than 500 threads are required, these can be machined using thread NC block sequences. The maximum spindle speed in a thread NC block is 13,500 rpm. The required approach distance increases as the spindle speed and thread lead increases.

97 NC Programming Instructions Motion Blocks 4-29 While thread cutting, the constant surface speed G96 is ignored via G33. The spindle speed which was programmed last via G97 is set. If the thread is cut using positioning with minimized lag G06, the spindle speed can be changed during thread cutting by using spindle override, though this can negatively affect quality. The feed rate will adapt accordingly. Feed rate override will not be active. In the case of an immediate stop (emergency stop, stop in setup mode), the spindle speed and the feed rate are synchronously reduced and are synchronously increased upon a restart. For taper threads, the thread lead is declared in relation to the main axis. If the desired thread lead is to relate to the Z axis, then the thread lead must be defined in interpolation parameter K. The thread lead is programmed in interpolation parameter I if the thread lead relates to the X axis. When lathing face threads, the thread lead is interpreted as a radius dimension when programming the diameter. Depending on the parameter setting, the thread lead can be entered using 3 or 4 places to the left of the decimal point and, correspondingly, 5 or 4 places to the right of the decimal point. Note: Function G33 is available only if APRB04 (axis processor) is present. Example: NC program for longitudinal thread X [P4] [P3] [P6] [P1] [P2] [P5] Z 433GLaeng.FH7 Fig. 4-33: Thread cutting longitudinal thread Thread lead: 3 mm Thread depth: 4 mm Thread depth per cut: 2 mm NC program: G00 G54 G90 G06 G08 X80 Z130 S2000 M03 [P1] Starting conditions G01 X45.5 F1500 [P2] Feed for first cut G33 Z30 K3 P180 [P3] 1 st thread pass G00 X80 [P4] Withdraw X axis Z130 [P1] Starting point G01 X43.5 F1500 [P5] Feed for 2 nd cut G33 Z30 K3 P180 [P6] Second thread pass G00 X80 [P4] Withdraw X axis M05 Spindle OFF RET Program end

98 4-30 Motion Blocks NC Programming Instructions Example: NC program for taper thread X 100 [P4] 105mm [P1] 80 [P3] Lead 60 [P6] mm [P2] [P5] 47.5mm Z 434GKeg.FH7 Fig. 4-34: Thread cutting - taper thread Thread lead: Thread depth: NC program: G00 G54 G90 G06 G08 X100 Z130 S2000 M03 G01 X39.89 F1500 G33 X71.99 Z25 K2.5 P90 G00 X100 Z130 G01 X38.39 F1500 G33 X70.49 Z25 K2.5 P90 G00 X100 M05 RET 2.5 mm 3 mm Thread depth per cut: 1.5 mm [P1] Starting conditions [P2] Feed for 1 st cut [P3] 1 st thread thru hole [P4] Withdraw X axis [P1] Starting point [P5] Feed for 2 nd cut [P6] 2 nd thread pass [P4] Withdraw X axis Spindle OFF Program end P5 = = 44.5 P5 = ( 10 TAN17 ) = P6 = ( 105 TAN17 ) = P2 = = 46 P2 = 46-2 ( 10 TAN17 ) = P3 = ( 105 TAN17 ) = Fig. 4-35: Calculation of thread starting and end point coordinates for X axis:

99 NC Programming Instructions Motion Blocks 4-31 Example: X 100 NC program for face thread [P6] [P3] [P4] [P5] [P2] [P1] Z 435GPlan.FH7 Fig. 4-36: Thread cutting - face thread Thread lead: Thread depth: 2 mm 3 mm Thread depth per cut: 1.5 mm NC program: G00 G54 G90 G06 G08 X27.5 Z100 S2500 M03 [P1] Starting conditions G01 Z78 F1500 [P2] Feed for 1 st cut G33 X72.5 I2 P180 [P3] 1 st thread thru hole G00 Z100 [P4] Withdraw Z axis X27.5 [P1] Starting point G01 Z76.5 F1500 [P5] Feed for 2 nd cut G33 X72.5 I2 P180 [P6] 2 nd thread pass G00 Z100 [P4] Withdraw Z axis M05 Spindle OFF RET Program end

100 4-32 Motion Blocks NC Programming Instructions Thread Sequences with "G33" Function G33 Thread cutting can be used to program consecutive chains of thread-cutting NC blocks containing different leads. A thread sequence can consist of single- or multiple-thread longitudinal threads, face threads, or taper threads in any desired order, provided that the lead during each segment of the thread remains constant. Longitudinal Thread Thread Lead 1 Thread Pass 2. Segment 1. Segment 436Laeng2.FH7 Fig. 4-37: Longitudinal threads with 2 pieces with different leads Syntax G33 <end point [X,Y,Z]> <lead [I,J,K]> <starting angle [P]> G33 <end point [X,Y,Z]> <lead [I,J,K]> Thread sequences are programmed as consecutive series of thread-cutting NC blocks. A transition distance is calculated between two threadcutting NC blocks for each axis experiencing a velocity change. The velocity change is performed at the maximum permissible acceleration, so that transition parabolas result. G08 contouring mode (velocity-optimal NC block transition) must be active during thread-cutting sequences. G06 positioning with minimized lag should be activated to ensure that the transition parabola between the thread NC blocks are as small as possible. No function may be programmed between and in the individual thread blocks of a thread sequence, which would interrupt block preparations (such as auxiliary functions, computations, etc.). If the "Single-block" operating mode is active, each thread-cutting NC block is processed individually. In this case, a new starting distance is required for each thread-cutting NC block. Thus, thread-cutting sequences are not possible in the "Single-block" operating mode. All other conditions are the same as in thread cutting.

101 NC Programming Instructions Motion Blocks 4-33 Example: NC program for thread-cutting sequences X [P6] [P1] 40 [P5] [P4] 20 [P10] 3rd Section [P9] 2nd Section [P3] [P8] 1st Section [P2] [P7] Z 437GKett.FH7 Fig. 4-38: Thread-cutting sequences Thread lead: Thread depth: 1: 3 mm 2: 5 mm 3: 1 mm 4 mm Thread depth per cut: 2 mm NC program: G00 G54 G90 G06 G08 X60 Z135 S2000 M03 [P1] Starting conditions G01 X23 F1500 [P2] Feed for first cut G33 Z90 K3 P180 [P3] 1 st thread segment / 1 st pass G33 X38 Z50 K5 [P4] 2 nd thread segment / 1 st pass G33 Z10 K1 [P5] 3 rd thread segment / 1 st pass G00 X60 [P6] Withdraw X axis Z135 [P1] Starting point G01 X21 F1500 [P7] Feed for 2 nd cut G33 Z90 K3 P180 [P8] 1 st thread segment / 2 nd pass G33 X36 Z50 K5 [P9] 2 nd thread segment / 2 nd pass G33 Z10 K1 [P10] 3 rd thread segment / 2 nd pass G00 X60 [P6] Withdraw X axis M05 Spindle OFF RET Program end

102 4-34 Motion Blocks NC Programming Instructions Tapping without Compensating Chuck "G63" / "G64" With function G63, threads can be tapped without a compensating chuck. In thread tapping without a compensating chuck, not only is the spindle speed controlled (as would be the case in normal tapping), but also the spindle alignment. The spindle rotation and the feed movement of the axis, which is programmed together with G63, are linearly interpolated. A main spindle, which can be positioned, is required for tapping without a compensating chuck. The spindle must be driven directly (slip); the position encoder should be located directly on the spindle. The CNC supplies two path conditions for tapping without a compensating chuck. These functions are active only for the duration of the NC block containing them. G63 - Spindle stops at the end of movement G64 - Spindle continues to rotate after the end of movement. Functions G63 and G64 differ only regarding the end of movement. Syntax G63 <end point [X,Y,Z]> <feed per spindle revolution [F]> G64 <end point [X,Y,Z]> <feed per spindle revolution [F]> Two cases are possible when the feed/spindle link is established: The spindle is not turning (n=0) The spindle is already rotating (n=s) If the spindle is not turning when the feed/spindle link is established, the link can be activated at the start of the common acceleration phase so that the spindle and the feed axis are already accelerating in an interpolating way. The selected acceleration focuses on the weakest axis (main spindle or feed axis). If the spindle is already rotating when the feed/spindle link is established, the feed axis accelerates to the required speed at its maximum acceleration; then the link is activated, so that the main spindle and the feed axis do not interpolate until the constant-speed range is reached. Clockwise or counterclockwise thread tapping is achieved by declaring the direction of rotation of the spindle: M03 or M04. If a different spindle is to be selected for thread tapping using G63/64, the spindle must be activated by means of the SPF <spindle number> command prior to NC block G63. The first spindle is always active in the power-on state. Tapping should be performed using function G06 "Positioning without lag". If G06 is not active with tapping without a compensating chuck or if analog axis cards are installed, the same gain factor must be set for the spindle and for the feed axis for G63/G64. Functions G08 (Velocity-optimal NC block transition) and G61 (Exact stop) are meaningless for tapping. A main spindle which is stopped at the end of the movement (G63) can be reactivated using spindle control commands M03/M04 and by programming the speed value (S value). If the tap is turned out of the thread using G64, the spindle stops briefly at the end point of the NC block in order to change from position-controlled to speed-controlled mode. Except for dwell time G04 and the auxiliary functions, no NC commands can be programmed between the G63 command Tap to depth <X, Y or Z> and the G63/G64 command Withdraw tap.

103 NC Programming Instructions Motion Blocks 4-35 With digital drives, if the spindle is activated prior to the NC block containing G63 tapping, the spindle will stop briefly in the G63 NC block in order to switch from speed-controlled mode to position-controlled mode. The lead factor feed per spindle revolution must be programmed in a single NC block containing G63 and G64 by using the F word. Depending on the parameter setting, the thread lead can be entered using 3 or 4 places to the left of the decimal point and, correspondingly, 5 or 4 places to the right of the decimal point. Example: NC program - tapping with G63 Y X [P2] [P3] [P3] [P4] [P1] [P4] [P1] [P2] X Z 438g63.FH7 Fig. 4-39: Tapping with G63 NC program using G63: Spindle stopped at the beginning of the NC block G63 Spindle stopped upon terminated movement G00 G54 G90 G06 G08 X0 Y0 Z10 Movement commands, interpolation conditions G01 X40 Y50 F2000 [P1] 1 st tapping position BSR.GEBO Branch to tapping subroutine Y80 [P2] 2 nd tapping position BSR.GEBO Branch to tapping subroutine X90 [P3] 3 rd tapping position BSR.GEBO Branch to tapping subroutine Y50 [P4] 4 th tapping position BSR.GEBO Branch to tapping subroutine G00 X0 Y0 Return to starting point RET Program end.gebo Tapping subroutine G63 Z-7.5 F2 S500 M03 Tap to depth Z G63 Z10 F2 S750 M04 Withdraw tap RTS End subroutine

104 4-36 Motion Blocks NC Programming Instructions Spindle is already turning at the start of the G63 block Spindle comes to a stop when movement stops G00 G54 G90 G06 G08 X0 Y0 Z10 Motion commands, interpolation conditions G01 X40 Y50 F2000 M03 S1000 [P1] 1st tapping position, spindle ON BSR.GEBO Branch to tapping subroutine Y80 M03 S1000 [P2] 2nd tapping pos., spindle ON BSR.GEBO Branch to tapping subroutine X90 M03 S1000 [P3] 3 rd tapping position, spindle ON BSR.GEBO Branch to tapping subroutine Y50 M03 S1000 [P4] 4 th tapping position, spindle ON BSR.GEBO Branch to tapping subroutine G00 X0 Y0 Return to starting point RET Program end.gebo Tapping subroutine G63 Z-7.5 F2 Tap to depth Z G63 Z10 F2 S750 M04 Withdraw tap RTS End subroutine Example: NC program - tapping with G63 and G64 Y X [P2] [P3] [P4] [P3] [P1] [P4] [P2] [P1] X Z 439G634.FH7 Fig. 4-40: Tapping with G63 and G64 NC program using G63 and G64: Spindle is stopped at the beginning of the NC block G63 Spindle continues to rotate upon the end of movement G00 G54 G90 G06 G08 X0 Y0 Z10 Movement commands, interpolation conditions G01 X40 Y50 F2000 [P1] 1 st tapping position BSR.GEBO Branch to tapping subroutine X55 Y80 [P2] 2 nd tapping position BSR.GEBO Branch to tapping subroutine X75 [P3] 3 rd tapping position BSR.GEBO Branch to tapping subroutine X90 Y50 [P4] 4 th tapping position BSR.GEBO Branch to tapping subroutine M05 Spindle OFF G00 X0 Y0 Return to starting point RET Program end.gebo Tapping subroutine G63 Z-7.5 F2 S1000 M03 Tap to depth Z G64 Z10 F2 S800 M04 Withdraw tap RTS End subroutine

105 NC Programming Instructions Motion Blocks 4-37 Tapping "G64" - Speed Reduction Spindle already rotates at the beginning of the NC block G63 Spindle continues to turn after the end of the movement G00 G54 G90 G06 G08 X0 Y0 Z10 Movement commands, interpolation conditions G01 X40 Y50 F2000 M03 S1000 [P1] 1 st tapping position, spindle ON BSR.GEBO Branch to tapping subroutine X55 Y80 M03 S1000 [P2] 2nd tapping pos., spindle ON BSR.GEBO Branch to tapping subroutine X75 M03 S1000 [P3] 3 rd tapping position, spindle ON BSR.GEBO Branch to tapping subroutine X90 Y50 M03 S1000 [P4] 4 th tapping position, spindle ON BSR.GEBO Branch to tapping subroutine M05 Spindle OFF G00 X0 Y0 Return to starting point RET Program end.gebo Tapping subroutine G63 Z-7.5 F2 Tap to depth Z G64 Z10 F2 S800 M04 Withdraw tap RTS End subroutine G64 with running spindle and short thread If the thread length does not permit tapping at the programmed tapping speed because the feed rate of the feed axis cannot be accelerated to the required speed due to the length of the thread, the spindle speed is reduced before the feed axis is started. Spindle speed or feed rate Spindle speed Feed rate Synchronous phase Spindle speed = feed rate Time t 440G64Vor.FH7 Fig. 4-41: Feed rate and spindle speed, tapping with G64

106 4-38 Motion Blocks NC Programming Instructions Tapping "G65" - Spindle as Lead Axis Function G65 can be used to tap threads with main spindles which can be positioned but cannot be interpolated under position control. In addition, G65 is used on main spindles which are driven indirectly and in cases where the position encoders are not located directly on the spindle. A compensating chuck is usually used for tapping via G65. The feed distance, which is programmed in conjunction with G65, is dependent on the main spindle position. However, because of the system-related delay, the feed will always lag behind the main spindle. This delay is twice as long when there is a change of the direction of rotation. It is always preferable to use the G63/G64 functions for tapping without a compensating chuck. Syntax M05 G65 <feed distance per spindle rotation [F]> Spindle STOP Activate tapping Example: NC program - tapping with G65 M05 Spindle STOP G65 F2 Activate tapping S500 M03 Speed and direction rotation Z-10 Tap to depth Z Z10 S800 M04 Withdraw tap A main spindle which can be positioned is required for tapping function G65. The M05 main spindle must be stopped before G65 (tapping) is activated. When G65 is active, it is not possible to traverse using G00; no circular and helical interpolation G02/G03 is performed, and no axis referencing G74 is executed. Feed functions relating to the NC block transitions (G08, G09, G61, G62) are suppressed. Axis movements may not be programmed in a G65 NC block. The spindle must be activated after the G65 block, while the direction of tapping (clockwise or counterclockwise), is given by the spindle direction of rotation M03 or M04. The spindle remains inactive unless it is activated by a movement command of a main axis. The linking factor Feed per spindle revolution must be programmed in a single NC block containing G65 by using the F word. Tapping should be performed using the G06 function "Positioning without lag". With main spindles, which are driven directly and in which the position encoder is located directly on the spindle, the G65 function can also be used to tap threads without using a compensating chuck, provided the speed is moderate. If G65 is used to select a different spindle for tapping, the spindle must be activated by means of the "SPF <spindle number>" command prior to NC block G65. The first spindle is always active in the power-on state. G65 is superimposed by G93 or overwritten by G94 or G95, which automatically stops the spindle. Depending on the parameter setting, the thread lead can be entered using 3 or 4 places to the left of the decimal point and, correspondingly, 5 or 4 places to the right of the decimal point.

107 NC Programming Instructions Motion Blocks 4-39 Note: If G65 is active, only the linear main axes, X, Y and Z may be programmed. Other axis letters will result in an error message. Using G65 together with the APR function (digital SERCOS drives) while a KSR (combined spindle-turret axis) is used is not possible. Y X [P2] [P3] [P4] [P3] [P1] [P4] [P2] [P1] X Z 441G65.FH7 Fig. 4-42: Example: Tapping with G65 NC program - tapping with G65 NC program using G65: G00 G54 G90 G06 G08 X0 Y0 Z10 G01 X40 Y50 F2000 BSR.GEBO X55 Y80 BSR.GEBO X75 BSR.GEBO X90 Y50 BSR.GEBO M05 G00 X0 Y0 RET.GEBO M05 G65 F2 S500 M03 Z-7.5 Z10 S400 M04 G94 RTS Motion commands, interpolation conditions [P1] 1 st tapping position Branch to tapping subroutine [P2] 2 nd tapping position Branch to tapping subroutine [P3] 3 rd tapping position Branch to tapping subroutine [P4] 4 th tapping position Branch to tapping subroutine Spindle OFF Return to starting point Program end Tapping subroutine Spindle STOP Activate tapping Speed and direction rotation Tap to depth Z Withdraw tap Cancel G65 End subroutine

108 4-40 Motion Blocks NC Programming Instructions 4.4 feed F Word The feed rate in an NC program is expressed by a feed, which uses the address letter F and a feed rate, which is stated directly as a constant or by means of an expression. The programmed feed rate determines the processing speed for each type of interpolation. The feed rate is restricted so that the limits entered in the parameters are not exceeded. If the F word is programmed in conjunction with a function, the meaning can change. The corresponding type of operation is defined in the corresponding functions (G00, G04, G93, G95). Syntax F<constant> F1000 F<expression> F=@50 If the F word is programmed as the feed rate, it becomes the desired value for the machining speed. The F word interacts with the associated G code as follows: Meaning G code Active Format Remarks Speed programming G94 modal 6 5 before decimal point 1 2 after decimal point Cancelled by G95, G96 or G64. The most recent G94 F value is reactivated the next time G94 is requested. Feed per revolution G95 modal 4 3 before decimal point G63, G64 blockwise after decimal point 4 5 Canceled by G94. If G95 is repeated, the most recent G95 F value is reactivated. The F value is reactivated if G63, G64 are renewed. This has no effect on the F values of G94. G65 modal Condition as with G95! Time in seconds G04 blockwise Time programming G93 blockwise 3 2 Superimposed with F words that were programmed by G94/G (Overlay, no influence!) If the F word appears alone in the NC block, it is assigned to the memory of the modally active conditions of the feed-specified group. If the F word appears in an NC block together with one of these functions, the corresponding feed is activated first, and then the F value is placed in the appropriate memory. If G94 is active (feed rate programming), the units mm/min. or inch/min. are used for the feed rate. With G63, G64, G65 (tapping), and G95 (feed per revolution), the unit used for the feed rate is mm/spindle revolution or inches/spindle revolution. With G04 (dwell time) and with G93 (time programming), the time in seconds is entered in the F word. The programmed feed rate can be changed via the feed rate override from 0% to 255%. The 100% position corresponds to the programmed value. The feed values are reset after the controller has been powered on, the program is loaded into the controller, or after a BST, RET, or control-reset. At the beginning of an NC program, the feed values must be programmed before or together with the first movement command.

109 NC Programming Instructions Motion Blocks 4-41 Note: The maximum path and axis speed are defined by the machine builder in the axis parameters. Time Programming "G93" The machining time for a programmed path can be defined by the feed rate function G93 (Time programming). The machining time is determined via the F word. With the specified machining time, the controller calculates the required path velocity depending on the limit values. Syntax G93 F<time in seconds> G93 is active on an NC blockwise basis and must be programmed in combination with an F word. In the programmed NC block, G93 superimposes G94 or G95. The F value which is programmed with G93 does not affect the F values that were programmed with G94 or G95. The F value programmed together with G93 can be programmed with five digits to the left and two digits to the right of the decimal point. Example: NC program using G93 Y [P4] X 100 [P3] [P4] [P2] [P1] [P1] X Z g012.FH7 Fig. 4-43: Linear interpolation, G01 with 2 axes and time programming NC program: G00 G90 G54 G06 G08 X0 Y0 Z10 S3000 M03 G93 G01 X26.26 Y18 Z5 F0.97 G93 Z-5 F0.3 G93 Y80 F1.86 G93 X41 Y93.5 F0.6 G93 X111 F2.1 G00 Z10 M05 RET Motion commands, interpolation conditions Starting position, spindle ON [P1] Starting position, time programming Feed Z axis [P2] linear interpolation, 1 axis [P3] linear interpolation, 2 axes [P4] linear interpolation, 1 axis Z axis to safety distance Program end

110 4-42 Motion Blocks NC Programming Instructions Velocity Programming "G94" Syntax G94 F<feed rate in mm/min> G94 F<feed rate in inch/min> Feed Rate per Spindle Revolution "G95" With function G94 "Velocity programming", the programmed F word is interpreted as feed in mm/min. G94 is the power-on state of the CNC. The feed distance is programmed for linear axes in the active unit (mm/inch). The feed distance with rotary axes is programmed in units of the feed constant, which is programmed in the axis parameters. Depending on the settings in the process parameters, G94 may be the power-on default. G94 is modally active and is canceled by G95, G96, or G65. After the controller is turned on, after an NC program is loaded, or when a BST, RET or a control-reset is executed, G94 is set automatically depending on the setting in the process parameter, and the feed values (F values) are reset. The special requirements that apply to the path feed rate depending on the nominal radii when machining with the C axis are described in section "Rotary Axis Programming". The F value that was programmed together with G94 can be programmed with 6 digits before and with 1 digit behind the decimal point, or with 5 digits before and 2 digits behind the decimal point. Function G95 "Input feed rate in inches or mm per spindle revolution" causes the programmed F word to be interpreted in mm or inches per spindle revolution. The contour feed rate depends on the value of the actual spindle speed. If a position encoder is not located on the main spindle, the contour feed rate depends on the spindle speed command value. Syntax G95 F<input feed rate in inches or mm per spindle revolution> G95 "Feed per revolution" remains modally active until it is canceled by G94 or G65, or until a reset is performed at the end of the program (RET), or an automatic reset is performed via BST. G93 (Time programming) superimposes G95. In the power-on state, G95 always applies to the first spindle. If G95 is to be based on a different spindle, the desired spindle must be selected prior to the G95 NC block by using the SPF <Spindle number> command. Depending on the settings in the process parameters, G95 may be the power-on default. G95 (Input feed rate in inches or mm per spindle revolution) remains modally active until it is canceled by G94 or G65. G93 (Time programming) superimposes G95. After the controller is turned on, after an NC program is loaded, or when a BST, RET or a control-reset is executed, G95 is set automatically depending on the setting in the process parameter, and the feed values (F values) are reset. G95 is automatically activated upon the selection of G96. If G95 was not previously active, an error message is issued because of the missing F value. If G95 is active, axis movements which were generated via G01, G02 or G03 are not performed unless the spindle is turning. Axis movements in rapid traverse (G00) superimpose G95 with G94 and are performed at the feed rate entered in the parameters or at the feed rate programmed with G00 in the NC block.

111 NC Programming Instructions Motion Blocks 4-43 Programmed axis movements occurring when the spindle is off or with S0 prevent further program execution and result in an error message. The programmed F values for the functions G94 and G95 do not interact with one another. The spindle override affects the spindle speed and the feed rate when G95 is active. The F value that was programmed together with G95 can be programmed with 4 digits before and 4 digits after the decimal point, or with 3 digits before and 5 digits after the decimal point. Dwell Time "G04" Syntax The function G04 "Dwell time" can be used to program a delay time in the NC program for functions such as relief cutting, machine control functions, etc. G04 F<time in seconds> G04 is active on an NC block-by-block basis and must be programmed in combination with an F word. The F word will then correspond to a dwell time in seconds. The maximum directly programmed dwell time is seconds (16.7 minutes) and the maximum resolution is 0.01 seconds. The F value programmed together with G04 can be programmed with three digits before and two digits after the decimal point. Only functions M, S, and Q can be programmed in a dwell time-programmed NC block. The dwell time programmed in the F value using G04 does not affect the modally active F values (feed rate). The F value programmed together with G04 can be programmed with 3 digits to the left and 2 digits to the right of the decimal point. Example: NC program - with G04 Movement commands, interpolation con- Starting position, spindle ON Delay of 3.5 sec for spindle ramp-up Machining Program end G00 G90 G54 G06 G08 ditions X0 Y0 Z10 S3000 M03 G04 F3.5 G01 X26.26 Y18 Z5 F2000. RET

112 4-44 Motion Blocks NC Programming Instructions Basic Connections between Programmed Path Velocity (F) and Axis Velocities Under interpolation conditions, the CNC computes the path velocity as follows: Calculating the path velocity F ( A& R ) 2 + ( B& R ) 2 + ( C R ) = X& + Y& + Z& + & X Y Z Fig. 4-44: Example: Calculating the path velocity Path velocity for thread cutting Lead P dkkfgjkd C R z = V C Z=V z F X= V x Velocitiy in X direction Y= V Y Velocity in Y direction Z= V Z Velocity in Z direction A = Angle velocity of the rotary axis A B = Angle velocity of the rotary axis B C = Angle velocity of the rotary axis C F = Path velocity Rx = Radius of the axis in X direction Ry = Radius of the axis in Y direction Rz = Radius of the axis in Z direction 443Schneid.FH7 Fig. 4-45: Path velocity for thread cutting In this example, the following equation results from computing the path velocity: F 2 = Z& + & ( C ) 2 R Z Fig. 4-46: Example - path velocity calculation Basically, two possibilities to program the F value can be considered. Without R Z The CNC interprets the F value as a velocity in the direction Z. NC program: G01 Z... C... F... Computation: n w: Velocity P: Thread pitch Fig. 4-47: F value as velocity F = & 2 Z = P n W

113 NC Programming Instructions Motion Blocks 4-45 Effect: Z C = V c F = V z = Z 444VorO.FH7 Fig. 4-48: Feed velocity (F) without R Z Here, the C axis is interpolated simultaneously. With R Z The CNC interprets the F value as the resulting path velocity. NC program: G01 Z... C... RZ... F... Computation: F = mit und Z& F = 2 + P ( C& R ) Z Z Z& = P nw C& R = 2π R Z n W 2 ( 2π RZ ) nw Fig. 4-49: F value as resulting path velocity Effect: Z = V z C = V c F 445VorM.FH7 Fig. 4-50: Feed velocity (F) with R Z

114 4-46 Motion Blocks NC Programming Instructions Feed Limitation Besides the maximum axis velocity that is defined in axis parameter Cxx.016, the axis velocity can be limited with another dimension during machining. v Max. Axis Speed (Parameter) Safety-Technical Axis Speed max_achsgeschw.fh7 Fig. 4-51: Axis velocity limits The safety-related axis velocity allows the machine builder to, for example, reduce the maximum allowable axis velocity (and thus the path velocity) while machining a heavy workpiece or to open the guard door. Machine Data The safety-related axis velocity is axis-specifically adjustable in the machine data, page 11. STRUCT 11 Feed-velocity limitation Safety velocity limit active BOOL NoNC,NoPLC,NoBOF,NoPwBOF Max. safety-rel. velocity VELO NC,PLC,BOF,PwBOF END_STRUCT ARRAY [ Axis No. IP_AXIS 1-12 ] OF STRUCT Machine data element "Max. safety velocity (PLC)" can be modified in the NC program and in the PLC by the machine builder. Element "Safety velocity limit active", which is intended to visualize the PLC interface signal, can only be accessed in read mode PLC Interface Signal AxxC.SPEED AxxS.SPEED The axis control signal activates safety-related velocity limiting. The axis status signal is set as soon as safety-related velocity limiting is active.

115 NC Programming Instructions Motion Blocks 4-47 Boundary conditions Adaptive Feed Control "G25" / "G26" A set-up engineer can change the safety-related axis velocity in the machine data only if he has the correct password and no NC program is active at the time. The safety-related axis velocity can be modified from the PLC at any time via MTD_WR. For all axes of a process, it is possible to program a safety-related axis velocity within an NC block via the MTD command. With the assistance of the axis-specific control signal "AxxC.SPEED", the PLC can turn the monitoring of the safety-technical axis velocity on and off. The user can identify the effectiveness of the safety-technical axis velocity in the machine data via data element "Safety velocity limit active". After the PLC interface signal has been set, the safety-related axis velocity will take effect in the next NC block or after an immediate stop. A change of the safety-related axis velocity becomes active in the next NC block or when an emergency stop occurs. With each change of the limits, the PLC status signal is set to "0" for a PLC cycle. The NC does not consider any changes of the desired value which have been caused by the feed override. Adaptive feed control permits the change of the feed velocity of an axis or the path velocity of the interpolating axes depending on the motor current/torque of a spindle or a feed axis, so that (when milling, lathing or grinding) the machining power or the machining volume is kept constant. This provides the following: a better surface quality, a shorter processing time, and in particular, a higher safety level against over-stressing the tool, the workpiece and the machine. The function is activated with parameter Bxx.062. The feed control parameters are provided in machine page 30. Boundary conditions Adaptive feed control can be utilized in conjunction with digital spindles / feed axes with SERCOS Interface. All axes and spindles involved in adaptive feed control must belong to a process. This means the reference axis must also belong to the process of which the feed of the path is to be controlled. Furthermore, all axes and spindles involved in adaptive feed control (incl. all feed axes involved in the interpolation) must be based on an APR. (The CPU informs the APR to which axes the distribution of the internal override is to be performed.) Adaptive feed control can not be used with the following functions: - Homing (G74), - Feed to positive stop (G75). Furthermore, adaptive feed control is available only in the operating modes automatic, semi-automatic and MDI.

116 4-48 Motion Blocks NC Programming Instructions The NC automatically cancels adaptive feed control (and sets G25) in the case of a control reset as well as at the program end. Syntax G25 G26 Parameters Adaptive feed control OFF (default) Adaptive feed control ON If the machine builder answers process parameter Bxx.062 "Adaptive feed control" with "Yes", then further process parameters appear as follows: Bxx.063 Reference axis for adaptive feed control Bxx.064 Command machining torque Bxx.065 Minimum machining torque Bxx.066 Maximum idling torque Bxx.067 Maximum feed reduction Bxx.068 Amplification Bxx.069 Measuring period Machine Parameters The process-specific page "Adaptive feed control" (page 30) has the following structure: Fig. 4-52: Structure of machine data page 30 MPage30.bmp

117 NC Programming Instructions Motion Blocks 4-49 Idle Thrust Measurement "ITM" The ITM (Idle Thrust Measurement) command is used for measuring the idling torque of a reference axis defined according to its axis significance in process parameter Bxx.063 Reference axis for adaptive feed control or in the machine data. Syntax ITM The ITM command may be carried out together with G26 Switch on adaptive feed control at the beginning of the machining process as well as independent of adaptive feed control (G26). The measured idling torque is stored in machine data page 30 of machine data element 005 Current idling torque and in AXD parameter P Measured idling torque. PLC Interface Signals Two new PLC interface signals were implemented for the function "Adaptive feed control". These are used to evaluate the measuring results. PxxS.THMIS Thrust Missing depends on process parameter Bxx.065 and PxxS.EXCTH Excessive Thrust depends on process parameter Bxx.064. Thrust Missing Type Description Meaning Updating Method of operation Process status signal PxxS.THMIS (THrust MISsing) PxxS.THMIS = 1: The machining torque has not exceeded the preselected minimum machining torque Bxx.065 during machining. PxxS.THMIS = 0: The machining torque has exceeded the preselected minimum machining torque Bxx.065 during machining. The NC updates the interface signal by turning adaptive feed control on (G26) and off (G25). The NC resets this signal at the program end as well as after a control reset. If the machining torque does not exceed adaptive feed control Bxx.065 during machining with adaptive feed control active, the NC reports this as soon as adaptive feed control is turned off by setting interface signal "Thrust Missing" (PxxS.THMIS).

118 4-50 Motion Blocks NC Programming Instructions Excessive Thrust Type Description Meaning Updating Method of operation Process status signal PxxS.EXCTH (EXCessive THrust) PxxS.EXCTH = 1: The current feed reduction exceeds the maximum feed reduction Bxx.067. PxxS.EXCTH = 0: The current feed reduction does not exceed the maximum feed reduction Bxx.067. The NC updates the interface signal by turning adaptive feed control on (G26) and off (G25). The NC resets this signal at the program end as well as after a control reset. If the current feed reduction exceeds the maximum feed reduction Bxx.067 during machining with adaptive feed control active, the NC reports this by setting interface signal "Excessive Thrust" (PxxS.EXCTH). Note: The NC continues machining, regardless whether the current feed reduction exceeds the maximum feed reduction or not. Only if the current feed reduction reaches 100% (meaning the feed velocity = 0 mm/min) and the adjusted maximum feed reduction Bxx.067 or machine data variable 013 is less than 100% does the NC stop the machining process and generate error message 510 "100% feed reduction@axis". Problem of "Inclined Axis" In the case of an "inclined axis without counterforce", a torque for holding the axis in position is required. This holding torque is added as an offset to all torques that have been recorded so far. This results in a distortion of the torques required for adaptive feed control. Note: Adaptive feed control is not possible for a "hanging axis" as the reference axis. Solution The torque offset (standstill torque) required to hold the axis must be eliminated for adaptive feed control. A command is required that records the standstill torque. The standstill torque can be recorded with the following AXD command: APR SERCOS parameter P This refers to the specified reference axis in the parameters or machine data. During adaptive feed control, the standstill torque is taken into account while the torque is being generated.

119 NC Programming Instructions Motion Blocks 4-51 The machine data have been supplemented by two elements: Adpt. feed control active Reference axis Amplification NEW Measuring period of standstill torque NEW Standstill torque Measuring period of idling torque Idling torque Maximum idling torque Current machining torque Peak machining torque Minimum machining torque Limiting machining torque Current feed reduction Peak feed reduction Maximum feed reduction In the case of recording with APR SERCOS command P , a pause for the time specified in machine data parameter "Measuring time standstill torque" occurs and the standstill torque is generated. The torque determined is stored in parameter "Standstill torque". Parameters "Measuring time of standstill torque" and "Standstill torque" have the same unit and rights as "Measuring time of idling torque" and "Idling torque". Parameter Value Assignment The feed adaptation function is controlled by machine data page 30 "Adaptive feed control". If no reference axis (=0) has been yet logged in the machine data page, the following data are used as the parameter basis: <Machine data element> = <Process parameter> 002 Reference axis = Bxx.063 Reference axis for adaptive feed 003 Amplification = Bxx.068 Amplification 004 Measuring duration = Bxx.069 Measuring duration 006 Max. idling torque = Bxx.006 Max. idling torque 009 Min. machining torque = Bxx.065 Min. machining torque 010 Limit machining torque = Bxx.064 Limit machining torque 013 Max. feed reduction = Bxx.067 Max. feed reduction Additional Documentation A detailed description of the function is available under order number "DOC-MTC200-AD*FEED*V19-FK01-EN-P"

120 4-52 Motion Blocks NC Programming Instructions 4.5 Spindle speed S Word for the Spindle Speed Specification The spindle speed in an NC program is expressed by a speed word that uses the address letter S and a speed which is stated directly as a constant or by means of an expression. A spindle code can also be added to the speed word if more spindles are present. The spindle speed is restricted in such a way that the limits entered in the parameters are not exceeded. The S word is interpreted, if spindle speed G97 in rpm is active, as the spindle speed value. G97 is the power-on state of the CNC. The following chapters describe how the S word interacts in conjunction with the various spindle functions (G92, G96, G97, M19). Syntax S<constant> S5000 S<expression> S=@ with enhanced address format: S<index> <constant> S S<index> <expression> S3=@60 The spindle speed value ranges from 0 to the maximum value entered in the spindle parameters. The S value acts with the associated spindle functions as follows: Meaning G / M Code Active Format Remarks Spindle speed in RPM (x = index [1-3]) M19 Mx19 Constant cutting speed Spindle speed limitation Constant grinding wheel circumferential speed G97 with M03/M04 Mx03 / Mx04 modal blockwise 5 before decimal point 2 after decimal point If G97 is programmed after G96 is active, the most recently active speed is taken on as the new speed command value. 3 2 Spindle positioned in degrees G96 modal 5 2 Canceled by G97. G92 Only active with G96. Modally active until G Canceled by G97; the G92 value is reactivated the next time G96 is used. G66 modal 5 2 Canceled by G97/G96 If the S word appears alone in the NC block, it is assigned to the memory of the modally active spindle functions. If the S word appears in an NC block together with one of the spindle functions, the corresponding spindle function is activated first; then the S value is placed into the appropriate memory. Up to 3 spindles can be used in a process. Thus, the spindle index is limited to a value range of 1 to 3. If the spindle index is not declared when there is more than one spindle in the process, the spindle speed specification will then apply to the first spindle. Each spindle has its own memory for the S values. This prevents S values influencing each other. The programmed spindle speed can be changed via the spindle override from 0% to 255%. The 100% position corresponds to the programmed value.

121 NC Programming Instructions Motion Blocks 4-53 The S value can be entered with 5 digits before and 2 digits behind the decimal point. The spindle speed values are reset after the controller has been powered on, the program is loaded into the controller, or after a BST, RET, or control-reset. If the spindle index is not declared when there is more than one spindle in the process, the spindle speed specification will then apply to the first spindle. The direction of rotation of the main spindle is determined by the M function M03 (spindle clockwise) and M04 (spindle counterclockwise). It must be programmed if more than one spindle is present in a process: M103 / M104 for the first spindle, M203 / M204 for the second spindle, and M303 / M304 for the third spindle Each spindle can be requested once in a single NC block. Example: M103 S M203 S M303 S Note: The machine builder specifies the maximum spindle speed in the axis parameters. Select Main Spindle "SPF" If several spindles are being used in a process, certain functions such as G96 (constant surface speed) must be allowed to act on another spindle in addition to the first spindle. Syntax SPF <spindle number> The following functions depend on the selected main spindle: G33 Thread cutting G63/G64 Tapping G65 Tapping; spindle as lead axis G95 Feed per rotation G96 Constant cutting speed The first spindle is always active in the power-on state. If one of the above functions acts on another spindle other than the first spindle, the reference spindle must be selected first using SPF <spindle number>. The reference spindle must be selected at least one NC block prior to one of the above-mentioned function requests. SPF <spindle number> remains modally active until it is overwritten with a different spindle number or is automatically set to the first spindle at the end of the program (RET) or by BST. The programming of the spindle speed G97 in rpm is active for all spindles present in the process. The reference spindle for one of the above-mentioned functions must therefore be reset after G97 has been programmed. SPF <spindle number> may be used only for main spindles that are in the spindle mode. A main spindle which is in the rotary axis mode cannot be selected as a reference spindle. Interrogating the reference spindle with SPF, SPT, or SPC as an operand is possible in a separate NC block.

122 4-54 Motion Blocks NC Programming Instructions = SPF The reference spindle number is programmed in variable 10. Example: NC program - longitudinal thread machining with the 2 nd spindle X [P4] [P3] [P6] [P1] [P2] [P5] Z 446Laeng2.FH7 Fig. 4-53: Thread cutting - longitudinal thread with the 2 nd spindle Thread lead: Thread depth: G00 G54 G90 G06 G08 X80 Z130 SPF 2 S M203 G01 X45.5 F1500 G33 Z30 K3 P180 G00 X80 Z130 G01 X43.5 F1500 G33 Z30 K3 P180 G00 X80 M205 RET 3mm 4mm Thread depth per cut: 2mm [P1] Starting conditions Reference spindle selection Spindle 2 ON [P2] Feed for 1 st cut [P3] 1 st thread thru hole [P4] Withdraw X axis [P1] Starting point [P5] Feed for 2 nd cut [P6] 2 nd thread pass [P4] Withdraw X axis Spindle 2 OFF Program end

123 NC Programming Instructions Motion Blocks 4-55 Constant Grinding Wheel Peripheral Speed (SUG) "G66" With G66, the programmed value in m/s or feet/s invokes a constant grinding wheel peripheral speed with automatic adjustment of the spindle speed to the individual grinding wheel diameters. Syntax Boundary conditions G66 S<constant grinding wheel peripheral speed> G66 is assigned to group 8 of the G code and consequently can be cancelled with G96 or G97. G66 relates to the current spindle. A preceding SPF<spindle number> permits the SUG to be selected for any spindle. After the SUG has been selected with G66, all programmed desired speed values for the addressed spindle are interpreted in all operating modes as m/s or feet/s. The grinding wheel peripheral speed remains in effect until the tool data record is removed from the corresponding spindle or until the spindle is stopped by control-reset in response to PLC signal AxxCSPRST. The required spindle speed is calculated after the SUG has been selected. The corresponding tool data elements of the addressed spindle are used for calculating and monitoring the speed. If SUG is selected with G66, the corresponding spindle must contain a valid tool data record (tool codes 1, 2 and 3 [correction type 3]). Otherwise, an error message will be generated. If SUG is selected with G66, the corresponding length registers for the wheel diameter must be >0; an error message will be generated if this is not the case. A new speed is calculated if a new S value is programmed or if a geometry register which is relevant to the wheel diameter is changed in the next NC block. The data elements of the D correction are currently excluded from the speed calculation. G66 is cancelled via G96 or G97 or BST, RET and M30. Calculation formula: S SUG SUG[ ft / s] 720 S 1 = [min ] π d π [ m / s] 1 = [min ] d AKT[ mm] S: spindle speed [rpm] SUG: Grinding wheel peripheral speed [m/s or feet/s] d Act : Grinding wheel diameter [mm or inch] AKT[ inch] Note: The data elements of the basic tool data "Tool code and representation type" that are necessary for grinding, as well as the selection of SUG with G66, become active only if the label "Grinding" is set in system parameter "Technology".

124 4-56 Motion Blocks NC Programming Instructions Constant Surface Speed "G96" The CNC controller uses function G96 "Constant surface speed" to determine the correct spindle speed to match the current turning diameter. G96 is a typical lathe function; face turning is the most frequent application. The feed axis for G96 is derived from the typical G18 (ZX) axis assignment of a lathe, so that the X axis is defined as the feed axis. If G96 is active, the spindle speed is reciprocal to the distance between the tool tip and the rotating axis, so that the spindle speed increases as the distance becomes smaller. Syntax G96 S<constant surface speed in m/min> With G00 active, the spindle speed is set independently of the current X position to the speed which results at the end of the NC block. G96 remains active; however, the link to the feed movement is temporarily unavailable. The NC block is terminated if the spindle has reached its command speed and the feed axes have reached their end points. G95 is automatically activated if G96 is selected. If G95 was not previously active, an error message is generated because of the missing F value. With very small X values, the spindle speed would become too large; therefore, the spindle speed is limited to the maximum spindle speed set in the parameters. When G96 is active, the S value is interpreted as the surface speed. The spindle speed is calculated based on the relation: vc S = (2 r π ) S: spindle speed [rpm] vc: surface speed [mm/min] r: effective radius [mm], distance to turning axis Fig. 4-54: Calculation of spindle speed In the power-on state, G96 always applies to the first spindle. If G96 is to be based on a different spindle, the desired spindle must be selected prior to the G96 NC block by using the SPF <spindle number> command. Depending on the settings in the process parameters, G96 may be the power-on default. G96 (constant surface speed) remains modally active until it is canceled by G97. After the controller is turned on, or after an NC program is loaded, or when a BST, RET or control reset occurs, G96 is set automatically depending on the setting in the process parameter and the spindle speed values (S values) are reset. If the S value is changed while G96 is active, the S value change must be programmed together with G96. When G96 is active, the maximum spindle speed can be limited by the command "G92 S <spindle speed>". The spindle override is limited to 100% when G96 is active. Reducing the spindle override to less than 100% results in a reduction of the surface speed. If G96 is cancelled by G97, then the most recent active spindle speed is taken on as the new desired spindle speed value. As of version V22, process parameter Bxx.071 "Reference coordinate system for G96" can be used to select the reference system for determining the spindle speed. In the selection of the machine coordinate system as the reference system, the NC takes the active tool length

125 NC Programming Instructions Motion Blocks 4-57 compensation into account, so that the resulting spindle speed refers to the tip of the tool. When the tool coordinate system is activated as the reference system, the active zero offset is also included in the speed calculation. Example: NC program - face turning with G96 X [P5] [P2] [P1] 20 [P6] [P3] [P4] Z 447Plan.FH7 Fig. 4-55: Face turning Spindle Speed Limitation"G92" G00 G54 G90 G06 G08 X72.5 Z100 [P1] Starting conditions S M103 Spindle ON G00 Z78 [P2] Feed for 1 st cut G96 X27.5 S1 400 [P3] 1 st face turning pass G00 Z100 [P4] Withdraw Z axis X72.5 [P1] Starting point G00 Z76.5 [P5] Feed for 2 nd cut G96 X27.5 S1 400 [P6] 2 nd face turning pass G00 Z100 [P4] Withdraw Z axis M105 Spindle OFF RET Program end The function G92 can be used to set an upper spindle speed limitation while G96 is active. The surface speed is kept constant while G96 is active. In the case of face lathing or cutting down to the center of rotation, this can theoretically lead to an infinitely high spindle speed. Due to machining-related reasons, it may be necessary to limit the maximum spindle speed to a value which is smaller than the maximum spindle speed set in the parameters. G92 is used to set a maximum upper limit for the spindle speed while G96 is active. Syntax G92 S<upper spindle speed limit> G92 is active only for the NC block in which it is located. The limit set for the spindle speed remains modally active until it is overwritten with a new speed limit by programming a new G92 or is reset by programming G92 S0. A speed limitation programmed using G92 remains modally active until it is canceled by programming G92 S0 or is automatically reset at the end of the program RET or by BST. Due to the programming of G97, the set spindle speed limit by using G92 becomes inactive. If G96 is reprogrammed it becomes active again. No further functions may be programmed in an NC block containing G92.

126 4-58 Motion Blocks NC Programming Instructions Additional Spindle Speed Limitations Besides the maximum spindle speed for HS operation, which is defined in axis parameter Cxx.049, the maximum spindle speed can be limited during machining via further dimensions. n Max. Machine-Specific RPM (Parameter) Max. Safety-Technical RPM (PLC) Max. Programmable RPM (CNC) Max. RPM for Constant Cutting Speed (G92) max_spindeldreh.fh7 Fig. 4-56: Spindle speed limitations Machine Data The maximum safety-related speed (PLC) and the maximum programmable speed (CNC) are axis-specifically adjusted in page 2 of the machine data. STRUCT 2 Spindle speed limitation Safety speed limit active BOOL NoNC,NoPLC,NoBOF,NoPwBOF Max. safety-rel. speed (PLC) SPEED NoNC,PLC,NoBOF,NoPwBOF Max. technol. speed (CNC) SPEED NC,PLC,BOF,PwBOF END_STRUCT ARRAY [ Axis No. SP_AXIS 1-12 ] OF STRUCT PLC Interface Signal AxxC.SPEED AxxS.SPEED The safety-related speed limitation is activated with the axis control signal. The axis status control signal is set as soon as the speed limitation is active. Boundary conditions A set-up engineer can change the programmable speed in the machine data only if he possesses the special password and if no NC program is presently active. The speed limits can be modified from the PLC at any time via MTD_WR. The speed limit for all spindles of a process can be programmed within an NC block via the MTD command. With the assistance of the axis-specific control signal "AxxC.SPEED", the PLC can turn the monitoring of the speed limits on and off. The user can identify the effectiveness of the speed limits in the machine data via the data element "Safety speed limit active" and via the control signal "AxxS.SPEED". The NC monitors the spindle speed in accordance with the speed limits in speed mode only if the control signal "AxxC.SPEED" is set.

127 NC Programming Instructions Motion Blocks 4-59 Spindle Speed in RPM "G97" Changes of the speed limits as well as the activation and deactivation of the monitoring are immediately taken into account by the NC. With the activation of the main spindle synchronization, the NC computes, considering all transformation ratios and speed limits, the maximum permissible speed of the master spindle. The NC recalculates the maximum speed of the leadscrew each time that the speed limit for the leadscrew or synchronous spindles changes or each time a safety-related speed limit is activated or deactivated. A possible necessary limitation is performed synchronously for all spindles involved in the synchronization. If the actual speed of the spindle lies beyond a speed limit just as the interface signal "Activate limitation" has been activated, then the NC stops the corresponding spindle, taking the smallest maximum speed limit of the other speed limits into account. If a coupling (G33, G63, G64, G65, G95) or main spindle synchronization is active at the moment of activation, the NC will adapt not only the spindle speed but also the path velocity of the feed axes and/or spindles involved in the coupling or synchronization. With each change of the limits, the PLC status signal is set to "0" for a PLC cycle. Changes of the desired speed via spindle override are not considered. Where PLC-controlled spindles are concerned, the limited speed has to be read and transmitted to the external spindle upon each positive edge of this status signal. Safety-Related Speed Limit The safety-related speed limit allows the machine builder, for example, to limit the spindle speed when a new chuck is to be used or if the guard door is to be opened. Programmable Speed Limit The programmable speed limit allows the NC programmer to limit, from a technological point of view, the allowable spindle speed. With function G97 "Spindle speed in RPM", the programmed S value is interpreted in rpm. G97 is the power-on state on the CNC; it remains modally active until it is overwritten by G96. Syntax G97 Depending on the settings in the process parameters, G97 may be the power-on default. G97 Spindle speed in rpm remains modally active until it is canceled by G96. After the controller is turned on, or after an NC program is loaded, or after a BST, RET or control reset, G97 is set automatically depending on the setting in the process parameter and the spindle speed values (S values) are reset. If G96 is cancelled by G97, then the most recent active spindle speed is taken on as the new desired spindle speed value. The programming of G 97 is active for all spindles present in the process. The selection of the reference spindle using SPF must therefore be reset after G 97 has been programmed.

128 4-60 Motion Blocks NC Programming Instructions 4.6 Rotary Axis Programming Effective Radii "RX", "RY", "RZ" With all interpolation movements using G00 and G01, the components of the local vector are assumed constant during an NC block. The translation and rotation movements are performed at constant speed. The speed, deflection-point speed and acceleration components of all axes involved in the movement are calculated using the same method as before; however, the rotary main axes are taken into account. For the absolute distances to the individual main axes, the effective distances are specified with labels RX, RY and RZ. The CNC considers the distance segments caused by the rotation of the rotating main axes only if the appertaining effective distances RX, RY, and RZ are specified to the associated linear main axis at which the rotation is performed. The effective distances RX, RY, and RZ indicate the absolute distance to the respective linear main axis. They therefore may not be programmed using a sign in the NC program. Effective distances with a value of 0 are not programmed. The programming of the effective distances in the NC program is active for a single NC block and must be programmed in the NC block in which it is to be active. The effective distances can be programmed in any desired order in the NC program and without reference to the rotary axes. Unreasonable entries for effective distances can cause the rotary main axes to turn too quickly or too slowly, or they can result in no speed components at all. Note: In conjunction with the KDA main spindle drive, it is essential to perform the C-axis movement with G06 "Low following error interpolation". Example: NC program - spiral groove C axis X 50 mm 70 mm Effective radius RZ Y 30 mm 448Spira.FH7 Fig. 4-57: Spiral groove machining on end surface

129 NC Programming Instructions Motion Blocks 4-61 NC program: G90 G06 G17 G00 X-30 Y0 Z501 C90 G01 Z497 F500 [spiral groove machining] G01 G91 X-40 C-270 RZ50 F1200 RET Machining plane XY, end surface Approach; positioning of C-axis Lowering the cutter Spiral groove on the end surface Program end NC Program Changeover between Spindle and C Axis The changeover between C axis mode and main spindle mode is performed in terms of the NC syntax by programming the C axis (Cxxx.xxx) or the main spindle (M03 Sxxxx). If the C axis is programmed in the following NC block while the main spindle mode is active, the CNC performs the changeover with the assistance of the PLC. NC block preparation and NC block processing are stopped until the changeover operation is completed. The same mechanism is active when the changeover from C axis mode to main spindle mode occurs. After the main spindle to C axis mode changeover, all spindles active in the process must be traversed once with G90 (Absolute data entry of dimensions) before G91 (Data entry as incremental values) can be used. Changeover with rotary axiscapable main spindle drive M19 S0 Orientate main spindle G00 G54 G90 X100 Z200 M03 S1000 Home position, spindle mode Machining G00 G17 G06 X100 Z250 C90 Home position, C-axis mode G01 G91 X-40 C-270 RZ50 F1200 Machining G00 G18 G54 G90 X120 Z200 M03 S1200 RET Home position, spindle mode Program end Start-up Logic for Endlessly Rotating Rotary Axes Modulo calculation Modulo calculation is used for positioning endlessly turning rotary axes. Possible positioning methods: shortest path G36 positive direction G37 negative direction G38 Note: Modulo calculation can be used only with absolute programming (G90). It does not have any influence on chained dimension programming (G91). The G36, G37 and G38 commands form the G code group "Rotary axis approach logic" (No. 21).

130 4-62 Motion Blocks NC Programming Instructions Shortest path G36 In modulo calculation "Shortest path" G36, the command position is approached via the shortest path. actual position = 20 command position = -380 G90 G36... G1 C-380 F g36.FH7 Fig. 4-58: Positioning using modulo calculation "Shortest path" (G36) G36 is the power-on state; it may be cancelled with G37 or G38. The power-on default G36 is restored at the end of the program (BST, RET, JMP, M02, M30). Positive direction G37 In modulo calculation "Positive direction" G37, the command position is approached in the positive direction. actual position = 20 command position = -380 G90 G37... G1 C-380 F g37.FH7 Fig. 4-59: Positioning using modulo calculation "Positive direction" (G37) G37 may be cancelled with G36 or G38. The power-on default G36 is restored at the end of the program (BST, RET, JMP, M02, M30). Negative direction G38 In modulo calculation "Negative direction" G38, the command position is approached in the negative direction. actual position = 20 command position = -380 G90 G38... G1 C-380 F g38.FH7S Fig. 4-60: Positioning using modulo calculation "Negative direction" (G38) G38 may be cancelled with G36 or G37. The power-on default G36 is restored at the end of the program (BST, RET, JMP, M02, M30). Note: The machine manufacturer may change the default setting in the Bxx.056 process parameters.

131 NC Programming Instructions Motion Blocks Transformations Transformation Functions The main application of the "Transformation of Cartesian coordinates into polar coordinates" function is facing turning parts on turning and grinding machines. This function is particularly useful for milling surfaces on lathes (cylinder surface machining) and for grinding cams. It can also be used in other applications (such as in milling machines with rotary table or rotating heads). Coordinate transformation is available for: face machining and lateral cylinder surface machining. Lateral cylinder surface machining Face machining 452Zylin.FH7 Fig. 4-61: Face and lateral cylinder surface machining Select Face Machining "G31" The commands G30 (canceling coordinate transformation), G31 (face coordinate transformation), and G32 (lateral cylinder surface coordinate transformation) form G code group "Transformation functions" (No. 17). Function G31 "Select face machining" is used to switch the CNC to a fictitious Cartesian coordinate system. The defined fictitious linear axes are used in the interpolation instead of the assigned real main axes. As with milling, the path feed rate using the transformation function must be specific preselect a relative speed between the tool and the workpiece using the F value. The programmed path feed rate is reduced in such a way that the maximum speed of the rotary axis is not exceeded. This is especially the case with movements near the center of rotation. Syntax G31 X1 Z1 Y1 Face machining 453G31.EPS Fig. 4-62: Face machining with G31

132 4-64 Motion Blocks NC Programming Instructions Boundary conditions The CNC supports the transformation function for the XY plane (G17). The real axes involved in the transformation must have the axis meaning X and C. The real Y axis (if present) becomes an auxiliary axis, which has the meaning V. When the transformation is deactivated, the NC reestablishes the original status. The zero point offsets are cancelled (G53) when coordinate transformation is selected (G31); tool path compensation correction and tool length compensation are deactivated (G40, G47). The CNC switches to radius programming (G15). The X axis must be in the positive area when the change to coordinate transformation occurs. After the changeover to coordinate transformation, the zero offsets for the fictitous axes become active, depending on which ones are set. The zero offsets of the real main axes assigned to the fictitous axes are not in effect. After the change to coordinate transformation, it is possible to program directly using absolute (G90) or incremental (G91) dimensional input. It is possible to open a new program during coordinate transformation by using NC block search; however, coordinate transformation (G31) must be set with the basic settings for this function (G54, G48, etc.) in MDI before starting the program. The fictitous axes cannot be passed on to other processes (FAX, GAX). The reference spindle for feed programming with tapping (G63, G64, G65) must be set using the SPF command. In the power-on state, the coordinate transformation always applies to the first spindle. If the transformation is to be applied to a different spindle, the desired spindle must be selected prior to coordinate transformation by using the SPC <spindle number> command. The real primary axes that are allocated to the fictitious axes must not be programmed during coordinate transformation. G31 "Transformation" remains modally active until it is cancelled with G30 or G32, or until it is reset automatically via BST or at the end of the program (RET). Note: If coordinate transformation is active, the PLC employs axis designation 2 for the two fictitious axes that span the current working plane, instead of axis designation 1, which is stored in the machine parameters. The machine manufacturer defines the axis designation of the fictitious axes in the axis parameters. Invalid NC commands during transformation The following list contains all functions that may not be programmed during the transformation: Thread cutting "G33", Zero offsets "G50", "G51", "G52" (if offsets are programmed for "R1" and "R2"), Tapping "G63", "G64", "G65" (if the primary spindle that is assigned to "R2" is addressed), Homing "G74" (if homing is specified for the axes "F1" and "F2"), Feed to positive stop "G75" Cancel all axis preloads "G76"

133 NC Programming Instructions Motion Blocks 4-65 Speed limitation "G92" (if the speed limitation is applied to the primary spindle that is allocated to "R2"), Feed Rate per Spindle Revolution "G95" (if the feed specification concerns the primary spindle that is allocated to "R2"), Constant cutting speed "G96", Spindle control commands "M03", "M04", "M05", "M13", "M14", "M19" (if a spindle-specific auxiliary function is programmed for the primary spindle that is allocated to "R2"), and Axis transfer commands "GAX", "FAX" (if the commands have an effect on axes "F1", "F2", "R1" and "R2"). All these functions will lead to an interruption of execution and to an error message when they are used during the transformation process. Tool Compensation When the transformation function is activated and deactivated, the NC deactivates tool length and tool radius compensation. Tool length and tool radius compensation can be active when the transformation begins. Their effect is not influenced by the transformation function. Note: Only tools of type 1 or 2 may be used during transformation. If the utilization of a type 4 tool (angle head tool) is mandatory, tool length compensations "L1" and "L2" must be taken into account in geometric programming. The value "0" must be entered for the corresponding tool length compensations "L1" and "L2" of the tool. Axis meaning The facing parameter values of axis meanings and axis designations of a lathe with a primary spindle with rotary axis capability (S1/C), an X and a Z axis, and a PLC-controlled turret with driven tools (S2) have been set as follows: Axis designation 1 Axis designation 2 Axis meaning S1/C Y1 C,X S2 - - Notes: The coordinate transformation function is an option that requires a special hardware configuration. All axes that are involved in the coordinate transformation must be on an APR card. The real primary axes that are allocated to the fictitious axes must not be programmed during coordinate transformation. If the coordinate transformation function is executed in a machine with a real Y axis, the corresponding process may not contain an axis of axis meaning V. If the coordinate transformation function is activated, the CNC automatically triggers a changeover to rotary axis mode. When face machining is activated and deactivated, the CNC deactivates all zero point offsets and sets G53. If diameter programming (G16) is selected while face machining is active, the CNC interprets all position values of the fictitious axis with axis meaning X as a diameter specification.

134 4-66 Motion Blocks NC Programming Instructions Detailed description Please refer to the "Coordinate transformation function V15" description for further and supplementary information about face machining. "DOC-MT*CNC-TRA*FKN*V15-ANW1-EN-P". Travel limits for transformation G31 Y'/C Point cannot be approached Limit X+ or Limit X- X'/X Point can be approached 453Fahr.FH7 Fig. 4-63: Travel limits for transformation G31 Function G31 "Select face machining" is used to switch the CNC to a fictitious Cartesian coordinate system. In the new coordinate system, the X axis becomes the X" axis and the C axis becomes the Y" axis. In the axis parameters of the X axis, there are settings for a positive travel limit (Limit X+) and a negative travel limit (Limit X-). Depending on the "Direction for transformation" axis parameter, the "Limit X+" or "Limit X-" travel limit is used. The PLC controller uses the Cartesian coordinate system for computing. In this system, the travel limits define a square of the side length of 2 Limit X+ or 2 Limit X-. At the lathe, however, the travel limit is a circle of the radius R = Limit X+ or R = Limit X-. A point within the square that is outside the circle may be programmed, but cannot be approached. Example: NC program - face machining

135 NC Programming Instructions Motion Blocks 4-67 X1 [P1] [P8] Y1 [P2] [P7] [P3] [P6] [P4] [P5] 455STIRN.FH7 Fig. 4-64: Facing machining with transformation NC program: T12 M6 M89 S M203 G00 G17 G54 G48 Z100 X140 C0 G31 G54 G90 G54 G06 G08 G00 G42 G94 X1 60 Y1 20 G01 Z-0.5 F500 X1 20 Y1 60 F400 X1-20 X1-50 Y1 30 G02 X1-50 Y1-30 I-50 J0 G01 X1-20 Y1-60 X1 20 X1 60 Y1-20 Y1 20 G00 Z10 G30 G54 G48 G00 X140 Z200 M90 M30 ;Tool change ;driven tool ;Engage driven tool ;Driven tool ON ;Home position for the change ;Activate coordinate transformation ;Home position ;[P1] Starting point of machining ;Feed Z axis ;[P2] 1 st straight line ;[P3] 2 nd straight line ;[P4] 3 rd straight line ;[P5] Semicircle in CW direction ;[P6] 4 th straight line ;[P7] 5 th straight line ;[P8] 6 th straight line ;[P1] 7 th straight line ;Z axis to safety distance ;Cancel coordinate transformation ;Home position ;Withdraw Z axis ;Disengage driven tool ;End of program Selection of Lateral Cylinder Surface Machining "G32" With lateral cylinder surface machining G32, the CNC produces straight lines and circles on the lateral cylinder surface according to the G00, G01,

136 4-68 Motion Blocks NC Programming Instructions G02 and G03 blocks that are specified in the NC program. The straight lines and circles on the lateral cylinder surface can be programmed on the plane of the developed lateral cylinder surface that spans a linear axis and a rotary axis. Y C [mm] X G20 Z0 C0 X0 B G32 RI 60 A Z RI C 0 X [mm] Z [mm] 456Zylin.FH7 Fig. 4-65: Lateral cylinder surface machining Programming Syntax Effective radius Plane selection Selection and axis assignment The rotary axis that is involved in lateral cylinder surface machining can be programmed like a linear axis in [mm] or in [inch] (by specifying positions on the lateral cylinder surface). G32 RI=w or G32 RI w w: Value of the effective radius Specifying the effective radius RI is mandatory. Specifying an effective radius RI 0 is not permitted. The effective radius RI must not be altered when lateral cylinder surface machining is active (G30 must first be used for deactivation). If the machining plane is spanned by two rotary axes, the CNC takes the effective radius RI of both rotary axes into account. The effective radius RI has a modal effect. The NC retains the effective radius until lateral cylinder surface machining is deactivated. Before lateral cylinder surface machining is activated, the plane usually must be selected with free plane selection (G20, G21, G22). To perform the individual machining tasks, the following planes are selected during machine operation: G code Linear main axes Axis mean. X Axis mean. Y Secondary axes Axis mean. Z Axis mean. U Axis mean. V Axis mean. W Rotary main axes Axis mean. A Axis mean. B Axis mean. C Mach ining plane Vert. Axis Remarks G18 X1 Y Z U - X2 - B C Z X1 Y G20 X2=0 Y0 Z0 X2 Y Z U - X1 - B C X2 Y Z G20 Z0 X2=0 Y0 Z X2 Y U - X1 - B C Z X2 Y G20 Y0 Z0 X2=0 Y Z X2 U - X1 - B C Y Z X2 G20 Z0 C0 X2=0 G32 RI=80 Z C X2 U - X1 - B C C Z X2 Turning (= power-on pos.) Milling (= G17 with X2) Milling (= G18 with X2) Milling (= G19 with X2) Lateral cylinder surface machining Boundary conditions During lateral cylinder surface machining, the involved rotary axis obtains the functionality of a linear primary axis. Functions such as tool radius path correction and zero point offsets, including rotations, may also be used in the course of lateral cylinder surface machining.

137 NC Programming Instructions Motion Blocks 4-69 During lateral cylinder surface machining, the NC monitors the limited rotary axes (travel range limits) in the same way as during normal operation. During lateral cylinder surface machining, rotary axes must be programmed in [mm] or [inch]. When lateral cylinder surface machining is activated, the NC automatically switches over to radius programming (G15). Upon cancellation, the NC restores the programming mode (radius programming G15 or diameter programming G16) that has been stored in the process parameters. G32 Coordinate transformation remains modally effective until it is cancelled with G30 or G31, or until it is automatically reset at the end of the program (BST, RET, JMP, M02, M03). Note: Before lateral cylinder surface machining is activated, the activated machining plane must be spanned by at least one rotary axis. This is possible using G20, G21, G22 (Free plane selection). When lateral cylinder surface machining is activated or deactivated, the NC deactivates all zero point offsets and sets G53. If diameter programming (G16) is selected during lateral cylinder surface machining, the NC interprets all position values of the axis with axis meaning X as diameter specifications. Detailed description Please refer to "Free plane selection and lateral cylinder surface machining V22" for further information about lateral cylinder surface machining. "DOK-MTC200-FREPLAN*V22-AW01-EN-P". Example: NC program - lateral cylinder surface machining Y X 457Zyltr.FH7 Fig. 4-66: Lateral cylinder surf. machining with transformation NC program: : ;Milling contour "number 1" G55 G15 G94 G97 G6 G8 S M203 G00 C0 G20 Z0 C0 X0 ;Free plane selection G32 RI 36.5 ;Lateral cylinder surface machining on G55 G48 Z

138 4-70 Motion Blocks NC Programming Instructions Deselection of Transformation "G30" Y1 25 Z X38 G01 X36 F150 G42 Y1 25 Z1-42 F297 Y1 50 Z1-42 G02 Y Z I-35 J50 G01 Y Z G02 Y Z I-15 J30 G01 Y Z1-30 Y1 5 Z1-30 G02 Y1 5 Z1-42 I-36 J5 G01 Y1 25 Z1-42 G00 X38 G30 ;Lateral cylinder surface machining off : The CNC employs function G30 "Deselection of transformation" to deselect an existing transformation (G31, G32). The zero point offsets are cancelled (G53) when transformation is deselected (G30); tool path and tool length compensation are deactivated (G40, G47). G30 is the power-on state; it has a modal effect. G30 are cancelled by G31 or G32. G30 is set automatically after an NC program has been loaded and after a BST, RET, or control reset. Deselection of face transformation G31 The fictitious Cartesian coordinate system is deselected and the coordinate system that has been defined in the process parameters is selected. The fictitious axes are deselected and may consequently no longer be programmed. The plane that has been specified in the process parameters is selected as the current machining plane; the CNC switches over to the workpiece programming mode (radius/diameter), which has been stored in the process parameters. After coordinate transformation has been cancelled, programming can be performed directly in absolute (G90) or incremental (G91) dimensions. Note: The fictitious axes may no longer be programmed. The zero point offsets for the real axes have already been set. The zero point offsets of the fictitious axes that are allocated to the real axes have no effect. Deselection of lateral cylinder surface coordinate transformation G32 Upon cancellation, the NC restores the programming mode (radius programming G15 or diameter programming G16) that has been stored in the process parameters. Note: The CNC deactivates all zero point offsets and sets G53. Select Main Spindle for Transformation "SPC" If a number of spindles in which a coordinate transformation could be performed are present in a process, there must be some way to select the main spindle for the coordinate transformation.

139 NC Programming Instructions Motion Blocks 4-71 Syntax SPC <spindle number> The first spindle is always active in the power-on state. If the transformation is to be applied to a spindle other than the first spindle, the correct main spindle must be selected by using "SPC <spindle number>" before using G31 or G32 to select coordinate transformation. The main spindle must be selected when the main spindle mode is active. It cannot be selected during C-axis mode. "SPC <spindle number>" remains modally active until it is overwritten with a different spindle number or is automatically set to the first spindle at the end of the program (RET) or by BST. The current reference spindle for the transformation can be interrogated (e.g. 4.8 Main Spindle Synchronization Use of Main Spindle Synchronization Functions of Main Spindle Synchronization Main spindle synchronization is primarily used on lathes to transfer parts, to recess parts, to machine shafts, for polygon lathing, and for non-round lathing. Up to three spindles can be operated in sync within a process on the CNC. One spindle is used as the master spindle, while the other two spindles are operated as synchronized spindles. The CNC always moves the master and synchronized spindles so that they remain angularly in sync. The following example illustrates the relationship with angular synchronization between a master spindle and a synchronized spindle.

140 4-72 Motion Blocks NC Programming Instructions Prior to synchronization Angular position of spindles Master Synchronized spindle spindle Comment Each spindle is located in any given random position After synchronization step Master Synchronized spindle spindle The synchronized spindle performs a movement to adjust to the given angle offset (=90 ) (transf. ratio = 1). After rotation of 90 Master Synchronized spindle spindle The synchronized spindle has rotated 90 in sync with the master spindle. After a change of 45 in the position offset Master Synchronized spindle spindle The synchronized spindle has rotated 45 with respect to the master spindle. Fig. 4-67: Angular position of spindles Permissible Configurations The advantage of the "absolute angle" synchronization mode is that the angle offset between the master and the synchronized spindles can be set in a defined manner at any time. The rules which define the permissible spindle configurations for the main spindle synchronization are listed below. If one of these rules is violated at the beginning of synchronization or during synchronization, the NC interrupts the process and generates an error message. Only one master spindle can be used in main spindle synchronization. All spindles used in main spindle synchronization must belong to one process. If the spindles of a different process are to participate in main spindle synchronization, this is to be defined to the respective process using the axis transfer commands. All spindles used in main spindle synchronization must be controlled by the same APR card. No more than two synchronized spindles can belong to a synchronization group in addition to the master spindle. The master spindle must have a lower drive number than the synchronized spindles within the SERCOS drive loop. A single spindle cannot be both a master and a synchronized spindle at the same time.

141 NC Programming Instructions Motion Blocks 4-73 Note: Only digital main spindle drives equipped with the SERCOS Interface as well as digital DDS 2.2 feed drives equipped with main spindle functions and the SERCOS Interface can be used in main spindle synchronization. Sequence of a Synchronization Operation Activate main spindle synchronization Auxiliary functions for selecting and canceling main spindle synchronization Main spindle synchronization is activated in NC program-controlled mode from the NC program by means of an auxiliary function. In manual mode, the synchronization can be activated by means of a machine control key or by any other key. An interface signal between the PLC and the NC allows follower axis synchronization to be activated in any operating mode. The following is to be specified via the user interface, the NC program, or the PLC program before starting main spindle synchronization: the sync spindle appertaining to the main spindle, the existing transmission ratio between main and synchronization spindle, the direction of rotation of the synchronized spindle the effective angle offset and position offset between both spindles, as well as the tolerance limits for monitoring the actual position value differences between the master and the synchronized spindle. As of version 5.15.xx, Q functions Q Q9999 are reserved for Bosch Rexroth specific functions. Q functions Q Q9764 are for main spindle synchronization. We recommend that the auxiliary functions be assigned as follows for main spindle synchronization: Q function 9 Reserved for Bosch Rexroth 7 reserved for main spindle sync Process number x = 0-6 Function Remarks Q 9 7 x 0 Main spindle synchron. groups 1 & 2 OFF Q 9 7 x 1 Main spindle synchron. group 1 ON Q 9 7 x 2 Main spindle synchron. group 2 ON Q 9 7 x 3 Main spindle synchron. group 1 OFF Q 9 7 x 4 Main spindle synchron. group 2 OFF Synchronization process Deactivate synchronization If the spindles are rotating at different speeds (stopped = 0 rpm) when spindle synchronization is activated, the NC accelerates or decelerates the synchronized spindle at maximum acceleration/deceleration until it reaches the synchronization speed. As soon as it reaches the synchronization speed, the NC switches to position control and rotates the synchronized spindle to the set position within one revolution using the shortest path. If the master spindle and the synchronized spindle are stopped, the synchronized spindle simply traverses to its command position, taking the existing translation ratio and the existing angle offset and position offset into account. The NC switches all spindles involved in the synchronization to position control. If functions such as M03, M04, or G95 are active while main spindle synchronization is activated, the NC continues position control mode for these spindles. The changeover operation does not have any negative effects on the surface of the workpiece. Main spindle synchronization can be cancelled independently of the operating mode by resetting the activation interface signal. All spindles involved in the synchronization retain their speeds after cancellation. If the spindles must stop after cancellation, this must be programmed by means

142 4-74 Motion Blocks NC Programming Instructions of M05 or M19 after synchronization has been canceled. If synchronization is deactivated, the NC switches the spindles which were involved in the synchronization back to speed control if a function that normally runs under speed control is active at this time. NC programming None of the synchronized spindles which participate in main spindle synchronization may be programmed during synchronized operation. However, if an attempt is made to do this, the NC terminates program execution and generates an error message. Furthermore, the master and the synchronized spindles may not be operated in the rotary axis mode; a gear change may not be performed during synchronized operation. Any attempt to do so will result in the termination of the program and the generation of an appropriate error message. Synchronized operation remains active at the end of the program (BST, RET, M02 and M30), with control reset or with jog in manual mode if the PLC does not cancel the synchronized spindles which are involved in synchronized operation. The master spindle must be the main spindle during synchronized operation. In synchronized operation, functions G33 (Thread cutting), G95 (Feed per revolution) and G96 (Constant surface speed) apply exclusively to the master spindle. For this reason, the master spindle must be selected as the main spindle as soon as main spindle synchronization is activated. During synchronized operation, the user must not switch the spindles which are involved in the main spindle synchronization from one process to another. The use of the axis transfer commands with the spindles which are engaged in synchronized operation will cause the program to terminate and an error message to be generated. Thus, spindles which are part of the synchronized operation and that belong to a different primary process must be transferred to the respective process before synchronization mode is activated. In addition, they may not return to the primary process until synchronization mode is cancelled. Note: The spindle which is engaged in tapping G63, G63, or G65 must not be a master spindle or a synchronized spindle. Machine Data for Main Spindle Synchronization No. Description Value range Description The machine data for main spindle synchronization occupy a page named Main spindle synchronization. The following data structure is present within the page for each process: 001 Sync run sync spindle 1 OK 0/1 0: Sync run not OK 1: Synchronization OK 002 Sync run sync spindle 2 OK 0/1 0: Sync run not OK 1: Synchronization OK 003 Axis meaning of master spindle 0, 10, 11, 12 0: No master spindle present; 10: Spindle S1; 11: Spindle S2; 12: Spindle S3 004 Axis meaning, sync spindle 1 0, 10, 11, 12 0: No sync spindle present; 10: Spindle S1; 11: Spindle S2; 12: Spindle S3 005 Angle offset, sync spindle Angle offset between main spindle and synchronized spindle Position offset, sync spindle Position offset between main spindle and synchronized spindle 1.

143 NC Programming Instructions Motion Blocks Main spindle speed i_ls/ss The translation ratio is calculated by dividing the main spindle revolutions by the synchronized spindle revolutions. 008 Sync spindle1 speed i_ls/ss The translation ratio is calculated by dividing the main spindle revolutions by the synchronized spindle revolutions. 009 Direction of rotation sync spindle 1 0/1 0: No change in direction 1: Opposite direction 010 Sync run window, sync. spindle Sync run window for interface signal PxxSSS1OK 011 Error limit, sync spindle Error limit window for interface signal PxxS.SS1ER 012 Axis meaning, sync spindle 2 0, 10, 11, 12 0: No sync spindle present; 10: Spindle S1; 11: Spindle S2; 12: Spindle S3 013 Angle offset, sync spindle Angle offset between main spindle and synchronized spindle Position offset, sync spindle Position offset between main spindle and synchronized spindle Main spindle speed, i_ls/ss The translation ratio is calculated by dividing the main spindle revolutions by the synchronized spindle revolutions. 016 Sync spindle 2 speed, i_ls/ss The translation ratio is calculated by dividing the main spindle revolutions by the synchronized spindle revolutions. 017 Direction of rotation, sync spindle 2 0/1 0: No change in direction 1: Opposite direction 018 Sync run window, sync. spindle Sync run window for interface signal PxxSSS2OK 019 Error limit, sync spindle Error limit window for interface signal PxxSSS2ER Fig. 4-68: Data structure 4.9 Follower and Gantry axes Applications of Follower and Gantry Axes The individual data elements can be reconfigured from the PLC via the user interface or from the NC program if the corresponding main spindle or synchronized spindle is not active. If the user accesses the data for a spindle which is engaged in synchronized operation from the PLC or from the user interface, an error message will be generated. If the user attempts to use the MTD command in the NC program, an error message will be generated, and the NC will stop processing. Exceptions are data elements 005 "Angle offset" and 006 "Position offset" of the synchronized spindles 1 and 2. The user can modify them at any time during synchronized operation, either from the PLC via the user interface or from the NC program. The functions "Follower axis" or "Gantry axis", referred to below as synchronized mode, allows up to four feed axes to be operated in sync. Each feed axis can be defined as a main axis; up to 3 synchronized slave axes can be assigned to it. The main axis and the slave axes together comprise a synchronized axis group. Such groups can be activated or deactivated depending on the operating mode, or they can be kept active during the entire operation of the machine, including homing operations. When they are in the inactive state, they can be reconfigured during machine operation from the PLC and the NC as well as by means of the user interface. For each process, up to four different synchronized axis groups can be active simultaneously. During synchronized operation, all the slave axes in the group follow the path traveled by the main axis, taking into account their respective translation ratios and their directions of rotation.

144 4-76 Motion Blocks NC Programming Instructions Permissible Configurations Steps of a Follower Operation The following rules describe the configurations which are permissible for synchronized operation. If the NC detects a violation of these rules, it interrupts processing and generates an error message. One master axis and at least one slave axes must be present in each synchronized axis group. A synchronized axis group must not contain more than one master axis. A maximum of three slave axes may be present in each synchronized axis group. All axes in a synchronized axis group must belong to the same process. If the axis of a different process is to participate as a main or slave axis in the synchronized axis group, then this must be specified to the respective process using default axis transfer commands. All axes in a synchronized axis group must be located on a single APR. The master axis must have a lower drive number than the slave axes on the SERCOS loop. A single axis cannot be both a master axis and at the same time a slave axis. All axes in a synchronized axis group must be of the same axis type (linear, modulo rotating rotary, or limited rotating rotary axes). Tool storage axes must not be part of a synchronized axis group, either as a master axis or as a slave axis. If rotary axes form a synchronized axis group, they must be programmed using the same number of divisions per revolution. The master and slave axes in an active synchronized axis group may not be present as a master or as a slave axis in a different synchronized axis group. A synchronized axis group can be activated during program-controlled operation from the NC program by means of an auxiliary function. In manual mode, the user can activate synchronized operation via a machine control key or another key. An interface signal between the PLC and the NC allows follower axis synchronization to be activated in any operating mode. It is important to be certain that the master and slave axes are placed in their starting position before activating synchronized operation and that the corresponding machine data are entered properly. Synchronized operation can be cancelled independently of the operating mode by resetting the activation interface signal. All axes in the synchronized axis group retain their position without any change after being deactivated. Auxiliary Functions for Synchronized Operation Q function 9 Reserved for Bosch Rexroth Q functions Q Q9999 are reserved for Bosch Rexroth specific functions. Q functions Q Q9868 are for synchronization operating mode. We recommend that the auxiliary functions be assigned as follows for synchronized operation: 8 reserved for synchronized axis operation Process number x = 0-6 Function Remarks Q 9 8 x 0 Sync axis group 1-4 OFF Q 9 8 x 1 Sync axis group 1 ON

145 NC Programming Instructions Motion Blocks 4-77 Q 9 8 x 2 Sync axis group 2 ON Q 9 8 x 3 Sync axis group 3 ON Q 9 8 x 4 Sync axis group 4 ON Q 9 8 x 5 Sync axis group 1 OFF Q 9 8 x 6 Sync axis group 2 OFF Q 9 8 x 7 Sync axis group 3 OFF Q 9 8 x 8 Sync axis group 4 OFF Fig. 4-69: Allocation of auxiliary functions NC Programming During synchronized operation, the user may not program any axis other than the master axis of an active synchronized axis group. No other slave axes may be programmed during synchronized mode. If the user attempts to do so by, for example, mirror imaging or scaling a slave axes, the NC interrupts program execution and generates an error message. Zero point offsets and tool corrections (including D corrections) are taken into account only for the master axis by the NC. During synchronized operation, the slave axes receive the command values only for the master axis, taking into account the respective translation ratio and direction of rotation. The synchronized axis groups remain active at the end of the program (BST, RET, M02 and M30), with control reset or with jog in manual mode if the PLC does not cancel the active synchronized axis. During synchronized operation, the user may not switch the axis in the synchronized axis group from one process to another. The use of the axis transfer commands with the axes which are engaged in synchronized operation will cause the program to terminate and an error message to be generated. Axes which are operated in synchronized mode and that belong to a different primary process must be transferred to the respective process before the synchronized axis group is activated. In addition, they must not be returned to the primary process until synchronized mode is cancelled. Feed to positive stop (G75) cannot be used with synchronized mode. If coordinate transformation is active via G31 and G32, the axes that are involved in the transformation (axes labeled X and C) may not be part of any active synchronized axis group. Machine Data for Synchronized Axis Groups No. Description Value range Description The machine data for the follower and gantry axes occupy a page named Follower and gantry axes. The following data structure is present in the page for each process and for each synchronized axis group: 001 Axis group switched on 0/1 0: Synchronized axis group not active 1: Synchronized axis group is switched on 002 Axis meaning of lead axis 0-9 0: No master spindle present;1,2,3,4,5,6,7,8,9: Axis meaning X,Y,Z,U,V,W,A,B,C 003 Axis meaning, follower axis : No follower axis present 1-9: Axis meaning X,Y,Z,U,V,W,A,B,C 004 Speed of lead axis i_la/fa The translation ratio is calculated by dividing the master axis revolutions by the follower axis revolutions 005 Speed of follower axis 1i_LA/FA The translation ratio is calculated by dividing the master axis revolutions by the follower axis revolutions 006 Direction of rotation follower axis 1 0/1 0: No change in direction 1: Opposite direction

146 4-78 Motion Blocks NC Programming Instructions 007 Follower axis 1 = gantry axis 0/1 This data element currently is not evaluated. 008 Axis meaning, follower axis : No follower axis present 1-9: Axis meaning X,Y,Z,U,V,W,A,B,C 009 Speed of lead axis i_la/fa The translation ratio is calculated by dividing the master axis revolutions by the follower axis revolutions 010 Speed of follower axis 2 i_la/fa The translation ratio is calculated by dividing the master axis revolutions by the follower axis revolutions 011 Direction of rotation follower axis 2 0/1 0: No change in direction 1: Opposite direction 012 Follower axis 2 = gantry axis 0/1 This data element currently is not evaluated. 013 Axis meaning, follower axis : No follower axis present 1-9: Axis meaning X,Y,Z,U,V,W,A,B,C 014 Speed of lead axis i_la/fa The translation ratio is calculated by dividing the master axis revolutions by the follower axis revolutions 015 Speed of follower axis 3i_LA/FA The translation ratio is calculated by dividing the master axis revolutions by the follower axis revolutions 016 Direction of rotation follower axis 3 0/1 0: No change in direction 1: Opposite direction 017 Follower axis 3 = gantry axis 0/1 This data element currently is not evaluated. Fig. 4-70: Data structure The individual data elements can be reconfigured from the PLC via the user interface or from the NC program if the corresponding synchronized axis group is not active. If the user accesses the data for an active synchronized axis group from the PLC or from the user interface, an error message will be generated. If the user attempts to do this in the NC program using the MTD command, an error message will be generated and the NC will stop processing Rounding of NC Blocks with Axis Filter "G11" / "RDI" Method of Operation Purpose Definition Principle Rounding with axis filter NC commands "G11", "G10" and "RDI" are used to program/switch off function "Rounding of NC blocks with axis filter". This function is used mainly to provide fast and time-optimized positioning using rapid traversing via several data points. Within a sequence of motion commands, the block transitions are rounded by means of a programmable axis filter so that the end point of the motion sequence is reached in as short a time as possible. In this case, the term motion sequence is a sequence of NC blocks of G code group 1 (G00, G01, G02, G03). An NC block which does not belong to this group will exit the motion sequence. Rounding of block transitions occurs only within a motion sequence. With the exception of the last data point (target point), it is not necessary to fully hit the data points. The path curve can pass the data point at a parameterizable maximum distance. At the end of the block, the last block of a motion sequence directly hits the programmed target point position without any rounding. Rounding of the block transitions is effected by means of a two-step axis filter with acceleration filter and jerk limiting filter. This axis filter follows up the interpolator and considers the values in the Cxx.018 "Maximum acceleration" axis parameters, as well as the jerk limiting values entered in the Bxx.034 "Time constant or acceleration" process parameter.

147 NC Programming Instructions Motion Blocks 4-79 Axis Filter Interpolator Acceleration Filter Jerk Filter AxisFilter.FH7 Fig. 4-71: Rounding using two-stage axis filter Round distance RDI In the axis filter, an axis positioning windows delimits the maximum rounding distance RDI (Round DIstance). The RDI value defines the maximum distance to the programmed data point for the start of the rounding process. P n P nf1 P nf2 RDI: Round DIstance (NC program) P n: programmed data point (NC program) P nf1, P nf2: track points generated by rounding Fig. 4-72: Rounding with rounding distance RDI RoundDistance.FH7 Programming RDI programming Syntax The process of rounding block transitions is modally enabled for the current and the following blocks by programming the rounding distance RDI (Round DIstance). It is effective only in motion blocks of G code group 1 (G00, G01, G02, G03). In each case, the transition from the current block to the next block is rounded. Rounding is switched off again with the "RDI 0" command. "RDI=0" is the default state and is saved as active until RDI is overwritten with another value. RDI is automatically reset to the default state at the end of the program (RET), using the BST command or control reset. The following syntax is admissible with the RDI command: RDI10 ;direct allocation RDI 10 ;direct allocation, space symbol RDI=10 ;direct allocation RDI=@195 ;allocation by variable RDI=10+@195 ;allocation by ;reading of the currently effective RDI value Example of an NC program with RDI N012 G1 X5 Z0 N013 G1 X10 Z10 RDI 5 N014 G1 X20 Z15 N015 G1 X35 Z5 RDI 2 ;rounding with 5 mm ;rounding with 5 mm ;rounding with 2 mm

148 4-80 Motion Blocks NC Programming Instructions N016 G1 X100 Z5 RDI 0 ;rounding switched off, target point is ;attained precisely Alternative programming with G10 and G11 Behavior at the end of a motion sequence and when disabling rounding As an alternative to programming with RDI, G codes G11 and G10 (G code group 23) can be used to enable and disable the rounding function: G11: enables the rounding function. The last programmed rounding distance RDI is effective. With a current rounding distance of 0, G11 does not take effect. Programming of RDI with a rounding distance other than 0 automatically enables G code G11. G11 is saved as active until G10 is enabled. G10: disables the rounding mode. Programming of "RDI=0" automatically enables G code G10. G10 is the default state and is saved as active until G11 is enabled. G10 is enabled automatically at the end of the program (RET), by the BST command or by a control reset. Rounding of block transitions occurs only within a motion sequence. A motionless block or, more precisely, a block outside of G code group 1 terminates the motion sequence. But G11 remains enabled. At the end of the block, the last block of a motion sequence hits the programmed target point position without any rounding. This also applies to a motion block in which rounding has been disabled. Example for an NC program of a motion sequence N001 G1 X5 Z0 RDI 5 N002 G1 X10 Z10 N003 G1 X20 Z15 N004 M50 N005 G1 X35 Z5 RDI 2 N006 G1 X100 Z5 RDI 0 N100 G1 X200 Z30 ;rounding with 5 mm ;rounding with 5 mm ;target point is attained precisely ;motionless block ;rounding with 2 mm ;rounding switched off, target point is ;attained precisely N002 N003 N005 N001 N004, motionless N006 PosSequence.FH7 Fig. 4-73: Example for rounding within a motion sequence Limits and Special Regulations Special regulations on exact stop Restrictions When rounding is active and exact stop (to be enabled via G61 or in G00 blocks) is enabled at the same time within one motion sequence, exact stop is not effective. This behavior does not correspond to the DIN definition for the G00 rapid traverse rate block when the next block is a motion block as well. The block transition to the next block is rounded. At the end of the motion sequence, attainment of the positioning window is queried once more. For rounding with an axis filter, there are some restrictions: Rounding depends on velocity. The rounded path curve at the block transition varies dependent on the velocity (override). Rounding to the next block does not occur in the following cases:

149 NC Programming Instructions Motion Blocks Test Mode motionless intermediate blocks. Rounding is not possible when transformation is active (G31 or G32). In these cases, an error message is indicated when G11 or RDI (other than 0) are programmed. When traversing straight lines, parallel offsets are possible. With circles, the deviations from the original curve are greater than with straight lines. Purpose Besides the already existing functions such as single block mode, semiautomatic mode, feed override, rapid movement override, NC block skipping, conditional and unconditional stop as well as the virtual NC, including the (offline) simulation, the following functions allow an even quicker startup for the user: suppressing assisting functions, disabling movement, test feed, quick run and graphic online simulation. These functions in the following named "Test mode" allow the user to concentrate specifically on the geometry, the process synchronization, and collision analysis. They allow an individual examination of the overall process, especially the parallel-running partial processes, and they permit these to be run as often as desired and at any speed. This can be performed with and without control of the I/O plane, as well as with and without axis movements. Suppress Auxiliary Function Output Lock Axis and Spindles With the function "Suppress auxiliary function output", the machine user can turn off special auxiliary functions (e.g. coolant) or all auxiliary functions (M, Q, S, and T/E functions) during test mode. The user can activate the function "Suppress auxiliary function output" by pressing an M key. Application In order to test the program step by step, the user can selectively activate and deactivate axes and spindles with the function "Lock axes and spindles". Examples Simple milling machine Simple lathing machine On a milling machine, the test mode could, for example, be that the user locks the feed axis (Z axis) by pressing an M key and preselects a higher speed (test feed) for program processing. During the adjacent test mode, the tool change is performed as in normal program mode. The test mode on a lathing machine is similar. All axes (X, Z, and W (tool turret)) as well as the spindle are locked; the test feed is activated by pressing an M key.

150 4-82 Motion Blocks NC Programming Instructions More complex machine Further application For example, the following steps (test steps) are passed from the establishment of the NC program to the production of a part: 1. The user activates the following functions via M keys: lock all main axes (X,Z), turret and spindle (S) lock auxiliary axes (U (back rest)), V (tail stock), activate test feed, and suppress auxiliary function output. Before the program is started, the user also activates the online graphics. 2. If the program runs successfully, the user unlocks the main axes, the tool turret, and the spindle by pressing an M key and reruns the NC program (without part). Thereby the user checks, based on the path movement, the correction data (zero offsets, tool corrections, etc.). 3. In a further step, the user also activates the auxiliary axes (U, V) and checks their feed movements for collisions. 4. After this step has been successfully completed, the user then deactivates the function "Suppress auxiliary function output" and checks the performance of the auxiliary functions during the new run. Then the part is machined. The axis/spindle lock is used not only for test applications, but also for other purposes. For example, it is required for dual lathing or milling machines which can be operated alternatively as a dual machine or as two individual machines. Test Feed Application Method of operation Selecting test feed The test feed permits a quick run of the NC program. This is particularly advantageous if axes and spindles are locked. Furthermore, a continuous run of the machining processes as well as of the feed and retract movements is reached. The test feed is used when the function "Test feed" is selected in the operating modes "automatic" and "semi-automatic" to run the program instead of using the programmed feed. When the function "Test feed" is active, the NC performs a test feed of the axes that were programmed in conjunction with G01, G02, G03, G33, G63, G64, G65, G74, G75 and G77. This feed value is also used as the feed for G95 (feed per revolution), independent of the individual spindle speed. With G00, the NC performs a second test feed (rapid test feed) of the axes if the function "Test feed" is active. Independent of whether the axes or spindles are locked or not, the function "Test feed" is always available to the user during test mode. In active test feed mode, the effect of the feed and rapid override are the same as in normal operation. As in normal operating mode, the NC prevents exceeding of the maximum axis velocity as well as the maximum path velocity specified in the machine parameters. The machine user selects the test feed via the user interface by using an M key. When this has been selected and as long as it has not yet been set, the interface signal "PxxCDRYRN" (DRY RuN) is set to the NC and machine data element "Test feed" is set.

151 NC Programming Instructions Motion Blocks 4-83 Note: During the projection of the function within the GBO, it is to be ensured that sub-operating mode "Test mode" is indicated in the GBO screens. Entering test feeds The values for the test feeds "Test feed" and "Quick test feed" are to be entered into the machine data on page "Test mode" by the machine builder; if required, they can be overwritten by the end user directly into the machine data or indirectly via the PLC. For example, the machine builder can offer values via the M keys for the test feed as well as for the quick test feed and have the end user select them. Rapid Run Application The rapid run offers the quickest possibility to check an NC program. It can be implemented by using a block pre-run, where the user does not have to select a start or a target block. The NC begins, as in normal operating mode, with the first NC block and ends it as soon as the program end has been reached. Thereby the axes and spindles remain stopped and only the assisting functions within machine parameters (Bxx Bxx.061) are performed. The tool corrections, zero offsets, and D corrections regarding the travel range limits or variable calculations etc. can therefore be checked in rapid run. Online Simulation Application Online simulation can be activated and de-activated in all operating and subordinate operating modes and provides the user with reliable information on the traveled path of the (moved or locked) axis within the machine. Note: With very short NC blocks (e.g. transition radii) and at very high path velocities, online simulation may not cover all NC blocks. Within the graph, it can be selected to not show them or to mark them with arrows or dots. Suppress Tool Transfer and Movements Application The function "Suppress tool transfer and movements" is an important subfunction while testing an NC program, in which the process of the tool storage axis is locked and the auxiliary functions are not generated. It permits the machine builder to freeze or to drag along the tool list during test mode as needed. Freezing the tool list is required especially if the affiliated tool storage axis is locked during the test mode and the tool change-specific auxiliary functions can not be processed by the PLC. Note: Assure at start up that the tool change-specific auxiliary functions are not processed by the PLC and that the tool list is frozen when locking the tool storage axis.

152 4-84 Motion Blocks NC Programming Instructions

153 MTC 200 NC programming instruction Tool Compensation Tool Compensation 5.1 Setup Lists and Tool Lists Setup List Purpose Using the setup list, the user can define the availability of all tools that are required for machining and, using the equipment check, ensure their usability for the machining processes that are to be performed. The setup list data reflects the required data of the tools that are to be employed (e.g. geometry limit values). Note: As of firmware version 23VRS, the MTC200 again supports the full functionality of the setup lists from its MTGUI. Handling Activation The setup lists and NC packages are loaded into the controller and saved together using the storage function. Using system parameter A Organization of setup lists, the user defines whether a separate (program-specific) setup list is to be created for each NC program or whether only one (station-specific) setup list is to be created for a process. NC Program Package <xx> NC Program Package <xx> Process 6 Process 6 Process 0 Process 1 Process 2 Process 0 Process 2 Process 1 NC Program 1 Setup List 1 NC Program 1 Setup List NC Program 2 Setup List 2 NC Program 2 NC Program 3 Setup List 3 NC Program 3 NC Program 99 Setup List 99 NC Program 99 Program specific Organization Form of the Setup Lists Fig. 5-1: Organization types of setup lists Station specific Organization Form of the Setup Lists Pakete.FH7

154 5-2 Tool Compensation MTC 200 NC programming instruction Tool List Purpose Preparation Loading the tool list Current Tool List Tool lists are used for preparing and saving tool data of the individual tools. The tool data always contain the basic tool data, which consist of the tool identification, the location data, the units, the technology data and at least one tool edge. Besides the basic tool data, the tool data contain the data that are required for the tool edges (tool tip identification, geometry, tool life data, user-defined data; see section "Elements of the tool data record"). With the help of the PC user interface, tool lists can be created, modified and saved while machining is in progress. This enables the user to load the tool storage device for subsequent machining processes. This permits the setup time of a new tool storage unit configuration to be reduced to a minimum. The operator loads the tool list prepared in the user interface into the control and loads the tool magazine according to the tool list. The tool list that is currently contained in the controller is known as the "current tool list". As soon as a machining process has begun, the tool list in the PC loses its significance; solely the current tool list in the CNC reflects the current state of the tools within the magazine. Note: Any modifications that concern the current workpiece arrangement, such as inserting, removing or moving a tool or modifying the tool data, must be performed directly in the current tool data. The current tool list contains the current information about the location and the state of the individual tools (e.g. current remaining tool life). The current tool list is generated from the tool list while taking the setup list into account. During the machining process, tool management continually updates the current tool data, such as the location data, tool life data, and wear data. Equipment Check The equipment check compares the required tool data (setup list) with the actual tool data (current tool list). The equipment check is performed automatically whenever a program is restarted after data of the setup or tool list have been modified and transferred to the controller or after a different NC memory (A, B) has been selected if interface signal PxxC.MGWTC (Process xx Command MaGazine Without ToolCheck) has been set to log. "0". Tool management does not perform an automatic equipment check after a restart if PxxC.MGWTC has been set to log. "1". TID Syntax In addition, NC command TID (Tool IDentification) permits the equipment check to be executed at any position in the NC program, regardless of interface signal PxxC.MGWTC. TID

155 MTC 200 NC programming instruction Tool Compensation 5-3 NC command equipment check TID new and modified setup list Start advance program (PxxC.ADV) Interface signal "Equipment check" (PxxC.MGWTC) & >= 1 Equipment check new and modified tool list >= 1 Program or magazine changeover Ausruest.EPS Fig. 5-2: Conditions for equipment check Each tool that has been entered in the setup list triggers the following sequence during the equipment check: Basic tool data Tool edge data Based on the tool identification (ID), tool management searches the entire current tool list for tools with the same name. Tool management first assigns the setup list-specific data to each located tool. Any setup list-specific data that exist from a previously made comparison will be overwritten. If a tool is not contained in the tool list, it is entered as missing in the tool list of the user interface (sorted by T No.), i.e. tool status bit 1 "Tool does not exist" ( "!") is set. Tools in the tool list to which no entry can be assigned in the setup list are marked by tool management by setting tool status bit 2 "Tool not required" ( "?"). Depending on the tool, the tool status bits that are responsible for location locking and location assignment are set or reset. Once the setup list-specific data have been assigned, tool management checks the tool edge data and the basic tool data. For the tool edge data, the tool edge orientation, the existing geometry, and the wear state are checked. The result is shown using the related tool edge status bit. Tool status bit 5 ("Faulty tool edges" "f") indicates whether the tool edge orientation and/or the tool geometry of at least one tool edge does not satisfy the requirements. Accordingly, the wear state of the tool edges is shown in tool status bits 17 and 18 ("Tool worn out" "d" or "Tool below warning limit" "w") if at least one tool edge is worn out or below the warning limit. From the basic tool data of the tool list, tool management checks the correction type and the number of tool edges against the specifications made in the setup list. According to the result, it updates tool status bits 3 and 4 "Incorrect correction type" ( "t") and "Incorrect number of tool edges" ( "e").

156 5-4 Tool Compensation MTC 200 NC programming instruction Generate alternate tool chains Tools with the same name that could be assigned to an entry in the setup list (alternate tools) are summarized in alternate tool chains. The tools are arranged in the following sequence in each alternate tool chain: usable tools that have already been used, i.e. at least one tool edge has a remaining tool life of less than 100%. usable tools that are still new, i.e. each tool edge has a remaining tool life of 100%. worn tools that would otherwise be usable broken tools that would otherwise be usable unusable tools. Within these groups, the sequence is according to increasing duplo numbers. The first tool of every alternate tool chain becomes the processing tool ( "p") of this chain. All other usable tools are marked as replacement tools ( "s"). If interface signal PxxC.MGITW (Process xx Command MaGazine Ignore Tool Worn Out) has been deleted, the NC program terminates with an error message if there is an alternate tool chain that does not have any usable tool. If interface signal PxxC.MGITW is set, the behavior is basically the same. However, tools that are worn and/or broken, but otherwise usable, are counted as usable tools. NC program package process setup list (req. data)? process automatic equipment check tools list (actual data) process tool magazine process autoaus.fh7 Fig. 5-3: Basic method of operation of the equipment check (station-specific organization of the setup list) Operation without Setup List The PxxC.MGNSL (Process xx Command No Setup List) interface signal must be set to "1" if the setup lists are not to be used. In this case, the NC generates (internally and invisible to the user) an empty setup list, in which it generates an entry for each T number that occurs at least once in the current tool list. Then the NC uses this setup list to execute the equipment check described above; however, the assignment between the entry in the generated setup list and the associated tools in the tool list is made using the T number. Any previously existing setup list is not taken into account.

157 MTC 200 NC programming instruction Tool Compensation Elements of the Tool Data Record Overview The following overview tables contain the entire tool data record. The tool data record consists of the setup list-specific data and of the tool list-specific data. Tool data record Data type Option User-defined tool list data "Grinding" technology data The tool data record of a tool consists of basic tool data (see section 5.3) and 1 to 9 tool edge data records (see section 5.4). The number of tool edges and, therefore, of tool edge data records is set by system parameter A "Maximum tool edge number". The "Data type in the PLC" column specifies the form in which the individual data items are available in the PLC. The data elements for which the number of a system parameter is listed in the column "Optional datum" are available in the tool data record only if the entered system parameter is set. The user can administrate application-specific tool data and tool states within tool management of the Bosch Rexroth MTC 200. For example, the maximum speed and the weight of a tool can be stored in the user data. Binary information, such as "Cooling lubricant required" or "Tool resharpened", can be stored in the user status bits. The following system parameters permit the naming of tool data and tool status bits according to the requirements of the corresponding application: A A Designation of user tool data 1-9 A A Designation of user tool edge data 1-5 A A Designation of user tool edge data 6-10 A A Symbol for user tool status bit 1-8, A A Symbol for user tool edge status bit 1-4, If tool management is to be used for a grinding machine, system parameter A Tool technology must be set to "Grinding". The first 5 tool edge user data (data elements 31-35) are assigned with the following grindingspecific data: Min. spindle speed S min Maximum spindle speed S max Max. grinding wheel circumferential speed SUG max Angle of skew Current grinding wheel diameter The first 5 tool user data are not allowed to be used by the user if system parameter A Tool technology is set to "Grinding"!

158 5-6 Tool Compensation MTC 200 NC programming instruction 5.3 Basic Tool Data Each basic tool data element is present once for each tool; the elements can be divided into the following groups: Tool identification, Location data, Units, Technology data, User data and Group data (group status exists for each tool group) Basic tool data (per tool) V23_ DESIGNATION VALUE RANGE DATA TYPE in the PLC UNIT DE OPT. SL TL Tool identification Index address hexadecimal double word with 32 bits - 01 X X ID (tool name) up to 28 characters* STRG28-02 X Storage X Location X Tool number DINT - 05 X X Tool duplo number INT - 06 X Correction type 1-5 USINT - 07 X X Number of tool edges 1-9 USINT - 08 X X Tool status 0/1 (32 status bits) USINT - 09 X Location data Free half-locations 0-4 USINT - 10 X Old pocket INT - 11 X Storage location of next setup tool 0-2 INT - 12 X Loc. of next replacement tool INT - 13 X Stor. of prev. rep. tool 0-2 INT - 14 X Loc. of prev. rep. tool INT - 15 X Units Time unit 0/1 (0: min, 1: cycl.) USINT - 16 X Unit of length 0/1 (0: mm, 1: inch) USINT - 17 X X Technology data Tool code 0-9 USINT - 18 X X Representation type INT - 19 X X

159 MTC 200 NC programming instruction Tool Compensation 5-7 DESIGNATION VALUE RANGE DATA TYPE in the PLC UNIT DE OPT. SL TL User data User data 1 REAL any 20 A X User data 2 REAL 21 A X User data 3 REAL 22 A X User data 4 REAL 23 A X +/- 1.2 * /- 3.4 * User data 5 and 0 (9 significant digits) REAL 24 A X User data 6 REAL 25 A X User data 7 REAL 26 A X User data 8 REAL 27 A X User data 9 REAL 28 A X Group data 29 Group number 0-99 BYTE - 30 X Group duplo number 0-99 BYTE - 31 X Group status 0/1 (16 status bits) WORD - 32 X Comment up to 5 x 76 alphanumeric characters - 99 A X * ASCII character set , at least 1 character >32 Data element 99 Comment is not loaded in the control. DE - Data element SL - Setup list-specific datum R.TL - Replacement tool TL - Tool list-specific datum STRG28 - STRING28 OPT - Optional datum Fig. 5-4: Basic tool data (per tool) WGD_all_V23_ xls All data elements (= "DE" column) of the basic tool data are described in the following according to the order of the previous figure. Tool Identification DE 01 Index address Basic tool data Date element 01 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) INDEX ADDRESS X X V22_ WGD_DE01_V22_ xls Explanation Index addresses are automatically allocated by the controller when entering a tool. The index address can only be accessed in reading; it is used for controller-internal management of the tools.

160 5-8 Tool Compensation MTC 200 NC programming instruction Tool name (ID) DE 02: Basic tool data Data element 02 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) ID (TOOL NAME) X V22_ WGD_DE02_V22_ xls Explanation The tool identification (also abbreviated "ID") can consist of a maximum of 28 characters (ASCII character set , min. 1 character >32), providing a clear differentiation of the tools in use. All utilized tools must be clearly named so that they can be uniquely identified based on their tool name. Only tools that can substitute each other (alternate tools) are grouped under one tool name. Such tools can be distinguished using an additional duplo number (see data element 06 "Duplo number"). The extended tool designation permits any company-related tool designation system to be retained on the control level. DE 03: Storage Basic tool data Data element 03 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) STORAGE X V22_ WGD_DE03_V22_ xls Explanation Example The "Storage" (="Tool storage type") data item is not shown directly within the tool list. Within the data record, it indicates the type of storage location at which the tool is located: 0:= Magazine or turret location 1:= Spindle 2:= Gripper NC block for querying the tool storage location in process "P" in which tool "T" with duplo number "D" is DE 04 Location Basic tool data Data element 04 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) LOCATION X V22_ WGD_DE04_V22_ xls

161 MTC 200 NC programming instruction Tool Compensation 5-9 Explanation Within the tool storage unit, the "Location" data item determines the number of the tool pocket. For a spindle, it determines the number of the tool spindle, and for a gripper the gripper location that contains the tool. Using the tool list, all locations of the tool storage unit and all existing spindles and grippers can be prepared asynchronously to accommodating the real tools with respect to data processing. WARNING Injury to operating personnel as well as damage to the machine and workpiece due to incorrect magazine equipping! Once a tool list has been loaded into the controller, agreement between the actually existing magazine configuration and the tool list must be ensured. Example NC block for querying the tool storage location in process "P" in which tool "T" with duplo number "D" is DE 05 Tool number Basic tool data Data element 05 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) TOOL NUMBER X X V22_ WGD_DE05_V22_ xls Explanation Example Using the T word, which consists of a preceding address letter "T" and a tool number (up to seven digits) or a tool location number (up to seven digits), a tool or a location can be accessed within the NC program. A programmed tool number initiates tool management to determine the current location of the tool on the basis of the tool number and designation from the setup list using the designation and tool location number from the tool list. The assignment of the tool number (as it is used in the NC program) to the tool (operation-specific tool name) that is made via the setup list enables the NC program to access a tool. If a setup list is not used, the current location is accessed directly via the allocation tool number <> tool location number within the tool list. 1. NC block for positioning tool T1234 on reference position "b" (b=1-4) of the tool storage unit: MTP b T NC block for changing tool T123 into the spindle (e.g. "simple" milling machine) for the case that the tool change cycle is called using branch label "M6": BSR.M6 T123

162 5-10 Tool Compensation MTC 200 NC programming instruction Tool duplo number DE 06 Basic tool data Data element 06 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) DUPLO NUMBER X V22_ WGD_DE06_V22_ xls Explanation The tool duplo number is used for: an unambiguous identification of alternate tools (tools of the same tool name and the same T number) and defining the utilization sequence of the alternate tools for machining. The alternate tools are used according to their duplo numbers. Provided it is neither worn out nor locked, an alternate tool with a lower duplo number is used for machining before one with a higher duplo number. The NC program employs the same T number for addressing alternate tools. After the previous tool (tool of the same tool number and designation, and the next smaller duplo number) has been worn out or locked, the controller selects a new alternate tool only if the same T number is invoked again. Note: If tools have the same T number and duplo number, tool management employs the tools by their ascending location numbers. Correction type DE 07 Basic tool data Data element 07 CORRECTION TYPE Relevant for: Setup list (SL) X Tool list (TL) X Location list (LL) V22_ WGD_DE07_V22_ xls Explanation The correction type defines the number of corrections of a tool and their locations (see Fig. 5-5:). Correction type 1: (boring tool) A tool of correction type 1 has only one length compensation value (L3) that is always perpendicular to the current machining plane. Correction type 2: (milling tool) In addition to the length compensation value (L3), which is always perpendicular to the current machining plane, a tool of correction type 2 has a radius compensation value (R) inside the machining plane. Correction type 3: (turning tool) A tool of this type includes 2 length compensation values (L1, L2) and one radius compensation value (R) inside the current machining plane.

163 MTC 200 NC programming instruction Tool Compensation 5-11 Correction type 4: (angle head tool) Tools of this type are able to perform in all three main axis directions (X, Y, Z), a length compensation (L1, L2, L3), and a radius compensation (R) in the current machining plane. Length L3 is always perpendicular to the current machining plane, while lengths L1 and L2 always lie within the current machining plane. Correction type 5: (gripper) Tools of this type are able to perform a length compensation (L1, L2, L3) in all three main axis directions (X, Y, Z). Length L3 is always perpendicular to the current machining plane, while lengths L1 and L2 always lie within the current machining plane. In order for the tool to be used for the scheduled machining process, the correction type of the related tool in the magazine must coincide with the type requested in the setup list.

164 5-12 Tool Compensation MTC 200 NC programming instruction Type effective corrections 1 correction: 1 length correc tion perpendicular to machining level 2 corrections: 1 length correc tion perpendicular to machining level Radius correction on machining level 3 corrections: 2 length corrections on the machining level Radius correction on machining level Z Z Z Y L3 Y L3 Y L2 effect of the corrections G 17/G 20 G 18 G 19 Y Y L3 X X L3 X Z Z Y Y R L3 R X R X L3 X Z Z Y Y R R L1 L2 L1 X L1 R X L2 X Z Z Example tool edge orient drilling tool 0 L 3 milling tool 0 R lathing tool 0-8 L corrections: 1 length correc tion perpendicular to machining level 2 length corrections on the machining level Radius correction on machining level 3 corrections: 1 length correc tion perpendicular to machining level 2 length corrections on the machining level Z Z Y L2 L3 Y L2 L3 Y Y R R L3 L2 L1 L1 X X L1 R L3 X L2 Z Z Y Y L3 L2 L1 L1 X X L1 L3 X L2 Z Z R L1 angular head tool L1/L2 0-8 L3 R 0 L3 L 3 gripper tool L1/L2 KORR.FH7 Fig. 5-5:: Specifying the correction type

165 MTC 200 NC programming instruction Tool Compensation 5-13 Number of tool edges DE 08 Basic tool data Data element 08 V22_ NUMBER OF TOOL EDGES Relevant for: Setup list (SL) X Tool list (TL) X Location list (LL) WGD_DE08_V22_ xls Explanation Each tool can have up to nine tool edge data records assigned, irrespective of the number of tool edges the tool actually has. To avoid wasting NC storage space, A Maximum tool edge number can be used to reduce the maximum number of tool edges to one tool edge per tool. In order to be able to be used for the scheduled machining process, the related tool must satisfy the number of tool edges that is requested in the setup list. Schneidenanzahl.FH7 Fig. 5-6: Examples of tools with varying number of tool edges Tool status (bits) DE 09 Data element 09 Setup list (SL) Tool list (TL) Location list (LL) Basic tool data Relevant for: TOOL STATUS V22_ See description of the individual bits WGD_DE09_V22_ xls Tool status bits provide information about the current state of the tools and their locations. Classification They can be subdivided into status bits that are setup list-, location- and tool-specific: Setup list-specific status bits describe the status of a tool with respect to the requirements of the setup list. Location-specific status bits reflect the status of a location. Tool-specific status bits describe the status of a tool.

166 5-14 Tool Compensation MTC 200 NC programming instruction Group name The following table lists all tool status bits. The table is followed by a detailed explanation of the individual bits. Tool status bits 1-16 from basic tool data element 09 Group information Write access Type Symbol Value Bit Byte Word TM OP ASP SL TL LL Comment Presence Tool not available! 1 Tool available 0 Tool is not required? 1 Tool required 0 1 X X X Tool is missing 2 Tool not required for processing Error: Correction type wrong t 1 correction type Correction type not wrong 0 Error: Incorrect number of tool edges e 1 tool edge number Correct number of tool edges 0 Error: tool edge Tool edge(s) incorrect f 1 Tool edge(s) not incorrect 0 3 X X X 4 X X X 5 LOW byte 0-7 Correction type does not accord with the requirements Number of cutters does not accord with the requirements Tool edge data do not comply with requirements Error: tool code Tool code incorrect $ 1 Tool code correct 0 6 Does not accord with the requirements Reserved for extensions 7 Reserved for extensions 8 Location locking Location locked B 1 Location not locked 0 LOW WORD X X X X X ASP/OP: Location is damaged, for example. TM: Tool is entered Reserved for extensions Upper half-location locking 10 Reserved for extensions Lower half-location locking 11 Upper half-location reservation Lower half-location reservation Upper half-location reserved ) 1 Upper half-location not reserved 0 Lower half-location reserved ( 1 Lower half-location not reserved 0 High byte X X X X 13 X X X X Reserved for temp. moved tools Reserved for temp. moved tools Reserved for extensions Upper half-location locking 14 Reserved for extensions Lower half-location locking 15 Location assignment TM - Tool management OP - Operator ASP - Application-specific programs in PLC or NC LL - Location-specific status bit Location assigned + 1 Location not assigned 0 16 X X X SL - Setup list-specific status bit TL - Tool list-specific status bit Fig. 5-7: Tool status bits 1-16 from basic tool data element 09 There is a tool at this location WSB_all_V22_ xls

167 MTC 200 NC programming instruction Tool Compensation 5-15 Group name Tool status bits from basic tool data element 09 Group information Write access Type Symbol Value Bit Byte Word TM OP ASP SL TL LL Comment Wear state Name of alternate Tool coding Tool block Tool breakage Tool is worn out d 1 The remaining lifetime of Tool is not worn out 0 17 X X the tool has elapsed (replace) Warning limit is reached w 1 Warning limit not reached 0 18 X X The remaining lifetime is about to expire (replace) Machining tool p 1 There is a processing tool No machining tool 0 19 X X for every alternate tool group Replacement tool s 1 A replacement tool is a No replacement tool 0 20 X X tool still to be used, not a processing tool Tool with fixed location coding C 1 The tool may only be Tool without fixed location coding 0 21 X X X X changed into the predefined tool location Tool locked L 1 Tool is not locked 0 Tool broken D 1 Tool is not broken 0 Reserved for extension 24 User tool status 1 User tool status 2 User tool status 3 User tool status 4 User tool status 5 User tool status 6 User tool status 7 User tool status 8 TM - Tool management User tool status bit 1 A User tool status bit 2 A User tool status bit 3 A User tool status bit 4 A User tool status bit 5 A User tool status bit 6 A User tool status bit 7 A User tool status bit 8 A OP - Operator ASP - Application-specific programs in PLC or NC LL - Location-specific status bit LOW byte X X X Tool must not be used 23 X X X Tool is damaged: e.g. broken tool edge 25 X X X Any meaning 26 X X X Any meaning 27 X X X Any meaning High-Byte 0-7 High word X X X Any meaning 29 X X X Any meaning 30 X X X Any meaning 31 X X X Any meaning X X X Any meaning SL - Setup list-specific status bit TL - Tool list-specific status bit T - Tool Fig. 5-8: Tool status bits from basic tool data element 09 WSB_all_V22_ xls

168 5-16 Tool Compensation MTC 200 NC programming instruction Note: The group definitions in the left column of the previous table are only used for display (expedient reduction of the data for the end user). These groups are not taken into consideration within the CNC. Status bits with capital letters inform the operator that he can change their status, if he desires, using the user interface, the PLC or the NC user program. Status bits with lower case letters can not be influenced by the user. They are administrated by NC tool management. Setup List-Specific Tool Status Bits If a tool cannot be used for the subsequent machining process, the setup list-specific status bits provide detailed information about the cause. Solely tool management updates setup list-specific status bits. Neither CNC nor PLC nor the operator can modify the states of these bits. The setup list-specific status bits are not loaded into the PC when the tool list is saved. Tool not available DE 09 Bit 1 Basic tool data Data element 09 Tool status Tool status bit 1: Tool not available Group information Value Symbol Tool not available 1! V22_ Tool available 0 Relevant for: Write access: Setup list (SL) X Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_1_V22_ xls Meaning Symbol Updating time Effects A tool marked with such a status bit is missing; it is not contained in the tool storage unit.! (request to the operator) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Program start is not possible

169 MTC 200 NC programming instruction Tool Compensation 5-17 Tool is not required DE 09 Bit 2 Meaning Symbol Updating time Effects Data element 09 Basic tool data Tool status Tool status bit 2: Tool is not required V22_ Group information Value Symbol Tool is not required 1? Tool required 0 Relevant for: Write access: Setup list (SL) X Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_2_V22_ xls A tool marked with such a status bit is not needed for the current machining process.? (question to the operator) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: No effects Correction type wrong DE 09 Bit 3 Meaning Symbol Updating time Data element 09 Basic tool data Tool status Tool status bit 3: Correction type wrong V22_ Group information Value Symbol Correction type wrong 1 t Correction type not wrong 0 Relevant for: Write access: Setup list (SL) X Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_3_V22_ xls A tool marked with such a status bit does not comply with the required correction type. t (type) During the equipment check

170 5-18 Tool Compensation MTC 200 NC programming instruction Effects Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Program start is not possible Incorrect number of tool edges DE 09 Bit 4 Meaning Symbol Updating time Effects Data element 09 Basic tool data Tool status Tool status bit 4: Incorrect number of tool edges Group information Value Symbol Incorrect number of tool edges 1 e Correct number of tool edges 0 Relevant for: Write access: V22_ Setup list (SL) X Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_4_V22_ xls The tool concerned does not possess the required number of tool edges. e (edge) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Program start is not possible Tool edge(s) incorrect DE 09 Bit 5 Data element 09 Basic tool data Tool status Tool status bit 5: Tool edge(s) incorrect Group information Value Symbol Tool edge(s) incorrect 1 f Tool edge(s) not incorrect 0 Relevant for: Write access: V22_ Setup list (SL) X Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_5_V22_ xls

171 MTC 200 NC programming instruction Tool Compensation 5-19 Meaning Symbol Updating time Effects There is at least one of the following faults for at least one tool edge: Incorrect tool edge orientation (e) L1 faulty (1) L2 faulty (2) L3 faulty (3) R incorrect f (fault) During the equipment check (r) Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Program start is not possible Location-Specific Tool Status Bits Location-specific status bits describe the status of a location. They are firmly allocated to specific locations and do not move along with the tool or the tool's data record. They are also loaded into the PC when the tool list is saved. Tool code incorrect DE 09 Bit 6 Basic tool data Data element 09 Tool status Tool status bit 6: Tool code incorrect V22_ Group information Value Symbol Tool code incorrect 1 $ Tool code correct 0 Relevant for: Write access: Setup list (SL) X Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_6_V22_ xls Meaning Symbol Updating time Effects The entry in DE 18 Tool code in the basic tool data of the tool list does not correspond with the one in the setup list. $ During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Program start is not possible

172 5-20 Tool Compensation MTC 200 NC programming instruction Tool Status Bits 7 and 8 DE 09 Bit 7 and Bit 8 Reserved for extensions. Location locked DE 09 Bit 9 Data element 09 Basic tool data Tool status bit 9: Location locked Tool status Group information Value Symbol Location locked 1 B Location not locked 0 Relevant for: Write access: V22_ Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) X Location list (LL) X User-specific programs in PLC or NC (USP) X WSB_9_V22_ xls Meaning Symbol Updating time Effects A locked location is not available to anybody. No tool may be stored in it. If the location contains a tool when locked, then the tool next to the location will not be available for machining. Tool management locks a location automatically while a tool is being entered using the "Entering a tool" function. B Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Any transfer requests that concern a locked location are not permitted (any attempt to do this will generate an error message and the NC program will be interrupted). A locked location cannot be approached using MFP (the location is not available) A tool in a locked location cannot be approached using MTP (the location and the tool are not available). A locked location can be approached only via the tool location number using the MMP motion command or via MOP. In addition to the locations in the magazine, spindles and/or grippers can also be locked.

173 MTC 200 NC programming instruction Tool Compensation 5-21 Tool Status Bits 10 and 11 DE 09 Bit 10 and Bit 11 Reserved for extensions. Upper half-location reserved DE 09 Bit 12 Basic tool data Data element 09 Tool status Tool status bit 12: Upper half-location reserved Group information Value Symbol Upper half-location reserved 1 ) Upper half-location not reserved 0 Relevant for: Write access: Setup list (SL) Tool management (TM) V22_ Tool list (TL) X Operator (OP) X Location list (LL) X User-specific programs in PLC or NC (USP) X WSB_12_V22_ xls Meaning Symbol Updating time Effects Tool status bit 12 is provided to identify the upper half-location of the tool location as "reserved". This status bit is not interpreted by the CNC. It can therefore be used like a user tool status bit. ) Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Currently no effects Lower half-location reserved DE 09 Bit 13 Basic tool data Data element 09 Tool status Tool status bit 13: Lower half-location reserved V22_ Group information Value Symbol Lower half-location reserved 1 ( Lower half-location not reserved 0 Relevant for: Write access: Setup list (SL) Tool management (TM) Tool list (TL) X Operator (OP) X Location list (LL) X User-specific programs in PLC or NC (USP) X WSB_13_V22_ xls

174 5-22 Tool Compensation MTC 200 NC programming instruction Meaning Symbol Updating time Effects Tool status bit 13 is provided to identify the lower half-location of the tool location as "reserved". This status bit is not interpreted by the CNC. It can therefore be used like a user tool status bit. ( Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Currently no effects Tool Status Bits 14 and 15 DE 09 Bit 14 and Bit 15 Reserved for extensions. Location assigned DE 09 Bit 16 Meaning Symbol Updating time Effects Data element 09 Basic tool data Tool status Tool status bit 16: Location assigned Group information Value Symbol Location assigned 1 + Location not assigned 0 Relevant for: Write access: V22_ Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) X User-specific programs in PLC or NC (USP) There is a tool in the location concerned. + WSB_16_V22_ xls In the tool list upon entry. In the current tool list when user interface input functions Insert, Remove, and Relocate are called. During each transfer. Restrictions for the operator: All desktop input functions are permitted User program: All data manipulations are permitted Tool management: A tool transfer to such a location is not permitted.

175 MTC 200 NC programming instruction Tool Compensation 5-23 Tool-Specific Tool Status Bits The tool-specific status bits describe the state of a tool. They move along with the tool and/or its data record. They are also loaded into the PC when a tool list is saved. Each tool can have up to 8 user-related tool status bits (see the documentation "Bosch Rexroth MTC 200 parameter description, system parameters Axx Axx.082"). Tool is worn out DE 09 Bit 17 Basic tool data Data element 09 Tool status Tool status bit 17: Tool is worn out Group information Value Symbol Tool is worn out 1 d V22_ Tool is not worn out 0 Relevant for: Write access: Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_17_V22_ xls Meaning Symbol Updating time Effects The remaining tool life of at least one tool edge is completely consumed (remaining tool life 0). This bit is also set if tool status bit D ("Tool broken") is set, even if all tool edge remaining times of the tool are still in the positive range. d (defective) Tool management updates the "Tool worn out" tool status bit together with the tool edge status bit of the existing tool edges: during the equipment check, during a transition to a different tool edge, when an edge is requested again when the tool is placed back in the magazine (tool storage = magazine) when the tool is rotated out of the machining position (tool storage = turret), when a tool is canceled using T0 (tool storage = turret or no tool storage present). if the data of the tool are modified using the interface or the PLC or if the tool is replaced Restrictions for the operator: All interface user functions are permitted, The remaining tool life can be reset with tool editor function "Edit". Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management:

176 5-24 Tool Compensation MTC 200 NC programming instruction The tool is no longer available for further machining. A worn-out tool can still be used for machining if it is a tool of the "Machining tool" status for which no further replacement tool exists. Warning limit is reached DE 09 Bit 18 Meaning Symbol Updating time Effects Data element 09 Basic tool data Tool status Tool status bit 18: Warning limit is reached Group information Value Symbol Warning limit is reached 1 w Warning limit not reached 0 Relevant for: Write access: V22_ Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_18_V22_ xls The remaining tool life of at least one tool edge has reached the warning limit. This bit is also set if tool status bit D ("Tool broken") is set, even if all tool edge remaining times of the tool are still below the warning limit. Tools that have reached the warning limit should be replaced together with the worn-out tools as soon as possible. w (warning limit) Tool management updates this tool status bit together with the "Warning limit reached" tool edge status bit of the existing tool edges: during the equipment check, during a transition to a different tool edge, when an edge is requested again when the tool is placed back in the magazine (tool storage = magazine) when the tool is rotated out of the machining position (tool storage = turret), when a tool is canceled using T0 (tool storage = turret or no tool storage present). if the data of the tool are modified using the interface or the PLC or if the tool is replaced Restrictions for the operator: All interface user functions are permitted, The remaining tool life can be reset with tool editor function "Edit". Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: A tool whose warning limit has been reached remains a "machining tool" until it is worn out or locked.

177 MTC 200 NC programming instruction Tool Compensation 5-25 Note: The "w: Warning limit reached" (data element 09 / bit 18) status signal is set towards the PLC if tool management determines that a tool has reached the warning limit and that no further alternate tool is available. Machining tool DE 09 Bit 19 Meaning Symbol Updating time Effects Data element 09 Basic tool data Tool status bit 19: Machining tool Tool status V22_ Group information Value Symbol Machining tool 1 p No machining tool 0 Relevant for: Write access: Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_19_V22_ xls The "p: Machining tool" status bit characterizes a tool in a group of alternate tools that becomes the active tool the next time T is invoked (via the tool number that is common to them all). The correction values and the tool life data of this tool are used for further machining. p (primary tool) During the equipment check when the tool is brought back to the magazine (tool storage unit = magazine), when the tool is rotated out of the machining position (tool storage = turret) when a tool is canceled using T0 (tool storage = turret or no tool storage present). Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: in the case of MTP, the current machining tool is always used.

178 5-26 Tool Compensation MTC 200 NC programming instruction DE 09 Bit 20 Replacement tool Basic tool data Data element 09 Tool status Tool status bit 20: Replacement tool Group information Value Symbol Replacement tool 1 s V22_ No replacement tool 0 Relevant for: Write access: Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) WSB_20_V22_ xls Meaning Symbol Updating time Effects Example A tool from a group of alternate tools is called a "replacement tool" if it is not yet worn out and is not assigned the "p: Machining tool" status. The duplo number specifies the sequence in which the replacement tools are employed. s (secondary tool) during the equipment check, when the tool is placed back in the magazine (tool storage = magazine) when the tool is rotated out of the machining position (tool storage = turret), when a tool is canceled using T0 (tool storage = turret or no tool storage present). Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: in the case of "MTP", the machining tool is used first. Following is an example for the selection of an active tool from an alternate tool chain with 4 tools. The illustration below shows a table for the tool with T No. 77, which is present a total of 4 times. The activation order for the current processing tool is displayed in the next figure. T No. Duplo No. Status Meaning T77 D1 p Production tool T77 D2 d Tool is worn out T77 D31 s Alternate tool T77 D4 d Tool is worn out Fig. 5-9: Table for alternate tool selection

179 MTC 200 NC programming instruction Tool Compensation 5-27 T77 D1 T77 D3 T77 D2 T77 D4 T77 D1 Duplo Number Tool Number (T-No.) SchwesterWZ.FH7 Fig. 5-10: Selection of replacement tools from an alternate tool chain Tool with fixed location coding DE 09 Bit 21 Basic tool data Data element 09 Tool status Tool status bit 21: Tool with fixed location coding V22_ Group information Value Symbol Tool with fixed location coding 1 C Tool without fixed location coding 0 Relevant for: Write access: Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) X Location list (LL) User-specific programs in PLC or NC (USP) X WSB_21_V22_ xls Meaning Symbol Updating time Effects Tool status bit 21 is used to identify if the tool should be brought back to the original location in the tool magazine (tool basic data, DE 11 Old location) or not. This status bit is not interpreted by the CNC. C Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Currently no effects

180 5-28 Tool Compensation MTC 200 NC programming instruction Tool locked DE 09 Bit 22 Basic tool data Data element 09 Tool status Tool status bit 22: Tool locked Group information Value Symbol Tool locked 1 L Tool is not locked 0 Relevant for: Write access: Setup list (SL) Tool management (TM) V22_ Tool list (TL) X Operator (OP) X Location list (LL) User-specific programs in PLC or NC (USP) X WSB_22_V22_ xls Meaning Symbol Updating time Effects A locked tool is no longer available for machining. L Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: A locked tool must not be taken into account for MTP. It is no longer available for machining, even if no further alternate tools exist. Tool broken DE 09 Bit 23 Basic tool data Data element 09 Tool status Tool status bit 23: Tool broken V22_ Group information Value Symbol Tool broken 1 D Tool is not broken 0 Relevant for: Write access: Setup list (SL) Tool management (TM) Tool list (TL) X Operator (OP) X Location list (LL) User-specific programs in PLC or NC (USP) X WSB_23_V22_ xls Meaning Symbol A broken tool is no longer available for machining. D

181 MTC 200 NC programming instruction Tool Compensation 5-29 Updating time Effects Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: A broken tool must not be taken into account for MTP. A broken tool is no longer available for machining, even if no other replacement tool is available. If interface signal PxxC.MGITW (Command MaGazine Ignore Tool Worn Out) has been set, the NC program terminates with an error message during the equipment check if there is an alternate tool sequence that does not have any usable tool, including a tool that is worn or broken but otherwise usable. Tool Status Bit 24 DE 09 Bit 24 Reserved for extensions. User tool status bits 1-8 DE 09 Bit 25 to Bit 32 Basic tool data Data element 09 Tool status Tool status bits 25-32: User tool status bits 1-8 V22_ Group information Value Symbol User tool status bit 1 1 any 0 Relevant for: Write access: Setup list (SL) Tool management (TM) Tool list (TL) X Operator (OP) X Location list (LL) User-specific programs in PLC or NC (USP) X WSB_25_32_V22_ xls Meaning Symbol Updating time Effects The programmer can utilize user tool status bits 1-8 to record machinespecific, tool-relevant, binary information. For example, information such as "Tool has already been resharpened", "Tool has coolant/lubricant hole" or "Tool requires coolant" can be entered. any (according to the set system parameters) A A Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Not taken into account in tool management

182 5-30 Tool Compensation MTC 200 NC programming instruction Location Data Free half-locations DE 10 Basic tool data Data element 10 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) V22_ Free half-locations X WGD_DE10_V22_ xls Meaning Updating time Effects The datum Free half-locations is not displayed and is currently not stored with an NC function. The programmer can use it to administrate information concerning occupied/available half-locations in the tool magazine. As a result, it is possible, for example, to partially or totally block neighboring magazine locations for extra-wide tools in order to prevent collisions in the tool storage unit. Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Not taken into account in tool management DE 11 Old pocket Basic tool data Data element 11 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Old pocket X V22_ WGD_DE11_V22_ xls Explanation The datum Old pocket is not displayed. It is included in the data record in order to be able to ensure the associated fixed location, in addition to the other data items, for fixed location-encoded tools that are in a spindle.

183 MTC 200 NC programming instruction Tool Compensation 5-31 Storage of the next replacement tool DE 12 Explanation Data element 12 Setup list (SL) Tool list (TL) Location list (LL) Basic tool data Relevant for: V22_ Stor. of next replacement tool X WGD_DE12_V22_ xls Data element 12 Storage of the next replacement tool describes the storage unit in which the next tool of an alternate tool sequence can be found. It indicates if the replacement tool is in a 0 = Magazine or turret location 1 = Spindle or 2 = Gripper. Please remember that the alternate tool sequence is closed. Provided that all tools are useable, this means that the last tool in this sequence is also the penultimate tool in the first sequence. Location of the next replacement tool DE 13 Explanation Data element 13 Setup list (SL) Tool list (TL) Location list (LL) Basic tool data Relevant for: V22_ Loc. of next replacement tool X WGD_DE13_V22_ xls Data element 13 Location of the next replacement tool describes the location at which the next tool of an alternate tool sequence can be found. It contains the number of magazine or turret location, spindle, or gripper. Please remember that the alternate tool sequence is closed. Provided that all tools are useable, this means that the last tool in this sequence is the penultimate tool with respect to the first one (Location of the previous replacement tool). Storage of the previous replacement tool DE 14 Explanation Basic tool data Data element 14 Setup list (SL) Tool list (TL) Location list (LL) Relevant for: V22_ Stor. of prev. rep. tool X WGD_DE14_V22_ xls Data element 14 Storage of the previous replacement tool describes the storage unit in which the previous tool of an alternate tool sequence can be found.

184 5-32 Tool Compensation MTC 200 NC programming instruction It indicates if the previous replacement tool is in a 0 = Magazine or turret location 1 = Spindle or 2 = Gripper. Please remember that the alternate tool sequence is closed. Provided that all tools are useable, this means that the last tool in this sequence is also the penultimate tool in the first sequence (Location of the previous replacement tool). Location of the previous replacement tool DE 15 Basic tool data Data element 15 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Loc. of prev. rep. tool X V22_ WGD_DE15_V22_ xls Explanation Data element 15 Location of the previous replacement tool describes the location at which the previous tool of an alternate tool sequence can be found. It contains the number of magazine or turret location, spindle, or gripper. Please remember that the alternate tool sequence is closed. Provided that all tools are useable, this means that the last tool in this sequence is also the penultimate tool in the first sequence. T12 D1 previous spare tool of T12 D1 T12 D3 next spare tool of T12 D1 T12 D2 Kette.FH7 Fig. 5-11: Display of an alternate tool sequence with three tools Note: Data elements DE12 Storage of the next replacement tool, DE13 Location of the next replacement tool, DE14 Storage of the previous replacement tool and DE15 Location of the previous replacement tool can be read only via a user-specific program in the PLC or NC with the help of the TLD_RD (PLC) or TLD (NC) commands.

185 MTC 200 NC programming instruction Tool Compensation 5-33 Units Time unit DE 16 Basic tool data Data element 16 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Time unit X V22_ WGD_DE16_V22_ xls Explanation Available time units are minutes [min] or NC cycles [cycle]. All tool life data of the tool or the alternate tools (with the exception of the remaining tool life in percent and warning limit in percent) are measured and updated in the time unit that is selected here. When time unit "Cycles" is selected, a single cycle is defined as the time between tool deactivation (e.g. changing into the spindle) and deactivation (removing from the spindle). DE 17 Unit of length Basic tool data Data element 17 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Unit of length X X V22_ WGD_DE17_V22_ xls Explanation All geometry data items of a tool can be entered either in millimeters [mm] or in inches [inch]. The length unit in the setup list need not be the same as the one in the tool list. When they are loaded into the controller, all geometry data items are converted into the basic unit for programming that is valid for the process. Technology Data DE 18 Tool code Basic tool data Data element 18 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Tool code X X V22_ WGD_DE18_V22_ xls Explanation Data element 18 Tool code is significant for "Grinding" technology, which is set with system parameter A Tool technology. Please refer to section "Grinding Wheel-Specific Tool Data" for details on the tool code.

186 5-34 Tool Compensation MTC 200 NC programming instruction Representation type DE 19 Explanation Data element 19 Setup list (SL) Tool list (TL) Location list (LL) Basic tool data Relevant for: Representation type X X V22_ WGD_DE19_V22_ xls Data element 19 Representation type is significant for "Grinding" technology, which is set with system parameter A Tool technology. Please refer to section "Grinding Wheel-Specific Tool Data" for details on the representation type. User Tool Data User Tool Data 1-9 DE 20 to 28 Explanation Basic tool data V22_ Data element User data 1-9 Setup list (SL) Tool list (TL) Location list (LL) Relevant for: X WGD_DE20_28_V22_ xls Tool user data items 1-9 in the basic tool data permit any user-related status information to be allocated to a tool. When the required designation is entered in system parameters A A00.069, the user data are accepted in the tool data record and are displayed in the offline tool list and the current tool list. In the offline tool list, the user data can be synchronously prepared in the same way as the other data items. Examples of user data in the basic tool data are: the weight of the tool (influences e.g. the velocity of the tool change), the maximum speed of the tool, the maximum dimensions of the tool (for collision checks).

187 MTC 200 NC programming instruction Tool Compensation 5-35 Tool Group Data Tool group data are relevant for tool group management. DE 30 Group number Basic tool data Data element 30 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Group number X V23_ WGD_DE30_V23_ xls Explanation The tool is allocated to a tool group. A reliable value for the group number is "0" or higher; the higher values are limited by the contents of machine parameter Bxx.073 "Number of tool groups" (0-99). Group duplo number DE 31 Basic tool data Data element 31 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) V23_ Group duplo number X WGD_DE31_V23_ xls Explanation The tool duplo number is used for: uniquely identifying alternate groups and specifying the utilization sequence of the alternate groups With one exception, the group duplo number should be in the range [0-99]. If the group number contains the value "0", only the value "0" is permitted for the group duplo number. DE 32 Group status Basic tool data Data element 32 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Group status X V23_ WGD_DE32_V23_ xls Explanation Data element "Group status" exists for each tool group. It can be accessed both through tool addressing and through group addressing. The following table lists all group status bits. The table is followed by a detailed explanation of the individual bits.

188 5-36 Tool Compensation MTC 200 NC programming instruction Tool groups: Group status (data element 32) V23_ Status Status bit Symbol Value Bit Write access Type TM OP ASP GL Comment Presence Group status Wear state Name of alternate Group not available! 1 1 X X Group exists 0 Group is not required? 1 2 X X Group is required 0 Group disabled L 1 3 X X X Group not disabled 0 Group worn d 1 4 X X Group not worn 0 Warning limit is reached w 1 5 X X Warning limit not reached 0 Machining group p 1 6 X X Not a machining group 0 Spare group s 1 7 X X Not a spare group 0 Tool in this group is missing No tool in this group is required User-programmable At least one alternate tool sequence of the group is worn. At least one alternate tool sequence of the group has reached the warning limit. Group is machining group Group is alternate group Reserved for extension 8 User group status 1 User group status bit 1 any User group status 2 User group status bit 2 any User group status 3 User group status bit 3 any User group status 4 User group status bit 4 any User group status 5 User group status bit 5 any User group status 6 User group status bit 6 any User group status 7 User group status bit 7 any User group status 8 User group status bit 8 any 1 9 X X X X X X X X X X X X X X X X X X X X X X X X 0 Any meaning Any meaning Any meaning Any meaning Any meaning Any meaning Any meaning Any meaning TM - Tool management OP - Operator ASP - Application-spec. programs on the PLC or NC LL - Location-specific status bit SL - Setup list-specific status bit TL - Tool list-specific status bit OPT - Optional datum GL - Tool group list-specific status bit WZG_all_V23_ xls Fig. 5-12: Tool groups: group status (data element 32)

189 MTC 200 NC programming instruction Tool Compensation 5-37 Group not available DE 32 Bit 1 Meaning Symbol Updating time Effects Data element 32 Basic tool data Group status bit 1: Group not available Group status Status information Value Symbol Group not available 1! Group exists 0 Relevant for: Write access: V23_ Setup list (SL) Tool management (TM) X Tool list (TL) Location list (LL) Group list (GL) X Operator (OP) User-specific programs in PLC or NC (USP) WZG_1_V23_ xls A tool group indicated in this way is viewed as not existing because it does not contain any tools.! (request to the operator) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: Currently no effects Group is not required DE 32 Bit 2 Meaning Symbol Data element 32 Basic tool data Group status Group status bit 2: Group is not required Status information Value Symbol Group is not required 1? Group is required 0 Relevant for: Write access: V23_ Setup list (SL) Tool management (TM) X Tool list (TL) Location list (LL) Group list (GL) X Operator (OP) User-specific programs in PLC or NC (USP) WZG_2_V23_ xls A tool group indicated in this way does not contain any of the tools present in the setup list. If there is no setup list, all groups are automatically considered as required.? (question to the operator)

190 5-38 Tool Compensation MTC 200 NC programming instruction Updating time Effects During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: No effects Group disabled DE 32 Bit 3 Basic tool data Data element 32 Group status Group status bit 3: Group disabled V23_ Status information Value Symbol Group disabled 1 L Group not disabled 0 Relevant for: Write access: Setup list (SL) Tool management (TM) Tool list (TL) Operator (OP) X Location list (LL) Group list (GL) X User-specific programs in PLC or NC (USP) X WZG_3_V23_ xls Meaning Symbol Updating time Effects A locked tool group is no longer available for machining. L Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: A locked tool group must not be taken into account for "MTP" It is no longer available for machining.

191 MTC 200 NC programming instruction Tool Compensation 5-39 Group worn DE 32 Bit 4 Meaning Symbol Updating time Effects Data element 32 Basic tool data Group status bit 4: Group worn Group status V23_ Status information Value Symbol Group worn 1 d Group not worn 0 Relevant for: Write access: Setup list (SL) Tool management (TM) X Tool list (TL) Location list (LL) Group list (GL) X Operator (OP) User-specific programs in PLC or NC (USP) WZG_4_V23_ xls A tool group is considered to be worn once the first alternate tool sequence of the group is worn. d (defective) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: A worn tool group is no longer available for machining. Note: If tool management determines that a tool group is worn and no other alternate tool group is available, interface signal "PxxS.MGTWO" is set. Warning limit is reached DE 32 Bit 5 Data element 32 Basic tool data Group status Group status bit 5: Warning limit is reached V23_ Status information Value Symbol Warning limit is reached 1 w Warning limit not reached 0 Relevant for: Write access: Setup list (SL) Tool management (TM) X Tool list (TL) Location list (LL) Group list (GL) X Operator (OP) User-specific programs in PLC or NC (USP) WZG_5_V23_ xls

192 5-40 Tool Compensation MTC 200 NC programming instruction Meaning Symbol Updating time Effects This group status bit is set as soon as the first alternate tool sequence of the tool group has reached the warning limit. w (warning limit) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: A tool group whose warning limit has been reached remains a "machining tool group" until it is worn out or locked. Note: If tool management determines that a tool group has reached the warning limit and no other alternate tool group is available, interface signal PxxS.MGWRN is set. Machining group DE 32 Bit 6 Meaning Symbol Updating time Effects Data element 32 Basic tool data Group status Group status bit 6: Machining group Status information Value Symbol Machining group 1 p Not a machining group 0 Relevant for: Write access: V23_ Setup list (SL) Tool management (TM) X Tool list (TL) Location list (LL) Group list (GL) X Operator (OP) User-specific programs in PLC or NC (USP) WZG_6_V23_ xls The non-worn, non-locked tool group with the lowest group duplo number is indicated as the machining group. p (primary tool group) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: In the case of "MTPb", the tool is always taken from the machining group.

193 MTC 200 NC programming instruction Tool Compensation 5-41 Spare group DE 32 Bit 7 Meaning Symbol Updating time Effects DE 32 Bit 8 Group list (GL) Data element 32 Basic tool data Group status bit 7: Spare group Group status Status information Value Symbol Spare group 1 s Not a spare group 0 Relevant for: Write access: V23_ Setup list (SL) Tool management (TM) X Tool list (TL) Location list (LL) X Operator (OP) User-specific programs in PLC or NC (USP) WZG_7_V23_ xls A tool group from a group of alternate tool groups is called a "replacement group" if it is not yet worn out and is not assigned the "Machining tool" status. The group duplo number specifies the sequence in which the replacement groups are employed. s (secondary tool group) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: In the case of "MTP", the tool is always taken from the machining group. Group status bit 8 Reserved for extensions. User group status bits 1-8 DE 32 Bit 9 to Bit 16 Basic tool data Data element 32 Group status V23_ Group status bits 9-16: User group status bits 1-8 Status information Value Symbol User group status bit n 1 any 0 Relevant for: Write access: Setup list (SL) Tool management (TM) Tool list (TL) Operator (OP) X Location list (LL) Group list (GL) X User-specific programs in PLC or NC (USP) X WZG_9-16_V23_ xls

194 5-42 Tool Compensation MTC 200 NC programming instruction Meaning Symbol Updating time Effects User group status bits 1-8 permit any user-related status information to be allocated to a tool group. any Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: No effects Other User Tool Data DE 99 Comment Basic tool data Data element 99 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Comment X V22_ WGD_DE99_V22_ xls Explanation Each entry in the setup list can be assigned a comment of up to 5 x 76 characters, provided this has been selected in system parameter A Comment (assembly instructions). The comment can be used for related information for each group of alternate tools (assembly instructions, for example). Note: The comment is available on the user interface only. 5.4 Tool Edge Data Tool edge data are part of the tool data record and contain the geometry and wear data of tools. Every tool data record can contain up to 9 tool edge data records. The max. number of tool edge data records is determined in system parameter A Maximum tool edge number. The data elements of tool edge data records can be subdivided into the following groups: Tool edge identification, Tool life data, Geometry data, Geometry limit values, Wear factors, User data. The following table contains all the data elements of a tool edge data record:

195 MTC 200 NC programming instruction Tool Compensation 5-43 Tool edge data (per tool edge) V22_ DESIGNATION VALUE RANGE DATA TYPE in PLC UNIT DE OPT. SL TL Tool edge identification Tool edge position 0-8 USINT 01 X X Tool edge status 0; 1 (16 status bits) WORD 02 X Tool life data Remaining tool life REAL % 03 A X Warning limit REAL Max. utilization time (0: tool life recording switched off) Time used REAL Geometry data 04 A X REAL min. or 05 A X cycles 06 A X Length L1 DINT 07 X Length L2 DINT 08 X Length L3 DINT 09 X Radius R DINT 10 X Wear L DINT mm 11 A X Wear L2 or DINT or 12 A X Wear L DINT inches 13 A X Wear R DINT 14 A X Offset L1 DINT 15 A X Offset L2 DINT 16 A X Offset L3 DINT 17 A X Offset R DINT 18 A X Geometry limit values L1_min DINT 19 A X L1_max DINT 20 A X L2_min DINT mm 21 A X L2_max or DINT or 22 A X L3_min DINT inches 23 A X L3_max DINT 24 A X R_min DINT 25 A X R_max DINT 26 A X Wear factors Wear factor L1 DINT mm/min, 27 A X Wear factor L inches/min or or DINT cycles 28 A X Wear factor L DINT 29 A X Wear factor R User data DINT 30 A X User data 1 REAL any 31 A X User data 2 +/- 1.2 * /- 3.4 * REAL any 32 A X User data 3 and REAL any 33 A X User data 4 0 (9 significant digits) REAL any 34 A X User data 5 REAL any 35 A X User data 6 DINT any 36 A X User data DINT any 37 A X User data 8 or DINT any 38 A X User data DINT any 39 A X User data 10 DE - Data element OPT - Optional datum SL - Setup list-specific datum TL - Tool list-specific datum Fig. 5-13: Tool edge data (per tool edge) DINT any 40 A X SD_all_V22_ xls

196 5-44 Tool Compensation MTC 200 NC programming instruction Tool Edge Identification All data elements of the tool edge data record will be described in groups in the following. Tool edge position DE 01 Tool edge data Date element 01 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Optional datum Tool edge position X X V22_ SD_DE01_V22_ xls Explanation The tool edge orientation enables the tools of correction types 3 (turning tool) and 4 (angle head tool) to be measured with respect to the theoretical tool tip "P" so that inaccuracies do not result from future machining. L2 Y(G17) X(G18) Z(G19) S S S S S S P P P P P P 5 S P P P=S P 0 P P S 7 L1 X(G17) Z(G18) Y(G19) 5 S P P P=S P 0 P P S 7 L1 X(G17) Z(G18) Y(G19) S S S S S S L2 Fig. 5-14: Possible positions of a tool edge Y(G17) X(G18) Z(G19) SCHNEIDENLAGE.FH7 If no edge radius/cutter radius path compensation is active, theoretical edge tip "P" is used as the reference point for the controller. Thus, theoretical tool tip "P" moves on the programmed contour. With movements that are not parallel to the axis, this leads to minor inaccuracies.

197 MTC 200 NC programming instruction Tool Compensation 5-45 Z X P B S P B S P B S P BB S P B R S Edge orientation 3 : resulting contour : path of theoretical Edge peak "P" (programmed contour) : path of Edge center "S" P : theoretical edge peak S : edge center B : actual touch point UNSCHNEIDE.FH7 Fig. 5-15:: Errors that occur if machining is performed without using tool edge radius / cutter radius path compensation The shaded area in figure Fig. 5-15: will not be removed since the controller is using theoretical edge tip "P" as its point of reference. Note: Tool edge center "S" is the reference point for the controller if length compensation is active and tool edge / cutter radius compensation is switched off. When tool edge radius / cutter radius compensation is active, the CNC automatically moves the actual contact point "B" along the programmed contour. Thus, the resulting contour is identical to the programmed contour.

198 5-46 Tool Compensation MTC 200 NC programming instruction Tool edge status bits DE 02: Tool edge data Data element 02 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Optional datum Tool edge status X V22_ SD_DE02_V22_ xls Explanation Setup list-specific tool edge status bits Tool-specific tool edge status bits Tool edge status bits provide information about the current state of the related tool edge. They can be subdivided into status bits that are setup listspecific and tool-specific. Setup list-specific status bits 1-5 describe the status of a tool edge with respect to the requirements of the setup list. If a tool edge cannot be used for the subsequent machining process, the setup list-specific status bits provide detailed information about the cause. Exclusively tool management updates the setup list-specific status bits. Neither the CNC nor the PLC nor the operator can modify the states of these bits. The setup list-specific status bits are not loaded into the PC when the tool list is saved. Tool-specific tool edge status bits 9-16 describe the status of the associated tool edges. They "move" along with the tool and/or its data record. They are also loaded into the PC when a tool list is saved. Each tool edge can have up to 4 user-related tool edge status bits (see the documentation "Bosch Rexroth MTC 200 parameter description, system parameters Axx Axx.086"). The following table lists all tool edge status bits. The table is followed by a detailed explanation of the individual bits.

199 MTC 200 NC programming instruction Tool Compensation 5-47 Tool edge status bit from tool edge data element 02 Group name Group information Symbol Value Bit Write access TM OP ASP Type SL TL Comment Incorrect tool edge orientation Incorrect tool edge orientation o 1 Tool edge orientation is not incorrect 0 1 X X Tool edge data do not correspond to the definition L1 faulty L1 faulty 1 1 L1 not incorrect 0 2 X X Tool edge data do not correspond to the definition L2 faulty L2 faulty 2 1 L2 not incorrect 0 3 X X Tool edge data do not correspond to the definition L3 faulty L3 faulty 3 1 L3 not incorrect 0 4 X X Tool edge data do not correspond to the definition R incorrect R incorrect r 1 R not incorrect 0 5 X X Tool edge data do not correspond to the definition Reserved for extensions 6 Reserved for extensions 7 Reserved for extensions 8 Wear state Tool edge worn out d 1 Tool not worn out 0 Warning limit is reached w 1 Warning limit not reached 0 9 X X 10 X X The tool edge can no longer be used (replace) The remaining tool life of the tool edge is near its end (replace) Reserved for extensions 11 Reserved for extensions 12 User tool edge status 1 User tool edge status bit 1 A X X X Any meaning User tool edge status 2 User tool edge status 3 User tool edge status bit 2 A User tool edge status bit 3 A any X X X Any meaning 15 X X X Any meaning User tool edge status 4 User tool edge status bit 4 A X X X Any meaning SSB_all_V22_ xls TM - Tool management OP - Operator ASP - Application-specific programs in PLC or NC TL - Tool list-specific status bit SL - Setup list-specific status bit Fig. 5-16: Tool edge status bit from tool edge data element 02

200 5-48 Tool Compensation MTC 200 NC programming instruction Incorrect tool edge orientation DE 02 Bit 1 Meaning Symbol Updating time Effects Data element 02 Tool edge data Tool edge status Tool edge status bit 1: Incorrect tool edge orientation V22_ Group information Value Symbol Incorrect tool edge orientation 1 o Tool edge orientation is not incorrect Relevant for: 0 Write access: Setup list (SL) X Tool management (TM) X Tool list (TL) Location list (LL) Operator (OP) User-specific programs in PLC or NC (USP) SSB_1_V22_ xls The existing tool edge orientation does not correspond to the tool edge orientation that is required by the setup list. o (orientation) During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Machining (program start) is not possible Tool length L1 faulty DE 02 Bit 2 Meaning Symbol Data element 02 Tool edge data Tool edge status bit 2: L1 faulty Tool edge status Group information Value Symbol L1 faulty 1 1 L1 not incorrect 0 Relevant for: Write access: V22_ Setup list (SL) X Tool management (TM) X Tool list (TL) Location list (LL) Operator (OP) User-specific programs in PLC or NC (USP) SSB_2_V22_ xls The existing L1 tool length does not correspond to the required dimensions (the individual tool dimensions are calculated from geometry, wear and offset). 1

201 MTC 200 NC programming instruction Tool Compensation 5-49 Visualization Updating time Effects In the tool list and in the setup list During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Machining (program start) is not possible Tool length L2 faulty DE 02 Bit 3 Meaning Symbol Visualization Updating time Effects Data element 02 Tool edge data Tool edge status bit 3: L2 faulty Tool edge status Group information Value Symbol L2 faulty 1 2 L2 not incorrect 0 Relevant for: Write access: V22_ Setup list (SL) X Tool management (TM) X Tool list (TL) Location list (LL) Operator (OP) User-specific programs in PLC or NC (USP) SSB_3_V22_ xls The existing L2 tool length does not correspond to the required dimensions (the individual tool dimensions are calculated from geometry, wear and offset). 2 In the tool list and in the setup list During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Machining (program start) is not possible

202 5-50 Tool Compensation MTC 200 NC programming instruction Tool length L3 faulty DE 02 Bit 4 Meaning Symbol Visualization Updating time Effects Data element 02 Tool edge data Tool edge status bit 4: L3 faulty Tool edge status Group information Value Symbol L3 faulty 1 3 L3 not incorrect 0 Relevant for: Write access: V22_ Setup list (SL) X Tool management (TM) X Tool list (TL) Location list (LL) Operator (OP) User-specific programs in PLC or NC (USP) SSB_4_V22_ xls The existing L3 tool length does not correspond to the required dimensions (the individual tool dimensions are calculated from geometry, wear and offset). 3 In the tool list and in the setup list During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Machining (program start) is not possible Tool radius R incorrect DE 02 Bit 5 Meaning Symbol Data element 02 Tool edge data Tool edge status Tool edge status bit 5: R incorrect Group information Value Symbol R incorrect 1 r R not incorrect 0 Relevant for: Write access: V22_ Setup list (SL) X Tool management (TM) X Tool list (TL) Location list (LL) Operator (OP) User-specific programs in PLC or NC (USP) SSB_5_V22_ xls The existing tool radius R does not correspond to the required dimensions (the individual tool dimensions are calculated from geometry, wear and offset). r

203 MTC 200 NC programming instruction Tool Compensation 5-51 Visualization Updating time Effects In the tool list and in the setup list During the equipment check Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: Machining (program start) is not possible Tool Edge Status Bits 6, 7, and 8 DE 02 Bit 6 to 8 Reserved for extensions. Tool edge worn out DE 02 Bit 9 Meaning Symbol Updating time Effects Data element 02 Tool edge data Tool edge status Tool edge status bit 9: Tool edge worn out Group information Value Symbol Tool edge worn out 1 d Tool not worn out 0 Relevant for: Write access: V22_ Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) SSB_9_V22_ xls The remaining tool life of the tool edge is less than or equal to zero. d during the equipment check, during a transition to a different tool edge, when an edge is requested again when the tool is brought back to the magazine (tool = magazine), when the tool is rotated out of the machining position (tool storage = turret), when a tool is canceled using T0 (tool storage = turret or no tool storage present), if the data of the tool are modified using the interface or the PLC or if the tool is replaced. Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: A replacement tool must be used (if there is one) when the tool number concerned is invoked again.

204 5-52 Tool Compensation MTC 200 NC programming instruction Warning limit is reached DE 02 Bit 10 Meaning Symbol Updating time Effects Data element 02 Tool edge data Tool edge status TOOL EDGE STATUS BIT 10: WARNING LIMIT IS REACHED Group information Value Symbol Warning limit is reached 1 w Warning limit not reached 0 Relevant for: Write access: V22_ Setup list (SL) Tool management (TM) X Tool list (TL) X Operator (OP) Location list (LL) User-specific programs in PLC or NC (USP) The remaining tool life is less than the warning limit. w SSB_10_V22_ xls during the equipment check, during a transition to a different tool edge, when an edge is requested again when the tool is brought back to the magazine (tool = magazine), when the tool is rotated out of the machining position (tool storage = turret), when a tool is canceled using T0 (tool storage = turret or no tool storage present), if the data of the tool are modified using the interface or the PLC or if the tool is replaced. Restrictions for the operator: All interface user functions are permitted, Restrictions for the user program: All data manipulations are permitted. Restrictions for tool management: No immediate effect Tool Edge Status Bits 11 and 12 DE 02 Bit 11 and Bit 12 Reserved for extensions.

205 MTC 200 NC programming instruction Tool Compensation 5-53 User tool edge status bits 1-4 DE 02 Bit 13 to Bit 16 Tool edge data Data element 02 Tool edge status V22_ Tool edge status bits 13-16: User tool edge status bits 1-4 Group information Value Symbol User tool edge status bits any 0 Relevant for: Write access: Setup list (SL) Tool management (TM) Tool list (TL) X Operator (OP) X Location list (LL) User-specific programs in PLC or NC (USP) X SSB_13-16_V22_ xls Meaning Symbol Updating time Effects User tool edge status bits 1-4 permit any user-related status information to be allocated to a tool edge. any Possible at any time Restrictions for the operator: All desktop input functions are permitted Restrictions for the user program: All data manipulations are permitted Restrictions for tool management: No effects Tool Life Data Remaining tool life DE 03: Explanation Data element 03 Setup list (SL) Tool list (TL) Location list (LL) Tool edge data Relevant for: V22_ Remaining tool life Optional datum A X SD_DE03_V22_ xls The remaining tool life in percent specifies the wear state of a tool in percent, irrespective of the tool / workpiece material combination and the technology data.

206 5-54 Tool Compensation MTC 200 NC programming instruction First entry of remaining tool life t t Rest[%] Rest[%] t = t t = t Rest[min] Util[min] Rest[cycles] Util[cycles] *100 *100 t Rest[%] remaining tool life in percent t Rest[min] remaining tool life in min. t Rest[cycles] remaining tool life in cycles t Util[min] max. utilization time in min. t Util[cycles] max. utilization time in cycles Fig. 5-17: Calculation of remaining tool life in percent A new or resharpened tool has a remaining tool life of 100%. Correspondingly, a worn-out tool has a remaining tool life of 0%. Based on the remaining tool life in percent, tool management monitors and manages the wear state of the tool, irrespective of the tool / workpiece material combination of the existing machining processes. Negative remaining tool life Update remaining tool life To monitor the actual remaining tool life with the theoretical tool life defined from the production planning, tool management can also determine and manage negative remaining tool life. This allows the determination of the actual tool life, minimizing the tool costs. Tool management updates the remaining tool life automatically in percent: during the equipment check, during a transition to a different tool edge, when an edge is requested again when the tool is brought back to the magazine (tool storage unit = magazine), when the tool is rotated out of the machining position (tool storage = turret) when a tool is canceled using NC command T0 (tool storage = turret or no tool storage present). The following requirements must be satisfied in order to permit machining sequences to be taken into account in the calculation of the remaining tool life for a tool: an interpolation with feed movement must have been programmed for the tool (G1, G2, G3) and the tool must be programmed (= active). The calculation of the remaining tool life in percent is based on the following formula: t t Rest[%] Rest[%] = t = t Rest before[%] Rest before[%] t t t t On[min] Util[min] On[cycles] Util[cycles] *100 *100 t Rest[%] remaining tool life after tool utilization t Rest before[%] remaining tool life before tool utilization t On[min] contact time of the tool in min. (all programmed tool movements with feed rate) t On[cycles] contact time of the tool in cycles (all programmed tool movements with feed rate) t Util[min] max. utilization time in min. t Util[cycles] max. utilization time in cycles Fig. 5-18: Updating of remaining tool life in percent

207 MTC 200 NC programming instruction Tool Compensation 5-55 Each time that updating occurs, tool management checks the remaining tool life and sets the status "d" - Tool worn out (basic tool data element 09 / bit 17) if the remaining tool life of a tool has expired or is exceeded. If no further alternate tool that is not worn out is available for the tool whose remaining tool life is expired, interface signal PxxS.MGTWO (MaGazine Tool Worn Out) is set towards the PLC. For further information, see the description "Bosch Rexroth MTC 200 tool management", chapter "Movement control of a tool storage unit", section "Tool life monitoring: tool worn "PxxS.MGTWO"" or the description "Bosch Rexroth MTC 200 PLC interface description". Warning limit DE 04 Explanation Data element 04 Setup list (SL) Tool list (TL) Location list (LL) Tool edge data Relevant for: Warning limit Optional datum A X V22_ SD_DE04_V22_ xls The warning limit in percent is determined by the user and specifies the remaining tool life in percent at which tool management signals the "w" Warning limit reached status. During every update, tool management checks the remaining tool life and sets interface signal PxxS.MGWRN MGWRN (MaGazine WaRNing warning limit reached) to the PLC if the remaining tool life of a tool has reached the warning limit and all alternate tools also have the status "Tool warning limit reached". For further information, see the description "Bosch Rexroth MTC 200 tool management", chapter "Movement control of a tool storage unit", section "Tool life monitoring: warning limit reached "PxxS.MGWRN"" or the description "Bosch Rexroth MTC 200 PLC interface description". Max. utilization time DE 05 Explanation Data element 05 Setup list (SL) Tool list (TL) Location list (LL) Tool edge data Relevant for: V22_ Max. utilization time Optional datum A X SD_DE05_V22_ xls The maximum utilization time is the cutting time in minutes or NC cycles during which a tool is used for cutting for a specific tool/material combination, from resharpening to the worn-out state, and under equal cutting conditions. The Maximum utilization time is determined by the user. Note: Entering "0" for the maximum utilization time switches off the tool life updating process of the tool concerned.

208 5-56 Tool Compensation MTC 200 NC programming instruction Time used DE 06 Explanation Tool edge data Data element 06 Relevant for: Setup list (SL) Tool list (TL) Location list (LL) Time used X Optional datum A V22_ SD_DE06_V22_ xls DE 06 Time used is not displayed and currently not interpreted in the NC. Geometry Data Explanation When the corresponding correction is active, the dimensions of a tool are compensated automatically using the geometry data. The geometry data items are subdivided as follows: Geometry (register) Wear (register) Offset (register) Length L1 Length L2 Length L3 Radius R Wear L1 Wear L2 Wear L3 Wear R Offset L1 Offset L2 Offset L3 Offset R The wear and offset registers can be activated using system parameters A Wear register and A Offset register Geometry register: Length L1 / L2 / L3 / radius R DE Tool edge data Data element 07 Data element 08 Data element 09 Length L1 Length L2 Length L3 V22_ Data element 10 Setup list (SL) Tool list (TL) Location list (LL) Optional datum Relevant for: Radius R X SD_DE07_10_V22_ xls The geometry registers are used as program-independent memories that assist in compensating the tool dimensions.

209 MTC 200 NC programming instruction Tool Compensation 5-57 Wear registers: Wear L1 / L2 / L3 / radius R DE Tool edge data Data element 11 Data element 12 Data element 13 Wear L1 Wear L2 Wear L3 V22_ Data element 14 Setup list (SL) Tool list (TL) Location list (LL) Relevant for: Wear R Optional datum A X SD_DE11_14_V22_ xls The CNC uses wear registers for compensating the time-related wear of the tools with the help of the wear factors. To do this, it calculates the associated wear value at certain points in time (see "Wear factors") and adds it to the existing values in the wear registers. As long as the wear factors (tool edge data elements 27-30) have not been activated in system parameter A Wear factors or are set to zero in the data records, the wear registers are exclusively available to the user. The wear registers can be influenced by tool editor function "Edit" (see the documentation "Bosch Rexroth MTC 200 tool management user description") and by user-configurable HMI function "Acknowledge tool change/ tool breakage" (see the WIN-HMI documentation "Bosch Rexroth MTC 200 / ISP 200 / MTA 200 WinHMI user interface user description") Besides resetting the remaining tool life in percent to 100%, all wear registers belonging to the tool will be deleted and the tool will be enabled again for processing (basic tool data - tool status bit 22 = "0"). Note: If the wear registers in system parameter A Wear register are not selected, they will be internally set to zero.

210 5-58 Tool Compensation MTC 200 NC programming instruction Offset registers: Offset L1 / L2 / L3 / radius R DE Tool edge data V22_ Data element 15 Data element 16 Data element 17 Data element 18 Offset L1 Offset L2 Offset L3 Offset R Relevant for: Setup list (SL) Tool list (TL) X Location list (LL) Optional datum A SD_DE15_18_V22_ xls The CNC does not influence the offset registers. Like the wear registers, they may be used for compensating dimensional deviations that are determined either by the user or by a measuring control action. The offset registers may also be used as memories for additional offsets, such as for the compensation of adapter dimensions. Note: If the offset registers in system parameter A Offset register are not selected, they will be internally set to zero. Length Compensation The length values "L1", "L2", "L3" of a tool edge are calculated as follows: Length correction L1= Length L1+Wear L1+ Offset L1+ L1 of D correction Length correction L2 = Length L2 +Wear L2 +Offset L2 + L2 of D correction Length correction L3= Length L3 +Wear L3+Offset L3 + L3 of D correction Fig. 5-19: Calculation of tool lengths Note: The D corrections are active only if they are programmed in process parameter Bxx.029 D corrections and with NC commands G48 Tool lengths positive compensation or G49 Tool lengths negative compensation (also see the section "Tool length compensation").

211 MTC 200 NC programming instruction Tool Compensation 5-59 Wear L3 = mm L3 = mm Offset L3 = mm L mm + Wear L mm + Offset L mm Length correction L mm LAENGENKORR.FH7 Fig. 5-20: Length compensation value "L3", example of a throwaway insert drill (without D correction) Radius Compensation The radius compensation value "R" of a tool edge is calculated as follows: Radius correction R = Radius R +Wear R + Offset R + R of D correction Fig. 5-21: Calculation of radius compensation "R" L3 = mm Wear R = mm R = mm R mm + Wear R mm + Offset R 0 mm Radius correction R mm RADIUSKORR.FH7 Fig. 5-22: Radius compensation "R", example of a cutter head (without D correction)

212 5-60 Tool Compensation MTC 200 NC programming instruction Geometry Limit Values Explanation Geometry limit values enable the tools in the tool storage unit to be checked with respect to their fitness for being employed in the forthcoming machining process. Whether or not length and radius values of the related tool are suitable for the machining process which is to be performed is verified during the equipment check when an NC program is started. Thus, it prevents standstill periods during the machining process. The setup list is used for the equipment check if the PLC interface PxxC.MGNSL (Process xx Command MaGazine No Setup List) is not set (= basic state). Besides ensuring that tools suitable for machining are available, the specification of reasonable geometry limit values already permits collisions to be prevented during programming. Note: The geometry limit values of the setup list are not taken into account in the calculation of tool compensation processes. Maximum and minimum length / radius DE Explanation Example 1 Data element 19 Data element 20 Data element 21 Data element 22 Data element 23 Data element 24 Data element 25 Data element 26 Setup list (SL) Tool list (TL) Location list (LL) Tool edge data Relevant for: L1_min L1_max L2_min L2_max L3_min L3_max R_min R_max Optional datum A X V22_ SD_DE19_26_V22_ xls The maximum length values "L1_max", "L2_max" and "L3_max", as well as the minimum lengths: "L1_min", "L2_min" and "L3_min" specify the limits of the corresponding length value within which the intended machining processes can still be performed. The maximum radius "R_max" and the minimum radius "R_min" specify the limits of the tool radius within which the intended machining processes can still be performed. A groove cutter is to be used for machining a 30 mm deep groove. tool name (ID) : Groove cutter D12 maximum length (L3_max) : 60 mm minimum length (L3_min) : 30 mm

213 MTC 200 NC programming instruction Tool Compensation 5-61 When it starts (start of advance program or of reverse program), the CNC checks whether there is at least one tool with the name "Groove cutter D12" that is not shorter than the minimum length of 30 mm and not longer than the maximum length of 60 mm. Example 2 A groove cutter is to be used for machining a 20 mm wide pocket ( mm / mm). tool name (ID) : Groove cutter D20 maximum radius (R_max): 20.02/2 = mm minimum radius (R_min): 19.96/2 = 9.98 mm When it starts (start of advance program or of reverse program), the CNC checks whether there is at least one tool with the name "Groove cutter D20" that is not thinner than the minimum radius of 9.98 mm and not thicker than the maximum radius of mm. Wear Factors Wear factors can be used for compensating wear-related variations in tool length and tool radius. Length wear factors (L1, L2 and L3) DE Explanation Data element 27 Data element 28 Data element 29 Setup list (SL) Tool list (TL) Location list (LL) Tool edge data Relevant for: WEAR FACTOR L1 Wear factor L2 Wear factor L3 Optional datum A X V22_ SD_DE27_29_V22_ xls Length wear compensation is activated if tool length correction is activated via G48 Tool length compensation positive or G49 Tool length compensation negative. The compensation value used to adjust for tool length wear is calculated in the tool management system by multiplying the duration of the tool machining time by the length wear factor. If the length wear factor is entered in "mm/min" or "inch/min", the tool management system uses the total time in which the tool was active while working motion was being carried out (all moves with the exception of G00 Rapid traverse) as the machining time. However, if the tool wear factor is entered in "mm/cycle" or "inch/cycle", the tool management system uses one cycle as the machining time. Thus, the compensation value for tool length corresponds to the tool wear factor. The tool management system automatically updates the machining time and, thus, the compensation value for length wear during a transition to a different tool edge, when an edge is requested again when the tool is placed back in the magazine (tool storage = magazine) when the tool is rotated out of the machining position (tool storage = turret)

214 5-62 Tool Compensation MTC 200 NC programming instruction when a tool is canceled using T0 (tool storage = turret or no tool storage present). Radius wear factor (R) DE 30 Explanation Example Data element 30 Setup list (SL) Tool list (TL) Location list (LL) Tool edge data Relevant for: Wear factor R Optional datum A X V22_ SD_DE30_V22_ xls Radius wear compensation is activated when tool path compensation is activated via G41 Tool path compensation left or G42 Tool path compensation right. The compensation value used to adjust for tool radius wear is calculated in the tool management system by multiplying the duration of the tool machining time by the radius wear factor. If the radius wear factor is entered in "mm/min" or "inch/min", the tool management system uses the total time in which the tool was active while working motion was being carried out (all moves with the exception of G00 Rapid traverse) as the machining time. However, if the radius wear factor is entered in "mm/cycle" or "inch/cycle", the tool management system uses one cycle as the machining time. Thus, the compensation value for tool radius corresponds to the radius wear factor. The tool management system automatically updates the machining time and, thus, the compensation value for radius wear during a transition to a different tool edge, when an edge is requested again when the tool is placed back in the magazine (tool storage = magazine) when the tool is rotated out of the machining position (tool storage = turret) when a tool is canceled using T0 (tool storage = turret or no tool storage present). A large number of shafts are to be produced within a machining center. Besides other machining steps, each CK45 shaft is to be fitted with a feather key groove that is to be machined using solid carbide tools. From previous tests it is known that the width of the groove decrements from one shaft to the next by an average mm. To compensate this wear during production, a radius wear factor of mm/cycle must be entered.

215 MTC 200 NC programming instruction Tool Compensation 5-63 User Tool Edge Data User tool edge data 1-10 DE Explanation Tool edge data Data element User data 1-10 Setup list (SL) Tool list (TL) Location list (LL) Relevant for: X V22_ Optional datum DE A A Optional datum DE A A SD_DE31_40_V22_ xls Tool edge user data 1-10 permit any tool edge to have any user-specific data items assigned. Grinding wheel-specific tasks: see the section "Grinding wheel-specific tool data" By entering the requested designation into the system parameters A Tool edge user data 1 (PLC data type = REAL)... A Tool edge user data 5 (PLC data type = REAL) and A Tool edge user data 6 (PLC data type = DINT)... A Tool edge user data 10 (PLC data type = DINT), the user data is accepted in each tool edge data record, and is displayed in the tool list and in the current tool list (see also "Bosch Rexroth MTC 200 parameter description"). In the tool list, the user data can be prepared in the same way as the other data items. Examples of user data in the tool edge data are: Cutting speed, Feed per tooth, Spindle speed Machining feed, Dimensional correction internal buffer, Average value, and Empirical value Note: User tool edge data items 1-5 are returned to the PLC as REAL values. User tool edge data items 6-10 are specified as DINT.

216 5-64 Tool Compensation MTC 200 NC programming instruction 5.5 Grinding Wheel-Specific Tool Data{0><}100{> For grinding wheel-specific tasks, the first five tool user data (data elements 31 to 35 of the tool edge data) are reserved for grinding-specific parameters if system parameter A Tool technology is set to "Grinding". Further tool edge-specific user data can be used as required. Note: When operating without setup lists, the user must enter the designations of required grinding wheel-specific parameters (data elements 31 to 35 of tool edge data) manually to activate them. Minimum spindle speed (S min) DE 31 Maximum spindle speed (S max) DE 32 The data element is an editable element in the setup list and in the tool list. In operation with setup lists, the value from the setup list is accepted in the tool list when the equipment check is performed. In operation without setup lists, the value in the tool list is assigned a default value. After the related data record has been activated in one of the spindles, the data element is the minimum permissible spindle speed command value, taking the override into account. The specified minimum spindle speed is also taken into account as the minimum permissible speed value when the grinding wheel circumferential speed (SUG) is active. The conversion for an active SUG is calculated according to the formula that is discussed in conjunction with the grinding wheel circumferential speed. If setup lists are used for operation, the value 0 corresponds to the state "Inactive checking". The data element is displayed according to the setting of system parameter A "Tool technology" in the setup list/tool list. If a corresponding tool data record has been activated for machining, the value is considered as the lower spindle speed limit, below which the value must not fall (including override). An error message is issued if the command value falls below this limit speed. The data element is an editable element in the setup list and in the tool list. In operation with setup lists, the value from the setup list is accepted in the tool list when the equipment check is performed. In operation without setup lists, the value in the tool list is assigned a default value. After the related data record has been activated in one of the spindles, the data element is the maximum permissible spindle command value, taking the override into account. The specified maximum spindle speed is also taken into account as the maximum permissible speed value when the grinding wheel circumferential speed (SUG) is active. The conversion for an active SUG is calculated according to the formula that is discussed in conjunction with the grinding wheel circumferential speed. If setup lists are used for operation, the value "0" corresponds to the state "Inactive checking". The data element is displayed according to the setting of system parameter A "Tool technology" in the setup list/tool list. If a corresponding tool data record has been activated for machining, the value is considered as the lower spindle speed limit that must not be exceeded (including override). An error message is issued if the command value exceeds this limit speed.

217 MTC 200 NC programming instruction Tool Compensation 5-65 S S max[1 / min] max[1 / min] SUG = d SUG = d max[ m / Act[ mm max[ ft / Act[ inch] s] * ] * π s] * 720 * π S max : Maximum spindle speed SUG max : Max. grinding wheel circumferential speed d Act : Actual grinding wheel diameter Fig. 5-23: Calculation of maximum spindle speed Maximum grinding wheel circumferential speed (SUG max) DE 33 The data element is an editable element in the setup list and in the tool list. In operation with setup lists, the value from the setup list is accepted in the tool list when the equipment check is performed. In operation without setup lists, the value in the tool list is assigned a default value. After the related data record has been activated in one of the spindles and the SUG has been activated (G66), the data element is the maximum permissible spindle command value, taking the override into account. SUG SUG max[m/s] max[ft/s] d = d = Act[mm] Act[inch] * p* S * p* S 720 max[1/min] max[1/min] SUG max : Max. grinding wheel circumferential speed d Act : Actual grinding wheel diameter S max : Maximum spindle speed Fig. 5-24: Calculation of maximum grinding wheel circumferential speed Data element "Max. grinding wheel circumferential speed" is evaluated only when the SUG is active. If setup lists are used for operation, the value 0 corresponds to the state "Inactive checking". The data element is displayed only in the setup/tool list for the three defined tool codes 1, 2, and 3. Angle of skew (slant angle) DE 34 Current grinding wheel diameter (current grinding wheel ) DE 35 The "Angle of skew" data element is an editable element in the setup list and in the tool list. The data element is available only for tool code 2. The value is required to calculate the grinding wheel diameter. The angle of skew is entered in degrees. The "Grinding wheel diameter" data element is a pure display element that cannot be edited. The data element is available only in the tool list. The computation formula for the grinding wheel diameter depends on the entered tool code and the existing geometry elements. The data element is displayed only for the three defined tool codes (1, 2, and 3). A value is not displayed if a correction type 3 is entered.

218 5-66 Tool Compensation MTC 200 NC programming instruction Tool Code WGD DE 18 If system parameter A has been set to "Grinding" technology, data element 18 of basic tool data "Tool code" receives the following meaning: Tool code Meaning 0 Standard tool data record 1 Straight circumferential grinding wheel 2 Inclined grinding wheel 3 Surface grinding wheel 4-9 No special function (standard tool data record) Fig. 5-25: Table of tool codes The tool code definition is required for grinding machines in order to be able to calculate the grinding wheel circumferential speed. Depending on the type of grinding wheel, geometry register L1 or L2 is needed for calculating the spindle speed from the programmed circumferential speed of the wheel. Tool code 0-3 Tool code 1 "Straight circumferential grinding wheel" The input of tool code 1-3 is relevant and is processed only if the "Tool technology" system parameter has been preset to "grinding". In all other cases, the preset values of the data element are ignored. Depending on the entered tool code, the associated tool edge data record (tool list and setup list) is displayed on the desktop. The grinding-specific (user) data items also depend on the selected correction type. In order to be able to utilize the grinding-specific (user) data expediently, a correction type 3 must be entered for the defined grinding wheels. For the straight circumferential grinding wheel, the correction type element in the tool data record must be filled in with 3, 4 or 5. The current wheel diameter is calculated via tool length compensation L1. dact = (L1 + L1Offset + L1 Fig. 5-26: Current wheel diameter for tool code 1 Wear )* 2 L1 R L2 GERADE_SCHEIBE.FH7 Fig. 5-27: Straight circumferential grinding wheel

219 MTC 200 NC programming instruction Tool Compensation 5-67 Tool code 2 Inclined grinding wheel For the angled grinding wheel, the correction type element in the tool data record must be filled in with 3 or 5. The current wheel diameter is calculated via tool length compensation L1 and the angle ϕ. d Act (L1 + L1 = + L1 cosj Offset Fig. 5-28: Current wheel diameter for tool code 2 Wear )* 2 j L1 R L2 SCHRAEGE_SCHEIBE.FH7 Fig. 5-29: Inclined grinding wheel Tool code 3 Surface grinding wheel For the surface-grinding wheel, the correction type element in the tool data record must be filled in with 3, 4, or 5. The current wheel diameter is calculated via tool length compensation L2. dact = (L2 + L2Offset + L2 Fig. 5-30: Current wheel diameter for tool code 3 Wear )* 2 L1 R L2 PLANSCHEIBE.FH7 Fig. 5-31: Surface grinding wheel

220 5-68 Tool Compensation MTC 200 NC programming instruction Representation Type WGD DE 19 Representation type The representation type has a range of The data element can be edited in the setup list and in the tool list. If the data element has a value assigned in the setup list that is different than zero, the values are checked for equality in the equipment check. In the case of a discrepancy, bit 6 of the tool status bits is assigned the code "$". Any further processing is not intended for the time being. 5.6 Tool Path Compensation Inactive Tool Path Compensation If no edge radius/cutter radius path compensation is active, the theoretical edge tip P is used as the reference point for the controller. In this case, the theoretical edge tip P will always move on to the programmed contour. However, this will lead to errors if the movements are not parallel to the axes. Z X P B S P B S PB S P B B S P B R S Edge orientation 3 : resulting contour : path of theoretical Edge peak 'P' (programmed contour) : path of Edge center 'S' 511Unohn.FH7 P: theoretical edge tip S: edge center B: actual touch point Fig. 5-32: Inaccuracies that occur if machining is performed without using tool edge radius path compensation The shaded area in the drawing will not be removed since the controller is using the theoretical edge tip P as its point of reference. When tool edge radius / cutter radius compensation is active, the CNC automatically moves the actual contact point B along the programmed contour. Thus, the resulting contour is identical to the programmed contour.

221 MTC 200 NC programming instruction Tool Compensation 5-69 Active Tool Path Compensation If edge radius/cutter radius path compensation is active (G41/G42), the CNC automatically calculates the length corrections which are active in the working plane with respect to the center point of edge S by adding/subtracting the correct radius to/from the theoretical edge tip, based on the current position of the cutting edge. Z X P B P B PB S P B P B R S S S S : resulting contour (programmed contour) : path of theoretical Edge peak 'P' : path of Edge center 'S' 512Smit.FH7 P: theoretical edge tip S: edge center B: actual touch point Fig. 5-33: Inaccuracy-free machining with active tool edge radius path compensation With tool path compensation active, the center point of the tool travels along a path which is parallel to the programmed contour and is offset by the tool radius.

222 5-70 Tool Compensation MTC 200 NC programming instruction Contour Transitions Inside corners With inside corners, the corrected NC block transition point is based on the point at which the lines parallel to the contours intersect. R R S ' S S' S R R R S ' S S' S R: theoretical edge tip S: edge center S ": actual touch point Fig. 5-34: Inside corners 513Innen.FH7 Outside corners The tool center point must travel around outside corners so that they are not damaged. Two methods can be used to accomplish this: 1. Insertion of an arc as the transition element by using NC command G43, and 2. Insertion of a chamfer as the transition element by using NC command G44. The insertion of a chamfer is possible only if a straightline straight-line transition exists. A chamfer is used as the transition element when the transition angle between the two straight lines is greater than 90. If the transition angle is less than 90, the NC block transition point is recalculated based on the intersection point of the lines parallel to the contour.

223 515Fase.fh7 MTC 200 NC programming instruction Tool Compensation 5-71 S R S2' S1' R S1 ' S2 ' R S2 ' 514Außen.fh7 S R S1 ' S2 ' S S1 ' 514Aussen.FH7 R: tool radius S: programmed NC block transition point S1 ": corrected NC block transition point 1 S2 ": corrected NC block transition point 2 Fig. 5-35: Arc transition element with G43 Transition angle > 90 (Chamfer) S R R S2 ' S1 ' ß S Transition angle <= 90 (corrected NC-block transition point) S ' S R R = tool radius ß = transition angle S = programmed NC-block transition S = corrected NC-block transition point for ß<90 S1 = corrected NC-block transition point 1 for ß>90 S2 = corrected NC-block transition point 2 for ß>90 515Fase.FH7 Fig. 5-36: Chamfer transition element and corrected block transition point When arcs or chamfers are inserted as contour transitions, the CNC automatically generates an additional transition NC block. This NC block is considered to be an independent NC block, and as such, it must be started separately in single-block processing mode.

224 5-72 Tool Compensation MTC 200 NC programming instruction Note: With look-ahead calculation of the corrected tool center point path, only the transition angle relative to the contour element of the following motion NC block is used in the calculation and not the length of the contour element. The cases indicated in Fig. 5-37: are not recognized. S ' S ' S ' S ' S ' S ' S ' 516Rand.fh7 S 516RAND.FH7 Fig. 5-37:: Boundary conditions for contour elements Arcs can, of course, replace the contour elements which are represented as straight lines. Any overlaps with elements other than the next contour element are ignored. The case shown here as a concave arc (see following fig.) is recognized and program execution is terminated with an error message.

225 MTC 200 NC programming instruction Tool Compensation 5-73 S ' 517Konk.fh7 517KONK.FH7 Fig. 5-38: Concave arc, 1 element The cases shown below are concave arcs with contour violation. S ' 518KonkM.fh7 518KONKM.FH7 Fig. 5-39: Concave arc, several contour elements Due to the fact that a maximum of four NC blocks are generally prepared, one of the next three NC blocks must be a movement NC block, which includes at least a change of one axis coordinate of an axis belonging to the selected working plane. If this is not the case, the contour movement is completed, and the next contour transition will not be calculated. Lookahead NC block processing will be interrupted with calculations in the NC program, which leads to the completion of a contour movement. Thus, a coherent contour move cannot be programmed according to NC variables.

226 5-74 Tool Compensation MTC 200 NC programming instruction Establishment of Tool Path Compensation at Start of Contour The starting point of the contour [P1] which is to be corrected with tool path compensation is located above the starting point [P0] of the programmed contour, perpendicular to the subsequent direction of motion. [P1] R [P0] 519WKorr.fh7 [P0] [P1] R R [P0] [P1] R: tool radius [P0]: programmed starting point of the contour [P1]: corrected starting point of the contour Fig. 5-40: Starting point for tool path compensation 519WKORR.FH7 The establishment of tool path compensation requires an additional movement in the working plane, which is performed only in conjunction with a programmed linear movement. Traversed Linear Movement [Ps] [P1] 520WKauf.fh7 Programmed Linear Movement [P0] R R: tool radius [Ps]: starting point of tool path compensation [P0]: programmed starting point of the contour [P1]: corrected starting point of the contour Fig. 5-41: Establishment of tool path compensation 520WKAUF.FH7 If an attempt is made to perform tool path compensation by means of a circular movement, an error message will be issued: "G41/G42 activated with circular interpolation" and the NC program will terminate. To avoid violations of the contour starting point, the starting point of tool path compensation must be selected in such a way that the tool is located completely within the quadrant which is opposite the contour corner.

227 MTC 200 NC programming instruction Tool Compensation 5-75 [P1] [Ps] R [P0] 521Wanf.fh7 R: tool radius [Ps]: starting point of tool path compensation [P0]: programmed starting point of the contour [P1]: corrected starting point of the contour Fig. 5-42: Contour start for tool path compensation 521WANF.FH7 If the starting point of tool path compensation is moved to an inside corner with closed contours, a contour violation would result at the end of the contour (see the figure below). [P2] [P3] Contour Violation [Ps1] 522Wges.fh7 [P6] R [P1], [P7] [P5] R: tool radius [P0]: programmed starting point of the contour [P1]: corrected starting point of the contour Fig. 5-43: Tool path compensation with closed contours [P4] 522WGES.FH7

228 5-76 Tool Compensation MTC 200 NC programming instruction Removal of Tool Path Compensation at End of Contour The end point of the contour [Pe1] which was corrected with tool path compensation is located above the end point [Pe0] of the programmed contour, perpendicular to the prior direction of motion. [Pe1] R [Pe0] 523WEnd.fh7 [Pe0] R [Pe0] [Pe1] R [Pe1] R: tool radius [Pe0]: programmed end point of the contour [Pe1]: corrected end point of the contour Fig. 5-44: End point for tool path compensation 523WEND.FH7 The removal of tool path compensation requires an additional move in the working plane, which is performed only in conjunction with a programmed linear movement (see following fig.). Traversed Linear Movement [Pe1] [Pee] 524WAuf.fh7 R [Pe0] R: tool radius [Pee]: end point of tool path compensation [Pe0]: programmed end point of the contour [Pe1]: corrected end point of the contour Fig. 5-45: Removal of tool path compensation programmed Linear Movement 524WAUF.FH7 Removing tool path compensation on an arc will not cause an error to be issued, but it will cause unpredictable contour errors. To avoid violations of the contour end point, the end point of tool path compensation must be selected in such a way that the tool is located completely within the quadrant which is opposite the contour corner.

229 MTC 200 NC programming instruction Tool Compensation 5-77 [Pe1] [Pee] R [Pe0] 525KEnde.fh7 R: tool radius [Pee]: end point of tool path compensation [Pe0]: programmed end point of the contour [Pe1]: corrected end point of the contour Fig. 5-46: Contour end for tool path compensation 525KENDE.FH7 If the end point of tool path compensation is moved to an inside corner with closed contours, a contour violation would result at the starting point of the contour (see following fig.). [P2] [P3] Contour Violation [Pe7] [P6] R 526Kgesch.fh7 [P1], [P7] [P5] R: tool radius [P7]: programmed end point of the contour [Pe7]: corrected end point of the contour Fig. 5-47: Tool path compensation with closed contours [P4] 526KGESCH.FH7

230 5-78 Tool Compensation MTC 200 NC programming instruction Change in Direction of Compensation A change in direction of compensation functions behaves as if tool path compensations were removed and then re-established. Traversed Linear Movement [Ps0] R [Ps1] [Pe0] 527Wechs.fh7 R [Pe1] Programmed Linear Movement R: tool radius [Pe0]: programmed end point of the first contour [Pe1]: corrected end point of the first contour [Ps0]: programmed starting point of the second contour [Ps1]: corrected starting point of the second contour Fig. 5-48: Change in direction of compensation 527WECHS.FH7 The change of tool path compensation requires an additional movement in the working plane, which is performed only in conjunction with a programmed linear movement. Note: If an attempt is made to perform tool path compensation by means of a circular movement, an error message will be issued: "G41/G42 activated with circular interpolation" and the NC program will terminate. The conditions described in sections "Establishment of Tool Path Compensation at Start of Contour", page 5-74 and "Removal of Tool Path Compensation at End of Contour", page 5-76 regarding the possibility of violating the starting point and end point of the contour also apply here. 5.7 Activating and Canceling Tool Path Compensation Canceling Tool Path Compensation "G40" Function G40 is used to cancel tool path compensation that is already active. When tool path compensation is cancelled, the center point of the tool travels along the programmed path. If active tool path compensation (G41 or G42) is canceled by G40, the next anticipated movement is a linear movement along the process plane. The axis values of both main axes must be programmed in the NC block so that tool path compensation can be cancelled. Syntax G40 G40 is the power-on state; it has a modal effect. G40 is cancelled by G41 or G42. G40 is automatically set after the controller has been powered on, as well as after an NC program is loaded and after a BST, RET or control reset.

231 MTC 200 NC programming instruction Tool Compensation 5-79 Tool Path Compensation, Left "G41" Tool path compensation to the left of the workpiece contour is activated by the G41 function command. If tool path compensation to the left of the contour is active, the tool center point moves along the left side of the programmed contour when viewed in the direction of movement. It moves along a path opposite of and parallel to the contour with an offset equaling the tool radius. If G41 is programmed after an active G40 or G42, the next anticipated movement is a linear movement in the process plane. The axis values of both main axes must be programmed in the NC block in order for tool path compensation to be re-established or changed. Syntax G41 G41 remains modally active until it is canceled by G40 or G42 or until a reset is automatically performed at the end of the program (RET) or BST. When tool path compensation is active, no more than two NC blocks can be programmed without programming a movement in the current process plane. If more than two NC blocks are programmed without a movement, tool path compensation is canceled with G40. Note: If an attempt is made to perform tool path compensation by means of a circular movement, an error message will be issued: "G41/G42 activated with circular interpolation" and the NC program will terminate. Tool Path Compensation, Right "G42" Tool path compensation to the right of the workpiece contour is activated by the G42 function command. If tool path compensation to the right of the contour is active, the tool center point moves along the right side of the programmed contour when viewed in the direction of movement. It moves along a path opposite of and parallel to the contour with an offset equaling the tool radius. If G42 is programmed after active tool path compensation (G40 or G41), the next anticipated movement is a linear movement on the process plane. The axis values of both main axes must be programmed in the NC block so that tool path compensation can be activated or changed. Syntax G42 G42 remains modally active until it is canceled by G40 or G41 or until a reset is automatically performed at the end of the program (RET) or BST. When tool path compensation is active, no more than two NC blocks can be programmed without programming a movement in the current process plane. If more than two NC blocks are programmed without a movement, tool path compensation is canceled with G40. Note: If an attempt is made to perform tool path compensation by means of a circular movement, an error message will be issued: "G41/G42 activated with circular interpolation" and the NC program will terminate.

232 5-80 Tool Compensation MTC 200 NC programming instruction Tool Path Correction G41, G42 Behind and Before the Turning Center X X G3 G2 G2 G3 G3 G2 G2 G3 G41 G41 behind the turning center X Edge Orientation G42 Edge Orientation Y Z Z before the turning center Z Z Edge Orientation Y G42 Edge Orientation X G3 G2 G3 G2 G2 G2 G3 G3 G42 G42 Edge Orientation G41 Edge Orientation Edge Orientation G41 Edge Orientation 528G4142.FH7 Fig. 5-49: Tool path correction G41, G42 with machining behind and before the turning center

233 MTC 200 NC programming instruction Tool Compensation 5-81 Example: NC program tool path correction using G42 Y P2 P6 P1 60 P11 P8 528G42.fh P3 P10 P7 P9 P12 P4 P X 528G42.FH7 Fig. 5-50: Tool path compensation, right (G42) NC program using G42: (TOOL CHANGE: ID=SF D5) T4 BSR.M6 G00 G54 G06 G08 X115 Y99.5 Z5 Movement commands, interpolation conditions G01 Z2 F1000 S2000 M0 1 st start position Z-10 F1200 Lower cutter into material G42 X117.5 Y99.5 F1500 [P1] Establish tool path compensation G02 X98 Y80 I98 J99.5 Move to contour with a ¼ circle G01 X45 Y80 [P2] Machine 1 st section G03 X40 Y75 I45 J75 Machine 1 st ¼ circle G01 X40 Y25 [P3] Machine 2 nd section G03 X45 Y20 I45 J25 Machine 2 nd ¼ circle G01 X135 Y20 [P4] Machine 3 rd section G03 X140 Y25 I135 J25 Machine 3 rd ¼ circle G01 X140 Y75 [P5] Machine 4 th section G03 X135 Y80 I135 J75 Machine 4 th ¼ circle G01 X90 Y80 Machine 5 th section G02 X73.5 Y96.5 I90 J96.5 Withdraw from contour with a ¼ circle G01 X73.5 Y99.5 [P6] End position of outer contour G00 Z2 Z axis to safety distance G40 X68 Y49.5 [P7] Starting position of inside contour G01 Z-10 F1000 Lower cutter into material G42 X65.5 Y49.5 F1500 Establishment of tool path compensation X65.5 Y50.5 Linear motion G02 X90 Y75 I90 J50,5 Move to contour with a ¼ circle G01 X130 Y75 [P8] Machine 1 st section G02 X135 Y70 I130 J70 Machine 1 st ¼ circle G01 X135 Y30 [P9] Machine 2 nd section G02 X130 Y25 I130 J30 Machine 2 nd ¼ circle G01 X50 Y25 [P10] Machine 3 rd section G02 X45 Y30 I50 J30 Machine 3 rd ¼ circle G01 X45 Y70 [P11] Machine 4 th section G02 X50 Y75 I50 J70 Machine 4 th ¼ circle G01 X98 Y75 Machine 5 th section G02 X119.5 Y53.5 I98 J53.5 Withdraw from contour with a ¼ circle G01 X119.5 Y49.5 [P12] End position inside contour G00 Z2 Z axis to safety distance (TOOL CHANGE: Store last tool) T0 BSR.M6 RET Program end

234 5-82 Tool Compensation MTC 200 NC programming instruction Inserting an Arc Transition Element "G43" With tool path compensation (G41 or G42) active, G43 inserts an arc as a transition element for outside corners. The tool center point must travel around outside corners so that they are not damaged. An arc should always be inserted for circle straight line or circle circle contour transitions. Syntax G43 G43 is the power-on state. It is modally active until it is overwritten by G44. G43 can be activated only via G41 or G42. G43 has no effect if tool path compensation (G40) is canceled. G43 is reset automatically at the end of the program (RET) or by the BST command. If an arc is inserted via G43 as a contour transition, the CNC automatically generates an additional transition NC block. This NC block is considered to be an independent NC block, and must be started separately in "Single block" processing mode. The conditions for the insertion of transition elements are described in the section "Contour transitions". R S2 ' S S1 ' R S1 ' S2 ' 529Über.fh7 R: tool radius S: programmed NC block transition point S1 ': corrected NC block transition point 1 S2 ': corrected NC block transition point 2 Fig. 5-51: Inserting an arc transition element 529UEBER.FH7 Inserting a Chamfer Transition Element "G44" With tool path compensation (G41 or G42) active, G44 can be used to insert a chamfer as a transition element for outside corners with a transition angle exceeding 90. In the case of outside corners with a transition angle equal to or greater than 90, the corrected transition point is defined as the intersection of the lines parallel to the contour. Syntax G44 A chamfer as a transition element can be used only for transitions between two straight lines. With all other transition pairs, an arc is automatically used as a transition element, even if G44 is active. After it is selected, a G44 remains modally active until it is cancelled by G43 or until it is automatically reset at the end of the program or by BST. G44 can be activated only via G41 or G42. G44 has no effect if tool path compensation (G40) is canceled. If a chamfer is inserted via G44 as a contour transition, the CNC automatically generates an additional transition NC block. This NC block is considered to be an independent NC block, and must be started separately in "Single block" processing mode.

235 MTC 200 NC programming instruction Tool Compensation 5-83 The conditions for the insertion of transition elements are described in the section "Contour transitions". Transition angle > 90 S R R S2 ' S1 ' R = tool radius S = programmed NC block point S1 ' = corrected block transition point 1 S2 ' = corrected block transition point 2 Transition angle <= 90 S ' 530FEin.fh7 S R R = tool radius S = programmed NC block point S ' = corrected block transition point 530FEIN.FH7 Fig. 5-52: Inserting a chamfer transition element Constant Feed on Tool Center Line "G98" With tool path compensation (G41 or G42) active, no path feed rate correction is performed for arcs when G98 is programmed. Thus, the programmed path feed rate applies to the tool centerline and not the workpiece contour. In the case of convex arcs (outside circle), a reduction of the path feed rate at the contour results; with concave arcs (inside circle), it results in an increase. Syntax G98 G98 is the power-on state. It is modally active until it is overwritten by G99. G98 can be activated only via G41 or G42. G98 has no effect if tool path compensation (G40) is canceled. G98 is reset automatically at the end of the program (RET) or by the BST command.

236 5-84 Tool Compensation MTC 200 NC programming instruction Constant Feed at the Contour "G99" With tool path compensation (G41 or G42) active, a path feed rate correction is performed for arcs when G99 is programmed. If G99 is active, the path feed rate at the contour corresponds to the programmed value. In the case of convex arcs (outside circle), an increase of the path feed rate along the tool centerline path results; with concave arcs (inside circle) it results in a decrease. Syntax G99 After it is selected, G99 remains modally active until it is canceled by G98 or until it is automatically reset at the end of the program (RET) or by BST. G99 can be activated only via G41 or G42. G99 has no effect if tool path compensation (G40) is canceled. 5.8 Tool Length Compensation If movements are being performed in the direction of the tool axis and at the same time tool length compensation is inactive, all declared positions relate to the position of the nose of the spindle. Z+ Programmed Z-value 531inaktiv.fh7 531INAKTIV.FH7 Fig. 5-53: Inactive tool length compensation If a movement is performed in the direction of the tool axis at the same time that tool length compensation is active, the actual tool lengths entered in the magazine list are automatically used for calculations by the controller, so that all declared positions now apply to the position of the tool tip. In order to establish or remove tool length compensation, it is necessary to perform a programmed movement in the direction of the tool axis so that the spindle nose stops at the programmed position when the end point is approached. The direction of the tool axis is assumed to be the direction of the main axis, which is perpendicular to the process (machining) plane. The position of the tool axis must be changed if the process plane is changed (G17, G18, G19). The tool length compensation cancellation (G47) and the positive activation (G48) or the negative activation (49) of the tool length compensation must be programmed in the tool change program.

237 MTC 200 NC programming instruction Tool Compensation 5-85 Tool Length Z+ Programmed Z-value 532aktiv.fh7 32AKTIV.FH7 Fig. 5-54: Active tool length compensation No Tool Length Compensation "G47" The function G47 is used to cancel tool length compensation that is already active. When movements are being performed in the direction of the tool, all position data relate to the position of spindle nose. If active tool length compensation (G48 or G49) is canceled with G47, a programmed movement in the direction of the existing main axis is expected. Movements which do not involve the removal of material from the workpiece, such as a tool change, are generally performed without tool length correction. Syntax G47 Depending on the settings in the process parameters, G47 may be the power-on default. G47 remains modally active until it is canceled by G48 or G49. G47 is set automatically depending on the setting in the process parameter after the controller is turned on, after an NC program is loaded, after a BST, RET or control reset. Tool Length Correction, Positive "G48" After tool length correction has been activated by G48, the CNC compensates the tool lengths entered in the magazine list in the positive axis direction beginning with the next programmed move in the direction of the existing main axes. Syntax G48 Depending on the settings in the process parameters, G48 may be the power-on default. G48 remains modally active until it is canceled by G47 or G49. G48 is set automatically depending on the setting in the process parameter after the controller is turned on, after an NC program is loaded, or after a BST, RET or control reset.

238 5-86 Tool Compensation MTC 200 NC programming instruction Tool Length Correction, Negative "G49" After tool length correction has been activated by G49, the CNC compensates the tool lengths entered in the magazine list in the negative axis direction beginning with the next programmed move in the direction of the existing main axes. Syntax G49 G49 remains modally active until it is canceled by G47 or G49, or until it is automatically reset at program end (RET), by BST or by control reset. G49 only acts on L3. When applied to L1 and L2, G49 acts as G48, and thus accounts for the tool length positively. 5.9 Access to Tool Data from NC Program "TLD" The TLD command (Tool Data) can be used to read all the tool data in the tool list from the NC program and to write them; however, some restrictions apply to writing. Syntax The individual data elements are addressed by means of codes. Depending on both types of addressing... addressing via location and magazine (A=0) addressing via tool number and tool duplo number (A=1)... both variants of TLD command are possible: P A S/T L/D E D S TLD([0..6], [0], [0..3],[ ],[0..9],[1..35],[1..32]) TLD([0..6],[1],[ ],[ ],[0..9],[1..35],[1..32]) Status Data element Edge Location / Index no. Storage [0..3] /tool number Addressing Process 57tld.FH7 Fig. 5-55: Syntax of the TLD command

239 MTC 200 NC programming instruction Tool Compensation 5-87 Value range and meaning of parameters TLD addressing via location and magazine type V23_ Designation Symbol Value range / meaning Process P 0-6 Process number Addressing A 0 Addressing via location and magazine type Magazine / Spindle Gripper Tool change Address active tool Storage type ST turret position Location L Tool edge E Data element DE 3-8 Status S --- Basic tool data 9 Tool status 1-32 Tool status bits Group status 1-16 Group status bits Tool edge data Tool edge status bits Group No. G Not relevant Not relevant --- Group duplo number GD Not relevant Not relevant TLD addressing via tool and duplo number V23_ Designation Symbol Value range / meaning Process P 0-6 Process number Addressing A 1 Addressing via tool and tool duplo number Tool number (T) T Tool number Tool duplo No. TD Tool duplo number Tool edge E Data element DE Status S Basic tool data Tool status 1-32 Tool status bits Group status Group status bits Tool edge data Tool edge status bits --- Group No. Group duplo number G GD 0-99 Group association of the tool no information: active group 0-99 Group duplo association of the tool no information: duplo No. of the active group Fig. 5-56: Parameters of the TLD command TLD_V23_ xls A detailed description of the TLD command is contained in section "NC Special Functions".

240 5-88 Tool Compensation MTC 200 NC programming instruction 5.10 D corrections D corrections are additional to the tool geometry data active registers. D corrections act additionally to the existing geometry registers L1, L2, L3 and R. 99 D corrections are available for each of the 7 processes. Each D correction contains the L1, L2, L3 and R registers. The values of the D correction registers can be assigned using the CNC operator interface. Syntax D0 Cancel D corrections D<D correction number[1-99]> Select a D correction D corrections act like the geometry data in the tool management system. D corrections can be used when tool management is present, for example as tool reference point offset registers. If tool management is not defined with a CNC process, the D corrections themselves can be used in place of tool management for simple applications. The D correction functions like correction type 4 in tool management. An edge orientation cannot be defined in the D corrections. Programming If the D corrections are selected in a movement block, they will be used in the same NC block for the calculation of the new position. Example: G00 X100 Y150 Z10 D20 D correction is already effective in this NC block! How D corrections work G17 G18 G19 Y Y Y R L2 L3 L1 L3 L1 X L1 R L2 X R L2 L3 X R 533dkorr.fh7 Z Z Z 533Dkorr.FH7 Fig. 5-57: How D corrections work in the corresponding machining plane Geometry registers L1, L2 and L3 are not used for compensation unless tool length correction G48/G49 is active. Geometry register R is used for compensation only when tool path compensation G41/G42 is active. If tool management is active for a selected machining tool and a D correction is also active, then the tool lengths and the radius are calculated as follows: Length corrrection L1 = length L1 + wear L1+ Offset L1 + L1of D correction Length correction L2 = length L2 + wear L2 + Offset L2 + L2 of D correction Length correction L3 = length L3 + wear L3 + Offset L3 + L3 of D correction Radius correction R = radius R + wear R + Offset R + R of D correction Fig. 5-58: Calculation of length and radius

241 MTC 200 NC programming instruction Tool Compensation 5-89 Using D corrections Correction values : Tool Werkzeuggeometriewerte geometry values Correction type 1 Edge orientation 0 Length L3 241 Wear L3 0 Offset L3 0 L1 of D-Correction mm Length L Length L2 0 Length L Radius 0 534Dwerk.fh mm 241 mm L3 of D-Correction10 Length correctionl3 534DWERK.FH7 Fig. 5-59: Definition of tool reference point using D corrections Geometry registers L1, L2, L3 and R of the selected D correction are not active unless tool length correction (G48/G49) or tool radius correction (G41/G42) is active. D0 is active in the power-on state; thus, the D corrections do not compensate. A programmed D correction is modally active. The programmed D correction is cancelled if D0 is programmed. D0 is automatically active after an NC program is loaded and after a BST, RET, M02, M30, or control reset. If tool length correction or tool radius correction is deactivated when a D correction is active, the geometries of the corresponding D correction once again become active if the tool length/radius correction is reactivated. Geometry registers L1, L2 and L3 act in the direction of the 3 main axes (X, Y, Z) depending on which process plane is selected. Length L3 is always perpendicular to the current machining plane, while lengths L1 and L2 always lie within the current machining plane. Note: The D corrections are not available in an NC process unless the machine builder has specified that they are available in the process parameters. The maximum value which can be entered via the GUI for geometry registers L1, L2, L3 and R is entered in the process parameters.

242 5-90 Tool Compensation MTC 200 NC programming instruction

243 MTC 200 NC programming instruction Auxiliary Functions (S, M, Q) Auxiliary Functions (S, M, Q) 6.1 General Information on Auxiliary Functions Auxiliary functions are transferred to the PLC and are then executed and acknowledged by the PLC. For this to happen, the switch functions needed in the PLC must be defined. A maximum of 6 auxiliary functions can be programmed for each NC block. Of these, a maximum of 4 M functions from different groups and one S and one Q function each may be used. The auxiliary functions are processed in the following order in the NC block: S, M, Q. Note: If an auxiliary function has been output to the PLC, block processing stops until the function is acknowledged. Thus, programming an auxiliary function which is not defined in the PLC program will block further program execution. Programming auxiliary functions temporarily stops block processing. Functions such as G08 (velocity-optimal NC block transition) will be interrupted. 6.2 "M" Auxiliary Functions The M functions are instructions which are primarily used to program machine or controller switching functions (for example, spindle on/off, coolant on/off, gear change, etc.). An auxiliary function is programmed via address letter M with a code of up to 3 digits. The codes for the auxiliary functions are partially defined in DIN Part 2 and in part by the machine builder.

244 6-2 Auxiliary Functions (S, M, Q) MTC 200 NC programming instruction Organization of M functions in function groups 1 Program control commands M000, M001, M002, M030 2 Spindle control commands Spindle 1 M003, M004, M005, M013, M014 2 Spindle control commands Spindle 1 M103, M104, M105, M113, M114 3 Spindle control commands Spindle 2 M203, M204, M205, M213, M214 4 Spindle control commands Spindle 3 M303, M304, M305, M313, M314 5 Coolant and lubricant Spindle 1 M007, M008, M009 5 Coolant and lubricant Spindle 1 M107, M108, M109 6 Coolant and lubricant Spindle 2 M207, M208, M209 7 Coolant and lubricant Spindle 3 M307, M308, M309 8 Clamp and unclamp Spindle 1 M010, M011 8 Clamp and unclamp Spindle 1 M110, M111 9 Clamp and unclamp Spindle 2 M210, M Clamp and unclamp Spindle 3 M310, M Gear range selection Spindle 1 M040,, M Gear range selection Spindle 1 M140,..., M Gear range selection Spindle 2 M240,..., M Gear range selection Spindle 3 M340,, M Spindle override M046, M Feed override M048, M Blockwise active M functions as well as all M functions defined by the machine builder M019, M119, M219, M319 Mxxx Fig. 6-1: Organization of M functions in function groups All M functions with the exception of spindle control commands Mx03, Mx04, Mx05, Mx13, Mx14, program control commands Mx00, Mx01, Mx02, Mx30, and the blockwise active M function Mx19 can be used as desired by the machine builder since they do not trigger any internal functions in the controller. In a given NC block, only one M function can be programmed from each function group. M functions M000 to M399 can be programmed with the CNC. No more than four M functions can be programmed in a single NC block. The M functions overwrite one another. Note: If more than one gear range is activated in the axis parameters, the M functions will no longer be available for general use.

245 MTC 200 NC programming instruction Auxiliary Functions (S, M, Q) 6-3 Program Control Commands Programmed stop (unconditional) M000 Conditional stop M001 End of NC program M002 / M030 M000 allows a defined NC program stop to be performed for example, to inspect a tool. After completing the check, the program can be continued by pressing the start key. In all program-controlled modes, M000, like the HLT command, produces a program stop in the NC. However, in contrast to HLT, the NC sends the M000 auxiliary function to the PLC at the end of motion. M001 acts like M000 when the interface signal "Conditional stop" (PxxC.M01) is set by means of a machine control key. The NC evaluates the interface signal "Conditional stop" after acknowledging the auxiliary function. M002/M030 act like the RET command. In addition, the NC sends the currently programmed auxiliary function to the PLC. Both auxiliary functions communicate the end of program to the PLC by resetting the NC program to the start of the program. The NC thus establishes the poweron state. After M002 or M030 are performed, all subroutine levels and all reverse vectors are cleared and the NC controller is in the initial state in the main program level. Spindle Control Commands The spindle is turned on or off using the spindle control commands Mx03, Mx04, Mx05, Mx13, Mx14. The first digit in the M functions is evaluated as the spindle index number. If the spindle index is 0 (M003), the M function is applied to the first spindle; if the spindle index is 2 (M203), the M function is applied to the second spindle. Spindle control commands Mx03, Mx04, Mx13 and Mx14 take effect as soon as an axis move is programmed in the NC block. However, they are not output to the PLC until the motion command is completed. Mx03 Spindle clockwise Mx04 Spindle counterclockwise Mx05 Spindle stop Mx13 Spindle clockwise and coolant/lubricant ON Mx14 spindle counterclockwise and coolant/lubricant ON Activate spindle rotation in clockwise direction. Activate spindle in counterclockwise direction. Shut off spindle and shut off supply of coolant/lubricant. Turn on spindle rotation in the clockwise direction and turn on coolant/lubricant supply if the required switching functions are defined in the PLC program. Turn on spindle rotation in the counterclockwise direction and turn on coolant/lubricant supply if the required switching functions are defined in the PLC program.

246 6-4 Auxiliary Functions (S, M, Q) MTC 200 NC programming instruction Spindle Positioning Syntax Function M19 S... allows the primary spindle to be stopped in a defined position. The angular position is programmed in degrees at address S. The primary spindle can be positioned while not turning as well as while turning. The NC block is only processed completely after Mx19 has been acknowledged by the PLC, when the spindle has reached the programmed end position. If Mx19 is programmed without an S word, an error will be issued when the program is executed. Function Mx19 is possible only with primary spindles that are able to be positioned. M19 S<constant> M19 S180 M19 S=<expression> M19 S=@070 M<spindle index>19 S<spindle index><constant> M219 S2 90 M<spindle index>19 S<spindle index><expression> M319 S3=@060 With the introduction of software release 18, it became possible to program command MQ19. This command initiates asynchronous spindle synchronization. The NC block that contains MQ19 is terminated as soon as all the other software functions are executed, even if the spindle has not yet reached the programmed end position. Via the programming of MW19 (with the same spindle position as with MQ19), the following NC block can be interrogated and waited for until the spindle has reached its target position. If there are several spindles in a process, only one positioning command can be started in each NC block. A separate NC block with the corresponding positioning command (e.g. MQ219) is required for the second and each additional spindle. The following restrictions apply to the MQ19 command: May only be used with SERCOS primary spindles with SHS firmware; parameter S must exist. MQ19 cannot be executed as long as primary spindle synchronization is active. The function cannot be used for combined spindle-turret axes.

247 MTC 200 NC programming instruction Auxiliary Functions (S, M, Q) 6-5 Gear Changes If the quantity of gear steps is larger than 1 in the axis parameters of the CNC for one of the spindles, then M function groups are reserved for control internal function of the CNC. M functions for gear changes and their corresponding function groups: 11 Gear range selection Spindle 1 Mx40,..., Mx44 (x=0 or 1) 12 Gear range selection Spindle 2 M240,..., M Gear range selection Spindle 3 M340,, M344 Meaning of the M functions: Mx40 Automatic gear selection for spindle X Mx41 1 st gear range for spindle X Mx42 2 nd gear range for spindle X Mx43 3 rd gear range for spindle X Mx44 4 th gear range for spindle X 6.3 S-Word as Auxiliary Function Automatic gear selection (Mx40) is dependent on the corresponding axis parameter set by the machine builder. If a multiple-range gear is not present, the M functions can be used for other purposes. If a process was defined without a spindle in the process parameters, the S word has the meaning of an auxiliary function. This means that an additional address letter is available, which the user can use for self-definable auxiliary functions in the PLC program. The S function can be entered as an unsigned integer constant having up to 4 digits. The numerical range for this constant is 0 to Syntax S<constant> S1234 There may be an expression instead of the constant. S=<expression> S=@123+@ Q Function A self-defined auxiliary function in the PLC program with address letter Q and a whole-number constant of up to 4 digits and without a positive/negative sign can be called by the user. The numerical range for this constant is 0 to Syntax Q<constant> Q1234 For this to happen, the switching functions needed in the PLC must be defined. Note: Q functions Q9000 to Q9999 are reserved for Bosch Rexrothspecific auxiliary functions (S, M, Q) functions.

248 6-6 Auxiliary Functions (S, M, Q) MTC 200 NC programming instruction

249 MTC 200 NC programming instruction Events Events 7.1 Definition of NC Events Description NC events are binary variables which can be used by the NC program and which, like flags in the PLC program, represent any desired state defined by the programmer. NC events can be set and reset as desired in the NC and PLC programs. Waiting for a defined state in an NC event can synchronize processes. Therefore, please refer to the machine builder's information regarding events influenced by the PLC program since the builder may have used various NC events for synchronization purposes. The status of the NC event is retained after powering down. Before NC events are used in an NC program, they should be placed in a defined state. Note: The process-local NC events 0 to 7 are reserved for interruptcontrolled program branches; in general, they should be kept open for such functions. Various NC events are used by the Bosch Rexroth standard NC cycles. The numbers of these NC events are stated in the corresponding description. No more than four different NC event commands and only one NC event branch command may be programmed in one NC block. Events are specified in the form <event type>:<event number>. 3 types of NC event are available in the CNC. Process events (0-6) External events (X) Peripheral events (P) 32 events are assigned to each process. By addressing with the process number, all 224 NC events can be used in a process, regardless of whether the process itself is defined. An NC event is identified by the process to which it belongs (process number) and by the NC event number. Interruptcontrolled program branches can be performed with the assistance of process events. These topics are described in section 7.4 "Asynchronous handling of events", page 7-5. If an event type is not indicated, the process defaults to the process in which the NC event is programmed. 32 external events are available; these are exchanged with the PLC in a 2ms cycle. These events can be used to carry out fast I/O selection of the 2ms implementation (see "PLC Programming Instructions", section 11.3) of the PLC. In the PLC, these events are to be addressed using process number 7 with the event functions. For peripheral events, 32 outputs and 32 inputs are available; these are exchanged with the PLC in a 2ms cycle. These events are mapped on a physical input and output area of the PLC. Write event functions set %IBP0 peripheral inputs of the PLC, while read event functions evaluate the %QBP0 peripheral outputs of the PLC. The write functions are: SE P:<ev. no.>, RE P:<ev. no.>, EVENT(P,<ev. no.>)=...

250 7-2 Events MTC 200 NC programming instruction The following table shows how the write events are assigned to the inputs in the PLC: Address Event number %IBP %IBP , 1, 2, 3, 4, 5, 6, 7 %IBP %IBP , 9, 10, 11, 12, 13, 14, 15 %IBP %IBP , 17, 18, 19, 20, 21, 22, 23 %IBP %IBP , 25, 26, 27, 28, 29, 30, 31 Fig. 7-1: PLC input addresses of events to be set The read functions are: WES P:<ev. no.>, WER P:<ev. no.> BES.LABEL P:<ev. no.>, BER.LABEL P:<ev. no.> The following table shows which PLC outputs correspond to the read events: Address Event number %QBP %QBP , 1, 2, 3, 4, 5, 6, 7 %QBP %QBP , 9, 10, 11, 12, 13, 14, 15 %QBP %QBP , 17, 18, 19, 20, 21, 22, 23 %QBP %QBP , 25, 26, 27, 28, 29, 30, 31 Fig. 7-2: PLC output addresses of events to be read Event number If the symbol "*" is declared instead of event number 0-31, all the NC events in the given process / event type are addressed. 7.2 Influencing Events Set NC Event "SE" Syntax The event defined in the command parameter is set using command SE "Set event". If the event has already been set, this command will be ignored. The event remains set until it is reset by the RE "Reset event" command. SE <process number[0-6]>:<event number[0-31]> SE 01:15:00 SE <event number[0-31]> SE 9 If the symbol "*" is declared instead of the NC event number, all the NC events in the given process are addressed. Example: SE 1:* - sets all events of process 1. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. Event though it is theoretically possible to set events in other processes, it is advisable to only change the event status in the process to which the event belongs and to only interrogate events from other processes.

251 MTC 200 NC programming instruction Events 7-3 Reset NC Event "RE" Syntax The event defined in the command parameter is reset using command RE "Reset event". If the event is already reset, this command will be ignored. The event remains reset until it is set by the SE "Set event" command. SE <process number[0-6]>:<event number[0-31]> RE 01:15:00 RE <event number[0-31]> RE 9 Wait until NC Event is Set "WES" If the symbol "*" is declared instead of the NC event number, all the NC events in the given process are addressed. Example: RE 1:* - resets all events of process 1. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. Even though it is theoretically possible to reset events in other processes, it is advisable to only change the event status in the process to which the event belongs and to only interrogate events from other processes. The WES "Wait until event is set" command is used in the process in which WES is programmed to stop program processing until the event defined in the command parameter is set. If the event is already set, the block continues to process without interruption. Syntax SE <process number[0-6]>:<event number[0-31]> WES 1:15 WES <event number[0-31]> WES 9 If the symbol "*" is declared instead of the NC event number, processing waits until at least one NC event in the specified process is set. Example: WES 1:* - waits until an event in the specified process is set to 1. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. Since a process which is waiting for an event cannot set the same event, it is possible to wait only for an event whose status is changed by a different process. The WES command should not be programmed within a program section in which tool path compensation is active. If this proves to be unavoidable, be certain that it is programmed only between linear block transitions.

252 7-4 Events MTC 200 NC programming instruction Wait until NC Event is Reset "WER" The WER "Wait until event is reset" command is used in the process in which WER is programmed to stop program processing until the event defined in the command parameter is reset. If the NC event is already reset, the block continues to process without interruption. Syntax WER <process number[0-6]>:<event number[0-31]> WER 1:15 WER <event number[0-31]> WER 9 If the symbol "*" is declared instead of the NC event number, processing waits until at least one NC event in the specified process is reset. Example: WER 1:* - waits until an event in the specified process is reset to 1. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. Since a process which is waiting for an event cannot reset the same event, it is possible to wait only for an event whose status is changed by a different process. The WER command should not be programmed within a program section in which tool path compensation is active. If this proves to be unavoidable, be certain that it is programmed only between linear block transitions. Example: NC program - influencing NC events At the beginning of both NC programs, all events for the given process are reset. NC program process 2 stops the block process in line 3 until NC program process 1 in line 6 has set event No. 1. NC program process 1 NC program process 2 RE 1:* ;Reset all events in process 1 RE 2:* ;Reset all events in process 2 T1 BSR.M6 ;Tool change T1 ;Tool change M03 S150 ;Spindle ON WES 1:1 ;Wait for event 1 of process 1 G04 F15 ;Dwell time M03 S150 ;Spindle ON M05 ;Spindle OFF G04 F15 ;Dwell time SE 1:1 ;Set event 1 in process 1 M05 ;Spindle OFF RET ;End of program RET ;End of program

253 MTC 200 NC programming instruction Events Conditional Branches for Events Branch if NC Event is Set "BES" The BES branch command "Branch if event is set" is used to continue program processing at the declared branch label if the NC event defined in the command parameter is set. Syntax BES <branch label> <process number[0-6]>:<event number[0-31]> BES.LABEL 1:15 BES <branch label> <NC event number[0..31]> BES.LABEL 9 If the symbol "*" is declared instead of the NC event number, processing branches to the addressed branch label if at least one NC event in the specified process is set. Example: Branch if NC Event is Reset "BER" BES.WAIT 1:* - jumps to label WAIT when all events in process 1 are set. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. The BER branch command "Branch if event is set" is used to continue program processing at the declared branch label if the event defined in the command parameter is reset. Syntax BER <branch label> <process number[0-6]>:<event number[0-31]> BER.LABEL 1:15 BER <branch label> <NC event number[0-31]> BER.LABEL 9 If the symbol "*" is declared instead of the NC event number, processing branches to the addressed branch label if all the NC events in the specified process are reset. Example: BER.WAIT 1:* - jumps to label WAIT when all events in process 1 are reset. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. Example: NC program - conditional branches for events At the beginning of both NC programs, all events for the given process are reset. If event 15 is set in process 1 before process 2 has reached line 3, then process 2 continues its processing at branch label.wait. Otherwise, the process is continued in line 4.

254 7-6 Events MTC 200 NC programming instruction NC program process 1 NC program process 2 RE 1:* ;Reset all events in process 1 RE 2:* ;Reset all events in process 2 T1 BSR.M6 ;Tool change T1 ;Tool change SE 01:15:00 ;Set event 15 in process 1 BES.WAIT 1:15 ;Branch to label WAIT if event 15 of process 1 has status 1. M03 S150 ;Spindle ON M03 S150 ;Spindle ON G04 F15 ;Dwell time G04 F15 ;Dwell time M05 ;Spindle OFF M05 ;Spindle OFF RET ;End of program RET ;End of program 7.4 Asynchronous Handling of NC Events The CNC can use NC events to influence NC program execution at any desired time. Since the status of events can be changed by the PLC and by other processes, the NC program can be programmed to branch conditionally upon certain signal changes. The control of NC program flow consists of being able to interrupt the execution of the active NC block, including the current axis movements, to request a subroutine and then to return to the interrupted NC block or to make a complete branch and continue the NC program at a different location. Asynchronous handling of events permits, for example, position scanning (limit switch), gauging cycles (probe) or joining operations (force sensor). All other kinds of conditions used to trigger the interruption of a move or simply to modify the NC program flow are conceivable. With the CNC, the response time to an external event is typically 50 milliseconds. NC events 0 to 7 of each process are for the interrupt-controlled program branches. If a condition is met, the corresponding event assumes the status 1. The priority of an event increases with its number. Event "1" has a higher priority than event "0", and event "7" has the highest priority. This permits a response to an external event while the handling of a previously detected low-priority event is not yet completed. The first action taken to handle an external event is that all axis movements in the process are brought to a stop as soon as possible. Spindles are not stopped when an event is called. The position of the stop is then calculated back into the program coordinate system so that it can be used as the starting position for the following move. In addition, the previously prepared motion blocks are cleared, and block processing begins again starting at the point in the program which was defined as the start of event handling. The branch label that was programmed with the event identifies the start of an event. The monitoring of events and the appropriate response takes place only when an advance program is running. All NC event supervision activities are deactivated at the end of the program, when an axis is jogged, or when the program is reset by means of a control reset. Event commands are processed to completion at the end of the NC block. No more than one command for asynchronous handling of events can be programmed in an NC block. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes.

255 MTC 200 NC programming instruction Events 7-7 Example:.LOOP1 JEV.LEAVE 0 Q456 CEV 0....LEAVE NC program - asynchronous event monitoring ;If event 0 is set, jump to routine "Empty" ;Message to PLC: Emptying can be initiated ;Clear event monitoring ;Routine for emptying the machine Call Subroutine if Event is Set "BEV" Since the auxiliary channel remains assigned until Q456 is acknowledged by the PLC, the NC program continues from this point as long as no other auxiliary function is executed. If event 0 is set during the auxiliary function output (Q456), the NC program branches to the specified point. The output of the auxiliary function to the PLC remains pending, meaning that if the auxiliary function was issued, it must also be acknowledged. The BEV command "Call subroutine if event is set (Branch on Event)" is used to activate monitoring of the event specified in the command parameter. If the NC event assumes status "1", it branches to the subroutine which is parameterized in the branch label of the BEV command. A change of the status of low-parity NC events or the triggered NC event is ignored until the end of the subroutine. However, the program may be interrupted by higher-priority NC events. Syntax BEV <branch label> <event number[0-7]> BEV.LABEL 4 After the branch from the subroutine, block preparation is resumed at the beginning of the interrupted NC block so that this block is now completely processed to ensure that all the functions of the interrupted block are performed. This can lead to unexpected results with incremental programming and incremental variable programming (@01=@01+3). The portion of the NC program which is processed as a subroutine must be terminated upon the branch back from the subroutine. Monitoring of the triggered event and lower-priority events is resumed automatically. Repeating the assignment of a branch label to an event using the BEV command overwrites the previous assignment as well as any different branching behavior defined using the JEV command "Branch to subroutine if event is set". The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes.

256 7-8 Events MTC 200 NC programming instruction Program Branching if NC Event is Set "JEV" The JEV command "Program branching if event is set (Jump on Event)" is used to activate monitoring of the NC event specified in the command parameter. If the NC event assumes status "1", then processing branches at this program point; this is parameterized via the jump label of the JEV command. A change of status of lower priority NC events or of the triggered NC events is ignored. However, the program may be interrupted by higher-priority NC events. Syntax JEV <branch label> <event number[0-7]> JEV.LABEL 4 Cancel NC Event Monitoring "CEV" After the interruption is triggered by the event, the program is continued at a defined location; it cannot be reset, as is the case with the BEV command, by jumping back from a subroutine (RTS) into the interrupted NC block. Repeating the assignment of a jump label to an event using the JEV command overwrites the previous assignment as well as any different branching behavior defined using the command BEV branch on an event to an NC subroutine (interrupt). The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. The command CEV "Cancel NC event monitoring (interrupt)" can be used to cancel NC event supervision when supervision is activated by means of BEV or JEV. NC event monitoring is canceled for the NC event declared in the command parameter. Syntax CEV <event number[0-7]> CEV 5 Disable NC Event Monitoring "DEV" The command DEV "Disable NC event monitoring" can be used when NC event monitoring has been activated by BEV or JEV to disable this NC event monitoring for a certain portion of the NC program until NC event monitoring is re-enabled via EEV "Enable NC event monitoring". NC event monitoring is disabled for all events. Syntax DEV Enable NC Event Monitoring "EEV" The EEV command "Enable NC event monitoring" is used to re-enable NC event monitoring, which was disabled by means of DEV. NC event monitoring is enabled for all events. Syntax EEV Example: NC program - asynchronous NC event handling Two types appear in a prepared portion. In the first type, the holes shown in Fig. 7-3: are present, and a thread must be tapped. The number of holes can vary between 1 and 4; however, they are specified by their position. The given tapping position is selected via the ZO (G54 - G58). In the second type, normal processing is performed; the holes are ignored. An initiator located in the Z axis checks for the presence of holes. The initiator is connected to the PLC as an input. If the 0 state is present at the given input, the PLC sets NC event No. 6 in process 0.

257 MTC 200 NC programming instruction Events 7-9 Y NC block : G01 X97.5 F700 during active BEV.GEWB 0:6 71events.fh X 71EVENTS.FH7 Fig. 7-3:: Tapping depending on an event NC program - tapping depending on an event ; Normal processing CEV 6 T1 BSR.M6 G00 G90 G54 G06 G08 X0 Y0 Z10 S3000 M03 Machining T0 BSR.M6 Disable NC event monitoring Tool change of first tool Movement commands, interpolation conditions Starting position for Variable to initialize ZO O1 Select the 2 nd zero offset table M52 Swing out initiator G00 G90 G59 G06 G08 Home position, ZO for initiator X32.5 Y65 Start position G01 Z2 F500 M54 Z axis to scan, activate initiator BEV.GEWB 6 Activate NC event monitoring G01 X97.5 F700 Check for holes M55 M53 Deactivate initiator and swing in O0 Select the 1 st zero offset table RET.GEWB DEV Deactivate NC event monitoring @53=Z-OTD(,,,,3) T15 BSR.M6 G90 G=54+@50 G06 G08 G01 X40 Y65 Z10 F2000 M03 S1000 G63 Z-7.5 F2 G63 Z10 F2 S1200 M04 T0 M52 G00 G90 G59 G06 G08 X=@51+5 Y=@52 Z=@53 M54 EEV RTS Deactivate initiator and swing in Note current position Change tap ZO establishes the tapping [P2] 2 nd tapping position Tap to depth Z Withdraw tap Range tool ZO for next hole Swing out initiator Home position, ZO for initiator Reapproach position of interruption X axis +5 mm as safety distance Activate initiator Activate NC event monitoring Return to point of interruption

258 7-10 Events MTC 200 NC programming instruction 7.5 Reading Events in Variable NC command <Variable>=EVENT(<event type>,<event number>) can be used to read an event or all events into a variable. The function supplies 1.0 for a set event and 0.0 for a deleted event. If all events are addressed with *, the function supplies the binary value (see following table) over all events (event 0 * event 31 * 2 31 ) of the corresponding process or event type. The result of the function must be stored in a variable and must not be linked with * ;@10=1.0 if event 3 of process 2 is set ;@10=0.0 if event 3 of process 2 is ;@0:2=3.0 if only event 0 and 1 of current process are ;@n:m = event No.0-31> * ;@2=1.0 if external is set and ;@2=0.0 if external is No.0-31> * ;@2=5.0 (event 0 and 2), if peripheral outputs %QBP and % QBP are set. Writing event(s) NC command <EVENT(<event type>,<event number>)=expression can be used to describe an event or all events. Only the rounded whole-number portion of the expression is taken into account. The function sets an event if the expression is not equal to 0 and deletes an event if the expression is equal to 0. If all events are addressed with *, the function writes the whole-number portion of the expression as a binary value (32- bit) in the events (event 0 * event 31 * 2 31 ) of the corresponding process or event type. In the case of addressing with *, the following table shows the binary value for the corresponding event to be set. If several events are to be set simultaneously, the binary values of the events are to be added. The binary value for setting all events can also be specified with -1.

259 MTC 200 NC programming instruction Events 7-11 Event number Binary value Event number Binary value Fig. 7-4: Binary values of events Syntax * express.)=express. EVENT(2,3)=@10 ;@10=1 Set event 3 of process 2 ;@10=0 Cancel event 3 of process 2 EVENT(,*)=5 ;Set events 0 and 2 of current process, ;delete all other events ;this corresponds to SE 0 and SE 2 EVENT(@1,*)=-1 ;Set all events of ;this corresponds to SE No.0-31> * expression) EVENT(X,@1)=@2 ;@2=1 set external ;@2=0 set No.0-31> * expression) EVENT(P,*)=@2 ;@2=5 (event 0 and 2) sets peripheral ;outputs %IBP and % IBP

260 7-12 Events MTC 200 NC programming instruction

261 MTC 200 NC programming instruction NC Functions to Control Tool Management NC Functions to Control Tool Management 8.1 Conditions Default Plane A Cartesian coordinate system is a prerequisite to utilize the tool corrections properly. At least one of the three primary axes must exist physically. Depending on the application, one of the axes (e.g. drilling unit), two of the axes (e.g. lathe) or all three axes (e.g. milling machines) can exist physically. Irrespectively of the actual number of axes, one of the three machining planes XY (G17, G20), ZX (G18, G21) and YZ (G19, G22) can be selected. With the functions for free plane selection (G20, G21, G22), any axis designation can be assigned to the axis meanings which define a machining plane. Tool length compensation "L3" always works perpendicularly to the machining plane. Length compensations "L1" and "L2" and the tool edge radius / cutter radius compensation always act within the machining plane. G17/G20 G18/G21 G19/G22 Y Y Y L2 R L3 R R L1 L3 L1 X L1 L2 X L2 L3 X Z Z Z Ebene.FH7 Fig. 8-1: Effect of tool corrections "L1", "L2", "L3" and "R" as a function of the selected machining plane The machining plane is selected via NC commands "G17", "G18", "G19", "G20", "G21" or "G22" (see chapter "Motion commands, dimension inputs", section "Plane selection").

262 8-2 NC Functions to Control Tool Management MTC 200 NC programming instruction Preparation of Tools and Tool Data The preparation of tools and tool data makes a distinction between the magazine and the turret in the sense that both a physical and a logical tool transfer between the spindle and the magazine (in some cases also using grippers) is necessary, and in the sense that, with most magazines, it is necessary to preselect the tool so that the magazine can be rotated asynchronously for NC program execution. The definition whether the given tool storage unit is a magazine or a turret is made in process parameter Bxx.015 "Type of tool storage". The following table contains an overview of all commands for tool and tool data preparation. A detailed description of the commands is to be found in the following chapters. NC tool commands (1) Function Meaning Description E Preselect tool edge Syntax: E<EDG> Edge EDG: Tool edge number SPT T TG TGSM Preselect tool spindle Spindle for Tool Preselect tool Tool Preselect tool group Tool Group Define tool search mode Tool Group Search Mode Syntax: SPT<SPI> SPI: Spindle number Syntax: T<TNP> V23_ TNP: Tool number or tool location Syntax: TG<GRP> GRP: Number of tool group (or 0) Syntax: TGSM<MODE> MODE: Search mode Werkzeugbefehle_NC1_V23_ xls

263 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-3 Preparing Tools and Tool Data for a Magazine Magazines can be subdivided into two different types: NC-controlled magazines PLC-controlled magazines The difference between the two types is in the way the magazine is positioned. With NC-controlled magazines, the controller-internal tool management provides for positioning. The movement of PLC-controlled magazines is handled by the PLC. CNC magazine NC NC program. T12 MTP MRY..... TMS M30 TM NC-controlled PLC-controlled PLC MMV MMV_Q TMS TMS_Q tool preselection T12 loading tool : occupied : free : occupiedt12 : free spindle spindle gripper 9 8 gripper cnc2.fh7 Fig. 8-2: Preselecting tools and preparing tool data for a magazine When a magazine is employed, a distinction between a preselected tool and an active tool in a spindle is always made. Tool preselection Syntax T<constant> <command> e.g. T12 MTP T<expression> <command> e.g. T=@0:10 MMP T=(90-37) MTP The numeric value that is assigned to address letter "T" via a constant or an expression specifies the tool number ( ; 0 = tool cancellation) or the tool location number (0-999). NC commands "MTP" (Move Tool Position) and "MMP" (Move Magazine Position) provide magazine positioning (also see section "Tool storage unit motion commands of the NC"). The selected tool is moved to the specified changing position. Up to the moment of the tool transfer, the data of this tool will not be taken into account.

264 8-4 NC Functions to Control Tool Management MTC 200 NC programming instruction The call "T0 MTP" causes an empty magazine location to be moved to the changing position. In the case of nonexistent magazine locations, the T command may activate an additional tool zero offset (see the "Bosch Rexroth MTC 200 tool management" description, section 3-9). Preparing a tool Tool changing commands "TCH" or "TMS" (see also the section "Tool changing commands of the NC") are used for transferring the preselected tool into the spindle and for providing the tool data. In this process, the preselected tool becomes the active tool. In the default selection, tool edge 1 becomes the active tool edge. Preparing Tools and Tool Data for a Turret Turrets can be subdivided into two different types: NC-controlled turrets PLC-controlled turrets The difference between the two types is in the way the turret is positioned. NC-controlled turrets are positioned by the controller-internal tool management. The movement of PLC-controlled turrets is handled by the PLC. CNC turret NC NC program. T831 MTP TM NC-controlled PLC-controlled PLC MMV MMV_Q loading tool T125 T831 8 T238 T T T254 T121 reference mark MRY DWERK.FH7 Fig. 8-3: Preparing tools for a turret Preparing a tool Syntax: T<constant> <command> T<expression> <command> e.g. T12 MTP e.g. T=@0:10 MMP T=(90-37) MTP The numeric value that is assigned to address letter "T" via a constant or an expression specifies the tool number ( ; 0 = tool cancellation) or the tool location number (0-999). NC commands "MTP" (Move Tool Position) and "MMP" (Move Magazine Position) provide turret positioning (also see section "Tool storage unit motion commands of the NC"). The selected tool is moved in the machining position and the tool data is activated. Tool edge 1 automatically becomes the active tool edge.

265 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-5 The call "T0 MTP" does not bring about a turret movement; the tool data are merely deselected. In the case of nonexistent turret locations, the T command may activate an additional tool zero offset (see the "Bosch Rexroth MTC 200 tool management" description, section 3-27). Asynchronous turret movements The following parameter value selection is necessary for swiveling the turret asynchronously to the NC program execution: A Tool management: YES Bxx.014 Tool management: YES Bxx.015 Type of tool storage: Turret Bxx.044 Asynchronous turret movement: YES Furthermore, the default PLC function "REV_SYNC" (synchronous swiveling of the turret; see "Bosch Rexroth MTC 200 PLC interface description") must not be active. If the above-mentioned conditions are satisfied, NC command "MFP", "MTP", "MMP", "MOP", "MHP" or "MRF" can be used for initiating the turret movements. While the turret is swiveling, the NC continues program execution. Using the MRY command or activating the "REV_SYNC" standard PLC function permits the turret swivel movements and NC program execution to be synchronized. The activation of the tool compensation values depends on the setting of parameter Bxx.057 "Activate tool correction for turret". The following table illustrates the effect of the parameter settings. The following NC program sequence is discussed: G1 - ; Axis movements with T1 E1 as the active tool T2 ; Preselection of the T2 tool MTP ; Move programmed tool into position E2 ; Activating tool edge E2 MRY ; Wait until tool storage movement is terminated NC program sequence Activation of tool compensation at start synchronous Activation of tool compensation at end Behavior Activation of tool compensation at start asynchronous Activation of tool compensation at end Active Presel. Active Presel. Active Presel. Active Presel. G1 - T1 E1 T1 T1 E1 T1 T1 E1 T1 T1 E1 T1 T2 T0 E0 T2 T0 E0 T2 T0 E0 T2 T0 E0 T2 MTP T2 E1 T2 T2 E1 T2 T2 E1 T2 T0 E0 T2 E2 T2 E2 T2 T2 E2 T2 T2 E2 T2 T0 E2 T2 MRY T2 E2 T2 T2 E2 T2 T2 E1 T2 T2 E1 T2 Fig. 8-4: Effects of process parameter Bxx.057 Revolver.xls (Tabelle 2) Note: Due to the dual function (spindle and turret axis) of these axes, asynchronous turret movements are not possible with "Combined spindle/turret axes".

266 8-6 NC Functions to Control Tool Management MTC 200 NC programming instruction Tool Edge Invocation Syntax: E<constant> e.g. E2 E<expression> e.g. E=(70-67) The active tool is selected via address letter "E" followed by a constant or an expression. Besides loading the tool data, each tool transfer towards the spindle causes "Tool edge 1" to become the active tool. Accordingly, a tool call for a turret causes "Tool edge 1" to become the active tool (in addition to providing the tool data). "Tool edge 1" is most frequently used for machining. Thus, a separate tool edge selection is not necessary. Internally, the tool edge invocation causes the related correction and tool life data to be provided. Tool management accesses this data during the subsequent machining process. Selecting the Tool Spindle "SPT" If there are several spindles in a process, certain functions (such as tool selection E) require an effect on a spindle that is different than the first one. Syntax: SPT <spindle number[1-4]> The first spindle is always active in the power-on state. If the tool is to be related to a spindle that is different than the first one, the tool spindle must first be selected using "SPT <spindle number>". The tool spindle must be selected at least one NC block prior to a function call. SPT <spindle number> has a modal effect until another spindle number overwrites it or until it is automatically set to the 1 st spindle at the end of the program (RET) or by BST. Tool life monitoring, wear factors, tool path correction and tool length compensation are valid for the tool of the selected tool spindle. Additional tool carrier Alternatively to the MTP command, command "SPT <spindle number>" can also be used to select an additional tool carrier. After selection, the tool with the 1 st edge is active; the offset of the new machine zero point is taken into account. This offset is also calculated when tool compensation (G47) is inactive and is taken into account in the determination of the spindle speed for the constant surface speed (G96). A detailed description of the processing of additional tool carriers can be found in the description "Bosch Rexroth MTC 200 tool management", section Tool Group Management As of firmware version 23VRS, tools required for machining one type of workpiece can be combined in a tool group to support segmented tool magazines. Tool groups are identified by a group number and a group duplo number. Groups of the same group number are linked according to ascending duplo numbers. NC command TG is used to preselect a tool group. The tool search mode is defined with command TGSM. The tool that has been preselected in association with tool group management is taken into account by tool storage movement command MTP.

267 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-7 Note: A detailed description of the processing of tool group management can be found in the documentation "Bosch Rexroth MTC 200 tool management", section 1.4. Preselect Tool Group "TG" TG Syntax Value range Meaning Tool Group TG<group number (constant)> TG<group number number> = TG The following examples illustrate the possible syntax variants: TG3 ;direct allocation TG 3 ;direct allocation, space symbol TG=3 ;direct allocation TG=@195 ;allocation by variable TG=3+@195 ;allocation by ;read out active (i.e. currently effective) tool group Group number: 0 - Bxx.073 "Number of tool groups" Use the NC command "TG <group>" to preselect a tool group as a machining group. The active group can be read with "@<var>=tg". In an unparameterized group, the CNC reports error 322 "Invalid function". After activation or a control reset, the controller automatically preselects group 0. Examples N0333 TG3 T19 ;activation of tool group 3 as the current machining group with simultaneous tool preselection ;read out the active tool group number Define Tool Search Mode "TGSM" TGSM Syntax Meaning Tool Group Search Mode TGSM<mode (constant)> TGSM<mode number> = TGSM The following examples illustrate the possible syntax variants: TGSM1 ;direct allocation TGSM 1 ;direct allocation, space symbol TGSM=1 ;direct allocation TGSM=@196 ;allocation by variable TGSM=1+@196 ;allocation by ;read out the currently effective tool search ;mode The tool search mode, as well as the implicit group activation when the T word is entered, can be influenced with NC command "TGSM=<mode>". The mode can be reread with "@<var>=tgsm". After activation or a control reset, the controller automatically preselects tool search mode 0.

268 8-8 NC Functions to Control Tool Management MTC 200 NC programming instruction For <mode>, the following search orders are available: Mode Search order Comment Fig. 8-5: 0 Preselected group If the tool is not found in the preselected group, the NC will indicate error 314 Tool or tool location not found. 1 Preselected group, group 0 2 Preselected group, groups 0-99 First, the tool is sought in the preselected group, then in group 0. If the tool is not in the preselected group, it will be sought in ascending order in groups Groups 0-99 Irrespective of the enabled group, the tool is sought in ascending order in groups Tool search mode in tool groups If the requested tool is found in another group than the preselected/enabled one, this group will be automatically enabled and preselected once the tool has been enabled. If the tool search produces no hits, the CNC reports error 314 "Tool or tool location not found". Examples N0344 TGSM1 T19 ;Define tool search mode 1, ;preselect tool and implicitly activate the tool group in which the ;tool was found = TGSM G01 X78 F1200 ;Read currently effective tool ;search mode and position axis in ;feed Changing Tools The process of changing tools is initiated by NC commands. In most cases, changing tools also requires motions and activating / deactivating G codes. Thus, the entire program sequence should be combined in a subroutine or a cycle. This reduces the programming effort in the main program to selecting the tool via the T command and invoking the tool changing subroutine. Using a macro provides an elegant solution of the tool changing invocation: Macro: DEFINE M6 AS BSR.M6 Thus, invoking "T<XX> M6" initializes a tool change in the NC program. The changing process proper is then programmed from the label ".M6" onwards. Example: NC program: N0047 T12 M6 N0048 G54 G0 X123 Y45 F350 "Tool change" cycle: N0000.M6 N0001 G40 G47 G0 X100 Y100 Z50 N0056 RTS ; invoke "Change tools"

269 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-9 Note: Please refer to the "Bosch Rexroth MTC 200 tool management" documentation, "Sample applications" section for examples of programming tool storage units (magazines and turrets). 8.2 Tool Storage Unit Motion Commands of the NC All tool storage unit motion is performed asynchronously relative to the motions on the other NC axes. The NC motion commands only initiate tool storage unit motion and do not wait until the tool storage unit has completed the motion. In the meantime, the NC program and thus the process can be continued. The command "MRY" can be used to scan signals to determine whether the motion which was initiated is finished. In this way, the NC program is halted and synchronized with the tool storage unit. The following table contains an overview of all tool magazine motion commands of NC. The table is followed by a detailed description of commands. NC tool commands (2) Function Meaning Description MEN Tool storage enabled for Syntax: MEN manual mode MFP MHP MMA MMP MOP MRF MRY MTP Magazine Enable Move free pocket into change position Move next Free Pocket in Position Tool storage to home position Move to Home Position Freely position tool axis Move Magazine Access Move programmed pocket into basic position Move Magazine Pocket in Position Move old pocket into position Move Old Pocket in Position Move tool storage unit to reference position Move to Reference Position Tool storage ready? Magazine Ready Move programmed tool into position Move Tool Position Syntax: MFP (POS, DIR) POS: Position to be moved to DIR: Direction of rotation Syntax: MHP (DIR) DIR: Direction of rotation Syntax: MMA (POS, DIR) POS: Position to be moved to V22_ DIR: Direction of rotation / mode Syntax: MMP (POS, DIR) POS: Position to be moved to DIR: Direction of rotation Syntax: MOP (POS, DIR, SPI) POS: Position to be moved to DIR: Direction of rotation SPI: Spindle Syntax: MRF Syntax: MRY Syntax: MTP (POS, DIR) POS: Position to be moved to DIR: Direction of rotation Werkzeugbefehle_NC2_V22_ xls

270 8-10 NC Functions to Control Tool Management MTC 200 NC programming instruction Tool Storage to Reference Position "MRF" MRF Move to Reference Position (homing) The "MRF" command starts the process of returning the tool storage unit axis to the reference position. This command is comparable to "G74" for the NC axes of a process. After the control is powered on, the reference position must be established for the tool storage system before it can traverse to a particular position. For this reason, the "MRF" command must be programmed in the reverse program of a process which uses the tool storage system. In the case of NC-controlled tool storage units, referencing is executed by setting parameters (Cxx.013 for "Combined spindle/turret axis", otherwise using the drive parameters). In the case of PLC-controlled tool storage units, the "MRF" NC command is transferred to the "MRF" PLC function. The PLC must ensure that the reference is established and must acknowledge the "MRF" function. Before performing the "MRF" command, it is important to be certain that the tool storage movement does not prevent other NC axes from referencing. reference mark reference cam reference mark : occupied : free MRF.FH7 Fig. 8-6: Reference position using a chain magazine as an example Move Tool Storage Unit to Home Position "MHP" MHP Move to Home Position Syntax MHP MHP(DIR) Expression DIR: <constant> <variable> Value range Meaning DIR: 0, 1, 2 DIR = 0: any given direction DIR = 1: positive direction DIR = 2: negative direction The "MHP" command causes the tool storage unit to move to its home position. In this way, the tool management system ensures that the storage system is traversed to "Location 1" regardless of the type of axis or storage unit.

271 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-11 Optionally, you can enter the direction of the movement to the home position. The controller chooses the shortest way if a direction is not specified. The distance is specified using the following drive parameters: Reference dimension 1 (S ) with motor measuring system Reference dimension 2 (S ) with external measuring system With a PLC-controlled tool storage unit, tool management transfers "Location 1" (PLC interface signal "PxxS.MGCP Command magazine position") to the PLC. Using the "MMV" function, the PLC then moves to the home position and brings "Location 1" to the reference mark. reference mark reference cam reference mark : occupied : free MHP.FH7 Fig. 8-7: Home position using a chain magazine as an example Programmed Move Tool into Position "MTP" The CNC does not wait until the tool storage unit has reached the home position. It continues to process the NC program while the tool storage move is being carried out. If this is not desired, the "MRY" command can be used to halt execution of the NC program until the tool storage motion is completed. MTP Syntax Move Tool Position Move programmed tool into position MTP MTP(POS) MTP(POS,DIR) Expression POS: DIR: <constant> <variable> <constant> <variable> Value range Meaning POS: 1, 2, 3, 4 DIR: 0, 1, 2 POS = 1: move preselected tool to position 1 (Bxx.021) POS = 2: move preselected tool to position 2 (Bxx.022) POS = 3: move preselected tool to position 3 (Bxx.023) POS = 4: move preselected tool to position 4 (Bxx.024) DIR = 0: any given direction DIR = 1: positive direction DIR = 2: negative direction The "MTP" command initiates a tool storage unit move which places the tool selected in the specified position via the T word in the NC program (change, installation or processing position).

272 8-12 NC Functions to Control Tool Management MTC 200 NC programming instruction Optionally, the position into which the selected tool is to be brought and the direction to be taken when the tool is moved to the specified change position can also be declared. Tool management chooses the shortest way and "Position 1" if neither direction nor position is specified. "Tool edge 1" of the tool automatically becomes the active tool edge. If the tool storage unit contains several tools of the same name and the same "T number" (alternate tools), tool management automatically selects the tool to which the "Machining tool" status is assigned. With machines that feature a tool magazine, which can be positioned during the machining process, the "MTP" command is frequently used for prepositioning the magazine. "MTP" is usually programmed in the NC program together with the tool preselection "T<XX>" immediately after changing the previous required tool. In this way, the next tool is brought into the tool changing position while the process is running. In particular, this command is employed for tool changers with dual arm grippers where the previously used tool is to be stored in the magazine pocket from which the new one is taken. Like "MFP", the "T0 MTP" command moves the next free location to the specified position. The CNC does not wait until the tool storage unit has completed its motion. It continues to process the NC program while the move is being carried out. If this is not desired, the MRY command can be used to halt execution of the NC program until the tool storage motion is completed. An additional tool carrier for tool storage type "Turret" is also selected with the T number and the MTP command; however, the turret is not positioned. After selection, the tool with the 1 st edge is active; the offset of the new machine zero point is taken into account. This offset is also calculated when tool compensation (G47) is inactive and is taken into account in the determination of the spindle speed for the constant surface speed (G96). A detailed description of the processing of additional tool carriers can be found in the documentation "Bosch Rexroth MTC 200 tool management", section Example: The inside cutting tool "T91" that is located on a turret is to be moved to the second machining position (POS2) without running through the first machining position (POS1). Therefore define "Position 2" for POS and, for DIR, a negative turning direction of "2". required swivel process POS2 T125 T T238 T T T254 T121 reference mark T91 MTP(2,2) POS1 POS2 T121 T254 T T238 T125 T238 T831 reference mark POS1 MTP.FH7 Fig. 8-8: Positioning a tool via MTP

273 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-13 Programmed Move Magazine Pocket into Position "MMP" MMP Move Magazine Pocket in Position (Move programmed pocket into position) Syntax MMP MMP(POS) MMP(POS,DIR) Expression POS: DIR: <constant> <variable> <constant> <variable> Value range Meaning POS: 1, 2, 3, 4 DIR: 0, 1, 2 POS = 1: move preselected location to position 1 (Bxx.021) POS = 2: move preselected location to position 2 (Bxx.022) POS = 3: move preselected location to position 3 (Bxx.023) POS = 4: move preselected location to position 4 (Bxx.024) DIR = 0: any given direction DIR = 1: positive direction DIR = 2: negative direction The "MMP" command initiates a tool storage unit move which places the location selected via the T word in the specified position (change, installation or processing position). Optionally, the position into which the selected pocket is to be brought and the direction to be taken when the tool is moved to the specified position can also be declared. Tool management chooses the shortest way and "Position 1" if neither direction nor position is preselected. "Tool edge 1" of the tool in the currently selected pocket automatically becomes the active tool edge. The "MMP" command is generally used for sorting work and for adding or removing tools. Note: When used with the T-word, the "MMP" command refers exclusively to locations and not to tools. For this reason, if tools are called according to the position using MMP, any spare tools which are present are ignored during a process unless they are explicitly programmed in the NC program with the aid of the T word and the corresponding pocket number. The CNC does not wait until the tool storage unit has completed its motion. It continues to process the NC program while the move is being carried out. If this is not desired, the MRY command can be used to halt execution of the NC program until the tool storage motion is completed. Example: Inside cutting tool "T91" in location 3 is to be replaced. To do this, it must be moved to the loading/unloading position (POS3). This can be done either by "jogging" the turret or, for example, using the "T3 MMP (3,0)" command in the MDI (Manual Data Input). The pocket then moves along the shortest path possible (negative direction) to the loading/unloading position.

274 8-14 NC Functions to Control Tool Management MTC 200 NC programming instruction POS3 T238 T91 reference mark POS3 T254 T121 reference mark POS2 T125 T T254 T121 T3 MMP(3,0) POS1 POS2 T91 T T238 POS1 T238 T125 T831 MMP.FH7 Fig. 8-9: Positioning a turret pocket using MMP MTP/MMP Commands and Tool Correction The two commands MTP and MMP have different time behavior in regard to the activation of tool correction. Depending on the turret type and the command used, tool correction must be activated before or after the turret movement. Interaction of Bxx.044 and REV_SYNC Turret movement Bxx.044 "Asynchronous turret movement" NO Yes Input ACTIVE = 0 synchronous asynchronous REV_SYNC Input ACTIVE = 1 synchronous synchronous Bxx044_REV_SYNC_V22_ xls Activation of tool compensation with MTP and MMP Tool correction Point of activation MTP MMP MRY Synchronous turret movement At the beginning At the end Activate tool comp. before moving turret Activate tool comp. after moving turret Activate tool comp. after moving turret Activate tool comp. after moving turret - - Asynchronous turret movement At the beginning When tool is in position then activation is performed immediately, otherwise at first with MRY - Activate tool comp. At the end - - Activate tool comp. Werkzeugkorrektur_MTP_MMP_V22_ xls TC: Tool correction T: Tool Fig. 8-10: Activation of tool compensation with MTP and MMP

275 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-15 Freely Position Tool axis "MMA" MMA Syntax Move Magazine Axis (Freely position tool axis) MMA MMA(POS) MMA(POS,DIR) Expression POS: DIR: <constant> <variable> <constant> <variable> Value range Meaning POS: to with 4 positions after the decimal point DIR: 0, 1, 2, 3, 4 POS = axis position in mm, inches or units (default = 0) DIR = 0: shortest path (default) DIR = 1: positive direction DIR = 2: negative direction DIR = 3: longest path DIR = 4: incremental path instructions Tool magazine command MMA executes free positioning of the tool axis. Here, any position (intermediate locations) can be absolutely or relatively approached by the NC program. Direct programming of the tool axis using an axis name is not possible. Tool management chooses the shortest way and position value 0 if neither direction nor position is specified. The MMA command deactivates tool compensation for a tool turret and deselects the active tool (T0 is preselected). If the tool storage unit is a magazine, the tool that is located in the current tool spindle remains active. The addressing of tool data using the tool axis position after free positioning using command MMA is not possible. If the tool axis is in the "Free positioning" operating mode during a tool change using tool transfer commands (e.g. TSM, TMS, TCH), an error message is issued. Notes: It is mandatory that the tool axis be again positioned absolutely on a valid magazine location before executing a tool change using the corresponding tool storage unit movement commands. Command MMA is not supported for PLC-controlled magazines/turrets and for tool magazine axes of axis type "Combined spindle/turret axis". Interface signal PxxS.MGCP (Process xx Status Magazine Command Position) remains unchanged. The CNC does not wait until the tool storage unit has completed its motion. It continues to process the NC program while the move is being carried out. If this is not desired, the MRY command can be used to halt execution of the NC program until the tool storage motion is completed.

276 8-16 NC Functions to Control Tool Management MTC 200 NC programming instruction Move to Free Position "MFP" MFP Syntax Move next Free Pocket in Position (Move free pocket into change position) MFP MFP(POS) MFP(POS,DIR) Expression POS DIR: <constant> <variable> <constant> <variable> Value range Meaning POS: 1, 2, 3, 4 DIR: 0, 1, 2 POS = 1: move next free location to position 1 (Bxx.021) POS = 2: move next free location to position 2 (Bxx.022) POS = 3: move next free location to position 3 (Bxx.023) POS = 4: move next free location to position 4 (Bxx.024) DIR = 0: any given direction DIR = 1: positive direction DIR = 2: negative direction The "MFP" command initiates a tool storage unit movement to move the closest empty pocket to the specified position. Optionally, the position into which the closest empty pocket is to be brought and the direction to be taken when the tool is moved to the specified position can also be declared. Tool management chooses the shortest way and "Position 1" if neither direction nor position is specified. This command is used to place the tool located in the tool spindle or in the gripper in the closest empty pocket in the magazine. This is especially necessary with tool changers which do not have grippers or which use single-arm systems when the old tool needs to be stored before a new tool can be used. The CNC does not wait until the tool storage unit has completed its motion. It continues to process the NC program while the move is being carried out. If this is not desired, the MRY command can be used to halt execution of the NC program until the tool storage motion is completed. Example: The tool in "Spindle 1" is to be brought back to the magazine. This requires the nearest empty pocket to be moved to "POS 2". Due to the fact that the magazine may only be turned in the positive direction, the turning direction is declared as "1". Therefore, "Position 2" must be selected for POS as well as a turning direction of "1".

277 MTC 200 NC programming instruction NC Functions to Control Tool Management loading position 9 POS MFP(2,1) 2 1 loading position 12 POS POS POS reference mark gripper reference mark gripper : occupied : free spindle 1 spindle 1 MFP.FH7 Fig. 8-11: Positioning a free magazine location using MFP Move Old Pocket in Position "MOP" MOP Move Old Pocket in Position Syntax MOP MOP(POS) MOP(POS,DIR,SPI) Expression POS: DIR: DIR: <constant> <variable> <constant> <variable> <constant> <variable> Value range Meaning POS: 1, 2, 3, 4 DIR: 0, 1, 2 SPI 1, 2, 3 POS = 1: move old location to position 1 (Bxx.021) POS = 2: move old location to position 2 (Bxx.022) POS = 3: move old location to position 3 (Bxx.023) POS = 4: move old location to position 4 (Bxx.024) DIR = 0: any given direction DIR = 1: positive direction DIR = 2: negative direction SPI = 1: old location of the tool in spindle 1 SPI = 2: old location of the tool in spindle 2 SPI = 3: old pocket of tool in spindle 3 The "MOP" command initiates a tool storage unit movement which moves the old pocket of the tool located in tool spindle "SPI" to position "POS" from which the tool was removed. Optionally, the position, direction of rotation and the tool spindle can be declared. If the position, direction or tool spindle are not entered, the tool management system selects the old pocket for the tool which is active for "Spindle 1" and places it in "Position 1" using the shortest distance.

278 8-18 NC Functions to Control Tool Management MTC 200 NC programming instruction If this command is used consistently, all tools will be returned to the pockets in which they were located before they were used in the machining process. This keeps the tool storage unit in an orderly condition. This is desirable, for example, when extra-wide tools always have to be stored in the same magazine pocket. The CNC does not wait until the tool storage unit has completed its motion. It continues to process the NC program while the move is being carried out. If this is not desired, the MRY command can be used to halt execution of the NC program until the tool storage motion is completed. Example: The tool (T256) in "Spindle 1" is to be returned to its old pocket in the magazine. This requires the old pocket to be moved to "POS 2". Due to the fact that the magazine may only be turned in the positive direction, the turning direction is declared as "1". Declare "Position 2" for POS, a positive turning direction for DIR and the first spindle for SPI. old location of T loading position 9 POS MOP(2,1,1) 5 4 loading position 3 POS POS POS reference mark gripper reference mark gripper : occupied : free spindle 1 T256 spindle 1 MOP.FH7 Fig. 8-12: Positioning the old pocket using MOP

279 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-19 Wait until Position is Approached "MRY" MRY Magazine Ready (Magazine movement completed?) If the last tool storage movement command has not yet been completed, then the MRY command temporarily interrupts the processing of the NC program. The NC program does not resume processing until the programmed position has been reached. This permits the tool storage axis to be synchronized with the NC program. Example: Tool changing program: N0000.M6 ;Jump label for changing tools N0012 MTP(2,0) ;Move programmed tool to position 2 ;on the shortest path N0037 MRY ;Wait until position 2 is reached Example: (NC program) MTP (2,0) MRY ;Move programmed tool to "POS 2" along the shortest path ;Wait until position 2 is approached Enable Tool Magazine (Storage) for Manual Mode "MEN" MEN Magazine Enable (enable magazine) The "MEN" command allows a tool magazine to be traversed manually while the "Automatic" mode of the machine is active. For example, this allows a worn tool to be changed while production continues. In order for the tool magazine to run in manual mode, the MEN command must be active in the NC program and the PLC must have selected the "Manual" mode for the tool storage. If the tool storage mode is changed to manual after a MEN command has been performed, the CNC continues to execute the program for this process until the next tool storage movement or tool change command is encountered. It then issues the corresponding status message: "Waiting for tool storage move cmd to be completed" When the system switches back to program-controlled mode, the status message in the diagnostic box is cleared and the remaining commands are processed to completion. All motion and tool change commands programmed in the NC program (generally located in a tool change subroutine) request tool storage again. If a further motion or tool change command follows before the change to manual mode and after the tool storage system was enabled via MEM in the NC program, the tool storage unit cannot be traversed manually while

280 8-20 NC Functions to Control Tool Management MTC 200 NC programming instruction the program is executing and continuing to the next "MEN", "BST", "RET" or control reset. Moving Tool Storage Unit with Nonuniform Pocket Distribution Tool storage unit movement commands of NC (MTP, MMP, MHP, etc.) Process parameter Bxx.072 "Page No. for variable pocket positions" and corresponding machine data page NC-controlled tool magazines and tool turrets that have a nonuniform spacing of the tool positions can be easily operated using a machine data page with the tool storage movement commands of the NC (MTP, MMP, MHP, etc.). Furthermore, additional axis positions can be specified regardless of the type of spacing of the tool storage unit (uniform or nonuniform spacing) for logical positions 1 to 4; any intermediate position can then be approached. In this regard: 1. the number of the machine data page ( ) in which the variable positions are specified is to be entered in process parameter Bxx.072 "Page No. for variable positions". 2. the corresponding page in the machine data is to be created and the positions of tool locations to be entered. The NC evaluates process parameter Bxx.072 for the runtime and the corresponding machine data page and uses the highlighted positions to calculate the absolute magazine positions of the tool storage axis. A separate page must be created for every process in multiprocess operation. Note: Process parameter Bxx.072 appears in the user interface only if "Yes" was entered in system parameter A "Tool management" and in process parameter Bxx.014 "Tool management". Machine data entries The machine data page contains one absolute axis position each for positions P1-P4 (control variable LV1 = -1 to -4), for the position of home position (MHP command) (LV1 = 0), for all n magazine locations (LV1 = 1-n). Detailed information regarding the setting of parameters as well as the structure and definition of the machine data page can be found in the description of process parameter Bxx.072 "Page No. for variable positions" in the Bosch Rexroth MTC 200/Bosch Rexroth TRANS 200 description of parameters. Effect on jogging the tool axis If nonuniform tool pocket distribution has been activated using process parameter Bxx.072 "Page No. for variable positions", the jogging of tool axes refers to one of the four change positions P1-P4. For more information, see section "Magazine jogging operating mode in case of variable tool pocket distribution "PxxC.MGJGn"" in the "Bosch Rexroth MTC 200 interface description". Notes: The nonuniform spacing function is not available when a combined spindle/revolver axis or PLC-controlled tool storage units are used. When nonuniform pocket distribution is activated for NCcontrolled tool turrets, parameters Bxx.021-Bxx.024 "Position 1-4" no longer have an effect. Only the magazine position approached using a tool storage movement command (e.g. MTP, MMP, jogging) is a valid position (P1-P4) for the tool change.

281 MTC 200 NC programming instruction NC Functions to Control Tool Management Tool Changing Commands of the NC Changing tools between magazine, spindle or gripper is initialized via the tool changing commands of the NC. Using the tool changing commands is permitted only when magazines are used as tool storage units. The following figure shows the basic sequence of a tool changing process. CNC SPS NC NC program WZM PLC TMS.. TMS XMS tool mgmt. checks requested tool transfer of PLC XMS_PA XMS_NA XMS_Q tool mgmt. performs requested tool transfer of PLC XMS_CA tool mgmt. aborts requested tool transfer of PLC TMS_Q CNC1.FH7 Fig. 8-13: Representation of the principles of a tool change The following table contains an overview of all tool change commands of the NC. The table is followed by a detailed description of commands.

282 8-22 NC Functions to Control Tool Management MTC 200 NC programming instruction NC tool commands (3) Function Meaning Description TCH TMS Complete tool change Tool Change Change tool from magazine to spindle Syntax: TCH (POS, SPI) V22_ POS: Position to be moved to SPI: Spindle Syntax: TMS (POS, SPI) TPE TSE Tool change from Magazine to Spindle Tool pocket empty? Tool Magazine Pocket Empty Tool spindle empty? POS: Position to be moved to SPI: Spindle Syntax: TPE Syntax: TSE TSM Tool Spindle Empty Switch tool from spindle to magazine Tool change from Spindle to Magazine Syntax: TSM (POS, SPI) POS: Position to be moved to SPI: Spindle Werkzeugbefehle_NC3_V22_ xls Performing a Complete Tool Change "TCH" TCH Syntax Tool Change (Complete tool change) TCH TCH(POS) TCH(POS,SPI) Expression POS DIR: <constant> <variable> <constant> <variable> Value range Meaning POS: 1, 2, 3, 4 SPI: 1, 2, 3 Tool exchange between spindle "SPI" and position "POS". The "TCH" command initiates a tool exchanging process between spindle "SPI" and the magazine location in position "POS". The CNC stops program execution while the tool change operation is proceeding under PLC control. Optionally, the change position and tool spindle can be declared. If no data are declared for the change position or tool spindle, tool management selects "Position 1" and "Spindle 1". The magazine must be correctly positioned before "TCH" is called. The TCH command is used in particular with double-arm gripper systems.

283 MTC 200 NC programming instruction NC Functions to Control Tool Management 8-23 Change the Tool from the Magazine to the Spindle "TMS" TMS Tool Change from Magazine to Spindle Syntax TMS TMS(POS) TMS(POS,SPI) Expression POS: DIR: <constant> <variable> <constant> <variable> Value range Meaning POS: 1, 2, 3, 4 SPI: 1, 2, 3 Changing tools from position "POS" to spindle "SPI". The TMS command initiates a tool changing process between the magazine locations in position "POS" and spindle "SPI". The CNC stops program execution while the tool change operation is proceeding under PLC control. Optionally, the change position and tool spindle can be declared. If no data are declared for the change position or tool spindle, tool management selects "Position 1" and "Spindle 1". Even before "TMS" is called, the magazine pocket containing the tool which is to be exchanged must already be in the specified change position; a tool may not be present in the tool spindle. This command is needed for single-arm gripper systems or for gripperless tool changers if the change operation has to be divided into a pickand-place sequence. Tool Change from Spindle to Magazine "TSM" TSM Tool Change from Spindle to Magazine Syntax TSM TSM(POS) TSM(POS,SPI) Expression POS: DIR: <constant> <variable> <constant> <variable> Value range Meaning POS: 1, 2, 3, 4 SPI: 1, 2, 3 Changing tools from spindle "SPI" to position "POS". The "TSM" command initiates a tool change between spindle "SPI" and the magazine location in position "POS". The CNC stops program execution while the tool change operation is proceeding under PLC control. Optionally, the change position and tool spindle can be declared. If no data are declared for the change position or tool spindle, tool management selects "Position 1" and "Spindle 1".

284 8-24 NC Functions to Control Tool Management MTC 200 NC programming instruction Magazine Pocket Empty? "TPE" Before "TSM" is called, a tool must be present in the tool spindle and the magazine must have an empty location at the specified change position. This command is needed for single-arm gripper systems or for gripperless tool changers if the change operation has to be divided into a pickand place-sequence. TPE Tool Magazine Pocket Empty The "TPE" command checks whether the magazine or turret location that is currently at "Position 1" is empty. If this is the case, tool management immediately continues program execution. Otherwise, program execution is stopped and an error message is generated. Using this command permits collisions to be avoided when a tool is stored. The command must be used in the storage sequence of the tool changing subroutine before a movement is performed. Note: The "TPE" command always refers to the location at "Position 1". Tool Spindle Empty? "TSE" TSE Tool Spindle Empty The "TSE" command checks whether the tool location that is currently in "Spindle 1" is empty. If this is the case, tool management immediately continues program execution. Otherwise, program execution is stopped and an error message is generated. Using this command permits collisions to be avoided when a tool is stored. The command must be used in the storage sequence of the tool changing subroutine before a movement is performed. Note: The "TSE" command always refers to the location at "Spindle 1".

285 MTC 200 NC programming instruction Process and Program Control Commands Process and Program Control Commands 9.1 Process Control Commands The multiple-process structure of the CNC makes it necessary to coordinate the individual processes used in the CNC. If more than two processes are present in the CNC, the process with number "0" is generally used for program coordination. The number "0" process thus handles the management function used to coordinate all processes which are involved in machining. The process control commands are passed to the NC PLC interface. MTC200 (control station) Process 0 Process 1 Process 2 Process 3 Process 4 Process 5 Process 6 MTC200 station 1 External Mechanism 7 External Mechanism 8 External Mechanism 9 External Mechanism 10 External Mechanism 11 MTC200 station 2 External Mechanism 12 External Mechanism 13 External Mechanism 14 External Mechanism 15 External Mechanism 16 MTC200 station 3 External Mechanism 17 External Mechanism 18 External Mechanism 19 External Mechanism 20 External Mechanism 21 MTC200 station 4 External Mechanism 22 External Mechanism 23 External Mechanism 24 External Mechanism 25 External Mechanism 26 91Proz.fh7 MTC200 station 5 External Mechanism 27 External Mechanism 28 External Mechanism 29 External Mechanism 30 External Mechanism 31 91PROZ.FH7 Fig. 9-1: Processes and external mechanisms of CNC In addition to the master process, the CNC can control six additional processes and up to 25 external mechanisms.

286 9-2 Process and Program Control Commands MTC 200 NC programming instruction A master process (process 0) must always be present. This process is responsible for synchronizing the existing processes and external mechanisms, assuming this is necessary. If the system consists of a single station, the coordination task and the axes are assigned directly to the master process. Note: The number and organization of the processes and external mechanisms is set by the machine builder in the system parameters. Define Process "DP" Syntax The DP command uses an internal signal to inform the PLC that the process is needed during NC program execution. The PLC uses this information to initialize process-specific signals. DP <process> DP 2 DP <variable> Process[0-6] internal processes Process[7-31] external mechanisms Select NC Program for Process "SP" All other process control commands will not be accepted unless the corresponding process was previously defined using DP. The DP command can be used more than once in an NC block. A number of processes can be defined simultaneously in an NC block. The definition of a process using DP is canceled at the end of the program. The SP command selects the program having the specified program number from the active NC program package for the specified process. The program number corresponds to the number which is stated in the program directory for the given process. Syntax SP <process> <program number> SP 3 25 SP <variable> <variable> Process[0-6] internal processes Process[7-31] external mechanisms Program number[1-99] program number in active program package The NC program number for the next program which is to be processed can be selected while a process is still active. The selected program is not activated until the next reboot. The SP command must not be used more than once in an NC block.

287 MTC 200 NC programming instruction Process and Program Control Commands 9-3 Start Reverse Program "RP" The RP command starts the subroutine which is addressed by the reverse vector in the declared process. Any forward program which may be active is interrupted; the currently valid reverse vector addresses the branch location in the reverse program. Syntax RP <process> RP 4 RP <variable> Process[0-6] internal processes Process[7-31] external mechanisms Start Advance Program "AP" The subroutine addressed by the reverse vector must be located in the program in which the reverse vector was programmed. The RP command can be used more than once in an NC block. A number of reverse processes can be started simultaneously in a single NC block. Command AP starts the selected advance program in an inactive process. If the process was already active, then the NC block processing in which AP was programmed is interrupted until the process to be started is totally completed. The declared process is then started and NC block processing of the interrupted process is continued. Syntax AP <process> AP 1 AP <variable> Process[0-6] internal processes Process[7-31] external mechanisms Wait for Process "WP" The AP command can be used more than once in an NC block. A number of forward programs can be started simultaneously in a single NC block. NC block processing of the program which was called is held in the NC block in which WP is programmed until the process selected in the command parameter has been completed. Syntax WP <process> WP 5 WP <variable> Process[0-6] internal processes Process[7-31] external mechanisms Once the process selected in the command parameter is completed, execution of the NC program from which the call was made can continue. Process control command WP can be programmed more than once in a single NC block. The WP command should not be programmed within a program section in which tool path compensation is active. If this proves to be unavoidable, be certain that it is programmed only between linear block transitions.

288 9-4 Process and Program Control Commands MTC 200 NC programming instruction Note: Command WP waits until the process selected has been completed. Processes are completed by: successful completion of an advance program successful completion of a reverse program cancellation of the program after control reset (after program interrupt). The processing of the WP command does not provide any information about whether the process task has been completed successfully. Lock Process "LP" Syntax The LP command specifies which processes must be in a defined state for the NC program to be completed. This state must remain intact until the NC program is completed. LP <process> LP 4 LP <variable> Process[0-6] internal processes Process[7-31] external mechanisms This command can be used, for example, to specify that a station which is not needed for machining can be turned off or that it must be in a specific position so as not to endanger ongoing work. Stations which are locked using LP cannot be operated manually, even though they might not be involved in the programmed work. Process control command LP is reset at the end of the program by RET, BST or by control reset. Example: application of process and program control commands Management program Process 0 program number 15.START Jump label for BST.START DP 1 DP 2 Definition of process 1 & process 2 SP 1 15 Program preselection, program 15 in process 1 SP 2 15 Program preselection, program 15 in process 2 RE 1:0 Delete acknowledgement processing finished in process 1 RE 2:0 Delete acknowledgement processing finished in process 2 AP 1 AP 2 Start advance program in process 1 & 2 WP1 WP 2 Wait until both processes have completed their programs BER.FEHLP1 1:0 Error handling process, error process 1 BER.FEHLP2 2:0 Error handling process, error process 2 SP 1 16 Program preselection, program 16 in process 1 SP 2 16 Program preselection, program 15 in process 2 RE 1:0 Delete acknowledgement processing finished in process 1 RE 2:0 Delete acknowledgement processing finished in process 2 AP 1 AP 2 Start advance program in processes 1 & 2 WP1 WP 2 Wait until both processes have completed their programs BER.FEHLP1 1:0 Error handling process, error process 1 BER.FEHLP2 2:0 Error handling process, error process 2 BST.START Jump with stop to label.start.fehlp1 Error handling process, error process 1

289 MTC 200 NC programming instruction Process and Program Control Commands FEHLP2 Error handling process, error process 2....HOME Branch label for the.home program DP 1 DP 2 Definition of processes 1 & 2 SP 1 15 Program preselection, program 15 in process 1 SP 2 15 Program preselection, program 15 in process 2 RP 1 RP 2 Start reverse program in processes 1 & 2 WP1 WP 2 Wait until both processes have completed their programs BST.START Jump with stop to label.start PROGRAM END Note: If no reverse vector has been programmed in the individual processes, then a jump to.home is performed in the corresponding process. Subprogram 15, process 1 Subprogram 15, process 2 G00 G90 G54 G06 G08 ;Path commands G18 G90 G54 G06 G08 ;Path commands G00 Y0 Z50 ;Start position G00 X0 Z0 Y70 ;Start position M03 S1500 ;Spindle ON M03 S1500 ;Spindle ON G01 X50 Y100 F1000. ;1 st mach. position ;Machining G01 X50 Z40 F1500. ;1 st mach. position ;Machining M05 ;Spindle OFF M05 ;Spindle OFF RET ;Program end RET ;Program end Subprogram 16, process 1 Subprogram 16, process 2 G00 G90 G54 G06 G08 ;Path commands G18 G90 G54 G06 G08 ;Path commands X0 Y0 Z30 ;Start position G00 X0 Z0 Y55 ;Start position M03 S1500 ;Spindle ON M03 S1500 ;Spindle ON G01 X90 Y150 F1200. ;1 st mach. position ;Machining G01 X10 Z110 F2000. ;1 st mach. position ;Machining M05 ;Spindle OFF M05 ;Spindle OFF RET ;Program end RET ;Program end Process Complete "POK" By programming the POK (Part OK) command, the NC programmer can determine in the NC program when the process was completed. The POK command causes a signal to be sent to the PLC (process-specific). Syntax POK If the POK command is programmed in process 0, the PLC signal is not set to 1 until all processes defined by means of DP (including the external mechanisms) have already processed the POK command. The signals for the POK command are reset at the end of the program by RET or BST or by a control reset.

290 9-6 Process and Program Control Commands MTC 200 NC programming instruction 9.2 Axis Transfer Between Processes "FAX", GAX" {0><}100{>Certain applications require that the fixed axis assignments to the processes be canceled and that the axes be divided into a number of interpolation groups (processes). Each NC axis is assigned to a primary process; however, it can also be assigned to up to three different secondary processes. The axis name and meaning in the coordinate system is the same for all processes in which the axis is enabled. In addition, different axes having the same name can be called from different processes. Syntax Free axis <axis name> in the process in which the axis is located. FAX (<axis name>) FAX (Y) Get axis <axis name> from the process defined in the command parameter. GAX (<process>:<axis name>) GAX (1:Y) The primary process must always be stated when specifying the process for the GAX command. If the axis is called from the primary process via GAX, it is not necessary to state the process number. An axis transfer will not occur until the process in which the axis is currently located and is called by a different process frees the axis. The process which gets the axis (GAX) must wait until the other process frees the axis (FAX). Likewise, the process which frees the axis waits until a different process gets the axis. This prevents the axis from assuming a "lost" state. Transferable axes are displayed in the position display of each process in which they can be present. If a transferable axis is located in the indicated process, the complete axis data set is displayed for this axis. On the other hand, if the axis is currently assigned to a different process, two dashes are displayed instead of the position and speed data. All axes in the CNC with the exception of the magazine and turret axes can be transferred between the processes. The transfer from one process to another can only take place at an NC block transition. NC block processing is stopped and is not continued until it is certain that the override value for the new process is active for the axes. Rotary and linear axes can be transferred between processes only when they are stopped. Spindles can also be transferred between the processes at the specified spindle speed. However, spindle-dependent feed modes such as "feed per turn" are deactivated when spindles are transferred. The axis continues to be assigned to the primary process, even after the axis is transferred to a secondary process. Thus, axis errors and their diagnostic messages are displayed in the primary process. All axes belonging to a different primary process are freed at the end of the program by RET,M02, M30 or BST or by a control reset and by jogging axes in setup mode; all axes in a different process are requested (get). Note: The machine builder specifies the processes between which a NC axis can be transferred in the axis parameters.

291 MTC 200 NC programming instruction Process and Program Control Commands 9-7 Example: NC program - axis transfer A machining center having two tables is divided into 3 NC processes. Since the parts which are to be machined on the two tables can be identical, the machine operator wants to be able to use the same NC programs. The X axis offset is generated by overwriting the zero offset. The process is divided as follows: Process 0 is the machining process, which has 3 main axes, "X," "Y" and "Z" as well as main spindle "S." Processes "0," "1" and "2" are started simultaneously by pressing the NC start key. Process 1 manages the rotary table (B axis) on the right side and either frees or gets the B axis as needed. Process synchronization is established by means of the programmed NC events. Process 2 manages the rotary table (B axis) on the right side and either frees or gets the B axis as needed. Process synchronization is established by means of the programmed NC events. The necessary initializations and the corresponding reverse program are not shown in the NC program. If the NC program is interrupted, various mechanisms and initializations would be needed to obtain a defined state. Z Y B B 92achsü.fh7 X 92ACHS.FH7 Fig. 9-2: Axis transfer on a machining center having 2 machining tables Process 1 "B axis right" Process 2 "B axis left" BEARB Label for branch loop BEARB Label for branch loop FAX (B) Enable B-axis FAX (B) Enable B-axis WES 9 Wait until B-axis is in P0 WES 9 Wait until B-axis is in P0 RE 9 RE 9 GAX (B) Get B axis if it has been freed in machining p. GAX (B) Get B axis if it has been freed in machining p. BER.BEARB 10 Loop until machining in P0 is complete BER.BEARB 10 Loop until machining in P0 is complete RE 10 RE 10 RET RET

292 9-8 Process and Program Control Commands MTC 200 NC programming instruction Process 0 - Processing RE 1:10 RE 2:10 T1 BSR.M6 [right side] GAX (1:B) SE 1:9 WER 1:9 BSR.BET1 [left side] GAX (2:B) SE 2:9 WER 2:9 BSR.BET1 T2 BSR.M6 [right side] GAX (1:B) SE 1:9 WER 1:9 BSR.BET2 [left side] GAX (2:B) SE 2:9 WER 2:9 BSR.BET2 Reset events for jump loops in process Tool change, 1st tool Get B axis from process 1 Process 1 is interrupted up to this NC block Wait until process 1 is synchronous Process right side Get B axis from process 2 Process 2 is interrupted up to this NC block Wait until process 2 is synchronous Process left side Change tool, 2nd tool Get B axis from process 1 Process 1 is interrupted up to this NC block Wait until process 1 is synchronous Process right side Get B axis from process 2 Process 2 is interrupted up to this NC block Wait until process 2 is synchronous Process left side SE 1:10 SE 2:10 T0 BSR.M6 RET.BET1 G00 G54 G90 X0 Y0 Z100 B0 End jump loops in processes Program end Process program, 1st tool Path commands, interpolation conditions M03 S1000 ;machining M05 FAX (B) RTS.BET2 RTS Release B axis Process subroutine 1 end Process program 2nd tool Process subroutine 2 end End of program Machining program of 1st tool Motion commands, interpolation conditions Enable B-axis End of machining subroutine 1 Machining program of 2nd tool End of machining subroutine 2

293 MTC 200 NC programming instruction Process and Program Control Commands Program Control Commands Program End with Reset "RET" The RET command identifies the end of an NC program. The RET command acts like functions M002/M030; however, an auxiliary function is not passed on to the PLC. When the RET command is performed, processing branches to the first NC block in the active NC program, sets the selected functions for the power-on state, and waits for a start signal. Tool edge E1 is selected. After the RET command has been performed, the current reverse vector points to branch label.home. Syntax RET After the RET command is performed, all subroutine levels and their reverse vectors are cleared and the controller is in the initial state of the main program level. In terms of its function, RET is comparable to the M002/M030 functions defined in DIN Branch with Stop "BST" The BST command branches to the branch label which is set in the command parameter, sets the path conditions of the power-on state and waits for a start signal. After a BST, the current reverse vector points to the branch label.home. Syntax BST <branch label> BST.HALT After a BST command, all subroutine levels and their reverse vectors are cleared and the controller is in the initial state. The BST command cannot be used within a subroutine. The branch from the subroutine will result in an error message. Programmed Halt "HLT" The HLT command interrupts program execution and waits for a new start signal. The HLT command acts like function M000; however, an auxiliary function is not passed on to the PLC. Syntax HLT If a message is to be output for the HLT command, note that the message must already be programmed in an NC block before the HLT command. The reason for this is that the HLT command is executed ahead of a message in the standard order in which NC commands are carried out (see Chapter "Elements of an NC block"). Branch Absolute "BRA" The BRA branch command branches to the label set in the command parameter and continues program execution there. Syntax BRA <branch label> BRA.WEITER

294 9-10 Process and Program Control Commands MTC 200 NC programming instruction Jump to Another NC Program "JMP" The JMP jump command jumps to the NC program number set in the command parameter and continues program execution in the first NC block of this new NC program. Syntax JMP <program number[1-99]> JMP 50 JMP <variable> The jump can go to any desired NC program in the active NC program package. The reverse vectors are not changed by a jump to a different NC program. 9.4 Subroutines Subroutine Technique When workpieces are being machined, it is sometimes necessary to repeat a given operation a number of times. This operation could be programmed as a subroutine so that similar processing sequences could be called up repeatedly. This subroutine could be called from any point in the NC machining program as a complete function module. Subroutines are organized in the CNC based on the following structure. NC Program Memory B NC Program Memory A NC Program 04 Advance Program NC Cycle Memory Reverse Program Program No. 99 Program No. 0 Subroutines of the Advance and Reverse Program User Cycles and Subroutines Bosch Rexroth and Machine Builder s Subroutines and Cycles 3NCORG.FH7 Fig. 9-3: Program organization for CNC Subroutines which are specific to the NC program are programmed in the current NC program. Subroutines which are specific to the NC package are programmed in the program using number 99. They can be called from any NC program in the package. Subroutines and process cycles are programmed in program 0 "Cycle Memory". These NC cycle programs can be called from any NC memory, process, and NC program package.

295 MTC 200 NC programming instruction Process and Program Control Commands 9-11 Subroutine Structure A subroutine consists of the: start of the subroutine, NC blocks of the subroutine, and end of subroutine.label Start of subroutine NC blocks RTS NC blocks in subroutine End of subroutine Fig. 9-4: Subroutine structure In terms of syntax, the jump label begins with a decimal point followed by at least one and no more than six legal characters. The syntax is NOT case sensitive. The " " sign following the decimal point is reserved for Bosch Rexroth fixed cycles. Subroutine Nesting A subroutine can be called up from an NC program as well as from a different subroutine. This is referred to as "subroutine nesting." The CNC allows 10 subroutine nesting levels. This means that subroutines can be nested no more than 9 levels in depth. Program Call Levels : Nesting Levels 95Uscha.fh7 NC Program Call BSR.SR1 BSR.SR2.SR1 BSR.SR3.SR2.SR3 BSR.SR4.SR4 BSR.SR5.SR5 BSR.SR6.SR6 BSR.SR7 BSR.SR8.SR7 BSR.SR9.SR8.SR9 RTS RTS RTS RTS RTS RTS RTS RTS RTS 95USCHA.FH7 Fig. 9-5: Subroutine nesting Jump to NC Subroutine "JSR" The JSR command jumps to the NC program number set in the command parameter and continues program execution in the first NC block of this new NC program. In contrast to the JMP command, the called NC program returns to the NC program from which it was called after the RTS command has been executed. This allows entire NC programs to be used as subroutines. Syntax JSR <program number[1-99]> JSR 15 JSR <variable> The jump can go to any desired NC program in the active NC program package. The reverse vectors are not changed by a jump to a different NC program.

296 9-12 Process and Program Control Commands MTC 200 NC programming instruction Subroutine Call "BSR" The BSR command branches to the label set in the command parameter and continues program execution there. Syntax BSR <label> BSR.UP1 After the return from a subroutine called using the BSR command via the RTS command, the called program is continued at the next NC block. Return from NC Subroutine "RTS" The RTS command marks the end of the subroutine. After the RTS command is finished, processing returns to the NC program from which the call was made, and NC block processing is continued in the NC block following BSR or JSR. Syntax RTS If a subroutine call did not precede the return from a subroutine (BSR, JSR), the program will be stopped and an error message will be generated.. BSR.SR1.. BSR.SR1.. BSR.SR1.. RET 96Uruf.fh7.SR1.. RTS 96URUF.FH7 Fig. 9-6: Subroutine call

297 MTC 200 NC programming instruction Process and Program Control Commands Reverse Vectors Set Reverse Vector "REV" The CNC permits flags to be defined for reverse programs based on various program states relating to certain machine positions. These withdrawal programs (reverse programs) are used to program how the NC axis must withdraw from the various positions and return to a defined state. The flags for the reverse programs, which are identified by labels, are referred to as reverse vectors. The label ".HOME" was defined as the basic reverse vector for the main program after the controller is started. This basic reverse vector must be part of every NC program (or it must be present in program No. 99 or in the NC cycle memory), and it must mark the beginning of the basic reverse program. After each end of program via RET or BST and each time after the controller is reset in the power-on state, the reverse vector in the main program points to the label ".HOME", and all reverse vectors in the subroutines are cleared. The NC block containing the label defined as the command parameter is defined as the first NC block in the reverse program in other words, a reverse program would start processing at this label beginning at the NC block. Syntax REV <label> REV.HOLE1 Reverse vectors can also be defined within subroutines. Such reverse vectors in subroutines have the same nesting structure in the reverse program as in the advance program. Reverse programs from subroutines must also be terminated by the RTS command. When a subroutine is closed, the reverse vectors set up in the subroutine are automatically cleared. A reverse vector programmed in an NC block will not be activated until the end of NC block execution. The label programmed in conjunction with REV must be located in the NC program in which the REV command was programmed. The REV command will not find the label in the global program identified by number 99 or in the NC cycle memory. Example: NC program - global homing program.home MRF D0 G40 G47 G53 G90 G74 Z0 F1000 G74 X0 Y0 F1500 T0 BSR.M6 MRY RET Basic reverse vector Reference tool magazine Cancel D corrections Home Go to Z axis reference point Go to X and Y axis reference point Tool from spindle to magazine Wait until magazine is in position Program end

298 9-14 Process and Program Control Commands MTC 200 NC programming instruction Z Y X 300/150/50 300/150/-200 Z Y 10/150/50 X 97Revers.fh7 Fig. 9-7: NC Program G00 G90 G54 X-200 Y150 Z300 REV.M1 X50 RE V.M2 Z10 BS R.BO H R X75 BS R.BO H R... M30 Reverse Vectors M.M2G00 Z300.M1G00 X-200 Y150 Z300 RET if BSR.HOME instead of RET NC machining using reverse vectors Subroutine.BO H R RE V.U1 G0 Z2 G1 Z-30 F800 G0 Z10 RTS Reverse Vectors U.U1G00 Z10 RTS Global Homing.H O ME... RE T 97REVERS.FH7 Note: All reverse vectors (REV) are cleared upon a control reset. The branch label of the reverse program points to the basic reverse vector.home. The NC blocks that are defined by the reverse vectors (REV) are no longer processed. Merely the NC blocks of the basic reverse vector.home are considered. Example: ; Tool change program.m6 ; install new Read tool no. spindle BEQ.M6_T0 Must tool be changed? ; Magazine positioning BTE.M6_BAC T0 programmed? MTP move to programmed location BRA.M6_TCH.M6_BAC MFP Move to free location ; Tool change.m6_tch G40 G47 G53 G90 M9 tool offset OFF, machine zero point, absolute measure SE 0:15 G0 Z392 M19 S90 MRY REV.RM6_2 Z axis and spindle in changing pos. Q1 REV.RM6_3 Close gripper Q2 REV.RM6_4 Release tool

299 MTC 200 NC programming instruction Process and Program Control Commands 9-15 TMS REV.RM6_5 Q7 REV.RM6_6 Extend gripper Q3 REV.RM6_7 Rotate gripper Q8 REV.RM6_8 Retract gripper Q6 REV.RM6_9 Spindle clamp closed Q5 REV.RM6_10 Open gripper RE 00:12:00 Transfer: G1 Spindle, G0 Mag. TSM REV.RM6_12 RE 0:15 BTE.M6_T0 Was T0 programmed? G48 [ ] RTS ;tool change not required (tool already in spindle) or ;T0 has been programmed.m6_t0 [ ] RTS ; ; Reverse vectors for tool change program.rm6_6 Q3.RM6_5 Q8.RM6_4 SE 0:12 TSM.RM6_3 Q6.RM6_2 Q5 RTS.RM6_7 Q8.RM6_8 Q6.RM6_9 Q5.RM6_10 RE 0:12 TSM.RM6_12 BTE.M6_T0 G48 [ ] RTS RTS Turn arm back Retract gripper Transfer. G1 mag. G0 spindle Clamp closed Open gripper Retract gripper Clamp closed Open gripper Consistent reverse vector programming permits errors that occur during program execution to be taken into account. For example, if a malfunction occurs while processing a Q function, the machine is returned to a non-critical state using the reverse vectors. This is no longer possible once the reverse vectors have been cleared by a control reset. Remedy: In these situations, clearing the reverse vectors by control reset must be prevented. This is possible using an event (here: event 0:15) and its nesting in the PLC program. A control reset is not possible as long as the event is set (during the execution of the Q functions). A control reset is possible only after the event has been reset.

300 9-16 Process and Program Control Commands MTC 200 NC programming instruction Note: If, in exceptional situations, a control reset is possible even after an event has been set, the event can manually be reset via the user interface. This enables the machine manufacturer to distinguish between authorized and non-authorized end users. With tool changers, updating tool management must be ensured. 9.6 Conditional Branches Branch if Spindle is Empty "BSE" Conditional branches are not performed unless the corresponding condition is met. If this condition is not met, the program continues execution starting at the following NC block. The BSE branch command can be used to determine whether or not the spindle is empty. Syntax BSE <label> BSE.SPLE If the 1 st spindle is empty, program execution is continued from the branch label that is specified in the command parameter. Branch if T0 Was Set "BTE" The BTE command can be used to determine whether T0 was last selected, in other words, whether the tool must be removed from the spindle without loading a new tool into the spindle. Syntax BTE <branch label> BTE.PRT0 If T0 was programmed last, program execution continues at the branch label defined in the command parameter. Branch upon Reference "BRF" The BRF branch command can be used to determine whether the NC axes in the CNC are located at their reference points. Syntax BRF <branch label> BRF.NORE If the NC axes are properly referenced, program execution continues at the branch label defined in the command parameter. Branch if NC Event is Set "BES" The BES branch command is used to continue program processing at the declared branch label if the event defined in the command parameter is set. Syntax BES<branch label><process number[0-6]>:<event number[0-31]> BES.LABEL 1:15 BER <branch label> <event number[0-31]> BER.LABEL 9 If the symbol " " is declared instead of the event number, a branch to the addressed branch label is executed if at least one event in the specified process is set. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes.

301 MTC 200 NC programming instruction Process and Program Control Commands 9-17 Branch if NC Event is Reset "BER" The BER branch command is used to continue program processing at the declared branch label if the event defined in the command parameter is reset. Syntax BER<branch label><process number[0-6]>:<event number[0-31]> BER.LABEL 1:15 BER <branch label> <event number[0-31]> BER.LABEL 9 BER <branch label> <event number[1-31]> BER.LABEL 9 If the symbol " " is declared instead of the event number, processing branches to the addressed branch label if all the events in the specified process are reset. The PLC program can also influence events. Therefore, please refer to the machine builder's information since the builder may have used various events for synchronization purposes. 9.7 Branches Depending on Arithmetic Results Branch If Equal to Zero "BEQ" Branches which depend on arithmetic results relate to the results of the most recently performed arithmetic operation. Branch command BEQ is used to continue program execution at the specified branch label if the result of the most recent mathematical operation was equal to zero. Syntax BEQ <branch label> BEQ.ZERO Branch If Not Equal to Zero "BNE" Branch command BNE is used to continue program execution at the specified branch label if the result of the most recent mathematical operation was not equal to zero. Syntax BNE <branch label> BNE.NZERO Branch If Greater Than or Equal to Zero "BPL" Branch command BPL is used to continue program execution at the specified label if the result of the most recent mathematical operation was greater than or equal to zero (PLus). Syntax BPL <branch label> BPL.GZERO Branch If Less Than Zero "BMI" Branch command BMI is used to continue program execution at the specified branch label if the result of the most recent mathematical operation was less than zero (MInus). Syntax BMI <branch label> BMI.LZERO

302 9-18 Process and Program Control Commands MTC 200 NC programming instruction A = B BEQ BEQ A <> B BNE BNE A < B BMI --- A <= B --- BPL A > B --- BMI A >= B BPL --- Note: Due to resolution inaccuracies, there can be malfunctions or missing functions when BEQ or BNE is used if the arithmetic results are decimal fractions. Incorrect program jumps may lead to damage to workpiece and/or machine. WARNING = BEQ.label (result=0) does not work! Remedy: Depending on the resolution, e.g. 0.01, convert into an integer 1000) BEQ.label works! Example: NC program Loop Preassign the loop variables.next Loop beginning Increment loop Read D correction 1 BEQ.BREAK If D correction 1 element=25, then exit the BMI.NEXT Check loop variable if loop conditions are still given. [no element of D correction 1 has the value 25] Output message M00 Acknowledge programmed halt from PLC BRA.EXIT Branch to the program end.break Loop exit label [one element of D correction 1 has the value 25] Output message M00 Acknowledge programmed halt from PLC.EXIT End-of-program label M30 Acknowledge program end from PLC RET

303 MTC 200 NC programming instruction Variable Assignments and Arithmetic Functions Variable Assignments and Arithmetic Functions 10.1 Variables NC variables are used in an NC program to represent a numerical value. A value can be assigned to an NC variable by the NC program, PLC program or from the user interface; the value of the NC variable can be read accordingly by these programs or by the user interface. NC variables are identified by the by optionally stating the process number followed by a colon, and by a 1-3-digit number. 256 variables (0 to 255) are available for each of the 7 processes in the CNC. In theory, a total of 1792 variables are available in the CNC that can be used regardless of how many processes are defined. Note: are already used in the Bosch Rexroth cycles. If the user employs these variables, they may be overwritten by those cycles. <process number[0-6]>:<variable If the process number is not assigned, then the variable relates to the process in which the variable was programmed. Syntax for assigning a value to a <process number[0-6]>:<variable number[0-255]> =<arithmetic Note: The internal data representation of a value employs the "double real" format. The value range for entries goes from - 1.0E ±300 to +1.0E ±300. Only values with a maximum of 7 positions can be programmed in the NC program ("single real" format). Syntax for representing the data Syntax for negating the contents of a variable E+20 90E-10 If the content of an NC variable is to be negated, the NC variable must be placed within parentheses. Note: Irrespective of the display mode (workpiece or machine coordinate system), machine coordinates are always output when axis values are read.

304 10-2 Variable Assignments and Arithmetic Functions MTC 200 NC programming instruction Variable Assignment Coordinate values of existing axes The values of the following addresses can be assigned to the NC variables of the CNC, or the following values from the CNC addresses can be written into the NC variables. The machine coordinates are read into the NC variable when the coordinate values are read. Valid addresses: X, Y, Z, A, B, C, U, V, W X[1-3], Y[1-3], Z[1-3], A[1-3], B[1-3], C[1-3], U[1-3], V[1-3], X1=@20 Write the X axis position value to the NC variable. X1 axis to the position stored in the NC variable. Interpolation parameters Radius Feed rate Valid addresses: I, J, K J=@22 Circle center point coordinates of Y axis from the variables. Valid addresses: R R=@23 Radius statement via the contents of the NC variable. Only the current feed rate (@xx=f) can be read. However, all F values can be defined, such as G04 F=@9 for a dwell time. Valid F=@25 F Write active feed rate to the NC variable. F value via the contents of the NC variable. Spindle speed Valid addresses: S, S1=@27 Write current spindle speed to the variable. Spindle speed information via the contents of the NC variable. Angle Only angle of rotation P of the coordinate rotation can be read. With thread cutting, the starting angle P cannot be read. Valid address: G50 Z30 P=@29 P Angle of rotation P via contents of the variables. Selecting the reference spindle for transformation Selecting the reference spindle for the spindle speed Valid SPC=@221 Valid SPF=@23 SPC Read actual spindle for the transformation Define the reference spindle for the transformation. SPF Read actual reference spindle for programming the speed. Read spindle speed Set reference spindle for programming the speed.

305 MTC 200 NC programming instruction Variable Assignments and Arithmetic Functions 10-3 Selecting the tool spindle Acceleration factor Tool number Tool edge number Valid Valid address: Valid Valid SPT Read actual tool spindle. Define actual tool spindle. ACC Acceleration factor via the contents of the NC variable. T Write current tool number to the variable. Valid address: E Write current tool edge number to the variable. Tool edge selection via the contents of the NC variable. Effective distances The effective distances RX, RY and RZ cannot be read. Valid addresses: RX, RY, RZ RX=@216 Effective radius distance to the X axis via the contents of the NC variable. Zero offset table Valid address: O Select zero offset table via the contents of the NC variable. Read active zero offset table. Auxiliary function D correction The active auxiliary function "Q" cannot be read. Valid address: Q Q=@219 Output of auxiliary Q function via the contents of the NC variables. The current D correction D cannot be read. Valid address: D D=@26 Select the D correction via the contents of the NC variable. G functions Valid address for reading: Valid address for writing: G(<G code group[1-23]>) G = expression

306 10-4 Variable Assignments and Arithmetic Functions MTC 200 NC programming instruction G function G code group Active Meaning G00, G01, G02, G03 1 modal Interpolation functions G17 to G22 2 modal Level selection G40, G41, G42 3 modal Tool path compensation G52 to G59 4 modal Zero offsets G15, G16 5 modal Radius/diameter programming G90, G91 6 modal Measurements G65, G94, G95 7 modal Feed programming G96, G97 8 modal Spindle speed programming G70, G71 9 modal Measurement units G43, G44 10 modal Transition elements G61, G62 11 modal Block change G98, G99 12 modal Speed contour/center line path G47, G48, G49 13 modal Tool length compensation G08, G09 14 modal Block transition speed G06, G07 15 modal Drag error ON/OFF G04 G33 G50, G51 G63, G64 G74 G75 G76 G77 G92 G blockwise blockwise blockwise blockwise blockwise blockwise blockwise blockwise blockwise Dwell time Thread cutting Programmed zero offset Tapping Homing Move to positive stop Repositioning and restarting Spindle speed limitation Time programming G30, G31, G32 17 modal Transformation G72, G73 18 modal Mirror imaging G78, G79 19 modal Scaling G68, G69 20 modal Adaptive depth G36, G37, G38 21 modal Rotary axis approach logic G25, G26 22 modal Adaptive feed control G10, G11 23 Modal Rounding of NC blocks with axis filter Fig. 10-1: G functions The blockwise active G functions can be read only in the NC block in which they were programmed. Otherwise a value of "1" is generated when the blockwise active G functions are Write active G function of group 4 to the NC variable. G=@28 Set a G function via the contents of the NC variable. M functions The programmable M functions are subdivided into 16 M function groups. Valid address for reading: M(<M function group[1-16]>) Valid address for writing: M = expression

307 MTC 200 NC programming instruction Variable Assignments and Arithmetic Functions 10-5 M function M function group Active Meaning M000, M001, M002, M030 1 modal Program control commands M3, M4, M5, M13, M14 2 modal Spindle commands S M103, M104, M105, M113, M114 2 modal Spindle commands spindle 1 M203, M204, M205, M213, M214 3 modal Spindle commands spindle 2 M303, M304, M305, M313, M314 4 modal Spindle commands spindle 3 M007, M008, M009 5 modal Coolant S M107, M108, M109 5 modal Coolant S1 M207, M208, M209 6 modal Coolant S2 M307, M308, M309 7 modal Coolant S3 M010, M011 8 modal Clamp & unclamp S M110, M111 8 modal Clamp & unclamp S1 M210, M211 9 modal Clamp & unclamp S2 M310, M modal Clamp & unclamp S3 M040,..., M modal Gear selection S M140,..., M modal Gear selection S1 M240,..., M modal Gear selection S2 M340,..., M modal Gear selection S3 M046, M modal Spindle override M048, M modal Feed override M019,..., M319, Mxxx 16 blockwise S positioning & MH-F Machine-specific functions Fig. 10-2: M functions The blockwise active M functions can be read only in the NC block in which they were programmed. Otherwise a value of "1" is generated when the blockwise active M functions are Write the active programmed M functions of group (13) into the variables. M=@20 Set an M function via the contents of the NC variable Angle Unit for Trigonometric Functions "RAD", "DEG" The arguments of the trigonometric functions "SIN," "COS," "TAN" and the results of the inverse functions of these trigonometric functions "ASIN," "ACOS," "ATAN" can be stated or calculated in the unit "radians" as a fraction or multiple of the circumference of the unit circle (radius = 1), as well as in the unit "degrees." Syntax RAD DEG The unit RAD is the power-on condition and is modally active until the unit DEG overwrites it. G98 is reset automatically at the end of the program (RET) or by the BST command.

308 10-6 Variable Assignments and Arithmetic Functions MTC 200 NC programming instruction 10.3 Round Distance "RDI" Syntax In the axis filter, an axis positioning windows delimits the maximum rounding distance RDI (Round distance). The RDI value defines the maximum distance to the programmed data point for the start of the rounding process. (Also see the section "Motion blocks rounding of NC blocks") The following syntax is admissible with the RDI command: RDI10 ;direct allocation RDI 10 ;direct allocation, space symbol RDI=10 ;direct allocation ;allocation by variable ;allocation by ;reading of the currently effective RDI value The process of rounding block transitions is modally enabled for the current and the following blocks by programming the rounding distance RDI (Round DIstance). It is effective only in motion blocks of G code group 1 (G00, G01, G02, G03). In each case, the transition from the current block to the next block is rounded. Rounding is switched off again with the "RDI 0" command. "RDI=0" is the default state and is saved as active until RDI is overwritten with another value. RDI is automatically reset to the default state at the end of the program (RET), using the BST command or control reset Mathematical Expressions The assignment of an expression is initiated by an equal sign and is terminated by a space or the end-of-line character. Within an expression, a space is interpreted as the end of the expression, which therefore leads to premature termination. The following text characters then usually result in syntax errors. Calculation of an expression halts NC block preparation; in other words, look-ahead interpretation of the subsequent NC blocks is not resumed until the expression is fully calculated. This means that traverse movements are stopped at the programmed end point and that steps to achieve smooth block transitions (G06, G08) do not take place. Expressions are comprised of: operands operators parentheses functions. Examples:

309 MTC 200 NC programming instruction Variable Assignments and Arithmetic Functions 10-7 Operands Operands can be: constants, system constants, variables, address letters, and functions. Constants Floating decimal point constants can be comprised of the following elements: sign of the mantissa, up to 6 decimal digits, decimal point behind the first through sixth decimal digits, exponent symbol E, sign of the exponent, and up to 2 decimal digits for the exponent. In order for internal floating decimal point calculations to be used, the decimal point or the exponent sign must be present. Example: E E+1 0.1E E12 valid floating-decimal-point constants The numerical decimal value statement is interpreted as an integer constant, both without the decimal point and without the exponent. Integer constants can optionally consist of a sign and up to ten decimal digits. Example: valid integer constants Operators System constants The circle number "PI" ( ) and the conversion factor from the inch system to the metric "KI" system (25.4) are available for use as system constants which are programmed using their symbolic names. Because of their higher internal accuracy, these constants should always be used. The standard symbols for basic mathematical operations can be used as operators. + Addition Subtraction Multiplication / Division % Remainder of an integer division (modulo) Division by 0 will cause an error. Higher-order operations are implemented by functions.

310 10-8 Variable Assignments and Arithmetic Functions MTC 200 NC programming instruction Parentheses Functions Absolute value - ABS Integer - INT Square root - SQRT Sine - SIN To nest expressions and circumvent the integrated principle "multiplication/division before addition/subtraction", partial expressions can be placed within parentheses. The number of nesting levels is unlimited. The CNC provides the following mathematical functions: ABS Absolute value INT Integer component SQRT Square root SIN Sine COS Cosine TAN Tangent ASIN Arc sine ACOS Arc cosine ATAN Arc cotangent E^ Power to the base "e" 10^ Power to base 10 2^ Power to base 2 LN Logarithm to the base "e" LG Logarithm to the base 10 LD Logarithm to the base 2 TIME Time in seconds The mathematical functions enclose their operands in parentheses. The operands used in functions can also be expressions in other words, the functions can be nested. The absolute value function delivers the positive value of its operand. x < 0: ABS(x) = x x = 0: ABS(x) = 0 x > 0: ABS(x) = x Example: ABS(-1.23) 1.23 The INT function delivers the next smallest integer for the operand. Example: INT(1.99) 1 INT(1.01) 1 INT(-2.99) -2 INT(-2.01) -2 The SQRT function produces the square root of its operand. Example: SQRT(2) The SQRT function does not permit any negative operands. The operand for the SIN function is interpreted depending on which angle unit is set (RAD, DEG). Value range: -1 SIN(x) +1

311 MTC 200 NC programming instruction Variable Assignments and Arithmetic Functions 10-9 Example: RAD SIN(PI/6) 0.5 DEG SIN(30) 0.5 Cosine - COS Tangent - TAN Arc-sine - ASIN Arc cosine - ACOS Arc tangent - ATAN The operand for the COS function is interpreted depending on which angle unit is set (RAD, DEG). Value range: -1 COS(x) +1 Example: RAD COS(PI/6) DEG COS(30) The operand for the TAN function is interpreted depending on which angle unit is set (RAD, DEG). Example RAD TAN(PI/4) 1 DEG TAN(45) 1 The TAN function is not defined for π/2 and for -π/2. The operand for the ASIN function must be greater than or equal to -1 or less than or equal to +1. When the angle unit radians is set: Value range: -π/2 ASIN(x) +π/2 Example: ASIN(0.5) = (π/6) When angle unit "degrees" is set: Value range: -180 ASIN(x) +180 Example: ASIN(0.5) 30 When angle unit "degrees" is set: less than or equal to +1 When angle unit "radians" is set: Value range: -π/2 ACOS(x) +π/2 Example: ACOS(0.5) = (π/3) When angle unit "degrees" is set: Value range: -180 ACOS(x) +180 Example: ACOS(0.5) 60 When the angle unit radians is set: Value range: -π/2 ATAN(x) +π/2

312 10-10 Variable Assignments and Arithmetic Functions MTC 200 NC programming instruction Example ATAN(-1) = (-π/4) When the angle unit "degrees" is set: Value range: -180 ATAN(x) +180 Example: ATAN(-1) -45 Power to base - E^ Power to base 10-10^ Power to base 2-2^ Logarithm to base e - LN Logarithm to base 10 - LG Logarithm to base 2 - LD Time in seconds - TIME Example: E^(-2.5) Example: 10^(3) 1000 Example: 2^(8) 256 The operand for the LN function must be greater than zero. Example: LN(10) The operand for the LG function must be greater than zero. Example: LG(100) 2 The operand for the LD function must be greater than zero. Example LD(8) 3 The TIME function supplies a reference-free time in seconds accurate to 2 milliseconds. This time can be used to determine time Determine active time Determine time difference The TIME function does not have an operand. Time recording starts when the controller is powered up and runs for approx. 50 days.

313 MTC 200 NC programming instruction Variable Assignments and Arithmetic Functions Example: NC program - subroutine programming Y Recht.fh X 101RECHT.FH7 Fig. 10-3: Rectangle as subroutine NC program: T4 BSR.M6 G00 G54 G06 G08 X160 Y80 Z10 G01 Z-10 F1000 G42 X135 BSR.RE1 G90 G00 Z10 G40 G01 X160 Y110 T0 BSR.M6 RET.RE1 G01 G91 F=@203 X=-(@200) G03 X=-(@202) Y=-(@202) J=-(@202) G01 Y=-(@201) G03 X=@202 Y=-(@202) I=@202 G01 X=@200 G03 X=@202 Y=@202 J=@202 G01 Y=@201 G03 X=-(@202) Y=@202 I=-(@202) G01 X=-(@201/50) Y=@201/10 RTS Tool change Start position Infeed Z axis Establishment of tool path compensation Preassign variables Subroutine call Z axis to safety distance Removal of tool path compensation Store tool Program end "Rectangle" subroutine Incremental, set feed 1 st straight line in X 1 st ¼ circle 1 st straight line in Y 2 nd ¼ circle 2 nd straight line in X 3 rd ¼ circle 2 nd straight line in Y 4 th ¼ circle Traverse X axis until clear Traverse Y axis until clear End of subroutine

314 10-12 Variable Assignments and Arithmetic Functions MTC 200 NC programming instruction

315 MTC 200 NC programming instruction Enhanced NC Syntax (NC Control Structures) Enhanced NC Syntax (NC Control Structures) 11.1 Overview As of version 19, the NC syntax has been expanded by the following control structures: IF-ELSE FOR WHILE REPEAT-UNTIL SWITCH-CASE CONTINUE BREAK One instruction can be programmed for each NC block line. In turn, a control structure can contain an instruction or a block of instructions. A block of instructions is bracketed by "{" and "}". An NC block according to DIN is valid as an instruction. Example N0001 IF(@10>X) N0002 Y100 F100 N0003 ELSE N0004 { N0005 Y=@10 N0006 G04 F100 N0007 } ;control instruction ;instruction if condition is met ;instruction block if condition is not met ;condition The NC program itself can now consist of an instruction or a list of instructions. A line feed separates the instructions. The elements block number, enhanced block number, skip NC block, label, and main block identification can be positioned before control instructions. Note: Writing style in syntax description: The character sequence "\n" in the syntax description means that a line feed must occur at this point. The characters themselves may not be entered.

316 11-2 Enhanced NC Syntax (NC Control Structures) MTC 200 NC programming instruction 11.2 Conditions of the Control Structures The control instructions are controlled by conditions. A condition consists of a logical expression. Example N0001 FOR(@10=0,@10<100,@11*0.1 ) N0002 X=@10 F100 N The X axis is moved to 100 with an increment The condition of termination can be located in the middle section of the FOR-instruction: "@10<100" The following relations may be applied to mathematical expressions: < (less than) <= (less than or equal to) > (greater than) >= (greater than or equal to)!= (not equal to) == (equal to) The result of a relation can therefore be TRUE or FALSE. The following logical operations may be applied to the relations: (or) && (and)! (not) == (equal to)!= (not equal to) Examples for valid conditions (@10 G(1) ) (TLD(,0,1,2,0,5,)==1) (!(@10<@1 Note: Assure that no blank character is before the "(" character; otherwise the bracket expression will be interpreted as a comment. The priority of the operations is defined by the sequence of the syntax rules and rises from top to bottom, meaning that the operation "!" is stronger than the operation " ".

317 MTC 200 NC programming instruction Enhanced NC Syntax (NC Control Structures) Block Instructions The block instruction comprises a list of instructions for a single instruction. Example N0001 IF(@10<100) ;variable value smaller 100 N0002 { ;block beginning N0003 Y=-3 ;axis movements N0004 X=@10 Z=@11 N0005 Y=20 N0006 } ;block end and end of the IF instruction N0007 G0 X=@100 Z=@101 Syntax description: Block instruction = "{" "\n" {instruction} "}" "\n" IF Instruction The following instruction is performed only if the condition is met. The ELSE branch is optional and is alternatively performed if the condition is not met. Nested IF instructions are solved from the inside out. Note: The maximum boxing depth of IF instructions may not exceed a number of 15. Syntax description: Example N0001 IF(@10<100) N0002 IF(@11>10) N0003 Y=100 N0004 ELSE N0005 IF(@11<100) N0006 Y=200 N0007 ELSE N0008 Y=300 N0009 X100 Z200 IF instruction Instruction ["ELSE" "\n" instruction]. ;1 st IF instruction ;2 nd IF instruction ;ELSE of the 2 nd IF instruction ;3 rd IF instruction ;ELSE of the 3 rd IF instruction ;End of the 3 rd,2 nd and 1 st IF instruction = "IF" "(" condition ")" "\n"

318 11-4 Enhanced NC Syntax (NC Control Structures) MTC 200 NC programming instruction 11.5 FOR Instruction The FOR loop repeats the instruction until the condition for termination is met. The loop variable is initialized at the beginning of the instruction; on each loop, it is incremented according to the pitch. Example N0001 N0002 The positions X 0.0 Z 0.0, X 0.1 Z 0.025,...,X 100 Z 25 are fed sequentially. Syntax description: FOR instruction = "FOR" "(" variable "," condition "," pitch ")" "\n" instruction 11.6 WHILE Instruction The WHILE instruction repeats the following instruction until the condition is met. Example N0001 ) N0002 { X@12 Y@10 N0005 } Blocks N0003 and N0004 are repeated is met. Syntax description: WHILE instruction = "WHILE" "(" condition ")" "\n" instruction REPEAT-UNTIL Instruction The REPEAT-UNTIL instruction repeats the embedded instructions until the UNTIL condition is met. Example N0001 REPEAT N N0011 ) The block enclosed by REPEAT-UNTIL is executed at least once and is repeated Note: There must not be any blanks between UNTIL and (condition). Blanks are reported as format errors during the download. Syntax description: REPEAT instruction = "REPEAT" "\n" { instruction } "UNTIL" "(" condition ")" "\n".

319 MTC 200 NC programming instruction Enhanced NC Syntax (NC Control Structures) CONTINUE Instruction The CONTINUE instruction continues processing with the next loop run. The loop counter is incremented within the FOR instruction and then the condition is checked. With the WHILE and UNTIL instructions, processing continues after checking the condition. Example N0001 > 0 ) ;Repeat as long N0002 { ;Block beginning ;Decrement loop counter N0004 IF( OTD(,,@100,4,0) == 0 ) ;Offset in offset table = 0? N0007 CONTINUE ;Yes, address next bank N0010 BSR.CONTOUR ;Machine contour N0011 } ;End of the WHILE instruction Syntax description: CONTINUE instruction = "CONTINUE" "\n" 11.9 BREAK Instruction The BREAK instruction interrupts a loop. Example N0001 FOR(@1=0,@1<10,1) ;Repeat N0002 { N0003 BSR.TSTPOS ;Subroutine N0004 IF(@0==0) ;Termination of the loop N0005 BREAK N0006 BSR.KONTUR N0007 } ;End of the FOR instruction Syntax description: BREAK instruction = "BREAK" "\n" SWITCH Instruction The SWITCH instruction permits the programming of a branch/jump distributor. A branch/jump to a CASE label is performed depending on the value of the SWITCH expression. Multiple CASE labels may be located before an instruction block. A branch/jump is performed after an instruction block and at the end of a SWITCH instruction. If none of the CASE labels are correct, a branch/jump to the DEFAULT label is performed. If the DEFAULT label does not exist here, then a branch/jump is performed to the end of the SWITCH instruction. Example N0001 SWITCH(G(17)) ;Transformation active? N0002 { N0003 CASE 30: ;G30 N0004 G31 X1 10 Y2 10 F100 ;Activate Transmit N0005 CASE 31: ;G31 N0006 BSR.KONTUR ;Machine contour N0007 DEFAULT: ;G32

320 11-6 Enhanced NC Syntax (NC Control Structures) MTC 200 NC programming instruction Conditions of the Control Structures The control instructions are controlled by conditions. A condition consists of a logical expression. Example N0001 FOR(@10=0,@10<100,@11*0.1 ) N0002 X=@10 F100 N The X axis is moved to 100 with an increment The condition of termination can be located in the middle section of the FOR instruction: "@10<100" The following relations may be applied to mathematical expressions: < (less than) <= (less than or equal to) > (greater than) >= (greater than or equal to)!= (not equal to) == (equal to) The result of a relation can therefore be TRUE or FALSE. The following logical operations may be applied to the relations: (or) && (and)! (not) == (equal to)!= (not equal to) Examples for valid conditions (@10 G(1) ) (TLD(,0,1,2,0,5,)==1) (!(@10<@1 Note: Assure that no blank character is before the "(" character; otherwise the bracket expression will be interpreted as a comment. The priority of the operations is defined by the sequence of the syntax rules and rises from top to bottom, meaning that the operation "!" is stronger than the operation " ". N0008 G30 C0 F200 ;switch off transformation N0009 } Syntax description: SWITCH instruction = "SWITCH" "(" math. expression ")" "\n" "{" "\n" {{ "CASE integer number ":" "\n" } { instruction }} [ "DEFAULT" ":" "\n" instruction ] }" "\n"

321 MTC 200 NC programming instruction Enhanced NC Syntax (NC Control Structures) Indexed NC Variables The Indirect addressing is implemented in order to able to utilize the NC variables in conjunction with the loop instructions while, for, until as fields. Syntax description: NC @[ math. expression ] math. expression ]:[ math. expression ]. ;new Example N0000 G01 F1000 N0001 FOR(@1=0,@1<10,1) N0002 X=@[ 2 ] Y=@[ 3 ] Polygon points (X,Y)=@2:i,@3:i are traversed.

322 11-8 Enhanced NC Syntax (NC Control Structures) MTC 200 NC programming instruction

323 MTC 200 NC programming instruction Special NC Functions Special NC Functions 12.1 APR SERCOS Parameters Data Exchange with Digital Drives "AXD" The "AXD" command can be used to read or write the drive data from or to the NC program for a digital drive which is connected to the CNC by means of a digital SERCOS interface. The drive datum which is to be read or written is addressed using the data address defined in the command parameter. Syntax AXD(<axis name>:<sercos ID number> AXD(<axis number>:<sercos ID number> The letters X, Y, Z, U, V, W, A, B, C and optionally S with the enhanced address structure [1-3] can be used as the axis name. The axis number [1-32] can be specified alternatively. It is essential that these axes also be parameterized and that they be drives which are connected via the SERCOS Interface. SERCOS ID Number SERCOS ID number Group letter <group letter>-<drive parameter set number>-<data block number> The group letter differentiates between: standard data (S), defined by the SERCOS standards committee, and product data (P), defined by the drive manufacturer. The meaning of the SERCOS parameters (group letter S) and their functions are described by the SERCOS committee in the publication "SERCOS Interface." The meaning of the SERCOS parameters (group letter P) and their functions are described in the documentation for the SERCOS digital drive. The minus sign (-) is used as a delimiter character between the individual parameters. Parameter set number Data block number The parameter set number addresses the desired parameter set of the drive. The parameter set number can have values from 0 to 7. Bosch Rexroth drives are equipped with four parameter sets which can be switched during operation. One of the four parameter sets is always active switching occurs due to a command from the controller. The drive generally works with the ID numbers of parameter set 0. The pertaining drive datum can be addressed via the data block number. The data block number can range from 0 (also 0000) to The reading or writing of drive data using the "AXD command" should be programmed in a separate NC block which does not contain any other NC commands. The reading or writing of drive data using the "AXD command" always takes place at the end of the NC block. In other words, the assignment of a value to an NC variable into which the drive datum was read cannot be used in the same NC block as the basis for deciding whether a conditional branch/jump is to be performed.

324 12-2 Special NC Functions MTC 200 NC programming instruction When drive data are read or written using the "AXD" command, NC block preprocessing is interrupted. Thus if tool path compensation (G41, G42) is active, it is considered to be finished. Likewise, "Contouring mode (acceleration)" (G08) is no longer possible. A read drive datum can be assigned to only one variable, but not to an address letter. The assigning expression may consist of only the AXD command. No other operands or operators are permitted. When the AXD command is used to write drive data, the assigned expression can be a formula or a constant. Note: If drive parameters are to be changed using the AXD command, we recommend that you first save the drive parameter sets in case incorrect or critical values are accidentally entered or programmed during NC programming. NC programs that contain AXD commands to modify drive parameters should have an init part, which saves the drive parameters that are to be changed using AXD to, for example, NC variables or machine data pages; it resets the values to the original settings after editing the program or in the homing program. Example: NC program - AXD command Activating friction torque compensation allows the compensation for position deviations at circle quadrant transitions. In the example shown here, the active gain factor is increased from 4 to 7. NC program: T11 BSR.M6 Tool change SF D10 G00 G90 G54 G07 G08 X199 Y136 Z5 Start position S5000 M03 Spindle Read active gain factor for X Read active gain factor for Y axis AXD(X:S )=7*1000 New gain factor for the X axis AXD(Y:S )=7*1000 New gain factor for the Y axis AXD(X:S )=70 Friction torque compensation for X AXD(Y:S )=110 Friction torque compensation for Y G01 Z-5 F1000 Lower cutter into material G41 X199 Y141 F8000 Start point of circular machining G03 X180 Y122 I199 J122 Start circle G01 X180 Y100 Transition element G02 X180 Y100 I100 J100 Full circle 160 G01 X180 Y77 Transition element G03 X198 Y59 I198 J77 Exit circle G00 Z5 Cutter to safety distance AXD(X:S )=@50 Old gain factor for the X axis AXD(Y:S )=@51 Old gain factor for the Y axis AXD(X:S )=0 Friction torque compensation OFF for X AXD(Y:S )=0 Friction torque compensation OFF for Y T0 BSR.M6 Tool change RET Program end

325 MTC 200 NC programming instruction Special NC Functions Kreis.fh7 Oscilloscope Function Position Value Axis Y [mm] Position Deviation: Desired Desired Position: Position: Value: Expansion Factor: Axis Number: 2 Axis Type: Digital Linear Axis Axis Description: Y Process: Master with Axis Number: 1 Axis Type: Digital Linear Axis Axis Description: X Prozess: Master with Circle Diameter 160 mm Position Value Axis X [mm] 11-1.FH7 Fig. 12-1: Friction torque compensation in quadrant transitions Oscilloscope Function Position Value Axis Y [mm] Position Deviation: Positon Command Value: Expansion Factor: Position Value Axis X [mm] 112KREIS.FH7 Fig. 12-2: Circle sector for recording position variance

326 12-4 Special NC Functions MTC 200 NC programming instruction 12.2 Read/Write Zero Offset (ZO) Data from the NC Program "OTD" Syntax The OTD command (Offset Table Data) can be used to read and write the data in the zero offset table and the zero offsets which have been activated in the NC program from the NC program. M P O V A OTD([1/2],[0..6],[0..9],[0..9],[1..10]) Axis Offset Zero Offset Table Process NC Memory 113otd.FH7 Fig. 12-3: OTD command syntax Designation NC memory (optional) Process (optional) Zero offset table (optional) Symbol Value range CNC Meaning M 1 / 2 MTC200 1: NC memory A or 2: NC memory B If the parameter is not declared, the active NC memory is addressed. P 0-6 MTC200 If no process number is specified, the current process is addressed. O 0-9 MTC200 If the parameter is not declared, the active zero offset table is addressed. Offset (optional) V 0-9 MTC200 TRANS200 0 = active offset 1 = value of G50/G51 offset 2 = value of G52/G51 offset 3 = general offset 4 = G54 value 5 = G55 value 6 = G56 value 7 = G57 value 8 = G58 value 9 = G59 value If the parameter is not defined, the active zero offset table is addressed. Axis A 1-10 MTC200 TRANS200 1 = Value of axis X 2 = Value of axis Y 3 = Value of axis Z 4 = Value of axis U 5 = Value of axis V 6 = Value of axis W 7 = Value of axis A 8 = Value of axis B 9 = Value of axis C 10 = Value of the turning angle The axis parameter must be defined. The axis letter correlates with the axis meaning!

327 MTC 200 NC programming instruction Special NC Functions 12-5 General requirements for the MTD command A variable can be inserted instead of the constant. An arithmetic expression instead of a constant or variable is not permitted. The optional parameters need not be specified. The commas that are used for delimiting the parameters must always be set. Command OTD can not be used to write to the zero offset values for G50/G51, G52 and to the active zero offset value. Example: NC program - reading ZO Read total active X axis zero offset. X=OTD(1,0,2,4,1) Traverse X axis to the position which is located in the ZO table in NC memory A for process 0 of the 2 nd zero offset table for Read G function of zero Prepare value for the OTD Read active X axis zero offset for the ZO entry corresponding to the active G function (G52 - G59) Example: NC program - writing ZO data OTD(,,,4,1)=INT(X) Assign the result of the specified calculation to the X axis entry for the offset corresponding to G54.. OTD(,,,4,1)=@20+OTD(,,,,1) Calculate the new X-axis zero offset value corresponding to G54 from the contents of the variable and the active X- axis zero offset. Note: The read zero point data are machine coordinates.

328 12-6 Special NC Functions MTC 200 NC programming instruction 12.3 Access to Tool Data from NC Program "TLD" The TLD command (Tool Data) can be used to read all the tool data in the tool list from the NC program and to write them; however, some restrictions apply to writing. Syntax The individual data elements are addressed by means of codes. Depending on both types of addressing... Addressing via location and magazine (A=0) Addressing via tool number and tool duplo number (A=1)... both variants of TLD command are possible: P A S/T L/D E D S TLD([0..6], [0], [0..3],[ ],[0..9],[1..35],[1..32]) TLD([0..6],[1],[ ],[ ],[0..9],[1..35],[1..32]) Status Data element Edge Location / Index no. Storage [0..3] /tool number Addressing Process 57tld.FH7 Fig. 12-4: Syntax of the TLD command Value range and meaning of parameters The two following figures illustrate the parameters of the TLD command in detail: TLD addressing via location and magazine type V23_ Designation Symbol Value range / meaning Process P 0-6 Process number Addressing A 0 Addressing via location and magazine type Storage type ST 0 Magazine/ turret 1 Spindle 2 Gripper 3 Tool change position 7 Address active tool Location L Tool edge E Basic tool data Tool edge data Data element DE Tool status Group status Status S Tool status bit Group status bit Tool edge status bit --- Group No. G Not relevant Not relevant Group duplo number GD Not relevant Not relevant

329 MTC 200 NC programming instruction Special NC Functions 12-7 TLD addressing via tool and duplo number V23_ Designation Symbol Value range / meaning Process P 0-6 Process number Addressing A 1 Addressing via tool and tool duplo number Tool number (T) T Tool number Tool duplo No. WD Tool duplo number Tool edge E Basic tool data Tool edge data Data element DE Tool status Group status Status S Tool status bit Group status bit Tool edge status bit --- Group No. Group duplo number G GD 0-99 Group association of the tool no information: active group 0-99 Group duplo association of the tool no information: duplo No. of the active group TLD_V23_ xls All data present in the tool list can be read. The individual data elements are addressed by means of codes. The identifiers of the individual data elements are represented in the following tables: Basic tool data Tool status bit from basic tool data element 09 Group status bit from basic tool data element 32 Tool edge data Tool edge status bit from tool edge data element 02 The identifiers of the individual data elements (DEL) and status bits (S) are represented in the following tables.

330 12-8 Special NC Functions MTC 200 NC programming instruction Data of tool list (basic tool data) for the TLD command Basic tool data (per tool) V23_ DESIGNATION VALUE RANGE DATA TYPE in the PLC UNIT DE OPT. SL TL Tool identification Index address hexadecimal double word with 32 bits - 01 X X ID (tool name) up to 28 characters* STRG28-02 X Storage X Location X Tool number DINT - 05 X X Tool duplo number INT - 06 X Correction type 1-5 USINT - 07 X X Number of tool edges 1-9 USINT - 08 X X Tool status 0/1 (32 status bits) USINT - 09 X Location data Free half-locations 0-4 USINT - 10 X Old pocket INT - 11 X Storage location of next setup tool 0-2 INT - 12 X Loc. of next replacement tool INT - 13 X Stor. of prev. rep. tool 0-2 INT - 14 X Loc. of prev. rep. tool INT - 15 X Units Time unit 0/1 (0: min, 1: cycl.) USINT - 16 X Unit of length 0/1 (0: mm, 1: inch) USINT - 17 X X Technology data Tool code 0-9 USINT - 18 X X Representation type INT - 19 X X User data User data 1 REAL 20 A X User data 2 REAL 21 A X User data 3 REAL 22 A X User data 4 REAL 23 A X User data 5 +/- 1.2 * /- 3.4 * and 0 ( 9 significant digits) REAL 24 A X User data 6 REAL 25 A X User data 7 REAL 26 A X User data 8 REAL 27 A X User data 9 REAL 28 A X Group data 29 Group number 0-99 BYTE - 30 X Group duplo number 0-99 BYTE - 31 X Group status 0/1 (16 status bits) WORD - 32 X any Comment up to 5 x 76 alphanumeric characters - 99 A X * ASCII character set , at least 1 character >32 Data element 99 Comment is not loaded in the control. DE - Data element R.TL - Replacement tool STRG28 - STRING28 Fig. 12-5: WGD_all_V23_ xls SL - Setup list-specific datum TL - Tool list-specific datum OPT - Optional datum Data of tool list (basic tool data) for the TLD command

331 MTC 200 NC programming instruction Special NC Functions 12-9 Data of tool list (tool edge data) for the TLD command Tool edge data (per tool edge) V22_ DESIGNATION VALUE RANGE DATA TYPE in PLC UNIT DE OPT. SL TL Tool edge identification Tool edge position 0 8 USINT 01 X X Tool edge status 0; 1 (16 status bits) WORD 02 X Tool life data Remaining tool life REAL 03 A X Warning limit REAL % 04 A X Max. utilization time (0: tool life recording switched off) REAL min. or 05 A X cycles Time used REAL 06 A X Geometry data Length L1 DINT 07 X Length L2 DINT 08 X Length L3 DINT 09 X Radius R DINT mm 10 X Wear L1 DINT 11 A X Wear L2 or DINT or 12 A X Wear L DINT inches 13 A X Wear R DINT 14 A X Offset L1 DINT 15 A X Offset L2 DINT 16 A X Offset L3 DINT 17 A X Offset R DINT 18 A X Geometry limit values L1_min DINT 19 A X L1_max DINT mm 20 A X L2_min DINT 21 A X L2_max or DINT or 22 A X L3_min DINT inches 23 A X L3_max DINT 24 A X R_min DINT 25 A X R_max DINT 26 A X Wear factors Wear factor L1 DINT 27 A X Wear factor L mm/min or DINT or inch/min or 28 A X Wear factor L DINT cycles 29 A X Wear factor R DINT 30 A X User data User data 1 REAL any 31 A X User data 2 +/- 1.2 * /- 3.4 * REAL any 32 A X User data 3 and REAL any 33 A X User data 4 0 (9 significant digits) REAL any 34 A X User data 5 REAL any 35 A X User data 6 DINT any 36 A X User data DINT any 37 A X User data 8 or DINT any 38 A X User data DINT any 39 A X User data 10 DINT any 40 A X DE - Data element SL - Setup list-specific datum SD_all_V22_ xls OPT - Optional datum TL - Tool list-specific datum Fig. 12-6: Data of tool list (tool edge data) for the TLD command

332 12-10 Special NC Functions MTC 200 NC programming instruction Tool status bits for the TLD command Tool status bits 1-16 from basic tool data element 09 Group name Group information Symbol Value Bit Byte Word TM Write access OP ASP SL Type TL LL Comment Presence Error: correction type Error: tool edge number Error: tool edge Error: tool code Tool not available! 1 Tool available 0 Tool is not required? 1 Tool required 0 Correction type wrong Correction type not wrong Incorrect number of tool edges Correct number of tool edges Tool edge(s) incorrect Tool edge(s) not incorrect Tool code incorrect Tool code correct t 1 0 e 1 0 f 1 0 $ X X X Tool is missing 2 3 X X X 4 X X X 5 6 LOW byte 0-7 Tool not required for processing Correction type does not accord with the requirements Number of cutters does not accord with the requirements Tool edge data do not comply with requirements Does not accord with the requirements Reserved for extensions 7 Reserved for extensions 8 Location locking Location locked B 1 Location not locked LOW 0 9 X X X X X ASP/OP: Location is damaged, for example. TM: Tool is entered Reserved for extensions Upper halflocation locking 10 Reserved for extensions Lower halflocation locking 11 Upper half-location reservation Lower half-location reservation Upper halflocation reserved Upper halflocation not reserved Lower halflocation reserved Lower halflocation not reserved ) 1 0 ( X X X X byte 13 X X X X Reserved for temp. moved tools Reserved for temp. moved tools Reserved for extensions Upper halflocation locking 14 Reserved for extensions Location assignment TM - Tool management OP - Operator Lower halflocation locking Location assigned Location not assigned ASP - Application-specific programs in PLC or NC LL - Location-specific status bit Fig. 12-7: SL - Setup list-specific status bit TL - Tool list-specific status bit Tool status bits 1-16 for the TLD command X X X There is a tool at this location WSB_all_V22_ xls

333 MTC 200 NC programming instruction Special NC Functions Tool status bits from basic tool data element 09 Group name Group information Symbol Value Bit Byte Word TM Write access OP AS P SL Type TL LL Comment Wear state Tool is worn out d 1 Tool is not worn out 0 Warning limit is reached w 1 Warning limit not reached 0 17 X X 18 X X The remaining lifetime of the tool has elapsed (replace) The remaining lifetime is about to expire (replace) Name of alternate Tool coding Machining tool p 1 No machining tool 0 Replacement tool s 1 No replacement tool 0 Tool with fixed location coding C 1 Tool without fixed location coding 0 19 X X LOW byte X X 21 X X X X There is a processing tool for every alternate tool group A replacement tool is a tool still to be used, not a processing tool The tool may only be changed into the predefined tool location Tool block Tool locked L 1 Tool is not locked 0 22 X X X Tool must not be used Tool breakage Tool broken D 1 Tool is not broken 0 23 X X X Tool is damaged: e.g. broken tool edge Reserved for extension 24 User tool status 1 User tool status bit 1 A wo r d 25 X X X Any meaning User tool status 2 User tool status bit 2 A X X X Any meaning User tool status 3 User tool status bit 3 A X X X Any meaning User tool status 4 User tool status 5 User tool status bit 4 A User tool status bit 5 A X X X Any meaning byte 29 X X X Any meaning User tool status 6 User tool status bit 6 A X X X Any meaning User tool status 7 User tool status bit 7 A X X X Any meaning User tool status 8 User tool status bit 8 A X X X Any meaning TM - Tool management OP - Operator ASP - Application-specific programs in PLC or NC LL - Location-specific status bit Fig. 12-8: SL - Setup list-specific status bit TL - Tool list-specific status bit T Tool Tool status bits for the TLD command WSB_all_V22_ xls

334 12-12 Special NC Functions MTC 200 NC programming instruction Tool edge status bits for the TLD command Tool edge status bit from tool edge data element 02 Group name Group information Symbol Value Bit TM Write access OP ASP Type SL TL Comment Incorrect tool edge orientation Incorrect tool edge orientation o 1 Tool edge orientation is not incorrect 0 1 X X Tool edge data do not correspond to the definition L1 faulty L1 faulty 1 1 L1 not incorrect 0 2 X X Tool edge data do not correspond to the definition L2 faulty L2 faulty 2 1 L2 not incorrect 0 3 X X Tool edge data do not correspond to the definition L3 faulty L3 faulty 3 1 L3 not incorrect 0 4 X X Tool edge data do not correspond to the definition R incorrect R incorrect r 1 R not incorrect 0 5 X X Tool edge data do not correspond to the definition Reserved for extensions 6 Reserved for extensions 7 Reserved for extensions 8 Wear state Tool edge worn out d 1 Tool not worn out 0 Warning limit is reached w 1 Warning limit not reached 0 9 X X 10 X X The tool edge can no longer be used (replace) The remaining tool life of the tool edge is near its end (replace) Reserved for extensions 11 Reserved for extensions 12 User tool edge status 1 User tool edge status 2 User tool edge status 3 User tool edge status bit 1 1 A User tool edge status bit 2 1 A any User tool edge status bit 3 1 A X X X Any meaning 14 X X X Any meaning 15 X X X Any meaning User tool edge status 4 User tool edge status bit 4 A TM - Tool management OP - Operator ASP - Application-specific programs in PLC or NC Fig. 12-9: X X X Any meaning TL - Tool list-specific status bit SL - Setup list-specific status bit Tool edge status bits for the TLD command SSB_all_V22_ xls

335 MTC 200 NC programming instruction Special NC Functions Tool group status bits for the TLD command Tool groups: Group status (data element 32) V23_ Status Status bit Symbol Value Bit Write access Type TM OP ASP GL Comment Presence Group status Wear state Name of alternate Group not available! 1 1 X X Tool in this group is Group exists 0 missing Group is not required? 1 2 X X No tool in this Group is required 0 group is required Group disabled L 1 3 X X X Userprogrammable Group not disabled 0 Group worn d 1 Group not worn 0 4 X X At least one alternate tool sequence of the group is worn. Warning limit is reached w 1 5 X X At least one alternate Warning limit not reached 0 tool sequence of the group has reached the warning limit. Machining group p 1 6 X X Not a machining group 0 Spare group s 1 7 X X Not a spare group 0 Reserved for extension 8 Group is machining group Group is alternate group User group status 1 User group status bit 1 any User group status 2 User group status bit 2 any User group status 3 User group status bit 3 any User group status 4 User group status bit 4 any User group status X X X X X X X X X X X X 0 User group status bit 5 any 1 13 X X X User group status 6 User group status bit 6 any User group status X X X 0 User group status bit 7 any 1 15 X X X User group status 8 User group status bit 8 any TM - Tool management OP - Operator ASP - Application-spec. programs on the PLC or NC LL - Location-specific status bit X X X 0 SL - Setup list-specific status bit TL - Tool list-specific status bit OPT - Optional datum GL - Tool group list-specific status bit Fig : Tool group status bits for the TLD command Any meaning Any meaning Any meaning Any meaning Any meaning Any meaning Any meaning Any meaning WZG_all_V23_ xls

336 12-14 Special NC Functions MTC 200 NC programming instruction General requirements for the TLD command Optional parameters for the TLD command A variable can be inserted instead of constants. An arithmetic expression instead of a constant or variable is not permitted. The optional parameters need not be specified. The commas that are used for delimiting the parameters must always be set. The CNC inserts the current process if a process [0-6] is not specified. If the parameter address [0/1] is not specified, the CNC inserts a value of 0 and interprets the two subsequent parameters as storage unit and pocket. If the duplo number [1-9999] is not specified, the CNC inserts the duplo number of the related machining tool. If the tool edge [0-9] is not specified, the CNC inserts a value of 0, thus accessing the basic tool data. The parameter status [1-32] is to be specified only if a tool status bit, a tool edge status bit or a group status bit is accessed. If the group number [0..99] is not specified, the CNC inserts the number of the enabled group. If the group duplo number [0..99] is not specified, the CNC inserts the duplo number of the enabled group. General verifications for the TLD command The validity of the programmed parameter values can be checked only when the command is executed (i.e. at the runtime of the NC program). If one of the parameters is incorrect or invalid, the CNC initiates an immediate stop and issues the error message: Parameter [No. Of the faulty parameter] during data access command faulty! Limitations of writing with the TLD command You cannot write to setup list-specific data elements. You may not write to any tool, tool edge or group status bit that is allocated to tool management. You cannot write to a pocket, storage unit or tool number data element. If one of these conditions is not observed when a data element is written, the CNC initiates an immediate stop and issues the error message: Invalid access to a data element!

337 MTC 200 NC programming instruction Special NC Functions Examples: Reading with the TLD command Example: The tool number of the tool in spindle 2 is assigned to a = TLD (, 0, 1, 2, 0, 5, ) Symbol Designation S DE E Status Data element Tool edge 5 Tool number 0 Basic tool data L SA Location Storage type Spindle Spindle 2 A P Addressing Process 0 Addressing via location and magazine Empty current process TLD_Beispiel_1_lesen_V22_ xls = TLD (, 1, 1,, 0, 6, ) The duplo number of tool 1 is assigned to a variable. Symbol Designation S Status DE Data element 6 Duplo number E Tool edge 0 Basic tool data D T A P Duplo number Tool No. Addressing Process Empty duplo number of the corresponding processing tool 1 Tool 1 1 Addressing via tool and duplo number Empty current process TLD_Beispiel_2_lesen_V22_ xls

338 12-16 Special NC Functions MTC 200 NC programming instruction Interrogation whether a tool change is 0: 0 = TLD (, 0, 1, 1, 0, 5, 0: 0 0: 0 - T BEQ.M6_T0 Reads the tool number of the first spindle and stores it in variable 0 of the process. Interrogation whether a tool change is required TLD_Beispiel_3_lesen_V22_ xls The sum of radius, wear and offset is written into a = TLD (, 1, 9,, 1, 10, ) + TLD (, 1, 9,, 1, 14, ) + TLD (, 1, 9,, 1, 18, ) Writing with the TLD command Example: The duplo number of tool 1 is set to 5. TLD (, 1, 1,, 0, 6, ) = 5 TLD_Beispiel_4_lesen_V22_ xls Symbol Designation S Status DE Data element 6 Duplo number E Tool edge 0 Basic tool data D Duplo number Empty duplo number of the corresponding processing tool T Tool No. 1 Tool 1 A Addressing 1 Addressing via tool and duplo number P Process Empty current process TLD_Beispiel_1_schreiben_V22_ xls

339 MTC 200 NC programming instruction Special NC Functions Example: The duplo number of tool 1 is set to 6 TLD (, 1, 1,, 0, 6, ) = Symbol Designation S Status DE Data element 6 Duplo number E Tool edge 0 Basic tool data D Duplo number Empty duplo number of the corresponding processing tool T Tool No. 1 Tool 1 A Addressing 1 Addressing via tool and duplo number P Process Empty current process Example: The last used or preselected tool is disabled = T TLD ( 3, 0, 9, 22 ) = 1 The number or current tool is saved in a variable Symbol Designation S Status 22 Tool block: Value 1 Tool disabled DE Data element 9 Tool status bits E Tool edge 0 Basic tool data D Duplo number Empty Duplo number of the corresponding processing tool T Tool Tool number = Content of A Addressing 1 Addressing via tool and duplo number P Process 3 Process 3 TLD_Beispiel_3_schreiben_V22_ xls

340 12-18 Special NC Functions MTC 200 NC programming instruction Example: Duplo group 1 of tool group 5 is disabled TLD ( 3, 1,,,, 32, 3, 5, 1 ) = 1 Symbol Designation GD Group duplo number 1 Duplo group 1 G Group number 5 Tool group 5 S Status 3 Group status: Value 1 Group disabled DE Data element 32 Group status E Tool edge Empty TD Tool duplo No. Empty T Tool No. Empty A Addressing 1 Addressing via tool and duplo number P Process 3 Process 3 TLD_Beispiel_4_schreiben_ xls

341 MTC 200 NC programming instruction Special NC Functions Read/Write D Corrections from the NC Program "DCD" With the DCD command, D corrections can be read and written from the NC program. Syntax P S W DCD([0..6],[1..99],[1..4]) Value Memory Process 115dcd.FH7 Fig : DCD command syntax Designation Symbol Declaration range CNC Meaning Process P 0-6 MTC200 If no process number is specified, the current process is addressed. Storage S 1-99, 1-30 MTC200 TRANS200 Value W 1-4 MTC200 TRANS200 If the parameter is not specified, the active memory is addressed. 1 = Value for length correction L1 2 = Value for length correction L2 3 = Value for length correction L3 4 = Value for radius correction R General requirements for the DCD command Verifications during access A variable can be inserted instead of a constant. An arithmetic expression instead of a constant or variable is not permitted. The optional parameters do not need to be specified. The commas that are used for delimiting the parameters must always be set. The declared parameters must lie within the given value range. The CNC checks their validity first during operation. The CNC interrupts program execution and issues an error message if a declared parameter lies outside of the valid value range. Variable 22 contains radius compensation value R of D magazine 3. DCD(1,2,1)=Z-10 Value "Z-10" is written to length compensation value L1 of D magazine 2 of process 1. DCD(,,3)=DCD(,,3)+1 The value L3 of the active D magazine and of the active process is increased by 1.

342 12-20 Special NC Functions MTC 200 NC programming instruction 12.5 Read/Write Machine Data Purpose of Machine Data Objectives Required data structures The variable machine data functions serve as variable machine parameters (control machine data) for specific control functions, such as setup register, drag and Gantry axis or main spindle synchronization, as secured data (OEM machine data) to, for example, manage the machine options or to store measurement data, as working memory to which the machine builder saves structured data (OEM machine data), e.g. to implement palette management or to store axis positions, or to process large data pools (user machine data), e.g. to store geometric data and tolerances to produce parts. The majority of the data required for the controller by the machine builder and end user can be shown in the following forms: single structure, one- or two-dimensional field or one- or two-dimensional field on a structure. Modifiable Machine Data Controller Machine Data OEM Machine Data User Machine Data Page: Page: Page: Page 001: Page Label Serial Index 1 Page 100: Page Label Serial Index 1 Page 200: Page Label Serial Index 1 114Masch.fh7 L a u f i n d e x 2 Limit 1 Limit 1 Limit 1 Limit 1 Limit 2 Limit 2 Limit 2 Limit 2 Limit 3 Limit 3 Limit 3 Limit 3 Limit 4 Limit 4 Limit 4 Limit 4 Limit 1 Limit 1 Limit 1 Limit 1 Limit 2 Limit 2 Limit 2 Limit 2 Limit 3 Limit 3 Limit 3 Limit 3 Limit 4 Limit 4 Limit 4 Limit 4 Limit 1 Limit 1 Limit 1 Limit 1 Limit 2 Limit 2 Limit 2 Limit 2 Limit 3 Limit 3 Limit 3 Limit 3 Limit 4 Limit 4 Limit 4 Limit 4 Limit 1 Limit 1 Limit 1 Limit 1 Limit 2 Limit 2 Limit 2 Limit 2 Limit 3 Limit 3 Limit 3 Limit 3 Limit 4 Limit 4 Limit 4 Limit 4 L a u f i n d e x 2 Herst1 Herst1 Herst1 Herst1 Herst2 Herst2 Herst2 Herst2 Herst3 Herst3 Herst3 Herst3 Herst4 Herst4 Herst4 Herst4 Herst1 Herst1 Herst1 Herst1 Herst2 Herst2 Herst2 Herst2 Herst3 Herst3 Herst3 Herst3 Herst4 Herst4 Herst4 Herst4 Herst1 Herst1 Herst1 Herst1 Herst2 Herst2 Herst2 Herst2 Herst3 Herst3 Herst3 Herst3 Herst4 Herst4 Herst4 Herst4 Herst1 Herst1 Herst1 Herst1 Herst2 Herst2 Herst2 Herst2 Herst3 Herst3 Herst3 Herst3 Herst4 Herst4 Herst4 Herst4 L a u f i n d e x 2 Anw. 1 Anw. 1 Anw. 1 Anw. 1 Anw. 2 Anw. 2 Anw. 2 Anw. 2 Anw. 3 Anw. 3 Anw. 3 Anw. 3 Anw. 4 Anw. 4 Anw. 4 Anw. 4 Anw. 1 Anw. 1 Anw. 1 Anw. 1 Anw. 2 Anw. 2 Anw. 2 Anw. 2 Anw. 3 Anw. 3 Anw. 3 Anw. 3 Anw. 4 Anw. 4 Anw. 4 Anw. 4 Anw. 1 Anw. 1 Anw. 1 Anw. 1 Anw. 2 Anw. 2 Anw. 2 Anw. 2 Anw. 3 Anw. 3 Anw. 3 Anw. 3 Anw. 4 Anw. 4 Anw. 4 Anw. 4 Anw. 1 Anw. 1 Anw. 1 Anw. 1 Anw. 2 Anw. 2 Anw. 2 Anw. 2 Anw. 3 Anw. 3 Anw. 3 Anw. 3 Anw. 4 Anw. 4 Anw. 4 Anw Masch.FH7 Fig : General structure of machine data

343 MTC 200 NC programming instruction Special NC Functions Read/Write Machine Data Elements "MTD" MTD command Syntax Using the MTD command (Machine Table Data), individual elements of the machine data in the NC program can be read and written, but only if write access is permitted for the individual elements. PG L1 L2 EL MTD([1..299],[ ],[ ],[ ]) Element No. Dimension 2 Dimension 1 Page No. Fig : MTD command syntax 116mtd.FH7 Designation Symbol Value range Meaning Page number PG Pages of the control machine data Pages of OEM machine data Pages of user machine data Control variable 1 L1 min. value - max. value min. value: first value of the structure definition ( -1000) second value of the structure definition ( +1000) (largest value lowest value 1000) Control variable 2 L2 min. value - max. value min. value: first value of the structure definition ( -1000) second value of the structure definition ( +1000) (largest value lowest value 1000) Element No. SL 1 - max. value max. value 1000 General requirements for the MTD command Verifications during access Detailed description The individual numbers are to be separated by a comma. A variable can be inserted instead of constants. An arithmetic expression instead of a constant or variable is not permitted. All parameters listed above must always be indicated. The declared parameters must lie within the given value range. The NC checks their validity first during operation. The NC interrupts program execution and initiates an error message if a declared parameter lies outside of the valid value range. The NC reacts in the same way if the user write-accesses a write-protected data element from the NC program. The NC automatically limits the value to the lowest or largest value of the data element if the user declares a value outside of the valid value range for a data element. Further and supplementary information about the functions and the handling of machine data can be found in the description "Machine data", folder 1.

344 12-22 Special NC Functions MTC 200 NC programming instruction Example: Reading machine X=MTD(260,1,,5) Read machine data element Page=250, L1=1, L2=2, EL=4 Traverse X-axis to the position which is located in the machine data element; L2 is not present L1 is a PROCESS type. The elements of the current process are read. A special process specification is also possible. Insertion in a calculation Example: Writing machine data MTD(250,1,2,4)=@200 Write machine data element MTD(260,1,,5)=X Write the current X-value to the machine data element MTD(270,,3,6)=@210+@220 Allocate calculation Note: Using the MTD command, any number of data elements can be read out from the machine data within an NC block, but only one data element can be written. (see the following section "Possible allocations between AXD, TLD, OTD, DCD, MTD") Possible Allocations between TLD, MTD, AXD, OTD, DCD Handling AXD Commands Various limitations must be observed when handling TLD, MTD, AXD, OTD and DCD commands. Possible allocations - examples Invalid allocations - examples AXD(X:P )=1000 AXD(X:P )=1 AXD(X:P )=AXD(X:P ) Note: Only one AXD command may be written for each NC block. Multiple AXD allocations per line are not permitted. AXD commands in parentheses are not permitted.

345 MTC 200 NC programming instruction Special NC Functions Handling OTD Commands Possible allocations - examples Invalid allocations - @22=OTD(,,,4,1) OTD(,,,4,1)=OTD(,,,5,1) OTD(,,,4,1)=OTD(,,,5,1)+OTD(,,,5,1) OTD(,,,4,1)=@10 OTD(,,,5,1)=@21 Note: Using command OTD, any number of data elements can be read out from the zero point table within an NC block, but only one data element can be written. OTD commands in parentheses are not permitted. Handling TLD Commands Possible allocations - examples Invalid allocations - @220=TLD(,1,1,,0,6,) TLD(,1,1,,0,5,)=1 TLD(,1,1,,0,6,)=1 Note: Using the TLD command, any number of data elements of the tool data can be read within one NC block, but only one data element can be written. As opposed to the OTD and MTD commands, only one allocation in the NC block may occur (also when reading). DCD commands in parentheses are not permitted.

346 12-24 Special NC Functions MTC 200 NC programming instruction Handling DCD Commands Possible allocations - examples Invalid allocations - @22=DCD(,,1) DCD(,1,1)=DCD(,2,1) DCD(,,1)=DCD(,,1)+DCD(,,1) DCD(,,1)=@20 DCD(,,2)=@21 Note: Using the DCD command, any number of D corrections of the machine data can be read within one NC block, but only one D correction can be written. DCD commands in parentheses are not permitted. Handling MTD Commands Possible allocations - examples Invalid allocations - @220=MTD(110,1,1,1) MTD(110,1,1,1)=MTD(110,1,1,2) MTD(110,1,1,1)=MTD(110,1,1,2)+MTD(110,1,1,3) MTD(110,1,1,1)=@200 MTD(110,1,1,2)=@210 Note: Using the MTD command, any number of data elements can be read out from the machine data within an NC block, but only one data element can be written at a time. MTD commands in parentheses are not permitted.

347 MTC 200 NC programming instruction Special NC Functions Allocations Between TLD, MTD, AXD, OTD and DCD Commands Possible allocations - examples Invalid allocations - examples AXD(X:P )=MTD(110,1,1,1)+MTD(110,1,1,1) AXD(X:P )=OTD(,,,4,1)+OTD(,,,4,1) AXD(X:P )=TLD(,1,1,,0,6,)+TLD(,1,1,,0,6,) AXD (X:P )=DCD(,,1)+DCD(,,1) MTD(110,1,1,1)=AXD(X:P ) TLD(,1,1,,0,6,)=AXD(X:P ) OTD(,,,4,1)=AXD(X:P ) DCD(,,1)=AXD(X:P ) Note: The restrictions for the individual commands must be observed when allocations are made between the TLD, MTD, AXD, OTD and DCD commands.

348 12-26 Special NC Functions MTC 200 NC programming instruction

349 RD RD MTC 200 NC programming instruction NC Compiler Functions NC Compiler Functions 13.1 Basics NC compiler The NC compiler, which is integrated into the user interface, provides a preliminary translation of NC programs. The functions: chamfers and roundings, enhanced look-ahead function, graphical NC editor (for contour and machining programming), macro technique and modal function have been implemented using these features Chamfers and Roundings Chamfers and roundings The commands: CF ( insert chamfer) and RD (insert rounding) enable chamfers and roundings to be inserted. Syntax CF<value> or CF=<value> RD<value> or RD=<value> ;insert chamfer for CF: <value>=chamfer width ;insert rounding for RD: <value>=rounding radius Explanation A further linear contour (chamfer) or an arc (rounding) can be inserted between linear or circular contours. RD RD 121Fase.fh7 CF CF CF CF CF CF CF CF 121Fase.FH7 Fig. 13-1: Inserting chamfers and roundings between linear and circular contours Specifying the RD command tangentially inserts an arc of radius RD between the preceding and the subsequent movement command. Starting from the intersection point of the movement commands involved, chamfer width CF is removed from both movement blocks; the resulting coordinate values are connected by a linear path (G1).

350 13-2 NC Compiler Functions MTC 200 NC programming instruction The value that follows CF specifies the chamfer width; the value after RD specifies the rounding radius. The instructions CF and RD may be inserted between two movement blocks at the end of the first block. The required chamfer or rounding will then be inserted after the block in which it has been programmed. Alternatively, the CF or RD command may be inserted in a separate block between two movement blocks. Chamfers and roundings are always produced on the active plane. Example: 122Rund.fh7 Y X G01 RD G03... G1 X.. Y.. RD =3 G3 X.. Z.. I.. J RUND.FH7 Fig. 13-2: Inserting a rounding Contiguous movement blocks Invalid commands Chamfers and roundings should only be inserted between contiguous movement blocks. A maximum of 20 blocks that do not contain a movement may be present between two movement blocks which are to be connected by a chamfer or a rounding. The preceding and subsequent movement blocks must contain either a linear or a circular movement. The command for inserting a chamfer or rounding must be written either in the first movement block or after it, but always before the second movement block. If the compiler encounters the insertion command for a chamfer or rounding in the second movement block, it inserts the chamfer or rounding between the second and the subsequent movements. If the instruction for inserting a chamfer or rounding is written in a separate NC block, the immediately preceding NC block must contain the related linear or circular movement. Movements that are outside the active working plane cannot be interconnected by chamfers or roundings. Chamfers or roundings cannot be inserted between two movement blocks if one of the following functions is selected or deselected: Radius/diameter programming (G15, G16), Changing planes (G17, G18, G19, G20, G21, G22), Transformation functions (G30, G31, G32), Zero offsets and rotations (G50 through G59), Dimension inch/mm (G70, G71), Mirror function (G72, G73), Homing axes (G74), Feeding to positive stop / canceling any axis pre-loading (G75, G76), Repositioning and restarting (G77), Scaling function (G78, G79), Absolute/incremental dimension (G90, G91),

351 MTC 200 NC programming instruction NC Compiler Functions 13-3 Jump instructions and program branches (BEQ, BER, BES, BEV, BMI, BNE, BPL, BRA, BRF, BSR, BST, BTE, JVE JMP, JSR) Jump labels, Movement blocks as skipped blocks. No variables For the NC blocks between which a chamfer or rounding is to be inserted, the end points that lie in the current working plane may not be specified by variables. Note: Inserting a specified chamfer or rounding between the preceding and the subsequent movement block must geometrically be possible. If this is not possible, the compiler automatically reduces the chamfer or rounding concerned to a corresponding value (if necessary even to 0, without issuing an error message) Macro Technique Macro Syntax Explanation Global / local macros A macro is the combination of individual instructions that usually must be programmed repeatedly into a comprehensive instruction with its own name. DEFINE... AS... A macro permits instructions to be combined that must always be written in the same sequence (for safety reasons, for example). It enables DIN G codes (such as drilling cycles G80 through G89) or DIN auxiliary functions (such as M6) to be simulated. Furthermore, it enables functional sequences that cannot be accessed from the PLC (such as spindle control during program mode) to be controlled by a single command from the NC. Besides local macros, which the user may define within an NC program and employ subsequently, the machine manufacturer can store global macro definitions in the "NC Options menu" (in the "NC programming" menu item). In contrast to local macro definitions, global macro definitions are valid in all NC programs and in MDI operation of the graphic user interface. Example: Changing tools: : DEFINE M860 AS M86 M3 S10 DEFINE M6 AS BSR.WZW DEFINE QUICK AS G01 F15000 DEFINE ANPOS AS X=200 Y=100 Z=50 QUICK ANPOS M860 M6 : Disengage while the spindle is slowly turning Reproduce DIN tool change function M6 Quick process at 15 m/min ;Loading pos. for changing tools Quick loading in X, Y, Z and changing tools

352 13-4 NC Compiler Functions MTC 200 NC programming instruction Notes: A macro name may have up to 20 characters. Blanks may not be used. The instruction related to a global macro may contain up to 156 characters (consisting of 2 lines with up to 78 characters each). With a local macro, the compiler interprets all NC instructions that follow the AS key word as the instruction sequence that must be inserted instead of the macro name. Nesting macros is not permitted. This means that there may not be any further macros within an instruction sequence that is to be inserted. Not permitted: DEFINE M860 AS M86 M6 S10 In contrast to the textual user interface and to the SOT, the user may program global macros in MDI mode within the graphic user interface. Key words may not be super-defined by macros. When using a macro in an instruction, a blank character must be inserted before and after the macro name. Therefore, a macro may not be contained in an instruction (e.g. x = macro name) or in a formula/equation, because a blank may not exist after the equal sign (=). Reserved key words The following key words are currently in use by Bosch Rexroth. The user should not use them in the macro technique. ACC_EFF ACD_COMP ADTRC BBTRC CCW CF COMPARE CONT CONT_END CORRECTION CW DEFINE AS LA_OFF LA_ON LINE METB MODF_OFF MODF_ON MOVE PROBE RD RELIEF RESTORE

353 MTC 200 NC programming instruction NC Compiler Functions 13-5 SAVE SETTING START TLMON_CHK TLMON_OFF TLMON_ON TR_RADIUS TRC.. VFBT COPY_XX CYCLE_XX FORM_XX PATERN_XX WINDOW_XX XX = 01 through 99 Note: Use the macro technique with extreme care, because it allows the programming language to be changed to a high degree. Enhancing NC Functions by Macro Technique Using the macro technique enables the machine manufacturer to define customized NC functions that may be employed by the user in the NC program. Global macros can be created in the "NC programming" menu item ("NC options" submenu). They are valid in all NC programs and in the MDI mode. Please refer to the "NC compiler" description for details. Invariably defined positions The machine manufacturer can enter several fixed positions in the macro table (such as reference positions, tool changing positions, loading and unloading positions, etc.). These positions can have mnemonics assigned which the user may utilize later in the NC program. Example: Macro table: : DEFINE P_WSW AS X... Y... Y Spindle Z Tool magazine Toolchange position X 123Punkte.fh7 123PUNKTE.FH7 Fig. 13-3: Approaching invariably defined positions

354 13-6 NC Compiler Functions MTC 200 NC programming instruction NC program : G00 P_WSW : Note: Entire NC blocks or subroutine calls may be programmed in the macro table and be called by a keyword. This enables the machine manufacturer to define specific machine-related movement blocks, which can be activated by the user via keywords. Retract movement with intermediate position In the process of moving to the reference position or to the tool changing position, the tool must frequently first be moved away from the machining area before it can safely be retracted. Using the macro technique, both movements can be combined in a single command. Example: Macro table: DEFINE RETURN AS G0 BSR.P_RT X Intermediate position ( 80 / 50 ) Retract position ( 80 / 75 ) 124Rück.fh7 Z 124RUECK.FH7 Fig. 13-4: Retract movement with intermediate position NC program: : RETURN X80 Z50 ;Programming the intermediate position : M30 The following subroutine is entered in the cycle memory:.p_rt G0 X80 Z75 RTS ;Move to retract position cycle Note: Further DEFINE instructions and further subroutines may be defined. This enables fixed positions to be approached via an intermediate point. The names of the macros and subroutines may be defined by the user. Entire sequences can be programmed in the subroutines. The machine manufacturer creates the subroutines and the macros. The user merely enters NC program line "RETURN...".

355 MTC 200 NC programming instruction NC Compiler Functions Modal Function Modal function The MODF_ON (STRI) modal function permits repeatedly used expressions to be written only once. Syntax MODF_ON(STRI) MODF_OFF ;Activate modal function (modal function on) ;Deactivate modal function (modal function off) Explanation The string STRI, transferred in parentheses with the modal function, may contain up to 80 characters. It is inserted in all subsequent blocks with axis movements. The modal function is deselected using the MODF_OFF keyword. Notes: The instruction concerned is executed immediately in the NC blocks in which the user writes a modal instruction using MODF_ON. The MODF_OFF instruction deactivates the modal instruction in the block in which it is programmed. It must be noted that the modal function (such as MODF_ON(RD 2)) does not have an effect on blocks without axis movements (i.e. without feed axes). This is also true for contours that were created in the graphical editor and were saved as a function call in the NC program. Examples: Drilling holes Y N15 N14 N N12 125Loch.fh7 100 N8 N9 N10 N X 125LOCH.FH7 Fig. 13-5: Example: Drilling holes

356 13-8 NC Compiler Functions MTC 200 NC programming instruction NC program: ; T6 M6 G54 G0 X-10 Y-10 Z50 S3500 M3 ; ;******************* G83 - deep hole drilling chip removal depth chip depth safety distance cutter distance dwell feed ;*************************************************************************** X100 Y100 Z10 MODF_ON (BSR.*G83) X200 X300 X400 Y200 X300 X200 X100 MODF_OFF T0 M6 G0 G53 X570 Y490 M30 Modal rounding and chamfering X RD RD RD RD 140 RD RD 120 RD RD CF 100 CF 126Modal.fh CF CF CF CF CF CF CF CF Z MODAL.FH7 Fig. 13-6: Example: Modal rounding and chamfering

357 MTC 200 NC programming instruction NC Compiler Functions 13-9 (parts name: stairs) T3 BSR.M6 (PRE-TURNING TOOL) G18 G54 G16 G90 G71 M69 G92 S2000 [turning contour C1 without cut segmentation] G0 G18 G54 G16 G95 G97 G9 G7 Z444 S2000 M3 M9 X0 G1 G42 Z440 F.3 X20 MODF_ON (CF2.0) Z400 X40 Z360 X60 Z320 X80 Z280 X100 Z160 MODF_ON (RD2.5) X120 Z120 X140 Z80 X160 Z40 X180 Z0 MODF_OFF G0 G40 X182 Z1 X184 Z450 M5 M70 M62 G53 G90 G47 M5 M30 [ ] 13.5 Enhanced Look-Ahead Function Enhanced look-ahead function Using the enhanced look-ahead function The enhanced look-ahead function optimizes the velocity curve of the programmed path movement during compilation and/or the program download. If required and without modifying the programmed contour, the look-ahead function inserts intermediate blocks in order to achieve a steadier path velocity curve. Using the enhanced look-ahead function is always expedient if an NC program that consists of very short NC blocks is to be executed and if the internal block look-ahead function proves insufficient. With non-tangential block transitions, the NC always reduces the velocity to zero at transitions that are crossed with G6 or G8. In order to be able to stop in the last block, this process frequently requires continuous deceleration across several blocks. With very short NC blocks, the internal CNC look-ahead function, however, usually does not recognize the end of the polygon blocks, or a too-short NC block, or a non-tangential block transition in time. Consequently, the NC does not induce the deceleration process in time, aborts NC program execution during the deceleration process, and issues the error message "Deceleration distance too short". Using the enhanced look-ahead function enables the compiler to adjust the velocity profile of certain program sequences within the NC program to the maximum velocities and the acceleration capability of the individual

358 13-10 NC Compiler Functions MTC 200 NC programming instruction axis. During acceleration and deceleration processes, the compiler therefore splits the NC blocks into sub-blocks of different F values wherever this is necessary. Syntax Global variables LA_ON ;activates the enhanced look-ahead function (Look-ahead function, on ) All axes that belong to the process exist in the process when an LA_ON- LA_OFF block is executed. LA_ON ;enhanced, axis-specific look-ahead function (axis1, activate (Look-ahead function, on ) axis2,..) Only the specified axes (linear or rotary axes, no spindles) exist in the process when an LA_ON-LA_OFF block is executed. All the other axes are transferred by GAX/FAX to other processes. LA_OFF ;deactivates the enhanced look-ahead function (Look-ahead function, off) Global variables have been introduced that are used as transfer parameters for the enhanced look-ahead function. Usually, the user can employ these variables without modification. Some variables may be preassigned in the NC Options menu (in the NC programming menu item). METB ;Minimum execution time of an NC block Explanation: Global variable Minimum execution time of an NC block (METB) specifies the shortest execution time of an NC block within the polygon sequence that is to be optimized. It must be greater than the related block cycle time. VFBT Explanation: BBTRC Explanation: ;Velocity factor for block transition This variable permits the velocity changes on non-tangential block transitions to be influenced. ;Block buffer for tool radius compensation This variable specifies how many NC blocks the enhanced look-ahead function is to take into account in advance when it computes and checks the tool radius compensation. TL_RADIUS ;Specify tool radius Explanation: Using the TL_RADIUS[T No., E No.] command, the tool radii that are required for the enhanced look-ahead function may be defined centrally at the beginning of the program. The compiler employs the current T No. or E No. if a T No. or an E No. has not been specified. Example: : TL_RADIUS[ ]=24,995 TL_RADIUS[923,3]=20.31 TL_RADIUS[9,9]=29.89 : Note: If the tool radius path correction of the enhanced look-ahead function is employed (TRC <> 0), the tool radius that, using the predefined TL_RADIUS[T No., E No.], has been specified in the NC program during compilation must exist during machining.

359 MTC 200 NC programming instruction NC Compiler Functions TRC Explanation: TRC=1: TRC=2: ;Tool radius correction TRC=0:The enhanced look-ahead function does not perform radius correction. The enhanced look-ahead function does perform radius path correction to the left of the contour using the radius defined under TL_RADIUS. The enhanced look-ahead function does perform radius correction to the right of the contour using the radius defined under TL_RADIUS. ADTRC ;Loading distance to establish the tool radius path compensation Explanation: ADTRC = 0 The enhanced look-ahead function does not consider a positioning and retracting path to employ the tool radius path correction. ADTRC = 1 For TRC = 1, the enhanced look-ahead function inserts a straight line with a tangential transition with the length to be provided here in front of the first polygon element (first movement block after LA_ON) and after the last polygon element ADTRC = 2 (last movement block in front of LA_OFF) for TRC = 2 if the tool radius path compensation was activated with TRC=1 or TRC=2. Contiguous motion blocks No variables Tool management Percentile acceleration correction Within the program sequence to be optimized, only those NC blocks may exist which contain G1, G2 and G3 movements, event instructions (SE,RE), speed definitions (F), acceleration limits (ACC_EFF) and quick auxiliary function outputs (MQxxx, QQxxx and Sxxxxx.xx if "S" was parameterized as a quick auxiliary function). The end points may not be determined by variables in those NC blocks in which the speed profile is to process the look-ahead function. The tool change, including the pertaining T function and the tool edge selection, is to be performed before the enhanced look-ahead function is activated or after it has been deactivated. In certain program sequences and, if applicable, depending on the tool or the workpiece weight, the resulting path acceleration must be reduced. Using ACC_EFF ;change effective resulting path acceleration permits the effective resulting path acceleration to be changed. This acceleration factor ranges from 1% to 200%. Note: Contrary to command ACC, command ACC_EFF does not limit the maximum path acceleration specified by process parameters. It modifies the actual path acceleration according to the specification. Axis-related velocities Syntax Besides programming the path velocity via the F value, axis velocities may also be programmed during the look-ahead function. To specify an axis velocity, the F must immediately (without a blank) be followed by the axis name. F<axis name>=<axis velocity in mm/min>

360 13-12 NC Compiler Functions MTC 200 NC programming instruction Example: G01 X 2034 Z1 421 FZ1=4500 ;axis-related velocity for Z1 : Note: If the user programs several velocities within a NC block, that NC block and the subsequent NC blocks are executed with the last velocity which has been specified until the next velocity instruction is received. Access to current data in the controller Command Access Current Data ACD_COMP[...] permits access to current controller data (currently only NC variables) during compilation. Example: reading the tool radius during compilation After each trimming of a grinding wheel, a trimming program updates half the diameter of the grinding wheel in NC During compilation, this value must be taken into account as the tool radius. TL_RADIUS[1,1] = ACD_COMP[@1:220]-0,2; Adopt tool radius from NC and subtract 0.2 mm. Example: grinding needles A given polygon curve must be traversed in forward and backward alternating movement at the highest velocity possible. This requires the velocity curve of the programmed path movement to be optimized using the enhanced look-ahead function. 127Poly.fh7 Y X 127POLY.FH7 Fig. 13-7: Velocity curve of a polygon that is to be optimized for grinding needles ;Grinding needles on the XY plane ;Grinding wheel radius: ;File name: TP1 ; (part name: TP1) T2 BSR.M6 [GRINDING WHEEL D5] Activate tool TL_RADIUS [ ] = ACD_COMP[@200] Read current tool radius for compiler G0 G17 G40 G54 G71 G48 G8 G6 G98 X Y S M3 Return to initial Loop counter for number of pendulum strokes = BEQ.ENDPEN Terminate oscillation? F4000 Set path velocity ; TRC=1 Tool radius compensation to left of contour ADTRC=1 Loading path to generate the tool radius compensation ACC_EFF=90 Modify effective path acceleration

361 MTC 200 NC programming instruction NC Compiler Functions LA_ON ; G1 X0.8 Y1.2 : : LA_OFF : BRA.PEN.ENDPEN BSR.ABRICH RTS ; PROGRAM END Enhanced look-ahead function ON Polygon curve ;Enhanced look-ahead function OFF ;Decrement loop counter ;Call dressing cycle Notes: In reverse programs, the "LA_OFF" command must be programmed when the "LA_ON" command is used. The compiler does not take into account any velocity changes of the axes that are caused by a rotation of the contour Graphic NC editor Function Syntax The graphic NC editor represents an efficient and highly precise tool that supports parts programming. It enables the user to easily define geometric elements (e.g. parts contours) graphically, and to specify their machining. At the end of the dialog box, the user may choose whether the data that is required for machining is to be saved in the form of NC blocks or in the form of a function call, together with the related parameters, in the NC program. The graphic NC editor produces the following instructions: WINDOW_01 (...,...,...) ;Definition of the window size for lathing WINDOW_02 (...,...,...) ;Definition of the window size for milling CONT (...,...,...) ;Definition of the initial part contour or of the finalpart contour : : END_CONT FORM_20 (...,...,...) ;Recess - lathing FORM_50 (...,...,...) ;Straight elongated hole - milling FORM_51 (...,...,...) ;Round elongated hole - milling FORM_52 (...,...,...) ;Circle - milling FORM_53 (...,...,...) ;Polygon - milling FORM_54 (...,...,...) ;Straight text - milling FORM_55 (...,...,...) ;Round text - milling FORM_56 (...,...,...) ;Rectangle - milling FORM_57 (...,...,...) ;Rectangle centered - milling CYCLE_10 (...,...,...) ;Contour cut - lathing CYCLE_11 (...,...,...) ;Roughing - lathing CYCLE_12 (...,...,...) ;Residual cut - lathing CYCLE_40 (...,...,...) ;Contour cut - milling

362 13-14 NC Compiler Functions MTC 200 NC programming instruction Note: During the setup of the process program. the following data for the pertaining tool must be available: cutter position, tool radius, corner angle, and setting angle Detailed description Further detailed information concerning these functions of the NC compiler can be found in the description "NC compiler" "DOK-MTC200-NC*COMP*V23-FK01-EN-P".

363 MTC 200 NC programming instruction NC Programming Practices NC Programming Practices 14.1 Time-Optimized NC Programming The following rules will help to ensure that the CNC operates at its maximum performance level. Note: Whatever can be programmed in a single NC block in terms of syntax should be in fact be programmed in a single NC block, provided it does not violate program flow logic. What can be programmed in an NC block? Branch label (e.g..home) Motion functions (1 function each from 16 groups) Trigonometric arguments {RAD, DEG} Assigning a value to a NC variable (repeatedly) Assignment of value to a drive date (e.g. AXD(X:S )=3) Position statement (one position statement for each axis) {X,Y,Z,U,V,W,A,B,C} Interpolation parameters I Interpolation parameters J Interpolation parameters K F word S word P word Zero offset table (O word) Path acceleration as percent (ACC) Auxiliary Q function (Q word) Tool number (T word) Tool edge number (E word) Tool command Setting an event (SE) Resetting an event (RE) Wait until NC event is set (WES) Wait until NC event is reset (WER) Define process (DP) (repeatedly) Program preselection for process (SP) Start reverse program (RP) (repeatedly) Start advance program (AP) (repeatedly) Wait for process (WP) (repeatedly) Lock process (LP) (repeatedly) Set Complete status (POK) Program control command Note Comment

364 14-2 NC Programming Practices MTC 200 NC programming instruction Example: NC program G00 S5000 M03 F10000 X100 Y50 Time-optimized, spindle starts after movement: G00 X100 Y50 F10000 S5000 M03 Time-optimized, spindle starts before movement: M03 S5000 G00 X100 Y50 F10000 The priority to process an NC block in the NC memory is defined as follows: Block Nos. Branch label G codes Variables Axis values N1234.END X100 Y100 IPO parameter I0 J50 F value S value Auxil. function Tool commands Events Process commands Program commands F1000 S800 M03 MTP T6 SE 5 DP 1 HLT While all of the above NC commands can, in theory, be programmed in a single NC block, the maximum block length is limited to 240 characters. While auxiliary M functions can be used from all 16 groups, no more than four auxiliary functions (S, M, Q words) can be programmed in a single NC block. Note: Avoid repeating functions (G codes), which are already active. Remember which functions are modally active as a consequence of the power-on status. Example: NC program G07 G09 G40 G43 G47 G53 G62 G90 G94 RAD (ON states) G00 G90 S5000 M03 F10000 X100 Y50 G00 G90 F10000 X200 Y50 G01 G90 F10000 Y100 Time-optimized: G00 X100 Y50 F10000 S5000 M03 X200 G01 Y100 Note: Calculate all constants when you create the program, and assign these constants without using equal signs. Example: NC program DEG X=100 Y=20+100*SIN(30) Time-optimized: X100 Y70 Notes: Avoid using NC commands that stop NC block processes. Avoid using the formula assistant interpreter!

365 MTC 200 NC programming instruction NC Programming Practices 14-3 Example: S2 = 1400 Time-optimized: S NC commands that stop block preparation Movement conditions {G33, G50-G59, G63, G64, G65, G73, G74, G75, G79, G95, G96} and Cancellation of path conditions by G93, G94 and G97 Assigning values to NC variables, working pallets or drive datum Calculating a mathematical expression Auxiliary functions (S, M, Q words) Tool number (T word) Tool commands Wait until NC event is set/reset (WES, WER) Wait until main spindle has reached target position (MW19) Switch between main spindle mode and C-axis mode (M03 Sxxxx, Cxxx.xxx) Axis transfer with GAX / FAX Nonprocessed skipped blocks Process control commands Program control commands {BST, BES, BER, JMP, RET, BTE, BSE, BRF, HLT, JEV, BEV, CEV, JSR} Process control commands: RTS, BRA, BSR, REV, BEQ, BNE, BPL, BMI, EEV and DEV and value assignments to machine addresses do not stop block process preparation. Note: Use tool management as a parallel process through optimal programming. Example: NC program for tool changer with double gripper T1 MTP Position magazine to tool 1 TCH Switch tools between spindle and magazine location BSR.BEARB1 Machining process 1 T2 MTP Position magazine to tool 2 TCH Switch tools between spindle and magazine location BSR.BEARB2 Machining process 2 Time-optimized: T1 MTP Position magazine to tool 1TCH TCH Switch tools between spindle and magazine location T2 MTP Position magazine to tool 2 (parallel) BSR.BEARB1 Machining process 1 TCH Switch tools between spindle and magazine location BSR.BEARB2 Machining process 2

366 14-4 NC Programming Practices MTC 200 NC programming instruction The positioning of the magazine in block N0002 takes place asynchronously to the execution of the NC program in other words, the execution of the NC program can continue without interruption. The TCH command will automatically wait until the unit magazine positioning is completed. CNC time data Block cycle time 6 ms Block transition time 0 ms Interpol. cycle time 2 ms Posn. contr. cyc. time 2 ms Time data with digital drives Fine interpolation 0.25 ms Posn. contr. cyc. time 0.25 ms

367 NC Programming Instructions Appendix Appendix 15.1 Table of G Code Groups G Function G code group Active Meaning G00, G01, G02, G03 1 modal Interpolation functions G17 to G22 2 modal Level selection G40, G41, G42 3 modal Tool path compensation G52 to G59 4 modal Zero offsets G15, G16 5 modal Radius/diameter programming G90, G91 6 modal Measurements G65, G94, G95 7 modal Feed programming G96, G97, G66 8 modal Spindle speed programming G70, G71 9 modal Measurement units G43, G44 10 modal Transition elements G61, G62 11 modal Block change G98, G99 12 modal Speed contour/center line path G47, G48, G49 13 modal Tool length compensation G08, G09 14 modal Block transition speed G06, G07 15 modal Drag error ON/OFF G04 G33 G50, G51 G63, G64 G74 G75 G76 G77 G92 G blockwise blockwise blockwise blockwise blockwise blockwise blockwise blockwise blockwise G30, G31, G32 17 modal Transformation G72, G73 18 modal Mirror imaging G78, G79 19 modal Scaling G68, G69 20 modal Adaptive depth Dwell time Thread cutting programmable zero offset Tapping Referencing Traverse to fixed point Reposition and NC block restart Spindle speed limit Time programming G36, G37, G38 21 modal Rotary axis approach logic G25, G26 22 modal Adaptive feed control G10, G11 23 modal Rounding of NC blocks with axis filter The G functions which are blockwise active can be read only in the block in which they are programmed. Otherwise a value of -1 is issued when the blockwise active G functions are read.

368 15-2 Appendix NC Programming Instructions 15.2 Table of M Function Groups M function M function group Active Meaning M000, M001, M002, M030 1 modal Program control commands M3, M4, M5, M13, M14 2 modal Spindle commands S M103, M104, M105, M113, M114 2 modal Spindle commands spindle 1 M203, M204, M205, M213, M214 3 modal Spindle commands spindle 2 M303, M304, M305, M313, M314 4 modal Spindle commands spindle 3 M007, M008, M009 5 modal Coolant S M107, M108, M109 5 modal Coolant S1 M207, M208, M209 6 modal Coolant S2 M307, M308, M309 7 modal Coolant S3 M010, M011 8 modal Clamp & unclamp S M110, M111 8 modal Clamp & unclamp S1 M210, M211 9 modal Clamp & unclamp S2 M310, M modal Clamp & unclamp S3 M040,..., M modal Gear selection S M140,..., M modal Gear selection S1 M240,..., M modal Gear selection S2 M340,..., M modal Gear selection S3 M046, M modal Spindle override M048, M modal Feed override M019,..., M319, Mxxx 15.3 Table of Functions 16 blockwise S positioning & MH-F Machine-specific functions The M functions which are blockwise active can only be read in the block in which they are programmed. Otherwise a value of -1 is issued when the blockwise active M functions are read. Legend for column "Function" * Default state P default can be defined in process parameters S blockwise active

369 NC Programming Instructions Appendix 15-3 I. G00 through G19 Function G group Meaning Description Page G00 P G01 P 1 Lin. interpolation, rapid traverse * modal 1 Lin. interpolation feed * modal G02 1 Circular interpol., clockwise, * modal G03 1 Circular interpol., counterclockwise, * modal G04 P 16 Dwell time * blockwise G06 15 Position with minimized lag * modal G07 * 15 Interpol. w. lag * basic setting, * modal G08 14 Speed limited NC block transition * modal G09 * G10 * 14 Speed limited NC block transition * basic position * modal 23 Disable rounding of NC blocks with axis filter * basic setting * modal G11 23 Enable rounding of NC blocks with axis filter * modal G15 P G16 P G17 P G18 P G19 P 5 Radius programming * modal 5 Diameter programming * modal 2 Plane selection XY * modal 2 Plane selection ZX * modal 2 Plane selection YZ * modal Syntax: G00 ; The programmed coordinates are traversed at maximum path velocity. Syntax: G01 F value ; The programmed axes start and reach their end point together. Syntax: G02 <end point> <interpolation parameter [I,J,K]> or <radius [R]> ; A circular movement is performed in the selected plane (G17, G18, G19, G20, G21, G22). Syntax: G03 <end point> <interpolation parameter [I,J,K]> or <radius [R]> ; A circular movement is performed in the selected plane (G17, G18, G19, G20, G21, G22). Syntax: G04 F<time in seconds> ; The maximum dwell time is seconds. Syntax: G06 ; Algorithm for positioning with minimized lag for all axis movements. Block transitions are not rounded. Syntax: G07 ; Algorithm for positioning with lag for all axis movements. Block transitions which are not tangential will be rounded. Syntax: G08 ; The interpolation function G08 is used to adjust the final end speed to ensure that the transition to the next NC block occurs at the highest possible speed. Syntax: G09 ; G09 reduces position differences at block transitions. Syntax: G10 ; Disables rounding mode. Programming of "RDI=0" automatically enables G code G10. Syntax: G11 ; Enables rounding mode. The last programmed rounding distance RDI is effective. With a current rounding distance of 0, G11 does not take effect. Syntax: G15 ; The machine builder sets the defaults for radius/diameter programming in the process parameters. Syntax: G16 ; The machine builder sets the defaults for radius/diameter programming in the process parameters. Syntax: G17 ; The machine builder sets the default plane in the process parameters. Syntax: G18 ; The machine builder sets the default plane in the process parameters. Syntax: G19 ; The machine builder sets the default plane in the process parameters

370 15-4 Appendix NC Programming Instructions II. G20 to G38 Function G group Meaning Description Page G20 - G22 2 Free plane selection * modal G20 2 Free plane selection * modal G21 2 Free plane selection * modal G22 2 Free plane selection * modal G25 22 Adaptive feed OFF * basic setting G26 22 Adaptive feed ON * basic setting G30 * 17 Deselection of transformation * basic position * modal G31 17 Facing selection * modal G32 17 Selection of lateral cylinder surface machining * modal G33 S G36 P G37 P G38 P 16 Thread cutting * blockwise 21 Start-up logic for endlessly rotating rotary axes * modal 21 Start-up logic for endlessly rotating rotary axes * modal 21 Start-up logic for endlessly rotating rotary axes * modal The 1 st and 2 nd axes of the plane selected with one of these G functions, as well as the vertical axis, receive a specified axis meaning. Furthermore, the "Constant surface speed function (G96)" is deselected and the "Spindle speed in rpm function (G97)" and the "Linear interpolation (G01)" functions become active. Syntax: G20 [1st axis of the plane] [2nd axis of the plane] {perpendic. axis} The 1 st axis of the plane contains axis meaning X. The 2 nd axis of the plane contains axis meaning Y. The vertical axis contains axis meaning Z. Syntax: G21 [1st axis of the plane] [2nd axis of the plane] {perpendic. axis} The 1 st axis of the plane contains axis meaning Z. The 2 nd axis of the plane contains axis meaning X. The vertical axis contains axis meaning Y. Syntax: G22 [1st axis of the plane] [2nd axis of the plane] {perpendic. axis} The 1 st axis of the plane contains axis meaning Y. The 2 nd axis of the plane contains axis meaning Z. The vertical axis contains axis meaning X. Syntax: G25 Adaptive feed control is deactivated. Syntax: G26 Adaptive feed control is activated. Syntax: G30 ; G30 cancels an existing coordinate transformation. The fictitious axes may no longer be programmed. Syntax: G31 ; The NC activates the G17 plane and the corresponding real axes become fictive axes. Syntax: G32 RI w or G32 RI=w ; The NC produces straight lines and circles on a lateral cylinder surface. Before lateral cylinder surface machining is activated, the activated machining plane must be spanned by at least one rotary axis. Syntax: G33 <end point> <lead> <starting angle> ; G33 cuts single- or multiple-thread longitudinal, face and tapered threads using a constant lead. Syntax: G36 ; Positioning with modulo calculation shortest distance. Modulo calculation can be used only with absolute programming (G90). Syntax: G37 ; Positioning with modulo calculation "positive direction". Modulo calculation can be used only with absolute programming (G90). Syntax: G38 ; Positioning with modulo calculation "negative direction". Modulo calculation can be used only with absolute programming (G90)

371 NC Programming Instructions Appendix 15-5 III. G40 to G59 Function G group Meaning Description Page G40 * 3 Cancel tool path compensation * basic setting * modal G41 3 Tool path compensation, left * modal G42 3 Tool path compensation, right * modal G43 * 10 Insert transition element "arc" * basic setting * modal G44 10 Insert transition element "chamfer" * modal G47 P G48 P 13 No tool length compensation * default, * modal 13 Tool length compensation positive * modal G49 13 Tool length compensation negative * modal G50 S G51 S 16 Programmable absolute zero offset * blockwise 16 Programmable incremental zero offset * blockwise G52 4 Programmable zero point of workpiece * modal G53 P 4 Cancel zero offsets * basic setting * modal G54 - G59 4 Adjustable zero offsets * modal Syntax: G40 ; If an active tool path compensation is canceled, the next move which is expected is a linear move lying in the plane. Syntax: G41 ; If G42 is programmed after an active G40 or G41, the next anticipated movement is a linear movement in the process plane. Syntax: G42 ; If G41 is programmed after an active G40 or G42, the next anticipated movement is a linear movement in the process plane. Syntax: G43 ; When tool path compensation is active (G41 or G42), G43 inserts an arc as the contour transition element for outside corners. Syntax: G44 ; When G41 or G42 is active, a chamfer is inserted as the contour transition with outside corners whose transition angle exceeds 90. Syntax: G47 ; When movements are being performed in the direction of the tool, all position data relate to the position of spindle nose. Syntax: G48 ; The entered tool length is corrected in the direction of the main axes when the axis direction is positive. Syntax: G49 ; The entered tool length is corrected in the direction of the main axes in the negative axis direction. Syntax: G50 <axis designation(s)><coordinate value(s)> ; Absolute offset of the machining zero point by the value programmed using G50 under the address letter for the axis. Syntax: G51 <axis designation(s)><coordinate value(s)> ; Incremental offset of the machining zero point by the value programmed using G50 under the address letter for the axis. Syntax: G52 <axis designation(s)><coordinate value(s)> ; A workpiece zero point is programmed using the value specified at the axis address. All zero offsets which are already active are canceled. Syntax: G53 ; Switch from workpiece coordinate system to machine coordinate system. Syntax: G54-G59 ; Offsets are entered via the user interface. G54 - G59 are cancelled by G52 or G

372 15-6 Appendix NC Programming Instructions IV. G61 to G79 Function G group Meaning Description Page G61 11 Exact stop * modal G62 * G63 S G64 S 11 Rapid NC block transition * basic setting * modal 16 Rigid tapping * blockwise 16 Rigid tapping * blockwise G65 7 Floating tapping spindle as lead axis * modal G66 8 Constant grinding wheel peripheral speed (SUG) * modal G68 20 Switch to 1 st encoder system G69 20 Switch to 2 nd G70 P G71 P G72 * encoder system 9 Unit: Inch * modal 9 Unit: Millimeters * modal 18 Mirror function OFF * basic setting, * modal G73 18 Mirror function ON * modal G74 S G75 S G76 S G77 S 16 Axis homing cycle * blockwise 16 Feed to positive stop * blockwise 16 Cancel all axis preloads * blockwise 16 NC block restart and repositioning * blockwise Syntax: G61 ; The programmed target position is traveled to within a specified exact stop limit. Syntax: G62 ; Sudden contour changes and non-tangential transitions are rounded off by programming G62. Syntax: G63 <end point> <feed per spindle revolution [F]> ; With G63, the spindle will stop at the end of movement. Syntax: G64 <end point> <feed per spindle revolution [F]> ; With G64, the spindle continues to rotate at the end of the movement. Syntax: G65 <feed per spindle revolution[f]> ; G65 is used to tap threads using non-interpolating main spindles. Syntax: G66 S <constant grinding wheel peripheral speed> ; Programming G66 causes the programmed S value to be interpreted in m/s or feet/s. Syntax: G68 <[axis designation] [coordinate value = 0]> <feed> ; Switch to 1 st encoder system (e.g. motor encoder) Syntax: G69 <[axis designation] [coordinate value = 0]> <feed> ; Switch to 2 nd encoder system Syntax: G70 ; The machine manufacturer defines the basic programming unit in the process parameters. Syntax: G71 ; The machine manufacturer defines the basic programming unit in the process parameters. Syntax: G72 ; The mirror function is canceled of all axes. Syntax: G73 <axis name>-1 ; The coordinates of the axes entered in the axis name are mirror imaged. Syntax: G74 <axis name> <coordinate value=0> <feed> ; G74 activates G40, G47, G53, G90, G94 Syntax: G75 <axis name> <coordinate value=0> <feed> ; G75 is possible with G90 or G91. Syntax: G76 ; G76 cancels the axis preloads on all axes which are preloaded using G75 traverse to fixed stop. Syntax: G77 <axis designation> <coordinate value=0> <feed> ; The originally programmed coordinate value (spindle speed) is restored

373 NC Programming Instructions Appendix 15-7 G78 * 19 Scaling function canceled * basic setting * modal G79 19 Select scaling function * modal Syntax: G78 ; The scaling function of all axes is canceled. Syntax: G79 <axis name><scaling factor> ; The scale for the distance to be traversed on the specified axis is increased or decreased

374 15-8 Appendix NC Programming Instructions V. G90 through G99 Function G group Meaning Description Page G90 * 6 Input data as absolute dimensions * basic setting * modal G91 6 Input data as incremental values * modal G92 S 16 Spindle speed limitation * blockwise Syntax: G90 ; All dimensions are input relative to a specified zero point. Syntax: G91 ; All subsequent dimension entries are stated as the difference in relation to the start/stop position. Syntax: G92 S<upper spindle speed limit> ; The set speed limit remains modally active G93 S 16 Time programming * blockwise Syntax: G93 F<time in seconds> ; G93 is superimposed on G94 or G95 in the NC block G94 P G95 P G96 P 7 Velocity programming * basic setting * modal 7 Feed per revolution * modal 8 Constant surface speed (CSS) * modal G97 P 8 Spindle speed in rpm * basic setting * modal G98 * 12 Constant feed on tool center line * basic setting * modal G99 12 Constant feed at the contour * modal Syntax: G94 ; The programmed F word is interpreted as feed in mm/min. G94 is superimposed by G95, G96 or G65. Syntax: G95 F<feed per revolution> ; The programmed F word is interpreted in mm or inches per spindle revolution. Syntax: G96 S<constant surface speed in m/min> ; The CNC determines the correct spindle speed for the current diameter. Syntax: G97 ; The programmed S word is interpreted in RPM. Syntax: G98 ; The path speed is NOT corrected in arcs if G41 or G42 is active. Syntax: G99 ; The path speed is corrected in arcs if G41 or G42 is active

375 NC Programming Instructions Appendix 15-9 VI. ACC through BTE Function Meaning Description Page ACC AP AXD BEQ BER BES BEV BMI BNE BPL Programmable acceleration * modal Start advance program Data exchange with digital drives Branch if result is equal to zero Branch if NC event is reset Branch if NC event is set Branch on NC event to NC subroutine (interrupt) Branch if result is less than zero Branch if result is not equal to zero Branch if result is equal to or greater than zero Syntax: ACC <constant> ; The programmed constant limits the acceleration of the axis/axes programmed in NC block ACC. Syntax: AP <process> ; The program preselected by the SP will be started for the specified process. Syntax: AXD(<axis name>: <SERCOS ID number>) AXD(<axis number>: <SERCOS ID number>) ; Read and write drive data using the SERCOS. Syntax: BEQ <label> ; The program continues execution if the last result is equal to zero. Syntax: BER <branch label> <process number>: <event number> ; The program continues execution at the specified branch label if an event is reset. Syntax: BES <branch label> <process number>: <event number> ; The program continues execution at the specified branch label if an event is set. Syntax: BEV <label>: <event number> ; NC event monitoring is activated after executing NC command BEV. If the NC event assumes a status of 1, NC program execution continues at the NC block with the defined branch label. Syntax: BMI <branch label> ; The program continues execution at the specified branch label if the last result is less than zero. Syntax: BNE <label> ; The program continues execution if the last result is not equal to zero. Syntax: BPL <branch label> ; The program continues execution at the specified branch label if the last result is equal to or greater than zero. BRA Branch absolute Syntax: BRA <branch label> ; Program execution continues at the NC block with the specified branch label. BRF BSE BSR Branch during reference Branch if spindle is empty Branch to NC subroutine Syntax: BRF <branch label> ; Program execution continues at the NC block with the specified branch label if all process axes are referenced (homed). Syntax: BSE <branch label> BSE.SPLE ; The BSE branch command is used to determine whether or not the spindle is empty. Syntax: BSR <branch label> ; Program execution continues at the NC block with the branch label specified in the command parameter. BST Branch with stop Syntax: BST <branch label> ; The NC program branches to the defined label; the default states are set. BTE Branch if tool T0 was programmed Syntax: BTE <branch label> BTE.PRT0 ; Program execution continues at the NC block starting with the defined branch label if tool T0 has been programmed ; ;

376 15-10 Appendix NC Programming Instructions VII. CEV through MMP Function Meaning Description Page CEV D DCD DEV Cancel event monitoring (interrupt) Selecting a D correction *modal Access to D corrections from NC program Deactivate event monitoring (interrupt) Syntax: CEV <event number> ; Active event monitoring (BEV, JEV) is canceled. Syntax: D<D correction number[0..99]> ; D 1-99 Selection of an additive tool geometry shift if G48/G49 or G41/G42 is active. D0 D0 cancels active D correction offsets Syntax: DCD([process],[memory], [value] Syntax: DEV ; Active event monitoring (BEV, JEV) is deactivated. DP Define process Syntax: DP <Process> ; DP informs the PLC via the corresponding gateway signal that the process will be required for NC program execution. E EEV FAX, GAX Tool edge selection *modal Activate event monitoring Axis transfer between the processes Syntax: E<constant> ; The tool edge defined under the constant is preselected as the active tool edge. Syntax: EEV ; Deactivated event monitoring (BEV, JEV) is activated. Syntax: FAX (<axis designation>), GAX (<process>: <axis designation>) ; Free axis for another process ; Get axis from another process. HLT Programmed halt Syntax: HLT ; Interrupts NC program execution; the process waits for a new start signal. JEV JMP JSR Jump if NC event is set (interrupt) Jump to other NC program Call an NC program as a subroutine Syntax: JEV <branch label> <event number> ; NC event monitoring is activated after executing NC command JEV. If the NC event assumes a status of 1, NC program execution continues at the NC block with the defined branch label. Syntax: JMP <program number> or <variable> ; Program execution continues in the defined program. Syntax: JSR <program number> or <variable> ; The specified program is executed as a subroutine. LP Lock process Syntax: LP <process> ; The specified process will be set to a user-defined state. State is set. MEN MFP MHP MMP Enable tool magazine (storage) for manual mode Move free pocket into change position Tool storage to home position Move programmed pocket into position Syntax: MEN ; Enables the manual tool storage mode while continuing NC program execution. Syntax: MFP(<position>,<direction>) { (.,.) optional } or <variable> ; The tool storage axis is moved to the next free pocket. Syntax: MHP(<direction>) { (.) optional } ; Causes the tool storage axis to move to its home position (pocket 1). Syntax: MMP(<position>,<direction>) { (.,.) optional } ; Causes the tool storage axis to move to the pocket specified via the T word

377 NC Programming Instructions Appendix VIII. MOP through RTS Function Meaning Description Page MOP MRF MRY MTD MTP NMP O OTD P PMP POK RAD RDI Move old pocket into position Move tool storage unit to reference position Tool storage ready? Read/write the machine data elements Move programmed tool into position Negative memorized position Select the offset table for G54- G59 Read/write offset table data Active plane rotation together with G50, G51, G54 - G59 Positive memorized position Execution complete Trigonometric unit = radians Maximum rounding distance Syntax: MOP(<position>,<direction>, <spindle>) { (.,., ) optional } ; Causes the tool storage axis to move to the pocket from which the tool was removed. Syntax: MRF ; Initiates the referencing sequence of the tool storage axis. Syntax: MRY ; Stops NC program execution until the active tool storage movement is completed. Syntax: MTD([page No.],[control variable 1], [control variable 2], [element No.]) ; Within an NC block, as many data elements as desired can be read from the machine data, but only one data element can be written at a time. Syntax: MTP(<position>,<direction>) { (.,.) optional } ; Causes the tool storage axis to move to its home position (pocket 1). Syntax: NMP(<axis designation>) ; The NMP function is available only for analog drives. Syntax: O <offset table number> ; Depending on the defined process parameter, offset table 0-9 can be selected. Offset table 0 is active by default Syntax: OTD([NC memory],[process],[offset table], [offset],[axis]) 12-4 Syntax: G50-G51 P<angle> ; Interpolation plane rotation. Becomes active in the next NC block. Syntax: PMP(<axis designation>) ; PMP is possible only with analog drives. Syntax: POK ; POK can be used to define when machining is complete. Syntax: RAD ; Arguments and reciprocal functions of the trigonometric functions SIN, COS, TAN, and ASIN, ACOS, ATAN in the angle unit radians. Syntax: RDI <rounding distance> ; The maximum distance to the programmed data point for the start of the rounding process. RE Reset NC event Syntax: RE <process number>: <event number> ; The defined event is reset via the command parameter and remains reset until it is set by the SE command. RET REV RP RTS Program end with reset Set reverse vector Start reverse program Return from subroutine Syntax: RET ; The NC program jumps to the first NC block, and activates the defaults. Syntax: REV <label> ; The defined label identifies the NC block where NC program execution continues when the reverse NC program is started. Syntax: RP <process> ; The specified process starts the NC program addressed by the reverse vector. Syntax: RTS ; Return to the NC program; the process is continued starting with the following block

378 15-12 Appendix NC Programming Instructions IX. SE through WP Function Meaning Description Page SE Set NC event Syntax: SE <process number>: <event number> ; The defined event is set via the command parameter and remains active until it is reset by the RE command. SP SPC SPF SPT T TCH TG TGSM Program preselection for process Select main spindle for transformation * modal Select main spindle * modal Select tool spindle * modal Tool selection and request Complete tool change Preselect tool group / read active group Define/read tool search mode Syntax: SP <process> <program number> ; The defined NC program is selected for the specified process. Syntax: SPC <spindle number> ; SPC selects the main spindle for transformation. The selection of the main spindle must take place before selecting the transformation. Syntax: SPF <spindle number> ; SPF selects the main spindle for G33, G63/G64, G65, G95 and G96. Syntax: SPT <spindle number> ; SPT selects the tool spindle for tool edge selection E. Syntax: T<constant> or T = <expression> ; Preselects the tool number or location number specified under the constant or contained in the expression. Syntax: TCH(<position>,<spindle>) { (.,.) optional } ; Initiate complete tool change between tool spindle and magazine location. Syntax: TG<constant>, TG=<expression>, <variable>=tg ; Tool group management: A tool group is preselected as a machining group. The active group can be read. Syntax: TGSM<constant>, TGSM=<expression>, <variable>=tgsm ; Tool group management: Tool search mode "TGSM" is defined. This also results in implicit group activation when the T word is specified. The active tool search mode can be read. TID Equipment check Syntax: TID ; Explicit execution of the equipment check: Comparison of the command tool data (setup list) and the actual tool data (tool list) TLD TMS TPE TSE TSM WER WES Access to tool data from the NC program Tool from magazine to spindle Tool pocket empty? Tool spindle empty? Tool from spindle to magazine Wait until NC event is reset Wait until NC event is set Syntax: TLD([process], [addressing], [storage type / tool number], [location / tool duplo number], [tool edge], [data element], [status],[group number], [group duplo number]) Syntax: TMS(<position>,<spindle>) { (.,.) optional } ; Initiate tool transfer (physical / logical) from the magazine pocket in the change position to the selected tool spindle. Syntax: TPE ; If the magazine/turret position that is currently in "Position 1" is not empty, program execution is stopped and an error message is generated. Syntax: TSE ; If the tool location in "Position 1" is not empty, program execution is stopped and an error message is generated. Syntax: TSM(<position>,<spindle>) { (.,.) optional } ; Initiate tool transfer (physical / logical) from the selected tool spindle to the magazine pocket in the change position. Syntax: WER <process number>: <event number> ; Program processing is interrupted until the event is reset. Syntax: WES <process number>: <event number> ; Program processing is interrupted until the event is set. WP Wait for process Syntax: WP <process> ; The block processing is halted until the specified process is completed

379 NC Programming Instructions Appendix File Header The editors that are available in the user interface are not the only means that may be used for creating an NC program. Any other external text editor may also be used for that purpose. Data import The NC programs created in this way can not contain a file header. When these NC programs are read in, the designation, identified with "*", is provided as a new designation. If the NC program does not contain a file header, it can not be checked during import if the file to import is an NC program. During import, the file name is offered as a new designator. Example: %NPG *Progr. No. 1 %NPG The lines of the file header have the following meaning: Code %NPG %MAC %VAR %EVT %DCR %OFT *Designator %NPG %MAC %VAR %EVT %DCR %OFT Meaning Identifies the file as an NC program Identifies the file as an NC cycle Identifies the file as an NC variable file Identifies the file as an NC event file Identifies the file as a D correction file Identifies the file as an offset file Program designator Marks the end of the file header Marks the end of the file header Marks the end of the file header Marks the end of the file header Marks the end of the file header Marks the end of the file header Fig. 15-1: File header for all NC data NC block numbers Cycles Detailed description Externally created NC programs can be imported with or without an NC block number. Renumbering is always implemented internally. An exported NC program always contains NC block numbers. If data is specifically transferred from an NC main program to an NC subroutine with the assistance of variables (@xxx x= 1-9), then these subroutines are called "NC cycles". Further detailed information concerning these functions of the NC cycles can be found in the description "NC cycle description" "DOK-MTC200-CYC*DES*V22-AW01-EN-P".

380 15-14 Appendix NC Programming Instructions Cycle Header Creating Input Menus for Cycles Using an enhanced cycle header enables the user to read cycles into the NC program in a menu-controlled and graphically supported manner. Reading in this context means that the parameters required for the cycle and the request are read from the enhanced cylinder header and are displayed in a data input menu of the MT GUI. The programmer parameterizes the cycle in the data entry page. Once the entry is terminated, the data are entered into the NC program as NC program lines. Default values and input limits can be defined; these are checked in the data entry menu. G89_GER.bmp Fig. 15-2: Entering parameters for the cycle header in the GUI Header ID The enhanced cycle header must be identified as such. This identification consists of a start and an end ID. Start ID syntax End ID syntax %CHBEGIN% Explanation: %CHEND% Explanation: CycleHeaderBEGIN CycleHeaderEND

Rexroth IndraMotion MTX Diagnosis Messages

Rexroth IndraMotion MTX Diagnosis Messages Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth IndraControl VCP 20 Rexroth IndraMotion MTX Diagnosis

More information

Rexroth MTC 200/TRANS 200 NC Screen

Rexroth MTC 200/TRANS 200 NC Screen Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth MTC 200/TRANS 200 NC Screen R911296984 Edition 01 Application

More information

CNC PART PROGRAMMING

CNC PART PROGRAMMING CNC PART PROGRAMMING (1) Programming fundamentals Machining involves an important aspect of relative movement between cutting tool and workpiece. In machine tools this is accomplished by either moving

More information

Rexroth MTC200/TRANS200 Parameter Description

Rexroth MTC200/TRANS200 Parameter Description Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth / Parameter Description 294494 Edition 02 Application

More information

Part Programming Manual MACHINEMATE

Part Programming Manual MACHINEMATE MACHINEMATE NOTE Progress is an ongoing commitment at MACHINEMATE INC. We continually strive to offer the most advanced products in the industry. Therefore, information in this document is subject to change

More information

Lesson 4 Introduction To Programming Words

Lesson 4 Introduction To Programming Words Lesson 4 Introduction To Programming Words All CNC words include a letter address and a numerical value. The letter address identifies the word type. The numerical value (number) specifies the value of

More information

Turning ISO Dialect T

Turning ISO Dialect T SINUMERIK 802D Short Guide 09.2001 Edition Turning ISO Dialect T User Documentation SINUMERIK 802D Turning ISO Dialect T Short Guide 09.2001 Edition Valid for Control Software Version SINUMERIK 802D 1

More information

Rexroth MTC 200 Tool Management

Rexroth MTC 200 Tool Management Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth MTC 200 Tool Management R911296978 Edition 01 Project

More information

Mach4 CNC Controller Mill Programming Guide Version 1.1 Build 3775

Mach4 CNC Controller Mill Programming Guide Version 1.1 Build 3775 Mach4 CNC Controller Mill Programming Guide Version 1.1 Build 3775 Copyright 2014 Newfangled Solutions, Artsoft USA, All Rights Reserved The following are registered trademarks of Microsoft Corporation:

More information

CHAPTER 12. CNC Program Codes. Miscellaneous CNC Program Symbols. D - Tool Diameter Offset Number. E - Select Work Coordinate System.

CHAPTER 12. CNC Program Codes. Miscellaneous CNC Program Symbols. D - Tool Diameter Offset Number. E - Select Work Coordinate System. General CHAPTER 12 CNC Program Codes The next three chapters contain a description of the CNC program codes and parameters supported by the M-Series Control. The M-Series Control has some G codes and parameters

More information

2. INTRODUCTION TO CNC

2. INTRODUCTION TO CNC Q. Define NC Machines. 2. INTRODUCTION TO CNC A method of automation, in which various functions and processing of machine tools are controlled by letters and symbols. The general objective of NC technology

More information

G & M Code REFERENCE MANUAL. Specializing in CNC Automation and Motion Control

G & M Code REFERENCE MANUAL. Specializing in CNC Automation and Motion Control REFERENCE MANUAL Specializing in CNC Automation and Motion Control 2 P a g e 11/8/16 R0163 This manual covers definition and use of G & M codes. Formatting Overview: Menus, options, icons, fields, and

More information

CNC. Compact, 6 axes IndraMotion MTX micro

CNC. Compact, 6 axes IndraMotion MTX micro Compact, 6 axes IndraMotion MTX micro 2 Bosch Rexroth AG Electric Drives and Controls Documentation Broschures Easy startup Software Hardware IndraMotion MTX micro efficiency with a full scope of functions

More information

CNC C6/C64/C64T PROGRAMMING MANUAL (LATHE TYPE) BNP-B2264D(ENG)

CNC C6/C64/C64T PROGRAMMING MANUAL (LATHE TYPE) BNP-B2264D(ENG) CNC C6/C64/C64T PROGRAMMING MANUAL (LATHE TYPE) BNP-B2264D(ENG) MELDAS is a registered trademark of Mitsubishi Electric Corporation. Other company and product names that appear in this manual are trademarks

More information

Mach4 CNC Controller Mill Programming Guide Version 1.0

Mach4 CNC Controller Mill Programming Guide Version 1.0 Mach4 CNC Controller Mill Programming Guide Version 1.0 1 Copyright 2014 Newfangled Solutions, Artsoft USA, All Rights Reserved The following are registered trademarks of Microsoft Corporation: Microsoft,

More information

Conversational Programming for 6000i CNC

Conversational Programming for 6000i CNC Conversational Programming for 6000i CNC www.anilam.com P/N 634 755-22 - Contents Section 1 - Introduction Section 2 - Conversational Mode Programming Hot Keys Programming Hot Keys... 2-1 Editing Keys...

More information

Table of Contents. Table Of Contents. Access to parameters (lesson 2)) 26 Surprised? 26 Key Points for Lesson 1: 26 Quiz 26

Table of Contents. Table Of Contents. Access to parameters (lesson 2)) 26 Surprised? 26 Key Points for Lesson 1: 26 Quiz 26 Preface 9 Why you should buy this book 9 What is parametric programming? 10 A word about CAM systems 10 Scope 10 Versions of Custom Macro 10 Machine types 10 Prerequisites 11 Optional status 11 Lessons

More information

Conversational Programming for 6000M, 5000M CNC

Conversational Programming for 6000M, 5000M CNC Conversational Programming for 6000M, 5000M CNC www.anilam.com P/N 70000486F - Contents Section 1 - Introduction Section 2 - Conversational Mode Programming Hot Keys Programming Hot Keys... 2-1 Editing

More information

HAAS AUTOMATION, INC.

HAAS AUTOMATION, INC. PROGRAMMING WORKBOOK HAAS AUTOMATION, INC. 2800 Sturgis Rd. Oxnard, CA 93030 JUNE 1, 2000 JUNE 2000 PROGRAMMING CONTENTS INTRODUCTION... 1 THE COORDINATE SYSTEM... 2 MACHINE HOME... 5 ABSOLUTE AND INCREMENTAL

More information

ADVANCED TECHNIQUES APPENDIX A

ADVANCED TECHNIQUES APPENDIX A A P CONTENTS þ Anilam þ Bridgeport þ Fanuc þ Yasnac þ Haas þ Fadal þ Okuma P E N D I X A ADVANCED TECHNIQUES APPENDIX A - 1 APPENDIX A - 2 ADVANCED TECHNIQUES ANILAM CODES The following is a list of Machinist

More information

Century Star Turning CNC System. Programming Guide

Century Star Turning CNC System. Programming Guide Century Star Turning CNC System Programming Guide V3.5 April, 2015 Wuhan Huazhong Numerical Control Co., Ltd 2015 Wuhan Huazhong Numerical Control Co., Ltd Preface Preface Organization of documentation

More information

ISO INTERNATIONAL STANDARD

ISO INTERNATIONAL STANDARD INTERNATIONAL STANDARD ISO 6983-1 Second edition 2009-12-15 Automation systems and integration Numerical control of machines Program format and definitions of address words Part 1: Data format for positioning,

More information

Polar coordinate interpolation function G12.1

Polar coordinate interpolation function G12.1 Polar coordinate interpolation function G12.1 On a Turning Center that is equipped with a rotary axis (C-axis), interpolation between the linear axis X and the rotary axis C is possible by use of the G12.1-function.

More information

MELDAS, MELDASMAGIC, and MELSEC are registered trademarks of Mitsubishi Electric Corporation. The other company names and product names are

MELDAS, MELDASMAGIC, and MELSEC are registered trademarks of Mitsubishi Electric Corporation. The other company names and product names are MELDAS, MELDASMAGIC, and MELSEC are registered trademarks of Mitsubishi Electric Corporation. The other company names and product names are trademarks or registered trademarks of the respective companies.

More information

Digital display for EMCO milling machines

Digital display for EMCO milling machines Digital display for EMCO milling machines Input box 7 8 9 1 X Y Z HELP 4 5 6 1 2 3 0. - ESC 3 CE ENT R + R - 2 REF RST 1... Screen (working window, displays) 2... 5 soft keys (function depends on the respective

More information

List of ISO supported G-Codes and M-functions

List of ISO supported G-Codes and M-functions ARISTOTLE G-Codes List of ISO supported G-Codes and M-functions G-code Function G00 Travers motion and positioning G01 Linear interpolation G02 Circular interpolation CW G03 Circular interpolation CCW

More information

Welcome to. the workshop on the CNC 8055 MC

Welcome to. the workshop on the CNC 8055 MC Welcome to the workshop on the CNC 8055 MC Sales Dpt-Training: 2009-sept-25 FAGOR CNC 8055MC seminar 1 Sales Dpt-Training: 2009-sept-25 FAGOR CNC 8055MC seminar 2 This manual is part of the course for

More information

Mach4 CNC Controller Lathe Programming Guide Version 1.0

Mach4 CNC Controller Lathe Programming Guide Version 1.0 Mach4 CNC Controller Lathe Programming Guide Version 1.0 1 Copyright 2014 Newfangled Solutions, Artsoft USA, All Rights Reserved The following are registered trademarks of Microsoft Corporation: Microsoft,

More information

Introduction CAUTION. Details described in this manual

Introduction CAUTION. Details described in this manual Introduction This manual is a guide for using the MELDAS 60/60S Series, MELDASMAGIC64. Programming is described in this manual, so read this manual thoroughly before starting programming. Thoroughly study

More information

COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS

COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS Department of Mechanical Engineering and Aeronautics University of Patras, Greece Dr. Dimitris Mourtzis Associate professor Patras, 2017 1/52 Chapter 8: Two

More information

Rexroth MTC200/ISP200/TRANS200 MTGUI User Interface

Rexroth MTC200/ISP200/TRANS200 MTGUI User Interface Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth MTC200/ISP200/TRANS200 MTGUI User Interface 298459 Edition

More information

Operating Manual. CNC Programming. XCx and ProNumeric. CNC Programming Version 03/15 Article No. R ( )

Operating Manual. CNC Programming. XCx and ProNumeric. CNC Programming Version 03/15 Article No. R ( ) Operating Manual CNC Programming XCx and ProNumeric CNC Programming Version 03/15 Article No. R4.322.2080.0 (322 381 62) Target Group These programming instructions have been written for trained personnel

More information

General technology basics. Working through this module you become familiar with the most important technological aspects and machine functions.

General technology basics. Working through this module you become familiar with the most important technological aspects and machine functions. M551 General technology basics 1 Brief description Objective of the module: Working through this module you become familiar with the most important technological aspects and machine functions. Description

More information

Section 20: Graphics

Section 20: Graphics Section 20: Graphics CNC 88HS Graphics Graphics Menu The graphics menu of the page editor has been designed to allow the user to view the part path of the current program in memory. The graphics can be

More information

GE FANUC 21 CONCEPT 55 MILL ATC TEACHER GUIDE

GE FANUC 21 CONCEPT 55 MILL ATC TEACHER GUIDE GE FANUC 21 CONCEPT 55 MILL ATC TEACHER GUIDE 11/1/07 Version 2 Made by EMCO Authored by Chad Hawk Training Index Control Keyboard Pg 1 Fanuc 21 Control Machine Control Fanuc 21 Screen. Pg 2 Fanuc 21 Keys.

More information

Rexroth IndraMotion MLC CamBuilder

Rexroth IndraMotion MLC CamBuilder Electric Drives and Controls Hydraulics Linear Motion and Assembly Technologies Rexroth IndraMotion MLC CamBuilder Functional Description Pneumatics Service R911313193 Edition 01 About this Documentation

More information

List of Macro Variables

List of Macro Variables APPENDIX C List of Macro Variables Variable Purpose Page #0 Null variable 22 #1 #33 Local variables 28 #34 #99 Not available 28 #100 #199 Common variables 28 #200 #499 Not available 28 #500 #999 Permanent

More information

MTC200/ISP200/TRANS200 Setup. Application Manual SYSTEM200 DOK-CONTRL-SETUP***V22-AW02-EN-P

MTC200/ISP200/TRANS200 Setup. Application Manual SYSTEM200 DOK-CONTRL-SETUP***V22-AW02-EN-P MTC200/ISP200/TRANS200 Setup Application Manual SYSTEM200 About this Documentation Setup Title Type of Documentation MTC200/ISP200/TRANS200 Setup Application Manual Document Typecode Internal File Reference

More information

User s Manual V MillPlus IT. NC Software

User s Manual V MillPlus IT. NC Software User s Manual V600-02 MillPlus IT NC Software 538 952-02 538 953-02 538 954-02 538 955-02 538 956-02 English (en) 6/2008 Controls on the visual display unit Select window User keys Manual operation Axis-direction

More information

9000 CNC 9000 CNC: THE NEW STANDARD OF CONTROL. INTUITIVE EFFICIENT PRODUCTIVE

9000 CNC 9000 CNC: THE NEW STANDARD OF CONTROL. INTUITIVE EFFICIENT PRODUCTIVE 3D Solid Model Graphics Solid Model with Tool Path Overlay 9000 CNC 9000 CNC: THE NEW STANDARD OF CONTROL. At Milltronics we are constantly refining our controls to simplify operation, shorten setup times

More information

TopMill TopTurn. Jobshop Programming & Simulation for Multi-Side & Complete Mill-Turn Machining for every CNC Control

TopMill TopTurn. Jobshop Programming & Simulation for Multi-Side & Complete Mill-Turn Machining for every CNC Control MEKAMS MillTurnSim TopCAM TopCAT Jobshop Programming & Simulation for Multi-Side & Complete Mill-Turn Machining for every CNC Control 2 Jobshop Programming for Multi-Side and Complete Mill-Turn Machining

More information

PROGRAMMING MANUAL. for. ALL MAZATROL TURNING CNC (including T-Plus) MAZATROL FUSION 640T NEXUS. Programming EIA/ISO. Serial No. :

PROGRAMMING MANUAL. for. ALL MAZATROL TURNING CNC (including T-Plus) MAZATROL FUSION 640T NEXUS. Programming EIA/ISO. Serial No. : PROGRAMMING MANUAL for ALL MAZATROL TURNING CNC (including T-Plus) MAZATROL FUSION 640T NEXUS Programming EIA/ISO MANUAL No. : C734PBT018E Serial No. : Before using this machine and equipment, fully understand

More information

Programming Features PERFORMANCE & SPECIFICATIONS

Programming Features PERFORMANCE & SPECIFICATIONS PERFORMANCE & SPECIFICATIONS Essentials Processor Intel Pentium Instruction Set 32-bit Performance Number of Cores 1 Processor Base Frequency 1.8 GHz Memory Data Storage 1 GB System Memory Installed 2

More information

Introduction. The following documents are available as documents related to the contents of this manual. Refer to these as required.

Introduction. The following documents are available as documents related to the contents of this manual. Refer to these as required. Introduction This manual describes the DDB (Direct Data Bus) function used to realize data input/output with a CNC while running a program developed with a EZMotion-NC E60/E68 user PLC (ladder language).

More information

ACR-MotionMax Programmer's Reference Manual

ACR-MotionMax Programmer's Reference Manual ACR-MotionMax Programmer's Reference Manual Programmer's Reference Manual Programming Information - 1 User Information ACR Series products are used to control electrical and mechanical components of motion

More information

CNC 8055 T. Error solution. Ref.1705

CNC 8055 T. Error solution. Ref.1705 CNC 8055 T Error solution All rights reserved. No part of this documentation may be transmitted, transcribed, stored in a backup device or translated into another language without Fagor Automation s consent.

More information

NCT. PLC Programmer s Manual. Machine Tool Controls. From SW Version x.061 (M) (L)

NCT. PLC Programmer s Manual. Machine Tool Controls. From SW Version x.061 (M) (L) NCT Machine Tool Controls PLC Programmer s Manual From SW Version x.061 (M) (L) Produced and developed by NCT Automation kft. H1148 Budapest Fogarasi út 7 : Letters: 1631 Bp. P.O. Box 26 F Phone: (+36

More information

FAGOR AUTOMATION MC TRAINING MANUAL

FAGOR AUTOMATION MC TRAINING MANUAL FAGOR AUTOMATION MC TRAINING MANUAL ACER MC TRAINING MANUAL 8 holes 1/2" depth grid pattern R0.125 1.5 6 unit: inch R0.25 4 1.25 2 2.675 1/2" depth rectangular pocket 1/2" depth circular pocket R0.75 8

More information

TF5xxx TwinCAT 3 Motion Control

TF5xxx TwinCAT 3 Motion Control TF5xxx Motion Control TC3 NC PTP 10 Axes TC3 NC PTP Axes Pack 25 TC3 NC PTP Axes Pack unlimited Technical data TF5000-00pp TF5010-00pp TF5020-00pp TC3 NC PTP 10 Axes implements Motion Control for pointto-point

More information

MAX CONTROL FOR TURNING CENTERS

MAX CONTROL FOR TURNING CENTERS MAX CONTROL FOR TURNING CENTERS Preliminary NC Programming Manual March 2005 PRE 704-0115-301, B Revision B The information in this document is subject to change without notice and does not represent a

More information

CNC C6/C64/C64T DDB INTERFACE MANUAL

CNC C6/C64/C64T DDB INTERFACE MANUAL CNC C6/C64/C64T DDB INTERFACE MANUAL BNP-B2312A(ENG) MELDAS and MELSEC are registered trademarks of Mitsubishi Electric Corporation. The other company names and product names are trademarks or registered

More information

SINUMERIK SINUMERIK 808D ADVANCED Programming and Operating Manual (ISO Turning/Milling) User Manual

SINUMERIK SINUMERIK 808D ADVANCED Programming and Operating Manual (ISO Turning/Milling) User Manual SINUMERIK SINUMERIK 808D ADVANCED User Manual Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage

More information

Manufacturing Processes with the Aid of CAD/CAM Systems AMEM 405

Manufacturing Processes with the Aid of CAD/CAM Systems AMEM 405 AMEM 405 slide 1 Manufacturing Processes with the Aid of CAD/CAM Systems AMEM 405 Dr. Sotiris Omirou AMEM 405 slide 2 CONTENTS 1. CAD/CAM definition 2. Review of Milling Process 3. Know The CNC Machine

More information

SINUMERIK 808D SINUMERIK 808D, SINUMERIK 808D ADVANCED Programming and Operating Manual (ISO Turning/Milling) User Manual

SINUMERIK 808D SINUMERIK 808D, SINUMERIK 808D ADVANCED Programming and Operating Manual (ISO Turning/Milling) User Manual SINUMERIK 808D SINUMERIK 808D, SINUMERIK 808D ADVANCED User Manual Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well

More information

GE FANUC 21 CONCEPT 55 TURN TEACHER GUIDE

GE FANUC 21 CONCEPT 55 TURN TEACHER GUIDE GE FANUC 21 CONCEPT 55 TURN TEACHER GUIDE 2/13/08 Version 2 Made by EMCO Authored by Chad Hawk Training Index Control Keyboard Pg 1 Fanuc 21 Control Machine Control Fanuc 21 Screen Pg 2 Fanuc 21 Keys Pg

More information

NOTE This function is optional.

NOTE This function is optional. 5.AUTOMATIC OPERATION B-63943EN-1/03 5.8 RETRACE M Overview The tool can retrace the path along which the tool has moved so far (reverse execution). Furthermore, the tool can move along the retraced path

More information

6000i CNC User s Manual

6000i CNC User s Manual 6000i CNC User s Manual January 2008 Ve 02 627785-21 1/2008 VPS Printed in USA Subject to change without notice www.anilam.com P/N 627785-21 - Warranty Warranty ANILAM warrants its products to be free

More information

Our thanks go to: Puppy Linux, RTAI, EMC, axis, all the kernel developers and big mama thornton.

Our thanks go to: Puppy Linux, RTAI, EMC, axis, all the kernel developers and big mama thornton. CoolCNC Linux First Steps This manual is a step by step introduction for the installation of the CoolCNC Linux Live CD. Its intent is to lead to a better understanding of the current processes. This document

More information

DIFFERENCES FROM SERIES 0i-C

DIFFERENCES FROM SERIES 0i-C B DIFFERENCES FROM SERIES 0i-C Appendix B, "Differences from Series 0i-C", consists of the following sections: B.1 SETTING UNIT...247 B.2 AUTOMATIC TOOL OFFSET...247 B.3 CIRCULAR INTERPOLATION...249 B.4

More information

CNC 8055 M. Error solution. Ref.1705

CNC 8055 M. Error solution. Ref.1705 CNC 8055 M Error solution All rights reserved. No part of this documentation may be transmitted, transcribed, stored in a backup device or translated into another language without Fagor Automation s consent.

More information

Wizard 1000 REFERENCE MANUAL

Wizard 1000 REFERENCE MANUAL Wizard 1000 REFERENCE MANUAL W1000 Key Layout Display Area Axis Keys Numeric Keypad Clear key Soft keys Enter key Power Indicator light Arrow keys - Up/ Down arrow keys are also used to adjust the screen

More information

GE Fanuc Automation. Series 16i / 18i / 21i Model TA Manual Guide. Computer Numerical Control Products. Operator's Manual

GE Fanuc Automation. Series 16i / 18i / 21i Model TA Manual Guide. Computer Numerical Control Products. Operator's Manual GE Fanuc Automation Computer Numerical Control Products Series 16i / 18i / 21i Model TA Manual Guide Operator's Manual B-63344EN/01 July 1998 Warnings, Cautions, and Notes as Used in this Publication GFL-001

More information

COPYCAT NEW FANGLED SOLUTIONS 2/6/2009

COPYCAT NEW FANGLED SOLUTIONS 2/6/2009 1.0 INTRODUCTION 1.1 CopyCat is a unique wizard used with MACH3. It is not a stand alone program. This wizard will allow you to jog a machine around and create a Gcode file from the movement. 2.0 REQUIREMENTS

More information

SINUMERIK 802D. Turning. User Documentation

SINUMERIK 802D. Turning. User Documentation SINUMERIK 802D Brief Instructions Turning 11.2000 Edition User Documentation SINUMERIK 802D Turning Valid for Control Software version SINUMERIK 802D 1 11.2000 Edition SINUMERIK documentation Printing

More information

Conversational Programming for 6000M, 5000M CNC

Conversational Programming for 6000M, 5000M CNC Conversational Programming for 6000M, 5000M CNC www.anilam.com P/N 70000486E - Warranty Warranty ANILAM warrants its products to be free from defects in material and workmanship for one (1) year from date

More information

Xbox gamepad CNC pendant user manual

Xbox gamepad CNC pendant user manual Patrik Tegelberg 2017-09-04 Xbox gamepad CNC pendant user manual Computer controlled manufacturing machines are awesome, and not designed for manual cutting. This controller, for LinuxCNC, maintains the

More information

3000M CNC Programming and Operations Manual for Two-Axis Systems

3000M CNC Programming and Operations Manual for Two-Axis Systems 3000M CNC Programming and Operations Manual for Two-Axis Systems www.anilam.com P/N 70000496G - Contents Section 1 - CNC Programming Concepts Programs... 1-1 Axis Descriptions... 1-1 X Axis... 1-2 Y Axis...

More information

Conversational Programming for 6000i CNC

Conversational Programming for 6000i CNC Conversational Programming for 6000i CNC January 2008 Ve 01 634755-21 1/2008 VPS Printed in USA Subject to change without notice www.anilam.com P/N 634755-21 - Warranty Warranty ANILAM warrants its products

More information

SINUMERIK 810D / 840D SHOPTURN. A. Grözinger: Demo Workpiece

SINUMERIK 810D / 840D SHOPTURN. A. Grözinger: Demo Workpiece SINUMERIK 810D / 840D SHOPTURN A. Grözinger: Demo Workpiece ABOUT THE CONTENT... 2 PURPOSE OF THIS DOCUMENTATION... 2 PLEASE NOTICE... 2 LEGEND... 3 DESCRIPTION OF KEYS... 3 DRAWING... 4 Finish Part...

More information

Release notes for the technology cycles (standard cycles) SW version

Release notes for the technology cycles (standard cycles) SW version Release notes SW version 06.05.13.00 Software component: Drilling / milling / turning cycles for 810D, 840Di and 840D New software version: SW 06.05.13.00 Previous software version: SW 06.04.21 + patch

More information

NcStudio Programming Manual

NcStudio Programming Manual NcStudio Programming Manual 6th Edition Weihong Electronic Technology Co., Ltd. The copyright of this manual belongs to Weihong Electronic Technology Co., Ltd. (hereinafter referred to as Weihong Company).

More information

Preface. GSK983Ma User Manual divides into three parts, that is, Programming, Operation and Appendix.

Preface. GSK983Ma User Manual divides into three parts, that is, Programming, Operation and Appendix. This user manual describes all proceedings concerning the operations of this CNC system in detail as much as possible. However, it is impractical to give particular descriptions for all unnecessary or

More information

Series 0ί -MD Mate CNC STANDARD FEATURES

Series 0ί -MD Mate CNC STANDARD FEATURES STANDARD FEATURES Axis Control Digital Servo Function 1 Controlled Path Simultaneously controlled axes: Up to maximum of 3 Serial Encoder Interface Axis Name Selected from X,Y,Z and U,V,W,A,B,C Spindle

More information

Training Document for Integrated Automation Solutions Totally Integrated Automation (TIA) Module S02. CNC Programming with ShopTurn

Training Document for Integrated Automation Solutions Totally Integrated Automation (TIA) Module S02. CNC Programming with ShopTurn Training Document for Integrated Automation Solutions Totally Integrated Automation (TIA) Module S02 CNC Programming Turning ShopTurn T I A Training Document Page 1 of 191 Module S02 This document was

More information

SINUMERIK 802D. Brief Instructions Edition. Milling. User Documentation

SINUMERIK 802D. Brief Instructions Edition. Milling. User Documentation SINUMERIK 802D Brief Instructions Milling 11.2000 Edition User Documentation SINUMERIK 802D Milling Valid for Control Software version SINUMERIK 802D 1 11.2000 Edition SINUMERIK documentation Printing

More information

SINUMERIK SINUMERIK 808D ADVANCED Programming and Operating Manual (Milling) User Manual

SINUMERIK SINUMERIK 808D ADVANCED Programming and Operating Manual (Milling) User Manual SINUMERIK SINUMERIK 808D ADVANCED User Manual Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage

More information

Yaskawa Siemens CNC Series

Yaskawa Siemens CNC Series Yaskawa Siemens CNC Series Programming Manual for Lathe MANUAL No. NCSIE-SP02-21 Yaskawa Siemens Numerical Controls Corp. has been merged to Siemens K.K. and Siemens Japan K.K. as of August, 2010 respectively.

More information

SINUMERIK SINUMERIK 808D ADVANCED Programming and Operating Manual (Milling) User Manual

SINUMERIK SINUMERIK 808D ADVANCED Programming and Operating Manual (Milling) User Manual SINUMERIK SINUMERIK 808D ADVANCED User Manual Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage

More information

Mach4 Lathe G-Code and M-Code Reference

Mach4 Lathe G-Code and M-Code Reference Mach4 Lathe G-Code and M-Code Reference Chapter 1: Introduction G-Code is a special programming language that is interpreted by Computer Numerical Control (CNC) machines to create motion and other tasks.

More information

Rexroth IndraMotion MTX Standard NC Operation

Rexroth IndraMotion MTX Standard NC Operation Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth IndraControl VCP 20 Rexroth IndraMotion MTX Standard NC

More information

Rexroth MLC Tech-FB for Packaging Applications

Rexroth MLC Tech-FB for Packaging Applications Electric Drives Linear Motion and Hydraulics Assembly Technologies Pneumatics Service Rexroth MLC Tech-FB for Packaging Applications R911321344 Edition 01 Application Manual Bosch Rexroth AG Electric Drives

More information

CNC. Modular, 64 axes IndraMotion MTX performance, IndraMotion MTX advanced

CNC. Modular, 64 axes IndraMotion MTX performance, IndraMotion MTX advanced Modular, 64 axes IndraMotion MTX performance, IndraMotion 2 Bosch Rexroth AG Electric Drives and Controls Documentation Broschures Software IndraMotion MTX performance & advanced the high-performance controls

More information

MELDASMAGIC MMI OPERATION MANUAL (FOR L/G) BNP-B2194 (ENG)

MELDASMAGIC MMI OPERATION MANUAL (FOR L/G) BNP-B2194 (ENG) MELDASMAGIC MMI OPERATION MANUAL (FOR L/G) BNP-B2194 (ENG) MELDASMAGIC is a registered trademark of Mitsubishi Electric Corporation. Microsoft and Windows are registered trademarks of Microsoft Corporation.

More information

Introduction to Word Address Programming

Introduction to Word Address Programming Chapter 1 Introduction to Word Address Programming 1.1 Objectives After completion of this chapter the reader will be able to: 1. Understand the meaning of common terminology associated with writing a

More information

4.10 INVOLUTE INTERPOLATION (G02.2, G03.2)

4.10 INVOLUTE INTERPOLATION (G02.2, G03.2) B 63014EN/02 POGAMMNG 4. NTEPOLATON FUNCTONS 4.10 NVOLUTE NTEPOLATON (G02.2, G03.2) nvolute curve machining can be performed by using involute interpolation. nvolute interpolation ensures continuous pulse

More information

ND 7000 Demo. User s Manual. Digital Readout

ND 7000 Demo. User s Manual. Digital Readout ND 7000 Demo User s Manual Digital Readout English (en) 11/2018 Contents Contents 1 Fundamentals...7 2 Software installation...11 3 Basic operation... 17 4 Software configuration... 43 5 Milling Quick

More information

Tutorial: Basic G Code Programming By: Matthew Jourden Brighton High School Brighton, MI

Tutorial: Basic G Code Programming By: Matthew Jourden Brighton High School Brighton, MI Tutorial: Basic G Code Programming By: Matthew Jourden Brighton High School Brighton, MI Reference: Coordinate Axis Direction Z Y X Tutorial is designed to create a wireframe model of a part. This tutorial

More information

GE Fanuc Automation. Computer Numerical Control Products. Series 15i/150i-Model A Programming Manual (Macro Compiler/Macro Executor)

GE Fanuc Automation. Computer Numerical Control Products. Series 15i/150i-Model A Programming Manual (Macro Compiler/Macro Executor) GE Fanuc Automation Computer Numerical Control Products Series 15i/150i-Model A Programming Manual (Macro Compiler/Macro Executor) GFZ-63323EN-2/01 November 2000 Warnings, Cautions, and Notes as Used in

More information

Fixed Headstock Type CNC Automatic Lathe

Fixed Headstock Type CNC Automatic Lathe Fixed Headstock Type CNC Automatic Lathe MSY Configured with two spindles and one turret and equipped with a Y axis and X2 axis, the BNA42MSY is able to handle complex machining, with short cycle times

More information

CNC 8055 MC EXAMPLES MANUAL REF Ref. 0601

CNC 8055 MC EXAMPLES MANUAL REF Ref. 0601 EXAMPLES MANUAL Ref. 0601 All rights reserved. No part of this documentation may be copied, transcribed, stored in a data backup system or translated into any language without Fagor Automation's explicit

More information

Software designed to work seamlessly with your CNC Masters machine. Made to work with Windows PC. Works with standard USB

Software designed to work seamlessly with your CNC Masters machine. Made to work with Windows PC. Works with standard USB Software designed to work seamlessly with your CNC Masters machine Made to work with Windows PC Works with standard USB Clutter free interface. The software is engineered for the machine so you don t have

More information

PROGRAMMING WORKBOOK HAAS AUTOMATION, INC 2800 Sturgis Rd Oxnard, CA 93030 January 2004 JANUARY 2004 PROGRAMMING HAAS AUTOMATION INC 2800 Sturgis Road Oxnard, California 93030 Phone: 805-278-1800 www

More information

Prof. Steven S. Saliterman Introductory Medical Device Prototyping

Prof. Steven S. Saliterman Introductory Medical Device Prototyping Introductory Medical Device Prototyping Department of Biomedical Engineering, University of Minnesota http://saliterman.umn.edu/ Images courtesy of Haas You must complete safety instruction before using

More information

CNC 8055 T. New features. Ref.1710 Soft: V02.3x

CNC 8055 T. New features. Ref.1710 Soft: V02.3x CNC 8055 T New features Ref.1710 Soft: V02.3x DUAL-USE PRODUCTS Products manufactured by FAGOR AUTOMATION since April 1st 2014 will include "-MDU" in their identification if they are included on the list

More information

Rexroth MTC200 Machine Data Management

Rexroth MTC200 Machine Data Management Industrial Hydraulics Electric Drives and Controls Linear Motion and Assembly Technologies Pneumatics Service Automation Mobile Hydraulics Rexroth MTC200 Machine Data Management 293082 Edition 02 Application

More information

Training Guide Machines

Training Guide Machines Training Guide Machines i 2013, Missler Software. 7, Rue du Bois Sauvage F-91055 Evry, FRANCE Web: www.topsolid.com E-mail: info@topsolid.com All rights reserved. TopSolid Cam Machines This information

More information

SINUMERIK SINUMERIK 808D, SINUMERIK 808D ADVANCED Programming and Operating Manual (Milling) User Manual

SINUMERIK SINUMERIK 808D, SINUMERIK 808D ADVANCED Programming and Operating Manual (Milling) User Manual SINUMERIK SINUMERIK 808D, SINUMERIK 808D ADVANCED User Manual Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as

More information

G47 Text Engraving (Group 00) - Mill. Troubleshooting. How it Works. Haas Technical Documentation. Setting 85 is Too High for Shallow Text Engraving

G47 Text Engraving (Group 00) - Mill. Troubleshooting. How it Works. Haas Technical Documentation. Setting 85 is Too High for Shallow Text Engraving Haas Technical Documentation G47 Text Engraving (Group 00) - Mill Scan code to get the latest version of this document Translation Available Troubleshooting Setting 85 is Too High for Shallow Text Engraving

More information

Operating Instructions POSITIP 880

Operating Instructions POSITIP 880 Operating Instructions POSITIP 880 English (en) 12/2008 POSITIP 880 Back View Axis ports Edge finder Ground Power button Parallel port Auxiliary Machine Interface connector Serial port Main power input

More information

SINUMERIK 840C/840 Cycles

SINUMERIK 840C/840 Cycles SINUMERIK 840C/840 Cycles Programming Guide 08.96 Edition User Documentation SINUMERIK 840C/840 Cycles Programming Guide User Guide Valid for: Control Software version SINUMERIK 840C 1, 2, 3, 4, 5 SINUMERIK

More information