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

Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

  • Upload
    lythien

  • View
    228

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

R911296998Edition 01

Rexroth MTC 200NC Programming Instructions

Application Manual

IndustrialHydraulics

Electric Drivesand Controls

Linear Motion andAssembly Technologies Pneumatics

ServiceAutomation

MobileHydraulics

Page 2: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

About this Documentation NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Rexroth MTC 200

NC Programming Instructions

Application Manual

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Document Number, 120-1701-B303-01/EN

This documentation describes the programming of NC functions ofMTC 200 controller family.

Description ReleaseDate

Notes

Document Number, 120-1701-B303-01/EN 02/2004 Valid from Version 23

2004. Bosch Rexroth AG

Copying this document, giving it to others and the use or communicationof the contents thereof without express authority, are forbidden. Offendersare liable for the payment of damages. All rights are reserved in the eventof the grant of a patent or the registration of a utility model or design(DIN 34-1).

The specified data is for product description purposes only and may notbe deemed to be guaranteed unless expressly confirmed in the contract.All rights are reserved with respect to the content of this documentationand the availability of the product.

Bosch Rexroth AGBgm.-Dr.-Nebel-Str. 2 • D-97816 Lohr a. Main

Telephone +49 (0)93 52/40-0 • Tx 68 94 21 • Fax +49 (0)93 52/40-48 85

http://www.boschrexroth.de/

Dept. BRC/ESM3 (GeVa, JoLi)

Dept. BRC/ESM6 (DiHa)

This document has been printed on chlorine-free bleached paper.

Title

Type of Documentation

Document Typecode

Internal File Reference

Purpose of Documentation

Record of Revisions

Copyright

Validity

Published by

Note

Page 3: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Contents I

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Contents

1 General Information 1-1

1.1 Notes............................................................................................................................................. 1-1

1.2 Program and Data Organization ................................................................................................... 1-2

2 NC Program 2-1

2.1 Organization of Setup Lists........................................................................................................... 2-1

2.2 Program Structure ........................................................................................................................ 2-2

Advance Program.................................................................................................................... 2-3

Reverse Program .................................................................................................................... 2-3

2.3 Process-Specific Programming .................................................................................................... 2-4

2.4 Elements of an NC Block.............................................................................................................. 2-5

Block Numbers ........................................................................................................................ 2-5

Skipping Blocks ....................................................................................................................... 2-6

2.5 NC Word ....................................................................................................................................... 2-7

Branch Label............................................................................................................................ 2-8

Note ......................................................................................................................................... 2-8

Comment ................................................................................................................................. 2-9

Comment in the Source Program............................................................................................ 2-9

2.6 Available Addresses ................................................................................................................... 2-10

3 Motion Commands, Dimension Inputs 3-1

3.1 Coordinate system........................................................................................................................ 3-1

3.2 Motion commands ........................................................................................................................ 3-2

3.3 Measurements .............................................................................................................................. 3-3

Absolute Dimension Entry "G90"............................................................................................. 3-3

Incremental Dimensions "G91"................................................................................................ 3-4

3.4 Offsets .......................................................................................................................................... 3-5

3.5 Zero offsets................................................................................................................................... 3-7

Adjustable Zero Offsets "G54 - G59"....................................................................................... 3-9

Coordinate Rotation with Angle of Rotation "P" .................................................................... 3-10

Zero Offset Tables "O"........................................................................................................... 3-11

Programmable Absolute Zero Offset "G50", Programmable Incremental Zero Offset"G51" ..................................................................................................................................... 3-13

Programmable Zero Point of Workpiece "G52"..................................................................... 3-14

Cancel Zero Offsets "G53" .................................................................................................... 3-15

Adjustable General Offset in the Zero Offset Table .............................................................. 3-15

Read/Write Zero Offset Data from the NC Program via "OTD"............................................. 3-15

3.6 Level selection ............................................................................................................................ 3-16

Axis Number, Axis Designation and Axis Meaning ............................................................... 3-16

Page 4: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

II Contents NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Plane Selection "G17", "G18", "G19" .................................................................................... 3-17

Free Plane Selection "G20", "G21", "G22" ............................................................................ 3-18

Boundary conditions .............................................................................................................. 3-20

Effects.................................................................................................................................... 3-20

3.7 Radius/Diameter Programming "G15" / "G16" ........................................................................... 3-24

3.8 Measurement units ..................................................................................................................... 3-25

Measurement Unit Inch "G70" ............................................................................................... 3-25

Unit Millimeters "G71"............................................................................................................ 3-26

3.9 Mirror Imaging of Coordinate Axes "G72" / "G73" ...................................................................... 3-27

3.10 Scaling "G78" / "G79" ................................................................................................................. 3-29

3.11 Go to Axes Reference Point "G74"............................................................................................. 3-31

3.12 Feed to positive stop................................................................................................................... 3-31

Feed to Positive Stop "G75" .................................................................................................. 3-32

Cancel All Axis Preloads "G76" ............................................................................................. 3-34

3.13 Traverse Range Limits................................................................................................................ 3-34

3.14 Repositioning and NC block restart to the contour..................................................................... 3-36

Reposition and restart in the automatic operating modes..................................................... 3-36

Repositioning and Restarting to Destination Position "G77"................................................. 3-37

3.15 NC Program Restart with "ADJUST" and "REPOS"................................................................... 3-38

Programming ......................................................................................................................... 3-38

Special NC-Specific Features in NC Program Restart .......................................................... 3-40

3.16 Adaptive Depth "G68" / "G69" .................................................................................................... 3-43

Application ............................................................................................................................. 3-43

New Axis Parameter.............................................................................................................. 3-43

G Codes to Switch to a 2nd Encoder System......................................................................... 3-44

4 Motion Blocks 4-1

4.1 Axes .............................................................................................................................................. 4-1

Linear main axes ..................................................................................................................... 4-1

Rotary Main Axes .................................................................................................................... 4-1

Linear and Rotary Auxiliary Axes ............................................................................................ 4-2

4.2 Interpolation conditions................................................................................................................. 4-2

Following Error-Free Interpolation "G06"................................................................................. 4-2

Interpolation with Lag Distance "G07"..................................................................................... 4-5

Optimal Speed Block Transition "G08".................................................................................... 4-8

Velocity-Limited Block Transition "G09" ................................................................................ 4-10

Exact Stop "G61" ................................................................................................................... 4-12

Rapid NC Block Transition "G62" .......................................................................................... 4-14

Programmable Acceleration "ACC"....................................................................................... 4-16

4.3 Interpolation functions................................................................................................................. 4-18

Linear Interpolation, Rapid Traverse "G00"........................................................................... 4-18

Linear Interpolation, Feed "G01" ........................................................................................... 4-19

Circular Interpolation "G02" / "G03"....................................................................................... 4-20

Helical Interpolation ............................................................................................................... 4-26

Thread Cutting "G33"............................................................................................................. 4-28

Thread Sequences with "G33" .............................................................................................. 4-32

Page 5: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Contents III

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tapping without Compensating Chuck "G63" / "G64"........................................................... 4-34

Tapping "G64" - Speed Reduction ........................................................................................ 4-37

Tapping "G65" - Spindle as Lead Axis .................................................................................. 4-38

4.4 feed............................................................................................................................................. 4-40

F Word................................................................................................................................... 4-40

Time Programming "G93"...................................................................................................... 4-41

Velocity Programming "G94" ................................................................................................. 4-42

Feed Rate per Spindle Revolution "G95" .............................................................................. 4-42

Dwell Time "G04"................................................................................................................... 4-43

Basic Connections between Programmed Path Velocity (F) and Axis Velocities ................. 4-44

Feed Limitation ...................................................................................................................... 4-46

Adaptive Feed Control "G25" / "G26" ................................................................................... 4-47

4.5 Spindle speed ............................................................................................................................. 4-52

S Word for the Spindle Speed Specification ......................................................................... 4-52

Select Main Spindle "SPF" .................................................................................................... 4-53

Constant Grinding Wheel Peripheral Speed (SUG) "G66".................................................... 4-55

Constant Surface Speed "G96" ............................................................................................. 4-56

Spindle Speed Limitation"G92" ............................................................................................. 4-57

Additional Spindle Speed Limitations .................................................................................... 4-58

Spindle Speed in RPM "G97" ................................................................................................ 4-59

4.6 Rotary Axis Programming........................................................................................................... 4-60

Effective Radii "RX", "RY", "RZ" ............................................................................................ 4-60

NC Program Changeover between Spindle and C Axis........................................................ 4-61

Start-up Logic for Endlessly Rotating Rotary Axes ............................................................... 4-61

4.7 Transformations.......................................................................................................................... 4-63

Transformation Functions...................................................................................................... 4-63

Select Face Machining "G31"................................................................................................ 4-63

Selection of Lateral Cylinder Surface Machining "G32" ........................................................ 4-67

Deselection of Transformation "G30" .................................................................................... 4-70

Select Main Spindle for Transformation "SPC" ..................................................................... 4-70

4.8 Main Spindle Synchronization .................................................................................................... 4-71

Use of Main Spindle Synchronization.................................................................................... 4-71

Functions of Main Spindle Synchronization .......................................................................... 4-71

Permissible Configurations.................................................................................................... 4-72

Sequence of a Synchronization Operation............................................................................ 4-73

NC programming ................................................................................................................... 4-74

Machine Data for Main Spindle Synchronization................................................................... 4-74

4.9 Follower and Gantry axes........................................................................................................... 4-75

Applications of Follower and Gantry Axes............................................................................. 4-75

Permissible Configurations.................................................................................................... 4-76

Steps of a Follower Operation ............................................................................................... 4-76

Auxiliary Functions for Synchronized Operation ................................................................... 4-76

NC Programming................................................................................................................... 4-77

Machine Data for Synchronized Axis Groups........................................................................ 4-77

4.10 Rounding of NC Blocks with Axis Filter "G11" / "RDI" ................................................................ 4-78

Method of Operation.............................................................................................................. 4-78

Page 6: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

IV Contents NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Programming ......................................................................................................................... 4-79

Limits and Special Regulations ............................................................................................. 4-80

4.11 Test Mode................................................................................................................................... 4-81

Purpose ................................................................................................................................. 4-81

Suppress Auxiliary Function Output ...................................................................................... 4-81

Lock Axis and Spindles ......................................................................................................... 4-81

Test Feed............................................................................................................................... 4-82

Rapid Run.............................................................................................................................. 4-83

Online Simulation................................................................................................................... 4-83

Suppress Tool Transfer and Movements .............................................................................. 4-83

5 Tool Compensation 5-1

5.1 Setup Lists and Tool Lists............................................................................................................. 5-1

Setup List................................................................................................................................. 5-1

Tool List ................................................................................................................................... 5-2

Current Tool List ...................................................................................................................... 5-2

Equipment Check .................................................................................................................... 5-2

Operation without Setup List ................................................................................................... 5-4

5.2 Elements of the Tool Data Record ............................................................................................... 5-5

Overview.................................................................................................................................. 5-5

5.3 Basic Tool Data ............................................................................................................................ 5-6

Tool Identification..................................................................................................................... 5-7

Location Data......................................................................................................................... 5-30

Units....................................................................................................................................... 5-33

Technology Data.................................................................................................................... 5-33

User Tool Data....................................................................................................................... 5-34

Tool Group Data .................................................................................................................... 5-35

Other User Tool Data ............................................................................................................ 5-42

5.4 Tool Edge Data........................................................................................................................... 5-42

Tool Edge Identification ......................................................................................................... 5-44

Tool Life Data ........................................................................................................................ 5-53

Geometry Data ...................................................................................................................... 5-56

Geometry Limit Values .......................................................................................................... 5-60

Wear Factors ......................................................................................................................... 5-61

User Tool Edge Data ............................................................................................................. 5-63

5.5 Grinding Wheel-Specific Tool Data{0><}100{> .......................................................................... 5-64

Tool Code WGD DE 18 ......................................................................................................... 5-66

Representation Type WGD DE 19 ........................................................................................ 5-68

5.6 Tool Path Compensation ............................................................................................................ 5-68

Inactive Tool Path Compensation.......................................................................................... 5-68

Active Tool Path Compensation ............................................................................................ 5-69

Contour Transitions ............................................................................................................... 5-70

Establishment of Tool Path Compensation at Start of Contour............................................. 5-74

Removal of Tool Path Compensation at End of Contour ...................................................... 5-76

Change in Direction of Compensation................................................................................... 5-78

5.7 Activating and Canceling Tool Path Compensation ................................................................... 5-78

Page 7: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Contents V

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Canceling Tool Path Compensation "G40" ........................................................................... 5-78

Tool Path Compensation, Left "G41"..................................................................................... 5-79

Tool Path Compensation, Right "G42" .................................................................................. 5-79

Tool Path Correction G41, G42 Behind and Before the Turning Center............................... 5-80

Inserting an Arc Transition Element "G43"............................................................................ 5-82

Inserting a Chamfer Transition Element "G44" ..................................................................... 5-82

Constant Feed on Tool Center Line "G98"............................................................................ 5-83

Constant Feed at the Contour "G99"..................................................................................... 5-84

5.8 Tool Length Compensation......................................................................................................... 5-84

No Tool Length Compensation "G47" ................................................................................... 5-85

Tool Length Correction, Positive "G48"................................................................................. 5-85

Tool Length Correction, Negative "G49" ............................................................................... 5-86

5.9 Access to Tool Data from NC Program "TLD"............................................................................ 5-86

5.10 D corrections............................................................................................................................... 5-88

6 Auxiliary Functions (S, M, Q) 6-1

6.1 General Information on Auxiliary Functions.................................................................................. 6-1

6.2 "M" Auxiliary Functions ................................................................................................................. 6-1

Program Control Commands................................................................................................... 6-3

Spindle Control Commands..................................................................................................... 6-3

Spindle Positioning .................................................................................................................. 6-4

Gear Changes ......................................................................................................................... 6-5

6.3 S-Word as Auxiliary Function ....................................................................................................... 6-5

6.4 Q Function .................................................................................................................................... 6-5

7 Events 7-1

7.1 Definition of NC Events................................................................................................................. 7-1

7.2 Influencing Events ........................................................................................................................ 7-2

Set NC Event "SE"................................................................................................................... 7-2

Reset NC Event "RE" .............................................................................................................. 7-3

Wait until NC Event is Set "WES"............................................................................................ 7-3

Wait until NC Event is Reset "WER" ....................................................................................... 7-4

7.3 Conditional Branches for Events .................................................................................................. 7-5

Branch if NC Event is Set "BES" ............................................................................................. 7-5

Branch if NC Event is Reset "BER"......................................................................................... 7-5

7.4 Asynchronous Handling of NC Events ......................................................................................... 7-6

Call Subroutine if Event is Set "BEV" ...................................................................................... 7-7

Program Branching if NC Event is Set "JEV" .......................................................................... 7-8

Cancel NC Event Monitoring "CEV" ........................................................................................ 7-8

Disable NC Event Monitoring "DEV" ....................................................................................... 7-8

Enable NC Event Monitoring "EEV" ........................................................................................ 7-8

7.5 Reading Events in Variable ........................................................................................................ 7-10

8 NC Functions to Control Tool Management 8-1

8.1 Conditions..................................................................................................................................... 8-1

Default Plane ........................................................................................................................... 8-1

Page 8: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

VI Contents NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Preparation of Tools and Tool Data......................................................................................... 8-2

8.2 Tool Storage Unit Motion Commands of the NC .......................................................................... 8-9

Tool Storage to Reference Position "MRF" ........................................................................... 8-10

Move Tool Storage Unit to Home Position "MHP"................................................................. 8-10

Programmed Move Tool into Position "MTP" ........................................................................ 8-11

Programmed Move Magazine Pocket into Position "MMP"................................................... 8-13

MTP/MMP Commands and Tool Correction ......................................................................... 8-14

Freely Position Tool axis "MMA" ........................................................................................... 8-15

Move to Free Position "MFP" ................................................................................................ 8-16

Move Old Pocket in Position "MOP"...................................................................................... 8-17

Wait until Position is Approached "MRY" .............................................................................. 8-19

Enable Tool Magazine (Storage) for Manual Mode "MEN"................................................... 8-19

Moving Tool Storage Unit with Nonuniform Pocket Distribution............................................ 8-20

8.3 Tool Changing Commands of the NC......................................................................................... 8-21

Performing a Complete Tool Change "TCH"......................................................................... 8-22

Change the Tool from the Magazine to the Spindle "TMS"................................................... 8-23

Tool Change from Spindle to Magazine "TSM"..................................................................... 8-23

Magazine Pocket Empty? "TPE" ........................................................................................... 8-24

Tool Spindle Empty? "TSE"................................................................................................... 8-24

9 Process and Program Control Commands 9-1

9.1 Process Control Commands......................................................................................................... 9-1

Define Process "DP"................................................................................................................ 9-2

Select NC Program for Process "SP" ...................................................................................... 9-2

Start Reverse Program "RP" ................................................................................................... 9-3

Start Advance Program "AP"................................................................................................... 9-3

Wait for Process "WP"............................................................................................................. 9-3

Lock Process "LP" ................................................................................................................... 9-4

Process Complete "POK" ........................................................................................................ 9-5

9.2 Axis Transfer Between Processes "FAX", GAX" .......................................................................... 9-6

9.3 Program Control Commands........................................................................................................ 9-9

Program End with Reset "RET"............................................................................................... 9-9

Branch with Stop "BST"........................................................................................................... 9-9

Programmed Halt "HLT" .......................................................................................................... 9-9

Branch Absolute "BRA" ........................................................................................................... 9-9

Jump to Another NC Program "JMP" .................................................................................... 9-10

9.4 Subroutines................................................................................................................................. 9-10

Subroutine Technique ........................................................................................................... 9-10

Subroutine Structure.............................................................................................................. 9-11

Subroutine Nesting ................................................................................................................ 9-11

Jump to NC Subroutine "JSR"............................................................................................... 9-11

Subroutine Call "BSR" ........................................................................................................... 9-12

Return from NC Subroutine "RTS" ........................................................................................ 9-12

9.5 Reverse Vectors ......................................................................................................................... 9-13

Set Reverse Vector "REV" .................................................................................................... 9-13

9.6 Conditional Branches.................................................................................................................. 9-16

Page 9: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Contents VII

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Branch if Spindle is Empty "BSE".......................................................................................... 9-16

Branch if T0 Was Set "BTE" .................................................................................................. 9-16

Branch upon Reference "BRF".............................................................................................. 9-16

Branch if NC Event is Set "BES" ........................................................................................... 9-16

Branch if NC Event is Reset "BER"....................................................................................... 9-17

9.7 Branches Depending on Arithmetic Results ............................................................................... 9-17

Branch If Equal to Zero "BEQ" .............................................................................................. 9-17

Branch If Not Equal to Zero "BNE"........................................................................................ 9-17

Branch If Greater Than or Equal to Zero "BPL" .................................................................... 9-17

Branch If Less Than Zero "BMI" ............................................................................................ 9-17

Overview Table...................................................................................................................... 9-18

10 Variable Assignments and Arithmetic Functions 10-1

10.1 Variables ..................................................................................................................................... 10-1

Variable Assignment.............................................................................................................. 10-2

10.2 Angle Unit for Trigonometric Functions "RAD", "DEG"............................................................... 10-5

10.3 Round Distance "RDI" ................................................................................................................ 10-6

10.4 Mathematical Expressions.......................................................................................................... 10-6

Operands ............................................................................................................................... 10-7

Operators............................................................................................................................... 10-7

Parentheses........................................................................................................................... 10-8

Functions ............................................................................................................................... 10-8

11 Enhanced NC Syntax (NC Control Structures) 11-1

11.1 Overview..................................................................................................................................... 11-1

11.2 Conditions of the Control Structures........................................................................................... 11-2

11.3 Block Instructions........................................................................................................................ 11-3

11.4 IF Instruction ............................................................................................................................... 11-3

11.5 FOR Instruction........................................................................................................................... 11-4

11.6 WHILE Instruction....................................................................................................................... 11-4

11.7 REPEAT-UNTIL Instruction ........................................................................................................ 11-4

11.8 CONTINUE Instruction ............................................................................................................... 11-5

11.9 BREAK Instruction ...................................................................................................................... 11-5

11.10 SWITCH Instruction .................................................................................................................... 11-5

11.11 Conditions of the Control Structures........................................................................................... 11-6

11.12 Indexed NC Variables................................................................................................................. 11-7

12 Special NC Functions 12-1

12.1 APR SERCOS Parameters ........................................................................................................ 12-1

Data Exchange with Digital Drives "AXD" ............................................................................. 12-1

12.2 Read/Write Zero Offset (ZO) Data from the NC Program "OTD"............................................... 12-4

12.3 Access to Tool Data from NC Program "TLD"............................................................................ 12-6

Examples: ............................................................................................................................ 12-15

12.4 Read/Write D Corrections from the NC Program "DCD".......................................................... 12-19

12.5 Read/Write Machine Data......................................................................................................... 12-20

Purpose of Machine Data .................................................................................................... 12-20

Page 10: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

VIII Contents NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Read/Write Machine Data Elements "MTD"........................................................................ 12-21

12.6 Possible Allocations between TLD, MTD, AXD, OTD, DCD .................................................... 12-22

Handling AXD Commands................................................................................................... 12-22

Handling OTD Commands .................................................................................................. 12-23

Handling TLD Commands ................................................................................................... 12-23

Handling DCD Commands .................................................................................................. 12-24

Handling MTD Commands .................................................................................................. 12-24

Allocations Between TLD, MTD, AXD, OTD and DCD Commands .................................... 12-25

13 NC Compiler Functions 13-1

13.1 Basics ......................................................................................................................................... 13-1

13.2 Chamfers and Roundings ........................................................................................................... 13-1

13.3 Macro Technique ........................................................................................................................ 13-3

Enhancing NC Functions by Macro Technique ..................................................................... 13-5

13.4 Modal Function ........................................................................................................................... 13-7

13.5 Enhanced Look-Ahead Function ................................................................................................ 13-9

13.6 Graphic NC editor ..................................................................................................................... 13-13

14 NC Programming Practices 14-1

14.1 Time-Optimized NC Programming ............................................................................................. 14-1

15 Appendix 15-1

15.1 Table of G Code Groups............................................................................................................. 15-1

15.2 Table of M Function Groups ....................................................................................................... 15-2

15.3 Table of Functions ...................................................................................................................... 15-2

I. G00 through G19............................................................................................................... 15-3

II. G20 to G38 ....................................................................................................................... 15-4

III. G40 to G59 ...................................................................................................................... 15-5

IV. G61 to G79...................................................................................................................... 15-6

V. G90 through G99 ............................................................................................................. 15-8

VI. ACC through BTE ........................................................................................................... 15-9

VII. CEV through MMP ....................................................................................................... 15-10

VIII. MOP through RTS....................................................................................................... 15-11

IX. SE through WP ............................................................................................................. 15-12

15.4 File Header ............................................................................................................................... 15-13

Cycle Header ....................................................................................................................... 15-14

16 Index 16-1

17 Service & Support 17-1

17.1 Helpdesk..................................................................................................................................... 17-1

17.2 Service-Hotline ........................................................................................................................... 17-1

17.3 Internet........................................................................................................................................ 17-1

17.4 Vor der Kontaktaufnahme... - Before contacting us... ................................................................ 17-1

17.5 Kundenbetreuungsstellen - Sales & Service Facilities ............................................................... 17-2

Page 11: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions General Information 1-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

1 General Information

1.1 Notes

A CNC (COMPUTER NUMERICAL CONTROL) is a special computer used tocontrol a machine tool, robot or transfer system. Like a personal com-puter, the CNC controller has its own operating system, which is specifi-cally designed for numerical applications, as well as so-called controllersoftware installed in this operating system.

The controller software translates the CNC program into a languagewhich the controller can understand.

Details relating to a particular CNC machine tool, robot, or transfer systemmay be found in the machine builder's manual. The machine builder'sinformation takes precedence over the information provided in this Pro-gramming Manual.

The programming examples are based on DIN 66025/ISO Draft 6983/2along with the additional features implemented by Bosch Rexroth.

All geometric values are metric.

Combinations in the NC syntax and other functions which are not de-scribed in this programming manual may also be executed on the con-troller. However, we do not warrant the proper functioning of these com-binations 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 asof version 23VRS

Note: This type of field describes a specific functional response thatdepends on the parameter settings. If the instructions given inthese notes are not followed, the function cannot be started orthere will be malfunctions during execution (error message).

CAUTION

This type of field provides information that is mandatoryfor a faultless execution of the described functions. If theinstructions given in these notes are not followed, theexecution of the function may lead to serious errors inCNC processing, damage the machine or, in the worstcase, lead to personal injuries.

Page 12: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

1-2 General Information NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

1.2 Program and Data Organization

Data structure of the CNC with user interface on an IBM PC and a minioperating device BTV0x.

NCProgram

List

Hard Disc

0

01

2

56

43

12

56

43

NC ListProcess

NC VariableList Process

0

01

2

56

43

12

56

43

NC-EventListe fürProzeß

NC-VariablenListe fürProzeß

UserInter-face

Data User Interface

MDIBlockEntry

0

01

2

56

43

12

56

43

NC EventList forProcess

NC VariableList forProcess

0

01

2

56

43

12

56

43

Cur. Tool Listfor Process

Zero Pointfor Process

Data BTV0x

NC-Program Memory A

Data forProcess 0

Setup List

NC-Program Nr. 1 . Nr. 99

Zero Pointsfor Process 0

12

34

56

12

34

56

NC-Program Memory B

Data forProcess 0

Setup List

NC-Program Nr. 1 . Nr. 99

Zero Pointsfor Process 0

12

34

56

12

34

56

System Parameters

Axis Parameter Axis 1Process Parameter Process 0

Process Parameter Process 0

NC Events Process 0

NC Variables Process 0

NC Cycle Programme Process 0

D Corrections Process 0 1 2 3 4 5 61 2 3 4 5 61 2 3 4 5 61 2 3 4 5 61 2 3 4 5 61 2 3 4 5 62 3 4 . . 20

CNC Memory

Parameters

ParameterSet

ToolList

11Daten.FH7

Fig. 1-1: CNC data organization

Approximately 400 kB available memory is present on the basic version ofthe CNC. As shown in the figure above, the CNC memory is divided intoseveral areas. The individual areas are described briefly in the followingsections.

The CNC controller is adapted to the given machine or system by meansof parameters. Up to 99 different parameter sets can be managed via theuser interface.

The parameters are divided into the following areas:

The system parameters define how many processes and axes need to bemanaged by the CNC controller as well as what type of tool managementsystem is present.

The process-specific axes are specified in the axis parameters. The axisis assigned to specific processes in the axis parameters and the corre-sponding axis limit data—for example, maximum axis speed, travel lim-its—are defined here.

System parameters

Axis parameters

Page 13: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions General Information 1-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The process-specific data, for example the default plane, programmableand maximum displayable places to the right of the decimal point, maxi-mum speed for contour mode, etc. are specified in the process parame-ters.

A detailed description of the system, process and axis parameters may befound 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 as-signed to the process; it therefore represents an image of the magazinewhich is present at the station. Up to 99 different tool lists can be man-aged via the user interface. The NC commands for tool handling are de-scribed in the "Commands for Tool Management" chapter. A completedescription of all data and functions relating to tools is provided in thedocument "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. Adetailed description of NC events and event-dependent functions is pro-vided in the "NC Events" chapter.

An NC variable represents a changeable numerical value. A total of 1792NC variables are available in the CNC (256 NC variables for each proc-ess). The section "Variable Assignment and Mathematical Functions"provides a detailed description of what can be accomplished with NCvariables.

A specific memory area is available in the CNC for NC cycle programssupplied by the machine builder and Bosch Rexroth. Additional informa-tion 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. Dcorrections act in an additive manner relative to the existing geometryregisters L1, L2, L3 and R. D corrections can be used if tool managementis present, e.g. as tool reference point offset registers. 99 D correctionsare available for each of the 7 processes of the CNC. Each D correctioncontains the L1, L2, L3 and R registers. The assignment of values in theD correction register can be accomplished by using the CNC user inter-face or the BTV0x.

An NC program package contains all necessary Tool Setup Lists (toolspecifications data) and NC programs of all processes used in the ma-chining work. Up to 99 different NC program packages can be managedvia the user interface. Dividing the NC memory into two areas, A and B,permits two NC program packages to be managed simultaneously in theCNC. The decision which of the two NC program packages is to be exe-cuted is made by the operator via the user interface or via the PLC. Whileone NC program package is already running, a second NC programpackage can be loaded into the controller's memory. This will overwriteany NC program package that may already be present in the controller.

Process parameter

Tool List

NC events

NC variables

NC cycle programs

D corrections

NC program package

Page 14: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

1-4 General Information NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

����������������� �������

������������

������������

�������� ���� ����

� ������������������

�����

12Paket.FH7

Fig. 1-2: NC program package

The tool setup list contains a tool data set for each T number used in theNC program. This tool data set defines which tool is to be used and whichspecifications this tool must meet. If the machine tool builder determinesthat a setup list is not required, the T number, together with its corre-sponding data set, is used in the tool list. The setup list should be enteredbefore creating the program, however no later than during creation of theprogram. Additional information on the setup list is provided in the docu-mentation "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 programmemory in the CNC memory. Entries in the zero point table in the opera-tor interface are always assigned to the currently active NC programmemory.

See also the section "Zero Offsets".

Setup list

Offsets

Page 15: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions NC Program 2-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

2 NC Program

2.1 Organization of Setup Lists

A tool setup list can be created for any process which uses a tool. This listallows any tool name or tool number to be assigned to the T numbersused in the NC program. The Setup list also contains the tool specificationdata. Setup lists can be organized to be station-specific or program-spe-cific.

Up to 7 tool setup lists (1 per process) are possible (organized in the NC pro-gram package).

Up to 693 tool setup lists (7 processes x 99 tool setup lists) are possible.

���������������������

�������

��������

�����������

������������

������������

������������

� ���������

� ����������

� ����������

� �����������

��������

������������������ �!���� �"������#��$��%��&����

���������������������

�������

��������

��������

����������

�����������

�����������

������������

� ��������

��������

$����� ������������ �!���� �"������#��$��%��&����

��������

Pakete.FH7

Fig. 2-1: Setup lists in program- and station-specific organization

When a program-specific organization of the Setup lists is used, the sizeof the program memory available to NC programs is decreased!

Note: The station- or program-specific setup lists are defined in thesystem parameters.The machine builder must declare in the PLC programwhether the CNC will work with or without setup lists.

The setup list should be completed when the NC program is written, butno later than when the NC program is transferred into the system. This isthe only way that names referencing T numbers in the NC program canbe meaningful. The final assignment of the tools which are located in thetool magazine to the T numbers used in the program is made when theprogram is initiated (optional tool check).

Station-specific organization

Program-specific organization

Page 16: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

2-2 NC Program NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

2.2 Program Structure

The NC program and its command set is based on DIN 66025 / ISO Draft6983/2 and is supplemented by the specific Bosch Rexroth extensions.Each NC program package can contain up to 99 NC programs for eachprocess. Thus, an NC program package can consist of 693 NC programs(7 processes x 99 NC programs). Each NC program can consist of up to500 NC blocks.

�� �� ����� �'���(�)

��*�(+� �'���(

��*������ ���

�� �� ����� �'���(�,

������ ��� ����

��������� ��� ���� !"��� ���!�# " ��

� �����

!"��� �� �����

$� ���%�� ����!��������� �

&�����# '�� ����!�(����� &���! �)�

��������� ����!�%�� �

# " �� �� ����� ������ ������

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 NCprogram, a search using the number 99 is automatically performed in theNC program. If the subroutine for the cycle is not located in programnumber 99, a search is performed in program number 0.

Program number 99 is suitable for frequently used program modules suchas user cycles, the tool change subroutine or the reverse program.

Program number 0 is reserved for the Bosch Rexroth machining cyclesand for the machine builder's cycles. A detailed description of the BoschRexroth 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 (managementprocess) 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 proc-ess 0 handles the coordination of all the other processes.

Program No. 99

Program No. 0

Page 17: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions NC Program 2-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Advance ProgramAn advance program consists of a complete sequence of NC blocksneeded to produce a workpiece. In addition to the path informationneeded for machining, the advance program also contains all additionalauxiliary functions and branch/jump commands for subroutines and cy-cles.

The advance program ends with the NC block in which RET (end of pro-gram with reset) is programmed.

Example

T4 BSR .M6 Tool change SF D50

T8 MTP Next machining tool

G00 G90 G54 X0 Y0 Z50 S5000 M03 Home position

G01 X46 Y144 Z2 Pos. at safety distance

.

.

RET

Reverse ProgramA reverse program consists of a complete series of NC blocks which de-scribe an operation sequence that is to be performed to establish the ref-erence or home position of a station, regardless of how complicated therequired traverse movement may be. As a rule, a reverse program is pro-grammed in program number 0 or number 99 so that it can be used as asubroutine to establish the reference point or home position of a station ormachine.

The reverse program begins with the NC block in which the label .HOMEis programmed. Other entry points for the reverse program can be de-fined in the advance program with the assistance of reverse vectors (seechapter 9 "Commands for controlling processes and programs").

If reverse programming is done in a systematic manner without any omis-sions, the operator can extract the station(s) or the machine from themost complicated machining situations and return to the initial position inthe event of errors or malfunctions or in any given EMERGENCY STOPsituation. 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 themachine builder has specified in the process parameters that areverse program must be programmed.

Page 18: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

2-4 NC Program NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

2.3 Process-Specific Programming

{0><}100{>The CNC is organized into a maximum of 7 processes. Eachprocess has its own NC block preparation which combines the data fromthe NC program with data such as zero points, setup lists, etc.

The number of processes is declared in the system parameters. If morethan 2 processes are declared, process 0 is generally used to synchro-nize the other processes.

Example

Use of a number of processes on a double-slide single-spindle lathe witha milling head:

• Process 0Synchronization of processes 1 and 2. Coordinates whether the proc-esses work simultaneously and asynchronously or synchronously.

• Process 1Process 1 contains the X and Z axes for the upper turret head.

• Process 2Process 2 contains the X and Z axes for the lower turret head, mainspindle S1, the C axis, and spindle S2 as the driven tool spindle.

��������

������ ���*��

�����*�+ #+�����,��,���������������������������-� �� ��*���./�0��0��

��������

������ ���*��

������1���12-�1/�����1���3���4�������*������*���''�(���

�������

������ ���*��

������1���12-�1/�����1���3���4�������*������*���''�(���

� ��� ����

4

3

���� ���

4

3

��

24Dopp.FH7

Fig. 2-3: Double-slide single-spindle lathe for milling work

Page 19: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions NC Program 2-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

2.4 Elements of an NC Block

{0><}100{>An NC block contains data to perform an operating step. TheNC block consists of one or more words as well as the NC control com-mands. The NC block length may not exceed 240 characters; it can besplit 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 con-trol command

Correctioncall

Traversestatement

Geometryinstruction

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 assign-ments must be separated by at least one space.

The priority for the processing of an NC block in the NC memory is asfollows (priority dropping from left to right):

Blocknumber

Branchlabel G codes Variables

Axisvalues

IPOpara-meter

F value S valueAux.function

Toolcomm-ands

EventsProcesscomm-ands

Programcomm-ands

N1234 .ENDE G01 @100=x X100Y100

I0J50

F1000 S800 M03 MTP T6 SE 5 DP 1 HLT

Fig. 2-5: Priority for processing an NC block

Block Numbers

N× × × × × = 0-9

Each NC block begins with the letter N followed by a signless, 4-digitdecimal integer figure as a block number. The numbering of NC blocks inan NC program always starts with N0000. The numbering of NC blocks isautomatically generated by the user interface in steps of 1.

When NC blocks are inserted via the user interface, all subsequent NCblocks are automatically renumbered.

Syntax

Page 20: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

2-6 NC Program NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Skipping BlocksIn an NC-controlled machine tool, a simple way must be provided to skipNC blocks so that certain functions such as measuring operations, partloading and unloading and the corresponding program NC blocks can beallowed to proceed in a controlled manner or can be skipped.

Blocks in a subprogram which are not to be processed each time the pro-gram is executed must be identified by a slash "/" at the beginning of theNC block.

Note: These blocks are only not processed when the user activatesthe skip function by pressing the "Skip NC block" machinecontrol 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 acti-vates the skip function before the first NC block in this sequence is proc-essed. If the user presses the "Skip NC block" machine control key whilea sequence of NC blocks containing the skip marks is being processed,this will have no effect on processing in cyclical mode. The CNC contin-ues to process regardless of this action.

During single-block processing mode, the CNC checks whether the skipfunction is active at the beginning of each NC block. In contrast to cyclicalmode, this gives the user the opportunity to control which individual NCblocks are skipped.

CAUTION

Slash marks used to skip NC blocks stop NCblock preparation.

Thus, contour mode is not possible if NC blocks aremarked to be skipped.

Page 21: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions NC Program 2-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

2.5 NC Word

The NC word contains the DIN 66025 instructions and various specificBosch 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 Rapid traverse, circular interpolation G__ G__

Auxiliary functions Coolants, tools M__ T__

Override calls Tool overrides, zero points G__ G__

Enhanced functions Conditional branch/jump, calculations

A word is comprised of the address letter and the numerical value ofwhich the specific machine motions and auxiliary functions are to be initi-ated.

The address letter is generally a text character.

The numerical value can have signs and decimal points. The sign is lo-cated between the address letter and the numerical value. A positive signdoes not need to be entered.

-��.�"����

/��� .�.�,..�����"���� !!� ���� �� �

!!� ���� �� �

5���

5���

$

���0

�����* ����

25Wort.FH7

Fig. 2-6: Word syntax

Example:

; Enhanced address structure for an X1 and Y1 axis

G01 X1 50.45 Y1 35.456 F1000 Thread position 1

Z10 Z to safety distance

M103 S1 1000 1st spindle 1000 RPM

Note: There must be a blank between the address and the numericvalue to be assigned.

The decimal point is set to achieve the resolutions shown below:

X0,00001 = 0.01 µmX0,0001 = 0.1 µmX0,001 = 1 µm

etc.

Address letter

Numerical value

Page 22: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

2-8 NC Program NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 of @xxx

Note: The maximum number of digits to the right of the decimalpoint, which can be programmed, is set in the process pa-rameters.

Branch Label

.× × × × × × × = 0-9 , A-Z , a-z

A branch label points to a single branch label in a destination NC block. Abranch label is always present twice, once in the NC block in which thebranch occurs and once in the destination NC block to which the branchis to be performed. A label always marks a program branch, regardlesswhether the branch is conditional or unconditional.

The single branch address (destination label) may be in the same NCprogram. If the single branch address is not found, it will be searched forat first in program No. 99 and then in program No. 0.

In terms of syntax, the label begins with a decimal point followed by atleast one and no more than six visible characters. The syntax does notdifferentiate between lower-case and capital letters. When a label is pro-grammed in an NC block, the label must be the first element in the NCblock after the number.

Note: Certain branch labels are reserved by their names for theBosch Rexroth fixed cycles and for those of the machinebuilder. The "*" sign following the decimal point is reserved forBosch Rexroth fixed cycles. A branch command using a labelis considered to be a program control command and is per-formed last based on its priority. Machine movements in anNC block are performed before a branch label.

Example

G54 G90 G00 X0 Z0G04 F5BSR .ENDRET.ENDM05G04 F1RTS

Note

[ Text ]

Each NC block can contain a message, which will be displayed in thediagnostic menu (station window) in the user interface at the end of NCblock processing. The note in the diagnostics line remains active until it isoverwritten by a new note. A so-called blank message must be pro-grammed in order to clear the current message in the NC diagnostics line.The message is also cleared from the NC diagnostics line when a pro-gram 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 48characters. All ASCII characters may be used. The message can be in-

Syntax

Syntax

Page 23: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions NC Program 2-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

serted at any location in the NC block; however, with the exception of thecomment, it is always the last function to be executed.

Example:

G01 G54, G90 [ Traverse X to safety distance ] F1000X500 [ Traverse Z to safety distance ] G01 G51 G90 F1000Z100

Comment

( Text )

Each NC block can contain a comment. A comment is written in paren-theses. It may not exceed a length of 80 characters. All ASCII charactersmay be used. The comment can be inserted at any desired location in theNC block. The comment is transferred to the controller memory and isshown 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

Messages and hints must not be programmed between individual Gfunctions.

Comment in the Source Program

; Text

Each NC block can contain one comment in the source program; this isintroduced by a semicolon. All characters following the semicolon areinterpreted 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 tomessages and comments, this type offers the advantage of saving mem-ory space in the controller.

If a semicolon is used at the very beginning of an NC block, the entire NCblock is marked as a comment and an NC block number is not assigned.

Example

G01 X250 Y100 F1000 6th drilling position; Call centered drilling cycleBSR .*ZENBO

Comments in the source program must not be programmed between indi-vidual NC words.

Syntax

Restriction

Syntax

Restriction

Page 24: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

2-10 NC Program NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 Free @ 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 up-per and lower case. This means that "x400" can be used instead of"X400" when programming an axis position. However, for the sake oflegibility, it is generally a good idea to write NC commands in upper casecharacters.

The full ASCII character set may be used for hints and messages.

Page 25: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3 Motion Commands, Dimension Inputs

3.1 Coordinate system

The coordinate system defines the location of a point or a series of pointsin a plane or in space in relation to two or three NC axes.

As a rule, the right-hand, orthogonal Cartesian coordinate system havingthe axes X, Y and Z is used in NC technology. This system relates to themain axes of the machine.

01

2

01

2

3

&

�3

*3

*

3 *

31Koord.FH7

Fig. 3-1: Coordinate system

All other axes relate to these 3 main axes. A, B and C are rotary or pivot-ing 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 rotationof rotary axes corresponds to clockwise rotation when viewed in the posi-tive axis direction. The direction of rotation and the orientation of the axeswith respect to each other result from the right-hand rule (see Fig. "Right-hand 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.

67 '��

47 '�� 37 '��

47 '��

������" �!�� ���������� �� ����� 7 '��

32Hand.FH7

Fig. 3-2: Right-hand rule

Page 26: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-2 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.2 Motion commands

The path command or movement instruction causes an axis to move. Thepath command consists of the address letter of the axis address (for ex-ample, X, Y or Z) followed by the sign (+, -) to indicate the direction ofmovement, and the distance to be traveled, the coordinate value.

!!� ���� �� ��������������������!���� �5���

1 �� ����

$( ����4

!!� ���� �� ��������89��������������������5������

0 ������5�������67�

0 ���������������������

!!� ���� �� ����������������� �������������!���� �5���

32Weg.FH7

Fig. 3-3: Syntax for motion commands

Examples:

Z105.5 orZ=105.5 orZ105.5X= @80X1 245.65

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 posi-tive. 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 zeroscan be ignored.

If a decimal point is programmed, at least one digit to the right of thedecimal point must be stated.

The number of digits to the left and right of the decimal point may notexceed 10 digits.

In the notation using four digits to the right of the decimal point, the maxi-mum value range for coordinates is:

-214748.3648 to +214748.3647

or with five digits to the right of the decimal point:

-21474.83648 to +21474.83647

Syntax

Page 27: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.3 Measurements

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

Absolute Dimension Entry "G90"In absolute dimension entry, all dimensions stated relate to a fixed zeropoint. When the CNC program boots, the initial setting is G90. G90 re-mains in effect until it is overwritten with G91. In the NC program, G90only needs to be programmed to cancel G91.

G90

Example:

��

:�

/�

��

�� -� :� /� �� �� -��

2

;�<

;��< ;��<

;�-<

-�

32Absol.FH7

Fig. 3-4: Absolute dimension entry

NC program:

G00 G90 G54 X0 Y0 Z10 S1000 M03 Start positionG01 X50 Y50 F500 [P1]BSR .DRILL Branch to drilling subroutineY80 [P2]BSR .DRILL Branch to drilling subroutineX100 [P3]BSR .DRILL Branch to drilling subroutineY50 [P4]BSR .DRILL Branch to drilling subroutineM05 Spindle OFFRET Program end.DRILL Drilling subroutineG01 Z-10 F300 Drill to depth ZG04 F2 Dwell time 2 secondsG00 Z3 Return to safety distanceRTS End subroutine

Syntax

Page 28: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-4 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Incremental Dimensions "G91"Incremental positioning defines all subsequent dimensional entries asdifferences relative to the NC block starting position.

G91

G91 remains in effect until the end of the program or until it is overwrittenby G90.

Note: The distance that has been programmed for an axis usingG91 refers to the last absolute position. If the program coordi-nate system is altered by shifting, rotation, mirroring, tool cor-rection changes or after axis changeovers (G30, G31, G32, Caxis) and axis transfers, the axis must be positioned absolutelybefore G91 or G90 are utilized.

Example:

��

:�

/�

��

�� -� :� /� �� �� -��

2

;�<

;��< ;��<

;�-<

-�

33Inkre.FH7

Fig. 3-5: Absolute dimension entry

NC program:

G00 G90 G54 X0 Y0 Z3 S1000 M03 Start positionG01 G91 X50 Y50 F500 [P1]BSR .DRILL Branch to drilling subroutineY30 [P2]BSR .DRILL Branch to drilling subroutineX50 [P3]BSR .DRILL Branch to drilling subroutineY-30 [P4]BSR .DRILL Branch to drilling subroutineM05 Spindle OFFRET Program end.DRILL Drilling subroutineG01 Z-13 F300 Drill to depth ZG04 F2 Dwell time 2 secondsG00 Z13 Return to safety distanceRTS End subroutine

Syntax

Page 29: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.4 Offsets

Zero points and various reference points used to establish workpiecegeometry are defined on all numerically controlled machines.

The machine zero point is located in a fixed position at the origin of themachine coordinate system and cannot be moved.

'34Masch.FH7

Fig. 3-6: Icon for the machine zero point

The machine reference point is a defined point located within the workingrange of the machine. It is used to establish a defined initial position afterthe machine is powered on. The machine builder in each axis in whichincremental positioning is used establishes the machine reference point.

334Refer.FH7

Fig. 3-7: Icon for the reference point

Note: The reference dimensions are set in the drive parameters.

The workpiece zero point is the origin of the workpiece coordinate system.As the program zero point, which the programmer establishes, it is used asthe basis for all workpiece dimensions. The reference to the machine zeropoint is established by the zero offset value when the machine is set up.

-34Werk.FH7

Fig. 3-8: Icon for the workpiece zero point

Machine zero point

Icon for the machine zero point

Machine reference point

Icon for the reference point

Workpiece zero point

Icon for the workpiece zeropoint

Page 30: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-6 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Examples:

' 0

2

-

3

+���

0��=�� �

34Null.FH7

Fig. 3-9: Zero points – drilling/milling machines

0

3

-(

35Nulld.FH7

Fig. 3-10: Zero points – lathe (machining ahead of the center of rotation)

Page 31: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.5 Zero offsets

The zero offsets permit the origin of a coordinate axis to be offset by agiven value relative to the machine zero point. The position of the ma-chine zero point is permanently stored in the CNC memory and is notchanged by the zero offset.

0

0

2

2

1

1

08

18

, �+�����3������ �9�9�����#�����:��+� ��;< 7=

91�91���������

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 pointG52, the coordinate zero point of every NC axis can be applied to anydesired coordinate position within or beyond the individual range ofmovement. It is thereby possible to process an identical NC program atdifferent machine positions.

The position of the machine zero point of each axis is specified in thedrive parameters as the difference in relation to the reference point. Thevalue entered in the drive parameters corresponds to the coordinate valueof the reference point in the machine coordinate system.

Page 32: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-8 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC-Prg

G53MachineCoordinate System

Memory B

Allgemeiner

Offset

G54 bis G59

Nullpunkt-bank 0 bis 9

Memory B

0

1

98

2

GeneralOffset

G54 ... G59

OffsetPage0 to 9

MemoryA

0

1

98

2Machine

CoordinateSystem

Memory A

G52

ProgrammableWWorkpiece point

Setting viaNC-Programm

Memory B

ProgrammableWorkpiece

Offset

Memory A

AbsoluteZero OffsetG50

IncrementalZero OffsetG51

Programmable, absoluteand incrementalzero offset.

Setting via NC program.

Deselection via selection of anew zero offset or via G53

Complete Zero Offset

ProgrammableWorkpiece Offset;

Setting via NC Program

Adjustable ZeroOffset

Offset ofMaschine

Coordinate System

G52 NC-Prg

NC-Prg

NC-Prg

3

3

G53

Variant 1

Sum 1: + G50 + G511

Sum 2: + G50 + G512

Sum 3: + G50 + G513

Variant 2 Variant 3

nullpunkt_MTC.FH7

Fig. 3-12: Sum of zero offsets

The sum of zero offsets is made up of the adjustable zero offsets G54 -G59 or the programmable workpiece zero point G52 and the programma-ble zero offsets G50, G51 as well as the adjustable general offsets in thezero point table.

Note: The programmable zero offsets G50 and G51 become inactivewhen G52, G53, G54 - G59 are programmed. G59 inactive.

Page 33: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Adjustable Zero Offsets "G54 - G59"The adjustable zero offsets are entered in the zero offset table for thoseaxes which are present using the user interface. The entered values func-tion as an absolute offset relating to the machine zero point. It is includedin the same NC block after the programming of G54 - G59 if the con-cerned axis is programmed. G54 - G59 are cancelled by G53 or G52.

G54 - G59

• Depending on the settings in the process parameters, one of the ad-justable zero offsets G54 - G59 may be the power-on status anddefault when the NC program is started. G59 default state and basicposition during the NC program start.

Example:

0

2

��

-�

:�

/�

��

�� -� :� /� �� ��

��

-�

:�

/�

�� -� :� /� �� ��

;�<

;��<;��<

;�-<;�2<

8�� ������� �4 ������� �+��� ������ �$� ��>�� ���� ?����12-@�32�*�6-/*/

0

2

38G54ein.FH7

Fig. 3-13: Adjustable zero offset G54

NC program:

G00 G90 G54 X0 Y0 Z10 S1000 M03 Starting position [P1]

G01 X50 Y50 F1000 [P2]

BSR .DRILL Branch to drilling subroutine

X70 Y60 [P3]

BSR .DRILL Branch to drilling subroutine

X90 Y70 [P4]

BSR .DRILL Branch to drilling subroutine

X110 Y80 [P5]

BSR .DRILL Branch to drilling subroutine

M05 Spindle OFF

RET Program end

.DRILL Drilling subroutine

G01 Z-10 F300 Drill to depth Z

G04 F2 Dwell time 2 seconds

G00 Z3 Return to safety distance

RTS End subroutine

Syntax

Page 34: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-10 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Coordinate Rotation with Angle of Rotation "P"Coordinate rotation adapts the coordinate system of the workpiece to thecoordinate system of the machine. Rotation angle P is related to the indi-vidual 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 byusing the expression PHI.

The angle of rotation is programmed using address Pxxx with program-mable zero offsets G50 and G51.

G50-G51 P<angle>

• The total of all active rotational angles is subject to the same condi-tions as with the zero offsets.

• As a rule, the angle of rotation is not active until the next active NCblock.

• The angle of rotation is calculated in the control as a modulo valuefrom 0° to 360°. This means that a programmed angle of, for example540°, is calculated as 180°.

• Coordinate rotation cannot be programmed with the programmableworkpiece zero point G52.

Example:

0

2

��

-�

:�

/�

�� -� :� /� �� ��

20

;��<

;��<

8�� ������� �4 ������� �+��� ������ $� ��>�� ���� ?����12-�@32�*�6-���A>�-2B

39G54koor.FH7

Fig. 3-14: Adjustable zero offset G54 with coordinate rotation

NC program:

G00 G90 G54 X0 Y0 Z10 S1000 M03 Starting position [P1]G01 X40 Y70 F800 [P2]BSR .DRILL Branch to drilling subroutineX80 [P3]BSR .DRILL Branch to drilling subroutineM05 Spindle OFFRET.DRILL Drilling subroutineG01 Z-10 F300 Drill to depth ZG04 F2 Dwell time 2 secondsG00 Z3 Return to safety distanceRTS End subroutine

Syntax

Page 35: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Zero Offset Tables "O"The CNC allows adjustable zero offsets G54 - G59 to be addressed up toten times using different coordinate values.

The zero offset table can be present up to ten times in the CNC. Theseare called zero offset tables.

Note: The number of zero point databases is specified by the ma-chine 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.

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 thefirst to be active in the NC program, the number 0 will not need to beprogrammed separately.

• If the zero offset table is changed in the NC program, G53 automati-cally becomes active.

• Selection of a zero offset table remains modally active until the end ofthe program. The zero offset table selection is reset by commandsRET and BST.

• NC command O should be programmed in a separate NC block. Itmust be activated in at least one NC block prior to the selection of anew zero offset.

,.>%���?+��1�����������8�� �������!����������5���$� ��>�� ����

1��@�?+����1��@�?+���7

1��@�?+���A1��@�?+����

1��@�?+����1��@�?+����

1��@�?+����1��@�?+����

1��@�?+����1��@�?+���

<�� <��

$B��#��#��1�����������@�?+������/ ����� .��#� ���#��1������������C����#��D����E ������

1��@�?+����

1��@�?+����1��@�?+���7

1��@�?+���A1��@�?+����

1��@�?+����1��@�?+����

1��@�?+����

1��@�?+����1��@�?+���

1��@�?+����

1��@�?+����1��@�?+���7

1��@�?+���A1��@�?+����

1��@�?+����1��@�?+����

1��@�?+����

1��@�?+����1��@�?+���

310bank.FH7

Fig. 3-15: Zero point tables on the user interface

Syntax

Page 36: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-12 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

1�����@�?+������

2

��

-�

:�

/�

�� -� :� /� �� ��

��

-�

:�

/�

��

�� -� :� /� ��

��

-�

:�

/�

��

�� -� :� /� ��

2

2

�;�:<

;�< ;�.<

;�/<;��<

;��< ;�-<

;�2<

1��������@�?+������ / ��(�� ��#��1��@�?+�B��#�<��4

07 ���2����

C�+%��<��4

0 A��2����

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 Starting position [P1]G01 X30 Y30 F1000 [P2]BSR .DRILL Branch to drilling subroutineY70 [P3]BSR .DRILL Branch to drilling subroutineX70 [P4]BSR .DRILL Branch to drilling subroutineY30 [P5]BSR .DRILL Branch to drilling subroutine[activate zero offset table no. 1]O1G00 G54 X0 Y0 Starting position [P6]G01 X40 Y40 F1000 [P7]BSR .DRILL Branch to drilling subroutineX60 Y60 [P8]BSR .DRILL Branch to drilling subroutineM05 Spindle OFFRET Program end.DRILL Drilling subroutineG01 Z-10 F300 Drill to depth ZG04 F2 Dwell time 2 secondsG00 Z3 F1000 Return to safety distanceRTS End subroutine

Page 37: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Programmable Absolute Zero Offset "G50", Programmable IncrementalZero 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 val-ues which were defined together with the address letters.

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 (ab-solute) or G51 (incremental), to the most recently selected workpiece co-ordinate system in order to rotate the active plane using address letter P.

• Programmable zero offsets G50 and G51 are active according to NCblocks. The offset remains in effect until the next change of the zerooffset or of the coordinate system.

• No further functions may be programmed in an NC block containingG50 or G51.

Example:

1

0

1

0

1

0

��

-�

:�

/�

�� -� :� /� �� ��

��

-�

:�

/�

��

�� -� :� /� ��

��

-�

:�

/�

��

�� -� :� /� ��

��

�� ��

��

<��41 7��0 ���

��

1�0�

312g50.FH7

Fig. 3-17: Programmable absolute zero offset "G50"

NC program:

G00 G90 G54 X0 Z0 [P0]BSR .CONT Branch to the contour subroutineG50 X2 Zero offset X by 2 mmBSR .CONT 2. call of the contour subroutineRET.CONT Contour subroutineG01 X10 Z48 F750 [P1]X25 Z59 [P2]Z92 F1500 [P3]X11 Z100 F600 [P4]Z113 F1000 [P5]G00 X40 Return to safety distanceZ0X0 [P0]RTS Return to main program

Syntax

Page 38: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-14 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Programmable Zero Point of Workpiece "G52"A workpiece zero point can be programmed as the axis position for allaxes which are present using programmed workpiece zero point G52.When G52 is performed, the coordinate values to which the G52 com-mand applies are assigned to the current position. This corresponds tothe definition of the workpiece zero point in relation to the current position.

G52 <axis>

• Axes which are not programmed using G52 work in the machine co-ordinate system.

• Programming G52 produces a G53 when the change occurs. All zerooffsets 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:

2

��

-�

:�

/�

�� -� /� �� �� �

;�/<

<���0*A��2�/ ��(�� ��#��1�����������@�?+�B��#�B�%+.�?��<��40���2��

<���0��2�1�*@�?+�0���2��

��

-�

:�

/�

��

�� -� :� /� ��

2

��

-�

:�

/�

��

�� -� :� /� ��

2

F� G

F��G

F��GF��G

F��G

F� G

F��G

F��GF��G

F��G

:�

313g52.FH7

Fig. 3-18: Call G52

NC program:

G90 G53 G00 X20 Y30G52 X0 Y0 Call G52BSR .CONT Branch to the subroutineG52 X-70 Y0 Call G52BSR .CONT Branch to the subroutineRET.CONT SubroutineG00 X0 Y0 [P1]G01 X40 Y20 F1000 [P2]X100 [P3]Y80 [P4]X40 [P5]Y20 [P2]G00 X0 Y0RTS Return to main program

Syntax

Page 39: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-15

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Cancel Zero Offsets "G53"All zero offsets are canceled by programming G53. This causes theworkpiece coordinate system to be switched to the machine coordinatesystem.

G53

• Depending on the setting in the process parameters, G53 can be thepower-on default and the initial setting when the NC program starts.

• If G53 is placed in an NC block containing G91, only the position dis-play is switched to the machine’s actual system.

• If the active zero offsets are canceled using G53 when tool path cor-rection is active (G41, G42), a G40 (no tool path correction) is issuedinternally. The tool correction is rebuilt for the following movementblocks.

Adjustable General Offset in the Zero Offset TableBy having the general adjustable offset in the zero offset table, the CNCcan also offset the workpiece zero point in addition to the adjustable andprogrammable zero offsets. The adjustable general offset functions in anadditive manner to the adjustable and programmable zero offsets. Thismeans that the adjustable general offset does not become active until oneof the adjustable or programmable zero offsets has been activated.

• The adjustable general offset is canceled using G53 and is not cal-culated until a zero offset is selected again.

• An angle of rotation can be entered into the zero offset table using theaddress PHI. This angle is added to the already active angles of ro-tation.

• The adjustable general offset can never be active alone due to theconditions 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 writethe data in the zero offset table and the zero offsets which have beenactivated in the NC program from the NC program.

�+,�;C�<D;�**:<D;�**�<D;�**�<D;**�<�

�'�����������������������C�������,

'������ �

4��+��� ���� ��

���( ��%

35otd.FH7

Fig. 3-19: OTD command syntax

Please refer to the section "Reading and writing ZO data from the OTDprogram" for a detailed description of the OTD command.

Syntax

Syntax

Page 40: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-16 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.6 Level selection

Plane selection is an important requirement to correctly perform allmovement commands in an NC program. It informs the control of theplane on which machining is performed in order to permit, for example, acorrect calculation of the tool correction values. Circular interpolation isalso possible only in the selected plane.

NC commands G17, G18 and G19 suffice to select a plane that is definedby 2 linear main axes. NC commands G20, G21 and G22 are required toalso select a plane that is partially or totally defined by rotary main axesand/or by auxiliary axes.

Axis Number, Axis Designation and Axis Meaning

Each axis has an axis number (1 - 32), an axis designation and an axismeaning (X, Y, Z, A, B, C, U, V, W, S).During parameterization, an axis number, max. 2 permitted axis designa-tions and max. 4 permitted axis meanings are specified for each axis.

Example:

Axis parameter for axis number 7C07.001 Axis designation 1 X1C07.075 Axis designation 2 Y3C07.053 Axis meaning (axis functions) X,Z,W

After switching on the machine or terminating the NC program, the firstpermitted axis designation (X1 in the example) and the first permitted axismeaning (X in the example) apply for each axis.

The axis designation and axis meaning of an axis can be changed usingNC 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.

Setting axis parameters

Default state

Level selection

Notation

Page 41: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-17

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Plane Selection "G17", "G18", "G19"

G17

G18

G19

The first permitted axis meaning corresponding to the axis parameters isselected for each axis of the process in the first step.

Then the plane defined by the axes with the following axis meanings isselected:

1. Axis 2. Axis Verticalof the plane: of the plane: axis:

G17: X Y ZG18: Z X YG19: 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.

< A

< 7

< �

��� '���;3<

��!� '���;6<

��!� '���;4<

�������

��!����

�������

�+� ��02

�+� ��10

�+� ��21

314Ebene.EPS

Fig. 3-20: Processing planes

Syntax

Description

Page 42: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-18 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Free Plane Selection "G20", "G21", "G22"

G20 axis10 axis20 axis30 G20 axis10 axis20

G21 axis10 axis20 axis30 G21 axis10 axis20

G22 axis10 axis20 axis30 G22 axis10 axis20

axis10 and axis20 are mandatory parameters, axis30 is optional.

Axis1, axis2 and axis3 are axis designations. If an axis designation con-sists of only one letter, a "0" must be added. If it consists of one letter witha 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

G20 axis10 axis20 axis30G21 axis10 axis20 axis30G22 axis10 axis20 axis30

for the axes with the axis designations axis1, axis2, axis3, the followingaxis meanings are selected:

axis1 axis2 axis3

G20: X Y ZG21: Z X YG22: Y Z X

then the following plane is selected:

1. Axis 2. Axis Verticalof the plane: of the plane: axis:

G20: axis1(X)axis2(Y)axis3(Z)G21: axis1(Z)axis2(X)axis3(Z)G22: axis1(Y)axis2(Z)axis3(X)

G20 axis10 axis20G21 axis10 axis20G22 axis10 axis20

for the axes with the axis designations axis1, axis2, axis3, the followingaxis meanings are selected:

axis1 axis2

G20: X YG21: Z XG22: Y Z

then the following plane is selected:

1. Axis 2. Axisof the plane: of the plane:

G20: axis1(X)axis2(Y)G21: axis1(Z)axis2(X)G22: axis1(Y)axis2(Z)

Syntax

With vertical axis

Without vertical axis

Page 43: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-19

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 Verticalplane 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)

For G20, G21 and G22, only permitted axis meanings may be selected foreach participating axis designation. If an axis meaning that is assigned toone axis designation is to be selected for another axis designation, theaxis meaning is selected by exchanging the axis meanings.

The selection of the axis meanings forG20 axis10 axis20 {axis30}G21 axis10 axis20 {axis30}G22 axis10 axis20 {axis30}

is carried out in the order that is prescribed by axis10, axis20 {, axis30}.For each axis, the starting point is the first permitted axis meaning corre-sponding to the axis parameters.

Example:

The following axes are parameterized:Axis number 1 2 3 4Axis designation X1 C Z X2Axis 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 axismeanings:

Axis designation : X1 C Z X2First permissible axis meaning: X C Z WAxis meaning acc. to first selection: Z C X WAxis meaning acc. to second selection: Z Y X WAxis meaning acc. to third selection: W Y X Z

NC command G20 Z0 C0 X2=0 is thus permitted with the given axis pa-rameters.

Permitted axis meanings

Page 44: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-20 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Boundary conditions• An axis designation may occur only once within a G20/G21/G22

command, i.e. axis1 ≠ axis2 ≠ axis3 , axis1 ≠ axis3 .

• Tool magazine axes and spindles are excluded.

• The working plane may also be spanned by a maximum of two rotaryaxes.

• If a third axis (vertical to the plane) is specified, it must be a linearaxis.

• If an NC set contains a G20/G21/G22 command, the only additionalaxis designations that may be programmed are the ones used for freeplane 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 selec-tion 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 atransition to manual mode (if process parameter "Manual axis joggingcauses reset" has been set), the NC selects the basis system ofcoordinates stored in the parameters. This means that it selects thefirst axis meaning for every axis in the axis parameters underCxx.053. It also selects the working plane that is saved there(process parameter Bxx.004, default plane selection).

Effects

Programmed coordinate values always refer to axis designations.

Effective radii are always based on axis meanings, namely the effectiveradius RX on the axes with the axis meanings X and A, RY on Y and Band RZ on Z and C.

For the acceleration factor, programmed coordinate values refer to axisdesignations.

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 XYplane (G17).

For lateral cylinder surface machining with G32, the effective radius RIrefers to axis meaning X. Generally, a plane selection must be carried outwith 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.

Coordinate values

Effective radii (RX, RY, RZ)

ACC

G00, G01

G02, G03

G16

G31

G32

G33

Page 45: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-21

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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-cor-rection. The radius correction (tool path correction) affects the selectedplane (machining plane).

The coordinate values that are programmed with G50, G51 and G52 referto axis designations. However, these are entered in the ZO table underthe associated active axis meanings. This must be taken into accountespecially 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 theselected plane.

In the case of thread tapping with G65, only axis designations with axismeanings 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 pro-grammed with the F word refers to axis meanings.

In addition to referring to the active spindle, constant cutting speed G96refers to the axis meaning of X as the feed axis. If the selected plane ismodified, G96 is deselected and the spindle speed in rpm function (G97)becomes active.

Note: Please refer to the description "Free plane selection and lateralcylinder surface machining" for further information about freeplane selection.

Example:

A combined drilling and radial facing slide has the following axes within aprocess (process 0):

Axis des-ignation

Permitted axismeanings

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

G41, G42

G48, G49

G50, G51, G52, zero offsets(ZOs)

G65

G74, G75, G77

G95

G96

Page 46: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-22 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

First, a preliminary hole is drilled with G17 on a workpiece that can bedisplaced in the XY plane (feed axis Z1, main spindle S1). This is thenbored in the same process using a radial facing slide with a constant cut-ting speed. The radial facing slide rotates around the axis with the desig-nation Z2 (feed axis) and is displaced in the radial direction along the axiswith the designation U. As a result, the drill hole can principally be drilledto any cylinder-symmetric form referring to Z2. This machining is similarto that of the lathe, requiring as the machining plane the Z2-U plane thatis selected with G21 Z2=0 U0 Y0. G96 is used to set the desired constantcutting speed.

Linearmainaxes

Secondary axes Rotary main axes

G code Mean.X

Mean.Y

Mean.Z

Mean.U

Mean.V

Mean.W

Mean.A

Mean.B

Mean.C

Mach-iningplane

Vert.Axis Remarks

G17 X Y Z1 U - Z2 - - - X Y Z Prelim. drilling(power-up state)

G21 Z2=0 U0 Y0 U Y Z2 X - Z1 - - - Z2 U Y Boring w/ radialfacing slide

� ��� ��

.

4

)��

/���� 5�'���� ���

61�-*���'��%�����1'�$$���

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 thedesignation Z as the feed axis and does not refer to U. With G20 U0 Z0Y0, tool correction L1 for the radial facing slide tool refers to the axis withthe designation U and L2 refers to Z, which is the opposite of what itshould be.

With G22, the desired utilization of G96 is impossible from the start be-cause the vertical axis contains axis meaning X.

Page 47: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-23

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

A turning center possesses the following axes within a process (axeswithin 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

4

�C�

$

3 3�

&

��

6

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 definedby the following axis designations are selected during machine operation:

Linearmainaxes

Secondary axes Rotary main axes

G code Mean.X

Mean.Y

Mean.Z

Mean.U

Mean.V

Mean.W

Mean.A

Mean.B

Mean.C

Mach-iningplane

Vert.Axis Remarks

G18 X1 Y Z U - X2 - B C Z X1 Y Turning (= power-on state)

G20 X2=0 Y0 Z0 X2 Y Z U - X1 - B C X2 Y Z Milling (= G17 with X2)

G20 Z0 X2=0 Y0 Z X2 Y U - X1 - B C Z X2 Y Milling (= G18 with X2)

G20 Y0 Z0 X2=0 Y Z X2 U - X1 - B C Y Z 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 surfacemachining

The following axis meanings must be permitted for the various commandsfor 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

Page 48: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-24 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Fig. 3-23: Required permitted axis meanings for various NC commands for freeplane selection

The permitted axis meanings must be selected for each axis and eachprocess in such a way that the requirements of all the NC commands forfree 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 cross-section. For programming, the CNC offers two possibilities for enteringthe dimensions of the workpiece:

• as a diameter dimension and/or

• as a radius dimension.

G15 Radius programmingG16 Diameter programming

Note: The power-on default for radius and diameter programming isset by the machine builder in the process parameters.

Diameter programming refers exclusively to the X axis.

Example Using diameter programming:

1

0F��GF��G

-�

��

F� GF��G

�.,����*��.

2�

317Durch.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 isinterpreted as the diameter – negative X values (diameter) are per-missible. For circles, circle center points as well as end points are tobe declared as the diameter.

• When declaring an incremental dimension (G91), the diameter differ-ence to the previous position is specified. Based on the old diameter,the tool moves to the new position according to the specified path

Syntax

Page 49: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-25

DOK-MTC200-NC**PRO*V23-AW01-EN-P

difference. Regarding the start point of circles, the circle center pointsas well as the end points are to be specified as a diameter difference.

• The thread lead is interpreted as a radius dimension when machiningface threads on a lathe.

• Functions such as constant surface speed and feed per revolution inthe X direction are not affected by diameter programming.

• If position data are read into an NC variable for the diameter axis, thisis 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 theaxis in which diameter programming is active.

3.8 Measurement units

The basic unit to be used in programming is specified by the machinebuilder in the process parameters. To produce workpieces which are di-mensioned in a different dimensioning unit on this machine, the dimen-sional units can be changed for coordinate values, speed values, andprogrammable offsets by using G functions.

Note: The machine manufacturer defines the base programming unitin process parameter Bxx.001 "Default measurement unit".

Measurement Unit Inch "G70"

G70

If millimeters are set in the process parameters as the basic programmingunit, the subsequent values are interpreted as inch data and are con-verted to millimeters internally after G70 has been programmed.

• Motion commands (coordinate values); for example, X5.5 inches isconverted 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 con-verted 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) andprogrammed offsets (G50 X=@053).

G70 remains in effect until the end of the program or until it is overwrittenby G71.

Syntax

Page 50: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-26 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Unit Millimeters "G71"

G71

If inches is set in the process parameters as the basic programming unit,the subsequent values are interpreted as millimeter data and are con-verted to inches internally after G71 has been programmed.

• Motion commands (coordinate values); for example, X127mm is con-verted to X5 inches.

• interpolation parameters I, J and K and radius R;

• feed data F and G95 F – for example, F1500 mm/min is internallyconverted to F59.05 inches/min;

• programmable offsets G50, G51 and G52;

• movement commands assigned by means of NC variables (X=@050), in-terpolation parameters (I=@051), feed rate information (F=@052) andprogrammed offsets (G50 X=@053).

G71 remains in effect until the end of the program or until it is overwrittenby G70.

Example:

2 2�D/ .:D� �� 1

E��0

F��G

.:D�

2�D/

��

F��G

HIHE

��

F��G-2

�������������

F��G F� G

�/1.*��.

318g71.FH7

Fig. 3-25: Millimeters as the basic programming unit, with change to inchesG70

NC program:

G00 G90 G54 X45 Z100 [P0]

G01 X50,8 Z90 F800 [P1]

G70 Change to inches

Z3 F35 [P2]

G02 X3 Z2 I3 K3 [P3]

G71 Change to mm

G01 Z5 [P4]

.

RET

Syntax

Page 51: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-27

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.9 Mirror Imaging of Coordinate Axes "G72" / "G73"

The programmable mirror function permits the mirror imaging of any de-sired coordinate axes within a machining program. When a coordinateaxis is mirror imaged, the original contour is machined symmetrically op-posite in the same size and at the same distance on the other side of themirror-imaging axis.

The activation and deactivation of mirror imaging is programmed usingthe G functions in the subroutine.

The mirror function can be activated via G73. It remains modally activeuntil it is canceled by G72 or until it is automatically reset at the end of theprogram (RET, M002/M030) or by BST. G72 sets all mirror imaging axesback to the default position.

G73 <axis name>-1 Mirror function ONG72 Cancel mirror function for all axes

Rule:

• The signs of the coordinates of the mirror-imaged axis are inter-changed.

• 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 inter-changed (X-Y, Z-X, Y-Z).

• In the case of circular interpolation, the direction of rotation remainsthe same.

• The machining direction of the path correction remains the same.

Zero offsets G54 - G59, G52 and the adjustable offset are not mirror im-aged. The programmable zero offsets G50 and G51 are also mirrored inprogramming 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. Toolpath correction and NC block preparation are terminated when mirrorimaging is selected. Tool lengths are not mirror imaged.

• When main axes are mirror imaged, the workpiece is always mirrorimaged.

• The position display shows the corresponding workpiece coordinates.

Syntax

Mirroring one axis

Mirroring two axes

Page 52: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-28 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: Mirror imaging

0

2

7� -� :�

��

� �� �� 2� .�

��

��-�2�

:�.�

����� �*��.

319Spieg.FH7

Fig. 3-26: Correlation when mirror imaging one or more coordinate axes

NC program:

G00 G54 G90 X0 Y0 (1) No axis mirror-imaged

BSR .TRIA

G50 X50 (4) X axis is mirror-imaged

G73 X-1

BSR .TRIA

G72

G50 X-20 Y40 (3) X and Y axes are mirror-imaged

G73 X-1 Y-1

BSR .TRIA

G72

G50 X-50 Y20 (2) Y axis is mirror-imaged

G73 Y-1

BSR .TRIA

G72

RET

.TRIA Subroutine for the triangle

G90 G01 X30 Y30 F1000 Triangle starting point

X130

X30 Y90

Y30 Endpoint = starting point

G00 G54 X0 Y0

RTS

Page 53: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-29

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.10 Scaling "G78" / "G79"

The scaling function provides programmable scaling factors to change thescale used for the distance to be traveled on all machine axes.

The activation and deactivation of the scaling function is programmedusing the G functions in the subroutine.

Scaling can be activated via G79. It remains modally active until it is can-celed 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 thedefault state.

G79 <axis name><scaling factor> Scaling ONG78 Scaling for

all axes OFF

The following values are recalculated for scaling:

• Axis coordinates

• Interpolation parameters

• Radius

• Programmable zero offsets G50 and G51

• Thread pitch

• Effective clearances

Zero offsets G54 - G59, G52 and the adjustable offset are not mirrorscaled. The programmable zero offsets G50 and G51 are also scaledduring 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 no-minal radii RX, RY and RZ, the scaling factors used in the active ma-chining plane must always be quantitatively identical.

• Selecting scaling does not result in any axis movement. Tool pathcorrection and NC block preparation are terminated when scaling isselected. Tool lengths are not scaled.

• With circular interpolation, an error message will be issued if thescaling factors have different absolute values. The same applies torotary axis programming using nominal radii.

• The numerical value which results after recalculation using the scal-ing factor appears in the position display. The actual value and the re-maining 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 firstfollowed by scaling.

Syntax

Page 54: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-30 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: Scaling

0

2

7�

��

��

-�

2�

:�

.�

� �� �� -� 2� :� .� /� �� �� � �� �� -� 2�

� �� �� -� 2� :� .� /� �� �� � ��

��

��

-�

2�

.�

:�

0

F�����+��" �� �(�" ��� ��� � �������������

����=���*��.

320Skali.FH7

Fig. 3-27: Sample program – scaling

NC program:

G00 G54 G90 X0 Y0

BSR .TRIA (1) Triangle without scaling

G50 X40 Y-70 Move zero point

G79 X0.5 Y0.5 Set the scaling factors

BSR .TRIA (2) Triangle with scaling

G78 Cancel scaling

G00 G54 G90 X0 Y0

RET

.TRIA Subroutine for the triangle

G90 G01 X25 Y30 F1000 Start position

X100

X25 Y70

Y30 Final position = starting position

RTS

Page 55: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-31

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.11 Go to Axes Reference Point "G74"

Movement condition G74 "Go to the axes reference point" allows move-ments to the reference point with one or more axes in an NC program orvia an MDI block entry.

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 referencepoint cycle, each programmed axis is moved at the homing speed thathas been entered in the axis parameters.

• 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 blockmust be defined as zero.

• If a number of axes are programmed in a G74 block, the axis move-ment of the axes is not performed with interpolation.

• A feed rate programmed in a G74 NC block will also remain active forother types of interpolation.

Note: The reference dimensions and the reference point cycle trav-ersing speed are set by the machine builder in the drive pa-rameters.

3.12 Feed to positive stop

The function Feed to positive stop allows one or more axes to feed to amechanical stop without causing a drive error. Possible applications areto preload an axis slide at the stop position during machining or to use theaxis position at the stop as a reference position for further machining.

Festanschlag.FH7

Fig. 3-28: Feed to positive stop

Syntax

Notes for programming G74

Page 56: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-32 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Feed to Positive Stop "G75"Path condition G75 "Feed to positive stop" causes the axes which areprogrammed together with the function in the NC block to travel in thedirection of the programmed coordinate value.

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 travelin the direction of the programmed coordinate value using the feed, whichis programmed in the G75 block. If a mechanical resistance – for exam-ple, a mechanical stop – is detected during the travel distance, the torquewhich is defined by axis parameter Cxx.044 (Reduced torque at positivestop) is limited to a percentage of the peak current. The command valueis not increased further; the remaining distance and the torque preloadare maintained.

Notes on "Feed to positive stop":

• If a feed value is not programmed in the G75 block, travel-ing will be performed at the speed entered in axis parame-ter "Max. feed to positive stop".

• If the programmed final axis position value of an axis isreached, the following error message is generated:"Positive Stop lies beyond the defined range"If the stop yields and wanders during operation, or if theaxis slide is forced out of position by a strong opposingforce, the axis position is updated. If this results in the NCblock start position not being reached or the NC block finalposition being exceeded, then the error message:"Positive Stop lies beyond the defined range"is issued.

• The dimensional information in a G75 NC block can beentered in absolute mode (G90) or incremental mode (G91).

• If a number of axes are programmed in a G75 block, the axismovement of the axes is not performed with interpolation.

• The stop axis may not be moved between the calls of G75and G76.

Parameters "Reduced torque at positive stop" and "Max. feedto positive stop" are set by the machine builder in the axis pa-rameters.

Syntax

Page 57: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-33

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

� �� A�

��F ��*��.

321Fest.FH7

Fig. 3-29: Feed to positive stop

NC program:

G00 Z100 M3 S1250 Z axis to starting positionG75 Z170 F200 Feed to positive stop . . Programming of movements on the . stop axis is impossible!

G76 Cancel axis preloadG01 Z100 F1000 Z axis to starting positionG00 Z0 M5 Z axis to reference pointRET

Programmable TorqueIn "Feed to positive stop G75", the torque at which the positive stop isdetected and the holding torque can be adjusted individually. The pa-rameter settings are performed with the AXD commands.

Besides axis parameter "Cxx.044 Reduced torque at positive stop", the torquewhen feeding to the positive stop can be programmed process-dependentlyvia the AXD parameters in the NC or PLC program.

65017 (P-7-3577) Reduced torque of the digital drive (in percent)during movement to the positive stop The posi-tive stop is detected at this torque.

65018 (P-7-3578) Reduced torque of the digital drive (in percent) atthe positive stop This value takes effect only if it isless than the value that was entered in the "Re-duced torque at positive stop" axis parameter andless than 100%. The positive stop is held at thistorque.

NC program example

@41=AXD(X:P-7-3577) ; Save preselected values@42=AXD(X:P-7-3578)AXD(X:P-7-3577)=200 ; Values required for processingAXD(X:P-7-3578)=120 ; Write (multiplication factor = 40)G75 X200 F500 ; Drive to positive stop...G76 ; Cancel torque preloadAXD(X:P-7-3577)=@41 ; Saved preselectedAXD(X:P-7-3578)=@42 ; rewrite values

The torque at which the positive stop is detected is programmed with AXDparameter "65017 (P-7-3577)". After the positive stop is detected, the axisis held to the positive stop with the programmed torque in AXD parameter"65018 (P-7-3578)" until the torque preload is cancelled with G76.

Page 58: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-34 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Cancel All Axis Preloads "G76"Path condition G76 "Cancel all axis preloads" causes the preloads on allpreloaded axes to be canceled. The actual position value is used as theposition command value so that the axis positions can be used as refer-ence positions for further movements. The distance-to-go is ignored.

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 withaxis data. G76 cancels the axis preloads on all axes whichare preloaded using G75 "Feed to positive stop".

• If a program is terminated by NC command RET, by abranch with stop BST, when the NC program is manuallyreset via Control Reset, or if there is a power failure, allaxis preloads are automatically canceled.

3.13 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 pro-grammed in the changeable software limits.

�������� �

7�2���3 ���������227�2���*����� �*��������22

�����������

*�.$��*�#8*��78

�78�"����%�'�������

+9�$�����2����

softlimit.FH7

Fig. 3-30: Changeable software limits

Note: The position values are written as machine coordinates.

Syntax

Page 59: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-35

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Machine DataThe changeable software limits are adjusted axis-specifically in page 12of 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 machinedata menu, in the NC program and in the PLC.

The element "Prog. traverse range limit active", which is intended to visu-alize the PLC interface signal, can be accessed only in read mode.

PLC Interface Signal

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 trav-erse 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

X200

...

The positive traverse range limit is reduced to 122.6 mm by the pro-grammable positive traverse range limit (the limit stored in the axis pa-rameter is larger). An error is generated when moving to X200 after theprogrammable traverse range limit has been set to 122.6.

AxxC.LIMIT

AxxS.LIMIT

Page 60: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-36 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 fromthe contour in manual mode—to check and replace the inserts on thetool, for example—the "Reposition" function allows the operator to returnto the point of interruption; the NC block "Restart" function allows him totravel back to the starting point of the NC block.

Both functions are available in the manual and program-driven modes. Inmanual mode, the controller compensates for the difference between thetarget position and the actual position in the order in which the userpresses the jog keys. In the program-driven modes, the axes are movedto their destination positions in the order which is programmed by themachine builder in an NC subroutine.

Reposition and restart in the automatic operating modesOperators frequently use reposition and restart in manual mode only toreturn the axes in the vicinity of the contour. Once the possibility of colli-sions is eliminated, the operator changes to one of the automatic operat-ing modes (automatic or semi-automatic) or executes the program inmanual mode and then continues repositioning or restart by pressing thestart key.

By changing to an automatic operating mode well enough in advance, toolracing and tool racing marks on the workpiece can be avoided. Followingrepositioning or restart, the NC resumes program execution without per-forming an NC restart.

4

3

>����� ����� �����

F !�(�" ��

&���=�� �� �������������

+��� ���������� �G>� � ���� ����������

&���=�8�!��������

4

3

>� ���� ����� �����

F !�(�" ��

+��� ����������G&���=�� �� ����� ���������

>� � ���� ����������

&���=�8�!��������

322Rueck.FH7

Fig. 3-31: Reposition and restart in the automatic operating modes

Pressing machine operating key "Reposition" or "Restart" selects the de-sired function. Pressing the Start key starts the repositioning or restarting;the NC axes are moved accordingly to the destination position in a fixedorder.

• The machine builder can specify the order in which the NC axes aretraversed to the contour. This order can be adapted to the givenmachine configuration. This is especially necessary when additionalrotary main axes are present in addition to the spindles and the linearmain axes.

• Program execution resumes without an additional NC start as soonas the NC has reached the destination point.

Page 61: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-37

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Repositioning and Restarting to Destination Position "G77"G77 causes the NC to traverse to the destination position for the pro-grammed feed axes and, in the case of spindles, to restore the statuswhich existed prior to the interruption. With G77, the NC traverses theexisting distance-to-go between the destination position and the currentposition for feed axes (axis meanings: X, Y, Z, U, V, W, A, B, C) by per-forming an interpolation operation similar to the G00 interpolation. It usesthe target position in machine coordinates that was determined at thebeginning of the repositioning or restart operation as the target positionfor the axes.

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 re-cently active speed for the spindles or causes the NC totraverse to the specified destination position. The NC usesthe positioning speed which was previously parameterizedfor spindle positioning to move to the target position. Anadditional F or S value is not needed to specify the posi-tioning speed.

• With rotary axis-capable main spindles (C-axis), the stateupon interruption (main spindle/rotary axis mode) must bestored in the PLC. With repositioning or restart, the rotaryaxis-capable main spindle must be moved to completion inthe corresponding interruption state (main spindle/rotaryaxis mode).

4

3

>����� ����������

F !�(�" ��

+��� ����������G&���=�� �� ����� ���������

>� � ���� ����������

&���=�8�!���������

���#H�=�*��.

322Rueck2.FH7

Fig. 3-32: Repositioning and NC block restart to the contour

Syntax

Page 62: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-38 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.15 NC Program Restart with "ADJUST" and "REPOS"

NC program restart is used to establish the states in the controller and themachine that are required to be able to start or resume the working se-quence from any block in the NC program.

Note: The "NC program restart" function requires cooperation be-tween the NC controller and the PLC. The machine manufac-turer usually makes all necessary presets.

ProgrammingNC program restart is divided into two sections. All processes that arecomputed by the NC but not executed are programmed in the "ADJUST"subroutine. The subroutine and, consequently, the NC program restartare invoked using the ".ADJUST" label.

The final state after the execution of the subroutine must be the initialstate 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 tocontour or repositioning process to be performed.

Note: Subroutine "ADJUST" must be called before the REPOS sub-routine (without RTS!). Thus, to be able to correctly repositionto the contour after an NC program restart, the "REPOS" sub-routine must immediately follow "ADJUST".

The "ADJUST" subroutine enables the machine manufacturer to establishthe states that are required for program entry on the machine. In thissubroutine, the machine manufacturer mainly provides for the output ofthe necessary auxiliary functions and for the necessary tool and work-piece changes.

If a reverse occurs during the execution of the ADJUST subroutine, theNC branches to the related jump label and continues execution there be-fore it branches to the ".HOME" label.

The user can store the ADJUST subroutine in the current NC program, inthe 99 program, or in the cycle memory.

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 toolsor workpieces are supplied from a different process or an external sourceduring program execution.

DIN 66025 (Part 1) defines a colon ":" as the primary block character. Thecolon must be programmed as the first character within an NC block.

Task of NC program restart

Primary blocks

Page 63: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-39

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

Primary blocks were programmed in the following programming examplein order to provide the operator with a quick program entry during the NCprogram restart.

:; Section II lathing: T12 M6G92 S2800G0 G6 G8 G54 G97 X50 Z20 S1500 M3G1 X48 F2000

Note: A slash "/" must be programmed before the colon if a primaryblock is also to be a skipped block. Primary blocks can also beprogrammed in subroutines.

When primary blocks are programmed, it must be ensuredthat the start block is located before an incremental dimensionspecification (G91) and before an incremental zero point offset(G51).

.ADJUST@127=G(3) @128=G(4) @129=G(6) ;Retain tool path correction, zero

offset and dimensions@130=M(2) @131=M(5) ;Retain spindle commands and cool-

ant@126=T ;Retain selected (pre-positioned) toolT= MTD(60,,,5) BSR .M6 ;Change to required toolT=@126 MTP ;Pre-position selected toolG=@128 G=@129 ;Set saved zero offset and dimen-

sionsG=@127 ;Set saved tool path correction;Q9500 ;Go to manual mode;.REPOSG77 S0 MTP ;Adjustment of spindle and magazine(pre-position selected tool)MRY ;Wait until magazine mvmt. is com-

plete;;set auxiliary functionsM=@130 M=@131;;Adjustment of the linear axes dependingon the selected plane@100=G(2)-18 BEQ .REPOS1 ;Plane@100=G(2)-19 BEQ .REPOS2G77 X0 Y0 F2000G77 Z0 F2000 RTS.REPOS1G77 Z0 X0 F2000G77 Y0 F2000 RTS.REPOS2G77 Y0 Z0 F2000G77 X0 F2000 RTS

Fig. 3-33: ADJUST and REPOS subroutine

ADJUST and REPOS subroutine

Page 64: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-40 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Special NC-Specific Features in NC Program Restart

The last auxiliary function output within the individual M, Q, S, T, and Efunction groups during the NC block restart can be read at the end of thecomputing sequence and be sent to the PLC.

Note: At the program end and after a control reset, the NC initializesall 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 last40 M functions of M function group 16 and the last 40 Q functions duringthe NC program restart within the "M(16) and Q function buffer" page.

Note: M19 commands (M19, M119, M219, and M319) are not storedwithin the "M(16) and Q function buffer" page.

With certain exceptions, the NC processes the NC commands during aNC 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 thecomputing run.

The transformation for facing (G31) or lateral cylinder surface machining(G32) must be selected at the end of the NC program restart processaccording to the setting of the "Transformation selection" machine dataelement of the "NC program restart and REPOS" page within the"ADJUST" subroutine.

The drives do not execute the "Homing axes" function (G74) during theNC program restart. Thus, the actual position is not changed when a G74command is executed.

When the NC executes the "Feed against positive stop" (G57) commandduring the computing run, it does not move the drive concerned. Thus, themotor current is not increased due to the mechanical resistance.

With NC-controlled spindles, the NC does not execute the spindle controlcommands (Mj03, Mj04, Mj05, Mj19; with "j" equal to 1, 2, or 3) during thecomputing run. It issues the auxiliary functions to the PLC (as in normaloperation) only if this has been preselected in the process parameters.

The NC retains the states of the spindles with rotary axis capability thatare required for the subsequent program entry and stores them in the "NCprogram restart and REPOS" page. The states that are required for theprogram 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) ac-cording to the necessary modes (same as after an interruption). Whichmode is to be selected can be obtained from machine data page 60 "NCprogram restart and REPOS".

Auxiliary function buffer

Working principle

dwell time

Transformation for facing/lateral cylinder surface

machining

Homing axes

Feed against positive stop

Spindle Control Commands

Page 65: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-41

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

A spindle with rotary axis capability and the designation S1/C1 requiresthe mode (spindle/rotary axis mode) that is necessary for further opera-tion to be established after an interruption and/or after the NC programrestart in the REPOS subroutine.

.REPOS:

@100=MTD(60, 0, 0,1)-1 BEQ .ADJ_5 ;Page:60, process:0, Data element: 1 (rotary axismode for S1)

G77 S1=0 ;Select spindle modeBRA .ADJ_6.ADJ_5G77 C1=0 ;Select rotary axis mode.ADJ_6

:

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 programmode. If the machine manufacturer has selected this feature in the proc-ess parameters, the NC transfers them to the PLC.

During the NC program restart, the NC executes the process controlcommands (DP, SP, RP, AP, WP, LP and POK) and the process syn-chronization commands (WES and WER) as in normal operation. It isrequired, however, that the individual programs have been started in theindividual processes as in normal operation.

If the other processes are not to be taken into account (i.e. not to be influ-enced) during NC program restart because they may have alreadyreached the required program locations in normal mode or via NC pro-gram restart, a skip slash or a conditional jump instruction that precedesthe process control commands or process synchronization commandscan be used.

During the computer run, data exchange with digital drives (with SERCOSinterface) via AXD commands is performed as in normal program opera-tion. This also applies to APR SERCOS parameters that are processedby the APR.

Note: AXD commands that bring about a movement must be acti-vated via the PLC using an auxiliary function that is not issuedand/or not processed by the PLC during NC program restart

Program control commands andgear switching functions

Process control andsynchronization commands

Recommendation

Data exchange with digitaldrives with SERCOS Interface

Page 66: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-42 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

Certain functions (such as AXD commands) are not to be issued to thecontroller 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, specificfunctions can be skipped that are not to be executed in the NC during theNC program restart.

:BES .BP1 1:15AXD (X:S-0-0104)=7000 ;new KV factor for X axisAXD (Y:S-0-0104)=7000 ;new KV factor for Y axisAXD (Z:S-0-0104)=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 proc-essed during the NC block restart (e.g. the AXD commands). As long asthese functions were activated using an auxiliary function type (e.g. usingQ functions), their output to the PLC can easily be implemented duringthe NC program restart process. To do this, just set the related processparameter:

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 axisQ102 ;new KV factor for Y axisQ103 ;new KV factor for Z axis

:

The NC executes the axis transfer commands (GAX and FAX) as in nor-mal program operation. If the NC comes to a FAX command during thecomputing run, the NC waits until the axis is requested by a different pro-cess (which may also be in an NC program restart process) via GAX.Correspondingly, the NC waits during an axis request using "GAX" untilanother 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 areused to acquire the current actual position of analog drives) during thecomputing run.

Additional and supplemental information about the "NC program restartand REPOS" function can be found in the "NC program restart" descrip-tion

"DOC-MTC200-SATZVOR*Vxx-ANW1-EN-P".

Axis transfer

Read position value

Detailed description

Page 67: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Commands, Dimension Inputs 3-43

DOK-MTC200-NC**PRO*V23-AW01-EN-P

3.16 Adaptive Depth "G68" / "G69"

Adaptive depth assists a 2nd encoder system which, for example, is usedfor the compensation of workpiece fixing errors (surface sensors).

G75 <[axis name][coordinate value]> <feed> switches the motor encoderto the 2nd encoder

G68<[axis name][coordinate value]> <feed> switches the 2nd encoder tothe motor encoder

The parameters of the 2nd encoder are set in axis parameters Cxx.087,Cxx.088, Cxx.089, Cxx.090 and Cxx.091. Switching is performed with anextended encoder using G code G69. The encoder system is switchedback with the encoder still extended using G68.

Application

Application 1For adaptive positioning with a linear sensor. Switching is performed dur-ing movement.

Application 2To switch from a motor encoder to an external measuring system. Theexternal measuring system can either be a linear encoder, a rotation en-coder for circular axes, or a linear sensor. Switching is performed in astandstill condition, but under power and with controller release.

New Axis ParameterFurther axis parameters are offered when switching to a 2nd encodersystem if Motor encoder was preselected in the axis parameter "Positionencoder setup".

• Cxx.087 Adaptive control

• Cxx.088 Reference value of the 2nd encoder system

• Cxx.089 Positive travel limits of the 2nd encoder system

• Cxx.090 Negative travel limits of the 2nd encoder system

• Cxx.091 Permissible sensor deflection in the 1st encoder system

Note: The reference value of the 2nd encoder system must lie out-side of the travel limit in order to exclude the possibility of un-desired movements if the workpiece is not reached!

Syntax

Page 68: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

3-44 Motion Commands, Dimension Inputs NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

G Codes to Switch to a 2nd Encoder SystemTwo new G codes exist to switch between the two encoder systems.

• G69 switches to the 2nd encoder

• G68 switches back to the motor encoder.

The G codes are modally inactive

A switch to the 2nd encoder is performed under a standstill condition if Gcode G69 is cancelled when G09 was preselected. In the 2nd encodersystem, the axis coordinate value is being approached as the target posi-tion when G08 is preselected.

Example of "Switching in a standstill condition":

G69 G09 X0 ;Switch to 2nd encoder system

G01 X10 ;Move the axis in the 2nd encoder system

G68 G09 X0 ;Switch to 1st encoder system

G01 X120 ;Move the axis in the 1st encoder system

Example of "Switching on-the-fly":

G01 G08 G90 X200 ;Move the axis in the 1st encoder system

G69 X10 ;Switch to 2nd encoder system

G01 G08 X20 ;Move the axis in the 2nd encoder system

G68 X50 ;Switch to 1st encoder system X50 describes a position in the 2nd encoder sys-tem

Note: Also see the documentation "Adaptive depth".

Page 69: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

4 Motion Blocks

4.1 Axes

Linear main axesThe 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 NCprogram) is freely selectable; however, the meaning of the axis is definedby the position of the axis in the coordinate system (see next fig. "Linearmain axes", sequence "Rotary main axes"). In the CNC, the axes arepermanently assigned to specific processes; however, they can be for-warded to other processes. An axis cannot be addressed simultaneouslyin more than one process.

Circular interpolations and the tool radius path correction can be performedonly within the machining planes spanned by the linear main axes (planeselection with G17, G18, G19, and free plane selection with G20, G21, G22).

Rotary Main AxesRotary 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 rotatesaround (see next fig. "Linear main axes"). The axis name (the address ofthe axis) is freely selectable; however, the axis meaning is defined by theposition of the axis in the coordinate system. With absolute positioning(G90), the traverse range is ± 360.000 degrees. With absolute positioning(G90), the position which is programmed in an absolute statement is trav-ersed via the shortest possible path. With incremental positioning (G91)the traverse range is ±999999.9999 degrees or ±99999.99999 degrees(parameter-dependent). The sign indicates the traverse direction.

< A

< 7

< �

��� '���;3<

��!� '���;6<

��!� '���;4<

�������

��!����

�������

�+� ��02

�+� ��10

�+� ��21

F,G

F)G

F�G

41Koor.FH7

Fig. 4-1: Linear main axes (X, Y, Z) and rotary main axes (A, B, C) in a Car-tesian reference coordinate system

Page 70: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-2 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Linear and Rotary Auxiliary AxesLinear and rotary auxiliary axes can occupy any given position within thespatial 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 se-lected for linear and rotary axes, as well as for rotary axis-capable mainspindles.

Like the other axes, auxiliary axes take part in positioning processes andinterpolation movements, and like these reach their programmed finalvalue simultaneously. However, the path feed rate (F value) specified inthe NC program does not apply to the auxiliary axes, but to the linear androtary main axes if they are programmed within an NC block.

4.2 Interpolation conditions

Following Error-Free Interpolation "G06"

G06

A following error-containing algorithm is activated for the axis movementsusing interpolation condition G06. All of the following path movements areperformed in a real path mode. The NC block transitions are not rounded,and they are processed free of interruptions. The path velocity is reducedto nearly zero near contour corners (path bends). The minimized followingerror mode is realized by means of a dynamic feed forward system. Afollowing error only occurs within the 2 ms limits of the interpolation clock.

• Virtually lag-free operation can be achieved only if Bosch Rexroth di-gital drives are used. With analog drives, G06 results in a reduced-following error operation.

• After it is selected, G06 remains modally active until it is canceled by G07or 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'smaximum mechanical load limits. A higher gain factor produces abetter dynamic characteristic of the axis movements.

Syntax

Page 71: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Examples:

:$'� 1$'1���5��'� �1�

� ��1$� � �1��)�;��� �1�<� ��1$� � �1��8122����=� ��<

!9���$�1��5�'�1�< ������

�1$� � �1��=� ��$�4�+9�$� �22�

'� # � � � � $ � � � . 5" 7 � � � J � < � � � " � � � � 5 A< � � J � < � 7

+9�$�)�$����� �1�< �����1'�$$<���$���

+9�$�#�2���< ��+9�$�0>��<�)����� �7������+9�$

+9�$�)�$����� �1�< �4����1'�$$<���$���

+9�$0>��<�)��� �� �7 ������+9�$+9�$�#�2���< ��

�1$� � �1��=� ��$��+9�$� �22�

� � � +� � � � � � � � � � � � �

-�-I� ��*��.

402Kreis.FH7

Fig. 4-2: Circular interpolation with F8000 mm/min and following error-freeinterpolation

In the circle shown above, the following error is multiplied by anexpansion factor of 1693.7. Here is the partial program for the circle plots(see above and following sequences):

T11 BSR .M6 Tool change SF D10G00 G90 G54 G07 G08 X199 Y136 Z5 Start positionS5000 M03 Spindle ONG01 Z-5 F1000 Lower cutter into materialG41 X199 Y141 F8000 [or F1000] Start point of circular machiningG03 X180 Y122 I199 J122 Start circleG01 X180 Y100 Transition elementG02 X180 Y100 I100 J100 Full circle ∅160G01 X180 Y77 Transition elementG03 X198 Y59 I198 J77 Exit circleG00 Z5 Withdraw tool to safety clearanceT0 BSR .M6 Tool changeRET Program end

Due to the compensated following error, the actual contour is nearly ideal fromthe NC controller point of view. A position deviation of 0.002 mm occurred onlyat the transition between the quadrants. The position deviation at the transitionbetween the quadrants can almost be completely compensated by program-ming a friction torque compensation.

Page 72: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-4 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

:$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<

� ��1$� � �1��8122����=� ��<!9���$�1��5�'�1�< ������

< � � � " � � � � 5 A< � � J � < � 7

'� # � � � � $ � � � . 5 " 7 � � �

-�-I� ��*��.

� � � � � � � � � � : � � � � � � � � +� � $ � � � � / : � +% � � � � � � �K% � . � � � � @ � � � � � � �

�1$�� �1��=� ���+9�$�4�22�

�1$� � �1��=� ���+9�$��22�

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 rateof F1000 mm/min.

:$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<� ��1$� � �1��8122����=� ��<

!9���$�1��5�'�1�<������

�1$� � �1��=� ��$�+9�$�4��22�

'� # � � � � $ � � � . 5" � � � J � < � � � " � � � � 5 A< � � J � < � 7

+9�$�)�$����� �1�< �����1'�$$<���$���

+9�$�#�2���< ��+9�$�0>��<�)��� �� �7 ������+9�$

+9�$�)�$����� �1�< �4����1'�$$<���$���

+9�$�0>��<�)��� �� �7 ������+9�$+9�$�#�2���< ��

�1$� � �1��=� ��$�+9�$���22�

� � � +� � � � � � � � � � � � �

-�-I� ��*��.

404Kreis.FH7

Fig. 4-4: Circular interpolation with F1000 mm/min and following error-freeinterpolation

Page 73: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The figure below shows an evaluation of the position deviation in the tran-sition between the quadrants.

:$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<

� ��1$� � �1��8122����=� ��<!9���$�1��5�'�1�< ������

< � � � " � � � � 5 A< � � J � < � 7

�1$�� �1��=� ��

'� # � � � � $ � � � . 5 " � � � � L �

-�-I� ��*��.

� � � � � � � � � � : � � � � � � � � +� � $ � � � � / : � +% � � � � � � �K% � . � � � � @ � � � � � � �

+9�$�

�1$� � �1��=� ���+9�$�4�22�

�22�

405Kreis.FH7

Fig. 4-5: Circular interpolation with following error-free interpolation, sectionF1000

Interpolation with Lag Distance "G07"

G07

A following error-containing algorithm is activated for the axis movementusing interpolation condition G07. It is active and locked until it is over-written by G06. G07 is reset automatically at the end of the program(RET) or by the BST command. NC block transitions which are not tan-gential will be rounded.

Example:

Syntax

Page 74: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-6 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

:$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<� ��1$� � �1��8122����=� ��<

!9���$�1��5�'�1�<������

�1$� � �1��=� ��$�+9�$�4��22�

'� # � � � � $ � � � . 5" 7� � � J � < � � � " � � � � 5 A< � � J � < � 7

�1$�� �1��=� ���+9�$���22�

� � � +� � � � � � � � � � � � �

-�-I� ��*��.

+9�$�)�$����� �1�< �����1'�$$<���$����?��(

+9�$�#�2���< ��+9�$�0>��<�)��� �� �7 ������+9�$

+9�$�)�$����� �1�< �4����1'�$$<���$����?��(

+9�$�0>��<�)��� �� �7 ������+9�$+9�$�#�2���< ��

406Kreis.FH7

Fig. 4-6: Circular interpolation with F8000 mm/min and G07

In the circle shown, the following error was multiplied by an expansionfactor of 527.5. On the other hand, the expansion factor for G06 was amultiplication factor of 1693.7, which is more than three times the value;this explains the variations of the position deviation. Here is the partialprogram for the circle plots (see above and following sequences):

T11 BSR .M6 Tool change SF D10G00 G90 G54 G07 G08 X199 Y136 Z5 Start positionS5000 M03 Spindle ONG01 Z-5 F1000 Lower cutter into materialG41 X199 Y141 F8000 [or F1000] Start point of circular machiningG03 X180 Y122 I199 J122 Start circleG01 X180 Y100 Transition elementG02 X180 Y100 I100 J100 Full circle ∅160G01 X180 Y77 Transition elementG03 X198 Y59 I198 J77 Exit circleG00 Z5 Withdraw tool to safety clearanceT0 BSR .M6 Tool changeRET Program end

Page 75: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The diameter of the programmed circle becomes smaller according to theprogrammed speed and the selected gain factor. The programmed con-tour will be maintained with increasing accuracy as the programmedspeed becomes lower and the selected gain factor becomes larger.

:$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<

� ��1$� � �1��8122����=� ��<!9���$�1��5�'�1�< � �����

< � � � " � � � � 5 A< � � J � < � 7

�1$�� �1��=� ��

'� # � � � � $ � � � . 5 " 7� � � � L �

-�-I� ��*��.

� � � � � � � � � � : � � � � � � � � +� � $ � � � � / : � +% � � � � � � �K% � . � � � � @ � � � � � � �

+9�$�

�1$� � �1��=� ���+9�$�4�22�

�22�

407Kreis.FH7

Fig. 4-7: Circular interpolation with G07, section

The next figure shows, for comparison, the same circle at a path feed rateof F1000 mm/min.

:$'� 1$'1���5��'� �1�

� � � � ��1$� � �1��)�;��� �1�<� ��1$� � �1��8122����=� ��<

!9���$�1��5�'�1�< �������

�1$� � �1��=� ���+9�$�4��22�

'� # � � � � � � � � . 5" � � � J � < � � � " � � � � 5 A< � AJ � < � 7

�1$�� �1��=� ��$�+9�$���22�

� � � +� � � � � � � � � � � � �

-�-I� ��*��.

+9�$�)�$����� �1�< �����1'�$$<���$����?� �(

+9�$�#�2���< ��� �+9�$�0>��<�)��� �� �7 ������+9�$

+9�$�)�$����� �1�< �4����1'�$$<���$����?� �(

� �+9�$�0>��<�)��� �� �7 ������+9�$+9�$�#�2���< ��

408Kreis.FH7

Fig. 4-8: Circular interpolation with F1000 mm/min and G07

Page 76: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-8 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The figure below shows an evaluation of the position deviation in the tran-sition between the quadrants.

:$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<

� ��1$� � �1��8122����=� ��<!9���$�1��5�'�1�< �������

< � � � " � � � � 5 A< � AJ � < � 7

�1$�� �1��=� ��

'� # � � � � $ � � � . 5 " � � � � L �

-�-I� ��*��.

� � � � � � � � � � : � � � � � � � � +� � $ � � � � / : � +% � � � � � � �K% � . � � � � @ � � � � � � �

+9�$�

�1$� � �1��=� ���+9�$�4�22�

�22�

409Kreis.FH7

Fig. 4-9: Circular interpolation with G07, partial view with F1000 mm/min

Optimal Speed Block Transition "G08"

G08

Interpolation function G08 is used to adjust the final velocity at the end ofthe NC block to ensure that the transition to the next NC block occurs atthe highest possible velocity. The crucial factor is the maximum velocityjump, which is defined in the axis parameters. In the case of a tangentialNC block transition with the same contour velocity, the transition is madeat the same velocity. The result is that workpiece surfaces are uniform; nofree-cutting marks are produced.

• In the case of a tangential transition and an active G06, e.g. a transi-tion from a straight line to a small circle, the velocity is reduced to thecalculated starting velocity of the next NC block.

• If G61 (exact stop) is programmed with G08 Optimal speed block tran-sition active, G09 Speed-limited block transition is automatically acti-vated (see next page). G08 can be programmed again if G61 hasbeen cancelled.

• Function G08 is active with a feed override of 1%–100%. If the feedoverride is set higher than 100%, the velocity is reduced to 100% inthe 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 pro-grammed.

• After it has been selected, G08 remains modally active until it is can-celed by G09 or until it is automatically reset at the end of the programor by BST.

• Intermediate NC blocks in which no interpolation movements occur donot cause a velocity change. For example, entering an intermediateNC block containing G01 F7000 would cause a speed drop.

Syntax

Page 77: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: The machine builder specifies the maximum feed rate changein the axis parameters.

Examples:

The velocity diagram (above and following sequence) clearly shows howthe NC block transition from the first to the second area is traversed atunreduced velocity. The NC block transition cannot be detected. The feedrate is reduced to F7000 in the NC block transition to the third segment.The velocity is optimally reduced to the NC block starting velocity withoutovershooting.

:$'� 1$'1���5��'� �1�

+9�$�#�2���< ��

<���% .�<�7

��22�������� �������� �1�< � ������ ��� � �3� � ������ ��

��$��� ��#��&� ���0����**� �0�

-�-I� ��*��.

"��.�����#� ���?��B�� � .�$�� �� �� .��.�$�� �� � � ��"7���� �� �"A���

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� � A

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C��1$� � �1��)�;��� �1��A

� � � � � � � � � � 3 � � � � � � � � � �

+9�$�0>��<�)��� �7 ������+9�$� � � � � � � � � � �+9�$�#�2�<� �

��1'�$$<� ���$����?� �(� ���+9�$

"��.

� @22AB2���D ���E��

410Satz.FH7

Fig. 4-10: NC block transitions with G08 and F8000

Sample program for the displayed velocity diagrams in the figures "Blocktransitions with G08 and F8000" and "Block transition with G08 fromF8000 to F7000":

G00 G54 G90 G06 G08 X200 Starting point of the X axis

G01 F8000 Feed speed

X150 1. segment

X50 2. segment

X0 F7000 3. segment with new F value

RET Program end

In the following velocity diagram, the change in velocity between the sec-ond area with F8000 and the third area with F7000 has been magnifiedusing a zoom function. The optimal velocity NC block transition betweenthe segments can clearly be seen.

Page 78: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-10 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

:$'� 1$'1���5��'� �1�

+9�$�#�2���< ��

<���% .�<�7)+���@�� �� � �� � � ���"7�����%� �"A���

-�-I� ��*��.

"��.�����#� ���?��B�� � .�$�� �� �� .��.�$�� �� � � ��"7���� �� �"A���

� � � � � � � � � � 3 � � � � � � � � � �

+9�$�0>��<�)��� �7 ������+9�$� � � � � � � � � � � �+9�$�#�2�<� �

� ���1'�$$<���$����?� �(���+9�$

"��.

��22�������� �������� �1�< � ������ ��� � �3� � ������ ��

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� � A

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C��1$� � �1��)�;��� �1�

�@22AB2���D ���E��

411Satz.FH7

Fig. 4-11: NC block transition via G08 from F8000 to F7000

Velocity-Limited Block Transition "G09"

G09

Interpolation condition G09 is used to adapt the NC block end velocity insuch a way that the maximum velocity change defined in the axis pa-rameters can be used for a stop.

• Position deviations can be reduced at NC block transitions by usinginterpolation condition G09.

• Machining using G09 requires more time, and the surface quality canbe adversely affected with free cutting marks.

• G09 is the power-on default and remains locked and active until it isoverwritten by G08. G09 is reset automatically at the end of the pro-gram (RET) or by the BST command.

Note: The machine builder specifies the maximum feed rate changein the axis parameters.

Syntax

Page 79: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Examples:

:$'� 1$'1���5��'� �1�

< � � � % . � < � �� � $ � � � � � # � � & � � � � 0 � � � � **� � 0 �

-�-I� ��*��.

" � � . � � � �� # � � � � ? � � B � � � . � $ � � � � � � .� � . � $ � � � � � � � � " 7 � � � � � � � " A � � �

����� ��� � �3� � ������ ��

� �+9�$�#�2���< ��+9�$�0>��<�)��� �7 ������+9�$

� � � � � � � � � � �+9�$�#�2�<� �� � � � ���1'�$$<���$����?� �(���+9�$

��22�������� �������� �1�< � ������ ��� � �3� � ������ ��

����� ��< �@� % @ � � � A B�� � � � � � @22AB2���@ � � � % @ � � � A A �C�+'��� ��1$� � �1�� � A

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C��1$� � �1��)�;��� �1�� � A" � � .

� @22AB2���D ���E��

412Satz.FH7

Fig. 4-12: NC block transitions with G09 and F8000

The velocity diagram (see above figure) clearly shows how the velocity ofthe axis is reduced to almost 0 between the workpiece areas. Theresidual velocity at which the transition to the next NC block occurs isderived from axis parameter Cxx.017 Maximum feed rate change w/oramp.

Sample program for the displayed velocity diagrams in the fig. "Blocktransitions with G09 and F8000" and "Block transition with G09 fromF8000 to F7000":

G00 G54 G90 G06 G09 X200 Starting point of the X axis

G01 F8000 Feed speed

X150 1. segment

X50 2. segment

X0 F7000 3. segment with new F value

RET Program end

In the following velocity diagram, the change in velocity between the sec-ond area with F8000 and the third area with F7000 has been magnifiedusing a zoom function.

Page 80: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-12 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

:$'� 1$'1���5��'� �1�

< � � � % . � < � �)+� � � @ � � � � � � � � � � � �"7�����%��"A���

-�-I� ��*��.

" � � . � � � �� # � � � � ? � � B � � � . � $ � � � � � � .� � . � $ � � � � � � � � " 7 � � � � � � � " A � � �

����� ��� � �3� � ������ ��

� �+9�$�#�2���< ��+9�$�0>��<�)��� �7 ������+9�$

� � � � � � � � � � �+9�$�#�2�<� ���1'�$$<���$����?� �(���+9�$

��22�������� �������� �1�< � ������ ��� � �3� � ������ ��

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� � A

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C��1$� � �1��)�;��� �1�� � A" � � .

� @22AB2���D ���E��

413Satz.FH7

Fig. 4-13: NC block transition via G09 from F8000 to F7000

Exact Stop "G61"

G61

With interpolation condition G61, the programmed destination position isapproached within the preset exact stop limit. The exact stop limit is de-fined in the axis parameters by a positioning window. When the position-ing window is reached, processing switches to the next NC block and thenext axis movement begins.

• Programming G00 (rapid traverse) automatically activates G61 (exactstop).

• If G61 is programmed, interpolation condition G08 is reset. G08 canbe reactivated if G61 has been cancelled.

• It is recommended that G61 be selected for machining sharp con-toured corners and not for tangential transitions.

• After it has been selected, G61 remains modally active until it is can-celled by G62 (Rapid NC block transition) or until it is automatically re-set at the end of the program or by BST.

Note: The machine builder specifies the positioning window in theaxis parameters.

Syntax

Page 81: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Examples:

@ � � � *� � � � % � 4 � @ � � � � � � � � � � � � $ � � � � � # � � & � � � * *� � � � � +� � � � � � @ � � � � � � + J� � � +� � * *� � � � � +� � @ � � � � � � +

-�-I� ��*��.

:$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<

� ��1$� � �1��8122����=� ��<!9���$�1��5�'�1�< � ������

� � � � � � � � � � : � � � � � � � @ � � � � � � �

$ � � � � � # � �& � � � **� �� � � +�

@ � � � � � � � � $ � � � � � # �& � � � * *� � � � � +�� � � � @ � � � � � � +

@ � � � � � � � � � � � +� **� � � � � +�@ � � � � � � +

" � � . 4" � � � �< � � J � < � < � � � 5 � A

�1$�� �1��=� ��$�+9�$�4�22�

�1$� � �1��=� ��$�+9�$��22�

414Kontur.FH7

Fig. 4-14: Contour diagram with G61

The "Contour diagram with G61" shown here illustrates how the contour isaccurately maintained by G61 in the transitions straight line → circle andcircle → circle. The positioning window for the examples shown here isspecified as 0.010 mm in the axis parameters. The positioning deviationin the non-tangential transition from straight line → circle is specified as0.00249 mm. The transition accuracy could be increased accordingly ifthe positioning windows axis parameters were reduced. The positiondeviation is less than 0.001 mm in the tangential transition circle → circle.

Sample program for the diagrams shown in Figures "Contour diagramwith G61" and "Velocity diagram with G61":

G00 G54 G90 G06 G08 X-100 Y-100 Starting point

G01 G61 X-50 Y-50 F4000 1. straight line

G02 X50 Y-50 I0 J-50 1. semi-circle

G03 X100 Y-50 I75 J-50 2. semi-circle

RET Program end

The following velocity diagram (Fig. "Velocity diagram with G61") showshow the velocity is reduced until the positioning window is reached. Whenthe positioning window is reached, processing switches to the next NCblock and the next axis movement starts.

Page 82: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-14 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

:$'� 1$'1���5��'� �1�

� � � � � � 4 � @ � � � � � � � � � � � � $ � � � � � # � � & � � � * *� � � � � +� � � � � � @ � � � � � � + J� � � +� � * *� � � � � +� � @ � � � � � � +

-�-I� ��*��.

" � � . � � � � � " � � � �< � � J � < � < � � � 5 � A

� @ � � � � @����� ��A�� � �3� � � @����� ��A��� � � �A

+9�$�#�2���< ��� � � � � � � � � �+9�$�#�2�<�

" � � . � � � �

+9�$�#�2���< ��� � � � � � � � � �+9�$�#�2�<�4

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� � A

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� �A

@ � � � � � � � �$ � � � � � # � �& � � �**� �� � � +�� � � � @ � � � � � � +

@ � � � � � � � � � � � +� � * *� � � � � +�@ � � � � � � +

� @22AB2���D ���E��

��22�������� �������� �1�< � � @ � � � � @����� ��A�� � �3� � � @����� ��A��� � � �A

415G61.FH7

Fig. 4-15: Velocity diagram with G61

Rapid NC Block Transition "G62"

G62

With interpolation condition G62, processing switches to the next NCblock as soon as the command values for all programmed axes in the NCblock, which are issued by the interpolator, have reached their pro-grammed final values. The machine does not wait until the actual valueshave also reached their end positions. Any lag (following error) which maybe 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-tan-gential transitions.

• G62 is the power-on default and is saved as active until it is overwrit-ten 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.

Syntax

Page 83: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-15

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Examples:

�1$�� �1��=� ��$�+9�$�

@ � � � *� � � � % � 4 � @ � � � � � � � � � � � � $ � � � � � # � � & � � � * *� � � � � +� � � � � � @ � � � � � � + J� � � +� � * *� � � � � +� � @ � � � � � � +

-�-I� ��*��.

:$'� 1$'1���5��'� �1�

� � ��1$� � �1�$�)�;��� �1�<� ��1$� � �1��8122����=� ��<

!9���$�1��5�'�1�< � �������

�1$� � �1��=� ��$�+9�$�4

� � � � � � � � � � : � � � � � � � @ � � � � � � �

$ � � � � � # � � & � � � � * *� � � � � +�

@ � � � � � � � � $ � � � � � # � � & � �**� � � � � +�

� � � � @ � � � � � � +

@ � � � � � � � � � � � +�**� � � � � +� � @ � � � � � � +

" � � . � � � � 4" � � � �< � � J � < � �< � � � 5 � A

�22�

�22�

416G62.FH7

Fig. 4-16: Contour diagram with G62

The contour diagram shown here with G62 illustrates how the non-tan-gential transitions (straight line → circle) are slurred as a consequence ofG62. The contour is traveled at optimal velocity (via G08). At the contouritself, the machining quality is identical to that achieved with G61. If youcompare the contour diagrams in "Contour diagram with G61" and"Contour diagram with G62", note that the expansion factor for the posi-tion deviation is four times as high in "Contour diagram with G62".

Sample program for the diagrams shown in Figures "Velocity diagramwith G61" and "Contour diagram with G62":

G00 G54 G90 G06 G08 X-100 Y-100 Starting point

G01 G62 X-50 Y-50 F4000 1. straight line

G02 X50 Y-50 I0 J-50 1. semi-circle

G03 X100 Y-50 I75 J-50 2. semi-circle

RET Program end

In the following velocity diagram with G62, it can be seen how the pathvelocity in the non-tangential transition straight line → circle is reduced bythe change of direction. The tangential transition circle → circle is traveledat a constant path velocity as a consequence of conditions G62 andG08.g

Page 84: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-16 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

:$'� 1$'1���5��'� �1�

� � � � � � 4 � @ � � � � � � � � � � � � $ � � � � � # � � & � � � * *� � � � � +� � � � � � @ � � � � � � + J� � � +� � * *� � � � � +� � @ � � � � � � +

-�-I� ��*��.

" � � . � � � � � " � � � �< � � J � < � �< � � � 5 � A

� @ � � � � @����� ��A�� � �3� � � @����� ��A��� � � �A

+9�$�#�2���< ��� � � � � � � � � �+9�$�#�2�<�

" � � .

+9�$�#�2���< ��� � � � � � � � � �+9�$�#�2�<�4

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� � A

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� � A

@ � � � � � � � � $ � � � � � # � � & � �**� � � � � +� � � � � � @ � � � � � � +

@ � � � � � � � � � � � +�**� � � � � +� � @ � � � � � � +

� @22AB2���D ���E��

��22�������� �������� �1�< � � @ � � � � @����� ��A�� � �3� � � @����� ��A��� � � �A

417G62.FH7

Fig. 4-17: Velocity diagram with G62

Programmable Acceleration "ACC"

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 thefunction ACC (Programmable acceleration). This function is used, forexample, to reposition the workpiece holder axes according to the weightof the workpiece. The programmable acceleration limits the maximumpath acceleration specified in the parameters. The acceleration factor isprogrammed in percent of the maximum path acceleration defined in theprocess 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 willproduce an error message when the program is executed.

• The acceleration factor can be programmed as a constant as well as amathematical expression. If the acceleration factor is defined as aconstant, it is not possible to program decimal places. If it is defined asa mathematical expression, the value is automatically rounded to awhole number.

• An acceleration factor programmed using the ACC command remainsmodally active until it is overwritten by a newly programmed value or isautomatically reset to 100% at the end of the program or by the com-mand BST.

• The ACC command may remain inactive if the "Maximum path accel-eration" parameter was set to a very high value which is disproportion-ate to the maximum possible path acceleration.

Note: The machine builder specifies the maximum path accelerationin the process parameters.

Syntax

Page 85: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-17

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Examples:

G01 ACC 50 X100 ACC with a constant

G01 ACC=@10 X100 ACC with a variable

G01 ACC=10*@10+30 X100 ACC with a math. expression

NC program:

G00 G54 G90 G61 G06 X200 Starting point

G01 X150 F8000 1. straight line

ACC 40 X50 2. straight line acceleration factor

40%ACC 15 X-50 3. straight-line acceleration factor 15%

RET Program end

The process parameter for maximum acceleration was set to 500mm/sec2 in the velocity diagram shown here. The acceleration for NC block ACC 40 X50 is therefore 200 mm/sec2; forNC block ACC 15 X-50, it is 75 mm/sec2.

:$'� 1$'1���5��'� �1�

$���.�������4 �� �$��� ��#� �& � ��� � �0 �B� �# �C�� ��%��,�+���� ��

-�-I� ��*��.

� @ � � � � @����� ��A�� � �3� � � @����� ��A��� � � �A

+9�$�#�2���< ��+9�$�0>��<�)��� �7 ������+9�$

"��.

� � � � � � � � � �+9�$�#�2�<�

�� ���1'�$$<���$����?� �(���+9�$

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C�+'��� ��1$� � �1�� � A

����� ��< �@� % @ � � � A A B�� � � � � � @22AB2���@ � � � % @ � � � A �C��1$� � �1��)�;��� �1�� � A

� @22AB2���D ���E��

��22�������� �������� �1�< � � @ � � � � @����� ��A�� � �3� � � @����� ��A��� � � �A

418Besch.FH7

Fig. 4-18: Velocity diagram for programmable acceleration

Page 86: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-18 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

4.3 Interpolation functions

Linear Interpolation, Rapid Traverse "G00"

G00

The programmed coordinate values using path condition code G00 areapproached at maximum path velocity. If G00 applies to more than oneaxis, the movement is performed with interpolation.

A feed rate can be programmed with G00 by using an F word. If a feedrate (F value) is not programmed in the NC block, then the movementoccurs at the maximum path velocity entered in the process parameters.The path velocity is limited to the maximum axis velocity entered in theaxis parameters, so that linear interpolation is always performed. The Fvalue programmed with G00 remains active for all subsequent move-ments 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 theNC block in which it has been programmed. In the case of asubsequent G00 block without an F value, the axes are movedat maximum path velocity.

Rapid block transition (G62) is suppressed in combination with G00. Atransition to the next NC block occurs only if all programmed axes liewithin the position window of the programmed coordinate value, which isspecified in the axis parameters.

With active velocity-optimal NC block transition (G08), a change to veloc-ity-limited NC block transition (G09) is already made in the previous NCblock. If G00 is overwritten by a different type of interpolation, G08 isautomatically reactivated.

G00 remains modally active until it is overwritten by a different code in thesame G group (G01, G02, G03).

Example:

G00 G54 G90 X40 Y40 [P1] rapid traverse at maximum path velocity

X120 Y60 F8000 [P2] rapid travel with F word

��

-�

:�

�� -� :� /� �� �� -�

��

0

2

419g0.FH7

Fig. 4-19: Linear interpolation, rapid travel G0

Syntax

Page 87: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-19

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Linear Interpolation, Feed "G01"

G01

The axes programmed using code G01 are moved to their programmedcoordinate value on a straight line relating to the current coordinate sys-tem using the current feed rate. The programmed axes are started si-multaneously; all of them reach their programmed end point at the sametime.

If a new feed rate (F value) is programmed using code G01, the mostrecently active F value is overwritten. The programmed F value functionsas a path feed rate. If a number of axes are being traveled, the velocitycomponent of each individual axis is less than the programmed path feedrate. 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 thesame G group (G00, G02, G03).

Example: Linear interpolation in 2 axes

0

2

F��GF��G

F��G

F� G

0

1

F� G

F��G

��

-�

:�

/�

��

�� -� :� /� �� 7���

��

-�

:�

/�

��

420G01.FH7

Fig. 4-20: Linear interpolation, feed rate G01 with 2 axes

NC program:

G00 G90 G54 G06 G08 Movement commands, interpolation con-ditions

X0 Y0 Z10 S3000 M03 Starting position, spindle ON

G01 X26.26 Y18 Z5 F2000 [P1] Machining start position

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

Syntax

Page 88: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-20 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: Linear interpolation in 3 axes

�� -� :� /� �� 0

2

F��G

F��G

F� G

0

1 7���

F� G

F��G F��G

��

-�

:�

/�

��

��

-�

:�

/�

��

421G013.FH7

Fig. 4-21: Linear interpolation, feed rate G01 with 3 axes

NC program:

G00 G90 G54 G06 G08 Movement commands, interpolation con-ditions

X0 Y0 Z10 S3000 M03 Starting position, spindle ON

G01 X40 Y25.5 Z5 F2000 [P1] Machining start position

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

Circular Interpolation "G02" / "G03"

• Circular movement - clockwiseG02<end point ><interpolation parameter [I,J,K]> orG02<end point><radius [R]>

• Circular movement - counterclockwiseG03<end point ><interpolation parameter [I,J,K]> orG03<end point><radius [R]>

The programmed path condition G02 or the programmed tool G03 is movedalong a circular path to the programmed end point using the effective orprogrammed feed rate (F value). The programmed axes are started simul-taneously; 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. "Circularprogramming depending on planes"). The tool is moved around theprogrammed center point of the circle.

A circular motion can be performed in each plane using the correspond-ing selection (plane selection with G17, G18, G19 and free plane selec-tion with G20, G21, G22). The programmed center of the circle and theend points must lie on the same machining plane as the starting point.

Syntax

Page 89: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-21

DOK-MTC200-NC**PRO*V23-AW01-EN-P

��� '���;3<

��!� '���;6<

��!� '���;4<

�������

��!����

�������

�+� ��10

�+� ��21

< A

�+� ��02< �

< 7

<��

<��

<��<��

<��

<��

422Kreis.FH7

Fig. 4-22: Circular programming depending on planes

The radius and the starting angle of the arc are calculated from the start-ing point and the center point. A radius which is determined based on theend point and the center point, and that perhaps differs, is ignored. Thismeans 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 pro-grammed end point can therefore differ from the traveled end point.

With incremental data input (G91), the center point and the end point areexpressed in relation to the starting point; with absolute input (G90), theyare expressed in relation to the current zero point.

When programming using absolute data input, the value of the startingpoint is assigned to the coordinate value of an unprogrammed addressletter (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 thecenter point needs to be entered when programming a full circle.

A circle or an arc is defined by the programmed axis commands and theparameters for interpolation. The previous NC block defines the startingpoint of the circle. The end point of the circle is defined by the axis valuedata X, Y and Z in the G02/G03 NC block. The center point of the circle isdefined by the entered interpolation parameters I, J and K or directly viaradius R.

Interpolation Parameters I, J, KInterpolation parameters are assigned to the axes which are used in acircular interpolation. These parameters are parallel to the axes, and theirsigns depend on the direction in which they are oriented in relation to thecenter point of the circle. Based on DIN 66 025, interpolation parametersI, J and K are assigned to axes X, Y and Z.

If coordinate values are not programmed using addresses I, J and K, thecorresponding starting point is assigned with absolute dimension pro-gramming. The default value is 0 with incremental dimension program-ming.

With G91 programming, the interpolation parameters define the distancefrom the starting point of the circle to the center point; with G90 program-ming, the distance from the current zero point to the center point is de-fined.

Page 90: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-22 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

0

2

7J��1��

7>��1��

KJ��1���

K>��1���

��������������8�!������ � �� �������

423Kreis.FH7

Fig. 4-23: Circular interpolation with interpolation parameters

Example: Full circle in the X-Y plane with G90

��

-�

:�

/�

��

�� -� :� /� �� �� -� 0

2

F� G

E5��

M5��

��

���5��� ������� �

424Voll.FH7

Fig. 4-24: Full circle with G90

NC program:

G00 G90 G54 G06 G08 Movement commands, interpolation con-ditions

X0 Y0 Z10 S3000 M03 Starting position, spindle ON

G01 X40 Y37.24 F2000 Starting point of circle

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

Page 91: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-23

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: Full circle in the X-Y plane with G91

��

-�

:�

/�

��

�� -� :� /� �� �� -� 0

2

F� G

E5��

��M5���A�

���5��� ������� �

425g90.FH7

Fig. 4-25: Full circle with G91

NC program:

G00 G90 G54 G06 G08 Movement commands, interpolation condi-tions

X0 Y0 Z10 S3000 M03 Starting position, spindle ON

G91 G01 X40 Y37.24 F2000 Starting point of circle in chain dimension

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

-�

/�

��

:�

���

�� -� :� /� �� �� -� 1

E ��0

I'

F��GF��G

F��GF��G

H E

HI

F� G

�� �5 �� ��+� ��� ������ � �

426Dreh.FH7

Fig. 4-26: Circular programming for lathe, behind center of rotation

Page 92: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-24 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example of programming using absolute dimension input (G90)

G00 G16 G90 G54 G06 G08 Movement commands, interpolation con-ditions

M03 S2000 Spindle ON

X69 Z136.5 [P1] Starting position

G01 X40 Z128.5 F500 [P2] linear interpolation

Z100 [P3] circle starting point

G02 X160 Z60 I160 K100 [P4] ¼ circle in clockwise direction

G01 Z10 [P5] machining end position

G00 X200 X axis to safety distance

M05 Spindle OFF

RET Program end

Example of programming using incremental dimension input (G91):

G00 G16 G90 G54 G06 G08 Movement commands, interpolation con-ditions

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 ProgrammingIn order to take over dimensions directly from the workpiece drawings, anoption is provided to directly define circular paths in the NC program viathe specified radius.

A distinct circular path is produced within a semicircle (180°) only if G02or 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 willbe greater or less than 180°. The radius entry must be preceded by aminus sign for arcs with angles exceeding 180°.

G02 R+ ... with a traveling angle to 180°

G03 R- ... with a traveling angle > 180°

Syntax for circle radiusprogramming in the G17 plane X ... Y ...

Page 93: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-25

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: Defining the arc

��

-�

:�

/�

��

1

E��0

F/G

35�H��

35�*��

F$G

�� -� :� /� �� �� -�

427Kvor.FH7

Fig. 4-27: Circle radius programming, determining the sign to be used for theradius

G01 X... Z...G02 X... Z... R±30

As can be seen in the above example, two possibilities would result forthis programmed circle. Selecting the sign (R+30 or R-30) determineswhich circle is traveled.

• The direction of movement in relation to the circle end point is deter-mined by G02 or G03.

• Circle radius programming is not permissible with a traveling angle of0° or 360°. The axes will remain at their starting points.

• If the circle end point is missing, the axis will remain at its startingpoint. No movement takes place.

• The programmed radius is active in the current machining plane (planeselection with G17, G18, G19 and free plane selection with G20, G21,G22).

Example: Circle radius programming in the Z-X plane

-�

/�

��

���

�� -� :� /� �� �� -� 1

E ��0

���+���� ������� �

F��GF��G

F��GF��G

H E3

F� G

:�

-�

428Dreh.FH7

Fig. 4-28: Circle radius programming on a lathe, behind center of rotation

Page 94: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-26 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC program:

G00 G90 G54 G06 G08 Movement commands, interpolation condi-tions

M03 S2000 Spindle ON

X69 Z136.5 [P1] Starting position

G01 X40 Z128.5 F500 [P2] linear interpolation

Z100 [P3] circle starting point

G02 X160 Z60 R40 [P4] ¼ circle in clockwise direction

G01 Z10 [P5] machining end position

G00 X200 X axis to safety distance

M05 Spindle OFF

RET Program end

Helical InterpolationHelical interpolation is a combined circular and linear interpolation whichis used to produce a spiraling tool path. Circular interpolation takes placein the selected plane (plane selection with G17, G18, G19 and free planeselection with G20, G21, G22) while linear interpolation occurs simultane-ously in a third axis which is perpendicular to the plane of circular inter-polation.

In helical interpolation, an arc and a straight line erected perpendicular tothe end point of the arc are both programmed in the same NC block. Theaxis movements are coordinated in such a way that the tool moves at aconstant pitch in a helical path.

�2

2�

2�

72�

1

2

0429Schrau.FH7

Fig. 4-29: Helical Interpolation

No more than one coil (corresponding to a full circle) can be programmedin an NC block. Programming a corresponding number of individual coilscan only produce a number of coils in sequence.

The programmed feed rate (F value) relates to the actual tool path. Allother conditions are the same as in circular interpolation.

Page 95: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-27

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: Helical interpolation in the X-Y plane with G90

�� -� :� /� �� 0

2 0

1 7���

F� G

F��G F��G

F��G

F� G

F��G

��E5����

M5����

-�

:�

/�

��

��

-�

:�

/�

�����5��� ������� �

430G90s.FH7

Fig. 4-30: Helical interpolation with G90

Example of programming using absolute dimension input (G90)

G00 G90 G54 G06 G08 Movement commands, interpolation condi-tions

X0 Y0 Z10 S5000 M03 Starting position, spindle ONG01 X40 Y20 Z5 F2000 [P1] Z axis to safety distanceZ-2,5 Z axis to machining depthX40 Y30 [P2] starting point of half coilG02 X85 Y30 I62.5 J30 Z-5 [P3] helix in clockwise directionG01 X85 Y10 [P4] clear X and YG00 Z5 Z axis to safety distanceM05 Spindle OFFX0 Y0 Z10 Return to starting positionRET Program end

Example: Helical interpolation in the X-Y plane with G91

��

-�

:�

/�

��

�� -� :� /� �� 0

2

��

-�

:�

/�

��

0

1 7���

F� G

F��G F��G

F��G

F� G

F��G

��JG�

>G��*2 ���G�� �� �������

431G91s.FH7

Fig. 4-31: Helical interpolation with G91

Example of programming using absolute dimension input (G91)

G00 G90 G54 G06 G08 Movement commands, interpolation con-ditions

X0 Y0 Z10 S5000 M03 Starting position, spindle ONG91 G01 X40 Y20 Z-5 F2000 [P1] Z axis to safety distanceZ-7.5 Z axis to machining depthY10 [P2] starting point of half coilG02 X45 I22.5 J0 Z-2.5 [P3] helix in clockwise directionG01 Y-20 [P4] clear X and YG00 Z10 Z axis to safety distanceM05 Spindle OFFX-85 Y-10 Z5 Return to starting positionRET Program end

Page 96: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-28 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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.

@ # � � � . � & � � .

&� � ��%. � �+�@#���.

�@#���. �����

!L���!L�L�

432Laeng.FH7

Fig. 4-32: Longitudinal thread

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 endpoint that is programmed in NC block G33. The thread entering and exit-ing path in which the feed rate is accelerated or reduced must be consid-ered. The coordinate values can be programmed using absolute (G90) orincremental (G91) positioning data.

The thread lead is entered in address I, J and K; however, no more thanone interpolation parameter can be programmed in a single-thread NCblock. Interpolation parameters I, J and K are programmed as incre-mental values without sign. Interpolation parameters I, J and K are as-signed to axes X, Y and Z.

Via address P, the thread starting angle can be programmed from 0° to360°. By programming a thread starting angle, it is possible to cut multiplecoils without shifting the start point. If a starting angle is not programmedvia address P, it is assumed that the starting angle is 0°.

Clockwise or counterclockwise threads are produced by defining the di-rection of rotation of the spindle: M03 or M04. If G33 is used to select adifferent spindle for thread cutting, the spindle must be activated bymeans of the "SPF <spindle number>" command prior to NC block G33.The first spindle is always active in the power-on state. The spindle muststart at the desired speed prior to or in the G33 NC block.

In any case, positioning without lag G06 must always be used for threadcutting in conjunction with G33 since this function has a positive influenceon the thread quality.

G33 belongs to the group of blockwise active G codes. G33 does notremain active at the end of an NC block. The thread is cut from the cur-rent starting point up to the programmed end point of the NC block, whilemovements are possible in several axes (tapered threads).

• No more than 500 threads can be cut per thread NC block. If morethan 500 threads are required, these can be machined using threadNC block sequences.

• The maximum spindle speed in a thread NC block is 13,500 rpm. Therequired approach distance increases as the spindle speed and threadlead increases.

Syntax

Page 97: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-29

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• While thread cutting, the constant surface speed G96 is ignored viaG33. The spindle speed which was programmed last via G97 is set.

• If the thread is cut using positioning with minimized lag G06, the spin-dle speed can be changed during thread cutting by using spindle over-ride, though this can negatively affect quality. The feed rate will adaptaccordingly. Feed rate override will not be active.

• In the case of an immediate stop (emergency stop, stop in setupmode), the spindle speed and the feed rate are synchronously reducedand are synchronously increased upon a restart.

• For taper threads, the thread lead is declared in relation to the mainaxis. If the desired thread lead is to relate to the Z axis, then the threadlead must be defined in interpolation parameter K. The thread lead isprogrammed in interpolation parameter I if the thread lead relates tothe X axis.

• When lathing face threads, the thread lead is interpreted as a radiusdimension when programming the diameter.

• Depending on the parameter setting, the thread lead can be enteredusing 3 or 4 places to the left of the decimal point and, correspond-ingly, 5 or 4 places to the right of the decimal point.

Note: Function G33 is available only if APRB04 (axis processor) ispresent.

Example: NC program for longitudinal thread

�� -� :� /� �� �� -� 1

0

F� G

F��G

F��G

F��G

F��GF��G

��

-�

:�

/�

��

433GLaeng.FH7

Fig. 4-33: Thread cutting – longitudinal thread

Thread lead: 3 mm

Thread depth: 4 mm Thread depth percut: 2 mm

NC program:

G00 G54 G90 G06 G08 X80 Z130 S2000 M03 [P1] Starting conditionsG01 X45.5 F1500 [P2] Feed for first cutG33 Z30 K3 P180 [P3] 1st thread passG00 X80 [P4] Withdraw X axisZ130 [P1] Starting pointG01 X43.5 F1500 [P5] Feed for 2nd cutG33 Z30 K3 P180 [P6] Second thread passG00 X80 [P4] Withdraw X axisM05 Spindle OFFRET Program end

Page 98: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-30 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: NC program for taper thread

��

-�

:�

/�

��

�� -� :� /� �� �� -� 1

0

F� G

F��G

F��G

F��G

F��G

F��G

� �!

�2

.B

-.*2

434GKeg.FH7

Fig. 4-34: Thread cutting - taper thread

Thread lead: 2.5 mmThread depth: 3 mm Thread depth per

cut: 1.5 mmNC program:G00 G54 G90 G06 G08 X100 Z130 S2000 M03 [P1] Starting conditionsG01 X39.89 F1500 [P2] Feed for 1st cutG33 X71.99 Z25 K2.5 P90 [P3] 1st thread thru holeG00 X100 [P4] Withdraw X axisZ130 [P1] Starting pointG01 X38.39 F1500 [P5] Feed for 2nd cutG33 X70.49 Z25 K2.5 P90 [P6] 2nd thread passG00 X100 [P4] Withdraw X axisM05 Spindle OFFRET Program end

71.99 = ) TAN17 105 ( + 39.89 = P3

39.89 = ) TAN17 10 ( 2 - 46 = P2

46 = 1.5 - 47.5 = P2

70.49 = ) TAN17 105 ( + 38.39 = P6

38.39 = ) TAN17 10 ( 2 - 44.5 = P5

44.5 = 3 - 47.5 = P5

°∗°∗∗

°∗°∗∗

Fig. 4-35: Calculation of thread starting and end point coordinates for X axis:

Page 99: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-31

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: NC program for face thread

��

-�

:�

/�

��

�� -� :� /� �� �� -� 1

0

F� GF��G

F��GF��G

F��G

F��G

435GPlan.FH7

Fig. 4-36: Thread cutting - face thread

Thread lead: 2 mm

Thread depth: 3 mm Threaddepth per cut:1.5 mm

NC program:

G00 G54 G90 G06 G08 X27.5 Z100 S2500 M03 [P1] Starting con-ditions

G01 Z78 F1500 [P2] Feed for1st cut

G33 X72.5 I2 P180 [P3] 1st threadthru hole

G00 Z100 [P4] WithdrawZ axis

X27.5 [P1] Startingpoint

G01 Z76.5 F1500 [P5] Feed for2nd cut

G33 X72.5 I2 P180 [P6] 2nd threadpass

G00 Z100 [P4] WithdrawZ axis

M05 Spindle OFFRET Program end

Page 100: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-32 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Thread Sequences with "G33"Function G33 – Thread cutting – can be used to program consecutivechains of thread-cutting NC blocks containing different leads. A threadsequence 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 thethread remains constant.

@#���. �&��.

&� � ��%. � �+�@#���.

�@#���. �����

���$�� � � ��$�� � �

436Laeng2.FH7

Fig. 4-37: Longitudinal threads with 2 pieces with different leads

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-cut-ting NC blocks. A transition distance is calculated between two thread-cutting NC blocks for each axis experiencing a velocity change. The ve-locity change is performed at the maximum permissible acceleration, sothat transition parabolas result.

• G08 contouring mode (velocity-optimal NC block transition) must beactive during thread-cutting sequences. G06 positioning with mini-mized lag should be activated to ensure that the transition parabolabetween the thread NC blocks are as small as possible.

• No function may be programmed between and in the individual threadblocks 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 NCblock is processed individually. In this case, a new starting distance isrequired for each thread-cutting NC block. Thus, thread-cutting se-quences are not possible in the "Single-block" operating mode.

All other conditions are the same as in thread cutting.

Syntax

Page 101: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-33

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: NC program for thread-cutting sequences

��

-�

:�

/�

��

�� -� :� /� �� �� -� 1

0

;�<

;��<;�.<

;��<

;�/<

;�-<

;��<;��<

;�2<

;�:<

���� �������!�� �������!�� �����

437GKett.FH7

Fig. 4-38: Thread-cutting sequences

Thread lead: 1: 3 mm2: 5 mm3: 1 mm

Thread depth: 4 mm Thread depthper 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] 1st thread segment /1st pass

G33 X38 Z50 K5 [P4] 2nd thread segment /1st pass

G33 Z10 K1 [P5] 3rd thread segment /1st pass

G00 X60 [P6] Withdraw X axis

Z135 [P1] Starting point

G01 X21 F1500 [P7] Feed for2nd cut

G33 Z90 K3 P180 [P8] 1st thread segment /2nd pass

G33 X36 Z50 K5 [P9] 2nd thread segment /2nd pass

G33 Z10 K1 [P10] 3rd thread segment/2nd pass

G00 X60 [P6] Withdraw X axis

M05 Spindle OFF

RET Program end

Page 102: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-34 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 spindlespeed controlled (as would be the case in normal tapping), but also thespindle alignment. The spindle rotation and the feed movement of theaxis, which is programmed together with G63, are linearly interpolated. Amain spindle, which can be positioned, is required for tapping without acompensating chuck. The spindle must be driven directly (slip); the posi-tion encoder should be located directly on the spindle.

The CNC supplies two path conditions for tapping without a compensatingchuck. These functions are active only for the duration of the NC blockcontaining 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.

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, thelink can be activated at the start of the common acceleration phase sothat the spindle and the feed axis are already accelerating in an interpo-lating way. The selected acceleration focuses on the weakest axis (mainspindle 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 accelera-tion; then the link is activated, so that the main spindle and the feed axisdo not interpolate until the constant-speed range is reached.

• Clockwise or counterclockwise thread tapping is achieved by declaringthe 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 inthe power-on state.

• Tapping should be performed using function G06 "Positioning withoutlag". If G06 is not active with tapping without a compensating chuck orif analog axis cards are installed, the same gain factor must be set forthe spindle and for the feed axis for G63/G64.

• Functions G08 (Velocity-optimal NC block transition) and G61 (Exactstop) 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 byprogramming the speed value (S value).

• If the tap is turned out of the thread using G64, the spindle stops briefly atthe end point of the NC block in order to change from position-controlled tospeed-controlled mode.

• Except for dwell time G04 and the auxiliary functions, no NC com-mands can be programmed between the G63 command Tap to depth<X, Y or Z> and the G63/G64 command Withdraw tap.

Syntax

Page 103: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-35

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• With digital drives, if the spindle is activated prior to the NC blockcontaining G63 tapping, the spindle will stop briefly in the G63 NCblock in order to switch from speed-controlled mode to position-con-trolled mode.

• The lead factor feed per spindle revolution must be programmed in asingle NC block containing G63 and G64 by using the F word.

• Depending on the parameter setting, the thread lead can be enteredusing 3 or 4 places to the left of the decimal point and, correspond-ingly, 5 or 4 places to the right of the decimal point.

Example: NC program - tapping with G63

��

-�

:�

/�

��

�� -� :� /� �� 0

2

��

-�

:�

/�

��

0

1 7���

F��G

F� G

F��G

F��G F� GF��G

F��GF��G

438g63.FH7

Fig. 4-39: Tapping with G63

NC program using G63:Spindle stopped at the beginning of the NC block G63Spindle stopped upon terminated movement

G00 G54 G90 G06 G08 X0 Y0 Z10 Movement commands, interpola-tion conditions

G01 X40 Y50 F2000 [P1] 1st tapping positionBSR .GEBO Branch to tapping subroutineY80 [P2] 2nd tapping positionBSR .GEBO Branch to tapping subroutineX90 [P3] 3rd tapping positionBSR .GEBO Branch to tapping subroutineY50 [P4] 4th tapping positionBSR .GEBO Branch to tapping subroutineG00 X0 Y0 Return to starting pointRET Program end.GEBO Tapping subroutineG63 Z-7.5 F2 S500 M03 Tap to depth ZG63 Z10 F2 S750 M04 Withdraw tapRTS End subroutine

Page 104: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-36 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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, interpolationconditions

G01 X40 Y50 F2000 M03 S1000 [P1] 1st tapping position,spindle ON

BSR .GEBO Branch to tapping subroutineY80 M03 S1000 [P2] 2nd tapping pos.,

spindle ONBSR .GEBO Branch to tapping subroutineX90 M03 S1000 [P3] 3rd tapping position,

spindle ONBSR .GEBO Branch to tapping subroutineY50 M03 S1000 [P4] 4th tapping position,

spindle ONBSR .GEBO Branch to tapping subroutineG00 X0 Y0 Return to starting pointRET Program end.GEBO Tapping subroutineG63 Z-7.5 F2 Tap to depth ZG63 Z10 F2 S750 M04 Withdraw tapRTS End subroutine

Example: NC program - tapping with G63 and G64

��

-�

:�

/�

��

�� -� :� /� �� 0

2

��

-�

:�

/�

��

0

1 7���

F��G

F� G

F��G

F��G F��G

F� G

F��G

F��G

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 G63Spindle continues to rotate upon the end of movement

G00 G54 G90 G06 G08 X0 Y0 Z10 Movement commands, interpola-tion conditions

G01 X40 Y50 F2000 [P1] 1st tapping positionBSR .GEBO Branch to tapping subroutineX55 Y80 [P2] 2nd tapping positionBSR .GEBO Branch to tapping subroutineX75 [P3] 3rd tapping positionBSR .GEBO Branch to tapping subroutineX90 Y50 [P4] 4th tapping positionBSR .GEBO Branch to tapping subroutineM05 Spindle OFFG00 X0 Y0 Return to starting pointRET Program end.GEBO Tapping subroutineG63 Z-7.5 F2 S1000 M03 Tap to depth ZG64 Z10 F2 S800 M04 Withdraw tapRTS End subroutine

Page 105: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-37

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Spindle already rotates at the beginning of the NC block G63Spindle continues to turn after the end of the movement

G00 G54 G90 G06 G08 X0 Y0 Z10 Movement commands, interpola-tion conditions

G01 X40 Y50 F2000 M03 S1000 [P1] 1st tapping position,spindle ON

BSR .GEBO Branch to tapping subroutineX55 Y80 M03 S1000 [P2] 2nd tapping pos.,

spindle ONBSR .GEBO Branch to tapping subroutineX75 M03 S1000 [P3] 3rd tapping position, spindle

ONBSR .GEBO Branch to tapping subroutineX90 Y50 M03 S1000 [P4] 4th tapping position,

spindle ONBSR .GEBO Branch to tapping subroutineM05 Spindle OFFG00 X0 Y0 Return to starting pointRET Program end.GEBO Tapping subroutineG63 Z-7.5 F2 Tap to depth ZG64 Z10 F2 S800 M04 Withdraw tapRTS End subroutine

Tapping "G64" - Speed Reduction

If the thread length does not permit tapping at the programmed tappingspeed because the feed rate of the feed axis cannot be accelerated to therequired speed due to the length of the thread, the spindle speed is re-duced before the feed axis is started.

����� ��$�����1�%��������

����� ��$����C

%��������

5������������� ��$����

0�2���

�%��������������

440G64Vor.FH7

Fig. 4-41: Feed rate and spindle speed, tapping with G64

G64 with running spindleand short thread

Page 106: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-38 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tapping "G65" - Spindle as Lead AxisFunction G65 can be used to tap threads with main spindles which can bepositioned but cannot be interpolated under position control. In addition,G65 is used on main spindles which are driven indirectly and in caseswhere the position encoders are not located directly on the spindle. Acompensating chuck is usually used for tapping via G65. The feed dis-tance, which is programmed in conjunction with G65, is dependent on themain spindle position. However, because of the system-related delay, thefeed will always lag behind the main spindle. This delay is twice as longwhen there is a change of the direction of rotation. It is always preferableto use the G63/G64 functions for tapping without a compensating chuck.

M05 Spindle STOP

G65 <feed distance per spindle rotation [F]> 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 acti-vated.

• When G65 is active, it is not possible to traverse using G00; no circu-lar and helical interpolation G02/G03 is performed, and no axis refer-encing G74 is executed. Feed functions relating to the NC block tran-sitions (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 directionof tapping (clockwise or counterclockwise), is given by the spindle di-rection of rotation M03 or M04. The spindle remains inactive unless itis activated by a movement command of a main axis.

• The linking factor Feed per spindle revolution must be programmed ina single NC block containing G65 by using the F word.

• Tapping should be performed using the G06 function "Positioningwithout lag".

• With main spindles, which are driven directly and in which the positionencoder is located directly on the spindle, the G65 function can also beused to tap threads without using a compensating chuck, provided thespeed is moderate.

• If G65 is used to select a different spindle for tapping, the spindle must beactivated by means of the "SPF <spindle number>" command prior to NCblock G65. The first spindle is always active in the power-on state.

• G65 is superimposed by G93 or overwritten by G94 or G95, whichautomatically stops the spindle.

• Depending on the parameter setting, the thread lead can be enteredusing 3 or 4 places to the left of the decimal point and, correspond-ingly, 5 or 4 places to the right of the decimal point.

Syntax

Page 107: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-39

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: If G65 is active, only the linear main axes, X, Y and Z may beprogrammed. Other axis letters will result in an error message.Using G65 together with the APR function (digital SERCOSdrives) while a KSR (combined spindle-turret axis) is used isnot possible.

��

-�

:�

/�

��

�� -� :� /� �� 0

2

��

-�

:�

/�

��

0

1 7���

F��G

F� G

F��G

F��G F��G

F� G

F��G

F��G

441G65.FH7

Fig. 4-42: Tapping with G65

Example: NC program - tapping with G65

NC program using G65:

G00 G54 G90 G06 G08 X0 Y0 Z10 Motion commands, interpolationconditions

G01 X40 Y50 F2000 [P1] 1st tapping position

BSR .GEBO Branch to tapping subroutine

X55 Y80 [P2] 2nd tapping position

BSR .GEBO Branch to tapping subroutine

X75 [P3] 3rd tapping position

BSR .GEBO Branch to tapping subroutine

X90 Y50 [P4] 4th tapping position

BSR .GEBO Branch to tapping subroutine

M05 Spindle OFF

G00 X0 Y0 Return to starting point

RET Program end

.GEBO Tapping subroutine

M05 Spindle STOP

G65 F2 Activate tapping

S500 M03 Speed anddirection rotation

Z-7.5 Tap to depth Z

Z10 S400 M04 Withdraw tap

G94 Cancel G65

RTS End subroutine

Page 108: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-40 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

4.4 feed

F WordThe feed rate in an NC program is expressed by a feed, which uses theaddress letter F and a feed rate, which is stated directly as a constant orby means of an expression. The programmed feed rate determines theprocessing speed for each type of interpolation. The feed rate is restrictedso that the limits entered in the parameters are not exceeded. If the Fword is programmed in conjunction with a function, the meaning canchange. The corresponding type of operation is defined in the corre-sponding functions (G00, G04, G93, G95).

F<constant> ⇒ F1000

F<expression> ⇒ F=@50

If the F word is programmed as the feed rate, it becomes the desiredvalue 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 65before decimalpoint

12after decimalpoint

Cancelled by G95, G96 or G64. Themost recent G94 F value is reacti-vated the next time G94 is re-quested.

G95 modal 43before decimalpoint

45after decimalpoint

Canceled by G94.If G95 is repeated, the most recentG95 F value is reactivated.

G63, G64 block-wise

43

45

The F value is reactivated if G63,G64 are renewed.This has no effect on the F valuesof G94.

Feed per revolution

G65 modal Condition as with G95!

Time in seconds G04 block-wise

3 2 Superimposed with F words thatwere programmed by G94/G95.

Time programming G93 block-wise

5 2 (Overlay, no influence!)

If the F word appears alone in the NC block, it is assigned to the memoryof the modally active conditions of the feed-specified group. If the F wordappears in an NC block together with one of these functions, the corre-sponding feed is activated first, and then the F value is placed in the ap-propriate 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 unitused for the feed rate is mm/spindle revolution or inches/spindle revolution.

• With G04 (dwell time) and with G93 (time programming), the time inseconds is entered in the F word.

• The programmed feed rate can be changed via the feed rate override from0% to 255%. The 100% position corresponds to the programmed value.

The feed values are reset after the controller has been powered on, theprogram is loaded into the controller, or after a BST, RET, or control-re-set. At the beginning of an NC program, the feed values must be pro-grammed before or together with the first movement command.

Syntax

Page 109: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-41

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: The maximum path and axis speed are defined by the machinebuilder in the axis parameters.

Time Programming "G93"The machining time for a programmed path can be defined by the feedrate function G93 (Time programming). The machining time is determinedvia the F word. With the specified machining time, the controller calcu-lates the required path velocity depending on the limit values.

G93 F<time in seconds>

G93 is active on an NC blockwise basis and must be programmed incombination 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 val-ues that were programmed with G94 or G95.

• The F value programmed together with G93 can be programmed withfive digits to the left and two digits to the right of the decimal point.

Example: NC program using G93

0

2

F��GF��G

F��G

F� G

0

1 7���

F� G

F��G

�� -� :� /� ��

��

-�

:�

/�

��

��

-�

:�

/�

��

442g012.FH7

Fig. 4-43: Linear interpolation, G01 with 2 axes and time programming

NC program:

G00 G90 G54 G06 G08 Motion commands, interpolationconditions

X0 Y0 Z10 S3000 M03 Starting position, spindle ON

G93 G01 X26.26 Y18 Z5 F0.97 [P1] Starting position, timeprogramming

G93 Z-5 F0.3 Feed Z axis

G93 Y80 F1.86 [P2] linear interpolation, 1 axis

G93 X41 Y93.5 F0.6 [P3] linear interpolation, 2 axes

G93 X111 F2.1 [P4] linear interpolation, 1 axis

G00 Z10 M05 Z axis to safety distance

RET Program end

Syntax

Page 110: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-42 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Velocity Programming "G94"

G94 F<feed rate in mm/min>

G94 F<feed rate in inch/min>

With function G94 "Velocity programming", the programmed F word is in-terpreted as feed in mm/min. G94 is the power-on state of the CNC. Thefeed distance is programmed for linear axes in the active unit (mm/inch).The feed distance with rotary axes is programmed in units of the feedconstant, which is programmed in the axis parameters.

• Depending on the settings in the process parameters, G94 may be thepower-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, orwhen a BST, RET or a control-reset is executed, G94 is set automati-cally depending on the setting in the process parameter, and the feedvalues (F values) are reset.

• The special requirements that apply to the path feed rate depending onthe nominal radii when machining with the C axis are described in sec-tion "Rotary Axis Programming".

• The F value that was programmed together with G94 can be pro-grammed with 6 digits before and with 1 digit behind the decimal point,or with 5 digits before and 2 digits behind the decimal point.

Feed Rate per Spindle Revolution "G95"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 spin-dle revolution. The contour feed rate depends on the value of the actualspindle speed. If a position encoder is not located on the main spindle,the contour feed rate depends on the spindle speed command value.

G95 F<input feed rate in inches or mm per spindle revolution>

G95 "Feed per revolution" remains modally active until it is canceled byG94 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 isto be based on a different spindle, the desired spindle must be se-lected prior to the G95 NC block by using the SPF <Spindle number>command.

• Depending on the settings in the process parameters, G95 may be thepower-on default. G95 (Input feed rate in inches or mm per spindlerevolution) 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, orwhen a BST, RET or a control-reset is executed, G95 is set automati-cally depending on the setting in the process parameter, and the feedvalues (F values) are reset.

• G95 is automatically activated upon the selection of G96. If G95 wasnot previously active, an error message is issued because of themissing F value.

• If G95 is active, axis movements which were generated via G01, G02or G03 are not performed unless the spindle is turning.

• Axis movements in rapid traverse (G00) superimpose G95 with G94and are performed at the feed rate entered in the parameters or at thefeed rate programmed with G00 in the NC block.

Syntax

Syntax

Page 111: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-43

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Programmed axis movements occurring when the spindle is off or withS0 prevent further program execution and result in an error message.

• The programmed F values for the functions G94 and G95 do not inter-act with one another.

• The spindle override affects the spindle speed and the feed rate whenG95 is active.

• The F value that was programmed together with G95 can be pro-grammed with 4 digits before and 4 digits after the decimal point, orwith 3 digits before and 5 digits after the decimal point.

Dwell Time "G04"The function G04 "Dwell time" can be used to program a delay time in theNC program for functions such as relief cutting, machine control func-tions, etc.

G04 F<time in seconds>

G04 is active on an NC block-by-block basis and must be programmed incombination with an F word. The F word will then correspond to a dwelltime in seconds.

• The maximum directly programmed dwell time is 999.99 seconds(16.7 minutes) and the maximum resolution is 0.01 seconds.

• The F value programmed together with G04 can be programmed withthree digits before and two digits after the decimal point.

• Only functions M, S, and Q can be programmed in a dwell time-pro-grammed NC block.

• The dwell time programmed in the F value using G04 does not affectthe modally active F values (feed rate).

• The F value programmed together with G04 can be programmed with3 digits to the left and 2 digits to the right of the decimal point.

Example: NC program - with G04

G00 G90 G54 G06 G08 Movement commands, interpolation con-ditions

X0 Y0 Z10 S3000 M03 Starting position, spindle ON

G04 F3.5 Delay of 3.5 sec for spindle ramp-up

G01 X26.26 Y18 Z5 F2000 Machining

.

RET Program end

Syntax

Page 112: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-44 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Basic Connections between Programmed Path Velocity (F) and AxisVelocities

Under interpolation conditions, the CNC computes the path velocity asfollows:

( ) ( ) ( )222222ZYX RCRBRAZYXF ∗+∗+∗+++= &&&&&&

Fig. 4-44: Calculating the path velocity

Example: Path velocity for thread cutting

&��.��

��� �G#M

�4G3G 5 ������%����3�!�� �����

6G 5 �����%����6�!�� �����

4G 5 �����%����4�!�� �����

��G ��� �" �����%������ ������%��'���

&��G ��� �" �����%������ ������%��'���&

���G ��� �" �����%������ ������%��'����

�# #�!��������� ��'������3�!�� �����G

�# #�!��������� ��'������6�!�� �����G

�# #�!��������� ��'������4�!�� �����G

F��G �����" �����%

!==��L=!

443Schneid.FH7

Fig. 4-45: Path velocity for thread cutting

In this example, the following equation results from computing the pathvelocity:

( )22ZRCZF ∗+= &&

Fig. 4-46: Example - path velocity calculation

Basically, two possibilities to program the F value can be considered.

The CNC interprets the F value as a velocity in the direction Z.

NC program: G01 Z... C... F...

Computation:

WnPZF ∗== 2&

nw: VelocityP: Thread pitch

Fig. 4-47: F value as velocity

Calculating thepath velocity

Without RZ

Page 113: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-45

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Effect:

��G �F�G � G�4

��4

444VorO.FH7

Fig. 4-48: Feed velocity (F) without RZ

Here, the C axis is interpolated simultaneously.

The CNC interprets the F value as the resulting path velocity.NC program: G01 Z... C... RZ... F...

Computation:

( )

( ) WZ

WZZ

W

Z

nRPF

nRRCund

nPZmit

RCZF

∗∗+=⇒

∗∗=∗∗=

∗+=

22

22

2

2

π

π&

&

&&

Fig. 4-49: F value as resulting path velocity

Effect:

��G � F

���4�G

445VorM.FH7

Fig. 4-50: Feed velocity (F) with RZ

With RZ

Page 114: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-46 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Feed LimitationBesides the maximum axis velocity that is defined in axis parameterCxx.016, the axis velocity can be limited with another dimension duringmachining.

F;F

��9��+9�$�������@����2����A

��%��>*0�'(��'� �+9�$������

max_achsgeschw.FH7

Fig. 4-51: Axis velocity limits

The safety-related axis velocity allows the machine builder to, for exam-ple, reduce the maximum allowable axis velocity (and thus the path veloc-ity) while machining a heavy workpiece or to open the guard door.

Machine DataThe safety-related axis velocity is axis-specifically adjustable in the ma-chine 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 theNC program and in the PLC by the machine builder.

Element "Safety velocity limit active", which is intended to visualize thePLC interface signal, can only be accessed in read mode

PLC Interface Signal

The axis control signal activates safety-related velocity limiting.

The axis status signal is set as soon as safety-related velocity limiting isactive.

AxxC.SPEED

AxxS.SPEED

Page 115: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-47

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Boundary conditions• 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 programis active at the time.

• The safety-related axis velocity can be modified from the PLC at anytime via MTD_WR.

• For all axes of a process, it is possible to program a safety-related axisvelocity 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 onand off.

• The user can identify the effectiveness of the safety-technical axisvelocity in the machine data via data element "Safety velocity limit ac-tive".

• After the PLC interface signal has been set, the safety-related axisvelocity 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 nextNC block or when an emergency stop occurs.

• With each change of the limits, the PLC status signal is set to "0" for aPLC cycle.

• The NC does not consider any changes of the desired value whichhave been caused by the feed override.

Adaptive Feed Control "G25" / "G26"Adaptive feed control permits the change of the feed velocity of an axis orthe path velocity of the interpolating axes depending on the motor cur-rent/torque of a spindle or a feed axis, so that (when milling, lathing orgrinding) 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, theworkpiece and the machine.

The function is activated with parameter Bxx.062. The feed control pa-rameters 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 toa process. This means the reference axis must also belong to the pro-cess 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 anAPR. (The CPU informs the APR to which axes the distribution of theinternal 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 operatingmodes automatic, semi-automatic and MDI.

Page 116: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-48 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• The NC automatically cancels adaptive feed control (and sets G25) inthe case of a control reset as well as at the program end.

SyntaxG25 Adaptive feed control OFF (default)

G26 Adaptive feed control ON

ParametersIf the machine builder answers process parameter Bxx.062 "Adaptivefeed control" with "Yes", then further process parameters appear as fol-lows:

• 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 ParametersThe process-specific page "Adaptive feed control" (page 30) has the fol-lowing structure:

MPage30.bmp

Fig. 4-52: Structure of machine data page 30

Page 117: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-49

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Idle Thrust Measurement "ITM"The ITM (Idle Thrust Measurement) command is used for measuring theidling torque of a reference axis defined according to its axis significancein process parameter Bxx.063 Reference axis for adaptive feed con-trol or in the machine data.

ITM

The ITM command may be carried out

• together with G26 Switch on adaptive feed control at the beginningof the machining process as well as

• independent of adaptive feed control (G26).

The measured idling torque is stored in machine data page 30 of machinedata element 005 Current idling torque and in AXD parameter P-7-3650Measured idling torque.

PLC Interface SignalsTwo new PLC interface signals were implemented for the function "Adap-tive feed control". These are used to evaluate the measuring results.

• PxxS.THMIS “Thrust Missing” depends on process parameter Bxx.065and

• PxxS.EXCTH “Excessive Thrust” depends on process parameter Bxx.064.

Thrust Missing

Process status signal

PxxS.THMIS (THrust MISsing)

PxxS.THMIS = 1:

The machining torque has not exceeded the preselected minimum ma-chining torque Bxx.065 during machining.

PxxS.THMIS = 0:

The machining torque has exceeded the preselected minimum machin-ing 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 wellas after a control reset.

If the machining torque does not exceed adaptive feed control Bxx.065during machining with adaptive feed control active, the NC reports this assoon as adaptive feed control is turned off by setting interface signal"Thrust Missing" (PxxS.THMIS).

Syntax

Type

Description

Meaning

Updating

Method of operation

Page 118: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-50 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Excessive Thrust

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 reductionBxx.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 wellas after a control reset.

If the current feed reduction exceeds the maximum feed reductionBxx.067 during machining with adaptive feed control active, the NC re-ports this by setting interface signal "Excessive Thrust" (PxxS.EXCTH).

Note: The NC continues machining, regardless whether the currentfeed reduction exceeds the maximum feed reduction or not.Only if the current feed reduction reaches 100% (meaning thefeed velocity = 0 mm/min) and the adjusted maximum feed re-duction Bxx.067 or machine data variable 013 is less than100% does the NC stop the machining process and generateerror message 510 "100% feed reduction@axis".

Problem of "Inclined Axis"In the case of an "inclined axis without counterforce", a torque for holdingthe axis in position is required. This holding torque is added as an offsetto all torques that have been recorded so far. This results in a distortion ofthe torques required for adaptive feed control.

Note: Adaptive feed control is not possible for a "hanging axis" asthe reference axis.

The torque offset (standstill torque) required to hold the axis must beeliminated 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-7-3651

This refers to the specified reference axis in the parameters or machinedata. During adaptive feed control, the standstill torque is taken into ac-count while the torque is being generated.

Type

Description

Meaning

Updating

Method of operation

Solution

Page 119: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-51

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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-7-3651, a pausefor the time specified in machine data parameter "Measuring time stand-still torque" occurs and the standstill torque is generated. The torque de-termined 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 AssignmentThe feed adaptation function is controlled by machine data page 30"Adaptive feed control". If no reference axis (=0) has been yet logged inthe machine data page, the following data are used as the parameterbasis:

<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 DocumentationA detailed description of the function is available under order number

"DOC-MTC200-AD*FEED*V19-FK01-EN-P"

Page 120: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-52 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

4.5 Spindle speed

S Word for the Spindle Speed SpecificationThe spindle speed in an NC program is expressed by a speed word thatuses the address letter S and a speed which is stated directly as a con-stant or by means of an expression. A spindle code can also be added tothe speed word if more spindles are present. The spindle speed is re-stricted in such a way that the limits entered in the parameters are notexceeded. The S word is interpreted, if spindle speed G97 in rpm is ac-tive, as the spindle speed value. G97 is the power-on state of the CNC.The following chapters describe how the S word interacts in conjunctionwith the various spindle functions (G92, G96, G97, M19).

S<constant> ⇒ S5000

S<expression> ⇒ S=@55-100

with enhanced address format:

S<index> <constant> ⇒ S2 3500

S<index> <expression> ⇒ S3=@60

The spindle speed value ranges from 0 to the maximum value entered inthe spindle parameters.

The S value acts with the associated spindle functions as follows:

Meaning G / M Code Active Format Remarks

Spindle speed inRPM

G97 withM03/M04Mx03 / Mx04

modal 5 before deci-mal point

2 after decimalpoint

If G97 is programmed after G96 isactive, the most recently activespeed is taken on as the new speedcommand value.

(x = index [1 - 3]) M19Mx19

block-wise

3 2 Spindle positioned in degrees

Constant cuttingspeed

G96 modal 5 2 Canceled by G97.

Spindle speedlimitation

G92 Only ac-tive withG96. Mo-dally ac-tive untilG97.

5 2 Canceled by G97; the G92 value isreactivated the next time G96 isused.

Constant grindingwheel circumferen-tial speed

G66 modal 5 2 Canceled by G97/G96

If the S word appears alone in the NC block, it is assigned to the memoryof the modally active spindle functions. If the S word appears in an NCblock together with one of the spindle functions, the corresponding spin-dle function is activated first; then the S value is placed into the appropri-ate memory.

Up to 3 spindles can be used in a process. Thus, the spindle index is lim-ited to a value range of 1 to 3. If the spindle index is not declared whenthere is more than one spindle in the process, the spindle speed specifi-cation will then apply to the first spindle. Each spindle has its own memoryfor the S values. This prevents S values influencing each other.

• The programmed spindle speed can be changed via the spindle over-ride from 0% to 255%. The 100% position corresponds to the pro-grammed value.

Syntax

Page 121: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-53

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• The S value can be entered with 5 digits before and 2 digits behind thedecimal point.

• The spindle speed values are reset after the controller has been pow-ered 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 spin-dle in the process, the spindle speed specification will then apply to thefirst spindle.

• The direction of rotation of the main spindle is determined by the Mfunction M03 (spindle clockwise) and M04 (spindle counterclockwise). Itmust 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 S1 1500 M203 S2 2500 M303 S3 3500

Note: The machine builder specifies the maximum spindle speed inthe axis parameters.

Select Main Spindle "SPF"If several spindles are being used in a process, certain functions such asG96 (constant surface speed) must be allowed to act on another spindlein addition to the first spindle.

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 abovefunctions acts on another spindle other than the first spindle, the refer-ence spindle must be selected first using SPF <spindle number>.

• The reference spindle must be selected at least one NC block prior toone of the above-mentioned function requests.

• SPF <spindle number> remains modally active until it is overwrittenwith a different spindle number or is automatically set to the first spin-dle at the end of the program (RET) or by BST.

• The programming of the spindle speed G97 in rpm is active for allspindles present in the process. The reference spindle for one of theabove-mentioned functions must therefore be reset after G97 hasbeen programmed.

• SPF <spindle number> may be used only for main spindles that are inthe spindle mode. A main spindle which is in the rotary axis modecannot be selected as a reference spindle.

• Interrogating the reference spindle with SPF, SPT, or SPC as an oper-and is possible in a separate NC block.

Syntax

Page 122: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-54 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

@10 = SPF The reference spindle number is programmed in variable 10.

Example: NC program - longitudinal thread machining with the 2nd spin-dle

��

-�

:�

/�

��

�� -� :� /� �� �� -� 1

0

F� G

F��G

F��G

F��G

F��GF��G

446Laeng2.FH7

Fig. 4-53: Thread cutting - longitudinal thread with the 2nd spindle

Thread lead: 3mm

Thread depth: 4mm Thread depth per cut: 2mm

G00 G54 G90 G06 G08 X80 Z130 [P1] Starting conditions

SPF 2 Reference spindle selection

S2 2000 M203 Spindle 2 ON

G01 X45.5 F1500 [P2] Feed for 1st cut

G33 Z30 K3 P180 [P3] 1st thread thru hole

G00 X80 [P4] Withdraw X axis

Z130 [P1] Starting point

G01 X43.5 F1500 [P5] Feed for 2nd cut

G33 Z30 K3 P180 [P6] 2nd thread pass

G00 X80 [P4] Withdraw X axis

M205 Spindle 2 OFF

RET Program end

Page 123: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-55

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Constant Grinding Wheel Peripheral Speed (SUG) "G66"With G66, the programmed value in m/s or feet/s invokes a constantgrinding wheel peripheral speed with automatic adjustment of the spindlespeed to the individual grinding wheel diameters.

G66 S<constant grinding wheel peripheral speed>

G66 is assigned to group 8 of the G code and consequently can be can-celled 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 desiredspeed values for the addressed spindle are interpreted in all operatingmodes as m/s or feet/s.

• The grinding wheel peripheral speed remains in effect until the tooldata record is removed from the corresponding spindle or until thespindle is stopped by control-reset in response to PLC signalAxxCSPRST.

• The required spindle speed is calculated after the SUG has been se-lected.

• The corresponding tool data elements of the addressed spindle areused for calculating and monitoring the speed.

• If SUG is selected with G66, the corresponding spindle must contain avalid tool data record (tool codes 1, 2 and 3 [correction type ≥ 3]). Oth-erwise, an error message will be generated.

• If SUG is selected with G66, the corresponding length registers for thewheel diameter must be >0; an error message will be generated if this isnot the case.

• A new speed is calculated if a new S value is programmed or if a ge-ometry register which is relevant to the wheel diameter is changed inthe next NC block.

• The data elements of the D correction are currently excluded from thespeed calculation.

• G66 is cancelled via G96 or G97 or BST, RET and M30.

Calculation formula:

ππ ∗∗

=∗

∗= −−

][

]/[][min

][

]/[][min

7206000011

inchAKT

sft

mmAKT

sm

d

SUGS

d

SUGS

S: spindle speed [rpm]SUG: Grinding wheel peripheral speed [m/s or feet/s]dAct : Grinding wheel diameter [mm or inch]

Note: The data elements of the basic tool data "Tool code and repre-sentation type" that are necessary for grinding, as well as theselection of SUG with G66, become active only if the label"Grinding" is set in system parameter "Technology".

Syntax

Boundary conditions

Page 124: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-56 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Constant Surface Speed "G96"The CNC controller uses function G96 "Constant surface speed" to de-termine the correct spindle speed to match the current turning diameter.G96 is a typical lathe function; face turning is the most frequent applica-tion. The feed axis for G96 is derived from the typical G18 (ZX) axis as-signment of a lathe, so that the X axis is defined as the feed axis. If G96is active, the spindle speed is reciprocal to the distance between the tooltip and the rotating axis, so that the spindle speed increases as the dis-tance becomes smaller.

G96 S<constant surface speed in m/min>

With G00 active, the spindle speed is set independently of the current Xposition to the speed which results at the end of the NC block. G96 re-mains active; however, the link to the feed movement is temporarily un-available. The NC block is terminated if the spindle has reached its com-mand speed and the feed axes have reached their end points.

G95 is automatically activated if G96 is selected. If G95 was not previ-ously active, an error message is generated because of the missing Fvalue.

With very small X values, the spindle speed would become too large;therefore, the spindle speed is limited to the maximum spindle speed setin the parameters.

When G96 is active, the S value is interpreted as the surface speed. Thespindle speed is calculated based on the relation:

) r (2

vcS

π∗∗=

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 isto be based on a different spindle, the desired spindle must be se-lected prior to the G96 NC block by using the SPF <spindle number>command.

• Depending on the settings in the process parameters, G96 may be thepower-on default. G96 (constant surface speed) remains modally ac-tive until it is canceled by G97.

• After the controller is turned on, or after an NC program is loaded, or whena BST, RET or control reset occurs, G96 is set automatically depending onthe setting in the process parameter and the spindle speed values (S val-ues) are reset.

• If the S value is changed while G96 is active, the S value change mustbe programmed together with G96.

• When G96 is active, the maximum spindle speed can be limited by thecommand "G92 S <spindle speed>".

• The spindle override is limited to 100% when G96 is active. Reducingthe spindle override to less than 100% results in a reduction of thesurface speed.

• If G96 is cancelled by G97, then the most recent active spindle speedis taken on as the new desired spindle speed value.

• As of version V22, process parameter Bxx.071 "Reference coordinatesystem for G96" can be used to select the reference system for de-termining the spindle speed. In the selection of the machine coordinatesystem as the reference system, the NC takes the active tool length

Syntax

Page 125: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-57

DOK-MTC200-NC**PRO*V23-AW01-EN-P

compensation into account, so that the resulting spindle speed refersto the tip of the tool. When the tool coordinate system is activated asthe reference system, the active zero offset is also included in thespeed calculation.

Example: NC program - face turning with G96

��

-�

:�

/�

��

�� -� :� /� �� �� -� 1

0

F� G

F��G

F��GF��G

F��GF��G

447Plan.FH7

Fig. 4-55: Face turning

G00 G54 G90 G06 G08 X72.5 Z100 [P1] Starting conditionsS1 2500 M103 Spindle ONG00 Z78 [P2] Feed for 1st cutG96 X27.5 S1 400 [P3] 1st face turning passG00 Z100 [P4] Withdraw Z axisX72.5 [P1] Starting pointG00 Z76.5 [P5] Feed for 2nd cutG96 X27.5 S1 400 [P6] 2nd face turning passG00 Z100 [P4] Withdraw Z axisM105 Spindle OFFRET Program end

Spindle Speed Limitation"G92"The function G92 can be used to set an upper spindle speed limitationwhile G96 is active. The surface speed is kept constant while G96 is ac-tive. 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 ma-chining-related reasons, it may be necessary to limit the maximum spindlespeed to a value which is smaller than the maximum spindle speed set inthe parameters. G92 is used to set a maximum upper limit for the spindlespeed while G96 is active.

G92 S<upper spindle speed limit>

G92 is active only for the NC block in which it is located. The limit set for thespindle speed remains modally active until it is overwritten with a new speedlimit by programming a new G92 or is reset by programming G92 S0.

• A speed limitation programmed using G92 remains modally active untilit is canceled by programming G92 S0 or is automatically reset at theend of the program RET or by BST.

• Due to the programming of G97, the set spindle speed limit by usingG92 becomes inactive. If G96 is reprogrammed it becomes activeagain.

• No further functions may be programmed in an NC block containing G92.

Syntax

Page 126: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-58 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Additional Spindle Speed LimitationsBesides the maximum spindle speed for HS operation, which is defined inaxis parameter Cxx.049, the maximum spindle speed can be limited dur-ing machining via further dimensions.

F�F��9����'(���*���'�%�'�/���@����2����A

��9����%��>*0�'(��'� �/���@�78A

��9����1���22�� ��/���@8#8A

��9��/���%1��81�$�����8�������������@���A

max_spindeldreh.FH7

Fig. 4-56: Spindle speed limitations

Machine DataThe maximum safety-related speed (PLC) and the maximum program-mable speed (CNC) are axis-specifically adjusted in page 2 of the ma-chine 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

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

Boundary conditions• A set-up engineer can change the programmable speed in the ma-

chine data only if he possesses the special password and if no NCprogram is presently active.

• The speed limits can be modified from the PLC at any time viaMTD_WR.

• The speed limit for all spindles of a process can be programmed withinan 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 ma-chine data via the data element "Safety speed limit active" and via thecontrol signal "AxxS.SPEED".

• The NC monitors the spindle speed in accordance with the speed lim-its in speed mode only if the control signal "AxxC.SPEED" is set.

AxxC.SPEED

AxxS.SPEED

Page 127: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-59

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Changes of the speed limits as well as the activation and deactivationof the monitoring are immediately taken into account by the NC.

• With the activation of the main spindle synchronization, the NC com-putes, considering all transformation ratios and speed limits, themaximum permissible speed of the master spindle. The NC recalcu-lates the maximum speed of the leadscrew each time that the speedlimit for the leadscrew or synchronous spindles changes or each timea safety-related speed limit is activated or deactivated. A possiblenecessary limitation is performed synchronously for all spindles in-volved in the synchronization.

• If the actual speed of the spindle lies beyond a speed limit just as theinterface signal "Activate limitation" has been activated, then the NCstops the corresponding spindle, taking the smallest maximum speedlimit of the other speed limits into account.

• If a coupling (G33, G63, G64, G65, G95) or main spindle synchroniza-tion is active at the moment of activation, the NC will adapt not only thespindle speed but also the path velocity of the feed axes and/or spin-dles involved in the coupling or synchronization.

• With each change of the limits, the PLC status signal is set to "0" for aPLC cycle.

• Changes of the desired speed via spindle override are not considered.

• Where PLC-controlled spindles are concerned, the limited speed hasto be read and transmitted to the external spindle upon each positiveedge of this status signal.

Safety-Related Speed LimitThe safety-related speed limit allows the machine builder, for example, tolimit the spindle speed when a new chuck is to be used or if the guarddoor is to be opened.

Programmable Speed LimitThe programmable speed limit allows the NC programmer to limit, from atechnological point of view, the allowable spindle speed.

Spindle Speed in RPM "G97"With function G97 "Spindle speed in RPM", the programmed S value isinterpreted in rpm. G97 is the power-on state on the CNC; it remainsmodally active until it is overwritten by G96.

G97

• Depending on the settings in the process parameters, G97 may be thepower-on default. G97 – Spindle speed in rpm – remains modally ac-tive until it is canceled by G96.

• After the controller is turned on, or after an NC program is loaded, orafter a BST, RET or control reset, G97 is set automatically dependingon 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 speedis taken on as the new desired spindle speed value.

• The programming of G 97 is active for all spindles present in the proc-ess. The selection of the reference spindle using SPF must thereforebe reset after G 97 has been programmed.

Syntax

Page 128: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-60 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

4.6 Rotary Axis Programming

Effective Radii "RX", "RY", "RZ"With all interpolation movements using G00 and G01, the components ofthe local vector are assumed constant during an NC block. The transla-tion and rotation movements are performed at constant speed. Thespeed, deflection-point speed and acceleration components of all axesinvolved in the movement are calculated using the same method as be-fore; however, the rotary main axes are taken into account. For the abso-lute distances to the individual main axes, the effective distances arespecified with labels RX, RY and RZ. The CNC considers the distancesegments caused by the rotation of the rotating main axes only if the ap-pertaining effective distances RX, RY, and RZ are specified to the associ-ated linear main axis at which the rotation is performed.

• The effective distances RX, RY, and RZ indicate the absolute distanceto the respective linear main axis. They therefore may not be pro-grammed 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 ac-tive for a single NC block and must be programmed in the NC block inwhich it is to be active.

• The effective distances can be programmed in any desired order in theNC program and without reference to the rotary axes.

• Unreasonable entries for effective distances can cause the rotary mainaxes to turn too quickly or too slowly, or they can result in no speedcomponents at all.

Note: In conjunction with the KDA main spindle drive, it is essential toperform the C-axis movement with G06 "Low following error in-terpolation".

Example: NC program - spiral groove

������

.��

8�� ���" ��!���

2

0

���

2��

#4

448Spira.FH7

Fig. 4-57: Spiral groove machining on end surface

Page 129: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-61

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC program:

G90 G06 G17 Machining plane XY, end surface • •G00 X-30 Y0 Z501 C90 Approach; positioning of C-axisG01 Z497 F500 Lowering the cutter[spiral groove machining]G01 G91 X-40 C-270 RZ50 F1200 Spiral groove on the end surface • •RET Program end

NC Program Changeover between Spindle and C AxisThe changeover between C axis mode and main spindle mode is per-formed 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 mainspindle mode is active, the CNC performs the changeover with the assis-tance of the PLC. NC block preparation and NC block processing arestopped until the changeover operation is completed.

The same mechanism is active when the changeover from C axis modeto main spindle mode occurs.

• After the main spindle to C axis mode changeover, all spindles activein the process must be traversed once with G90 (Absolute data entryof dimensions) before G91 (Data entry as incremental values) can beused.

M19 S0 Orientate main spindleG00 G54 G90 X100 Z200 M03 S1000 Home position, spindle

mode• MachiningG00 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 Home position, spindle

mode•RET Program end

Start-up Logic for Endlessly Rotating Rotary Axes

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 program-ming (G90). It does not have any influence on chained dimen-sion programming (G91).

The G36, G37 and G38 commands form the G code group "Rotary axisapproach logic" (No. 21).

Changeover with rotary axis-capable main spindle drive

Modulo calculation

Page 130: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-62 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

In modulo calculation "Shortest path" G36, the command position is ap-proached via the shortest path.

����� ����� ����� �G���B

����!�������� �G�7�/�B

1���1�:***1�� 7�/��F���

449g36.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).

In modulo calculation "Positive direction" G37, the command position isapproached in the positive direction.

����� ����� ����� �G���B

����!�������� �G�7�/�B

1���1�.***1�� 7�/��F���

450g37.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).

In modulo calculation "Negative direction" G38, the command position isapproached in the negative direction.

����� ����� ����� �G���B

����!�������� �G�7�/�B

1���1�/***1�� 7�/��F���

451g38.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 inthe Bxx.056 process parameters.

Shortest path G36

Positive direction G37

Negative direction G38

Page 131: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-63

DOK-MTC200-NC**PRO*V23-AW01-EN-P

4.7 Transformations

The main application of the "Transformation of Cartesian coordinates intopolar coordinates" function is facing turning parts on turning and grindingmachines.

This function is particularly useful for milling surfaces on lathes (cylindersurface machining) and for grinding cams. It can also be used in otherapplications (such as in milling machines with rotary table or rotating heads).

Transformation FunctionsCoordinate transformation is available for:

• face machining and

• lateral cylinder surface machining.

F�� � ����� ���

��� �� ���%���! �������� � ����� ���

452Zylin.FH7

Fig. 4-61: Face and lateral cylinder surface machining

The commands G30 (canceling coordinate transformation), G31 (facecoordinate transformation), and G32 (lateral cylinder surface coordinatetransformation) form G code group "Transformation functions" (No. 17).

Select Face Machining "G31"Function G31 "Select face machining" is used to switch the CNC to afictitious Cartesian coordinate system. The defined fictitious linear axesare used in the interpolation instead of the assigned real main axes. Aswith milling, the path feed rate using the transformation function must bespecific – preselect a relative speed between the tool and the workpieceusing the F value. The programmed path feed rate is reduced in such away that the maximum speed of the rotary axis is not exceeded. This isespecially the case with movements near the center of rotation.

G31

F�� ���������

3

64

453G31.EPS

Fig. 4-62: Face machining with G31

Syntax

Page 132: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-64 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• The CNC supports the transformation function for the XY plane (G17).The real axes involved in the transformation must have the axismeaning X and C.

• The real Y axis (if present) becomes an auxiliary axis, which has themeaning V. When the transformation is deactivated, the NC reestab-lishes the original status.

• The zero point offsets are cancelled (G53) when coordinate transfor-mation is selected (G31); tool path compensation correction and toollength compensation are deactivated (G40, G47). The CNC switchesto radius programming (G15).

• The X axis must be in the positive area when the change to coordinatetransformation occurs.

• After the changeover to coordinate transformation, the zero offsets forthe fictitous axes become active, depending on which ones are set.The zero offsets of the real main axes assigned to the fictitous axesare not in effect.

• After the change to coordinate transformation, it is possible to programdirectly using absolute (G90) or incremental (G91) dimensional input.

• It is possible to open a new program during coordinate transformationby using NC block search; however, coordinate transformation (G31)must be set with the basic settings for this function (G54, G48, etc.) inMDI 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 tothe first spindle. If the transformation is to be applied to a differentspindle, the desired spindle must be selected prior to coordinate trans-formation by using the SPC <spindle number> command.

• The real primary axes that are allocated to the fictitious axes must notbe programmed during coordinate transformation.

• G31 "Transformation" remains modally active until it is cancelled withG30 or G32, or until it is reset automatically via BST or at the end ofthe program (RET).

Note: If coordinate transformation is active, the PLC employs axisdesignation 2 for the two fictitious axes that span the currentworking plane, instead of axis designation 1, which is stored inthe machine parameters.

The machine manufacturer defines the axis designation of thefictitious axes in the axis parameters.

The following list contains all functions that may not be programmed dur-ing 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"

Boundary conditions

Invalid NC commands duringtransformation

Page 133: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-65

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Speed limitation "G92"(if the speed limitation is applied to the primary spindle that is allocatedto "R2"),

• Feed Rate per Spindle Revolution "G95"(if the feed specification concerns the primary spindle that is allocatedto "R2"),

• Constant cutting speed "G96",

• Spindle control commands "M03", "M04", "M05", "M13", "M14", "M19"(if a spindle-specific auxiliary function is programmed for the primaryspindle 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 errormessage when they are used during the transformation process.

When the transformation function is activated and deactivated, the NCdeactivates tool length and tool radius compensation.

Tool length and tool radius compensation can be active when the trans-formation begins. Their effect is not influenced by the transformationfunction.

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 lengthcompensations "L1" and "L2" must be taken into account in geometricprogramming. The value "0" must be entered for the corresponding toollength compensations "L1" and "L2" of the tool.

The facing parameter values of axis meanings and axis designations of alathe with a primary spindle with rotary axis capability (S1/C), an X and aZ axis, and a PLC-controlled turret with driven tools (S2) have been set asfollows:

Axis designation 1 Axis designation 2 Axis meaning

S1/C Y1 C,X

S2 - -

Notes:• The coordinate transformation function is an option that re-

quires a special hardware configuration. All axes that areinvolved in the coordinate transformation must be on anAPR card. The real primary axes that are allocated to thefictitious axes must not be programmed during coordinatetransformation.

• If the coordinate transformation function is executed in amachine with a real Y axis, the corresponding process maynot contain an axis of axis meaning V.

• If the coordinate transformation function is activated, the CNCautomatically triggers a changeover to rotary axis mode.

• When face machining is activated and deactivated, theCNC deactivates all zero point offsets and sets G53.

• If diameter programming (G16) is selected while face ma-chining is active, the CNC interprets all position values ofthe fictitious axis with axis meaning X as a diameter speci-fication.

Tool Compensation

Axis meaning

Page 134: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-66 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Please refer to the "Coordinate transformation function V15" descriptionfor further and supplementary information about face machining.

"DOC-MT*CNC-TRA*FKN*V15-ANW1-EN-P".

6NC�

3NC3�����3K���������37

����������� ��������� !

�������������� ��������� !

453Fahr.FH7

Fig. 4-63: Travel limits for transformation G31

Function G31 "Select face machining" is used to switch the CNC to afictitious Cartesian coordinate system. In the new coordinate system, theX 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 "LimitX+" 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 of2•Limit X+ or 2•Limit X-. At the lathe, however, the travel limit is a circle ofthe radius R = Limit X+ or R = Limit X-. A point within the square that isoutside the circle may be programmed, but cannot be approached.

Example: NC program - face machining

Detailed description

Travel limits for transformationG31

Page 135: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-67

DOK-MTC200-NC**PRO*V23-AW01-EN-P

F�7G

F�AG

F��G

F��GF��G

F��G

F��G

F� G

2

0

����-�2�.�

����

-�

2�

.�

455STIRN.FH7

Fig. 4-64: Facing machining with transformation

NC program:

T12 M6 ;Tool change;driven tool

M89 ;Engage driven tool

S2 3500 M203 ;Driven tool ON

G00 G17 G54 G48 Z100

X140 C0 ;Home position for the change

G31 ;Activate coordinate transformation

G54 G90 G54 G06 G08 ;Home position

G00 G42 G94 X1 60 Y1 20 ;[P1] Starting point of machining

G01 Z-0.5 F500 ;Feed Z axis

X1 20 Y1 60 F400 ;[P2] 1st straight line

X1 -20 ;[P3] 2nd straight line

X1 -50 Y1 30 ;[P4] 3rd straight line

G02 X1 -50 Y1 -30 I-50 J0 ;[P5] Semicircle in CW direction

G01 X1 -20 Y1 -60 ;[P6] 4th straight line

X1 20 ;[P7] 5th straight line

X1 60 Y1 -20 ;[P8] 6th straight line

Y1 20 ;[P1] 7th straight line

G00 Z10 ;Z axis to safety distance

G30 ;Cancel coordinate transformation

G54 G48 G00 X140 ;Home position

Z200 ;Withdraw Z axis

M90 ;Disengage driven tool

M30 ;End of program

Selection of Lateral Cylinder Surface Machining "G32"With lateral cylinder surface machining G32, the CNC produces straightlines and circles on the lateral cylinder surface according to the G00, G01,

Page 136: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-68 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

G02 and G03 blocks that are specified in the NC program. The straightlines and circles on the lateral cylinder surface can be programmed on theplane of the developed lateral cylinder surface that spans a linear axisand a rotary axis.

2 ��� ;<0 ����<���1�����0�

) �����<���3E���

,

���������#>

1

��

1 ;<0 ;<

456Zylin.FH7

Fig. 4-65: Lateral cylinder surface machining

The rotary axis that is involved in lateral cylinder surface machining canbe programmed like a linear axis in [mm] or in [inch] (by specifying posi-tions 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 sur-face machining is active (G30 must first be used for deactivation).

• If the machining plane is spanned by two rotary axes, the CNC takesthe effective radius RI of both rotary axes into account.

• The effective radius RI has a modal effect. The NC retains the effec-tive radius until lateral cylinder surface machining is deactivated.

Before lateral cylinder surface machining is activated, the plane usuallymust be selected with free plane selection (G20, G21, G22).

To perform the individual machining tasks, the following planes are se-lected during machine operation:

Linearmainaxes

Secondary axes Rotary main axes

G code

Axismean.

X

Axismean.

Y

Axismean.

Z

Axismean.

U

Axismean.

V

Axismean.

W

Axismean.

A

Axismean.

B

Axismean.

C

Machiningplane

Vert.Axis

Remarks

G18 X1 Y Z U - X2 - B C Z X1 Y Turning(= power-on pos.)

G20 X2=0 Y0 Z0 X2 Y Z U - X1 - B C X2 Y Z Milling(= G17 with X2)

G20 Z0 X2=0 Y0 Z X2 Y U - X1 - B C Z X2 Y Milling(= G18 with X2)

G20 Y0 Z0 X2=0 Y Z X2 U - X1 - B C Y Z X2 Milling(= G19 with X2)

G20 Z0 C0 X2=0 G32 RI=80 Z C X2 U - X1 - B C C Z X2 Lateral cylindersurface machining

• During lateral cylinder surface machining, the involved rotary axis ob-tains the functionality of a linear primary axis. Functions such as toolradius path correction and zero point offsets, including rotations, mayalso be used in the course of lateral cylinder surface machining.

Programming

Syntax

Effective radius

Plane selection

Selection and axis assignment

Boundary conditions

Page 137: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-69

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• During lateral cylinder surface machining, the NC monitors the limitedrotary axes (travel range limits) in the same way as during normal op-eration.

• During lateral cylinder surface machining, rotary axes must be pro-grammed in [mm] or [inch].

• When lateral cylinder surface machining is activated, the NC automati-cally switches over to radius programming (G15).

• Upon cancellation, the NC restores the programming mode (radiusprogramming G15 or diameter programming G16) that has beenstored in the process parameters.

• G32 – Coordinate transformation – remains modally effective until it iscancelled with G30 or G31, or until it is automatically reset at the endof the program (BST, RET, JMP, M02, M03).

Note: Before lateral cylinder surface machining is activated, the acti-vated machining plane must be spanned by at least one rotaryaxis. This is possible using G20, G21, G22 (Free plane selec-tion).

When lateral cylinder surface machining is activated or deacti-vated, the NC deactivates all zero point offsets and sets G53.

If diameter programming (G16) is selected during lateral cylindersurface machining, the NC interprets all position values of theaxis with axis meaning X as diameter specifications.

Please refer to "Free plane selection and lateral cylinder surface machin-ing V22" for further information about lateral cylinder surface machining.

"DOK-MTC200-FREPLAN*V22-AW01-EN-P".

Example: NC program - lateral cylinder surface machining

6

3�72�7��72�

.�

2�

2�

457Zyltr.FH7

Fig. 4-66: Lateral cylinder surf. machining with transformation

NC program:

:

;Milling contour "number 1"

G55 G15 G94 G97 G6 G8 S2 3000 M203

G00 C0

G20 Z0 C0 X0 ;Free plane selection

G32 RI 36.5 ;Lateral cylinder surface machining on

G55 G48 Z1-36.15

Detailed description

Page 138: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-70 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Y1 25 Z1-36.15

X38

G01 X36 F150

G42 Y1 25 Z1-42 F297

Y1 50 Z1-42

G02 Y1 54.2426 Z1-30.7574 I-35 J50

G01 Y1 34.2426 Z1-10.7574

G02 Y1 25.7574 Z1-19.2426 I-15 J30

G01 Y1 36.5147 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

:

Deselection of Transformation "G30"The CNC employs function G30 "Deselection of transformation" to dese-lect an existing transformation (G31, G32).

The zero point offsets are cancelled (G53) when transformation is dese-lected (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 byG31 or G32. G30 is set automatically after an NC program has beenloaded and after a BST, RET, or control reset.

The fictitious Cartesian coordinate system is deselected and the coordi-nate system that has been defined in the process parameters is selected.The fictitious axes are deselected and may consequently no longer beprogrammed.

The plane that has been specified in the process parameters is selectedas the current machining plane; the CNC switches over to the workpieceprogramming mode (radius/diameter), which has been stored in the proc-ess parameters.

After coordinate transformation has been cancelled, programming can beperformed 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 tothe real axes have no effect.

Upon cancellation, the NC restores the programming mode (radius pro-gramming G15 or diameter programming G16) that has been stored inthe 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 beperformed are present in a process, there must be some way to select themain spindle for the coordinate transformation.

Deselection of facetransformation G31

Deselection of lateral cylindersurface coordinatetransformation G32

Page 139: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-71

DOK-MTC200-NC**PRO*V23-AW01-EN-P

SPC <spindle number>

The first spindle is always active in the power-on state. If the transforma-tion is to be applied to a spindle other than the first spindle, the correctmain spindle must be selected by using "SPC <spindle number>" beforeusing 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 witha different spindle number or is automatically set to the first spindle at theend of the program (RET) or by BST.

The current reference spindle for the transformation can be interrogated(e.g. using @10=SPC).

4.8 Main Spindle Synchronization

Use of Main Spindle SynchronizationMain spindle synchronization is primarily used on lathes to transfer parts,to recess parts, to machine shafts, for polygon lathing, and for non-roundlathing.

Functions of Main Spindle SynchronizationUp to three spindles can be operated in sync within a process on theCNC. One spindle is used as the master spindle, while the other twospindles are operated as synchronized spindles. The CNC always movesthe master and synchronized spindles so that they remain angularly insync. The following example illustrates the relationship with angular syn-chronization between a master spindle and a synchronized spindle.

Syntax

Page 140: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-72 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Angularposition ofspindles

Comment

Prior to synchronization MasterSynchro-nizedspindlespindle

Each spindle is located in any given random position

After synchronization step MasterSynchro-nizedspindlespindle

The synchronized spindle performs a movement to adjustto the given angle offset (=90°) (transf. ratio = 1).

After rotation of 90° MasterSynchro-nizedspindlespindle

The synchronized spindle has rotated 90° in sync with themaster spindle.

After a change of 45° in the positionoffset

MasterSynchro-nizedspindlespindle

The synchronized spindle has rotated 45° with respect tothe master spindle.

Fig. 4-67: Angular position of spindles

The advantage of the "absolute angle" synchronization mode is that theangle offset between the master and the synchronized spindles can beset in a defined manner at any time.

Permissible ConfigurationsThe rules which define the permissible spindle configurations for the mainspindle synchronization are listed below. If one of these rules is violated atthe beginning of synchronization or during synchronization, the NC inter-rupts 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 oneprocess.

− If the spindles of a different process are to participate in mainspindle synchronization, this is to be defined to the respectiveprocess using the axis transfer commands.

• All spindles used in main spindle synchronization must be controlledby the same APR card.

• No more than two synchronized spindles can belong to a synchroniza-tion group in addition to the master spindle.

• The master spindle must have a lower drive number than the synchro-nized spindles within the SERCOS drive loop.

• A single spindle cannot be both a master and a synchronized spindleat the same time.

Page 141: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-73

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: Only digital main spindle drives equipped with the SERCOSInterface as well as digital DDS 2.2 feed drives equipped withmain spindle functions and the SERCOS Interface can be usedin main spindle synchronization.

Sequence of a Synchronization Operation

Main spindle synchronization is activated in NC program-controlled modefrom the NC program by means of an auxiliary function. In manual mode,the synchronization can be activated by means of a machine control keyor by any other key. An interface signal between the PLC and the NC al-lows follower axis synchronization to be activated in any operating mode.

The following is to be specified via the user interface, the NC program, orthe PLC program before starting main spindle synchronization:

• the sync spindle appertaining to the main spindle,

• the existing transmission ratio between main and synchronizationspindle,

• the direction of rotation of the synchronized spindle

• the effective angle offset and position offset between both spindles, aswell as

• the tolerance limits for monitoring the actual position value differencesbetween the master and the synchronized spindle.

As of version 5.15.xx, Q functions Q9000 - Q9999 are reserved for BoschRexroth specific functions. Q functions Q9700 - Q9764 are for main spin-dle synchronization. We recommend that the auxiliary functions be as-signed as follows for main spindle synchronization:

Q function9 Reservedfor BoschRexroth

7 reserved formain spindlesync

Processnumberx = 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

If the spindles are rotating at different speeds (stopped = 0 rpm) whenspindle synchronization is activated, the NC accelerates or deceleratesthe synchronized spindle at maximum acceleration/deceleration until itreaches the synchronization speed. As soon as it reaches the synchroni-zation speed, the NC switches to position control and rotates the syn-chronized spindle to the set position within one revolution using the short-est path. If the master spindle and the synchronized spindle are stopped,the synchronized spindle simply traverses to its command position, takingthe existing translation ratio and the existing angle offset and positionoffset into account.

The NC switches all spindles involved in the synchronization to positioncontrol. If functions such as M03, M04, or G95 are active while main spin-dle synchronization is activated, the NC continues position control modefor these spindles. The changeover operation does not have any negativeeffects on the surface of the workpiece.

Main spindle synchronization can be cancelled independently of the oper-ating mode by resetting the activation interface signal. All spindles in-volved in the synchronization retain their speeds after cancellation. If thespindles must stop after cancellation, this must be programmed by means

Activate main spindlesynchronization

Auxiliary functions for selectingand canceling main spindle

synchronization

Synchronization process

Deactivate synchronization

Page 142: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-74 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

of M05 or M19 after synchronization has been canceled. If synchroniza-tion is deactivated, the NC switches the spindles which were involved inthe synchronization back to speed control if a function that normally runsunder speed control is active at this time.

NC programmingNone of the synchronized spindles which participate in main spindle syn-chronization may be programmed during synchronized operation. How-ever, if an attempt is made to do this, the NC terminates program execu-tion and generates an error message.

Furthermore, the master and the synchronized spindles may not be oper-ated in the rotary axis mode; a gear change may not be performed duringsynchronized operation. Any attempt to do so will result in the terminationof 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 manualmode if the PLC does not cancel the synchronized spindles which areinvolved in synchronized operation.

• The master spindle must be the main spindle during synchronizedoperation. In synchronized operation, functions G33 (Thread cutting),G95 (Feed per revolution) and G96 (Constant surface speed) applyexclusively to the master spindle. For this reason, the master spindlemust be selected as the main spindle as soon as main spindle syn-chronization is activated.

• During synchronized operation, the user must not switch the spindleswhich are involved in the main spindle synchronization from one proc-ess to another. The use of the axis transfer commands with the spin-dles which are engaged in synchronized operation will cause the pro-gram to terminate and an error message to be generated. Thus, spin-dles which are part of the synchronized operation and that belong to adifferent primary process must be transferred to the respective proc-ess before synchronization mode is activated. In addition, they may notreturn to the primary process until synchronization mode is cancelled.

Note: The spindle which is engaged in tapping G63, G63, or G65must not be a master spindle or a synchronized spindle.

Machine Data for Main Spindle SynchronizationThe machine data for main spindle synchronization occupy a page namedMain spindle synchronization. The following data structure is presentwithin the page for each process:

No. Description Value range Description

001 Sync run sync spindle 1 OK 0/1 0: Sync run not OK1: Synchronization OK

002 Sync run sync spindle 2 OK 0/1 0: Sync run not OK1: 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 1 0.0000°-359.9999° Angle offset between main spindle and synchronized spindle 1

006 Position offset, sync spindle 1 0.0000°-359.9999° Position offset between main spindle and synchronized spindle 1.

Page 143: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-75

DOK-MTC200-NC**PRO*V23-AW01-EN-P

007 Main spindle speed i_LS/SS1 1 - 65536 The translation ratio is calculated by dividing the main spindlerevolutions by the synchronized spindle revolutions.

008 Sync spindle1 speed i_LS/SS1 1 - 65536 The translation ratio is calculated by dividing the main spindlerevolutions by the synchronized spindle revolutions.

009 Direction of rotation sync spindle 1 0/1 0: No change in direction1: Opposite direction

010 Sync run window, sync. spindle 1 0.0000°-359.9999° Sync run window for interface signal PxxSSS1OK

011 Error limit, sync spindle 1 0.0000°-359.9999° 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 2 0.0000°-359.9999° Angle offset between main spindle and synchronized spindle 2

014 Position offset, sync spindle 2 0.0000°-359.9999° Position offset between main spindle and synchronized spindle 2.

015 Main spindle speed, i_LS/SS2 1 - 65536 The translation ratio is calculated by dividing the main spindlerevolutions by the synchronized spindle revolutions.

016 Sync spindle 2 speed, i_LS/SS2 1 - 65536 The translation ratio is calculated by dividing the main spindlerevolutions by the synchronized spindle revolutions.

017 Direction of rotation, sync spindle 2 0/1 0: No change in direction1: Opposite direction

018 Sync run window, sync. spindle 2 0.0000°-359.9999° Sync run window for interface signal PxxSSS2OK

019 Error limit, sync spindle 2 0.0000°-359.9999° Error limit window for interface signal PxxSSS2ER

Fig. 4-68: Data structure

The individual data elements can be reconfigured from the PLC via theuser interface or from the NC program if the corresponding main spindleor synchronized spindle is not active. If the user accesses the data for aspindle which is engaged in synchronized operation from the PLC or fromthe user interface, an error message will be generated. If the user at-tempts to use the MTD command in the NC program, an error messagewill be generated, and the NC will stop processing. Exceptions are dataelements 005 "Angle offset" and 006 "Position offset" of the synchronizedspindles 1 and 2. The user can modify them at any time during synchro-nized operation, either from the PLC via the user interface or from the NCprogram.

4.9 Follower and Gantry axes

Applications of Follower and Gantry AxesThe functions "Follower axis" or "Gantry axis", referred to below as syn-chronized 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 slaveaxes can be assigned to it. The main axis and the slave axes togethercomprise a synchronized axis group. Such groups can be activated ordeactivated depending on the operating mode, or they can be kept activeduring the entire operation of the machine, including homing operations.When they are in the inactive state, they can be reconfigured during ma-chine operation from the PLC and the NC as well as by means of the userinterface. For each process, up to four different synchronized axis groupscan be active simultaneously.

During synchronized operation, all the slave axes in the group follow thepath traveled by the main axis, taking into account their respective trans-lation ratios and their directions of rotation.

Page 144: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-76 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Permissible ConfigurationsThe following rules describe the configurations which are permissible forsynchronized operation. If the NC detects a violation of these rules, it in-terrupts processing and generates an error message.

• One master axis and at least one slave axes must be present in eachsynchronized 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 axisgroup.

• 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 inthe synchronized axis group, then this must be specified to the respectiveprocess 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 onthe SERCOS loop.

• A single axis cannot be both a master axis and at the same time a slaveaxis.

• 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 asa master axis or as a slave axis.

• If rotary axes form a synchronized axis group, they must be programmedusing the same number of divisions per revolution.

• The master and slave axes in an active synchronized axis group may notbe present as a master or as a slave axis in a different synchronized axisgroup.

Steps of a Follower OperationA synchronized axis group can be activated during program-controlled opera-tion from the NC program by means of an auxiliary function. In manual mode,the user can activate synchronized operation via a machine control key oranother key. An interface signal between the PLC and the NC allows followeraxis synchronization to be activated in any operating mode. It is important tobe certain that the master and slave axes are placed in their starting positionbefore activating synchronized operation and that the corresponding machinedata are entered properly.

Synchronized operation can be cancelled independently of the operatingmode by resetting the activation interface signal. All axes in the synchro-nized axis group retain their position without any change after being deac-tivated.

Auxiliary Functions for Synchronized OperationQ functions Q9000 - Q9999 are reserved for Bosch Rexroth specific func-tions. Q functions Q9800 - Q9868 are for synchronization operatingmode. We recommend that the auxiliary functions be assigned as followsfor synchronized operation:

Q function9 Reservedfor BoschRexroth

8 reserved forsynchronizedaxis opera-tion

Processnumberx = 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

Page 145: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-77

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 ProgrammingDuring synchronized operation, the user may not program any axis otherthan the master axis of an active synchronized axis group. No other slaveaxes may be programmed during synchronized mode. If the user at-tempts 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 takeninto account only for the master axis by the NC. During synchronized op-eration, the slave axes receive the command values only for the masteraxis, taking into account the respective translation ratio and direction ofrotation.

• 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 ifthe PLC does not cancel the active synchronized axis.

• During synchronized operation, the user may not switch the axis in thesynchronized axis group from one process to another. The use of theaxis transfer commands with the axes which are engaged in synchro-nized operation will cause the program to terminate and an error mes-sage to be generated. Axes which are operated in synchronized modeand that belong to a different primary process must be transferred tothe respective process before the synchronized axis group is acti-vated. In addition, they must not be returned to the primary processuntil 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 thatare involved in the transformation (axes labeled X and C) may not bepart of any active synchronized axis group.

Machine Data for Synchronized Axis GroupsThe machine data for the follower and gantry axes occupy a page namedFollower and gantry axes. The following data structure is present in thepage for each process and for each synchronized axis group:

No. Description Value range Description

001 Axis group switched on 0/1 0: Synchronized axis group not active1: 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 1 0 - 9 0: No follower axis present1 - 9: Axis meaning X,Y,Z,U,V,W,A,B,C

004 Speed of lead axis i_LA/FA1 1 - 65536 The translation ratio is calculated by dividing the master axisrevolutions by the follower axis revolutions

005 Speed of follower axis 1i_LA/FA1 1 - 65536 The translation ratio is calculated by dividing the master axisrevolutions by the follower axis revolutions

006 Direction of rotation follower axis 1 0/1 0: No change in direction1: Opposite direction

Page 146: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-78 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

007 Follower axis 1 = gantry axis 0/1 This data element currently is not evaluated.

008 Axis meaning, follower axis 2 0 -9 0: No follower axis present1 - 9: Axis meaning X,Y,Z,U,V,W,A,B,C

009 Speed of lead axis i_LA/FA2 1 - 65536 The translation ratio is calculated by dividing the master axisrevolutions by the follower axis revolutions

010 Speed of follower axis 2 i_LA/FA2 1 - 65536 The translation ratio is calculated by dividing the master axisrevolutions by the follower axis revolutions

011 Direction of rotation follower axis 2 0/1 0: No change in direction1: Opposite direction

012 Follower axis 2 = gantry axis 0/1 This data element currently is not evaluated.

013 Axis meaning, follower axis 3 0 - 9 0: No follower axis present1 - 9: Axis meaning X,Y,Z,U,V,W,A,B,C

014 Speed of lead axis i_LA/FA3 1 - 65536 The translation ratio is calculated by dividing the master axisrevolutions by the follower axis revolutions

015 Speed of follower axis 3i_LA/FA3 1 - 65536 The translation ratio is calculated by dividing the master axisrevolutions by the follower axis revolutions

016 Direction of rotation follower axis 3 0/1 0: No change in direction1: 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 theuser interface or from the NC program if the corresponding synchronizedaxis group is not active. If the user accesses the data for an active syn-chronized axis group from the PLC or from the user interface, an errormessage will be generated. If the user attempts to do this in the NC pro-gram using the MTD command, an error message will be generated andthe NC will stop processing.

4.10 Rounding of NC Blocks with Axis Filter "G11" / "RDI"

Method of Operation

NC commands "G11", "G10" and "RDI" are used to program/switch off func-tion "Rounding of NC blocks with axis filter". This function is used mainly toprovide fast and time-optimized positioning using rapid traversing via severaldata points. Within a sequence of motion commands, the block transitions arerounded by means of a programmable axis filter so that the end point of themotion 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 codegroup 1 (G00, G01, G02, G03). An NC block which does not belong to thisgroup will exit the motion sequence.

Rounding of block transitions occurs only within a motion sequence. Withthe exception of the last data point (target point), it is not necessary tofully hit the data points. The path curve can pass the data point at aparameterizable maximum distance. At the end of the block, the last blockof a motion sequence directly hits the programmed target point positionwithout any rounding.

Rounding of the block transitions is effected by means of a two-step axisfilter with acceleration filter and jerk limiting filter. This axis filter follows upthe interpolator and considers the values in the Cxx.018 "Maximumacceleration" axis parameters, as well as the jerk limiting values enteredin the Bxx.034 "Time constant or acceleration" process parameter.

Purpose

Definition

Principle

Rounding with axis filter

Page 147: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-79

DOK-MTC200-NC**PRO*V23-AW01-EN-P

"�����1 ��1� +''� �����1�5� ���

G��-�5� ���

+9�$�5� ���

AxisFilter.FH7

Fig. 4-71: Rounding using two-stage axis filter

In the axis filter, an axis positioning windows delimits the maximum roundingdistance RDI (Round DIstance). The RDI value defines the maximum distan-ce to the programmed data point for the start of the rounding process.

��

��5�

��5�

RoundDistance.FH7

RDI: Round DIstance (NC program)Pn: programmed data point (NC program)PnF1, PnF2: track points generated by rounding

Fig. 4-72: Rounding with rounding distance RDI

Programming

The process of rounding block transitions is modally enabled for the cur-rent 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 blockto 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 overwrittenwith another value. RDI is automatically reset to the default state at theend of the program (RET), using the BST command or control reset.

The following syntax is admissible with the RDI command:

RDI10 ;direct allocationRDI 10 ;direct allocation, space symbolRDI=10 ;direct allocationRDI=@195 ;allocation by variableRDI=10+@195 ;allocation by formula@195=RDI ;reading of the currently effective RDI value

N012 G1 X5 Z0N013 G1 X10 Z10 RDI 5 ;rounding with 5 mmN014 G1 X20 Z15 ;rounding with 5 mmN015 G1 X35 Z5 RDI 2 ;rounding with 2 mm

Round distance RDI

RDI programming

Syntax

Example of an NC program withRDI

Page 148: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-80 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

N016 G1 X100 Z5 RDI 0 ;rounding switched off, target point is ;attained precisely

As an alternative to programming with RDI, G codes G11 and G10 (Gcode 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 currentrounding distance of 0, G11 does not take effect. Programming of RDIwith 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 thedefault state and is saved as active until G11 is enabled. G10 is en-abled automatically at the end of the program (RET), by the BST com-mand or by a control reset.

Rounding of block transitions occurs only within a motion sequence. A mo-tionless block – or, more precisely, a block outside of G code group 1 – termi-nates the motion sequence. But G11 remains enabled. At the end of theblock, the last block of a motion sequence hits the programmed target pointposition without any rounding. This also applies to a motion block in whichrounding has been disabled.

N001 G1 X5 Z0 RDI 5 ;rounding with 5 mmN002 G1 X10 Z10 ;rounding with 5 mmN003 G1 X20 Z15 ;target point is attained preciselyN004 M50 ;motionless blockN005 G1 X35 Z5 RDI 2 ;rounding with 2 mmN006 G1 X100 Z5 RDI 0 ;rounding switched off, target point is ;attained preciselyN100 G1 X200 Z30

#��� #���H21��1� �$$

#���#���

#���

#���

PosSequence.FH7

Fig. 4-73: Example for rounding within a motion sequence

Limits and Special Regulations

When rounding is active and exact stop (to be enabled via G61 or in G00blocks) is enabled at the same time within one motion sequence, exactstop is not effective. This behavior does not correspond to the DIN defini-tion for the G00 rapid traverse rate block when the next block is a motionblock as well. The block transition to the next block is rounded. At the endof the motion sequence, attainment of the positioning window is queriedonce more.

For rounding with an axis filter, there are some restrictions:

• Rounding depends on velocity. The rounded path curve at the block tran-sition varies dependent on the velocity (override).

• Rounding to the next block does not occur in the following cases:

Alternative programming withG10 and G11

Behavior at the end of a motionsequence and when disabling

rounding

Example for an NC program of amotion sequence

Special regulations on exactstop

Restrictions

Page 149: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-81

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 (otherthan 0) are programmed.

• When traversing straight lines, parallel offsets are possible.

• With circles, the deviations from the original curve are greater thanwith straight lines.

4.11 Test Mode

PurposeBesides the already existing functions such as single block mode, semi-automatic mode, feed override, rapid movement override, NC block skip-ping, conditional and unconditional stop as well as the virtual NC, includ-ing the (offline) simulation, the following functions allow an even quickerstartup 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 toconcentrate specifically on the geometry, the process synchronization,and collision analysis. They allow an individual examination of the overallprocess, especially the parallel-running partial processes, and they permitthese to be run as often as desired and at any speed. This can be per-formed with and without control of the I/O plane, as well as with and with-out axis movements.

Suppress Auxiliary Function OutputWith the function "Suppress auxiliary function output", the machine usercan turn off special auxiliary functions (e.g. coolant) or all auxiliary func-tions (M, Q, S, and T/E functions) during test mode.

The user can activate the function "Suppress auxiliary function output" bypressing an M key.

Lock Axis and Spindles

ApplicationIn order to test the program step by step, the user can selectively activate anddeactivate axes and spindles with the function "Lock axes and spindles".

Examples

On a milling machine, the test mode could, for example, be that the userlocks the feed axis (Z axis) by pressing an M key and preselects a higherspeed (test feed) for program processing.

During the adjacent test mode, the tool change is performed as in normalprogram mode.

The test mode on a lathing machine is similar. All axes (X, Z, and W (toolturret)) as well as the spindle are locked; the test feed is activated bypressing an M key.

Simple milling machine

Simple lathing machine

Page 150: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-82 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

For example, the following steps (test steps) are passed from the estab-lishment 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, thetool turret, and the spindle by pressing an M key and reruns the NCprogram (without part). Thereby the user checks, based on the pathmovement, the correction data (zero offsets, tool corrections, etc.).

3. In a further step, the user also activates the auxiliary axes (U, V) andchecks their feed movements for collisions.

4. After this step has been successfully completed, the user then deacti-vates the function "Suppress auxiliary function output" and checks theperformance 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 forother purposes. For example, it is required for dual lathing or milling ma-chines which can be operated alternatively as a dual machine or as twoindividual machines.

Test Feed

The test feed permits a quick run of the NC program. This is particularlyadvantageous if axes and spindles are locked. Furthermore, a continuousrun of the machining processes as well as of the feed and retract move-ments is reached.

The test feed is used when the function "Test feed" is selected in the op-erating modes "automatic" and "semi-automatic" to run the program in-stead of using the programmed feed.

When the function "Test feed" is active, the NC performs a test feed ofthe 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 thefeed for G95 (feed per revolution), independent of the individual spindlespeed.

With G00, the NC performs a second test feed (rapid test feed) of theaxes if the function "Test feed" is active.

Independent of whether the axes or spindles are locked or not, the func-tion "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 thesame as in normal operation. As in normal operating mode, the NC pre-vents exceeding of the maximum axis velocity as well as the maximumpath velocity specified in the machine parameters.

The machine user selects the test feed via the user interface by using anM key.

When this has been selected and as long as it has not yet been set, theinterface signal "PxxCDRYRN" (DRY RuN) is set to the NC and machinedata element "Test feed" is set.

More complex machine

Further application

Application

Method of operation

Selecting test feed

Page 151: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Motion Blocks 4-83

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: During the projection of the function within the GBO, it is to beensured that sub-operating mode "Test mode" is indicated inthe GBO screens.

The values for the test feeds "Test feed" and "Quick test feed" are to beentered into the machine data on page "Test mode" by the machinebuilder; if required, they can be overwritten by the end user directly intothe machine data or indirectly via the PLC. For example, the machinebuilder can offer values via the M keys for the test feed as well as for thequick test feed and have the end user select them.

Rapid Run

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 nothave to select a start or a target block. The NC begins, as in normal op-erating mode, with the first NC block and ends it as soon as the programend has been reached. Thereby the axes and spindles remain stoppedand only the assisting functions within machine parameters (Bxx.058 -Bxx.061) are performed.

The tool corrections, zero offsets, and D corrections regarding the travel rangelimits or variable calculations etc. can therefore be checked in rapid run.

Online Simulation

Online simulation can be activated and de-activated in all operating andsubordinate operating modes and provides the user with reliable informa-tion 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 veryhigh path velocities, online simulation may not cover all NCblocks. Within the graph, it can be selected to not show themor to mark them with arrows or dots.

Suppress Tool Transfer and Movements

The function "Suppress tool transfer and movements" is an importantsubfunction while testing an NC program, in which the process of the toolstorage axis is locked and the auxiliary functions are not generated. Itpermits the machine builder to freeze or to drag along the tool list duringtest mode as needed. Freezing the tool list is required especially if theaffiliated tool storage axis is locked during the test mode and the toolchange-specific auxiliary functions can not be processed by the PLC.

Note: Assure at start up that the tool change-specific auxiliary func-tions are not processed by the PLC and that the tool list is fro-zen when locking the tool storage axis.

Entering test feeds

Application

Application

Application

Page 152: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

4-84 Motion Blocks NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 153: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

5 Tool Compensation

5.1 Setup Lists and Tool Lists

Setup List

Using the setup list, the user can define the availability of all tools that arerequired for machining and, using the equipment check, ensure their usabil-ity for the machining processes that are to be performed. The setup list datareflects the required data of the tools that are to be employed (e.g. geome-try limit values).

Note: As of firmware version 23VRS, the MTC200 again supportsthe full functionality of the setup lists from its MTGUI.

The setup lists and NC packages are loaded into the controller and savedtogether using the storage function.

Using system parameter A00.053 Organization of setup lists, the userdefines whether a separate (program-specific) setup list is to be created foreach NC program or whether only one (station-specific) setup list is to becreated for a process.

���������������������

�������

��������

�����������

������������

������������

������������

� ���������

� ����������

� ����������

� �����������

��������

������������������ �!���� �"������#��$��%��&����

���������������������

�������

��������

��������

����������

�����������

�����������

������������

� ��������

��������

$����� ������������ �!���� �"������#��$��%��&����

��������

Pakete.FH7

Fig. 5-1: Organization types of setup lists

Purpose

Handling

Activation

Page 154: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-2 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool List

Tool lists are used for preparing and saving tool data of the individualtools. The tool data always contain the basic tool data, which consist ofthe tool identification, the location data, the units, the technology data andat least one tool edge.

Besides the basic tool data, the tool data contain the data that are re-quired 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, modifiedand saved while machining is in progress. This enables the user to loadthe tool storage device for subsequent machining processes.

This permits the setup time of a new tool storage unit configuration to bereduced to a minimum. The operator loads the tool list prepared in theuser interface into the control and loads the tool magazine according tothe tool list.

Current Tool ListThe 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 losesits significance; solely the current tool list in the CNC reflects the currentstate of the tools within the magazine.

Note: Any modifications that concern the current workpiece ar-rangement, such as inserting, removing or moving a tool ormodifying the tool data, must be performed directly in the cur-rent tool data.

The current tool list contains the current information about the locationand the state of the individual tools (e.g. current remaining tool life). Thecurrent tool list is generated from the tool list while taking the setup listinto account.

During the machining process, tool management continually updates thecurrent tool data, such as the location data, tool life data, and wear data.

Equipment CheckThe equipment check compares the required tool data (setup list) with theactual tool data (current tool list).

The equipment check is performed automatically whenever a program isrestarted after data of the setup or tool list have been modified andtransferred to the controller or after a different NC memory (A, B) hasbeen selected if interface signal PxxC.MGWTC (Process xx CommandMaGazine Without ToolCheck) has been set to log. "0".

Tool management does not perform an automatic equipment check aftera restart if PxxC.MGWTC has been set to log. "1".

In addition, NC command TID (Tool IDentification) permits the equipmentcheck to be executed at any position in the NC program, regardless of in-terface signal PxxC.MGWTC.

TID

Purpose

Preparation

Loading the tool list

TID

Syntax

Page 155: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

>= 1

&

>= 1

Program or magazine changeover

new and modified tool list

new and modified setup list

Interface signal"Equipment check"

(PxxC.MGWTC)

Start advance program(PxxC.ADV)

NC command equipment check TID

Equipment check

Ausruest.EPS

Fig. 5-2: Conditions for equipment check

Each tool that has been entered in the setup list triggers the followingsequence during the equipment check:

• Based on the tool identification (ID), tool management searches the entirecurrent tool list for tools with the same name.

• Tool management first assigns the setup list-specific data to eachlocated tool. Any setup list-specific data that exist from a previouslymade comparison will be overwritten.

• If a tool is not contained in the tool list, it is entered as missing in thetool 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 listare marked by tool management by setting tool status bit 2 "Tool notrequired" (⇔"?").

• Depending on the tool, the tool status bits that are responsible forlocation locking and location assignment are set or reset.

• Once the setup list-specific data have been assigned, tool manage-ment 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 relatedtool edge status bit.

• Tool status bit 5 ("Faulty tool edges" ⇔"f") indicates whether the tooledge orientation and/or the tool geometry of at least one tool edgedoes not satisfy the requirements.

• Accordingly, the wear state of the tool edges is shown in tool statusbits 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 thecorrection type and the number of tool edges against the specificationsmade in the setup list. According to the result, it updates tool statusbits 3 and 4 "Incorrect correction type" (⇔ "t") and "Incorrect number oftool edges" (⇔ "e").

Basic tool data

Tool edge data

Page 156: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-4 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Tools with the same name that could be assigned to an entry in thesetup list (alternate tools) are summarized in alternate tool chains. The tools are arranged in the following sequence in each alternate toolchain:

− usable tools that have already been used, i.e. at least one tool edgehas a remaining tool life of less than 100%.

− usable tools that are still new, i.e. each tool edge has a remainingtool 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 duplonumbers.The first tool of every alternate tool chain becomes the processing tool(⇔ "p") of this chain. All other usable tools are marked as replacementtools (⇔ "s").

• If interface signal PxxC.MGITW (Process xx Command MaGazineIgnore Tool Worn Out) has been deleted, the NC program terminateswith an error message if there is an alternate tool chain that does nothave any usable tool. If interface signal PxxC.MGITW is set, the be-havior is basically the same. However, tools that are worn and/or bro-ken, but otherwise usable, are counted as usable tools.

����1'�$$ ����1'�$$

�� ��� ������� �����

#8���1���2���'-���

����1'�$$�

��

��

:

$����� �$�@��I������A

��

��

��

N �11 $� �$�@�'��� �����A

��

��

��

����1'�$$�

��

��

�11 �2���,���

autoAus.FH7

Fig. 5-3: Basic method of operation of the equipment check (station-specificorganization of the setup list)

Operation without Setup ListThe PxxC.MGNSL (Process xx Command No Setup List) interface signalmust 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) anempty setup list, in which it generates an entry for each T number thatoccurs at least once in the current tool list. Then the NC uses this setuplist to execute the equipment check described above; however, the as-signment between the entry in the generated setup list and the associatedtools in the tool list is made using the T number. Any previously existingsetup list is not taken into account.

Generate alternate tool chains

Page 157: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

5.2 Elements of the Tool Data Record

OverviewThe following overview tables contain the entire tool data record. The tooldata record consists of the setup list-specific data and of the tool list-spe-cific 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 setby system parameter A00.054 "Maximum tool edge number".

The "Data type in the PLC" column specifies the form in which the indi-vidual data items are available in the PLC.

The data elements for which the number of a system parameter is listedin the column "Optional datum" are available in the tool data record only ifthe entered system parameter is set.

The user can administrate application-specific tool data and tool stateswithin tool management of the Bosch Rexroth MTC 200. For example, themaximum speed and the weight of a tool can be stored in the user data.Binary information, such as "Cooling lubricant required" or "Tool resharp-ened", can be stored in the user status bits. The following system pa-rameters permit the naming of tool data and tool status bits according tothe requirements of the corresponding application:

• A00.061-A00.069Designation of user tool data 1-9

• A00.070-A00.074Designation of user tool edge data 1-5

• A00.092-A00.096Designation of user tool edge data 6-10

• A00.075-A00.082Symbol for user tool status bit 1-8,

• A00.083-A00.086Symbol for user tool edge status bit 1-4,

If tool management is to be used for a grinding machine, system parameterA00.091 Tool technology must be set to "Grinding". The first 5 tool edgeuser data (data elements 31 - 35) are assigned with the following grinding-specific 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 systemparameter A00.091 Tool technology is set to "Grinding"!

Tool data record

Data type

Option

User-defined tool list data

"Grinding" technology data

Page 158: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-6 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

5.3 Basic Tool Data

Each basic tool data element is present once for each tool; the elementscan 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_20030728

DESIGNATION VALUE RANGE

DA

TA

TY

PE

in t

he

PL

C

UN

IT

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 0 - 2 - 03 X

Location 0 - 999 - 04 X

Tool number 1 - 9999999 DINT - 05 X X

Tool duplo number 1 - 9999 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 1 - 999 INT - 11 X

Storage location of next setup tool 0 - 2 INT - 12 X

Loc. of next replacement tool 1 - 999 INT - 13 X

Stor. of prev. rep. tool 0 - 2 INT - 14 X

Loc. of prev. rep. tool 1 - 999 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 0 - 65535 INT - 19 X X

Page 159: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

DESIGNATION VALUE RANGE

DA

TA

TY

PE

in t

he

PL

C

UN

IT

DE OPT. SL TL

User data

User data 1 REAL any 20 A00.061 X

User data 2 REAL 21 A00.062 X

User data 3 REAL 22 A00.063 X

User data 4 REAL 23 A00.064 X

User data 5 REAL 24 A00.065 X

User data 6 REAL 25 A00.066 X

User data 7 REAL 26 A00.067 X

User data 8 REAL 27 A00.068 X

User data 9

+/- 1.2 * 10-38 - +/- 3.4 * 10+38

and 0 (9 significant digits)

REAL 28 A00.069 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 A00.057 X

WGD_all_V23_20030728.xls

* ASCII character set 32-126, 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)

All data elements (= "DE" column) of the basic tool data are described inthe following according to the order of the previous figure.

Tool Identification

Index address

Basic tool data V22_20021105

Date element 01 INDEX ADDRESS

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)

WGD_DE01_V22_20021105.xls

Index addresses are automatically allocated by the controller when en-tering a tool. The index address can only be accessed in reading; it isused for controller-internal management of the tools.

DE 01

Explanation

Page 160: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-8 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool name (ID)

Basic tool data V22_20021105

Data element 02 ID (TOOL NAME)

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE02_V22_20021105.xls

The tool identification (also abbreviated "ID") can consist of a maximum of28 characters (ASCII character set 32 - 126, min. 1 character >32) , pro-viding a clear differentiation of the tools in use.

All utilized tools must be clearly named so that they can be uniquely identifiedbased on their tool name.

Only tools that can substitute each other (alternate tools) are grouped underone tool name.

Such tools can be distinguished using an additional duplo number (see dataelement 06 "Duplo number").

The extended tool designation permits any company-related tool designa-tion system to be retained on the control level.

Storage

Basic tool data V22_20021105

Data element 03 STORAGE

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE03_V22_20021105.xls

The "Storage" (="Tool storage type") data item is not shown directly withinthe tool list. Within the data record, it indicates the type of storage locationat which the tool is located:0:= Magazine or turret location1:= Spindle2:= Gripper

NC block for querying the tool storage location in process "P" in which tool"T" with duplo number "D" is located:@101=TLD(P,1,T,D,0,3,0)

Location

Basic tool data V22_20021105

Data element 04 LOCATION

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE04_V22_20021105.xls

DE 02:

Explanation

DE 03:

Explanation

Example

DE 04

Page 161: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Within the tool storage unit, the "Location" data item determines the num-ber of the tool pocket. For a spindle, it determines the number of the toolspindle, and for a gripper the gripper location that contains the tool.

Using the tool list, all locations of the tool storage unit and all existingspindles and grippers can be prepared asynchronously to accommodatingthe real tools with respect to data processing.

WARNING

Injury to operating personnel as well as damageto the machine and workpiece due to incorrectmagazine equipping!⇒ Once a tool list has been loaded into the controller,

agreement between the actually existing magazineconfiguration and the tool list must be ensured.

NC block for querying the tool storage location in process "P" in which tool"T" with duplo number "D" is located:@101=TLD(P,1,T,D,0,4,0)

Tool number

Basic tool data V22_20021105

Data element 05 TOOL NUMBER

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)

WGD_DE05_V22_20021105.xls

Using the T word, which consists of a preceding address letter "T" and atool number (up to seven digits) or a tool location number (up to sevendigits), a tool or a location can be accessed within the NC program.

A programmed tool number initiates tool management to determine thecurrent location of the tool on the basis of the tool number and designa-tion from the setup list using the designation and tool location numberfrom the tool list.

The assignment of the tool number (as it is used in the NC program) tothe tool (operation-specific tool name) that is made via the setup list en-ables the NC program to access a tool.

If a setup list is not used, the current location is accessed directly via theallocation tool number <> tool location number within the tool list.

1. NC block for positioning tool T1234 on reference position "b" (b=1-4) ofthe tool storage unit:MTP b T1234

2. NC block for changing tool T123 into the spindle (e.g. "simple" millingmachine) for the case that the tool change cycle is called using branchlabel "M6":BSR .M6 T123

Explanation

Example

DE 05

Explanation

Example

Page 162: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-10 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool duplo number

Basic tool data V22_20021105

Data element 06 DUPLO NUMBER

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE06_V22_20021105.xls

The tool duplo number is used for:

• an unambiguous identification of alternate tools (tools of the same toolname 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 isneither worn out nor locked, an alternate tool with a lower duplo number isused for machining before one with a higher duplo number.

The NC program employs the same T number for addressing alternatetools.

After the previous tool (tool of the same tool number and designation, andthe next smaller duplo number) has been worn out or locked, the control-ler selects a new alternate tool only if the same T number is invokedagain.

Note: If tools have the same T number and duplo number, tool man-agement employs the tools by their ascending location num-bers.

Correction type

Basic tool data V22_20021105

Data element 07 CORRECTION TYPE

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)WGD_DE07_V22_20021105.xls

The correction type defines the number of corrections of a tool and theirlocations (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 alwaysperpendicular to the current machining plane, a tool of correction type2 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) andone radius compensation value (R) inside the current machining plane.

DE 06

Explanation

DE 07

Explanation

Page 163: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• 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 compen-sation (R) in the current machining plane. Length L3 is always per-pendicular to the current machining plane, while lengths L1 and L2always 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 alwaysperpendicular to the current machining plane, while lengths L1 and L2always lie within the current machining plane.

In order for the tool to be used for the scheduled machining process, thecorrection type of the related tool in the magazine must coincide with thetype requested in the setup list.

Page 164: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-12 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

��� �������� ���

��'1

���'

��1�<

�� �

���(

�'1�

��'�

��1�

����

����

'� �

���1

�2�'

(���

�� �

;�

��'1

���'

��1�$

<

�� �

���(

�'1�

��'�

��1�

����

����

'� �

���1

�2�'

(���

�� �

;�

/��

��$�

'1��

�'��1

��1�

2�'

(���

��� �

;�

��'1

���'

��1�$

<

�� �

���(

�'1�

��'�

�1�$

�1�

�(��

2�'

(���

��� �

;�

/��

��$�

'1��

�'��1

��1�

2�'

(���

��� �

;�

���

� � �

!����

����"�����

� �

��*�

���

����

�11

2�

����

�11

��(

����

�11

��

��

���

(�

��

��1

1

��� ���� ������� ���

#�$%&#��'

#�$(

#�$)

4

*

+�

+$

4

*+$

+�

4

4

+,

+,

**

4

+,

*

4

+,

4

+,

4

+,

4

+�

*

+$

7��

/

/7�

7�

��'1

���'

��1�$

<

�� �

���(

�'1�

��'�

��1�

����

����

'� �

���1

�2�'

(���

�� �

;�

�� �

���(

�'1�

��'�

�1�$

�1��

�(�

2�'

(���

��� �

;�

/��

��$�

'1��

�'��1

��1�

2�'

(���

��� �

;�

��*�

4

+,

*+�

+$

4

+,

+�

+$

*

4

+,

*+$

+�

��'1

���'

��1�$

<

�� �

���(

�'1�

��'�

��1�

����

����

'� �

���1

�2�'

(���

�� �

;�

�� �

���(

�'1�

��'�

�1�$

�1��

�(�

2�'

(���

��� �

;�

4

+,+�

+$

4

+,

+�

+$

4

+,

+$

+�

7�

/

7�B7

7�

7�B7

7��

����

����

�11

KORR.FH7

Fig. 5-5:: Specifying the correction type

Page 165: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Number of tool edges

Basic tool data V22_20021105

Data element 08 NUMBER OF TOOL EDGES

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)WGD_DE08_V22_20021105.xls

Each tool can have up to nine tool edge data records assigned, irrespectiveof the number of tool edges the tool actually has.To avoid wasting NC storage space, A00.054 Maximum tool edge numbercan be used to reduce the maximum number of tool edges to one tool edgeper tool.

In order to be able to be used for the scheduled machining process, therelated tool must satisfy the number of tool edges that is requested in thesetup list.

Schneidenanzahl.FH7

Fig. 5-6: Examples of tools with varying number of tool edges

Tool status (bits)

Basic tool data V22_20021105

Data element 09 TOOL STATUS

Relevant for:

Setup list (SL)

Tool list (TL)

Location list (LL)

See description of the individualbits

WGD_DE09_V22_20021105.xls

Tool status bits provide information about the current state of the toolsand their locations.

They can be subdivided into status bits that are setup list-, location- andtool-specific:• Setup list-specific status bits describe the status of a tool with re-

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

DE 08

Explanation

DE 09

Classification

Page 166: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-14 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The following table lists all tool status bits. The table is followed by a detailedexplanation of the individual bits.

Tool status bits 1 -16 from basic tool data element 09Write

accessType

Group name Group information

Sym

bo

l

Val

ue

Bit

Byt

e

Wo

rd

TM

OP

AS

P

SL

TL

LL

Comment

Tool not available ! 1

Tool available 01 X X X Tool is missing

Tool is not required ? 1Presence

Tool required 02

Tool not required for proc-essing

Correction type wrong t 1Error:correction type Correction type not wrong 0

3 X X XCorrection type does notaccord with the require-ments

Incorrect number of tool edges e 1Error:tool edge number Correct number of tool edges 0

4 X X XNumber of cutters doesnot accord with the re-quirements

Tool edge(s) incorrect f 1Error: tool edge

Tool edge(s) not incorrect 05

Tool edge data do notcomply with requirements

Tool code incorrect $ 1Error: tool code

Tool code correct 06

Does not accord with therequirements

Reserved for extensions 7

Reserved for extensions 8

LOW

byt

e 0

- 7

Location locked B 1Location locking

Location not locked 09 X X X X X

ASP/OP: Location is dam-aged, 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 reserved ) 1Upper half-location reser-vation Upper half-location not reserved 0

12 X X X X Reserved for temp. movedtools

Lower half-location reserved ( 1Lower half-location reser-vation Lower half-location not reserved 0

13 X X X X Reserved for temp. movedtools

Reserved for extensions Upper half-location locking 14

Reserved for extensions Lower half-location locking 15

Location assigned + 1Location assignment

Location not assigned 016

Hig

h by

te 0

- 7

LOW

WO

RD

0 -

15

X X X There is a tool at thislocation

TM - Tool management WSB_all_V22_20030918.xls

OP - Operator

ASP - Application-specific programs in PLC or NC SL - Setup list-specific status bit

LL - Location-specific status bit TL - Tool list-specific status bit

Fig. 5-7: Tool status bits 1 -16 from basic tool data element 09

Page 167: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-15

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool status bits 17 -32 from basic tool data element 09Write

accessType

Group name Group information

Sym

bo

l

Val

ue

Bit

Byt

e

Wo

rd

TM

OP

AS

P

SL

TL

LL

Comment

Tool is worn out d 1

Tool is not worn out 017 X X

The remaining lifetime ofthe tool has elapsed (re-place)

Warning limit is reached w 1Wear state

Warning limit not reached 018 X X The remaining lifetime is

about to expire (replace)

Machining tool p 1

No machining tool 019 X X

There is a processing toolfor every alternate toolgroup

Replacement tool s 1Name of alternate

No replacement tool 020 X X

A replacement tool is atool still to be used, not aprocessing tool

Tool with fixed location coding C 1Tool coding

Tool without fixed location coding 021 X X X X

The tool may only bechanged into the prede-fined tool location

Tool locked L 1Tool block

Tool is not locked 022 X X X Tool must not be used

Tool broken D 1Tool breakage

Tool is not broken 023 X X X Tool is damaged: e.g.

broken tool edge

Reserved for extension 24

LOW

byt

e 0

- 7

1User tool status 1

User tool status bit 1A00.075 0

25 X X X Any meaning

1User tool status 2

User tool status bit 2A00.076 0

26 X X X Any meaning

1User tool status 3

User tool status bit 3A00.077 0

27 X X X Any meaning

1User tool status 4

User tool status bit 4A00.078 0

28 X X X Any meaning

1User tool status 5

User tool status bit 5A00.079 0

29 X X X Any meaning

1User tool status 6

User tool status bit 6A00.080 0

30 X X X Any meaning

1User tool status 7

User tool status bit 7A00.081 0

31 X X X Any meaning

1User tool status 8

User tool status bit 8A00.082 0

32

Hig

h-B

yte

0 -

7

Hig

h w

ord

0 -

15

X X X Any meaning

TM - Tool management WSB_all_V22_20030918.xls

OP - Operator SL - Setup list-specific status bit

ASP - Application-specific programs in PLC or NC TL - Tool list-specific status bit

LL - Location-specific status bit T - Tool

Fig. 5-8: Tool status bits 17 -32 from basic tool data element 09

Page 168: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-16 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note:

• The group definitions in the left column of the previoustable are only used for display (expedient reduction of thedata for the end user).

• These groups are not taken into consideration within theCNC.

• Status bits with capital letters inform the operator that hecan change their status, if he desires, using the userinterface, the PLC or the NC user program.

• Status bits with lower case letters can not be influenced bythe user. They are administrated by NC tool management.

Setup List-Specific Tool Status BitsIf a tool cannot be used for the subsequent machining process, the setuplist-specific status bits provide detailed information about the cause.

Solely tool management updates setup list-specific status bits. NeitherCNC 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 toollist is saved.

Tool not available

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 1: Tool not available

Group information Value Symbol

Tool not available 1 !

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_20021106.xls

A tool marked with such a status bit is missing; it is not contained in thetool 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

DE 09 Bit 1

Meaning

Symbol

Updating time

Effects

Page 169: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-17

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool is not required

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 2: Tool is not required

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 orNC (USP)

WSB_2_V22_20021106.xls

A tool marked with such a status bit is not needed for the current ma-chining 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

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 3: Correction type wrong

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 orNC (USP)

WSB_3_V22_20021106.xls

A tool marked with such a status bit does not comply with the requiredcorrection type.

t (type)

During the equipment check

DE 09 Bit 2

Meaning

Symbol

Updating time

Effects

DE 09 Bit 3

Meaning

Symbol

Updating time

Page 170: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-18 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• 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

Basic tool data V22_20021106

Data element 09 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:

Setup list (SL) X Tool management (TM) X

Tool list (TL) X Operator (OP)

Location list (LL) User-specific programs inPLC or NC (USP)

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

Basic tool data V22_20021106

Data element 09 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:

Setup list (SL) X Tool management (TM) X

Tool list (TL) X Operator (OP)

Location list (LL) User-specific programs in PLC orNC (USP)

WSB_5_V22_20021106.xls

Effects

DE 09 Bit 4

Meaning

Symbol

Updating time

Effects

DE 09 Bit 5

Page 171: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-19

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 (r)

f (fault)

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

Location-Specific Tool Status BitsLocation-specific status bits describe the status of a location. They arefirmly allocated to specific locations and do not move along with the toolor the tool's data record.

They are also loaded into the PC when the tool list is saved.

Tool code incorrect

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 6: Tool code incorrect

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 orNC (USP)

WSB_6_V22_20021106.xls

The entry in DE 18 Tool code in the basic tool data of the tool list does notcorrespond 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

Meaning

Symbol

Updating time

Effects

DE 09 Bit 6

Meaning

Symbol

Updating time

Effects

Page 172: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-20 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Status Bits 7 and 8

Reserved for extensions.

Location locked

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 9: Location locked

Group information Value Symbol

Location locked 1 B

Location not locked 0

Relevant for: Write access:

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_20021106.xls

• 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 thelocation will not be available for machining.

• Tool management locks a location automatically while a tool is beingentered 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 notpermitted (any attempt to do this will generate an error messageand the NC program will be interrupted).

− A locked location cannot be approached using MFP (the location isnot available)

− A tool in a locked location cannot be approached using MTP (thelocation and the tool are not available).

− A locked location can be approached only via the tool location num-ber using the MMP motion command or via MOP.

− In addition to the locations in the magazine, spindles and/or grip-pers can also be locked.

DE 09 Bit 7 and Bit 8

DE 09 Bit 9

Meaning

Symbol

Updating time

Effects

Page 173: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-21

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Status Bits 10 and 11

Reserved for extensions.

Upper half-location reserved

Basic tool data V22_20021106

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)

Tool list (TL) X Operator (OP) X

Location list (LL) X User-specific programs in PLC or NC(USP)

X

WSB_12_V22_20021106.xls

Tool status bit 12 is provided to identify the upper half-location of the toollocation as "reserved".This status bit is not interpreted by the CNC. It can therefore be used likea 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

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 13: Lower half-location reserved

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 orNC (USP)

X

WSB_13_V22_20021106.xls

DE 09 Bit 10 and Bit 11

DE 09 Bit 12

Meaning

Symbol

Updating time

Effects

DE 09 Bit 13

Page 174: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-22 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool status bit 13 is provided to identify the lower half-location of the toollocation as "reserved".This status bit is not interpreted by the CNC. It can therefore be used likea 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

Reserved for extensions.

Location assigned

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 16: Location assigned

Group information Value Symbol

Location assigned 1 +

Location not assigned 0

Relevant for: Write access:

Setup list (SL) Tool management (TM) X

Tool list (TL) X Operator (OP)

Location list (LL) X User-specific programs in PLC orNC (USP)

WSB_16_V22_20021106.xls

There is a tool in the location concerned.

+

• In the tool list upon entry.

• In the current tool list when user interface input functions Insert, Re-move, 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.

Meaning

Symbol

Updating time

Effects

DE 09 Bit 14 and Bit 15

DE 09 Bit 16

Meaning

Symbol

Updating time

Effects

Page 175: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-23

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool-Specific Tool Status BitsThe tool-specific status bits describe the state of a tool. They move alongwith 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 docu-mentation "Bosch Rexroth MTC 200 parameter description, system para-meters Axx.075 - Axx.082").

Tool is worn out

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 17: Tool is worn out

Group information Value Symbol

Tool is worn out 1 d

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_20021106.xls

• 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 alltool edge remaining times of the tool are still in the positive range.

d (defective)

Tool management updates the "Tool worn out" tool status bit togetherwith 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 thetool 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:

DE 09 Bit 17

Meaning

Symbol

Updating time

Effects

Page 176: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-24 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

− 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

Basic tool data V22_20021106

Data element 09 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:

Setup list (SL) Tool management (TM) X

Tool list (TL) X Operator (OP)

Location list (LL) User-specific programs in PLC orNC (USP)

WSB_18_V22_20021106.xls

• The remaining tool life of at least one tool edge has reached the warninglimit.

• This bit is also set if tool status bit D ("Tool broken") is set, even if alltool edge remaining times of the tool are still below the warning limit.

• Tools that have reached the warning limit should be replaced togetherwith the worn-out tools as soon as possible.

w (warning limit)

Tool management updates this tool status bit together with the "Warninglimit 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 thetool 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 "machiningtool" until it is worn out or locked.

DE 09 Bit 18

Meaning

Symbol

Updating time

Effects

Page 177: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-25

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: The "w: Warning limit reached" (data element 09 / bit 18) sta-tus signal is set towards the PLC if tool management determi-nes that a tool has reached the warning limit and that no furtheralternate tool is available.

Machining tool

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 19: Machining tool

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_20021106.xls

• The "p: Machining tool" status bit characterizes a tool in a group ofalternate 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 forfurther 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.

DE 09 Bit 19

Meaning

Symbol

Updating time

Effects

Page 178: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-26 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Replacement tool

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 20: Replacement tool

Group information Value Symbol

Replacement tool 1 s

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_20021106.xls

• A tool from a group of alternate tools is called a "replacement tool" if itis not yet worn out and is not assigned the "p: Machining tool" status.

• The duplo number specifies the sequence in which the replacementtools 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 alter-nate tool chain with 4 tools.

The illustration below shows a table for the tool with T No. 77, which ispresent a total of 4 times. The activation order for the current processingtool 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

DE 09 Bit 20

Meaning

Symbol

Updating time

Effects

Example

Page 179: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-27

DOK-MTC200-NC**PRO*V23-AW01-EN-P

T77 T77 T77T77

T77

Tool Number (T-No.)Duplo Number

D1 D3 D2 D4

D1

SchwesterWZ.FH7

Fig. 5-10: Selection of replacement tools from an alternate tool chain

Tool with fixed location coding

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 21: Tool with fixed location coding

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 orNC (USP)

X

WSB_21_V22_20021106.xls

Tool status bit 21 is used to identify if the tool should be brought back tothe original location in the tool magazine (tool basic data, DE 11 Old loca-tion) 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

DE 09 Bit 21

Meaning

Symbol

Updating time

Effects

Page 180: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-28 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool locked

Basic tool data V22_20021106

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)

Tool list (TL) X Operator (OP) X

Location list (LL) User-specific programs in PLC or NC(USP)

X

WSB_22_V22_20021106.xls

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 alternatetools exist.

Tool broken

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bit 23: Tool broken

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_20021106.xls

A broken tool is no longer available for machining.

D

DE 09 Bit 22

Meaning

Symbol

Updating time

Effects

DE 09 Bit 23

Meaning

Symbol

Page 181: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-29

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 otherreplacement tool is available.

− If interface signal PxxC.MGITW (Command MaGazine Ignore ToolWorn Out) has been set, the NC program terminates with an errormessage during the equipment check if there is an alternate toolsequence that does not have any usable tool, including a tool thatis worn or broken but otherwise usable.

Tool Status Bit 24

Reserved for extensions.

User tool status bits 1 - 8

Basic tool data V22_20021106

Data element 09 Tool status

Tool status bits 25 - 32: User tool status bits 1 - 8

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 orNC (USP)

X

WSB_25_32_V22_20021106.xls

The programmer can utilize user tool status bits 1 - 8 to record machine-specific, 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)A00.075 - A00.082

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

Updating time

Effects

DE 09 Bit 24

DE 09 Bit 25 to Bit 32

Meaning

Symbol

Updating time

Effects

Page 182: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-30 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Location Data

Free half-locations

Basic tool data V22_20021105

Data element 10 Free half-locations

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE10_V22_20021105.xls

The datum Free half-locations is not displayed and is currently not storedwith an NC function. The programmer can use it to administrate informationconcerning occupied/available half-locations in the tool magazine. As a re-sult, it is possible, for example, to partially or totally block neighboringmagazine locations for extra-wide tools in order to prevent collisions in thetool 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

Old pocket

Basic tool data V22_20021105

Data element 11 Old pocket

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE11_V22_20021105.xls

The datum Old pocket is not displayed. It is included in the data record inorder to be able to ensure the associated fixed location, in addition to theother data items, for fixed location-encoded tools that are in a spindle.

DE 10

Meaning

Updating time

Effects

DE 11

Explanation

Page 183: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-31

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Storage of the next replacement tool

Basic tool data V22_20021105

Data element 12 Stor. of next replacement tool

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE12_V22_20021105.xls

Data element 12 Storage of the next replacement tool describes the stor-age 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 alltools are useable, this means that the last tool in this sequence is also the penul-timate tool in the first sequence.

Location of the next replacement tool

Basic tool data V22_20021105

Data element 13 Loc. of next replacement tool

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE13_V22_20021105.xls

Data element 13 Location of the next replacement tool describes the lo-cation 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. Providedthat all tools are useable, this means that the last tool in this sequence isthe penultimate tool with respect to the first one (Location of theprevious replacement tool).

Storage of the previous replacement tool

Basic tool data V22_20021105

Data element 14 Stor. of prev. rep. tool

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE14_V22_20021105.xls

Data element 14 Storage of the previous replacement tool describes thestorage unit in which the previous tool of an alternate tool sequence canbe found.

DE 12

Explanation

DE 13

Explanation

DE 14

Explanation

Page 184: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-32 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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. Providedthat all tools are useable, this means that the last tool in this sequence isalso the penultimate tool in the first sequence (Location of the previousreplacement tool).

Location of the previous replacement tool

Basic tool data V22_20021105

Data element 15 Loc. of prev. rep. tool

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE15_V22_20021105.xls

Data element 15 Location of the previous replacement tool describes thelocation at which the previous tool of an alternate tool sequence can befound.

It contains the number of magazine or turret location, spindle, or gripper.

Please remember that the alternate tool sequence is closed. Provided that alltools are useable, this means that the last tool in this sequence is also thepenultimate tool in the first sequence.

0���)�

0���)�

���;�1�$$������11 1%�0���)�

��9�$������11 1%�0���)�

0���)�

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 ofthe previous replacement tool and DE15 Location of the previ-ous replacement tool can be read only via a user-specific pro-gram in the PLC or NC with the help of the TLD_RD (PLC) orTLD (NC) commands.

DE 15

Explanation

Page 185: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-33

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Units

Time unit

Basic tool data V22_20021105

Data element 16 Time unit

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE16_V22_20021105.xls

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 theremaining tool life in percent and warning limit in percent) are measuredand updated in the time unit that is selected here.

When time unit "Cycles" is selected, a single cycle is defined as the timebetween tool deactivation (e.g. changing into the spindle) and deactivation(removing from the spindle).

Unit of length

Basic tool data V22_20021105

Data element 17 Unit of length

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)

WGD_DE17_V22_20021105.xls

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 toollist. When they are loaded into the controller, all geometry data items areconverted into the basic unit for programming that is valid for the process.

Technology Data

Tool code

Basic tool data V22_20021105

Data element 18 Tool code

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)

WGD_DE18_V22_20021105.xls

Data element 18 Tool code is significant for "Grinding" technology, whichis set with system parameter A00.091 Tool technology.

Please refer to section "Grinding Wheel-Specific Tool Data" for detailson the tool code.

DE 16

Explanation

DE 17

Explanation

DE 18

Explanation

Page 186: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-34 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Representation type

Basic tool data V22_20021105

Data element 19 Representation type

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)

WGD_DE19_V22_20021105.xls

Data element 19 Representation type is significant for "Grinding" technol-ogy, which is set with system parameter A00.091 Tool technology.

Please refer to section "Grinding Wheel-Specific Tool Data" for detailson the representation type.

User Tool Data

User Tool Data 1 - 9

Basic tool data V22_20021105

Data element 20 -28 User data 1 - 9

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE20_28_V22_20021105.xls

Tool user data items 1 - 9 in the basic tool data permit any user-relatedstatus information to be allocated to a tool.

When the required designation is entered in system parameters A00.061- A00.069, the user data are accepted in the tool data record and are dis-played in the offline tool list and the current tool list.

In the offline tool list, the user data can be synchronously prepared in thesame 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).

DE 19

Explanation

DE 20 to 28

Explanation

Page 187: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-35

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Group DataTool group data are relevant for tool group management.

Group number

Basic tool data V23_20030206

Data element 30 Group number

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE30_V23_20030206.xls

The tool is allocated to a tool group. A reliable value for the group numberis "0" or higher; the higher values are limited by the contents of machineparameter Bxx.073 "Number of tool groups" (0-99).

Group duplo number

Basic tool data V23_20030206

Data element 31 Group duplo number

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE31_V23_20030206.xls

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" ispermitted for the group duplo number.

Group status

Basic tool data V23_20030206

Data element 32 Group status

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

WGD_DE32_V23_20030206.xls

Data element "Group status" exists for each tool group. It can be acces-sed both through tool addressing and through group addressing. The fol-lowing table lists all group status bits. The table is followed by a detailedexplanation of the individual bits.

DE 30

Explanation

DE 31

Explanation

DE 32

Explanation

Page 188: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-36 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool groups: Group status (data element 32) V23_20021112

Write access TypeStatus Status bit

Sym

-b

ol

Val

ue

Bit

TM OP ASP GLComment

Group not available ! 1 1 X X

Group exists 0

Tool in thisgroup is missing

Group is not required ? 1 2 X X

Presence

Group is required 0

No tool in thisgroup is re-quired

Group disabled L 1 3 X X XGroup status

Group not disabled 0

User-program-mable

Group worn d 1 4 X X

Group not worn 0

At least onealternate toolsequence of thegroup is worn.

Warning limit is reached w 1 5 X X

Wear state

Warning limit not reached 0

At least onealternate toolsequence of thegroup hasreached thewarning limit.

Machining group p 1 6 X X

Not a machining group 0

Group is ma-chining group

Spare group s 1 7 X X

Name of alternate

Not a spare group 0

Group is alter-nate group

Reserved for extension 8

1 9 X X XUser group status 1 User group status bit 1 any

0

Any meaning

1 10 X X XUser group status 2 User group status bit 2 any

0

Any meaning

1 11 X X XUser group status 3 User group status bit 3 any

0

Any meaning

1 12 X X XUser group status 4 User group status bit 4 any

0

Any meaning

1 13 X X XUser group status 5 User group status bit 5 any

0

Any meaning

1 14 X X XUser group status 6 User group status bit 6 any

0

Any meaning

1 15 X X XUser group status 7 User group status bit 7 any

0

Any meaning

1 16 X X XUser group status 8 User group status bit 8 any

0

Any meaning

WZG_all_V23_20021112.xls

TM - Tool management SL - Setup list-specific status bitOP - Operator TL - Tool list-specific status bitASP - Application-spec. programs on the PLC or NCLL - Location-specific status bit

OPT - Optional datumGL - Tool group list-specific status bit

Fig. 5-12: Tool groups: group status (data element 32)

Page 189: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-37

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Group not available

Basic tool data V23_20030206

Data element 32 Group status

Group status bit 1: Group not available

Status information Value Symbol

Group not available 1 !

Group exists 0

Relevant for: Write access:

Setup list (SL) Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL)

Group list (GL) X

User-specific programs in PLC orNC (USP)

WZG_1_V23_20030206.xls

A tool group indicated in this way is viewed as not existing because itdoes 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

Basic tool data V23_20030206

Data element 32 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:

Setup list (SL) Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL)

Group list (GL) X

User-specific programs in PLC or NC(USP)

WZG_2_V23_20030206.xls

A tool group indicated in this way does not contain any of the tools pres-ent in the setup list. If there is no setup list, all groups are automaticallyconsidered as required.

? (question to the operator)

DE 32 Bit 1

Meaning

Symbol

Updating time

Effects

DE 32 Bit 2

Meaning

Symbol

Page 190: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-38 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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

Basic tool data V23_20030206

Data element 32 Group status

Group status bit 3: Group disabled

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) X

Group list (GL) X

User-specific programs in PLC orNC (USP)

WZG_3_V23_20030206.xls

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.

Updating time

Effects

DE 32 Bit 3

Meaning

Symbol

Updating time

Effects

Page 191: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-39

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Group worn

Basic tool data V23_20030206

Data element 32 Group status

Group status bit 4: Group worn

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) Operator (OP)

Location list (LL)

Group list (GL) X

User-specific programs in PLC or NC(USP)

WZG_4_V23_20030206.xls

A tool group is considered to be worn once the first alternate tool se-quence 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 noother alternate tool group is available, interface signal"PxxS.MGTWO" is set.

Warning limit is reached

Basic tool data V23_20030206

Data element 32 Group status

Group status bit 5: Warning limit is reached

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) Operator (OP)

Location list (LL)

Group list (GL) X

User-specific programs inPLC or NC (USP)

WZG_5_V23_20030206.xls

DE 32 Bit 4

Meaning

Symbol

Updating time

Effects

DE 32 Bit 5

Page 192: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-40 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

This group status bit is set as soon as the first alternate tool sequence ofthe 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 "ma-chining tool group" until it is worn out or locked.

Note: If tool management determines that a tool group has reachedthe warning limit and no other alternate tool group is available,interface signal PxxS.MGWRN is set.

Machining group

Basic tool data V23_20030206

Data element 32 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:

Setup list (SL) Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL)

Group list (GL) X

User-specific programs in PLC or NC(USP)

WZG_6_V23_20030206.xls

The non-worn, non-locked tool group with the lowest group duplo numberis 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 machininggroup.

Meaning

Symbol

Updating time

Effects

DE 32 Bit 6

Meaning

Symbol

Updating time

Effects

Page 193: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-41

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Spare group

Basic tool data V23_20030206

Data element 32 Group status

Group status bit 7: Spare group

Status information Value Symbol

Spare group 1 s

Not a spare group 0

Relevant for: Write access:

Setup list (SL) Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL)

Group list (GL) X

User-specific programs in PLCor NC (USP)

WZG_7_V23_20030206.xls

• A tool group from a group of alternate tool groups is called a "repla-cement group" if it is not yet worn out and is not assigned the "Machi-ning tool" status.

• The group duplo number specifies the sequence in which the replace-ment 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 8Reserved for extensions.

User group status bits 1 - 8

Basic tool data V23_20030206

Data element 32 Group status

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) X

Group list (GL) X

User-specific programs in PLC orNC (USP)

WZG_9-16_V23_20030206.xls

DE 32 Bit 7

Meaning

Symbol

Updating time

Effects

DE 32 Bit 8

DE 32 Bit 9 to Bit 16

Page 194: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-42 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

User group status bits 1-8 permit any user-related status information to beallocated 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

Comment

Basic tool data V22_20021105

Data element 99 Comment

Relevant for:

Setup list (SL) X

Tool list (TL)

Location list (LL)

WGD_DE99_V22_20021105.xls

Each entry in the setup list can be assigned a comment of up to 5 x 76characters, provided this has been selected in system parameter A00.057Comment (assembly instructions).

The comment can be used for related information for each group of alter-nate 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 geometryand wear data of tools. Every tool data record can contain up to 9 tooledge data records. The max. number of tool edge data records is deter-mined in system parameter A00.054 Maximum tool edge number.

The data elements of tool edge data records can be subdivided into thefollowing 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 rec-ord:

Meaning

Symbol

Updating time

Effects

DE 99

Explanation

Page 195: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-43

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool edge data (per tool edge) V22_20030317

DESIGNATION VALUE RANGE

DA

TA

TY

PE

inP

LC UNIT

DE

OP

T.

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 -99.9 - +100.00 REAL 03 A00.059 X

Warning limit +0.1 - +100.00 REAL

%

04 A00.059 X

Max. utilization time 0 - 9999999(0: tool life recording switched off)

REAL 05 A00.059 X

Time used 0 - 9999.999 REAL

min. orcycles

06 A00.059 X

Geometry data

Length L1 DINT 07 X

Length L2 DINT 08 X

Length L3 DINT 09 X

Radius R DINT 10 X

Wear L1 DINT 11 A00.055 X

Wear L2 DINT 12 A00.055 X

Wear L3 DINT 13 A00.055 X

Wear R DINT 14 A00.055 X

Offset L1 DINT 15 A00.056 X

Offset L2 DINT 16 A00.056 X

Offset L3 DINT 17 A00.056 X

Offset R

-99999.9999 - +99999.9999

or

-9999.99999 - +9999.99999

DINT

mm

or

inches

18 A00.056 X

Geometry limit values

L1_min DINT 19 A00.060 X

L1_max DINT 20 A00.060 X

L2_min DINT 21 A00.060 X

L2_max DINT 22 A00.060 X

L3_min DINT 23 A00.060 X

L3_max DINT 24 A00.060 X

R_min DINT 25 A00.060 X

R_max

-99999.9999 - +99999.9999

or

-9999.99999 - +9999.99999

DINT

mm

or

inches

26 A00.060 X

Wear factors

Wear factor L1 DINT 27 A00.058 X

Wear factor L2 DINT 28 A00.058 X

Wear factor L3 DINT 29 A00.058 X

Wear factor R

-99999.9999 - +99999.9999or

-9999.99999 - +9999.99999

DINT

mm/min,inches/min or

cycles

30 A00.058 X

User data

User data 1 REAL any 31 A00.070 X

User data 2 REAL any 32 A00.071 X

User data 3 REAL any 33 A00.072 X

User data 4 REAL any 34 A00.073 X

User data 5

+/- 1.2 * 10-38 - +/- 3.4 * 10+38and

0 (9 significant digits)

REAL any 35 A00.074 X

User data 6 DINT any 36 A00.092 X

User data 7 DINT any 37 A00.093 X

User data 8 DINT any 38 A00.094 X

User data 9 DINT any 39 A00.095 X

User data 10

-99999.9999 - +99999.9999or

-9999.99999 - +9999.99999

DINT any 40 A00.096 X

SD_all_V22_20030317.xlsDE - Data element SL - Setup list-specific datumOPT - Optional datum TL - Tool list-specific datum

Fig. 5-13: Tool edge data (per tool edge)

Page 196: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-44 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

All data elements of the tool edge data record will be described in groupsin the following.

Tool Edge Identification

Tool edge position

Tool edge data V22_20021107

Date element 01 Tool edge position

Relevant for:

Setup list (SL) X

Tool list (TL) X

Location list (LL)

Optional datum

SD_DE01_V22_20021107.xls

The tool edge orientation enables the tools of correction types 3 (turningtool) and 4 (angle head tool) to be measured with respect to the theoreti-cal tool tip "P" so that inaccuracies do not result from future machining.

-

(

,

$

.

%/

(

-

,

.

$

%/''

@��A @���A4@���A

4@��A@���A @���A

4@��A@���A @���A

@��A @���A4@���A

�C�

��

�C�

��

+�

+$ +$

+�

SCHNEIDENLAGE.FH7

Fig. 5-14: Possible positions of a tool edge

If no edge radius/cutter radius path compensation is active, theoretical edgetip "P" is used as the reference point for the controller.

Thus, theoretical tool tip "P" moves on the programmed contour. Withmovements that are not parallel to the axis, this leads to minor inaccura-cies.

DE 01

Explanation

Page 197: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-45

DOK-MTC200-NC**PRO*V23-AW01-EN-P

J�

J

J�

/

J�

�J�

J�

��<���(�1����'� ���������-��<������'�����J�<��'��� ��1�'(��1���

!����1��������1���

<���$� �����'1��1��<����(�1%���(�1����'� �!�������-�K�K�@��1���22���'1��1��A<����(�1%�!����'������K�K

UNSCHNEIDE.FH7

Fig. 5-15:: Errors that occur if machining is performed without using tool edgeradius / cutter radius path compensation

The shaded area in figure Fig. 5-15: will not be removed since the con-troller is using theoretical edge tip "P" as its point of reference.

Note: Tool edge center "S" is the reference point for the controller iflength compensation is active and tool edge / cutter radius com-pensation is switched off.

When tool edge radius / cutter radius compensation is active, the CNC auto-matically moves the actual contact point "B" along the programmed contour.Thus, the resulting contour is identical to the programmed contour.

Page 198: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-46 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool edge status bits

Tool edge data V22_20021107

Data element 02 Tool edge status

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum

SD_DE02_V22_20021107.xls

Tool edge status bits provide information about the current state of the re-lated tool edge. They can be subdivided into status bits that are setup list-specific and tool-specific.

Setup list-specific status bits 1 - 5 describe the status of a tool edge withrespect to the requirements of the setup list.

If a tool edge cannot be used for the subsequent machining process, thesetup 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 ofthese bits.

The setup list-specific status bits are not loaded into the PC when the toollist is saved.

Tool-specific tool edge status bits 9 - 16 describe the status of the asso-ciated 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 (seethe documentation "Bosch Rexroth MTC 200 parameter description, sys-tem parameters Axx.083 - Axx.086").

The following table lists all tool edge status bits. The table is followed by adetailed explanation of the individual bits.

DE 02:

Explanation

Setup list-specifictool edge status bits

Tool-specific tool edge statusbits

Page 199: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-47

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool edge status bit from tool edge data element 02

Writeaccess

Type

Group name Group information

Sym

bo

l

Val

ue

Bit

TM

OP

AS

P

SL

TL

Comment

Incorrect tool edge orientation o 1Incorrect tool edgeorientation Tool edge orientation is not incor-

rect0 1 X X Tool edge data do not correspond to

the definition

L1 faulty 1 1L1 faulty

L1 not incorrect 02 X X Tool edge data do not correspond to

the definition

L2 faulty 2 1L2 faulty

L2 not incorrect 03 X X Tool edge data do not correspond to

the definition

L3 faulty 3 1L3 faulty

L3 not incorrect 04 X X Tool edge data do not correspond to

the definition

R incorrect r 1R incorrect

R not incorrect 05 X X Tool edge data do not correspond to

the definition

Reserved for extensions 6

Reserved for extensions 7

Reserved for extensions 8

Tool edge worn out d 1

Tool not worn out 09 X X The tool edge can no longer be used

(replace)

Warning limit is reached w 1Wear state

Warning limit not reached 010 X X The remaining tool life of the tool edge

is near its end (replace)

Reserved for extensions 11

Reserved for extensions 12

1User tool edge status 1 User tool edge status bit 1

A00.083 013 X X X Any meaning

1User tool edge status 2 User tool edge status bit 2

A00.084 014 X X X Any meaning

1User tool edge status 3 User tool edge status bit 3

A00.085 015 X X X Any meaning

1User tool edge status 4 User tool edge status bit 4

A00.086

any

016 X X X Any meaning

SSB_all_V22_20030918.xls

TM - Tool management

OP - Operator

TL - Tool list-specific status bit

SL - Setup list-specific status bit

ASP - Application-specific programs in PLC or NC

Fig. 5-16: Tool edge status bit from tool edge data element 02

Page 200: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-48 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Incorrect tool edge orientation

Tool edge data V22_20021107

Data element 02 Tool edge status

Tool edge status bit 1: Incorrect tool edge orientation

Group information Value Symbol

Incorrect tool edge orientation 1 o

Tool edge orientation is not incor-rect

0

Relevant for: Write access:

Setup list (SL) X Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL) User-specific programs in PLC orNC (USP)

SSB_1_V22_20021107.xls

The existing tool edge orientation does not correspond to the tool edgeorientation 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

Tool edge data V22_20021107

Data element 02 Tool edge status

Tool edge status bit 2: L1 faulty

Group information Value Symbol

L1 faulty 1 1

L1 not incorrect 0

Relevant for: Write access:

Setup list (SL) X Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL) User-specific programs in PLC orNC (USP)

SSB_2_V22_20021107.xls

The existing L1 tool length does not correspond to the required dimen-sions (the individual tool dimensions are calculated from geometry, wearand offset).

1

DE 02 Bit 1

Meaning

Symbol

Updating time

Effects

DE 02 Bit 2

Meaning

Symbol

Page 201: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-49

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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

Tool edge data V22_20021107

Data element 02 Tool edge status

Tool edge status bit 3: L2 faulty

Group information Value Symbol

L2 faulty 1 2

L2 not incorrect 0

Relevant for: Write access:

Setup list (SL) X Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL) User-specific programs in PLC or NC(USP)

SSB_3_V22_20021107.xls

The existing L2 tool length does not correspond to the required dimen-sions (the individual tool dimensions are calculated from geometry, wearand 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

Visualization

Updating time

Effects

DE 02 Bit 3

Meaning

Symbol

Visualization

Updating time

Effects

Page 202: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-50 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool length L3 faulty

Tool edge data V22_20021107

Data element 02 Tool edge status

Tool edge status bit 4: L3 faulty

Group information Value Symbol

L3 faulty 1 3

L3 not incorrect 0

Relevant for: Write access:

Setup list (SL) X Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL) User-specific programs in PLC or NC(USP)

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

Tool edge data V22_20021107

Data element 02 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:

Setup list (SL) X Tool management (TM) X

Tool list (TL) Operator (OP)

Location list (LL) User-specific programs in PLC or NC(USP)

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

DE 02 Bit 4

Meaning

Symbol

Visualization

Updating time

Effects

DE 02 Bit 5

Meaning

Symbol

Page 203: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-51

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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

Reserved for extensions.

Tool edge worn out

Tool edge data V22_20021107

Data element 02 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:

Setup list (SL) Tool management (TM) X

Tool list (TL) X Operator (OP)

Location list (LL) User-specific programs in PLC orNC (USP)

SSB_9_V22_20021107.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 thetool 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 num-ber concerned is invoked again.

Visualization

Updating time

Effects

DE 02 Bit 6 to 8

DE 02 Bit 9

Meaning

Symbol

Updating time

Effects

Page 204: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-52 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Warning limit is reached

Tool edge data V22_20021107

Data element 02 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:

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_10_V22_20021107.xls

The remaining tool life is less than the warning limit.

w

• 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 thetool 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

Reserved for extensions.

DE 02 Bit 10

Meaning

Symbol

Updating time

Effects

DE 02 Bit 11 and Bit 12

Page 205: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-53

DOK-MTC200-NC**PRO*V23-AW01-EN-P

User tool edge status bits 1 - 4

Tool edge data V22_20021107

Data element 02 Tool edge status

Tool edge status bits 13 - 16: User tool edge status bits 1 - 4

Group information Value Symbol

User tool edge status bits 1 - 4 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 PLCor NC (USP)

X

SSB_13-16_V22_20021107.xls

User tool edge status bits 1 - 4 permit any user-related status informationto 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

Tool edge data V22_20021107

Data element 03 Remaining tool life

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum A00.059

SD_DE03_V22_20021107.xls

The remaining tool life in percent specifies the wear state of a tool in per-cent, irrespective of the tool / workpiece material combination and the tech-nology data.

DE 02 Bit 13 to Bit 16

Meaning

Symbol

Updating time

Effects

DE 03:

Explanation

Page 206: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-54 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

100*t

tt

100*t

tt

s]Util[cycle

s]Rest[cycleRest[%]

Util[min]

Rest[min]Rest[%]

=

=

tRest[%] remaining tool life in percenttRest[min] remaining tool life in min.tRest[cycles] remaining tool life in cyclestUtil[min] max. utilization time in min.tUtil[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%. Corre-spondingly, a worn-out tool has a remaining tool life of 0%.

Based on the remaining tool life in percent, tool management monitorsand manages the wear state of the tool, irrespective of the tool / work-piece material combination of the existing machining processes.

To monitor the actual remaining tool life with the theoretical tool life de-fined from the production planning, tool management can also determineand manage negative remaining tool life. This allows the determination ofthe 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 machiningsequences to be taken into account in the calculation of the remainingtool 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 fol-lowing formula:

100*t

ttt

100*t

ttt

s]Util[cycle

On[cycles]before[%]Rest Rest[%]

Util[min]

On[min]before[%]Rest Rest[%]

−=

−=

tRest[%] remaining tool life after tool utilizationtRest before[%] remaining tool life before tool utilizationtOn[min] contact time of the tool in min.

(all programmed tool movements with feed rate)tOn[cycles] contact time of the tool in cycles

(all programmed tool movements with feed rate)tUtil[min] max. utilization time in min.tUtil[cycles] max. utilization time in cycles

Fig. 5-18: Updating of remaining tool life in percent

First entry of remaining tool life

Negative remaining tool life

Update remaining tool life

Page 207: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-55

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Each time that updating occurs, tool management checks the remainingtool 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 nofurther alternate tool that is not worn out is available for the tool whoseremaining tool life is expired, interface signal PxxS.MGTWO (MaGazineTool Worn Out) is set towards the PLC.

For further information, see the description "Bosch Rexroth MTC 200 toolmanagement", chapter "Movement control of a tool storage unit", section"Tool life monitoring: tool worn "PxxS.MGTWO"" or the description "BoschRexroth MTC 200 PLC interface description".

Warning limit

Tool edge data V22_20021107

Data element 04 Warning limit

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum A00.059

SD_DE04_V22_20021107.xls

The warning limit in percent is determined by the user and specifies theremaining 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 andsets interface signal PxxS.MGWRN MGWRN (MaGazine WaRNing –warning limit reached) to the PLC if the remaining tool life of a tool hasreached the warning limit and all alternate tools also have the status "Toolwarning limit reached".

For further information, see the description "Bosch Rexroth MTC 200 toolmanagement", chapter "Movement control of a tool storage unit", section"Tool life monitoring: warning limit reached "PxxS.MGWRN"" or thedescription "Bosch Rexroth MTC 200 PLC interface description".

Max. utilization time

Tool edge data V22_20021107

Data element 05 Max. utilization time

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum A00.059

SD_DE05_V22_20021107.xls

The maximum utilization time is the cutting time in minutes or NC cyclesduring which a tool is used for cutting for a specific tool/material combina-tion, from resharpening to the worn-out state, and under equal cutting con-ditions. The Maximum utilization time is determined by the user.

Note: Entering "0" for the maximum utilization time switches off thetool life updating process of the tool concerned.

DE 04

Explanation

DE 05

Explanation

Page 208: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-56 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Time used

Tool edge data V22_20021107

Data element 06 Time used

Relevant for:

Setup list (SL) X

Tool list (TL)

Location list (LL)

Optional datum A00.059

SD_DE06_V22_20021107.xls

DE 06 Time used is not displayed and currently not interpreted in the NC.

Geometry Data

When the corresponding correction is active, the dimensions of a tool arecompensated 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

• A00.055 Wear register and

• A00.056 Offset register

Geometry register: Length L1 / L2 / L3 / radius R

Tool edge data V22_20021107

Data element 07 Length L1

Data element 08 Length L2

Data element 09 Length L3

Data element 10 Radius R

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum

SD_DE07_10_V22_20021107.xls

The geometry registers are used as program-independent memories thatassist in compensating the tool dimensions.

DE 06

Explanation

Explanation

DE 07 - 10

Page 209: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-57

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Wear registers: Wear L1 / L2 / L3 / radius R

Tool edge data V22_20021107

Data element 11 Wear L1

Data element 12 Wear L2

Data element 13 Wear L3

Data element 14 Wear R

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum A00.055

SD_DE11_14_V22_20021107.xls

The CNC uses wear registers for compensating the time-related wear ofthe 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 regis-ters.

As long as the wear factors (tool edge data elements 27 - 30) have notbeen activated in system parameter A00.058 Wear factors or are set tozero in the data records, the wear registers are exclusively available to theuser.

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/ toolbreakage" (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 reg-isters belonging to the tool will be deleted and the tool will be enabledagain for processing (basic tool data - tool status bit 22 = "0").

Note: If the wear registers in system parameter A00.055 Wear regis-ter are not selected, they will be internally set to zero.

DE 11 - 14

Page 210: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-58 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Offset registers: Offset L1 / L2 / L3 / radius R

Tool edge data V22_20021107

Data element 15 Offset L1

Data element 16 Offset L2

Data element 17 Offset L3

Data element 18 Offset R

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum A00.056

SD_DE15_18_V22_20021107.xls

The CNC does not influence the offset registers. Like the wear registers,they may be used for compensating dimensional deviations that are deter-mined 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 A00.056 Offsetregister are not selected, they will be internally set to zero.

Length CompensationThe length values "L1", "L2", "L3" of a tool edge are calculated as follows:

correction D of L3L3 Offset + L3 Wear + L3 Length = L3 correction Length

correction D of L2L2 Offset + L2 Wear + L2 Length = L2 correction Length

correction D of L1L1 Offset + L1 Wear + L1 Length = L1 correction Length

++

+

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 compensationor G49 Tool lengths – negative compensation (also see thesection "Tool length compensation").

DE 15 -18

Page 211: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-59

DOK-MTC200-NC**PRO*V23-AW01-EN-P

��7� ����� ��������223�6����7� ���*������223�:%%$���7� ��������22�7����(�'1���'��1��7� ��������22

7��C���������22

6����7��C�*������22

:%%$���7��C�������22

LAENGENKORR.FH7

Fig. 5-20: Length compensation value "L3", example of a throwaway insert drill(without D correction)

Radius CompensationThe radius compensation value "R" of a tool edge is calculated as follows:

correction D of R R Offset + R Wear + R Radius = R correction Radius +

Fig. 5-21: Calculation of radius compensation "R"7�

�C��

���

���2

2

6����/�C�*������22

/�C��������22

���/ ����� ���������223�6����/ ���*������223�:%%$���/ �������������22�/����$�'1���'��1��/ ��������22

RADIUSKORR.FH7

Fig. 5-22: Radius compensation "R", example of a cutter head (without D correc-tion)

Page 212: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-60 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Geometry Limit Values

Geometry limit values enable the tools in the tool storage unit to bechecked with respect to their fitness for being employed in the forthcom-ing machining process.

Whether or not length and radius values of the related tool are suitable forthe machining process which is to be performed is verified during theequipment check when an NC program is started. Thus, it prevents stand-still periods during the machining process. The setup list is used for theequipment check if the PLC interface PxxC.MGNSL (Process xx Com-mand MaGazine No Setup List) is not set (= basic state).

Besides ensuring that tools suitable for machining are available, the spe-cification of reasonable geometry limit values already permits collisions tobe prevented during programming.

Note: The geometry limit values of the setup list are not taken intoaccount in the calculation of tool compensation processes.

Maximum and minimum length / radius

Tool edge data V22_20021107

Data element 19 L1_min

Data element 20 L1_max

Data element 21 L2_min

Data element 22 L2_max

Data element 23 L3_min

Data element 24 L3_max

Data element 25 R_min

Data element 26 R_max

Relevant for:

Setup list (SL) X

Tool list (TL)

Location list (LL)

Optional datum A00.060

SD_DE19_26_V22_20021107.xls

The maximum length values "L1_max", "L2_max" and "L3_max", as wellas the minimum lengths: "L1_min", "L2_min" and "L3_min" specify the li-mits of the corresponding length value within which the intended machi-ning processes can still be performed.

The maximum radius "R_max" andthe minimum radius "R_min"specify the limits of the tool radius within which the intended machiningprocesses 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

Explanation

DE 19 -26

Explanation

Example 1

Page 213: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-61

DOK-MTC200-NC**PRO*V23-AW01-EN-P

When it starts (start of advance program or of reverse program), the CNCchecks whether there is at least one tool with the name "Groove cutterD12" that is not shorter than the minimum length of 30 mm and not longerthan the maximum length of 60 mm.

A groove cutter is to be used for machining a 20 mm wide pocket (+ 0.02 mm / - 0.04 mm).

tool name (ID) : Groove cutter D20maximum radius (R_max): 20.02/2 = 10.01 mmminimum radius (R_min): 19.96/2 = 9.98 mm

When it starts (start of advance program or of reverse program), the CNCchecks whether there is at least one tool with the name "Groove cutterD20" that is not thinner than the minimum radius of 9.98 mm and notthicker than the maximum radius of 10.01 mm.

Wear FactorsWear factors can be used for compensating wear-related variations in toollength and tool radius.

Length wear factors (L1, L2 and L3)

Tool edge data V22_20021107

Data element 27 WEAR FACTOR L1

Data element 28 Wear factor L2

Data element 29 Wear factor L3

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum A00.058

SD_DE27_29_V22_20021107.xls

Length wear compensation is activated if tool length correction is acti-vated via G48 Tool length compensation positive or G49 Tool lengthcompensation negative.

The compensation value used to adjust for tool length wear is calculated inthe tool management system by multiplying the duration of the tool machin-ing time by the length wear factor.

If the length wear factor is entered in "mm/min" or "inch/min", the toolmanagement system uses the total time in which the tool was active whileworking motion was being carried out (all moves with the exception ofG00 Rapid traverse) as the machining time.

However, if the tool wear factor is entered in "mm/cycle" or "inch/cycle", thetool management system uses one cycle as the machining time. Thus, thecompensation value for tool length corresponds to the tool wear factor.

The tool management system automatically updates the machining timeand, 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)

Example 2

DE 27 -29

Explanation

Page 214: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-62 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• when a tool is canceled using T0 (tool storage = turret or no tool storage present).

Radius wear factor (R)

Tool edge data V22_20021107

Data element 30 Wear factor R

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum A00.058

SD_DE30_V22_20021107.xls

Radius wear compensation is activated when tool path compensation isactivated via G41 Tool path compensation left or G42 Tool path com-pensation right.

The compensation value used to adjust for tool radius wear is calculatedin the tool management system by multiplying the duration of the tool ma-chining time by the radius wear factor.

If the radius wear factor is entered in "mm/min" or "inch/min", the toolmanagement system uses the total time in which the tool was active whileworking motion was being carried out (all moves with the exception ofG00 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 fac-tor.

The tool management system automatically updates the machining timeand, 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 afeather key groove that is to be machined using solid carbide tools.

From previous tests it is known that the width of the groove decrementsfrom one shaft to the next by an average 0.0052 mm.

To compensate this wear during production, a radius wear factor of0.0026 mm/cycle must be entered.

DE 30

Explanation

Example

Page 215: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-63

DOK-MTC200-NC**PRO*V23-AW01-EN-P

User Tool Edge Data

User tool edge data 1-10

Tool edge data V22_20021107

Data element 31 -40 User data 1 -10

Relevant for:

Setup list (SL)

Tool list (TL) X

Location list (LL)

Optional datum DE 31 - 35 A00.070 - A00.074

Optional datum DE 36 - 40 A00.092 - A00.096

SD_DE31_40_V22_20021107.xls

Tool edge user data 1 - 10 permit any tool edge to have any user-specificdata items assigned.

Grinding wheel-specific tasks: see the section "Grinding wheel-spe-cific tool data"

By entering the requested designation into the system parameters

• A00.070 Tool edge user data 1 (PLC data type = REAL)

• ...

• A00.074 Tool edge user data 5 (PLC data type = REAL) and

• A00.092 Tool edge user data 6 (PLC data type = DINT)

• ...

• A00.096 Tool edge user data 10 (PLC data type = DINT),

the user data is accepted in each tool edge data record, and is displayed inthe tool list and in the current tool list (see also "Bosch Rexroth MTC 200parameter description").

In the tool list, the user data can be prepared in the same way as the otherdata 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 REALvalues. User tool edge data items 6-10 are specified as DINT.

DE 31 -40

Explanation

Page 216: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-64 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

5.5 Grinding Wheel-Specific Tool Data{0><}100{>

For grinding wheel-specific tasks, the first five tool user data (data ele-ments 31 to 35 of the tool edge data) are reserved for grinding-specificparameters if system parameter A00.091 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 thedesignations of required grinding wheel-specific parameters(data elements 31 to 35 of tool edge data) manually to activatethem.

The data element is an editable element in the setup list and in the toollist. In operation with setup lists, the value from the setup list is acceptedin the tool list when the equipment check is performed. In operation with-out setup lists, the value in the tool list is assigned a default value. Afterthe related data record has been activated in one of the spindles, the dataelement is the minimum permissible spindle speed command value, tak-ing the override into account. The specified minimum spindle speed isalso taken into account as the minimum permissible speed value whenthe grinding wheel circumferential speed (SUG) is active. The conversionfor an active SUG is calculated according to the formula that is discussedin conjunction with the grinding wheel circumferential speed.

• If setup lists are used for operation, the value 0 corresponds to thestate "Inactive checking".

• The data element is displayed according to the setting of system pa-rameter A00.091 "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 whichthe value must not fall (including override). An error message is is-sued if the command value falls below this limit speed.

The data element is an editable element in the setup list and in the toollist. In operation with setup lists, the value from the setup list is acceptedin the tool list when the equipment check is performed. In operation with-out setup lists, the value in the tool list is assigned a default value. Afterthe related data record has been activated in one of the spindles, the dataelement is the maximum permissible spindle command value, taking theoverride into account. The specified maximum spindle speed is alsotaken into account as the maximum permissible speed value when thegrinding wheel circumferential speed (SUG) is active. The conversion foran active SUG is calculated according to the formula that is discussed inconjunction with the grinding wheel circumferential speed.

• If setup lists are used for operation, the value "0" corresponds to thestate "Inactive checking".

• The data element is displayed according to the setting of system pa-rameter A00.091 "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 notbe exceeded (including override). An error message is issued if thecommand value exceeds this limit speed.

Minimum spindle speed(S min) DE 31

Maximum spindle speed

(S max) DE 32

Page 217: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-65

DOK-MTC200-NC**PRO*V23-AW01-EN-P

π

π

*

720*

*

60000*

][

]/max[min]/1max[

][

]/max[min]/1max[

inchAct

sft

mmAct

sm

d

SUGS

d

SUGS

=

=

Smax : Maximum spindle speedSUGmax : Max. grinding wheel circumferential speeddAct : Actual grinding wheel diameter

Fig. 5-23: Calculation of maximum spindle speed

The data element is an editable element in the setup list and in the toollist. In operation with setup lists, the value from the setup list is acceptedin the tool list when the equipment check is performed. In operation with-out setup lists, the value in the tool list is assigned a default value. Afterthe related data record has been activated in one of the spindles and theSUG has been activated (G66), the data element is the maximum per-missible spindle command value, taking the override into account.

720

S*p*dSUG

60000

S*p*dSUG

max[1/min]Act[inch]max[ft/s]

max[1/min]Act[mm]max[m/s]

=

=

SUGmax : Max. grinding wheel circumferential speeddAct : Actual grinding wheel diameterSmax : Maximum spindle speed

Fig. 5-24: Calculation of maximum grinding wheel circumferential speed

• Data element "Max. grinding wheel circumferential speed" is evaluatedonly when the SUG is active.

• If setup lists are used for operation, the value 0 corresponds to thestate "Inactive checking".

• The data element is displayed only in the setup/tool list for the threedefined tool codes 1, 2, and 3.

The "Angle of skew" data element is an editable element in the setup listand in the tool list. The data element is available only for tool code 2. Thevalue is required to calculate the grinding wheel diameter. The angle ofskew is entered in degrees.

The "Grinding wheel diameter" data element is a pure display elementthat cannot be edited. The data element is available only in the tool list.The computation formula for the grinding wheel diameter depends on theentered tool code and the existing geometry elements. The data elementis displayed only for the three defined tool codes (1, 2, and 3). A value isnot displayed if a correction type ≤ 3 is entered.

Maximum grinding wheelcircumferential speed

(SUG max) DE 33

Angle of skew

(slant angle) DE 34

Current grinding wheel diameter(current grinding wheel ∅∅∅∅) DE 35

Page 218: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-66 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Code WGD DE 18If system parameter A00.091 has been set to "Grinding" technology, dataelement 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 beable to calculate the grinding wheel circumferential speed. Depending onthe type of grinding wheel, geometry register L1 or L2 is needed for cal-culating the spindle speed from the programmed circumferential speed ofthe wheel.

The input of tool code 1-3 is relevant and is processed only if the "Tooltechnology" system parameter has been preset to "grinding". In all othercases, 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 tobe able to utilize the grinding-specific (user) data expediently, a correctiontype ≥ 3 must be entered for the defined grinding wheels.

For the straight circumferential grinding wheel, the correction type ele-ment 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.

2*)L1L1(L1d WearOffsetAct ++=

Fig. 5-26: Current wheel diameter for tool code 1

7�

/

7�

GERADE_SCHEIBE.FH7

Fig. 5-27: Straight circumferential grinding wheel

Tool code 0 - 3

Tool code 1

"Straight circumferential grindingwheel"

Page 219: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-67

DOK-MTC200-NC**PRO*V23-AW01-EN-P

For the angled grinding wheel, the correction type element in the tool datarecord must be filled in with 3 or 5.

The current wheel diameter is calculated via tool length compensation L1and the angle ϕ.

cosj

2*)L1L1(L1d

WearOffsetAct

++=

Fig. 5-28: Current wheel diameter for tool code 2

7�/

7�

SCHRAEGE_SCHEIBE.FH7

Fig. 5-29: Inclined grinding wheel

For the surface-grinding wheel, the correction type element in the tooldata record must be filled in with 3, 4, or 5.

The current wheel diameter is calculated via tool length compensation L2.

2*)L2L2(L2d WearOffsetAct ++=

Fig. 5-30: Current wheel diameter for tool code 3

/

7�

7�

PLANSCHEIBE.FH7

Fig. 5-31: Surface grinding wheel

Tool code 2

“Inclined grinding wheel”

Tool code 3

“Surface grinding wheel”

Page 220: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-68 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Representation Type WGD DE 19

The representation type has a range of 0-65535. The data element canbe edited in the setup list and in the tool list. If the data element has avalue assigned in the setup list that is different than zero, the values arechecked 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 process-ing is not intended for the time being.

5.6 Tool Path Compensation

Inactive Tool Path CompensationIf no edge radius/cutter radius path compensation is active, the theoreticaledge 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.

@��� �������� �� ���� ��8!� �� �=�N� N��� ����� !���������

8!� ���� � �� ���� ��

$$

$

$$

� & � &

� &

� &�& � &

#

@�� �� ����� ��������

@��� ������8!� �� � � ��N� N

1

0

511Unohn.FH7

P: theoretical edge tipS: edge centerB: actual touch point

Fig. 5-32: Inaccuracies that occur if machining is performed without using tooledge radius path compensation

The shaded area in the drawing will not be removed since the controller isusing the theoretical edge tip P as its point of reference.

When tool edge radius / cutter radius compensation is active, the CNC au-tomatically moves the actual contact point B along the programmed con-tour. Thus, the resulting contour is identical to the programmed contour.

Representation type

Page 221: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-69

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Active Tool Path CompensationIf edge radius/cutter radius path compensation is active (G41/G42), theCNC automatically calculates the length corrections which are active inthe working plane with respect to the center point of edge S by add-ing/subtracting the correct radius to/from the theoretical edge tip, basedon the current position of the cutting edge.

$$

$

$$

� & � &

� &

� & � &

#

@�� ����������������������� !���������@����������� �� ������8!� �� �=�N�N@���������8!� �� �� ��N�N

1

0

512Smit.FH7

P: theoretical edge tipS: edge centerB: actual touch point

Fig. 5-33: Inaccuracy-free machining with active tool edge radius path com-pensation

With tool path compensation active, the center point of the tool travelsalong a path which is parallel to the programmed contour and is offset bythe tool radius.

Page 222: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-70 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Contour Transitions

With inside corners, the corrected NC block transition point is based onthe point at which the lines parallel to the contours intersect.

#

��N $

/

� �N0

#

$

0

/

� N

� N

/

513Innen.FH7

R: theoretical edge tipS: edge centerS ": actual touch point

Fig. 5-34: Inside corners

The tool center point must travel around outside corners so that they arenot damaged.

Two methods can be used to accomplish this:

1. Insertion of an arc as the transition element by using NC commandG43, and

2. Insertion of a chamfer as the transition element by using NC com-mand G44. The insertion of a chamfer is possible only if a straight-line ↔ straight-line transition exists.A chamfer is used as the transition element when the transition anglebetween the two straight lines is greater than 90°. If the transition angleis less than 90°, the NC block transition point is recalculated based onthe intersection point of the lines parallel to the contour.

Inside corners

Outside corners

Page 223: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-71

DOK-MTC200-NC**PRO*V23-AW01-EN-P

#

�N$

���L

0

$

/

2- �O �*��.

#

��N

���N

��N���L

#

��N

���N

514Aussen.FH7

R: tool radiusS: programmed NC block transition pointS1 ": corrected NC block transition point 1S2 ": corrected NC block transition point 2

Fig. 5-35: Arc transition element with G43

G������� !���7����=������������G����� �� !���7����=������������������������OP��BG����� �� !���7����=�������������������������OQ��BG����� �� !���7����=��������������������������OQ��B

##

$��N

���N

$

��N

#

@�� ����� �� �+������O ;�#����=

@�� ����� �� �+���5���O

;������.���*?+������ ����� ���� �= G��������!���G����������������

#O���R

��R

���R

O

$22F�� *��.

515Fase.FH7

Fig. 5-36: Chamfer transition element and corrected block transition point

When arcs or chamfers are inserted as contour transitions, the CNC auto-matically generates an additional transition NC block. This NC block isconsidered to be an independent NC block, and as such, it must be star-ted separately in single-block processing mode.

Page 224: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-72 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: With look-ahead calculation of the corrected tool center pointpath, only the transition angle relative to the contour element ofthe following motion NC block is used in the calculation and notthe length of the contour element. The cases indicated in Fig. 5-37: are not recognized.

��N

��N

��N ��N

��N

��N

��R

��N

2:#��!*��.

516RAND.FH7

Fig. 5-37:: Boundary conditions for contour elements

Arcs can, of course, replace the contour elements which are representedas straight lines. Any overlaps with elements other than the next contourelement are ignored.

The case shown here as a concave arc (see following fig.) is recognizedand program execution is terminated with an error message.

Page 225: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-73

DOK-MTC200-NC**PRO*V23-AW01-EN-P

��N

2.I��=*��.

517KONK.FH7

Fig. 5-38: Concave arc, 1 element

The cases shown below are concave arcs with contour violation.

��N

2/I��=(*��.

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, whichincludes at least a change of one axis coordinate of an axis belonging tothe selected working plane. If this is not the case, the contour movementis completed, and the next contour transition will not be calculated. Look-ahead NC block processing will be interrupted with calculations in the NCprogram, which leads to the completion of a contour movement. Thus, acoherent contour move cannot be programmed according to NC vari-ables.

Page 226: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-74 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Establishment of Tool Path Compensation at Start of ContourThe starting point of the contour [P1] which is to be corrected with toolpath compensation is located above the starting point [P0] of the pro-grammed contour, perpendicular to the subsequent direction of motion.

#;�<

;��<

#;��<

;�< #

;��< ;�<

2�0I���*��.

519WKORR.FH7

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

The establishment of tool path compensation requires an additionalmovement in the working plane, which is performed only in conjunctionwith a programmed linear movement.

#

;��<

;�<;��<

+��" �� !

��� ���(�" ��

��� ���(�" ��

������ !

2��0I���*��.

520WKAUF.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-41: Establishment of tool path compensation

If an attempt is made to perform tool path compensation by means of acircular 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 toolpath compensation must be selected in such a way that the tool is locatedcompletely within the quadrant which is opposite the contour corner.

Page 227: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-75

DOK-MTC200-NC**PRO*V23-AW01-EN-P

F��G

;�<

#;��<

2�0���*��.

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

If the starting point of tool path compensation is moved to an inside cornerwith closed contours, a contour violation would result at the end of thecontour (see the figure below).

F� GJ�F�AG

;��< ;��<

;�-<;�2<

;�:<

;��<

#

�������� 5��������

2��0� �*��.

522WGES.FH7

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

Page 228: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-76 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Removal of Tool Path Compensation at End of ContourThe end point of the contour [Pe1] which was corrected with tool pathcompensation is located above the end point [Pe0] of the programmedcontour, perpendicular to the prior direction of motion.

#

;� <

;� �<

#

;� �<

;� <

#

;� �<

;� <2��08�!*��.

523WEND.FH7

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

The removal of tool path compensation requires an additional move in theworking plane, which is performed only in conjunction with a programmedlinear movement (see following fig.).

#

;� �<

;� <;� <

+��" �� !��� ���(�" ��

������ !��� ���(�" ��

2�-0 ��*��.

524WAUF.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-45: Removal of tool path compensation

Removing tool path compensation on an arc will not cause an error to beissued, but it will cause unpredictable contour errors. To avoid violationsof the contour end point, the end point of tool path compensation must beselected in such a way that the tool is located completely within the quad-rant which is opposite the contour corner.

Page 229: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-77

DOK-MTC200-NC**PRO*V23-AW01-EN-P

;� �<

;� <

#

;� <

2�2I8�! *��.

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

If the end point of tool path compensation is moved to an inside cornerwith closed contours, a contour violation would result at the starting pointof the contour (see following fig.).

F� GJ�F�AG

;��< ;��<

;�-<;�2<

;�:<

;� .<

#

�������� 5��������

2�:I� ���*��.

526KGESCH.FH7

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

Page 230: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-78 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Change in Direction of CompensationA change in direction of compensation functions behaves as if tool pathcompensations were removed and then re-established.

;���<

;��<

#

#

;� �<

;� <������ !��� ���(�" ��

+��" �� !��� ����(�" ��

2�.0 ���*��.

527WECHS.FH7

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

The change of tool path compensation requires an additional movementin the working plane, which is performed only in conjunction with a pro-grammed linear movement.

Note: If an attempt is made to perform tool path compensation bymeans 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 PathCompensation at Start of Contour", page 5-74 and "Removal of Tool PathCompensation at End of Contour", page 5-76 regarding the possibility ofviolating 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 alreadyactive. When tool path compensation is cancelled, the center point of thetool travels along the programmed path.

If active tool path compensation (G41 or G42) is canceled by G40, thenext anticipated movement is a linear movement along the process plane.The axis values of both main axes must be programmed in the NC blockso that tool path compensation can be cancelled.

G40

• G40 is the power-on state; it has a modal effect. G40 is cancelled byG41 or G42.

• G40 is automatically set after the controller has been powered on, aswell as after an NC program is loaded and after a BST, RET or controlreset.

Syntax

Page 231: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-79

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Path Compensation, Left "G41"Tool path compensation to the left of the workpiece contour is activatedby the G41 function command.

If tool path compensation to the left of the contour is active, the tool centerpoint moves along the left side of the programmed contour when viewedin the direction of movement. It moves along a path opposite of and par-allel to the contour with an offset equaling the tool radius.

If G41 is programmed after an active G40 or G42, the next anticipatedmovement is a linear movement in the process plane. The axis values ofboth main axes must be programmed in the NC block in order for toolpath compensation to be re-established or changed.

G41

• G41 remains modally active until it is canceled by G40 or G42 or untila reset is automatically performed at the end of the program (RET) orBST.

• When tool path compensation is active, no more than two NC blockscan be programmed without programming a movement in the currentprocess plane. If more than two NC blocks are programmed without amovement, tool path compensation is canceled with G40.

Note: If an attempt is made to perform tool path compensation bymeans 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 activatedby the G42 function command.

If tool path compensation to the right of the contour is active, the toolcenter point moves along the right side of the programmed contour whenviewed in the direction of movement. It moves along a path opposite ofand 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 processplane. The axis values of both main axes must be programmed in the NCblock so that tool path compensation can be activated or changed.

G42

• G42 remains modally active until it is canceled by G40 or G41 or until areset is automatically performed at the end of the program (RET) or BST.

• When tool path compensation is active, no more than two NC blockscan be programmed without programming a movement in the currentprocess plane. If more than two NC blocks are programmed without amovement, tool path compensation is canceled with G40.

Note: If an attempt is made to perform tool path compensation bymeans of a circular movement, an error message will be issued:"G41/G42 activated with circular interpolation"

and the NC program will terminate.

Syntax

Syntax

Page 232: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-80 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Path Correction G41, G42 Behind and Before the Turning Center

?�#� .

��#���%� � ���

���

?�������#

���%� � ���

���

8!� ���� �������

8!� ���� �������

<��

<�

1�1�

1�

1�

0

11

8!� ���� �������

8!� ���� �������

<�

<��

1�1�

1�

1�

0

8!� ���� �������

8!� ���� �������

8!� ���� �������

<��

<�

1�

1�

1�

1�

0

1

8!� ���� �������

8!� ���� �������

<�

<��

1�

1�

1� 1�

0

1

2 2

528G4142.FH7

Fig. 5-49: Tool path correction G41, G42 with machining behind and before theturning center

Page 233: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-81

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: NC program tool path correction using G42

��

-�

:�

/�

��

�� -� :� /� �� 0

2

�� -� :� /�

�:

�/

�2

�-

����

��

��

���.

2�/1-�*��.

528G42.FH7

Fig. 5-50: Tool path compensation, right (G42)

NC program using G42:

(TOOL CHANGE: ID=SF D5)T4 BSR .M6G00 G54 G06 G08 X115 Y99.5 Z5 Movement commands, interpolation

conditionsG01 Z2 F1000 S2000 M0 1st start positionZ-10 F1200 Lower cutter into materialG42 X117.5 Y99.5 F1500 [P1] Establish tool path compensationG02 X98 Y80 I98 J99.5 Move to contour with a ¼ circleG01 X45 Y80 [P2] Machine 1st sectionG03 X40 Y75 I45 J75 Machine 1st ¼ circleG01 X40 Y25 [P3] Machine 2nd sectionG03 X45 Y20 I45 J25 Machine 2nd ¼ circleG01 X135 Y20 [P4] Machine 3rd sectionG03 X140 Y25 I135 J25 Machine 3rd ¼ circleG01 X140 Y75 [P5] Machine 4th sectionG03 X135 Y80 I135 J75 Machine 4th ¼ circleG01 X90 Y80 Machine 5th sectionG02 X73.5 Y96.5 I90 J96.5 Withdraw from contour with a ¼ circleG01 X73.5 Y99.5 [P6] End position of outer contourG00 Z2 Z axis to safety distanceG40 X68 Y49.5 [P7] Starting position of inside contourG01 Z-10 F1000 Lower cutter into materialG42 X65.5 Y49.5 F1500 Establishment of tool path compensationX65.5 Y50.5 Linear motionG02 X90 Y75 I90 J50,5 Move to contour with a ¼ circleG01 X130 Y75 [P8] Machine 1st sectionG02 X135 Y70 I130 J70 Machine 1st ¼ circleG01 X135 Y30 [P9] Machine 2nd sectionG02 X130 Y25 I130 J30 Machine 2nd ¼ circleG01 X50 Y25 [P10] Machine 3rd sectionG02 X45 Y30 I50 J30 Machine 3rd ¼ circleG01 X45 Y70 [P11] Machine 4th sectionG02 X50 Y75 I50 J70 Machine 4th ¼ circleG01 X98 Y75 Machine 5th sectionG02 X119.5 Y53.5 I98 J53.5 Withdraw from contour with a ¼ circleG01 X119.5 Y49.5 [P12] End position inside contourG00 Z2 Z axis to safety distance(TOOL CHANGE: Store last tool)T0 BSR .M6RET Program end

Page 234: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-82 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Inserting an Arc Transition Element "G43"With tool path compensation (G41 or G42) active, G43 inserts an arc as atransition element for outside corners.

The tool center point must travel around outside corners so that they arenot damaged. An arc should always be inserted for circle ↔ straight lineor circle ↔ circle contour transitions.

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 toolpath compensation (G40) is canceled. G43 is reset automatically atthe end of the program (RET) or by the BST command.

• If an arc is inserted via G43 as a contour transition, the CNC auto-matically generates an additional transition NC block. This NC block isconsidered to be an independent NC block, and must be startedseparately in "Single block" processing mode.

• The conditions for the insertion of transition elements are described inthe section "Contour transitions".

#�

���N

��N��N

���N#

2��S� �*��.

529UEBER.FH7

R: tool radiusS: programmed NC block transition pointS1 ': corrected NC block transition point 1S2 ': corrected NC block transition point 2

Fig. 5-51: Inserting an arc transition element

Inserting a Chamfer Transition Element "G44"With tool path compensation (G41 or G42) active, G44 can be used toinsert a chamfer as a transition element for outside corners with a transi-tion angle exceeding 90°.

In the case of outside corners with a transition angle equal to or greaterthan 90°, the corrected transition point is defined as the intersection of thelines parallel to the contour.

G44

• A chamfer as a transition element can be used only for transitionsbetween two straight lines. With all other transition pairs, an arc isautomatically used as a transition element, even if G44 is active.

• After it is selected, a G44 remains modally active until it is cancelled byG43 or until it is automatically reset at the end of the program or byBST. G44 can be activated only via G41 or G42. G44 has no effect iftool path compensation (G40) is canceled.

• If a chamfer is inserted via G44 as a contour transition, the CNC auto-matically generates an additional transition NC block. This NC block isconsidered to be an independent NC block, and must be startedseparately in "Single block" processing mode.

Syntax

Syntax

Page 235: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-83

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• The conditions for the insertion of transition elements are described inthe section "Contour transitions".

�G��������!����G������� !��������=������

�G����� �� !������=��������������������

#���N �G����� �� !������=�������������������

���N

##

$��N

���N

�G��������!����G������� !��������=������

#���N �G����� �� !������=������������������

$

��N

#

@�� ����� �� �+������O

@�� ����� �� �+���5���O

2��F8��*��.

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 cor-rection is performed for arcs when G98 is programmed. Thus, the pro-grammed path feed rate applies to the tool centerline and not the work-piece contour.

In the case of convex arcs (outside circle), a reduction of the path feedrate at the contour results; with concave arcs (inside circle), it results in anincrease.

G98

• G98 is the power-on state. It is modally active until it is overwritten byG99. G98 can be activated only via G41 or G42. G98 has no effect iftool path compensation (G40) is canceled. G98 is reset automaticallyat the end of the program (RET) or by the BST command.

Syntax

Page 236: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-84 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Constant Feed at the Contour "G99"With tool path compensation (G41 or G42) active, a path feed rate cor-rection 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 feedrate along the tool centerline path results; with concave arcs (inside circle)it results in a decrease.

G99

• After it is selected, G99 remains modally active until it is canceled byG98 or until it is automatically reset at the end of the program (RET) orby BST. G99 can be activated only via G41 or G42. G99 has no effectif tool path compensation (G40) is canceled.

5.8 Tool Length Compensation

If movements are being performed in the direction of the tool axis and atthe same time tool length compensation is inactive, all declared positionsrelate to the position of the nose of the spindle.

������ !

47"���

4K

2����=��"*��.

531INAKTIV.FH7

Fig. 5-53: Inactive tool length compensation

If a movement is performed in the direction of the tool axis at the sametime that tool length compensation is active, the actual tool lengths en-tered in the magazine list are automatically used for calculations by thecontroller, so that all declared positions now apply to the position of thetool tip.

In order to establish or remove tool length compensation, it is necessaryto perform a programmed movement in the direction of the tool axis sothat the spindle nose stops at the programmed position when the endpoint is approached.

The direction of the tool axis is assumed to be the direction of the mainaxis, which is perpendicular to the process (machining) plane. The posi-tion 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 activa-tion (G48) or the negative activation (49) of the tool length compensationmust be programmed in the tool change program.

Syntax

Page 237: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-85

DOK-MTC200-NC**PRO*V23-AW01-EN-P

1H

������ !47"���

+����� ����

2���=��"*��.

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 al-ready active. When movements are being performed in the direction ofthe tool, all position data relate to the position of spindle nose.

If active tool length compensation (G48 or G49) is canceled with G47, aprogrammed movement in the direction of the existing main axis is ex-pected. Movements which do not involve the removal of material from theworkpiece, such as a tool change, are generally performed without toollength correction.

G47

• Depending on the settings in the process parameters, G47 may be thepower-on default. G47 remains modally active until it is canceled byG48 or G49.

• G47 is set automatically depending on the setting in the process pa-rameter after the controller is turned on, after an NC program isloaded, after a BST, RET or control reset.

Tool Length Correction, Positive "G48"After tool length correction has been activated by G48, the CNC compen-sates the tool lengths entered in the magazine list in the positive axisdirection beginning with the next programmed move in the direction of theexisting main axes.

G48

• Depending on the settings in the process parameters, G48 may be thepower-on default. G48 remains modally active until it is canceled byG47 or G49.

• G48 is set automatically depending on the setting in the process pa-rameter after the controller is turned on, after an NC program isloaded, or after a BST, RET or control reset.

Syntax

Syntax

Page 238: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-86 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Length Correction, Negative "G49"After tool length correction has been activated by G49, the CNC compen-sates the tool lengths entered in the magazine list in the negative axisdirection beginning with the next programmed move in the direction of theexisting main axes.

G49

• G49 remains modally active until it is canceled by G47 or G49, or untilit is automatically reset at program end (RET), by BST or by controlreset.

• 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 inthe tool list from the NC program and to write them; however, some re-strictions apply to writing.

The individual data elements are addressed by means of codes. Depen-ding 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:

+�,�;�**:<D;<D;**�������<D;***���<D;�**�<D;**�2<D;**��<�

������,���� � ��

8!�

���������C�>�! '���*

������ �;�**�<�C�������� �

!!� �����

���� ��

+�,�;�**:<D�;�<D�����;�**�<������D;***���<D;�**�<D;**�2<D;**��<�

� , $L@ &L� / � $

57tld.FH7

Fig. 5-55: Syntax of the TLD command

Syntax

Syntax

Page 239: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-87

DOK-MTC200-NC**PRO*V23-AW01-EN-P

TLD addressing via location and magazine type V23_20030319

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 changeposition

7

Address active tool

Location L 1 - 999 1 - 4 1 - 4 1 - 4 0

Tool edge E 0 1 - 9

Basic tool data Tool edge data

Data element DE 3 - 89

Tool status 10 - 3132

Groupstatus

1 2 3 - 40

Status S ---1 - 32

Tool statusbits

---1 - 16Group

status bits---

1 - 16

Tool edge statusbits

---

Group No. G Not relevant Not relevant

Group duplonumber GD Not relevant Not relevant

TLD addressing via tool and duplo number V23_20030319

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 1 - 9999999 Tool number

Tool duplo No. TD 1 - 9999 Tool duplo number

Tool edge E 0 1 - 9

Basic tool data Tool edge dataData element DE 3 - 8 9

Tool status

10 - 31 32Groupstatus

1 2 3 - 40

Status S ---1 - 32

Tool statusbits

---1 - 16Group

status bits---

1 - 16

Tool edge statusbits

---

Group No. G0 - 99 Group association of the tool

no information: active group

Group duplonumber GD

0 - 99 Group duplo association of the toolno information: duplo No. of the active group

TLD_V23_20030319.xls

Fig. 5-56: Parameters of the TLD command

A detailed description of the TLD command is contained in section "NCSpecial Functions".

Value range and meaning of parameters

Page 240: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-88 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

5.10 D corrections

D corrections are additional to the tool geometry data active registers. Dcorrections act additionally to the existing geometry registers L1, L2, L3and R. 99 D corrections are available for each of the 7 processes. Each Dcorrection contains the L1, L2, L3 and R registers. The values of the Dcorrection registers can be assigned using the CNC operator interface.

D0 ⇒ Cancel D correctionsD<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 exampleas tool reference point offset registers. If tool management is not definedwith a CNC process, the D corrections themselves can be used in placeof tool management for simple applications. The D correction functionslike correction type 4 in tool management. An edge orientation cannot bedefined in the D corrections.

If the D corrections are selected in a movement block, they will be used inthe same NC block for the calculation of the new position.

Example:

G00 X100 Y150 Z10 D20 D correction is already effective in this NCblock!

1. 1/ 1�

7�

7�

/

7�

3

/

7�

7�

7�

��

#��

44

#

666

2��!=���*��.

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 unlesstool length correction G48/G49 is active. Geometry register R is used forcompensation only when tool path compensation G41/G42 is active.

If tool management is active for a selected machining tool and a D cor-rection is also active, then the tool lengths and the radius are calculatedas follows:

correction D of R R Offset R wear R radius R correction Radius

correction D of L3 L3 Offset L3 wear L3 length L3 correction Length

correction D of L2 L2 Offset L2 wear L2 length L2 correction Length

correction D of L1 L1 Offset L1 wear L1 length L1 ncorrrectio Length

+++=+++=+++=+++=

Fig. 5-58: Calculation of length and radius

Syntax

Programming

How D corrections work

Page 241: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Tool Compensation 5-89

DOK-MTC200-NC**PRO*V23-AW01-EN-P

�����,7���� ������

� ��������� �������

����,7���� �������

�-��-*:�

.�*-�

0 �=M ��� � ��� ? �� �������� �:�+%���4

���� �������%� 8!� ���� ������� �� ������� �-0 ����� ����� ���� �

� ������ .�*-� ������� �� ������� �-*:#�!��� �

+����� � ��%�"��� �2�-,? �=*��.

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 arenot active unless tool length correction (G48/G49) or tool radius cor-rection (G41/G42) is active.

• D0 is active in the power-on state; thus, the D corrections do notcompensate.

• A programmed D correction is modally active. The programmed Dcorrection is cancelled if D0 is programmed. D0 is automatically activeafter an NC program is loaded and after a BST, RET, M02, M30, orcontrol reset.

• If tool length correction or tool radius correction is deactivated when aD correction is active, the geometries of the corresponding D correc-tion once again become active if the tool length/radius correction isreactivated.

• Geometry registers L1, L2 and L3 act in the direction of the 3 mainaxes (X, Y, Z) depending on which process plane is selected. LengthL3 is always perpendicular to the current machining plane, whilelengths L1 and L2 always lie within the current machining plane.

Note: The D corrections are not available in an NC process unlessthe machine builder has specified that they are available in theprocess parameters.

The maximum value which can be entered via the GUI for geometry reg-isters L1, L2, L3 and R is entered in the process parameters.

Using D corrections

Page 242: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

5-90 Tool Compensation MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 243: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

6 Auxiliary Functions (S, M, Q)

6.1 General Information on Auxiliary Functions

Auxiliary functions are transferred to the PLC and are then executed andacknowledged by the PLC. For this to happen, the switch functionsneeded in the PLC must be defined.

A maximum of 6 auxiliary functions can be programmed for each NCblock. Of these, a maximum of 4 M functions from different groups andone S and one Q function each may be used.

The auxiliary functions are processed in the following order in the NCblock: S, M, Q.

Note: If an auxiliary function has been output to the PLC, block proc-essing stops until the function is acknowledged. Thus, pro-gramming an auxiliary function which is not defined in the PLCprogram will block further program execution. Programmingauxiliary functions temporarily stops block processing. Func-tions such as G08 (velocity-optimal NC block transition) will beinterrupted.

6.2 "M" Auxiliary Functions

The M functions are instructions which are primarily used to program ma-chine or controller switching functions (for example, spindle on/off, cool-ant on/off, gear change, etc.). An auxiliary function is programmed viaaddress letter M with a code of up to 3 digits. The codes for the auxiliaryfunctions are partially defined in DIN 66 025 Part 2 and in part by the ma-chine builder.

Page 244: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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, M211

10 Clamp and unclamp Spindle 3 M310, M311

11 Gear range selection Spindle 1 M040, …, M045

11 Gear range selection Spindle 1 M140, ..., M145

12 Gear range selection Spindle 2 M240, ..., M245

13 Gear range selection Spindle 3 M340, …, M345

14 Spindle override M046, M047

15 Feed override M048, M049

16 Blockwise active M functions as well as all M func-tions defined by the machine builder

M019, M119, M219, M319Mxxx

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 asdesired by the machine builder since they do not trigger any internal func-tions in the controller.

• In a given NC block, only one M function can be programmed fromeach 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 NCblock.

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.

Organization of M functions infunction groups

Page 245: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Program Control Commands

M000 allows a defined NC program stop to be performed – for example,to inspect a tool. After completing the check, the program can be contin-ued by pressing the start key. In all program-controlled modes, M000, likethe HLT command, produces a program stop in the NC. However, in con-trast to HLT, the NC sends the M000 auxiliary function to the PLC at theend 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 evaluatesthe interface signal "Conditional stop" after acknowledging the auxiliaryfunction.

M002/M030 act like the RET command. In addition, the NC sends thecurrently programmed auxiliary function to the PLC. Both auxiliary func-tions communicate the end of program to the PLC by resetting the NCprogram to the start of the program. The NC thus establishes the power-on state. After M002 or M030 are performed, all subroutine levels and allreverse vectors are cleared and the NC controller is in the initial state inthe main program level.

Spindle Control CommandsThe spindle is turned on or off using the spindle control commands Mx03,Mx04, Mx05, Mx13, Mx14. The first digit in the M functions is evaluatedas the spindle index number. If the spindle index is 0 (M003), the M func-tion is applied to the first spindle; if the spindle index is 2 (M203), the Mfunction is applied to the second spindle.

• Spindle control commands Mx03, Mx04, Mx13 and Mx14 take effectas soon as an axis move is programmed in the NC block. However,they are not output to the PLC until the motion command is comple-ted.

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 cool-ant/lubricant supply if the required switching functions are defined in thePLC program.

Turn on spindle rotation in the counterclockwise direction and turn oncoolant/lubricant supply if the required switching functions are defined inthe PLC program.

Programmed stop(unconditional)

M000

Conditional stop M001

End of NC program M002 / M030

Mx03 Spindle clockwise

Mx04 Spindle counterclockwise

Mx05 Spindle stop

Mx13 Spindle clockwise andcoolant/lubricant ON

Mx14 spindle counterclockwiseand coolant/lubricant ON

Page 246: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Spindle PositioningFunction M19 S... allows the primary spindle to be stopped in a definedposition. The angular position is programmed in degrees at address S.

The primary spindle can be positioned while not turning as well as whileturning.

• The NC block is only processed completely after Mx19 has been ac-knowledged by the PLC, when the spindle has reached the program-med end position.

• If Mx19 is programmed without an S word, an error will be issuedwhen the program is executed.

• Function Mx19 is possible only with primary spindles that are able tobe 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 pro-gram command MQ19. This command initiates asynchronous spindlesynchronization. The NC block that contains MQ19 is terminated as soonas all the other software functions are executed, even if the spindle hasnot yet reached the programmed end position.

Via the programming of MW19 (with the same spindle position as withMQ19), the following NC block can be interrogated and waited for until thespindle has reached its target position.

If there are several spindles in a process, only one positioning commandcan be started in each NC block. A separate NC block with the corre-sponding positioning command (e.g. MQ219) is required for the secondand each additional spindle.

The following restrictions apply to the MQ19 command:

• May only be used with SERCOS primary spindles with SHS firmware;parameter S-0-0152 must exist.

• MQ19 cannot be executed as long as primary spindle synchronizationis active.

• The function cannot be used for combined spindle-turret axes.

Syntax

Page 247: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Gear ChangesIf the quantity of gear steps is larger than 1 in the axis parameters of theCNC for one of the spindles, then M function groups 11-13 are reservedfor 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, ..., M244

13 Gear range selection Spindle 3 M340, …, M344

Meaning of the M functions:

Mx40 Automatic gear selection for spindle X

Mx41 1st gear range for spindle X

Mx42 2nd gear range for spindle X

Mx43 3rd gear range for spindle X

Mx44 4th gear range for spindle X

• Automatic gear selection (Mx40) is dependent on the correspondingaxis parameter set by the machine builder.

• If a multiple-range gear is not present, the M functions can be usedfor other purposes.

6.3 S-Word as Auxiliary Function

If a process was defined without a spindle in the process parameters, theS word has the meaning of an auxiliary function. This means that an addi-tional address letter is available, which the user can use for self-definableauxiliary functions in the PLC program. The S function can be entered asan unsigned integer constant having up to 4 digits. The numerical rangefor this constant is 0 to 9999.

S<constant> ⇒ S1234

There may be an expression instead of the constant.

S=<expression> ⇒ S=@123+@124

6.4 Q Function

A self-defined auxiliary function in the PLC program with address letter Qand a whole-number constant of up to 4 digits and without a posi-tive/negative sign can be called by the user. The numerical range for thisconstant is 0 to 9999.

Q<constant> ⇒ Q1234

For this to happen, the switching functions needed in the PLC must bedefined.

Note: Q functions Q9000 to Q9999 are reserved for Bosch Rexroth-specific auxiliary functions (S, M, Q) functions.

Syntax

Syntax

Page 248: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 249: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Events 7-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

7 Events

7.1 Definition of NC Events

NC events are binary variables which can be used by the NC programand which, like flags in the PLC program, represent any desired statedefined by the programmer. NC events can be set and reset as desired inthe NC and PLC programs. Waiting for a defined state in an NC eventcan synchronize processes.

Therefore, please refer to the machine builder's information regardingevents influenced by the PLC program since the builder may have usedvarious NC events for synchronization purposes.

The status of the NC event is retained after powering down. Before NCevents are used in an NC program, they should be placed in a definedstate.

Note: The process-local NC events 0 to 7 are reserved for interrupt-controlled program branches; in general, they should be keptopen 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 de-scription.

No more than four different NC event commands and only one NC eventbranch 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.

32 events are assigned to each process. By addressing with the processnumber, all 224 NC events can be used in a process, regardless of whetherthe process itself is defined. An NC event is identified by the process towhich it belongs (process number) and by the NC event number. Interrupt-controlled program branches can be performed with the assistance of proc-ess events. These topics are described in section 7.4 "Asynchronous han-dling of events", page 7-5. If an event type is not indicated, the process de-faults to the process in which the NC event is programmed.

32 external events are available; these are exchanged with the PLC in a 2mscycle. These events can be used to carry out fast I/O selection of the 2msimplementation (see "PLC Programming Instructions", section 11.3) of thePLC. In the PLC, these events are to be addressed using process number 7with the event functions.

For peripheral events, 32 outputs and 32 inputs are available; these areexchanged with the PLC in a 2ms cycle. These events are mapped on aphysical input and output area of the PLC. Write event functions set%IBP0 peripheral inputs of the PLC, while read event functions evaluatethe %QBP0 peripheral outputs of the PLC.

The write functions are:

SE P:<ev. no.>, RE P:<ev. no.>, EVENT(P,<ev. no.>)=...

Description

Process events (0-6)

External events (X)

Peripheral events (P)

Page 250: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

7-2 Events MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The following table shows how the write events are assigned to the inputsin the PLC:

Address Event number

%IBP0.531.0 - %IBP0.531.7 0, 1, 2, 3, 4, 5, 6, 7

%IBP0.530.0 - %IBP0.530.7 8, 9, 10, 11, 12, 13, 14, 15

%IBP0.529.0 - %IBP0.529.7 16, 17, 18, 19, 20, 21, 22, 23

%IBP0.528.0 - %IBP0.528.7 24, 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 readevents:

Address Event number

%QBP0.531.0 - %QBP0.531.7 0, 1, 2, 3, 4, 5, 6, 7

%QBP0.530.0 - %QBP0.530.7 8, 9, 10, 11, 12, 13, 14, 15

%QBP0.529.0 - %QBP0.529.7 16, 17, 18, 19, 20, 21, 22, 23

%QBP0.528.0 - %QBP0.528.7 24, 25, 26, 27, 28, 29, 30, 31

Fig. 7-2: PLC output addresses of events to be read

• If the symbol "*" is declared instead of event number 0-31, all the NCevents in the given process / event type are addressed.

7.2 Influencing Events

Set NC Event "SE"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 ig-nored. 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 theNC 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 thebuilder may have used various events for synchronization purposes.

• Event though it is theoretically possible to set events in other proc-esses, it is advisable to only change the event status in the process towhich the event belongs and to only interrogate events from other pro-cesses.

Event number

Syntax

Page 251: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Events 7-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Reset NC Event "RE"The event defined in the command parameter is reset using commandRE "Reset event". If the event is already reset, this command will be ig-nored. The event remains reset until it is set by the SE "Set event" com-mand.

SE <process number[0-6]>:<event number[0-31]> ⇒ RE01:15:00

RE <event number[0-31]> ⇒ RE 9

• If the symbol "*" is declared instead of the NC event number, all theNC 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 thebuilder may have used various events for synchronization purposes.

• Even though it is theoretically possible to reset events in other proc-esses, it is advisable to only change the event status in the process towhich the event belongs and to only interrogate events from other pro-cesses.

Wait until NC Event is Set "WES"The WES "Wait until event is set" command is used in the process inwhich WES is programmed to stop program processing until the eventdefined in the command parameter is set. If the event is already set, theblock continues to process without interruption.

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, proc-essing 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 thebuilder may have used various events for synchronization purposes.

• Since a process which is waiting for an event cannot set the sameevent, it is possible to wait only for an event whose status is changedby a different process.

• The WES command should not be programmed within a program sec-tion in which tool path compensation is active. If this proves to be un-avoidable, be certain that it is programmed only between linear blocktransitions.

Syntax

Syntax

Page 252: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

7-4 Events MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Wait until NC Event is Reset "WER"The WER "Wait until event is reset" command is used in the process inwhich WER is programmed to stop program processing until the eventdefined in the command parameter is reset. If the NC event is alreadyreset, the block continues to process without interruption.

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, proc-essing waits until at least one NC event in the specified process is re-set.

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 thebuilder may have used various events for synchronization purposes.

• Since a process which is waiting for an event cannot reset the sameevent, it is possible to wait only for an event whose status is changedby a different process.

• The WER command should not be programmed within a programsection in which tool path compensation is active. If this proves to beunavoidable, be certain that it is programmed only between linearblock transitions.

Example: NC program - influencing NC events

At the beginning of both NC programs, all events for the given processare reset. NC program process 2 stops the block process in line 3 untilNC 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 pro-cess 1

RE 2:* ;Reset all events in pro-cess 2

T1 BSR .M6 ;Tool change T1 ;Tool change

M03 S150 ;Spindle ON WES 1:1 ;Wait for event 1 of pro-cess 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

Syntax

Page 253: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Events 7-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

7.3 Conditional Branches for Events

Branch if NC Event is Set "BES"The BES branch command "Branch if event is set" is used to continueprogram processing at the declared branch label if the NC event definedin the command parameter is set.

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, proc-essing branches to the addressed branch label if at least one NCevent in the specified process is set.

Example:

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 thebuilder may have used various events for synchronization purposes.

Branch if NC Event is Reset "BER"The BER branch command "Branch if event is set" is used to continueprogram processing at the declared branch label if the event defined inthe command parameter is reset.

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, proc-essing branches to the addressed branch label if all the NC events inthe specified process are reset.

Example:

BER .WAIT 1:* - jumps to label WAIT when all events in process 1 arereset.

• The PLC program can also influence events. Therefore, please refer to the machine builder's information since thebuilder 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 processare reset. If event 15 is set in process 1 before process 2 has reachedline 3, then process 2 continues its processing at branch label .WAIT.Otherwise, the process is continued in line 4.

Syntax

Syntax

Page 254: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

7-6 Events MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC program process 1 NC program process 2

RE 1:* ;Reset all events in pro-cess 1

RE 2:* ;Reset all events inprocess 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 labelWAIT if event 15 ofprocess 1 hasstatus 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 anydesired time. Since the status of events can be changed by the PLC and byother processes, the NC program can be programmed to branch condition-ally upon certain signal changes.

The control of NC program flow consists of being able to interrupt theexecution of the active NC block, including the current axis movements,to request a subroutine and then to return to the interrupted NC block orto make a complete branch and continue the NC program at a differentlocation.

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 orsimply to modify the NC program flow are conceivable.

With the CNC, the response time to an external event is typically 50 milli-seconds.

NC events 0 to 7 of each process are for the interrupt-controlled programbranches. If a condition is met, the corresponding event assumes thestatus 1. The priority of an event increases with its number. Event "1" hasa higher priority than event "0", and event "7" has the highest priority. Thispermits a response to an external event while the handling of a previouslydetected low-priority event is not yet completed.

The first action taken to handle an external event is that all axis move-ments in the process are brought to a stop as soon as possible. Spindlesare not stopped when an event is called. The position of the stop is thencalculated back into the program coordinate system so that it can be usedas the starting position for the following move. In addition, the previouslyprepared motion blocks are cleared, and block processing begins againstarting at the point in the program which was defined as the start of eventhandling. The branch label that was programmed with the event identifiesthe start of an event.

• The monitoring of events and the appropriate response takes placeonly when an advance program is running. All NC event supervisionactivities are deactivated at the end of the program, when an axis isjogged, or when the program is reset by means of a control reset.

• Event commands are processed to completion at the end of the NCblock. No more than one command for asynchronous handling ofevents can be programmed in an NC block.

• The PLC program can also influence events. Therefore, please refer to the machine builder's information since thebuilder may have used various events for synchronization purposes.

Page 255: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Events 7-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: NC program - asynchronous event monitoring

.LOOP1

JEV .LEAVE 0 ;If event 0 is set, jump to routine "Empty"

Q456 ;Message to PLC: Emptying can be initiated

CEV 0 ;Clear event monitoring

.........

.LEAVE ;Routine for emptying the machine

Since the auxiliary channel remains assigned until Q456 is acknowledgedby the PLC, the NC program continues from this point as long as no otherauxiliary function is executed.

If event 0 is set during the auxiliary function output (Q456), the NC pro-gram branches to the specified point. The output of the auxiliary functionto the PLC remains pending, meaning that if the auxiliary function wasissued, it must also be acknowledged.

Call Subroutine if Event is Set "BEV"The BEV command "Call subroutine if event is set (Branch on Event)" isused to activate monitoring of the event specified in the command pa-rameter. If the NC event assumes status "1", it branches to the subroutinewhich is parameterized in the branch label of the BEV command. Achange of the status of low-parity NC events or the triggered NC event isignored until the end of the subroutine. However, the program may beinterrupted by higher-priority NC events.

BEV <branch label> <event number[0-7]> ⇒ BEV .LABEL 4

After the branch from the subroutine, block preparation is resumed at thebeginning of the interrupted NC block so that this block is now completelyprocessed to ensure that all the functions of the interrupted block areperformed. This can lead to unexpected results with incremental pro-gramming and incremental variable programming (@01=@01+3).

• The portion of the NC program which is processed as a subroutinemust be terminated upon the branch back from the subroutine. Moni-toring of the triggered event and lower-priority events is resumedautomatically.

• Repeating the assignment of a branch label to an event using the BEVcommand overwrites the previous assignment as well as any differentbranching behavior defined using the JEV command "Branch to sub-routine if event is set".

• The PLC program can also influence events. Therefore, please refer to the machine builder's information since thebuilder may have used various events for synchronization purposes.

Syntax

Page 256: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

7-8 Events MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 commandparameter. If the NC event assumes status "1", then processing branchesat this program point; this is parameterized via the jump label of the JEVcommand. A change of status of lower priority NC events or of the trig-gered NC events is ignored. However, the program may be interrupted byhigher-priority NC events.

JEV <branch label> <event number[0-7]> ⇒ JEV .LABEL 4

• After the interruption is triggered by the event, the program is contin-ued at a defined location; it cannot be reset, as is the case with theBEV command, by jumping back from a subroutine (RTS) into the in-terrupted NC block.

• Repeating the assignment of a jump label to an event using the JEVcommand overwrites the previous assignment as well as any differentbranching behavior defined using the command BEV branch on anevent to an NC subroutine (interrupt).

• The PLC program can also influence events. Therefore, please refer to the machine builder's information since thebuilder may have used various events for synchronization purposes.

Cancel NC Event Monitoring "CEV"The command CEV "Cancel NC event monitoring (interrupt)" can be usedto cancel NC event supervision when supervision is activated by means ofBEV or JEV. NC event monitoring is canceled for the NC event declaredin the command parameter.

CEV <event number[0-7]> ⇒ CEV 5

Disable NC Event Monitoring "DEV"The command DEV "Disable NC event monitoring" can be used when NCevent monitoring has been activated by BEV or JEV to disable this NCevent monitoring for a certain portion of the NC program until NC eventmonitoring is re-enabled via EEV "Enable NC event monitoring". NC eventmonitoring is disabled for all events.

DEV

Enable NC Event Monitoring "EEV"The EEV command "Enable NC event monitoring" is used to re-enableNC event monitoring, which was disabled by means of DEV. NC eventmonitoring is enabled for all events.

EEV

Example: NC program - asynchronous NC event handling

Two types appear in a prepared portion. In the first type, the holes shownin Fig. 7-3: are present, and a thread must be tapped. The number ofholes can vary between 1 and 4; however, they are specified by their po-sition. The given tapping position is selected via the ZO (G54 - G58). Inthe second type, normal processing is performed; the holes are ignored.An initiator located in the Z axis checks for the presence of holes. Theinitiator is connected to the PLC as an input. If the 0 state is present at thegiven input, the PLC sets NC event No. 6 in process 0.

Syntax

Syntax

Syntax

Syntax

Page 257: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Events 7-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC block : G01 X97.5 F700��������'��;��J!=���!6J��<�

20

40

60

80

100

20 40 60 80 100 X

Y

71ev

ents

.fh7

71EVENTS.FH7

Fig. 7-3:: Tapping depending on an event

NC program - tapping depending on an event

; Normal processingCEV 6 Disable NC event monitoringT1 BSR .M6 Tool change of first toolG00 G90 G54 G06 G08 Movement commands, interpolation

conditionsX0 Y0 Z10 S3000 M03 Starting position for process • • Machining •T0 BSR .M6@50=0 Variable to initialize ZOO1 Select the 2nd zero offset tableM52 Swing out initiatorG00 G90 G59 G06 G08 Home position, ZO for initiatorX32.5 Y65 Start positionG01 Z2 F500 M54 Z axis to scan, activate initiatorBEV .GEWB 6 Activate NC event monitoringG01 X97.5 F700 Check for holesM55 M53 Deactivate initiator and swing inO0 Select the 1st zero offset tableRET.GEWBDEV Deactivate NC event monitoringM55 M53 Deactivate initiator and swing in@51=X-OTD(,,,,1) @52=Y-OTD(,,,,2)@53=Z-OTD(,,,,3) Note current positionT15 BSR .M6 Change tapG90 G=54+@50 G06 G08 ZO establishes the tappingG01 X40 Y65 Z10 F2000 M03 S1000 [P2] 2nd tapping positionG63 Z-7.5 F2 Tap to depth ZG63 Z10 F2 S1200 M04 Withdraw tapT0 BSR .M6 Range tool@50=@50+1 ZO for next holeM52 Swing out initiatorG00 G90 G59 G06 G08 Home position, ZO for initiatorX=@51+5 Y=@52 Z=@53 Reapproach position of interruption

X axis +5 mm as safety distanceM54 Activate initiatorEEV Activate NC event monitoringRTS Return to point of interruption

Page 258: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

7-10 Events MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

7.5 Reading Events in Variable

NC command <Variable>=EVENT(<event type>,<event number>) can beused to read an event or all events into a variable. The function supplies1.0 for a set event and 0.0 for a deleted event. If all events are addressedwith *, the function supplies the binary value (see following table) over allevents (event0 * 2

0 + ... + event31 * 231) of the corresponding process or

event type. The result of the function must be stored in a variable andmust not be linked with operations.

@<Var>=EVENT([<proc.no.0-6>|@<var>],<ev.no.031>|*|expression)

• @10=EVENT(2,3) ;@10=1.0 if event 3 of process 2 is set;@10=0.0 if event 3 of process 2 is cancelled

• @0:2=EVENT(,*) ;@0:2=3.0 if only event 0 and 1 of current proc-ess are set

• @[@1]:[@2]=EVENT(@1,@2) ;@n:m = event n:m

@<variable>=EVENT(X,<event No.0-31>|*|expression)

• @2=EVENT(X,@1) ;@2=1.0 if external event @1 is set and;@2=0.0 if external event @1 is cancelled

@<variable>=EVENT(P,<event No.0-31>|*|expression)

• @2=EVENT(P,*) ;@2=5.0 (event 0 and 2), if peripheral outputs %QBP0.531.0 and % QBP0.531.2 are set.

NC command <EVENT(<event type>,<event number>)=expression canbe used to describe an event or all events. Only the rounded whole-num-ber portion of the expression is taken into account. The function sets anevent if the expression is not equal to 0 and deletes an event if the ex-pression is equal to 0. If all events are addressed with *, the functionwrites the whole-number portion of the expression as a binary value (32-bit) in the events (event0 * 2

0 + ... + event31 * 231 ) of the corresponding

process or event type.

In the case of addressing with *, the following table shows the binaryvalue for the corresponding event to be set. If several events are to be setsimultaneously, the binary values of the events are to be added. The bi-nary value for setting all events can also be specified with -1.

Syntax

Writing event(s)

Page 259: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Events 7-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Event number Binary value Event number Binary value

0 1 16 65536

1 2 17 131072

2 4 18 262144

3 8 19 524288

4 16 20 1048576

5 32 21 2097152

6 64 22 4194304

7 128 23 8388608

8 256 24 16777216

9 512 25 33554432

10 1024 26 67108864

11 2048 27 134217728

12 4096 28 268435456

13 8192 29 536870912

14 16384 30 1073741824

15 32768 31 2147483648

Fig. 7-4: Binary values of events

EVENT([<proc.no.0-6>|@<var>],<ev.no.0-31>|*|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 process @1 ;this corresponds to SE <Proc.>:*

@<variable>=EVENT(X,<event No.0-31>|*|expression)

• EVENT(X,@1)=@2 ;@2=1 set external event @1 ;@2=0 set external event @1

@<variable>=EVENT(P,<event No.0-31>|*|expression)

• EVENT(P,*)=@2 ;@2=5 (event 0 and 2) sets peripheral;outputs %IBP0.531.0 and % IBP0.531.2.

Syntax

Page 260: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

7-12 Events MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 261: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

8 NC Functions to Control Tool Management

8.1 Conditions

Default PlaneA Cartesian coordinate system is a prerequisite to utilize the tool correctionsproperly. 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 machiningplanes

• XY (G17, G20),

• ZX (G18, G21) and

• YZ (G19, G22)

can be selected.

With the functions for free plane selection (G20, G21, G22), any axisdesignation can be assigned to the axis meanings which define a machi-ning plane.

Tool length compensation "L3" always works perpendicularly to the machi-ning plane. Length compensations "L1" and "L2" and the tool edge radius /cutter radius compensation always act within the machining plane.

7�

7�

7� �

7�

7�

7� �

/

7�

7�

7� �

#$%&#�'

//

#$(&#�$ #$)&#��

Ebene.FH7

Fig. 8-1: Effect of tool corrections "L1", "L2", "L3" and "R" as a function of theselected machining plane

The machining plane is selected via NC commands "G17", "G18", "G19","G20", "G21" or "G22" (see chapter "Motion commands, dimension in-puts", section "Plane selection").

Page 262: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-2 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Preparation of Tools and Tool DataThe preparation of tools and tool data makes a distinction between themagazine and the turret in the sense that both a physical and a logical tooltransfer between the spindle and the magazine (in some cases also usinggrippers) is necessary, and in the sense that, with most magazines, it isnecessary to preselect the tool so that the magazine can be rotated asyn-chronously for NC program execution.

The definition whether the given tool storage unit is a magazine or a turretis made in process parameter Bxx.015 "Type of tool storage".

The following table contains an overview of all commands for tool and tooldata preparation. A detailed description of the commands is to be found inthe following chapters.

NC tool commands (1) V23_20030122

Function Meaning Description

E Preselect tool edge

Edge

Syntax: E<EDG>

EDG: Tool edge number

SPT Preselect tool spindle

Spindle for Tool

Syntax: SPT<SPI>

SPI: Spindle number

T Preselect tool

Tool

Syntax: T<TNP>

TNP: Tool number or toollocation

TG Preselect tool group

Tool Group

Syntax: TG<GRP>

GRP: Number of tool group (or 0)

TGSM Define tool search mode

Tool Group Search Mode

Syntax: TGSM<MODE>

MODE: Search modeWerkzeugbefehle_NC1_V23_20030122.xls

Page 263: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Preparing Tools and Tool Data for a MagazineMagazines 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 posi-tioned. With NC-controlled magazines, the controller-internal tool mana-gement provides for positioning. The movement of PLC-controlled maga-zines is handled by the PLC.

�1�

#8���1���2�0����0����������/4�����0��������������

1� ��

����2�

��������� ��

���"��� ���

0��

3+�

��=

��=MN

0��MN

0��

PLC-controlled

NC-'1���1 ��

0��$���� ���

�������

������

� �

: 1''�����: %���

: 1''�����: %��� $���� ���

����

��

��

�� � �

�������

cnc2.FH7

Fig. 8-2: Preselecting tools and preparing tool data for a magazine

When a magazine is employed, a distinction between a preselected tooland an active tool in a spindle is always made.

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 anexpression specifies the tool number (1 - 9999999; 0 = tool cancellation) orthe tool location number (0 - 999). NC commands "MTP" (Move Tool Po-sition) 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 themoment of the tool transfer, the data of this tool will not be taken into ac-count.

Tool preselection

Page 264: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-4 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The call "T0 MTP" causes an empty magazine location to be moved tothe changing position.

In the case of nonexistent magazine locations, the T command may acti-vate an additional tool zero offset (see the "Bosch Rexroth MTC 200 toolmanagement" description, section 3-9).

Tool changing commands "TCH" or "TMS" (see also the section "Toolchanging commands of the NC") are used for transferring the preselectedtool into the spindle and for providing the tool data. In this process, thepreselected tool becomes the active tool. In the default selection, tooledge 1 becomes the active tool edge.

Preparing Tools and Tool Data for a TurretTurrets 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 man-agement. The movement of PLC-controlled turrets is handled by the PLC.

�1�

#8���1���2�0�����0��������

�/4���

1� ��

���

���"��� ���

3+�

��=

��=MN

�78*'1���1 ��

#8*'1���1 ��

��

��

��%����'�2��-0���

0���

0���

0��

0���

0���

0���

3

534DWERK.FH7

Fig. 8-3: Preparing tools for a turret

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 anexpression specifies the tool number (1 - 9999999; 0 = tool cancellation) orthe tool location number (0 - 999). NC commands "MTP" (Move Tool Posi-tion) and "MMP" (Move Magazine Position) provide turret positioning (alsosee section "Tool storage unit motion commands of the NC").

The selected tool is moved in the machining position and the tool data isactivated. Tool edge 1 automatically becomes the active tool edge.

Preparing a tool

Preparing a tool

Page 265: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The call "T0 MTP" does not bring about a turret movement; the tool dataare merely deselected.

In the case of nonexistent turret locations, the T command may activatean additional tool zero offset (see the "Bosch Rexroth MTC 200 tool ma-nagement" description, section 3-27).

The following parameter value selection is necessary for swiveling theturret asynchronously to the NC program execution:

• A00.052 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 swiv-eling of the turret; see "Bosch Rexroth MTC 200 PLC interface descrip-tion") 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 tur-ret movements. While the turret is swiveling, the NC continues programexecution. Using the MRY command or activating the "REV_SYNC" stan-dard PLC function permits the turret swivel movements and NC programexecution to be synchronized.

The activation of the tool compensation values depends on the setting ofparameter Bxx.057 "Activate tool correction for turret".

The following table illustrates the effect of the parameter settings. Thefollowing 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

Behavior

synchronous asynchronous

Activation of tool com-pensation at start

Activation of tool com-pensation at end

Activation of tool com-pensation at start

Activation of tool com-pensation at end

NC pro-gram se-quence

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 T2Revolver.xls (Tabelle 2)

Fig. 8-4: Effects of process parameter Bxx.057

Note: Due to the dual function (spindle and turret axis) of theseaxes, asynchronous turret movements are not possible with"Combined spindle/turret axes".

Asynchronous turret movements

Page 266: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-6 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Edge InvocationSyntax:

E<constant> e.g. E2

E<expression> e.g. E=@0:12

E=(70-67)

The active tool is selected via address letter "E" followed by a constant oran expression.

Besides loading the tool data, each tool transfer towards the spindle cau-ses "Tool edge 1" to become the active tool. Accordingly, a tool call for aturret causes "Tool edge 1" to become the active tool (in addition to provi-ding the tool data).

"Tool edge 1" is most frequently used for machining. Thus, a separatetool edge selection is not necessary.

Internally, the tool edge invocation causes the related correction and toollife data to be provided. Tool management accesses this data during thesubsequent machining process.

Selecting the Tool Spindle "SPT"If there are several spindles in a process, certain functions (such as tool selec-tion 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 berelated to a spindle that is different than the first one, the tool spindle mustfirst be selected using "SPT <spindle number>".

• The tool spindle must be selected at least one NC block prior to afunction call.

• SPT <spindle number> has a modal effect until another spindle num-ber overwrites it or until it is automatically set to the 1st spindle at theend of the program (RET) or by BST.

• Tool life monitoring, wear factors, tool path correction and tool lengthcompensation are valid for the tool of the selected tool spindle.

Alternatively to the MTP command, command "SPT <spindle number>"can also be used to select an additional tool carrier. After selection, thetool with the 1st edge is active; the offset of the new machine zero point istaken into account. This offset is also calculated when tool compensation(G47) is inactive and is taken into account in the determination of thespindle speed for the constant surface speed (G96).

A detailed description of the processing of additional tool carriers can befound in the description "Bosch Rexroth MTC 200 tool management",section 4-16.

Tool Group ManagementAs of firmware version 23VRS, tools required for machining one type ofworkpiece can be combined in a tool group to support segmented toolmagazines.

Tool groups are identified by a group number and a group duplo number.Groups of the same group number are linked according to ascendingduplo numbers.

NC command TG is used to preselect a tool group. The tool search modeis defined with command TGSM. The tool that has been preselected inassociation with tool group management is taken into account by toolstorage movement command MTP.

Additional tool carrier

Page 267: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: A detailed description of the processing of tool group man-agement can be found in the documentation "Bosch RexrothMTC 200 tool management", section 1.4.

Preselect Tool Group "TG"

Tool Group

TG<group number (constant)>TG<group number (expression)>@<variable 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 formula

• @195=TG ;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 machi-ning group. The active group can be read with "@<var>=TG". In an unpa-rameterized group, the CNC reports error 322 "Invalid function". Af-ter activation or a control reset, the controller automatically preselectsgroup 0.

N0333 TG3 T19 ;activation of tool group 3 as the current machininggroup with simultaneous tool preselection

N1299 @101=TG ;read out the active tool group number

Define Tool Search Mode "TGSM"

Tool Group Search Mode

TGSM<mode (constant)>TGSM<mode (expression)>@<variable 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 formula

• @196=TGSM ;read out the currently effective tool search ;mode

The tool search mode, as well as the implicit group activation when the Tword is entered, can be influenced with NC command "TGSM=<mode>".The mode can be reread with "@<var>=TGSM". After activation or a con-trol reset, the controller automatically preselects tool search mode 0.

TG

Syntax

Value range

Meaning

Examples

TGSM

Syntax

Meaning

Page 268: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-8 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

For <mode>, the following search orders are available:

Mode Search order Comment

0 Preselected group If the tool is not found in the preselectedgroup, the NC will indicate error 314 ”Toolor tool location not found”.

1 Preselected group,group 0

First, the tool is sought in the preselectedgroup, then in group 0.

2 Preselected group,groups 0-99

If the tool is not in the preselected group, itwill be sought in ascending order in groups0-99.

3 Groups 0-99 Irrespective of the enabled group, the tool issought in ascending order in groups 0-99.

Fig. 8-5: Tool search mode in tool groups

If the requested tool is found in another group than the preselec-ted/enabled one, this group will be automatically enabled and preselectedonce the tool has been enabled. If the tool search produces no hits, theCNC reports error 314 "Tool or tool location not found".

N0344 TGSM1 T19 ;Define tool search mode 1, ;preselect tool and implicitlyactivate the tool group in which the;tool was found

N1266 @2:98 = TGSM G01 X78 F1200 ;Read currently effective tool ;search mode and position axis in

;feed

Changing ToolsThe process of changing tools is initiated by NC commands.

In most cases, changing tools also requires motions and activating / de-activating G codes. Thus, the entire program sequence should be com-bined in a subroutine or a cycle. This reduces the programming effort inthe main program to selecting the tool via the T command and invokingthe 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. Thechanging process proper is then programmed from the label ".M6" onwards.

Example: NC program:

•••

N0047 T12 M6 ; invoke "Change tools"

N0048 G54 G0 X123 Y45 F350

•••

"Tool change" cycle:

N0000 .M6

N0001 G40 G47 G0 X100 Y100 Z50

•••

N0056 RTS

Examples

Page 269: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: Please refer to the "Bosch Rexroth MTC 200 tool management"documentation, "Sample applications" section for examples ofprogramming 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 mo-tions on the other NC axes. The NC motion commands only initiate toolstorage unit motion and do not wait until the tool storage unit has completedthe motion. In the meantime, the NC program – and thus the process – canbe continued.

The command "MRY" can be used to scan signals to determine whether themotion which was initiated is finished. In this way, the NC program is haltedand synchronized with the tool storage unit.

The following table contains an overview of all tool magazine motioncommands of NC. The table is followed by a detailed description of com-mands.

NC tool commands (2) V22_20030122

Function Meaning Description

MEN Tool storage enabled formanual mode

Magazine Enable

Syntax: MEN

MFP Move free pocket into changeposition

Move next Free Pocket in Position

Syntax: MFP (POS, DIR)

POS: Position to be moved to

DIR: Direction of rotation

MHP Tool storage to home position

Move to Home Position

Syntax: MHP (DIR)

DIR: Direction of rotation

MMA Freely position tool axis

Move Magazine Access

Syntax: MMA (POS, DIR)

POS: Position to be moved to

DIR: Direction of rotation / mode

MMP Move programmed pocket intobasic position

Move Magazine Pocket in Position

Syntax: MMP (POS, DIR)

POS: Position to be moved to

DIR: Direction of rotation

MOP Move old pocket into position

Move Old Pocket in Position

Syntax: MOP (POS, DIR, SPI)

POS: Position to be moved to

DIR: Direction of rotation

SPI: Spindle

MRF Move tool storage unit toreference position

Move to Reference Position

Syntax: MRF

MRY Tool storage ready?

Magazine Ready

Syntax: MRY

MTP Move programmed tool intoposition

Move Tool Position

Syntax: MTP (POS, DIR)

POS: Position to be moved to

DIR: Direction of rotation

Werkzeugbefehle_NC2_V22_20030122.xls

Page 270: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-10 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool Storage to Reference Position "MRF"

Move to Reference Position

(homing)

The "MRF" command starts the process of returning the tool storage unitaxis to the reference position.

This command is comparable to "G74" for the NC axes of a process. Afterthe control is powered on, the reference position must be established for thetool storage system before it can traverse to a particular position.

For this reason, the "MRF" command must be programmed in the reverseprogram of a process which uses the tool storage system.

In the case of NC-controlled tool storage units, referencing is executed bysetting parameters (Cxx.013 for "Combined spindle/turret axis", otherwiseusing the drive parameters).

In the case of PLC-controlled tool storage units, the "MRF" NC command istransferred to the "MRF" PLC function. The PLC must ensure that the refer-ence is established and must acknowledge the "MRF" function.

Before performing the "MRF" command, it is important to be certain that thetool storage movement does not prevent other NC axes from referencing.

��%����'��2��-

��%����'�'�2

��%����'��2��-

��

��

�� �� ��

<�1''�����

<�%���

MRF.FH7

Fig. 8-6: Reference position using a chain magazine as an example

Move Tool Storage Unit to Home Position "MHP"

Move to Home Position

MHPMHP(DIR)

DIR: <constant><variable>

DIR: 0, 1, 2

DIR = 0: any given directionDIR = 1: positive directionDIR = 2: negative direction

The "MHP" command causes the tool storage unit to move to its home po-sition. In this way, the tool management system ensures that the storage sys-tem is traversed to "Location 1" regardless of the type of axis or storage unit.

MRF

MHP

Syntax

Expression

Value range

Meaning

Page 271: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Optionally, you can enter the direction of the movement to the home posi-tion. 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-0-00052) with motor measuring system• Reference dimension 2 (S-0-00054) with external measuring system

With a PLC-controlled tool storage unit, tool management transfers "Loca-tion 1" (PLC interface signal "PxxS.MGCP Command magazine position")to the PLC. Using the "MMV" function, the PLC then moves to the homeposition and brings "Location 1" to the reference mark.

��%����'��2��-

��%����'��'�2

��%����'��2��-

����

��

��

�� � �

<�1''�����

<�%���

MHP.FH7

Fig. 8-7: Home position using a chain magazine as an example

The CNC does not wait until the tool storage unit has reached the homeposition. It continues to process the NC program while the tool storagemove is being carried out.

If this is not desired, the "MRY" command can be used to halt executionof the NC program until the tool storage motion is completed.

Programmed Move Tool into Position "MTP"

Move Tool Position

Move programmed tool into position

MTPMTP(POS)MTP(POS,DIR)

POS: <constant><variable>

DIR: <constant><variable>

POS: 1, 2, 3, 4DIR: 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 directionDIR = 1: positive directionDIR = 2: negative direction

The "MTP" command initiates a tool storage unit move which places thetool selected in the specified position via the T word in the NC program(change, installation or processing position).

MTP

Syntax

Expression

Value range

Meaning

Page 272: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-12 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Optionally, the position into which the selected tool is to be brought and thedirection to be taken when the tool is moved to the specified change posi-tion can also be declared.

Tool management chooses the shortest way and "Position 1" if neither di-rection 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 thesame "T number" (alternate tools), tool management automatically selectsthe tool to which the "Machining tool" status is assigned.

With machines that feature a tool magazine, which can be positionedduring the machining process, the "MTP" command is frequently used forprepositioning the magazine.

"MTP" is usually programmed in the NC program together with the toolpreselection "T<XX>" immediately after changing the previous requiredtool. In this way, the next tool is brought into the tool changing positionwhile the process is running.

In particular, this command is employed for tool changers with dual armgrippers where the previously used tool is to be stored in the magazinepocket from which the new one is taken.

Like "MFP", the "T0 MTP" command moves the next free location to thespecified position.

The CNC does not wait until the tool storage unit has completed its motion. Itcontinues 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 ofthe NC program until the tool storage motion is completed.

An additional tool carrier for tool storage type "Turret" is also selected with theT number and the MTP command; however, the turret is not positioned. Afterselection, the tool with the 1st edge is active; the offset of the new machine ze-ro point is taken into account. This offset is also calculated when tool compen-sation (G47) is inactive and is taken into account in the determination of thespindle speed for the constant surface speed (G96).

A detailed description of the processing of additional tool carriers can befound in the documentation "Bosch Rexroth MTC 200 tool management",section 4-18.

Example: The inside cutting tool "T91" that is located on a turret is tobe moved to the second machining position (POS2) withoutrunning through the first machining position (POS1).

Therefore define "Position 2" for POS and, for DIR, a nega-tive turning direction of "2".

�:��

��

��

0����0�@�H�A

��%����'�2��-

��%����'�2��-

�:�� �:���:��

0���

0���

0���

0��

0���

0���

0���

0���

0���

0��

0���0���

0���

0���3

3�

��

��

��I������$?�;� ���1'�$$

MTP.FH7

Fig. 8-8: Positioning a tool via MTP

Page 273: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Programmed Move Magazine Pocket into Position "MMP"

Move Magazine Pocket in Position

(Move programmed pocket into position)

MMPMMP(POS)MMP(POS,DIR)

POS: <constant><variable>

DIR: <constant><variable>

POS: 1, 2, 3, 4DIR: 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 directionDIR = 1: positive directionDIR = 2: negative direction

The "MMP" command initiates a tool storage unit move which places thelocation selected via the T word in the specified position (change, installa-tion or processing position).

Optionally, the position into which the selected pocket is to be broughtand the direction to be taken when the tool is moved to the specified posi-tion can also be declared.

Tool management chooses the shortest way and "Position 1" if neitherdirection nor position is preselected.

"Tool edge 1" of the tool in the currently selected pocket automatically be-comes the active tool edge.

The "MMP" command is generally used for sorting work and for adding orremoving tools.

Note: When used with the T-word, the "MMP" command refers ex-clusively to locations and not to tools. For this reason, if toolsare called according to the position using MMP, any sparetools which are present are ignored during a process unlessthey are explicitly programmed in the NC program with the aidof the T word and the corresponding pocket number.

The CNC does not wait until the tool storage unit has completed its mo-tion. It continues to process the NC program while the move is being car-ried out.

If this is not desired, the MRY command can be used to halt execution ofthe NC program until the tool storage motion is completed.

Example: Inside cutting tool "T91" in location 3 is to be replaced. To dothis, 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 DataInput). The pocket then moves along the shortest path possib-le (negative direction) to the loading/unloading position.

MMP

Syntax

Expression

Value range

Meaning

Page 274: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-14 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

�:���

��

��

��

0�����@�H�A

��%����'�2��-

��%����'�2��-

�:�� �:��

�:�� �:���:��

0���0���

0���

0���

0���

0���

0��

0��

0���

0���0���

0���

0���

0���3

3

MMP.FH7

Fig. 8-9: Positioning a turret pocket using MMP

MTP/MMP Commands and Tool CorrectionThe two commands MTP and MMP have different time behavior in regardto the activation of tool correction. Depending on the turret type and thecommand used, tool correction must be activated before or after the turretmovement.

Interaction of Bxx.044 and REV_SYNC

Bxx.044"Asynchronous turret movement"Turret movement

NO Yes

InputACTIVE = 0 synchronous asynchronous

REV_SYNC

InputACTIVE = 1 synchronous synchronous

Bxx044_REV_SYNC_V22_20030218.xls

Activation of tool compensation with MTP and MMP

Tool correction Point of activation MTP MMP MRY

At the beginningActivate tool comp.before moving turret

Activate tool comp.after moving turret

-Synchronous turret move-

mentAt the end

Activate tool comp.after moving turret

Activate tool comp.after moving turret

-

At the beginningWhen tool is in posi-tion then activation isperformed immedi-ately, otherwise at

first with MRY

-Activate

tool comp.

Asynchronous turretmovement

At the end - - Activatetool comp.

Werkzeugkorrektur_MTP_MMP_V22_20030218.xls

TC: Tool correctionT: Tool

Fig. 8-10: Activation of tool compensation with MTP and MMP

Page 275: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-15

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Freely Position Tool axis "MMA"

Move Magazine Axis

(Freely position tool axis)

MMAMMA(POS)MMA(POS,DIR)

POS: <constant><variable>

DIR: <constant><variable>

POS: -214748.3648 to +214748.3647 with 4 positions after the decimal pointDIR: 0, 1, 2, 3, 4

POS = axis position in mm, inches or units (default = 0)DIR = 0: shortest path (default)DIR = 1: positive directionDIR = 2: negative directionDIR = 3: longest pathDIR = 4: incremental path instructions

Tool magazine command MMA executes free positioning of the tool axis.Here, any position (intermediate locations) can be absolutely or relativelyapproached by the NC program. Direct programming of the tool axis us-ing an axis name is not possible.

Tool management chooses the shortest way and position value 0 if nei-ther direction nor position is specified.

The MMA command deactivates tool compensation for a tool turret anddeselects the active tool (T0 is preselected). If the tool storage unit is amagazine, the tool that is located in the current tool spindle remains active.

The addressing of tool data using the tool axis position after free posi-tioning using command MMA is not possible. If the tool axis is in the "Freepositioning" operating mode during a tool change using tool transfercommands (e.g. TSM, TMS, TCH), an error message is issued.

Notes: It is mandatory that the tool axis be again positioned absolutelyon a valid magazine location before executing a tool changeusing the corresponding tool storage unit movement com-mands.

Command MMA is not supported for PLC-controlled maga-zines/turrets and for tool magazine axes of axis type "Com-bined spindle/turret axis".Interface signal PxxS.MGCP (Process xx Status MagazineCommand Position) remains unchanged.

The CNC does not wait until the tool storage unit has completed its mo-tion. It continues to process the NC program while the move is being car-ried out.

If this is not desired, the MRY command can be used to halt execution ofthe NC program until the tool storage motion is completed.

MMA

Syntax

Expression

Value range

Meaning

Page 276: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-16 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Move to Free Position "MFP"

Move next Free Pocket in Position

(Move free pocket into change position)

MFPMFP(POS)MFP(POS,DIR)

POS <constant><variable>

DIR: <constant><variable>

POS: 1, 2, 3, 4DIR: 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 directionDIR = 1: positive directionDIR = 2: negative direction

The "MFP" command initiates a tool storage unit movement to move theclosest empty pocket to the specified position.

Optionally, the position into which the closest empty pocket is to bebrought and the direction to be taken when the tool is moved to the speci-fied position can also be declared.

Tool management chooses the shortest way and "Position 1" if neitherdirection nor position is specified.

This command is used to place the tool located in the tool spindle or inthe gripper in the closest empty pocket in the magazine. This is especiallynecessary with tool changers which do not have grippers or which usesingle-arm systems when the old tool needs to be stored before a newtool 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 ofthe NC program until the tool storage motion is completed.

Example:

The tool in "Spindle 1" is to be brought back to the magazine. This re-quires the nearest empty pocket to be moved to "POS 2". Due to the factthat the magazine may only be turned in the positive direction, the turningdirection is declared as "1".

Therefore, "Position 2" must be selected for POS as well as a turningdirection of "1".

MFP

Syntax

Expression

Value range

Meaning

Page 277: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-17

DOK-MTC200-NC**PRO*V23-AW01-EN-P

<�1''�����

<�%��� $���� ���

����

��

��

�� � �

��:���

�:���

3

1������1$���1�

�������

$���� ���

1������1$���1�

�������

�435�6$7

������

� �

�:���

�:���

3

��%����'��2��-��%����'��2��-

MFP.FH7

Fig. 8-11: Positioning a free magazine location using MFP

Move Old Pocket in Position "MOP"

Move Old Pocket in Position

MOPMOP(POS)MOP(POS,DIR,SPI)

POS: <constant><variable>

DIR: <constant><variable>

DIR: <constant><variable>

POS: 1, 2, 3, 4DIR: 0, 1, 2SPI 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 directionDIR = 1: positive directionDIR = 2: negative directionSPI = 1: old location of the tool in spindle 1SPI = 2: old location of the tool in spindle 2SPI = 3: old pocket of tool in spindle 3

The "MOP" command initiates a tool storage unit movement which movesthe 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 bedeclared.

If the position, direction or tool spindle are not entered, the tool managementsystem selects the old pocket for the tool which is active for "Spindle 1" andplaces it in "Position 1" using the shortest distance.

MOP

Syntax

Expression

Value range

Meaning

Page 278: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-18 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

If this command is used consistently, all tools will be returned to the pock-ets in which they were located before they were used in the machiningprocess. This keeps the tool storage unit in an orderly condition. This isdesirable, for example, when extra-wide tools always have to be stored inthe same magazine pocket.

The CNC does not wait until the tool storage unit has completed its motion. Itcontinues 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 ofthe 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 themagazine. This requires the old pocket to be moved to "POS 2". Due tothe fact that the magazine may only be turned in the positive direction, theturning direction is declared as "1".

Declare "Position 2" for POS, a positive turning direction for DIR and thefirst spindle for SPI.

$���� ���

<�1''�����

<�%��� $���� ���

����

��

��

�� � �

��:���

�:���

3

1������1$���1�

�������

1������1$���1�

�������

�835�6$6$7

� � ��

��

��

� ���

�:���

�:���

3

��%����'��2��-��%����'��2��-

0���

1 �� 1'���1�1%�0���

MOP.FH7

Fig. 8-12: Positioning the old pocket using MOP

Page 279: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-19

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Wait until Position is Approached "MRY"

Magazine Ready(Magazine movement completed ?)

If the last tool storage movement command has not yet been completed, thenthe MRY command temporarily interrupts the processing of the NC program.

The NC program does not resume processing until the programmed posi-tion has been reached. This permits the tool storage axis to be synchro-nized 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) ;Move programmed tool to "POS 2" along the shortest pathMRY ;Wait until position 2 is approached

Enable Tool Magazine (Storage) for Manual Mode "MEN"

Magazine Enable(enable magazine)

The "MEN" command allows a tool magazine to be traversed manuallywhile the "Automatic" mode of the machine is active. For example, thisallows a worn tool to be changed while production continues.

In order for the tool magazine to run in manual mode, the MEN commandmust 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 hasbeen performed, the CNC continues to execute the program for this processuntil 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 statusmessage in the diagnostic box is cleared and the remaining commands areprocessed 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 tomanual mode and after the tool storage system was enabled via MEM inthe NC program, the tool storage unit cannot be traversed manually while

MRY

MEN

Page 280: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-20 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

the program is executing and continuing to the next "MEN", "BST", "RET" orcontrol reset.

Moving Tool Storage Unit with Nonuniform Pocket Distribution

NC-controlled tool magazines and tool turrets that have a nonuniformspacing of the tool positions can be easily operated using a machine datapage with the tool storage movement commands of the NC (MTP, MMP,MHP, etc.). Furthermore, additional axis positions can be specified re-gardless of the type of spacing of the tool storage unit (uniform or non-uniform spacing) for logical positions 1 to 4; any intermediate position canthen be approached.

In this regard:

1. the number of the machine data page (100-299) in which the variablepositions 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 thepositions of tool locations to be entered.

The NC evaluates process parameter Bxx.072 for the runtime and thecorresponding machine data page and uses the highlighted positions tocalculate the absolute magazine positions of the tool storage axis. Aseparate page must be created for every process in multiprocess opera-tion.

Note: Process parameter Bxx.072 appears in the user interface onlyif "Yes" was entered in system parameter A00.052 "Tool man-agement" and in process parameter Bxx.014 "Tool manage-ment".

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 thestructure and definition of the machine data page can be found in the des-cription of process parameter Bxx.072 "Page No. for variable positions" inthe Bosch Rexroth MTC 200/Bosch Rexroth TRANS 200 description ofparameters.

If nonuniform tool pocket distribution has been activated using processparameter Bxx.072 "Page No. for variable positions", the jogging of toolaxes refers to one of the four change positions P1-P4. For more informa-tion, see section "Magazine jogging operating mode in case of variabletool pocket distribution "PxxC.MGJGn"" in the "Bosch Rexroth MTC 200interface description".

Notes:• The nonuniform spacing function is not available when a

combined spindle/revolver axis or PLC-controlled tool sto-rage units are used.

• When nonuniform pocket distribution is activated for NC-controlled tool turrets, parameters Bxx.021-Bxx.024 "Po-sition 1-4" no longer have an effect.

• Only the magazine position approached using a tool sto-rage movement command (e.g. MTP, MMP, jogging) is avalid position (P1-P4) for the tool change.

Tool storage unit movementcommands of NC

(MTP, MMP, MHP, etc.)

Process parameter Bxx.072"Page No. for variable pocket

positions" and correspondingmachine data page

Machine data entries

Effect on jogging the tool axis

Page 281: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-21

DOK-MTC200-NC**PRO*V23-AW01-EN-P

8.3 Tool Changing Commands of the NC

Changing tools between magazine, spindle or gripper is initialized via thetool changing commands of the NC. Using the tool changing commandsis permitted only when magazines are used as tool storage units.

The following figure shows the basic sequence of a tool changing process.

030

#8���1���2

0����

1� 9��

�1�

��M#+

0��MN

��MN

��M8+

�11 �2�2����1��$��I��$�����11 ����$%���1%��78

�11 �2�2�����%1�2$��I��$�����11 ����$%���1%��78

0��

��

��M�+

�11 �2�2��'(�'-$��I��$����11 �����$%��1%��78

3+�

CNC1.FH7

Fig. 8-13: Representation of the principles of a tool change

The following table contains an overview of all tool change commands ofthe NC. The table is followed by a detailed description of commands.

Page 282: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-22 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC tool commands (3) V22_20030218

Function Meaning Description

TCH Complete tool change

Tool Change

Syntax: TCH (POS, SPI)

POS: Position to be moved to

SPI: Spindle

TMS Change tool from magazine tospindle

Tool change from Magazine toSpindle

Syntax: TMS (POS, SPI)

POS: Position to be moved to

SPI: Spindle

TPE Tool pocket empty?

Tool Magazine Pocket Empty

Syntax: TPE

TSE Tool spindle empty?

Tool Spindle Empty

Syntax: TSE

TSM Switch tool from spindle tomagazine

Tool change from Spindle toMagazine

Syntax: TSM (POS, SPI)

POS: Position to be moved to

SPI: Spindle

Werkzeugbefehle_NC3_V22_20030122.xls

Performing a Complete Tool Change "TCH"

Tool Change

(Complete tool change)

TCHTCH(POS)TCH(POS,SPI)

POS <constant><variable>

DIR: <constant><variable>

POS: 1, 2, 3, 4SPI: 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 isproceeding under PLC control.

Optionally, the change position and tool spindle can be declared. If nodata are declared for the change position or tool spindle, tool manage-ment 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.

TCH

Syntax

Expression

Value range

Meaning

Page 283: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Functions to Control Tool Management 8-23

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Change the Tool from the Magazine to the Spindle "TMS"

Tool Change from Magazine to Spindle

TMSTMS(POS)TMS(POS,SPI)

POS: <constant><variable>

DIR: <constant><variable>

POS: 1, 2, 3, 4SPI: 1, 2, 3

Changing tools from position "POS" to spindle "SPI".

The TMS command initiates a tool changing process between the maga-zine locations in position "POS" and spindle "SPI".

The CNC stops program execution while the tool change operation is pro-ceeding under PLC control.

Optionally, the change position and tool spindle can be declared. If nodata are declared for the change position or tool spindle, tool manage-ment selects "Position 1" and "Spindle 1".

Even before "TMS" is called, the magazine pocket containing the toolwhich is to be exchanged must already be in the specified change posi-tion; a tool may not be present in the tool spindle.

This command is needed for single-arm gripper systems or for gripper-less tool changers if the change operation has to be divided into a pick-and-place sequence.

Tool Change from Spindle to Magazine "TSM"

Tool Change from Spindle to Magazine

TSMTSM(POS)TSM(POS,SPI)

POS: <constant><variable>

DIR: <constant><variable>

POS: 1, 2, 3, 4SPI: 1, 2, 3

Changing tools from spindle "SPI" to position "POS".

The "TSM" command initiates a tool change between spindle "SPI" andthe magazine location in position "POS".

The CNC stops program execution while the tool change operation is pro-ceeding under PLC control.

Optionally, the change position and tool spindle can be declared. If no da-ta are declared for the change position or tool spindle, tool managementselects "Position 1" and "Spindle 1".

TMS

Syntax

Expression

Value range

Meaning

TSM

Syntax

Expression

Value range

Meaning

Page 284: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

8-24 NC Functions to Control Tool Management MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Before "TSM" is called, a tool must be present in the tool spindle and themagazine must have an empty location at the specified change position.

This command is needed for single-arm gripper systems or for gripper-less tool changers if the change operation has to be divided into a pick-and place-sequence.

Magazine Pocket Empty? "TPE"

Tool Magazine Pocket Empty

The "TPE" command checks whether the magazine or turret location thatis currently at "Position 1" is empty.

If this is the case, tool management immediately continues program exe-cution. Otherwise, program execution is stopped and an error message isgenerated.

Using this command permits collisions to be avoided when a tool isstored. The command must be used in the storage sequence of the toolchanging subroutine before a movement is performed.

Note: The "TPE" command always refers to the location at "Position 1".

Tool Spindle Empty? "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 exe-cution. Otherwise, program execution is stopped and an error message isgenerated.

Using this command permits collisions to be avoided when a tool isstored. The command must be used in the storage sequence of the toolchanging subroutine before a movement is performed.

Note: The "TSE" command always refers to the location at "Spindle 1".

TPE

TSE

Page 285: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

9 Process and Program Control Commands

9.1 Process Control Commands

The multiple-process structure of the CNC makes it necessary to coordi-nate the individual processes used in the CNC. If more than two proc-esses are present in the CNC, the process with number "0" is generallyused for program coordination. The number "0" process thus handles themanagement function used to coordinate all processes which are involvedin machining. The process control commands are passed to the NC PLCinterface.

Process 0 Process 1 Process 2 Process 3 Process 4 Process 5 Process 6

MTC200 (control station)

MTC200 station 5External

Mechanism27

Mechanism28

ExternalMechanism

29

ExternalMechanism

30

External

31

External

MTC200 station 4External

Mechanism22

Mechanism23

ExternalMechanism

24

ExternalMechanism

25

External

26

External

MTC200 station 3External

Mechanism17

Mechanism18

ExternalMechanism

19

ExternalMechanism

20

External

21

External

MTC200 station 2External

Mechanism12

Mechanism13

ExternalMechanism

14

ExternalMechanism

15

External

16

External

MTC200 station 1External

Mechanism7

Mechanism8

ExternalMechanism

9

ExternalMechanism

10

External

11

ExternalMechanism

Mechanism

Mechanism

Mechanism

Mechanism

���

�1,�

%(

91PROZ.FH7

Fig. 9-1: Processes and external mechanisms of CNC

In addition to the master process, the CNC can control six additional pro-cesses and up to 25 external mechanisms.

Page 286: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-2 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

A master process (process 0) must always be present. This process isresponsible for synchronizing the existing processes and external mecha-nisms, assuming this is necessary. If the system consists of a single sta-tion, the coordination task and the axes are assigned directly to the mas-ter process.

Note: The number and organization of the processes and externalmechanisms is set by the machine builder in the system pa-rameters.

Define Process "DP"The DP command uses an internal signal to inform the PLC that the pro-cess is needed during NC program execution. The PLC uses this infor-mation to initialize process-specific signals.

DP <process> ⇒ DP 2

DP <variable>

Process[0-6] internal processesProcess[7-31] external mechanisms

All other process control commands will not be accepted unless the cor-responding process was previously defined using DP.

• The DP command can be used more than once in an NC block. Anumber of processes can be defined simultaneously in an NC block.

• The definition of a process using DP is canceled at the end of the pro-gram.

Select NC Program for Process "SP"The SP command selects the program having the specified programnumber from the active NC program package for the specified process.The program number corresponds to the number which is stated in theprogram directory for the given process.

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 pro-gram package

The NC program number for the next program which is to be processedcan be selected while a process is still active. The selected program is notactivated until the next reboot.

• The SP command must not be used more than once in an NC block.

Syntax

Syntax

Page 287: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Start Reverse Program "RP"The RP command starts the subroutine which is addressed by the re-verse vector in the declared process. Any forward program which may beactive is interrupted; the currently valid reverse vector addresses thebranch location in the reverse program.

RP <process> ⇒ RP 4

RP <variable>

Process[0-6] internal processesProcess[7-31] external mechanisms

• The subroutine addressed by the reverse vector must be located inthe program in which the reverse vector was programmed.

• The RP command can be used more than once in an NC block. Anumber of reverse processes can be started simultaneously in a sin-gle NC block.

Start Advance Program "AP"Command AP starts the selected advance program in an inactive proc-ess. If the process was already active, then the NC block processing inwhich AP was programmed is interrupted until the process to be started istotally completed. The declared process is then started and NC blockprocessing of the interrupted process is continued.

AP <process> ⇒ AP 1

AP <variable>

Process[0-6] internal processesProcess[7-31] external mechanisms

• The AP command can be used more than once in an NC block. Anumber of forward programs can be started simultaneously in a singleNC block.

Wait for Process "WP"NC block processing of the program which was called is held in the NCblock in which WP is programmed until the process selected in the com-mand parameter has been completed.

WP <process> ⇒ WP 5

WP <variable>

Process[0-6] internal processesProcess[7-31] external mechanisms

Once the process selected in the command parameter is completed, exe-cution of the NC program from which the call was made can continue.

• Process control command WP can be programmed more than oncein a single NC block.

• The WP command should not be programmed within a program sec-tion in which tool path compensation is active. If this proves to be un-avoidable, be certain that it is programmed only between linear blocktransitions.

Syntax

Syntax

Syntax

Page 288: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-4 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: Command WP waits until the process selected has beencompleted. Processes are completed by:

• successful completion of an advance program

• successful completion of a reverse program

• cancellation of the program after control reset (after pro-gram interrupt).

The processing of the WP command does not provide any in-formation about whether the process task has been completedsuccessfully.

Lock Process "LP"The LP command specifies which processes must be in a defined statefor the NC program to be completed. This state must remain intact untilthe NC program is completed.

LP <process> ⇒ LP 4

LP <variable>

Process[0-6] internal processesProcess[7-31] external mechanisms

This command can be used, for example, to specify that a station which isnot needed for machining can be turned off or that it must be in a specificposition 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 byRET, 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 .STARTDP 1 DP 2 Definition of process 1 & process 2SP 1 15 Program preselection, program 15 in process 1SP 2 15 Program preselection, program 15 in process 2RE 1:0 Delete acknowledgement – processing finished

in process 1RE 2:0 Delete acknowledgement – processing finished

in process 2AP 1 AP 2 Start advance program in process 1 & 2WP1 WP 2 Wait until both processes have completed their

programsBER .FEHLP1 1:0 Error handling process, error process 1BER .FEHLP2 2:0 Error handling process, error process 2SP 1 16 Program preselection, program 16 in process 1SP 2 16 Program preselection, program 15 in process 2RE 1:0 Delete acknowledgement – processing finished

in process 1RE 2:0 Delete acknowledgement – processing finished

in process 2AP 1 AP 2 Start advance program in processes 1 & 2WP1 WP 2 Wait until both processes have completed their

programsBER .FEHLP1 1:0 Error handling process, error process 1BER .FEHLP2 2:0 Error handling process, error process 2BST .START Jump with stop to label .START.FEHLP1 Error handling process, error process 1

Syntax

Page 289: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

....FEHLP2 Error handling process, error process 2 ....HOME Branch label for the .HOME programDP 1 DP 2 Definition of processes 1 & 2SP 1 15 Program preselection, program 15 in process 1SP 2 15 Program preselection, program 15 in process 2RP 1 RP 2 Start reverse program in processes 1 & 2WP1 WP 2 Wait until both processes have completed their

programsBST .START Jump with stop to label .STARTPROGRAM END

Note: If no reverse vector has been programmed in the individualprocesses, then a jump to .HOME is performed in the corre-sponding process.

Subprogram 15, process 1 Subprogram 15, process 2

G00 G90 G54 G06 G08 ;Path com-mands

G18 G90 G54 G06G08

;Path com-mands

G00 Y0 Z50 ;Start position G00 X0 Z0 Y70 ;Start position

M03 S1500 ;Spindle ON M03 S1500 ;Spindle ON

G01 X50 Y100 F1000.

;1st mach.position;Machining

G01 X50 Z40 F1500.

;1st 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 com-mands

G18 G90 G54 G06G08

;Path com-mands

X0 Y0 Z30 ;Start position G00 X0 Z0 Y55 ;Start position

M03 S1500 ;Spindle ON M03 S1500 ;Spindle ON

G01 X90 Y150 F1200.

;1st mach.position;Machining

G01 X10 Z110 F2000.

;1st 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 candetermine in the NC program when the process was completed. The POKcommand causes a signal to be sent to the PLC (process-specific).

POK

If the POK command is programmed in process 0, the PLC signal is notset to 1 until all processes defined by means of DP (including the externalmechanisms) have already processed the POK command.

• The signals for the POK command are reset at the end of the pro-gram by RET or BST or by a control reset.

Syntax

Page 290: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-6 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

9.2 Axis Transfer Between Processes "FAX", GAX"

{0><}100{>Certain applications require that the fixed axis assignments tothe processes be canceled and that the axes be divided into a number ofinterpolation groups (processes).

Each NC axis is assigned to a primary process; however, it can also beassigned to up to three different secondary processes. The axis nameand meaning in the coordinate system is the same for all processes inwhich the axis is enabled. In addition, different axes having the samename can be called from different processes.

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 pa-rameter.

GAX (<process>:<axis name>) ⇒ GAX (1:Y)

• The primary process must always be stated when specifying the pro-cess for the GAX command. If the axis is called from the primary pro-cess 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 cur-rently located and is called by a different process frees the axis. The pro-cess which gets the axis (GAX) must wait until the other process frees theaxis (FAX). Likewise, the process which frees the axis waits until a differ-ent process gets the axis. This prevents the axis from assuming a "lost"state.

Transferable axes are displayed in the position display of each process inwhich they can be present.

If a transferable axis is located in the indicated process, the complete axisdata set is displayed for this axis. On the other hand, if the axis is cur-rently assigned to a different process, two dashes are displayed instead ofthe position and speed data.

• All axes in the CNC – with the exception of the magazine and turretaxes – can be transferred between the processes.

• The transfer from one process to another can only take place at anNC block transition. NC block processing is stopped and is not con-tinued until it is certain that the override value for the new process isactive for the axes.

• Rotary and linear axes can be transferred between processes onlywhen they are stopped.

• Spindles can also be transferred between the processes at the speci-fied 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 afterthe axis is transferred to a secondary process. Thus, axis errors andtheir diagnostic messages are displayed in the primary process.

• All axes belonging to a different primary process are freed at the endof the program by RET ,M02, M30 or BST or by a control reset and byjogging axes in setup mode; all axes in a different process are re-quested (get).

Note: The machine builder specifies the processes between which aNC axis can be transferred in the axis parameters.

Syntax

Page 291: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 identi-cal, the machine operator wants to be able to use the same NC pro-grams. 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" arestarted simultaneously by pressing the NC start key.

• Process 1 manages the rotary table (B axis) on the right side and ei-ther frees or gets the B axis as needed. Process synchronization isestablished by means of the programmed NC events.

• Process 2 manages the rotary table (B axis) on the right side andeither frees or gets the B axis as needed. Process synchronization isestablished by means of the programmed NC events.

The necessary initializations and the corresponding reverse program arenot shown in the NC program. If the NC program is interrupted, variousmechanisms and initializations would be needed to obtain a defined state.

3

64

& &

������H*��.

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 branchloop

BEARB Label for branchloop

FAX (B) Enable B-axis FAX (B) Enable B-axisWES 9 Wait until B-axis is in

P0WES 9 Wait until B-axis is in

P0RE 9 RE 9GAX (B) Get B axis if it

has been freed inmachining p.

GAX (B) Get B axis if ithas been freed inmachining p.

BER .BEARB 10 Loop until machiningin P0 is complete

BER .BEARB 10 Loop until machiningin P0 is complete

RE 10 RE 10RET RET

Page 292: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-8 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Process 0 - Processing

RE 1:10RE 2:10T1 BSR .M6[right side]GAX (1:B)SE 1:9

WER 1:9BSR .BET1[left side]GAX (2:B)SE 2:9

WER 2:9BSR .BET1T2 BSR .M6[right side]GAX (1:B)SE 1:9

WER 1:9BSR .BET2[left side]GAX (2:B)SE 2:9

WER 2:9BSR .BET2 SE 1:10SE 2:10T0 BSR .M6RET.BET1G00 G54 G90 X0 Y0 Z100 B0

M03 S1000

;machining

M05FAX (B)RTS.BET2 RTS

Reset events for jump loops in process1 + 2Tool change, 1st tool

Get B axis from process 1Process 1 is interrupted up to this NCblockWait until process 1 is synchronousProcess right side

Get B axis from process 2Process 2 is interrupted up to this NCblockWait until process 2 is synchronousProcess left sideChange tool, 2nd tool

Get B axis from process 1Process 1 is interrupted up to this NCblockWait until process 1 is synchronousProcess right side

Get B axis from process 2Process 2 is interrupted up to this NCblockWait until process 2 is synchronousProcess left side

End jump loops in processes 1 + 2.

Program endProcess program, 1st toolPath commands, interpolation condi-tions

Release B axisProcess subroutine 1 endProcess program 2nd tool

Process subroutine 2 end

End of programMachining program of 1st toolMotion commands, interpolation condi-tions

Enable B-axisEnd of machining subroutine 1Machining program of 2nd tool

End of machining subroutine 2

Page 293: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

9.3 Program Control Commands

Program End with Reset "RET"The RET command identifies the end of an NC program. The RET com-mand acts like functions M002/M030; however, an auxiliary function is notpassed on to the PLC. When the RET command is performed, process-ing branches to the first NC block in the active NC program, sets the se-lected functions for the power-on state, and waits for a start signal. Tooledge E1 is selected. After the RET command has been performed, thecurrent reverse vector points to branch label .HOME.

RET

After the RET command is performed, all subroutine levels and their re-verse vectors are cleared and the controller is in the initial state of themain program level.

• In terms of its function, RET is comparable to the M002/M030 func-tions defined in DIN 66025.

Branch with Stop "BST"The BST command branches to the branch label which is set in thecommand parameter, sets the path conditions of the power-on state andwaits for a start signal. After a BST, the current reverse vector points tothe branch label .HOME.

BST <branch label> ⇒ BST .HALT

After a BST command, all subroutine levels and their reverse vectors arecleared and the controller is in the initial state.

• The BST command cannot be used within a subroutine. The branchfrom the subroutine will result in an error message.

Programmed Halt "HLT"The HLT command interrupts program execution and waits for a newstart signal. The HLT command acts like function M000; however, anauxiliary function is not passed on to the PLC.

HLT

If a message is to be output for the HLT command, note that the mes-sage must already be programmed in an NC block before the HLT com-mand. The reason for this is that the HLT command is executed ahead ofa 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 commandparameter and continues program execution there.

BRA <branch label> ⇒ BRA .WEITER

Syntax

Syntax

Syntax

Syntax

Page 294: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-10 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Jump to Another NC Program "JMP"The JMP jump command jumps to the NC program number set in thecommand parameter and continues program execution in the first NCblock of this new NC program.

JMP <program number[1-99]> ⇒ JMP 50

JMP <variable> ⇒ JMP @100

The jump can go to any desired NC program in the active NC programpackage. The reverse vectors are not changed by a jump to a differentNC program.

9.4 Subroutines

Subroutine TechniqueWhen workpieces are being machined, it is sometimes necessary to re-peat a given operation a number of times. This operation could be pro-grammed as a subroutine so that similar processing sequences could becalled up repeatedly. This subroutine could be called from any point in theNC machining program as a complete function module.

Subroutines are organized in the CNC based on the following structure.

�� �� ����� �'���(�)

�� ��(+� �'���(

�� �� ����� ���

�� �� ����� ��'���(�,

������ ��� ����

��������� ��� ���� !"��� ���!�# " ��

� �����

!"��� �� �����

$� ���%�� ����!��������� �

&�����# '�� ����!�(����� &���! �T�

��������� ����!�%�� �

# " �� �� ����� ������ ��� ���

3NCORG.FH7

Fig. 9-3: Program organization for CNC

Subroutines which are specific to the NC program are programmed in thecurrent NC program. Subroutines which are specific to the NC packageare programmed in the program using number 99. They can be calledfrom any NC program in the package. Subroutines and process cyclesare programmed in program 0 "Cycle Memory". These NC cycle pro-grams can be called from any NC memory, process, and NC programpackage.

Syntax

Page 295: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Subroutine StructureA subroutine consists of the:

• start of the subroutine,

• NC blocks of the subroutine, and

• end of subroutine

.LABEL Start of subroutine

NC blocks NC blocks in subroutine

RTS End of subroutine

Fig. 9-4: Subroutine structure

In terms of syntax, the jump label begins with a decimal point followed byat least one and no more than six legal characters. The syntax is NOTcase sensitive. The "∗" sign following the decimal point is reserved forBosch Rexroth fixed cycles.

Subroutine NestingA subroutine can be called up from an NC program as well as from a dif-ferent subroutine. This is referred to as "subroutine nesting."

The CNC allows 10 subroutine nesting levels. This means that subrou-tines can be nested no more than 9 levels in depth.

���������++�&�:�+��4

���������

&�#�*�#

����

���������������

#+� #+�

� � � � � A 7 � �

*�#

&�#�*�#�

*�#�

&�#�*�#�

*�#�

&�#�*�#-

*�#-

&�#�*�#2

*�#2

&�#�*�#:

*�#:

&�#�*�#.

#+� #+� #+� #+�

*�#.

&�#�*�#/

#+�

*�#/

&�#�*�#�

#+�

*�#�

#+�

��.

$'(�

�%(

95USCHA.FH7

Fig. 9-5: Subroutine nesting

Jump to NC Subroutine "JSR"The JSR command jumps to the NC program number set in the commandparameter and continues program execution in the first NC block of this newNC program. In contrast to the JMP command, the called NC program returnsto the NC program from which it was called after the RTS command has beenexecuted. This allows entire NC programs to be used as subroutines.

JSR <program number[1-99]> ⇒ JSR 15JSR <variable> ⇒ JSR @25

The jump can go to any desired NC program in the active NC programpackage. The reverse vectors are not changed by a jump to a differentNC program.

Syntax

Page 296: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-12 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Subroutine Call "BSR"The BSR command branches to the label set in the command parameterand continues program execution there.

BSR <label> ⇒ BSR .UP1

After the return from a subroutine called using the BSR command via theRTS 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 RTScommand is finished, processing returns to the NC program from whichthe call was made, and NC block processing is continued in the NC blockfollowing BSR or JSR.

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 gen-erated.

#+�

&�#�*�#

&�#�*�#

&�#�*�#

��

��

��#8+

�*�#

�:$���*��.

96URUF.FH7

Fig. 9-6: Subroutine call

Syntax

Syntax

Page 297: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

9.5 Reverse Vectors

The CNC permits flags to be defined for reverse programs based on vari-ous program states relating to certain machine positions. These with-drawal programs (reverse programs) are used to program how the NCaxis must withdraw from the various positions and return to a definedstate. 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 mainprogram after the controller is started. This basic reverse vector must bepart of every NC program (or it must be present in program No. 99 or inthe NC cycle memory), and it must mark the beginning of the basic re-verse program.

After each end of program via RET or BST and each time after the con-troller is reset in the power-on state, the reverse vector in the main pro-gram points to the label ".HOME", and all reverse vectors in the subrou-tines are cleared.

Set Reverse Vector "REV"The NC block containing the label defined as the command parameter isdefined as the first NC block in the reverse program – in other words, areverse program would start processing at this label beginning at the NCblock.

REV <label> ⇒ REV .HOLE1

Reverse vectors can also be defined within subroutines. Such reversevectors in subroutines have the same nesting structure in the reverseprogram as in the advance program. Reverse programs from subroutinesmust also be terminated by the RTS command.

• When a subroutine is closed, the reverse vectors set up in the sub-routine are automatically cleared.

• A reverse vector programmed in an NC block will not be activateduntil the end of NC block execution.

• The label programmed in conjunction with REV must be located in theNC program in which the REV command was programmed. The REVcommand will not find the label in the global program identified bynumber 99 or in the NC cycle memory.

Example: NC program - global homing program

.HOME Basic reverse vector

MRF Reference tool magazine

D0 Cancel D corrections

G40 G47 G53 G90 Home

G74 Z0 F1000 Go to Z axis reference point

G74 X0 Y0 F1500 Go to X and Y axis reference point

T0 BSR .M6 Tool from spindle to magazine

MRY Wait until magazine is in position

RET Program end

Syntax

Page 298: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-14 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

���C2�C7���

���C2�C2�

�C2�C2�

�� �� �����

1���1���12-�37����62��4����#85 �*(32��#85 �*(�4�&�#�*&�A#3.2&�#�*&�A#����******(��

��������� *&�A#�#85 �*$1��4�1�47���F/��1��4�#+�

# " �� �5 ��� �� �$

*$1���4��#+�

# " �� �5 ��� �� �(

*(�1���4���*(1���37����62��4����#8+

���&�#�*A�(8����� �!����#8+

1���� ��A� ���

*A�(8���******#8+

�.# " ��*��.

6

��

97REVERS.FH7

Fig. 9-7: NC machining using reverse vectors

Note: All reverse vectors (REV) are cleared upon a control reset.The branch label of the reverse program points to the basicreverse vector .HOME.

The NC blocks that are defined by the reverse vectors (REV)are no longer processed. Merely the NC blocks of the basicreverse vector .HOME are considered.

Example:

; Tool change program.M6; install new tool?.M6_TOL@0:00=TLD(,0,1,1,0,5,) Read tool no. spindle 1@0:00=@0:00-T BEQ .M6_T0 Must tool be changed?; Magazine positioningBTE .M6_BAC T0 programmed ?MTP move to programmed locationBRA .M6_TCH.M6_BACMFP Move to free location; Tool change.M6_TCHG40 G47 G53 G90 M9 tool offset OFF, machine zero

point, absolute measureSE 0:15G0 Z392 M19 S90 MRY REV .RM6_2 Z axis and spindle in changing pos.Q1 REV .RM6_3 Close gripperQ2 REV .RM6_4 Release tool

Page 299: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-15

DOK-MTC200-NC**PRO*V23-AW01-EN-P

TMS REV .RM6_5Q7 REV .RM6_6 Extend gripperQ3 REV .RM6_7 Rotate gripperQ8 REV .RM6_8 Retract gripperQ6 REV .RM6_9 Spindle clamp

closedQ5 REV .RM6_10 Open gripperRE 00:12:00 Transfer: G1 → Spindle,

G0 → Mag.TSM REV .RM6_12RE 0:15BTE .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 Turn arm back.RM6_5 Q8 Retract gripper.RM6_4 SE 0:12 Transfer. G1 → mag.

G0 → spindleTSM.RM6_3 Q6 Clamp closed.RM6_2 Q5 Open gripperRTS.RM6_7 Q8 Retract gripper.RM6_8 Q6 Clamp closed.RM6_9 Q5 Open gripper.RM6_10 RE 0:12TSM.RM6_12 BTE .M6_T0G48 [ ] RTSRTS

Consistent reverse vector programming permits errors that occur duringprogram execution to be taken into account.

For example, if a malfunction occurs while processing a Q function, themachine is returned to a non-critical state using the reverse vectors.

This is no longer possible once the reverse vectors have been cleared bya control reset.

• Remedy:

In these situations, clearing the reverse vectors by control reset mustbe prevented.

This is possible using an event (here: event 0:15) and its nesting in thePLC program.

A control reset is not possible as long as the event is set (during the exe-cution of the Q functions). A control reset is possible only after the eventhas been reset.

Page 300: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-16 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: If, in exceptional situations, a control reset is possible even afteran event has been set, the event can manually be reset via theuser interface.

This enables the machine manufacturer to distinguish betweenauthorized and non-authorized end users.

With tool changers, updating tool management must be en-sured.

9.6 Conditional Branches

Conditional branches are not performed unless the corresponding condi-tion is met. If this condition is not met, the program continues executionstarting at the following NC block.

Branch if Spindle is Empty "BSE"The BSE branch command can be used to determine whether or not thespindle is empty.

BSE <label> ⇒ BSE .SPLE

If the 1st spindle is empty, program execution is continued from thebranch 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 se-lected, in other words, whether the tool must be removed from the spindlewithout loading a new tool into the spindle.

BTE <branch label> ⇒ BTE .PRT0

If T0 was programmed last, program execution continues at the branchlabel defined in the command parameter.

Branch upon Reference "BRF"The BRF branch command can be used to determine whether the NCaxes in the CNC are located at their reference points.

BRF <branch label> ⇒ BRF .NORE

If the NC axes are properly referenced, program execution continues atthe 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 thedeclared branch label if the event defined in the command parameter isset.

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 tothe addressed branch label is executed if at least one event in thespecified process is set.

• The PLC program can also influence events. Therefore, please refer to the machine builder's information since thebuilder may have used various events for synchronization purposes.

Syntax

Syntax

Syntax

Syntax

Page 301: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Process and Program Control Commands 9-17

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Branch if NC Event is Reset "BER"The BER branch command is used to continue program processing at thedeclared branch label if the event defined in the command parameter isreset.

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, processingbranches to the addressed branch label if all the events in the speci-fied process are reset.

• The PLC program can also influence events. Therefore, please refer to the machine builder's information since thebuilder may have used various events for synchronization purposes.

9.7 Branches Depending on Arithmetic Results

Branches which depend on arithmetic results relate to the results of themost recently performed arithmetic operation.

Branch If Equal to Zero "BEQ"Branch command BEQ is used to continue program execution at thespecified branch label if the result of the most recent mathematical opera-tion was equal to zero.

BEQ <branch label> ⇒ BEQ .ZERO

Branch If Not Equal to Zero "BNE"Branch command BNE is used to continue program execution at thespecified branch label if the result of the most recent mathematical opera-tion was not equal to zero.

BNE <branch label> ⇒ BNE .NZERO

Branch If Greater Than or Equal to Zero "BPL"Branch command BPL is used to continue program execution at thespecified label if the result of the most recent mathematical operation wasgreater than or equal to zero (PLus).

BPL <branch label> ⇒ BPL .GZERO

Branch If Less Than Zero "BMI"Branch command BMI is used to continue program execution at thespecified branch label if the result of the most recent mathematical opera-tion was less than zero (MInus).

BMI <branch label> ⇒ BMI .LZERO

Syntax

Syntax

Syntax

Syntax

Syntax

Page 302: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

9-18 Process and Program Control Commands MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Overview Table@10=A-B @10=B-A

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 ormissing functions when BEQ or BNE is used if the arithmeticresults are decimal fractions.

WARNING

Incorrect program jumps may lead to damage toworkpiece and/or machine.

Example:

@10 = 51.8 -50-1.8 BEQ .label (result=0)does not work!

• Remedy:

Depending on the resolution, e.g. 0.01, convert into an integer expression:

@10=INT((51.8-50-1.8)•1000) BEQ .label works!

Example: NC program Loop construction

@51=0 Preassign the loop variables.NEXT Loop beginning marker@51=@51+1 Increment loop variable@10=DCD(,1,@51) Read D correction 1 element=@51@10=@10-25 BEQ .BREAK If D correction 1

element=25, then exit the loop@10=@51-4 BMI .NEXT Check loop variable if loop conditions are

still given. [no element of D correction 1has the value 25] Output messageM00 Acknowledge programmed halt from PLCBRA .EXIT Branch to the program end.BREAK Loop exit label [one element of D correction 1has the value 25] Output messageM00 Acknowledge programmed halt from PLC.EXIT End-of-program labelM30 Acknowledge program end from PLCRET

Page 303: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

10 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 pro-gram or from the user interface; the value of the NC variable can be readaccordingly by these programs or by the user interface.

NC variables are identified

• by the address @,

• 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 theCNC. In theory, a total of 1792 variables are available in the CNC that canbe used regardless of how many processes are defined.

Note: Variables @100 through @199 and @236 through @248 arealready used in the Bosch Rexroth cycles. If the user employsthese variables, they may be overwritten by those cycles.

@ <process number[0-6]>:<variable number[0-255]> ⇒ @1:100

If the process number is not assigned, then the variable relates to theprocess in which the variable was programmed.

@ <process number[0-6]>:<variable number[0-255]>

=<arithmetic expression> ⇒ @1:100=5*100

Note: The internal data representation of a value employs the "dou-ble real" format. The value range for entries goes from -1.0E±300 to +1.0E±300. Only values with a maximum of 7 posi-tions can be programmed in the NC program ("single real"format).

.123456789123456

123456789123456

15E+20

90E-10

If the content of an NC variable is to be negated, the NC variable must beplaced within parentheses.

X=-(@20)

@12=-(@19)

-(@57)=@58

@23=X

Note: Irrespective of the display mode (workpiece or machine coor-dinate system), machine coordinates are always output whenaxis values are read.

Syntax

Syntax for assigning a value to avariable

Syntax for representing the data

Syntax for negating the contentsof a variable

Page 304: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Variable AssignmentThe values of the following addresses can be assigned to the NC vari-ables of the CNC, or the following values from the CNC addresses can bewritten into the NC variables.

The machine coordinates are read into the NC variable when the coordi-nate 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], W[1-3]

@10=X Write the X axis position value to the NC variable.X1=@20 X1 axis to the position stored in the NC variable.

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 valuescan be defined, such as G04 F=@9 for a dwell time.

Valid address: F

@24=F Write active feed rate to the NC variable.F=@25 F value via the contents of the NC variable.

Valid addresses: S, S[1-3]

@26=S Write current spindle speed to the variable.

S1=@27 Spindle speed information via the contents of the NC variable.

Only angle of rotation P of the coordinate rotation can be read. With thread cutting, the starting angle P cannot be read.

Valid address: P

G50 Z30 P=@29 Angle of rotation P via contents of the variables.

Valid address: SPC

@220=SPC Read actual spindle for the transformation

SPC=@221 Define the reference spindle for the transformation.

Valid address: SPF

@22=SPF Read actual reference spindle for programming the speed.Read spindle speed

SPF=@23 Set reference spindle for programming the speed.

Coordinate values of existingaxes

Interpolation parameters

Radius

Feed rate

Spindle speed

Angle

Selecting the reference spindlefor transformation

Selecting the reference spindlefor the spindle speed

Page 305: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Valid address: SPT

@224=SPT Read actual tool spindle.

SPT=@225 Define actual tool spindle.

Valid address: ACC

ACC=@211 Acceleration factor via the contents of the NC variable.

Valid address: T

@212=T Write current tool number to the variable.

T=@213 Valid address:

Valid address: E

@214=E Write current tool edge number to the variable.

E=@215 Tool edge selection via the contents of the NC variable.

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.

Valid address: O

O=@217 Select zero offset table via the contents of the NC variable.

@218=O Read active zero offset table.

The active auxiliary function "Q" cannot be read.

Valid address: Q

Q=@219 Output of auxiliary Q function via the contents ofthe 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 vari-able.

Valid address for reading: G(<G code group[1-23]>)Valid address for writing: G = expression

Selecting the tool spindle

Acceleration factor

Tool number

Tool edge number

Effective distances

Zero offset table

Auxiliary function

D correction

G functions

Page 306: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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

G04G33G50, G51G63, G64G74G75 G76G77G92G93

161616161616161616

blockwiseblockwiseblockwiseblockwiseblockwiseblockwiseblockwiseblockwiseblockwise

Dwell timeThread cuttingProgrammed zero offsetTappingHomingMove to positive stopRepositioning and restartingSpindle speed limitationTime 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 inwhich they were programmed. Otherwise a value of "1" is generated whenthe blockwise active G functions are read.

@27=G(4) Write active G function of group 4 to the NC variable.G=@28 Set a G function via the contents of the NC variable.

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

M functions

Page 307: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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, M311 10 modal Clamp & unclamp S3

M040, ..., M045 11 modal Gear selection S

M140, ..., M145 11 modal Gear selection S1

M240, ..., M245 12 modal Gear selection S2

M340, ..., M345 13 modal Gear selection S3

M046, M047 14 modal Spindle override

M048, M049 15 modal Feed override

M019, ..., M319,Mxxx

16 blockwise S positioning & MH-FMachine-specific functions

Fig. 10-2: M functions

The blockwise active M functions can be read only in the NC block inwhich they were programmed. Otherwise a value of "1" is generated whenthe blockwise active M functions are read.

@29=M(13) 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.

10.2 Angle Unit for Trigonometric Functions "RAD", "DEG"

The arguments of the trigonometric functions "SIN," "COS," "TAN" and theresults of the inverse functions of these trigonometric functions "ASIN,""ACOS," "ATAN" can be stated or calculated in the unit "radians" as a frac-tion or multiple of the circumference of the unit circle (radius = 1), as well asin the unit "degrees."

RAD

DEG

• The unit RAD is the power-on condition and is modally active until theunit DEG overwrites it. G98 is reset automatically at the end of theprogram (RET) or by the BST command.

Syntax

Page 308: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

10.3 Round Distance "RDI"

In the axis filter, an axis positioning windows delimits the maximumrounding distance RDI (Round distance). The RDI value defines themaximum distance to the programmed data point for the start of therounding process. (Also see the section "Motion blocks – rounding of NCblocks")

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 formula

@195=RDI ;reading of the currently effective RDI value

The process of rounding block transitions is modally enabled for the cur-rent 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 blockto 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 overwrittenwith another value. RDI is automatically reset to the default state at theend of the program (RET), using the BST command or control reset.

10.4 Mathematical Expressions

The assignment of an expression is initiated by an equal sign and is ter-minated by a space or the end-of-line character.

• Within an expression, a space is interpreted as the end of the expres-sion, which therefore leads to premature termination. The followingtext 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 resumeduntil the expression is fully calculated. This means that traverse move-ments are stopped at the programmed end point and that steps toachieve smooth block transitions (G06, G08) do not take place.

Expressions are comprised of:

• operands

• operators

• parentheses

• functions.

Examples: expressions

@200=X+SQRT(2)*SQRT(X*X+Z*Z)

F=0.1*PI*800

@201=TAN(@200)

@202=SQRT(@200)+F

@203=@205+@206/@207-50

Syntax

Page 309: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

OperandsOperands can be:

• constants,

• system constants,

• variables,

• address letters, and

• functions.

Floating decimal point constants can be comprised of the following ele-ments:

• 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, thedecimal point or the exponent sign must be present.

Example: valid floating-decimal-point constants

-0.+123456.1E0-123456E+10.1E-00+100.000E12

The numerical decimal value statement is interpreted as an integer con-stant, both without the decimal point and without the exponent. Integerconstants can optionally consist of a sign and up to ten decimal digits.

Example: valid integer constants

-01+1234567890

The circle number "PI" (3.14159265...) and the conversion factor from theinch system to the metric "KI" system (25.4) are available for use as systemconstants which are programmed using their symbolic names. Because oftheir higher internal accuracy, these constants should always be used.

OperatorsThe standard symbols for basic mathematical operations can be used asoperators.

+ Addition

− Subtraction

∗ Multiplication

/ Division

% Remainder of an integer division (modulo)

• Division by 0 will cause an error.

• Higher-order operations are implemented by functions.

Constants

System constants

Page 310: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

ParenthesesTo nest expressions and circumvent the integrated principle "multiplica-tion/division before addition/subtraction", partial expressions can beplaced within parentheses. The number of nesting levels is unlimited.

FunctionsThe CNC provides the following mathematical functions:

ABS Absolute valueINT Integer componentSQRT Square rootSIN SineCOS CosineTAN TangentASIN Arc sineACOS Arc cosineATAN Arc cotangentE^ Power to the base "e"10^ Power to base 102^ Power to base 2LN Logarithm to the base "e"LG Logarithm to the base 10LD Logarithm to the base 2TIME Time in seconds

The mathematical functions enclose their operands in parentheses. Theoperands used in functions can also be expressions – in other words, thefunctions can be nested.

The absolute value function delivers the positive value of its operand.

x < 0: ABS(x) = xx = 0: ABS(x) = 0x > 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) ⇒ 1INT(1.01) ⇒ 1INT(-2.99) ⇒ -2INT(-2.01) ⇒ -2

The SQRT function produces the square root of its operand.

Example:

SQRT(2) ⇒ 1.4142…The SQRT function does not permit any negative operands.

The operand for the SIN function is interpreted depending on which angleunit is set (RAD, DEG).

Value range: -1 ⇐ SIN(x) ⇒ +1

Absolute value - ABS

Integer - INT

Square root - SQRT

Sine - SIN

Page 311: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

RAD SIN(PI/6) ⇒ 0.5

DEG SIN(30) ⇒ 0.5

The operand for the COS function is interpreted depending on which an-gle unit is set (RAD, DEG).

Value range: -1 ⇐ COS(x) ⇒ +1

Example:

RAD COS(PI/6) ⇒ 0.866…

DEG COS(30) ⇒ 0.866..

The operand for the TAN function is interpreted depending on which an-gle 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 orless than or equal to +1.

When the angle unit ”radians” is set:

Value range: -π/2 ⇐ ASIN(x) ⇐ +π/2

Example:

ASIN(0.5) ⇒ 0.523… = (π/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) ⇒ 1.047.. = (π/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

Cosine - COS

Tangent - TAN

Arc-sine - ASIN

Arc cosine - ACOS

Arc tangent - ATAN

Page 312: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example

ATAN(-1) ⇒ -0.785… = (-π/4)

When the angle unit "degrees" is set:Value range: -180 ⇐ ATAN(x) ⇐ +180

Example:

ATAN(-1) ⇒ -45

Example:

E^(-2.5) ⇒ 0.082...

Example:

10^(3) ⇒ 1000

Example:

2^(8) ⇒ 256

The operand for the LN function must be greater than zero.

Example:

LN(10) ⇒ 2.302...

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 to2 milliseconds. This time can be used to determine time differences.

Example

@50=TIME Determine active time..@60=TIME-@50 Determine time difference

The TIME function does not have an operand.

Time recording starts when the controller is powered up and runs for ap-prox. 50 days.

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

Page 313: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: NC program - subroutine programming

��

-�

:�

/�

��

�� -� :� /� �� 0

2

�� -� :� /�

U���G��

U��G2�

#G2U���G2

�# ���*��.

101RECHT.FH7

Fig. 10-3: Rectangle as subroutine

NC program:

T4 BSR .M6 Tool change

G00 G54 G06 G08 X160 Y80 Z10 Start position

G01 Z-10 F1000 Infeed Z axis

G42 X135 Y80 F1500 Establishment of tool pathcompensation

@200=90 @201=50 @202=5 @203=1200 Preassign variables

BSR .RE1 Subroutine call

G90 G00 Z10 Z axis to safety distance

G40 G01 X160 Y110 Removal of tool path com-pensation

T0 BSR .M6 Store tool

RET Program end

.RE1 "Rectangle" subroutine

G01 G91 F=@203 Incremental, set feed

X=-(@200) 1st straight line in X

G03 X=-(@202) Y=-(@202) J=-(@202) 1st ¼ circle

G01 Y=-(@201) 1st straight line in Y

G03 X=@202 Y=-(@202) I=@202 2nd ¼ circle

G01 X=@200 2nd straight line in X

G03 X=@202 Y=@202 J=@202 3rd ¼ circle

G01 Y=@201 2nd straight line in Y

G03 X=-(@202) Y=@202 I=-(@202) 4th ¼ circle

G01 X=-(@201/50) Traverse X axis until clear

Y=@201/10 Traverse Y axis until clear

RTS End of subroutine

Page 314: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 315: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

11 Enhanced NC Syntax (NC Control Structures)

11.1 Overview

As of version 19, the NC syntax has been expanded by the following controlstructures:

• IF-ELSE

• FOR

• WHILE

• REPEAT-UNTIL

• SWITCH-CASE

• CONTINUE

• BREAK

One instruction can be programmed for each NC block line. In turn, acontrol structure can contain an instruction or a block of instructions. Ablock of instructions is bracketed by "{" and "}". An NC block according toDIN 66025 is valid as an instruction.

Example

N0001 IF(@10>X) ;control instruction

N0002 Y100 F100 ;instruction if condition is met

N0003 ELSE

N0004 { ;instruction block if condition is not met

N0005 Y=@10 ;condition

N0006 G04 F100

N0007 }

The NC program itself can now consist of an instruction or a list of in-structions. 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 in-structions.

Note: Writing style in syntax description:

The character sequence "\n" in the syntax description meansthat a line feed must occur at this point. The characters them-selves may not be entered.

Page 316: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

11.2 Conditions of the Control Structures

The control instructions are controlled by conditions. A condition consistsof a logical expression.

Example

N0001 FOR(@10=0,@10<100,@11*0.1 )

N0002 X=@10 F100

N0003 ...

The X axis is moved from @10=0 to 100 with an increment of @11*0.1.The condition of termination can be located in the middle section of theFOR-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)

(@10 < @11*10 && @100 != G(1) )

(TLD(,0,1,2,0,5,)==1)

(!(@10<@1 && @12>100))

Note: Assure that no blank character is before the "(" character; other-wise the bracket expression will be interpreted as a comment.

The priority of the operations is defined by the sequence of the syntaxrules and rises from top to bottom, meaning that the operation "!" isstronger than the operation "||".

Examples for valid conditions

Page 317: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

11.3 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

Block instruction = "{" "\n" {instruction} "}" "\n".

11.4 IF Instruction

The following instruction is performed only if the condition is met. TheELSE branch is optional and is alternatively performed if the condition isnot met. Nested IF instructions are solved from the inside out.

Note: The maximum boxing depth of IF instructions may not exceeda number of 15.

Example

N0001 IF(@10<100) ;1st IF instructionN0002 IF(@11>10) ;2nd IF instructionN0003 Y=100N0004 ELSE ;ELSE of the 2nd IF instructionN0005 IF(@11<100) ;3rd IF instructionN0006 Y=200N0007 ELSE ;ELSE of the 3rd IF instructionN0008 Y=300 ;End of the 3rd ,2nd and 1st IF instructionN0009 X100 Z200

IF instruction = "IF" "(" condition ")" "\n"

Instruction ["ELSE" "\n"

instruction].

Syntax description:

Syntax description:

Page 318: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

11.5 FOR Instruction

The FOR loop repeats the instruction until the condition for termination ismet. The loop variable is initialized at the beginning of the instruction; oneach loop, it is incremented according to the pitch.

Example

N0001 FOR(@10=0,@10<=100,0.1)

N0002 X=@10 Z=@10*0.25

The positions X 0.0 Z 0.0, X 0.1 Z 0.025, ... ,X 100 Z 25 are fed sequen-tially.

FOR instruction = "FOR" "(" variable "," condition "," pitch ")" "\n" instruction

11.6 WHILE Instruction

The WHILE instruction repeats the following instruction until the conditionis met.

Example

N0001 WHILE( @10>0 )N0002 {N0003 @12=@12+@10 X@12 Y@10N0004 @10=@10-1N0005 }Blocks N0003 and N0004 are repeated until @10=0 is met.

WHILE instruction = "WHILE" "(" condition ")" "\n" instruction.

11.7 REPEAT-UNTIL Instruction

The REPEAT-UNTIL instruction repeats the embedded instructions untilthe UNTIL condition is met.

Example

N0001 REPEAT

N0002 ....

N0011 UNTIL(@10>100 || @12==@11 )

The block enclosed by REPEAT-UNTIL is executed at least once and isrepeated until @10>100 or @12=@11.

Note: There must not be any blanks between UNTIL and (condition).Blanks are reported as format errors during the download.

REPEAT instruction = "REPEAT" "\n"

{ instruction }

"UNTIL" "(" condition ")" "\n".

Syntax description:

Syntax description:

Syntax description:

Page 319: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

11.8 CONTINUE Instruction

The CONTINUE instruction continues processing with the next loop run.The loop counter is incremented within the FOR instruction and then thecondition is checked. With the WHILE and UNTIL instructions, processingcontinues after checking the condition.

Example

N0000 @100=10N0001 WHILE( @100 > 0 ) ;Repeat as long as @100>0N0002 { ;Block beginningN0003 @100=@100-1 ;Decrement loop counterN0004 IF( OTD(,,@100,4,0) == 0 ) ;Offset in offset table = 0?N0007 CONTINUE ;Yes, address next bankN0010 BSR .CONTOUR ;Machine contourN0011 } ;End of the WHILE instruction

CONTINUE instruction = "CONTINUE" "\n"

11.9 BREAK Instruction

The BREAK instruction interrupts a loop.

Example

N0001 FOR(@1=0,@1<10,1) ;Repeat from @1=0-@1=9

N0002 {

N0003 BSR .TSTPOS ;Subroutine

N0004 IF(@0==0) ;Termination of the loop

N0005 BREAK ;at @0=0

N0006 BSR .KONTUR

N0007 } ;End of the FOR instruction

BREAK instruction = "BREAK" "\n"

11.10 SWITCH Instruction

The SWITCH instruction permits the programming of a branch/jump dis-tributor. A branch/jump to a CASE label is performed depending on thevalue of the SWITCH expression. Multiple CASE labels may be locatedbefore an instruction block. A branch/jump is performed after an instruc-tion block and at the end of a SWITCH instruction. If none of the CASElabels are correct, a branch/jump to the DEFAULT label is performed. Ifthe DEFAULT label does not exist here, then a branch/jump is performedto 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

Syntax description:

Syntax description:

Page 320: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

11.11 Conditions of the Control Structures

The control instructions are controlled by conditions. A condition consistsof a logical expression.

Example

N0001 FOR(@10=0,@10<100,@11*0.1 )N0002 X=@10 F100N0003 ...

The X axis is moved from @10=0 to 100 with an increment of @11*0.1.The condition of termination can be located in the middle section of theFOR 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)

(@10 < @11*10 && @100 != G(1) )

(TLD(,0,1,2,0,5,)==1)

(!(@10<@1 && @12>100))

Note: Assure that no blank character is before the "(" character; oth-erwise the bracket expression will be interpreted as a com-ment.

The priority of the operations is defined by the sequence of the syntaxrules and rises from top to bottom, meaning that the operation "!" isstronger than the operation "||".

N0008 G30 C0 F200 ;switch off transformation

N0009 }

SWITCH instruction = "SWITCH" "(" math. expression ")" "\n""{" "\n"{{ "CASE integer number ":" "\n" }{ instruction }}[ "DEFAULT" ":" "\n"instruction ]}" "\n"

Examples for valid conditions

Syntax description:

Page 321: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

11.12 Indexed NC Variables

The Indirect addressing is implemented in order to able to utilize the NCvariables in conjunction with the loop instructions while, for, until as fields.

NC var. = @0-255

| @0-6:0-255

| @[ math. expression ] ;new

| @[ math. expression ]:[ math. expression ]. ;new

Example

N0000 G01 F1000

N0001 FOR(@1=0,@1<10,1)

N0002 X=@[ 2 ]:[ @1 ] Y=@[ 3 ]:[ @1 ]

Polygon points (X,Y)=@2:i ,@3:i are traversed.

Syntax description:

Page 322: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

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

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 323: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

12 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 orto the NC program for a digital drive which is connected to the CNC bymeans of a digital SERCOS interface. The drive datum which is to beread or written is addressed using the data address defined in the com-mand parameter.

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 enhancedaddress 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 beparameterized and that they be drives which are connected via theSERCOS Interface.

SERCOS ID Number

<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 func-tions are described by the SERCOS committee in the publication"SERCOS Interface."

The meaning of the SERCOS parameters (group letter P) and their func-tions are described in the documentation for the SERCOS digital drive.

The minus sign (-) is used as a delimiter character between the individualparameters.

The parameter set number addresses the desired parameter set of thedrive. The parameter set number can have values from 0 to 7. BoschRexroth drives are equipped with four parameter sets which can beswitched during operation. One of the four parameter sets is always ac-tive – switching occurs due to a command from the controller. The drivegenerally 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 4095.• The reading or writing of drive data using the "AXD command" should

be programmed in a separate NC block which does not contain anyother NC commands.

• The reading or writing of drive data using the "AXD command" alwaystakes place at the end of the NC block. In other words, the assign-ment of a value to an NC variable into which the drive datum wasread cannot be used in the same NC block as the basis for decidingwhether a conditional branch/jump is to be performed.

Syntax

SERCOS ID number

Group letter

Parameter set number

Data block number

Page 324: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-2 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• When drive data are read or written using the "AXD" command, NCblock preprocessing is interrupted. Thus if tool path compensation(G41, G42) is active, it is considered to be finished. Likewise, "Con-touring mode (acceleration)" (G08) is no longer possible.

• A read drive datum can be assigned to only one variable, but not toan address letter. The assigning expression may consist of only theAXD command. No other operands or operators are permitted.

• When the AXD command is used to write drive data, the assignedexpression can be a formula or a constant.

Note: If drive parameters are to be changed using the AXD com-mand, we recommend that you first save the drive parametersets in case incorrect or critical values are accidentally enteredor programmed during NC programming. NC programs thatcontain AXD commands to modify drive parameters shouldhave an init part, which saves the drive parameters that are tobe changed using AXD to, for example, NC variables or ma-chine data pages; it resets the values to the original settingsafter editing the program or in the homing program.

Example: NC program - AXD command

Activating friction torque compensation allows the compensation for posi-tion 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 D10G00 G90 G54 G07 G08 X199 Y136 Z5 Start positionS5000 M03 Spindle ON@50=AXD(X:S-0-0104) Read active gain factor for X axis@51=AXD(Y:S-0-0104) Read active gain factor for Y axisAXD(X:S-0-0104)=7*1000 New gain factor for the X axisAXD(Y:S-0-0104)=7*1000 New gain factor for the Y axisAXD(X:S-0-0155)=70 Friction torque compensation for XAXD(Y:S-0-0155)=110 Friction torque compensation for YG01 Z-5 F1000 Lower cutter into materialG41 X199 Y141 F8000 Start point of circular machiningG03 X180 Y122 I199 J122 Start circleG01 X180 Y100 Transition elementG02 X180 Y100 I100 J100 Full circle ∅160G01 X180 Y77 Transition elementG03 X198 Y59 I198 J77 Exit circleG00 Z5 Cutter to safety distanceAXD(X:S-0-0104)=@50 Old gain factor for the X axisAXD(Y:S-0-0104)=@51 Old gain factor for the Y axisAXD(X:S-0-0155)=0 Friction torque compensation

OFF for XAXD(Y:S-0-0155)=0 Friction torque compensation OFF

for YT0 BSR .M6 Tool changeRET Program end

Page 325: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

-�-I� ��*��. :$'� 1$'1���5��'� �1�

� � � ��1$� � �1��)�;��� �1�<� �)�$������1$� � �1�<

!9���$�1��5�'�1�< ������

�1$� � �1��=� ���+9�$�4��22�

+9�$�)�$'� ��� �1�< �� ���1,�$$<���$����?� �(

+9�$�#�2���< ��

��+9�$�)�$'���� �1�<�4� ���1'�$$<���$����?� �(

+9�$�0>��<�)��� �� �7 ������+9�$+9�$�#�2���< ��

�1$� � �1��=� ���+9�$���22����+� �������� � �� �

� �)�$������1$� � �1�<��)�$������1$���1��=� ��<

� ���1'�$$<���$����?� �(� ���1'�$$<���$����?� �(� ���1'�$$<���$����?� �(� ���1'�$$<���$����?� �(� ���1'�$$<���$����?� �(

+9�$�0>��<�)��� �� �7 ������+9�$

� �+9�$�)�$'���� �1�<�4����1'�$$<���$����?� �(

� ���1,�$$<���$����?� �(

� � � ��1$� � �1��)�;��� �1�<��)�$������1$���1��=� ��<

11-1.FH7

Fig. 12-1: Friction torque compensation in quadrant transitions

:$'� 1$'1���5��'� �1�

�22�

�22�

�� � � ��1$� � �1��)�;��� �1�<� ��1$� �1��8122����=� ��<

!9���$�1��5�'�1�< ������

�1$� � �1��=� ���+9�$�4

�1$� � �1��=� ���+9�$�

112KREIS.FH7

Fig. 12-2: Circle sector for recording position variance

Page 326: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-4 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

12.2 Read/Write Zero Offset (ZO) Data from the NC Program"OTD"

The OTD command (Offset Table Data) can be used to read and writethe data in the zero offset table and the zero offsets which have beenactivated in the NC program from the NC program.

�+,�;C�<D;�**:<D;�**�<D;�**�<D;**�<�

�'����������������������C�������,

'������ �

4 ������� ��+��� ���� ��

���( ��%

113otd.FH7

Fig. 12-3: OTD command syntax

Designation Symbol Valuerange

CNC Meaning

NC memory(optional)

M 1 / 2 MTC200 1: NC memory A or 2: NC memory BIf the parameter is not declared, the active NC memory isaddressed.

Process(optional)

P 0-6 MTC200 If no process number is specified, the current process isaddressed.

Zero offset table(optional)

O 0-9 MTC200 If the parameter is not declared, the active zero offset tableis addressed.

Offset(optional)

V 0-9 MTC200TRANS200

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 valueIf the parameter is not defined, the active zero offset tableis addressed.

Axis A 1-10 MTC200TRANS200

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 C10 = Value of the turning angleThe axis parameter must be defined.The axis letter correlates with the axis meaning!

Syntax

Page 327: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

A variable can be inserted instead of the constant.

• An arithmetic expression instead of a constant or variable is not per-mitted.

• The optional parameters need not be specified.

• The commas that are used for delimiting the parameters must alwaysbe set.

Command OTD can not be used to write to the zero offset values forG50/G51, G52 and to the active zero offset value.

Example: NC program - reading ZO data

@20=OTD(,,,,1) Read total active X axis zero offset

.

X=OTD(1,0,2,4,1) Traverse X axis to the position which is located inthe ZO table in NC memory A for process 0 of the2nd zero offset table for G54

.

@70=G(4) Read G function of zero offset

@70=@70-50 Prepare value for the OTD command

.

@20=OTD(,,,@70,1) Read active X axis zero offset for the ZO entrycorresponding to the active G function (G52 - G59)

Example: NC program - writing ZO data

OTD(,,,4,1)=INT(X) Assign the result of the specified calcula-tion to the X axis entry for the offset cor-responding to G54.

.

OTD(,,,4,1)=@20+OTD(,,,,1) Calculate the new X-axis zero offsetvalue corresponding to G54 from thecontents of the variable and the active X-axis zero offset.

Note: The read zero point data are machine coordinates.

General requirements for theMTD command

Page 328: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-6 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

12.3 Access to Tool Data from NC Program "TLD"

The TLD command (Tool Data) can be used to read all the tool data inthe tool list from the NC program and to write them; however, some re-strictions apply to writing.

The individual data elements are addressed by means of codes. De-pending 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:

+�,�;�**:<D;<D;**�������<D;***���<D;�**�<D;**�2<D;**��<�

������,���� � ��

8!�

���������C�>�! '���*

������ �;�**�<�C�������� � !!� �����

���� ��

+�,�;�**:<D�;�<D�����;�**�<������D;***���<D;�**�<D;**�2<D;**��<�

� , $L@ &L� / � $

57tld.FH7

Fig. 12-4: Syntax of the TLD command

The two following figures illustrate the parameters of the TLD command indetail:

TLD addressing via location and magazine typeV23_20030319

Designation Symbol Value range / meaning

Process P 0 - 6 Process number

Addressing A 0 Addressing via location and magazine type

Storage type ST

0Magazine/

turret

1Spindle

2Gripper

3Tool

changeposition

7Address active tool

Location L 1 - 999 1 - 4 1 - 4 1 - 4 0

Tool edge E 0 1 - 9

Basic tool data Tool edge data

Data element DE3 - 8

9Tool status 10 - 31

32 -Groupstatus

1 2 3 - 40

Status S ---1 - 32

Tool statusbit

---1 - 16Group

status bit---

1 - 16Tool edge status bit ---

Group No. G Not relevant Not relevant

Group duplonumber GD Not relevant Not relevant

Syntax

Value range and meaning ofparameters

Page 329: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

TLD addressing via tool and duplo numberV23_20030319

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 1 - 9999999 Tool number

Tool duplo No. WD 1 - 9999 Tool duplo number

Tool edge E 0 1 - 9

Basic tool data Tool edge data

Data element DE3 - 8

9Tool status 10 - 31

32 -Groupstatus

1 2 3 - 40

Status S ---1 - 32

Tool statusbit

---1 - 16Group

status bit---

1 - 16

Tool edge status bit---

Group No. G0 - 99 Group association of the tool

no information: active group

Group duplonumber GD

0 - 99 Group duplo association of the toolno information: duplo No. of the active group

TLD_V23_20030319.xls

All data present in the tool list can be read. The individual data elementsare addressed by means of codes. The identifiers of the individual dataelements 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.

Page 330: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-8 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Data of tool list (basic tool data) for the TLD command

Basic tool data (per tool) V23_20030319

DESIGNATION VALUE RANGE

DA

TA

TY

PE

in t

he

PL

C

UN

IT

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 0 - 2 - 03 X

Location 0 - 999 - 04 X

Tool number 1 - 9999999 DINT - 05 X X

Tool duplo number 1 - 9999 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 1 - 999 INT - 11 X

Storage location of next setup tool 0 - 2 INT - 12 X

Loc. of next replacement tool 1 - 999 INT - 13 X

Stor. of prev. rep. tool 0 - 2 INT - 14 X

Loc. of prev. rep. tool 1 - 999 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 0 - 65535 INT - 19 X X

User data

User data 1 REAL 20 A00.061 X

User data 2 REAL 21 A00.062 X

User data 3 REAL 22 A00.063 X

User data 4 REAL 23 A00.064 X

User data 5 REAL 24 A00.065 X

User data 6 REAL 25 A00.066 X

User data 7 REAL 26 A00.067 X

User data 8 REAL

any

27 A00.068 X

User data 9

+/- 1.2 * 10-38 - +/- 3.4 * 10+38and 0 ( 9 significant digits)

REAL 28 A00.069 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 A00.057 X

WGD_all_V23_20030319.xls

* ASCII character set 32-126, 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. 12-5: Data of tool list (basic tool data) for the TLD command

Page 331: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Data of tool list (tool edge data) for the TLD command

Tool edge data (per tool edge) V22_20030317

DESIGNATION VALUE RANGE

DA

TA

TY

PE

inP

LC UNIT

DE

OP

T.

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 -99.9 - +100.00 REAL 03 A00.059 X

Warning limit +0.1 - +100.00 REAL%

04 A00.059 X

Max. utilization time 0 - 9999999 (0: tool life recording switched off) REAL 05 A00.059 X

Time used 0 - 9999.999 REAL

min. orcycles

06 A00.059 X

Geometry data

Length L1 DINT 07 X

Length L2 DINT 08 X

Length L3 DINT 09 X

Radius R DINT 10 X

Wear L1 DINT 11 A00.055 X

Wear L2 DINT 12 A00.055 X

Wear L3 DINT 13 A00.055 X

Wear R DINT 14 A00.055 X

Offset L1 DINT 15 A00.056 X

Offset L2 DINT 16 A00.056 X

Offset L3 DINT 17 A00.056 X

Offset R

-99999.9999 - +99999.9999

or

-9999.99999 - +9999.99999

DINT

mm

or

inches

18 A00.056 X

Geometry limit values

L1_min DINT 19 A00.060 X

L1_max DINT 20 A00.060 X

L2_min DINT 21 A00.060 X

L2_max DINT 22 A00.060 X

L3_min DINT 23 A00.060 X

L3_max DINT 24 A00.060 X

R_min DINT 25 A00.060 X

R_max

-99999.9999 - +99999.9999

or

-9999.99999 - +9999.99999

DINT

mm

or

inches

26 A00.060 X

Wear factors

Wear factor L1 DINT 27 A00.058 X

Wear factor L2 DINT 28 A00.058 X

Wear factor L3 DINT 29 A00.058 X

Wear factor R

-99999.9999 - +99999.9999or

-9999.99999 - +9999.99999

DINT

mm/min orinch/min or

cycles

30 A00.058 X

User data

User data 1 REAL any 31 A00.070 X

User data 2 REAL any 32 A00.071 X

User data 3 REAL any 33 A00.072 X

User data 4 REAL any 34 A00.073 X

User data 5

+/- 1.2 * 10-38 - +/- 3.4 * 10+38and

0 (9 significant digits)

REAL any 35 A00.074 X

User data 6 DINT any 36 A00.092 X

User data 7 DINT any 37 A00.093 X

User data 8 DINT any 38 A00.094 X

User data 9 DINT any 39 A00.095 X

User data 10

-99999.9999 - +99999.9999or

-9999.99999 - +9999.99999

DINT any 40 A00.096 X

DE - Data element SL - Setup list-specific datum SD_all_V22_20030317.xlsOPT - Optional datum TL - Tool list-specific datum

Fig. 12-6: Data of tool list (tool edge data) for the TLD command

Page 332: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-10 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Tool status bits for the TLD command

Tool status bits 1 -16 from basic tool data element 09Write

accessType

Group nameGroup

information

Sym

bo

l

Val

ue

Bit

Byt

e

Wo

rd

TM

OP

AS

P

SL

TL

LL

Comment

Tool notavailable

! 1

Tool available 0

1 X X X Tool is missing

Tool is notrequired

? 1Presence

Tool required 0

2Tool not required forprocessing

Correction typewrong

t 1

Error:correction type Correction type

not wrong0

3 X X XCorrection type does notaccord with the requirements

Incorrect numberof tool edges

e 1

Error:tool edge number Correct number

of tool edges0

4 X X XNumber of cutters does notaccord with the requirements

Tool edge(s)incorrect

f 1

Error: tool edgeTool edge(s) notincorrect

05

Tool edge data do not complywith requirements

Tool codeincorrect

$ 1

Error: tool codeTool codecorrect

06

Does not accord with therequirements

Reserved for extensions 7

Reserved for extensions 8

LOW

byt

e 0

- 7

Location locked B 1

Location locking Location notlocked

0 9 X X X X XASP/OP: Location is damaged,for example.TM: Tool is entered

Reserved for extensionsUpper half-location locking 10

Reserved for extensionsLower half-location locking 11

Upper half-locationreserved

) 1

Upper half-location reservationUpper half-location notreserved

012 X X X X

Reserved for temp. movedtools

Lower half-locationreserved

( 1

Lower half-location reservationLower half-location notreserved

013 X X X X

Reserved for temp. movedtools

Reserved for extensionsUpper half-location locking 14

Reserved for extensionsLower half-location locking 15

Locationassigned

+ 1

Location assignmentLocation notassigned

016

byte

LOW

X X X There is a tool at this location

WSB_all_V22_20030918.xlsTM - Tool management SL - Setup list-specific status bitOP - Operator TL - Tool list-specific status bitASP - Application-specific programs in PLC or NCLL - Location-specific status bit

Fig. 12-7: Tool status bits 1-16 for the TLD command

Page 333: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Tool status bits 17 -32 from basic tool data element 09

Writeaccess Type

Group name Group information

Sym

bo

l

Val

ue

Bit

Byt

e

Wo

rd

TM

OP

AS

P SL

TL

LL

Comment

Tool is worn out d 1

Tool is not worn out 017 X X The remaining lifetime of the

tool has elapsed (replace)

Warning limit is reached w 1Wear state

Warning limit not reached 018 X X The remaining lifetime is about

to expire (replace)

Machining tool p 1

No machining tool 019 X X There is a processing tool for

every alternate tool group

Replacement tool s 1Name of alternate

No replacement tool 020 X X

A replacement tool is a tool stillto be used, not a processingtool

Tool with fixed location coding C 1Tool coding

Tool without fixed location coding 021 X X X X The tool may only be changed

into the predefined tool location

Tool locked L 1Tool block

Tool is not locked 022 X X X Tool must not be used

Tool broken D 1Tool breakage

Tool is not broken 023 X X X Tool is damaged: e.g. broken

tool edge

Reserved for extension 24LO

W b

yte

0 -

7

1User tool status 1

User tool status bit 1A00.075 0

25 X X X Any meaning

1User tool status 2

User tool status bit 2A00.076 0

26 X X X Any meaning

1User tool status 3

User tool status bit 3A00.077 0

27 X X X Any meaning

1User tool status 4

User tool status bit 4A00.078 0

28 X X X Any meaning

1User tool status 5

User tool status bit 5A00.079 0

29 X X X Any meaning

1User tool status 6

User tool status bit 6A00.080 0

30 X X X Any meaning

1User tool status 7

User tool status bit 7A00.081 0

31 X X X Any meaning

1User tool status 8

User tool status bit 8A00.082 0

32

byte

wo

r d

X X X Any meaning

WSB_all_V22_20030918.xls

TM - Tool management SL - Setup list-specific status bit

OP - Operator TL - Tool list-specific status bit

ASP - Application-specific programs in PLC or NC T Tool

LL - Location-specific status bit

Fig. 12-8: Tool status bits 17-32 for the TLD command

Page 334: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-12 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Tool edge status bits for the TLD command

Tool edge status bit from tool edge data element 02

Writeaccess

Type

Group name Group information

Sym

bo

l

Val

ue

Bit

TM

OP

AS

P

SL

TL

Comment

Incorrect tool edge orientation o 1Incorrect tool edge orientation

Tool edge orientation is not incorrect 01 X X Tool edge data do not correspond to the

definition

L1 faulty 1 1L1 faulty

L1 not incorrect 02 X X Tool edge data do not correspond to the

definition

L2 faulty 2 1L2 faulty

L2 not incorrect 03 X X Tool edge data do not correspond to the

definition

L3 faulty 3 1L3 faulty

L3 not incorrect 04 X X Tool edge data do not correspond to the

definition

R incorrect r 1R incorrect

R not incorrect 05 X X Tool edge data do not correspond to the

definition

Reserved for extensions 6

Reserved for extensions 7

Reserved for extensions 8

Tool edge worn out d 1

Tool not worn out 09 X X The tool edge can no longer be used

(replace)

Warning limit is reached w 1Wear state

Warning limit not reached 010 X X The remaining tool life of the tool edge is

near its end (replace)

Reserved for extensions 11

Reserved for extensions 12

1User tool edge status 1

User tool edge status bit 1A00.083 0

13 X X X Any meaning

1User tool edge status 2

User tool edge status bit 2A00.084 0

14 X X X Any meaning

1User tool edge status 3

User tool edge status bit 3A00.085 0

15 X X X Any meaning

1User tool edge status 4

User tool edge status bit 4A00.086

any

016 X X X Any meaning

SSB_all_V22_20030918.xls

TM - Tool managementOP - Operator

TL - Tool list-specific status bitSL - Setup list-specific status bit

ASP - Application-specific programs in PLC or NC

Fig. 12-9: Tool edge status bits for the TLD command

Page 335: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• Tool group status bits for the TLD command

Tool groups: Group status (data element 32)V23_20021112

Write access TypeStatus Status bit

Sym

-b

ol

Val

ue

Bit

TM OP ASP GLComment

Group not available ! 1 X

Group exists 0

1 X Tool in this group ismissing

Group is not required ? 1 X

Presence

Group is required 0

2 X No tool in thisgroup is required

Group disabled L 1 XGroup status

Group not disabled 0

3 X X User-programmable

Group worn d 1

Group not worn 0

4 X X At least one alter-nate tool sequenceof the group isworn.

Warning limit is reached w 1 X X

Wear state

Warning limit not reached 0

5 At least one alter-nate tool sequenceof the group hasreached the warn-ing limit.

Machining group p 1 6 X X

Not a machining group 0

Group is machininggroup

Spare group s 1 7 X X

Name of alternate

Not a spare group 0

Group is alternategroup

Reserved for extension 8

1 9 X X XUser group status 1 User group status bit 1 any

0

Any meaning

1 10 X X XUser group status 2 User group status bit 2 any

0

Any meaning

1 11 X X XUser group status 3 User group status bit 3 any

0

Any meaning

1 12 X X XUser group status 4 User group status bit 4 any

0

Any meaning

User group status bit 5 1 13 X X XUser group status 5 any

0

Any meaning

1 14 X X XUser group status 6 User group status bit 6 any

0

Any meaning

User group status bit 7 1 15 X X XUser group status 7 any

0

Any meaning

1 16 X X XUser group status 8 User group status bit 8 any

0

Any meaning

WZG_all_V23_20021112.xlsTM - Tool management SL - Setup list-specific status bit

OP - Operator TL - Tool list-specific status bit

ASP - Application-spec. programs on the PLC or NC OPT - Optional datum

GL - Tool group list-specific status bit

LL - Location-specific status bit

Fig. 12-10: Tool group status bits for the TLD command

Page 336: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-14 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• A variable can be inserted instead of constants.

• An arithmetic expression instead of a constant or variable is not per-mitted.

• The optional parameters need not be specified.

• The commas that are used for delimiting the parameters must alwaysbe set.

• The CNC inserts the current process if a process [0-6] is not speci-fied.

• If the parameter address [0/1] is not specified, the CNC inserts a va-lue of 0 and interprets the two subsequent parameters as storage unitand pocket.

• If the duplo number [1-9999] is not specified, the CNC inserts theduplo 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 thenumber of the enabled group.

• If the group duplo number [0..99] is not specified, the CNC inserts theduplo number of the enabled group.

The validity of the programmed parameter values can be checked onlywhen the command is executed (i.e. at the runtime of the NC program). Ifone of the parameters is incorrect or invalid, the CNC initiates an immedi-ate stop and issues the error message:

• You cannot write to setup list-specific data elements.

• You may not write to any tool, tool edge or group status bit that isallocated to tool management.

• You cannot write to a pocket, storage unit or tool number data ele-ment.

• If one of these conditions is not observed when a data element iswritten, the CNC initiates an immediate stop and issues the errormessage:

General requirements for theTLD command

Optional parameters for the TLDcommand

General verifications for the TLDcommand

Limitations of writing with theTLD command

Invalid access to a data element!

Parameter [No. Of the faulty parameter]during data access command faulty!

Page 337: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-15

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Examples:

Reading with the TLD commandExample:

The tool number of the tool in spindle 2 is assigned to a variable.

@55 = TLD ( , 0, 1, 2, 0, 5, )

Symbol Designation

S Status

DE Data element 5 → Tool number

E Tool edge 0 → Basic tool data

L Location 2 → 2

SA Storage type 1 → Spindle

→→→→ Spindle 2

A Addressing 0 → Addressing via location and magazine

P Process Empty → current process

TLD_Beispiel_1_lesen_V22_20021114.xls

Example:

The duplo number of tool 1 is assigned to a variable.

@200 = 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

TLD_Beispiel_2_lesen_V22_20021114.xls

Page 338: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-16 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Interrogation whether a tool change is required

@ 0: 0 = TLD ( , 0, 1, 1, 0, 5, ) Reads the tool number of the first spindle and storesit in variable 0 of the process.

@ 0: 0 = @ 0: 0 - T BEQ .M6_T0 Interrogation whether a tool change is requiredTLD_Beispiel_3_lesen_V22_20021114.xls

The sum of radius, wear and offset is written into a variable

@152 = TLD ( , 1, 9, , 1, 10, ) + TLD ( , 1, 9, , 1, 14, ) + TLD ( , 1, 9, , 1, 18, )

TLD_Beispiel_4_lesen_V22_20021114.xls

Writing with the TLD commandExample:

The duplo number of tool 1 is set to 5.

TLD ( , 1, 1, , 0, 6, ) = 5

Symbol Designation

S Status

DE Data element 6 →→→→ Duplo number

E Tool edge 0 → Basic tool data

D Duplo numberEmpty →→→→ duplo number of the corre-sponding processing tool

T Tool No. 1 → Tool 1

A Addressing1 → Addressing via tool and duplo number

P Process Empty → current process

TLD_Beispiel_1_schreiben_V22_20021114.xls

Page 339: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-17

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

The duplo number of tool 1 is set to 6

TLD ( , 1, 1, , 0, 6, ) = 3 + 1 + 2

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 corre-sponding processing tool

T Tool No. 1 → Tool 1

A Addressing 1 → Addressing via tool and duplo number

P Process Empty → current process

TLD_Beispiel_2_schreiben_V22_20021114.xls

Example:

The last used or preselected tool is disabled

@55 = T

TLD ( 3, 1, @55, , 0, 9, 22 ) = 1

The number or current tool is saved in avariable

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 No. @55 → Tool number = Content of variable @55

A Addressing 1 → Addressing via tool and duplo number

P Process 3 → Process 3

TLD_Beispiel_3_schreiben_V22_20021114.xls

Page 340: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-18 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

Duplo group 1 of tool group 5 is disabled

TLD ( 3, 1, , , , 32, 3, 5, 1 ) = 1

Symbol Designation

GD Group duplonumber

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_20030617.xls

Page 341: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-19

DOK-MTC200-NC**PRO*V23-AW01-EN-P

12.4 Read/Write D Corrections from the NC Program "DCD"

With the DCD command, D corrections can be read and written from theNC program.

DCD([0..6],[1..99],[1..4])

P S W

Value

Memory

Process

115dcd.FH7

Fig. 12-11: DCD command syntax

Designation Symbol Declarationrange

CNC Meaning

Process P 0-6 MTC200 If no process number is specified, the current process isaddressed.

Storage S 1-99, 1-30 MTC200TRANS200

If the parameter is not specified, the active memory isaddressed.

Value W 1-4 MTC200TRANS200

1 = Value for length correction L1

2 = Value for length correction L2

3 = Value for length correction L3

4 = Value for radius correction R

• A variable can be inserted instead of a constant.

• An arithmetic expression instead of a constant or variable is not per-mitted.

• The optional parameters do not need to be specified.

• The commas that are used for delimiting the parameters must alwaysbe set.

The declared parameters must lie within the given value range. The CNCchecks their validity first during operation. The CNC interrupts programexecution and issues an error message if a declared parameter lies out-side of the valid value range.

Example:

@22=DCD(,3,4) Variable 22 contains radius compensation value Rof D magazine 3.

DCD(1,2,1)=Z-10 Value "Z-10" is written to length compensationvalue L1 of D magazine 2 of process 1.

DCD(,,3)=DCD(,,3)+1 The value L3 of the active D magazine and of theactive process is increased by 1.

Syntax

General requirements for theDCD command

Verifications during access

Page 342: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-20 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

12.5 Read/Write Machine Data

Purpose of Machine Data

The variable machine data functions serve

• as variable machine parameters (control machine data) for specificcontrol functions, such as setup register, drag and Gantry axis ormain spindle synchronization,

• as secured data (OEM machine data) to, for example, manage themachine options or to store measurement data,

• as working memory to which the machine builder saves structureddata (OEM machine data), e.g. to implement palette management orto store axis positions, or

• to process large data pools (user machine data), e.g. to store geo-metric data and tolerances to produce parts.

The majority of the data required for the controller by the machine builderand 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: 100-199 Page: 200-299Page: 001-099

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Limit 1Limit 2Limit 3Limit 4

Serial Index 1

Laufindex

2

Page 001: Page Label

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Serial Index 1

Laufindex

2

Page 100: Page Label

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Serial Index 1

Laufindex

2

Page 200: Page Label

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Herst1Herst2Herst3Herst4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

Anw. 1Anw. 2Anw. 3Anw. 4

114M

asch

.fh7

114Masch.FH7

Fig. 12-12: General structure of machine data

Objectives

Required data structures

Page 343: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-21

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Read/Write Machine Data Elements "MTD"

Using the MTD command (Machine Table Data), individual elements ofthe machine data in the NC program can be read and written, but only ifwrite access is permitted for the individual elements.

(+,�;**���<D;7���**K���<D;7���**K���<D;**���<�

8� �����*

,� �������

,� ������

��� ���*

�< & &� /&

116mtd.FH7

Fig. 12-13: MTD command syntax

Designation Symbol Value range Meaning

Page number PG 1-299 001 - 099 Pages of the control machine data100 - 199 Pages of OEM machine data200 - 299 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

• 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 per-mitted.

• All parameters listed above must always be indicated.

The declared parameters must lie within the given value range. The NCchecks their validity first during operation. The NC interrupts program execu-tion and initiates an error message if a declared parameter lies outside of thevalid value range. The NC reacts in the same way if the user write-accesses awrite-protected data element from the NC program. The NC automaticallylimits the value to the lowest or largest value of the data element if the userdeclares a value outside of the valid value range for a data element.

Further and supplementary information about the functions and the han-dling of machine data can be found in the description "Machine data",folder 1.

MTD command

Syntax

General requirements for theMTD command

Verifications during access

Detailed description

Page 344: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-22 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: Reading machine data

@200=MTD(250,1,2,4) Read machine data element Page=250, L1=1, L2=2, EL=4

X=MTD(260,1,,5) Traverse X-axis to the position which islocated in the machine data element; L2is not present

@50=MTD(270,,3,6) L1 is a PROCESS type. The elements ofthe current process are read. A specialprocess specification is also possible.

@220=MTD(280,1,1,4)+4 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 machinedata element

MTD(270,,3,6)=@210+@220 Allocate calculation

Note: Using the MTD command, any number of data elements canbe read out from the machine data within an NC block, butonly one data element can be written. (see the following sec-tion "Possible allocations between AXD, TLD, OTD, DCD,MTD").

12.6 Possible Allocations between TLD, MTD, AXD, OTD, DCD

Various limitations must be observed when handling TLD, MTD, AXD,OTD and DCD commands.

Handling AXD Commands

AXD(X:P-7-3616)=@20

AXD(X:P-7-3616)=@20+@21+@22

@20=AXD(X:P-7-3616)

@20=AXD(X:P-7-3616) @21=AXD(X:P-7-3616)

@20=(AXD(X:P-7-3616)+@21)+@22

AXD(X:P-7-3616)=1000 AXD(X:P-7-3616)=1

AXD(X:P-7-3616)=AXD(X:P-7-3616)

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.

Possible allocations - examples

Invalid allocations - examples

Page 345: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-23

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Handling OTD Commands

@20=OTD(,,,4,1)

OTD(,,,4,1)=@21

OTD(,,,4,1)=@20+@21+@22

@20=OTD(,,,4,1)+OTD(,,,4,1)

@20=OTD(,,,4,1)+OTD(,,,4,1)+OTD(,,,4,1)

@20=OTD(,,,4,1) @210OTD(,,,4,1) @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 OTD(,,,6,1)=@22

@20=(OTD(,,,4,1)+@21)+@22

Note: Using command OTD, any number of data elements can beread out from the zero point table within an NC block, but onlyone data element can be written.

OTD commands in parentheses are not permitted.

Handling TLD Commands

@200=TLD(,1,1,,0,6,)

TLD(,1,1,,0,6,)=5

TLD(,1,1,,0,6,)=3+1+2

@200=TLD(,1,1,,0,6,)+TLD(,1,1,,0,5,)

@200=TLD(,1,1,,0,6,)+TLD(,1,1,,0,5,)+TLD(,1,1,,0,6,)

TLD(,1,1,,0,6,)=TLD(,1,1,,0,5,)

TLD(,1,1,,0,6,)=TLD(,1,1,,0,6,)+TLD(,1,1,,0,5,)

@200=TLD(,1,1,,0,5,) @210=TLD(,1,1,,0,6,) @220=TLD(,1,1,,0,6,)

TLD(,1,1,,0,5,)=1 TLD(,1,1,,0,6,)=1 TLD(,1,1,,0,6,)=1

@200=(TLD(,1,1,,0,5,)+@210)+@220

Note: Using the TLD command, any number of data elements of thetool data can be read within one NC block, but only one dataelement can be written.

As opposed to the OTD and MTD commands, only one alloca-tion in the NC block may occur (also when reading).

DCD commands in parentheses are not permitted.

Possible allocations - examples

Invalid allocations - examples

Possible allocations - examples

Invalid allocations - examples

Page 346: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-24 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Handling DCD Commands

@20=DCD(,,1)

DCD(,,1)=@21

DCD(,,1)=@20+@21+@22

@20=DCD(,,1)+DCD(,,1)

@20=DCD(,,1)+DCD(,,1)+DCD(,,1)

@20=DCD(,,1) @21=DCD(,,1) @22=DCD(,,1)

DCD(,1,1)=DCD(,2,1)

DCD(,,1)=DCD(,,1)+DCD(,,1)

DCD(,,1)=@20 DCD(,,2)=@21 DCD(,,3)=@22

@20=(DCD(,,1)+@21)+@22

Note: Using the DCD command, any number of D corrections of themachine data can be read within one NC block, but only one Dcorrection can be written.

DCD commands in parentheses are not permitted.

Handling MTD Commands

@200=MTD(110,1,1,1)

MTD(110,1,1,1)=@210

MTD(110,1,1,1)=@200+@210+@220

@200=MTD(110,1,1,1)+MTD(110,1,1,1)

@200=MTD(110,1,1,1)+MTD(110,1,1,1)+MTD(110,1,1,1)

@200=MTD(110,1,1,1) @210=MTD(110,1,1,1) @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 MTD(110,1,1,3)=@220

@200=(MTD(110,1,1,1)+@210)+@220

Note: Using the MTD command, any number of data elements can beread out from the machine data within an NC block, but only onedata element can be written at a time.

MTD commands in parentheses are not permitted.

Possible allocations - examples

Invalid allocations - examples

Possible allocations - examples

Invalid allocations - examples

Page 347: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction Special NC Functions 12-25

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Allocations Between TLD, MTD, AXD, OTD and DCD Commands

AXD(X:P-7-3616)=MTD(110,1,1,1)+MTD(110,1,1,1)

AXD(X:P-7-3616)=OTD(,,,4,1)+OTD(,,,4,1)

AXD(X:P-7-3616)=TLD(,1,1,,0,6,)+TLD(,1,1,,0,6,)

AXD (X:P-7-3616)=DCD(,,1)+DCD(,,1)

MTD(110,1,1,1)=AXD(X:P-7-3616)

TLD(,1,1,,0,6,)=AXD(X:P-7-3616)

OTD(,,,4,1)=AXD(X:P-7-3616)

DCD(,,1)=AXD(X:P-7-3616)

Note: The restrictions for the individual commands must be ob-served when allocations are made between the TLD, MTD,AXD, OTD and DCD commands.

Possible allocations - examples

Invalid allocations - examples

Page 348: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

12-26 Special NC Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 349: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Compiler Functions 13-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

13 NC Compiler Functions

13.1 Basics

The NC compiler, which is integrated into the user interface, provides apreliminary 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.

13.2 Chamfers and Roundings

The commands:

• CF ( insert chamfer) and

• RD (insert rounding)

enable chamfers and roundings to be inserted.

CF<value> or CF=<value> ;insert chamfer for CF: <value>=chamfer width

RD<value> or RD=<value> ;insert rounding for RD: <value>=rounding radius

• A further linear contour (chamfer) or an arc (rounding) can be in-serted between linear or circular contours.

�"

�"

�"

�"

�"

�" �"

�"

3� 3�

3�

3�

�F�� *��.

121Fase.FH7

Fig. 13-1: Inserting chamfers and roundings between linear and circular con-tours

• Specifying the RD command tangentially inserts an arc of radius RDbetween the preceding and the subsequent movement command.

• Starting from the intersection point of the movement commands in-volved, chamfer width CF is removed from both movement blocks;the resulting coordinate values are connected by a linear path (G1).

NC compiler

Chamfers and roundings

Syntax

Explanation

Page 350: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

13-2 NC Compiler Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• The value that follows CF specifies the chamfer width; the value afterRD specifies the rounding radius.

• The instructions CF and RD may be inserted between two movementblocks at the end of the first block. The required chamfer or roundingwill then be inserted after the block in which it has been programmed.Alternatively, the CF or RD command may be inserted in a separateblock between two movement blocks.

• Chamfers and roundings are always produced on the active plane.

Example:

1�

1��

***1�3**�6**�#,�G�1��3**�4**�>**�J*****

6

3

#,

��#��!*��.

122RUND.FH7

Fig. 13-2: Inserting a rounding

• Chamfers and roundings should only be inserted between contiguousmovement blocks. A maximum of 20 blocks that do not contain amovement may be present between two movement blocks which areto be connected by a chamfer or a rounding.

• The preceding and subsequent movement blocks must contain eithera linear or a circular movement.

• The command for inserting a chamfer or rounding must be writteneither in the first movement block or after it, but always before thesecond movement block. If the compiler encounters the insertioncommand for a chamfer or rounding in the second movement block, itinserts the chamfer or rounding between the second and the subse-quent movements.

• If the instruction for inserting a chamfer or rounding is written in a sepa-rate NC block, the immediately preceding NC block must contain the re-lated linear or circular movement.

• Movements that are outside the active working plane cannot be inter-connected by chamfers or roundings.

Chamfers or roundings cannot be inserted between two movement blocksif 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),

Contiguous movement blocks

Invalid commands

Page 351: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Compiler Functions 13-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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

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 specifiedby variables.

Note: Inserting a specified chamfer or rounding between the pre-ceding and the subsequent movement block must geometri-cally be possible. If this is not possible, the compiler automati-cally reduces the chamfer or rounding concerned to a corre-sponding value (if necessary even to 0, without issuing an er-ror message).

13.3 Macro Technique

A macro is the combination of individual instructions that usually must beprogrammed repeatedly into a comprehensive instruction with its ownname.

DEFINE ... AS ...

A macro permits instructions to be combined that must always be written inthe same sequence (for safety reasons, for example). It enables DIN Gcodes (such as drilling cycles G80 through G89) or DIN auxiliary functions(such as M6) to be simulated. Furthermore, it enables functional sequencesthat cannot be accessed from the PLC (such as spindle control during pro-gram mode) to be controlled by a single command from the NC.

Besides local macros, which the user may define within an NC programand employ subsequently, the machine manufacturer can store globalmacro definitions in the "NC Options menu" (in the "NC programming"menu item). In contrast to local macro definitions, global macro definitionsare valid in all NC programs and in MDI operation of the graphic user in-terface.

Example:

Changing tools::DEFINE M860 AS M86 M3 S10 Disengage while the spindle is

slowly turningDEFINE M6 AS BSR .WZW Reproduce DIN tool change

function M6DEFINE QUICK AS G01 F15000 Quick process at 15 m/minDEFINE ANPOS AS X=200 Y=100 Z=50 ;Loading pos. for changing toolsQUICK ANPOS M860 M6 Quick loading in X, Y, Z and

changing tools:

No variables

Macro

Syntax

Explanation

Global / local macros

Page 352: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

13-4 NC Compiler Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Notes:

• A macro name may have up to 20 characters. Blanks maynot be used.

• The instruction related to a global macro may contain up to156 characters (consisting of 2 lines with up to 78 charac-ters each).

• With a local macro, the compiler interprets all NC instruc-tions that follow the AS key word as the instruction se-quence that must be inserted instead of the macro name.

• Nesting macros is not permitted. This means that theremay not be any further macros within an instruction se-quence that is to be inserted.Not permitted: DEFINE M860 AS M86 M6 S10

• In contrast to the textual user interface and to the SOT, theuser may program global macros in MDI mode within thegraphic user interface.

• Key words may not be super-defined by macros.

• When using a macro in an instruction, a blank charactermust be inserted before and after the macro name. There-fore, a macro may not be contained in an instruction (e.g. x= macro name) or in a formula/equation, because a blankmay not exist after the equal sign (=).

The following key words are currently in use by Bosch Rexroth. The usershould 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

Reserved key words

Page 353: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Compiler Functions 13-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

• 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 allowsthe programming language to be changed to a high degree.

Enhancing NC Functions by Macro TechniqueUsing the macro technique enables the machine manufacturer to define cus-tomized NC functions that may be employed by the user in the NC program.

Global macros can be created in the "NC programming" menu item ("NCoptions" submenu). They are valid in all NC programs and in the MDImode. Please refer to the "NC compiler" description for details.

The machine manufacturer can enter several fixed positions in the macrotable (such as reference positions, tool changing positions, loading andunloading positions, etc.). These positions can have mnemonics assignedwhich the user may utilize later in the NC program.

Example:

Macro table: DEFINE P_WSW AS X... Y... :

+��������

��������

+�������M��

����!� 6

3

4

�����=� *��.

123PUNKTE.FH7

Fig. 13-3: Approaching invariably defined positions

Invariably defined positions

Page 354: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

13-6 NC Compiler Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC program

:

G00 P_WSW:

Note: Entire NC blocks or subroutine calls may be programmed in themacro table and be called by a keyword. This enables the ma-chine manufacturer to define specific machine-related move-ment blocks, which can be activated by the user via keywords.

In the process of moving to the reference position or to the tool changingposition, the tool must frequently first be moved away from the machiningarea before it can safely be retracted. Using the macro technique, bothmovements can be combined in a single command.

Example:

Macro table: DEFINE RETURN AS G0 BSR .P_RT

0

1

# �������������������/��C�.2��

�>�� � !��� �������������/��C�2���

�-#H�=*��.

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 bedefined. This enables fixed positions to be approached via anintermediate point. The names of the macros and subroutinesmay be defined by the user.

Entire sequences can be programmed in the subroutines.

The machine manufacturer creates the subroutines and themacros. The user merely enters NC program line "RETURN...".

Retract movement withintermediate position

Page 355: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Compiler Functions 13-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

13.4 Modal Function

The MODF_ON (STRI) modal function permits repeatedly used expres-sions to be written only once.

MODF_ON(STRI) ;Activate modal function (modal function on)

MODF_OFF ;Deactivate modal function (modal function off)

• 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 theNC blocks in which the user writes a modal instruction us-ing MODF_ON.

• The MODF_OFF instruction deactivates the modal instruc-tion in the block in which it is programmed.

• It must be noted that the modal function (such asMODF_ON(RD 2)) does not have an effect on blocks with-out axis movements (i.e. without feed axes). This is alsotrue for contours that were created in the graphical editorand were saved as a function call in the NC program.

Examples:

Drilling holes

0�� ��� ��� -��

��

���

2

�/

�� �� �

��

�2 �- ��

�2����*��.

125LOCH.FH7

Fig. 13-5: Example: Drilling holes

Modal function

Syntax

Explanation

Page 356: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

13-8 NC Compiler Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC program:

;

T6 M6

G54 G0 X-10 Y-10 Z50 S3500 M3

;

;******************* G83 - deep hole drilling chip removal *******************

@71=-20.0 depth (abs)

@72=6.0 chip depth (inc)

@73=2.0 safety distance (abs)

@74=0.5 cutter distance (inc)

@75=0.0 dwell time

@76=250.0 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

#,

#,

#,

#,

#,

#, �F

�F

�F

�F

�F

�F

�F

�F�F

3

4

���-� �-� �/������ :�/� --�-���:�

�F

:�

��

��

-�

/�

��

-�

:�

/�

#,

#,

�:(�!��*��.

126MODAL.FH7

Fig. 13-6: Example: Modal rounding and chamfering

Page 357: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Compiler Functions 13-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

(parts name: stairs)T3 BSR .M6 (PRE-TURNING TOOL)G18 G54 G16 G90 G71M69G92 S2000[turning contour C1 without cut segmentation]G0 G18 G54 G16 G95 G97 G9 G7 Z444 S2000 M3 M9X0G1 G42 Z440 F.3X20 MODF_ON (CF2.0)Z400X40Z360X60Z320X80Z280X100Z160 MODF_ON (RD2.5)X120Z120X140Z80X160Z40X180Z0 MODF_OFFG0 G40 X182 Z1X184Z450M5M70M62G53 G90 G47 M5M30 [ ]

13.5 Enhanced Look-Ahead Function

The enhanced look-ahead function optimizes the velocity curve of theprogrammed path movement during compilation and/or the programdownload. If required and without modifying the programmed contour, thelook-ahead function inserts intermediate blocks in order to achieve asteadier path velocity curve.

Using the enhanced look-ahead function is always expedient if an NCprogram that consists of very short NC blocks is to be executed and if theinternal block look-ahead function proves insufficient.

With non-tangential block transitions, the NC always reduces the velocityto zero at transitions that are crossed with G6 or G8. In order to be able tostop in the last block, this process frequently requires continuous decel-eration across several blocks. With very short NC blocks, the internalCNC look-ahead function, however, usually does not recognize the end ofthe polygon blocks, or a too-short NC block, or a non-tangential blocktransition in time. Consequently, the NC does not induce the decelerationprocess in time, aborts NC program execution during the decelerationprocess, and issues the error message "Deceleration distance too short".

Using the enhanced look-ahead function enables the compiler to adjustthe velocity profile of certain program sequences within the NC programto the maximum velocities and the acceleration capability of the individual

Enhancedlook-ahead function

Using the enhancedlook-ahead function

Page 358: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

13-10 NC Compiler Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

axis. During acceleration and deceleration processes, the compilertherefore splits the NC blocks into sub-blocks of different F values wher-ever this is necessary.

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 theprocess when an LA_ON-LA_OFF block is executed. All the other axesare 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 parame-ters for the enhanced look-ahead function. Usually, the user can employthese variables without modification. Some variables may be preassignedin 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 NCblock within the polygon sequence that is to be optimized.It must be greater than the related block cycle time.

VFBT ;Velocity factor for block transition

Explanation: This variable permits the velocity changes on non-tangen-tial block transitions to be influenced.

BBTRC ;Block buffer for tool radius compensation

Explanation: This variable specifies how many NC blocks the en-hanced look-ahead function is to take into account in ad-vance when it computes and checks the tool radius com-pensation.

TL_RADIUS ;Specify tool radius

Explanation: Using the TL_RADIUS[T No., E No.] command, the toolradii that are required for the enhanced look-ahead func-tion may be defined centrally at the beginning of the pro-gram. The compiler employs the current T No. or E No. ifa T No. or an E No. has not been specified.

Example:

:

TL_RADIUS[1234567.1]=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-aheadfunction is employed (TRC <> 0), the tool radius that, using thepredefined TL_RADIUS[T No., E No.], has been specified inthe NC program during compilation must exist during machin-ing.

Syntax

Global variables

Page 359: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Compiler Functions 13-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

TRC ;Tool radius correctionExplanation: TRC=0:The enhanced look-ahead function does

not perform radius correction.TRC=1: The enhanced look-ahead function does perform

radius path correction to the left of the contourusing the radius defined under TL_RADIUS.

TRC=2: The enhanced look-ahead function does performradius correction to the right of the contour usingthe radius defined under TL_RADIUS.

ADTRC ;Loading distance to establish the tool radius pathcompensation

Explanation: ADTRC = 0The enhanced look-ahead function does not con-sider a positioning and retracting path to employthe tool radius path correction.

ADTRC = 1For TRC = 1, the enhanced look-ahead functioninserts a straight line with a tangential transitionwith the length to be provided here in front of thefirst polygon element (first movement block afterLA_ON) and after the last polygon element

ADTRC = 2(last movement block in front of LA_OFF) forTRC = 2 if the tool radius path compensation wasactivated with TRC=1 or TRC=2.

Within the program sequence to be optimized, only those NC blocks mayexist which contain G1, G2 and G3 movements, event instructions(SE,RE), speed definitions (F), acceleration limits (ACC_EFF) and quickauxiliary function outputs (MQxxx, QQxxx and Sxxxxx.xx if "S" was pa-rameterized as a quick auxiliary function).

The end points may not be determined by variables in those NC blocks inwhich the speed profile is to process the look-ahead function.

The tool change, including the pertaining T function and the tool edgeselection, is to be performed before the enhanced look-ahead function isactivated or after it has been deactivated.

In certain program sequences and, if applicable, depending on the tool orthe workpiece weight, the resulting path acceleration must be reduced.

UsingACC_EFF ;change effective resulting path acceleration

permits the effective resulting path acceleration to be changed. This ac-celeration factor ranges from 1% to 200%.

Note: Contrary to command ACC, command ACC_EFF does notlimit the maximum path acceleration specified by process pa-rameters. It modifies the actual path acceleration according tothe specification.

Besides programming the path velocity via the F value, axis velocitiesmay also be programmed during the look-ahead function.

To specify an axis velocity, the F must immediately (without a blank) befollowed by the axis name.

F<axis name>=<axis velocity in mm/min>

Contiguous motion blocks

No variables

Tool management

Percentile accelerationcorrection

Axis-related velocities

Syntax

Page 360: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

13-12 NC Compiler Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

G01 X 2034 Z1 421 FZ1=4500 ;axis-related velocity for Z1

:

Note: If the user programs several velocities within a NC block, thatNC block and the subsequent NC blocks are executed with thelast velocity which has been specified until the next velocity in-struction is received.

Command Access Current Data ACD_COMP[...] permits access to cur-rent 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 halfthe diameter of the grinding wheel in NC variable @1:220. During compi-lation, 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 NCvariable @1:12 and sub-tract 0.2 mm .

Example: grinding needles

A given polygon curve must be traversed in forward and backward alter-nating movement at the highest velocity possible. This requires the veloc-ity curve of the programmed path movement to be optimized using theenhanced look-ahead function.

0

2

�.���%*��.

127POLY.FH7

Fig. 13-7: Velocity curve of a polygon that is to be optimized for grinding nee-dles

;Grinding needles on the XY plane;Grinding wheel radius: 2.50000;File name: TP1;(part name: TP1)T2 BSR .M6 [GRINDING WHEEL D5] Activate toolTL_RADIUS [ ] = ACD_COMP[@200] Read current tool radius for com-

pilerG0 G17 G40 G54 G71 G48 G8 G6 G98 X-0.19306Y3.49431 S1 3000 M3 Return to initial state@201=200 Loop counter for number of pen-

dulum strokes = 200.PEN @100=@101-0 BEQ .ENDPEN Terminate oscillation?F4000 Set path velocity;TRC=1 Tool radius compensation to left

of contourADTRC=1 Loading path to generate the tool

radius compensationACC_EFF=90 Modify effective path acceleration

Access to current data in the controller

Page 361: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Compiler Functions 13-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

LA_ON Enhanced look-ahead functionON

;G1 X0.8 Y1.2 Polygon curve::LA_OFF ;Enhanced look-ahead function

OFF:;@101=@101-1 BRA .PEN ;Decrement loop counter.ENDPEN BSR .ABRICH ;Call dressing cycleRTS;PROGRAM END

Notes:• In reverse programs, the "LA_OFF" command must be pro-

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

13.6 Graphic NC editor

The graphic NC editor represents an efficient and highly precise tool thatsupports parts programming. It enables the user to easily define geomet-ric elements (e.g. parts contours) graphically, and to specify their ma-chining.

At the end of the dialog box, the user may choose whether the data that isrequired for machining is to be saved in the form of NC blocks or in theform of a function call, together with the related parameters, in the NCprogram.

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

Function

Syntax

Page 362: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

13-14 NC Compiler Functions MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Note: During the setup of the process program. the following data forthe pertaining tool must be available:

• cutter position,

• tool radius,

• corner angle, and

• setting angle

Further detailed information concerning these functions of the NC com-piler can be found in the description "NC compiler"

"DOK-MTC200-NC*COMP*V23-FK01-EN-P".

Detailed description

Page 363: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Programming Practices 14-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

14 NC Programming Practices

14.1 Time-Optimized NC Programming

The following rules will help to ensure that the CNC operates at its maxi-mum performance level.

Note: Whatever can be programmed in a single NC block in terms ofsyntax should be in fact be programmed in a single NC block,provided it does not violate program flow logic.

• 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) (e.g. @12=3)

• Assignment of value to a drive date (e.g. AXD(X:S-0-0405)=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

What can be programmed in anNC block?

Page 364: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

14-2 NC Programming Practices MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example: NC program

G00S5000M03F10000 X100 Y50

Time-optimized, spindle starts after movement:G00 X100 Y50 F10000 S5000 M03

Time-optimized, spindle starts before movement:M03 S5000G00 X100 Y50 F10000

The priority to process an NC block in the NC memory is defined as fol-lows:

BlockNos.

Branchlabel G codes Variables

Axisvalues

IPOpara-meter

F value S value Auxil.function

Toolcomm-ands

Events Processcomm-ands

Programcomm-ands

N1234 .END G01 @200=x X100Y100

I0J50

F1000 S800 M03 MTP T6 SE 5 DP 1 HLT

• While all of the above NC commands can, in theory, be programmedin a single NC block, the maximum block length is limited to 240 cha-racters.

• While auxiliary M functions can be used from all 16 groups, no morethan four auxiliary functions (S, M, Q words) can be programmed in asingle NC block.

Note: Avoid repeating functions (G codes), which are already active.Remember which functions are modally active as a conse-quence 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, andassign 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!

Page 365: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

MTC 200 NC programming instruction NC Programming Practices 14-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Example:

S2 = 1400

Time-optimized:S2 1400

• 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 donot stop block process preparation.

Note: Use tool management as a parallel process through optimalprogramming.

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

NC commands that stop blockpreparation

Page 366: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

14-4 NC Programming Practices MTC 200 NC programming instruction

DOK-MTC200-NC**PRO*V23-AW01-EN-P

The positioning of the magazine in block N0002 takes place asynchro-nously to the execution of the NC program – in other words, the executionof the NC program can continue without interruption.

The TCH command will automatically wait until the unit magazine posi-tioning is completed.

CNC time data Time data with digital drives

• Block cycle time 6 ms

• Block transition time 0 ms

• Interpol. cycle time 2 ms

• Posn. contr. cyc. time 2 ms

• Fine interpolation 0.25 ms

• Posn. contr. cyc. time 0.25 ms

Page 367: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

15 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

G04G33G50, G51G63, G64G74G75 G76G77G92G93

161616161616161616

blockwiseblockwiseblockwiseblockwiseblockwiseblockwiseblockwiseblockwiseblockwise

Dwell timeThread cutting programmable zero offsetTappingReferencingTraverse to fixed pointReposition and NC block restartSpindle speed limitTime 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

The G functions which are blockwise active can be read only in the blockin which they are programmed. Otherwise a value of -1 is issued when theblockwise active G functions are read.

Page 368: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-2 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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, M311 10 modal Clamp & unclamp S3

M040, ..., M045 11 modal Gear selection S

M140, ..., M145 11 modal Gear selection S1

M240, ..., M245 12 modal Gear selection S2

M340, ..., M345 13 modal Gear selection S3

M046, M047 14 modal Spindle override

M048, M049 15 modal Feed override

M019, ..., M319,Mxxx

16 blockwise S positioning & MH-FMachine-specific functions

The M functions which are blockwise active can only be read in the blockin which they are programmed. Otherwise a value of -1 is issued when theblockwise active M functions are read.

15.3 Table of Functions

* Default state

P default can be defined in process parameters

S blockwise active

Legend for column "Function"

Page 369: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

I. G00 through G19

Function G group Meaning Description Page

G00P

1 Lin. interpolation,rapid traverse* modal

Syntax: G00; The programmed coordinates are traversed at maximum pathvelocity.

4-18

G01P

1 Lin. interpolationfeed* modal

Syntax: G01 F value; The programmed axes start and reach their end point together.

4-19

G02 1 Circular interpol.,clockwise,* modal

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

4-20

G03 1 Circular interpol.,counterclockwise,* modal

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

4-20

G04P

16 Dwell time* blockwise

Syntax: G04 F<time in seconds>; The maximum dwell time is 99999.99 seconds.

4-44

G06 15 Position with mini-mized lag* modal

Syntax: G06 ; Algorithm for positioning with minimized lag for allaxis movements. Block transitions are not rounded.

4-2

G07*

15 Interpol. w. lag* basic setting,* modal

Syntax: G07 ; Algorithm for positioning with lag for all axis move-ments. Block transitions which are not tangential will be rounded.

4-6

G08 14 Speed limited NCblock transition* modal

Syntax: G08; The interpolation function G08 is used to adjust the final endspeed to ensure that the transition to the next NC block occurs atthe highest possible speed.

4-8

G09*

14 Speed limited NCblock transition* basic position* modal

Syntax: G09; G09 reduces position differences at block transitions.

4-10

G10*

23 Disable rounding ofNC blocks with axisfilter* basic setting* modal

Syntax: G10; Disables rounding mode. Programming of "RDI=0" automaticallyenables G code G10.

4-82

G11 23 Enable rounding ofNC blocks with axisfilter* modal

Syntax: G11; Enables rounding mode. The last programmed rounding distanceRDI is effective. With a current rounding distance of 0, G11 doesnot take effect.

4-82

G15P

5 Radius program-ming* modal

Syntax: G15; The machine builder sets the defaults for radius/diameter pro-gramming in the process parameters.

3-25

G16P

5 Diameter program-ming* modal

Syntax: G16; The machine builder sets the defaults for radius/diameter pro-gramming in the process parameters.

3-25

G17P

2 Plane selection XY* modal

Syntax: G17; The machine builder sets the default plane in the process para-meters.

3-17

G18P

2 Plane selection ZX* modal

Syntax: G18; The machine builder sets the default plane in the process para-meters.

3-17

G19P

2 Plane selection YZ* modal

Syntax: G19; The machine builder sets the default plane in the process para-meters.

3-17

Page 370: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-4 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

II. G20 to G38

Function G group Meaning Description Page

G20 - G22 2 Free planeselection* modal

The 1st and 2nd axes of the plane selected with one of these Gfunctions, as well as the vertical axis, receive a specified axismeaning. Furthermore, the "Constant surface speed function(G96)" is deselected and the "Spindle speed in rpm function(G97)" and the "Linear interpolation (G01)" functions becomeactive.

3-19

G20 2 Free planeselection* modal

Syntax: G20 [1st axis of the plane] [2nd axis of the plane]{perpendic. axis}The 1st axis of the plane contains axis meaning X.The 2nd axis of the plane contains axis meaning Y.The vertical axis contains axis meaning Z.

3-18

G21 2 Free planeselection* modal

Syntax: G21 [1st axis of the plane] [2nd axis of the plane]{perpendic. axis}The 1st axis of the plane contains axis meaning Z.The 2nd axis of the plane contains axis meaning X.The vertical axis contains axis meaning Y.

3-18

G22 2 Free planeselection* modal

Syntax: G22 [1st axis of the plane] [2nd axis of the plane]{perpendic. axis}The 1st axis of the plane contains axis meaning Y.The 2nd axis of the plane contains axis meaning Z.The vertical axis contains axis meaning X.

3-18

G25 22 Adaptive feedOFF* basic setting

Syntax: G25Adaptive feed control is deactivated.

4-49

G26 22 Adaptive feedON* basic setting

Syntax: G26Adaptive feed control is activated.

4-49

G30*

17 Deselection oftransformation* basic position* modal

Syntax: G30; G30 cancels an existing coordinate transformation. Thefictitious axes may no longer be programmed.

4-73

G31 17 Facing selection* modal

Syntax: G31; The NC activates the G17 plane and the corresponding realaxes become fictive axes.

4-65

G32 17 Selection oflateral cylindersurfacemachining* modal

Syntax: G32 RI w or G32 RI=w; The NC produces straight lines and circles on a lateral cyl-inder surface. Before lateral cylinder surface machining isactivated, the activated machining plane must be spanned byat least one rotary axis.

4-70

G33 S

16 Thread cutting* blockwise

Syntax: G33 <end point> <lead> <starting angle>; G33 cuts single- or multiple-thread longitudinal, face andtapered threads using a constant lead.

4-32

G36P

21 Start-up logic forendlessly rotatingrotary axes* modal

Syntax: G36; Positioning with modulo calculation “shortest distance”.Modulo calculation can be used only with absoluteprogramming (G90).

4-63

G37P

21 Start-up logic forendlessly rotatingrotary axes* modal

Syntax: G37; Positioning with modulo calculation "positive direction".Modulo calculation can be used only with absoluteprogramming (G90).

4-63

G38P

21 Start-up logic forendlessly rotatingrotary axes* modal

Syntax: G38; Positioning with modulo calculation "negative direction".Modulo calculation can be used only with absoluteprogramming (G90).

4-64

Page 371: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

III. G40 to G59

Function G group Meaning Description Page

G40*

3 Cancel tool pathcompensation* basic setting* modal

Syntax: G40; If an active tool path compensation is canceled, the nextmove which is expected is a linear move lying in the plane.

5-80

G41 3 Tool pathcompensation, left* modal

Syntax: G41; If G42 is programmed after an active G40 or G41, the nextanticipated movement is a linear movement in the processplane.

5-80

G42 3 Tool path comp-ensation, right* modal

Syntax: G42; If G41 is programmed after an active G40 or G42, the nextanticipated movement is a linear movement in the processplane.

5-81

G43*

10 Insert transitionelement "arc"* basic setting* modal

Syntax: G43; When tool path compensation is active (G41 or G42), G43inserts an arc as the contour transition element for outsidecorners.

5-84

G44 10 Insert transitionelement "chamfer"* modal

Syntax: G44; When G41 or G42 is active, a chamfer is inserted as thecontour transition with outside corners whose transition angleexceeds 90°.

5-84

G47P

13 No tool lengthcompensation* default, * modal

Syntax: G47; When movements are being performed in the direction ofthe tool, all position data relate to the position of spindlenose.

5-87

G48P

13 Tool length comp-ensation positive* modal

Syntax: G48 ; The entered tool length is corrected in the di-rection of the main axes when the axis direction is positive.

5-87

G49 13 Tool length comp-ensation negative* modal

Syntax: G49 ; The entered tool length is corrected in the di-rection of the main axes in the negative axis direction.

5-88

G50S

16 Programmableabsolute zerooffset* blockwise

Syntax: G50 <axis designation(s)><coordinate value(s)>; Absolute offset of the machining zero point by the valueprogrammed using G50 under the address letter for the axis.

3-13

G51S

16 Programmableincremental zerooffset* blockwise

Syntax: G51 <axis designation(s)><coordinate value(s)>; Incremental offset of the machining zero point by the valueprogrammed using G50 under the address letter for the axis.

3-13

G52 4 Programmablezero point ofworkpiece* modal

Syntax: G52 <axis designation(s)><coordinate value(s)>; A workpiece zero point is programmed using the valuespecified at the axis address. All zero offsets which arealready active are canceled.

3-14

G53P

4 Cancel zero offsets* basic setting* modal

Syntax: G53; Switch from workpiece coordinate system to machinecoordinate system.

3-15

G54 - G59 4 Adjustable zerooffsets* modal

Syntax: G54-G59; Offsets are entered via the user interface. G54 - G59 arecancelled by G52 or G53.

3-9

Page 372: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-6 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

IV. G61 to G79

Function G group Meaning Description Page

G61 11 Exact stop* modal

Syntax: G61; The programmed target position is traveled to within a specifiedexact stop limit.

4-12

G62*

11 Rapid NC blocktransition* basic setting* modal

Syntax: G62; Sudden contour changes and non-tangential transitions arerounded off by programming G62.

4-14

G63 S

16 Rigid tapping* blockwise

Syntax: G63 <end point> <feed per spindle revolution [F]>; With G63, the spindle will stop at the end of movement.

4-34

G64 S

16 Rigid tapping* blockwise

Syntax: G64 <end point> <feed per spindle revolution [F]>; With G64, the spindle continues to rotate at the end of themovement.

4-34

G65 7 Floating tappingspindle as leadaxis* modal

Syntax: G65 <feed per spindle revolution[F]>; G65 is used to tap threads using non-interpolating mainspindles.

4-38

G66 8 Constant grindingwheel peripheralspeed (SUG)* modal

Syntax: G66 S <constant grinding wheel peripheral speed>; Programming G66 causes the programmed S value to beinterpreted in m/s or feet/s.

4-56

G68 20 Switch to 1st

encoder systemSyntax: G68 <[axis designation] [coordinate value = 0]><feed>; Switch to 1st encoder system (e.g. motor encoder)

3-44

G69 20 Switch to 2nd

encoder systemSyntax: G69 <[axis designation] [coordinate value = 0]><feed>; Switch to 2nd encoder system

3-44

G70P

9 Unit: Inch* modal

Syntax: G70; The machine manufacturer defines the basic programming unitin the process parameters.

3-26

G71P

9 Unit: Millimeters* modal

Syntax: G71; The machine manufacturer defines the basic programming unitin the process parameters.

3-27

G72*

18 Mirror functionOFF* basic setting,* modal

Syntax: G72; The mirror function is canceled of all axes.

3-28

G73 18 Mirror function ON* modal

Syntax: G73 <axis name>-1; The coordinates of the axes entered in the axis name are mirrorimaged.

3-28

G74 S

16 Axis homing cycle* blockwise

Syntax: G74 <axis name> <coordinate value=0> <feed>; G74 activates G40, G47, G53, G90, G94

3-32

G75 S

16 Feed to positivestop* blockwise

Syntax: G75 <axis name> <coordinate value=0> <feed>; G75 is possible with G90 or G91.

3-33

G76 S

16 Cancel all axispreloads* blockwise

Syntax: G76; G76 cancels the axis preloads on all axes which are preloadedusing G75 traverse to fixed stop.

3-35

G77 S

16 NC block restartand repositioning* blockwise

Syntax: G77 <axis designation> <coordinate value=0> <feed>; The originally programmed coordinate value (spindle speed) isrestored.

3-38

Page 373: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

G78*

19 Scaling functioncanceled* basic setting* modal

Syntax: G78; The scaling function of all axes is canceled.

3-30

G79 19 Select scalingfunction* modal

Syntax: G79 <axis name><scaling factor>; The scale for the distance to be traversed on the specified axisis increased or decreased.

3-30

Page 374: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-8 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

V. G90 through G99

Function G group Meaning Description Page

G90*

6 Input data asabsolutedimensions* basic setting* modal

Syntax: G90; All dimensions are input relative to a specified zero point.

3-3

G91 6 Input data as in-cremental values* modal

Syntax: G91; All subsequent dimension entries are stated as the differencein relation to the start/stop position.

3-4

G92S

16 Spindle speedlimitation* blockwise

Syntax: G92 S<upper spindle speed limit>; The set speed limit remains modally active.

4-58

G93S

16 Timeprogramming* blockwise

Syntax: G93 F<time in seconds>; G93 is superimposed on G94 or G95 in the NC block.

4-42

G94P

7 Velocityprogramming* basic setting* modal

Syntax: G94; The programmed F word is interpreted as feed in mm/min.G94 is superimposed by G95, G96 or G65.

4-43

G95P

7 Feed perrevolution* modal

Syntax: G95 F<feed per revolution>; The programmed F word is interpreted in mm or inches perspindle revolution.

4-43

G96P

8 Constant surfacespeed (CSS)* modal

Syntax: G96 S<constant surface speed in m/min>; The CNC determines the correct spindle speed for the currentdiameter.

4-57

G97 P 8 Spindle speed inrpm* basic setting* modal

Syntax: G97; The programmed S word is interpreted in RPM.

4-61

G98*

12 Constant feedon tool centerline* basic setting* modal

Syntax: G98; The path speed is NOT corrected in arcs if G41 or G42 isactive.

5-85

G99 12 Constant feedat the contour* modal

Syntax: G99; The path speed is corrected in arcs if G41 or G42 is active.

5-86

Page 375: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

VI. ACC through BTE

Function Meaning Description Page

ACC Programmableacceleration* modal

Syntax: ACC <constant>; The programmed constant limits the acceleration of the axis/axesprogrammed in NC block ACC.

4-16

AP Start advanceprogram

Syntax: AP <process>; The program preselected by the SP will be started for the specifiedprocess.

9-3

AXD Data exchangewith digital drives

Syntax:AXD(<axis name>: <SERCOS ID number>)AXD(<axis number>: <SERCOS ID number>); Read and write drive data using the SERCOS.

12-1

BEQ Branch if result isequal to zero

Syntax: BEQ <label>; The program continues execution if the last result is equal to zero.

9-17

BER Branch if NCevent is reset

Syntax: BER <branch label> <process number>: <event number>; The program continues execution at the specified branch label if an eventis reset.

7-5;9-17

BES Branch if NCevent is set

Syntax: BES <branch label> <process number>: <event number>; The program continues execution at the specified branch label if an eventis set.

7-5;9-16

BEV Branch on NCevent to NC sub-routine (interrupt)

Syntax: BEV <label>: <event number>; NC event monitoring is activated after executing NC command BEV. If theNC event assumes a status of 1, NC program execution continues at theNC block with the defined branch label.

7-7

BMI Branch if result isless than zero

Syntax: BMI <branch label>; The program continues execution at the specified branch label if the lastresult is less than zero.

9-17

BNE Branch if result isnot equal to zero

Syntax: BNE <label>; The program continues execution if the last result is not equal to zero.

9-17

BPL Branch if result isequal to orgreater than zero

Syntax: BPL <branch label>; The program continues execution at the specified branch label if the lastresult is equal to or greater than zero.

9-17

BRA Branch absolute Syntax: BRA <branch label>; Program execution continues at the NC block with the specified branchlabel.

9-9

BRF Branch duringreference

Syntax: BRF <branch label>; Program execution continues at the NC block with the specified branchlabel if all process axes are referenced (homed).

9-16

BSE Branch if spindleis empty

Syntax: BSE <branch label> ⇒⇒⇒⇒ BSE .SPLE; The BSE branch command is used to determine whether or not thespindle is empty.

9-16

BSR Branch to NCsubroutine

Syntax: BSR <branch label>; Program execution continues at the NC block with the branch labelspecified in the command parameter.

9-12

BST Branch with stop Syntax: BST <branch label>; The NC program branches to the defined label; the default states are set.

9-9

BTE Branch if toolT0 wasprogrammed

Syntax: BTE <branch label> ⇒⇒⇒⇒ BTE .PRT0; Program execution continues at the NC block starting with the definedbranch label if tool T0 has been programmed.

9-16

Page 376: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-10 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

VII. CEV through MMP

Function Meaning Description Page

CEV Cancel eventmonitoring(interrupt)

Syntax: CEV <event number>; Active event monitoring (BEV, JEV) is canceled.

7-8

D Selecting aD correction*modal

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.

5-90

DCD Access toD correctionsfrom NC program

Syntax: DCD([process],[memory], [value] 12-19

DEV Deactivate eventmonitoring(interrupt)

Syntax: DEV; Active event monitoring (BEV, JEV) is deactivated.

7-8

DP Define process Syntax: DP <Process>; DP informs the PLC via the corresponding gateway signal that the processwill be required for NC program execution.

9-2

E Tool edgeselection*modal

Syntax: E<constant>; The tool edge defined under the constant is preselected as the active tooledge.

10-2

EEV Activate eventmonitoring

Syntax: EEV; Deactivated event monitoring (BEV, JEV) is activated.

7-8

FAX, GAX Axis transferbetween theprocesses

Syntax: FAX (<axis designation>),GAX (<process>: <axis designation>); Free axis for another process; Get axis from another process.

9-6

HLT Programmed halt Syntax: HLT; Interrupts NC program execution; the process waits for a new start signal.

9-9

JEV Jump if NC eventis set (interrupt)

Syntax: JEV <branch label> <event number>; NC event monitoring is activated after executing NC command JEV. If theNC event assumes a status of 1, NC program execution continues at theNC block with the defined branch label.

7-8

JMP Jump to otherNC program

Syntax: JMP <program number> or <variable>; Program execution continues in the defined program.

9-10

JSR Call an NCprogram as asubroutine

Syntax: JSR <program number> or <variable>; The specified program is executed as a subroutine.

9-11

LP Lock process Syntax: LP <process>; The specified process will be set to a user-defined state. State is set.

9-4

MEN Enable toolmagazine(storage) formanual mode

Syntax: MEN; Enables the manual tool storage mode while continuing NC programexecution.

8-23

MFP Move free pocketinto changeposition

Syntax: MFP(<position>,<direction>) { (.,.) optional } or <variable>; The tool storage axis is moved to the next free pocket.

8-20

MHP Tool storage tohome position

Syntax: MHP(<direction>) { (.) optional }; Causes the tool storage axis to move to its home position (pocket 1).

8-14

MMP Move pro-grammed pocketinto position

Syntax: MMP(<position>,<direction>) { (.,.) optional }; Causes the tool storage axis to move to the pocket specified via theT word.

8-16

Page 377: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

VIII. MOP through RTS

Function Meaning Description Page

MOP Move old pocketinto position

Syntax: MOP(<position>,<direction>, <spindle>) { (.,., ) optional } ;Causes the tool storage axis to move to the pocket from which the tool wasremoved.

8-21

MRF Move tool sto-rage unit to refe-rence position

Syntax: MRF; Initiates the referencing sequence of the tool storage axis.

8-13

MRY Tool storageready?

Syntax: MRY; Stops NC program execution until the active tool storage movement iscompleted.

8-22

MTD Read/write themachine dataelements

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 fromthe machine data, but only one data element can be written at a time.

12-21

MTP Move program-med tool intoposition

Syntax: MTP(<position>,<direction>) { (.,.) optional }; Causes the tool storage axis to move to its home position (pocket 1).

8-15

NMP Negative memo-rized position

Syntax: NMP(<axis designation>); The NMP function is available only for analog drives.

12-1

O Select the offsettable for G54-G59

Syntax: O <offset table number>; Depending on the defined process parameter, offset table 0-9 can beselected. Offset table 0 is active by default.

3-11

OTD Read/write offsettable data

Syntax: OTD([NC memory],[process],[offset table], [offset],[axis]) 12-4

P Active planerotation togetherwith G50, G51,G54 - G59

Syntax: G50-G51 P<angle>; Interpolation plane rotation. Becomes active in the next NC block.

3-10

PMP Positive memo-rized position

Syntax: PMP(<axis designation>); PMP is possible only with analog drives.

POK Executioncomplete

Syntax: POK; POK can be used to define when machining is complete.

9-5

RAD Trigonometric unit= radians

Syntax: RAD; Arguments and reciprocal functions of the trigonometric functions SIN,COS, TAN, and ASIN, ACOS, ATAN in the angle unit radians.

10-5

RDI Maximum roun-ding distance

Syntax: RDI <rounding distance>; The maximum distance to the programmed data point for the start of therounding process.

4-82

RE Reset NC event Syntax: RE <process number>: <event number>; The defined event is reset via the command parameter and remains resetuntil it is set by the SE command.

7-3

RET Program end withreset

Syntax: RET; The NC program jumps to the first NC block, and activates the defaults.

9-9

REV Set reversevector

Syntax: REV <label>; The defined label identifies the NC block where NC program executioncontinues when the reverse NC program is started.

9-13

RP Start reverseprogram

Syntax: RP <process>; The specified process starts the NC program addressed by the reversevector.

9-3

RTS Return fromsubroutine

Syntax: RTS; Return to the NC program; the process is continued starting with thefollowing block.

9-12

Page 378: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-12 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

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 activeuntil it is reset by the RE command.

7-2

SP Program prese-lection forprocess

Syntax: SP <process> <program number>; The defined NC program is selected for the specified process.

9-2

SPC Select mainspindle for trans-formation * modal

Syntax: SPC <spindle number>; SPC selects the main spindle for transformation. The selection of the mainspindle must take place before selecting the transformation.

4-73

SPF Select mainspindle* modal

Syntax: SPF <spindle number>; SPF selects the main spindle for G33, G63/G64, G65, G95 and G96.

4-54

SPT Select toolspindle* modal

Syntax: SPT <spindle number>; SPT selects the tool spindle for tool edge selection E.

8-8

T Tool selectionand request

Syntax: T<constant> or T = <expression>; Preselects the tool number or location number specified under theconstant or contained in the expression.

TCH Complete toolchange

Syntax: TCH(<position>,<spindle>) { (.,.) optional }; Initiate complete tool change between tool spindle and magazine location.

8-28

TG Preselect toolgroup / read activegroup

Syntax: TG<constant>, TG=<expression>, <variable>=TG; Tool group management: A tool group is preselected as a machininggroup. The active group can be read.

8-9

TGSM Define/read toolsearch mode

Syntax: TGSM<constant>, TGSM=<expression>, <variable>=TGSM; Tool group management: Tool search mode "TGSM" is defined. This alsoresults in implicit group activation when the T word is specified. The activetool search mode can be read.

8-10

TID Equipment check Syntax: TID; Explicit execution of the equipment check: Comparison of the commandtool data (setup list) and the actual tool data (tool list)

5-2

TLD Access to tooldata from the NCprogram

Syntax: TLD([process], [addressing], [storage type / tool number], [location / tool duplo number], [tool edge], [data element],

[status],[group number], [group duplo number])

12-7

TMS Tool from maga-zine to spindle

Syntax: TMS(<position>,<spindle>) { (.,.) optional }; Initiate tool transfer (physical / logical) from the magazine pocket in thechange position to the selected tool spindle.

8-28

TPE Tool pocketempty?

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.

8-30

TSE Tool spindleempty?

Syntax: TSE; If the tool location in "Position 1" is not empty, program execution isstopped and an error message is generated.

8-30

TSM Tool from spindleto magazine

Syntax: TSM(<position>,<spindle>) { (.,.) optional }; Initiate tool transfer (physical / logical) from the selected tool spindle to themagazine pocket in the change position.

8-29

WER Wait until NCevent is reset

Syntax: WER <process number>: <event number>; Program processing is interrupted until the event is reset.

7-4

WES Wait until NCevent is set

Syntax: WES <process number>: <event number>; Program processing is interrupted until the event is set.

7-3

WP Wait for process Syntax: WP <process>; The block processing is halted until the specified process is completed.

9-3

Page 379: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

15.4 File Header

The editors that are available in the user interface are not the only meansthat may be used for creating an NC program. Any other external texteditor may also be used for that purpose.

The NC programs created in this way can not contain a file header. Whenthese NC programs are read in, the designation, identified with "*", is pro-vided as a new designation.

If the NC program does not contain a file header, it can not be checkedduring import if the file to import is an NC program. During import, the filename is offered as a new designator.

Example:

%NPG

*Progr. No. 1

%NPG

The lines of the file header have the following meaning:

Code Meaning

%NPG Identifies the file as an NC program

%MAC Identifies the file as an NC cycle

%VAR Identifies the file as an NC variable file

%EVT Identifies the file as an NC event file

%DCR Identifies the file as a D correction file

%OFT Identifies the file as an offset file

*Designator Program designator

%NPG Marks the end of the file header

%MAC Marks the end of the file header

%VAR Marks the end of the file header

%EVT Marks the end of the file header

%DCR Marks the end of the file header

%OFT Marks the end of the file header

Fig. 15-1: File header for all NC data

Externally created NC programs can be imported with or without an NCblock 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 NCsubroutine with the assistance of variables (@xxx x= 1-9), then thesesubroutines are called "NC cycles".

Further detailed information concerning these functions of the NC cyclescan be found in the description "NC cycle description"

"DOK-MTC200-CYC*DES*V22-AW01-EN-P".

Data import

NC block numbers

Cycles

Detailed description

Page 380: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-14 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Cycle Header

Creating Input Menus for CyclesUsing an enhanced cycle header enables the user to read cycles into theNC program in a menu-controlled and graphically supported manner.Reading in this context means that the parameters required for the cycleand the request are read from the enhanced cylinder header and are dis-played in a data input menu of the MT GUI. The programmer para-meterizes the cycle in the data entry page. Once the entry is terminated,the data are entered into the NC program as NC program lines. Defaultvalues and input limits can be defined; these are checked in the data en-try menu.

G89_GER.bmp

Fig. 15-2: Entering parameters for the cycle header in the GUI

The enhanced cycle header must be identified as such. This identificationconsists of a start and an end ID.

%CHBEGIN%

Explanation: CycleHeaderBEGIN

%CHEND%

Explanation: CycleHeaderEND

Header ID

Start IDsyntax

End IDsyntax

Page 381: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-15

DOK-MTC200-NC**PRO*V23-AW01-EN-P

NC VariablesNC variables to which the programmer is to assign a value in the inputmenu are entered as follows in the enhanced file header:

%V% x:yyy

Explanation: Variable

x Process number [0-6] (optional)

y Variable number [0-255]

Optionally, a default value can be entered in the enhanced file headerwhen the above-mentioned command is modified as follows:

%V% x:yyy %D%n

Explanation: D Preset value

n Default value

The values of transfer parameters can be restricted in the enhanced fileheader. In the data input menu of the GUI, the entry is checked againstthis restriction.

Three data types are available as transfer values:

a) REAL (all numbers)

REAL [123.123..456.456] [text]

Explanation:

Input menu Text

First value: Minimum value (Min)

Second value: Maximum value (Max)

[text] Comment text

With Min < Max, the delimiter between the values is "..".

The sequence is checked and must be observed.

Example:

%V% 170 REAL Security clearance%V% 171 INT [1,3] %D%0 Variant

b) INTEGER [integer numbers only)

INT [123-456] [text]

Explanation:

Input menu Text

First value: Minimum value (Min)

Second value: Maximum value (Max)

[text] Comment text

With Min < Max, the delimiter between the values is "..".

The sequence is checked and must be observed.

c) BOOLEAN (only numbers 1 and 0)(corresponds to logical "Yes" (TRUE) or "No" (FALSE))

BOOL

Explanation: 1 corresponds to TRUE0 corresponds to FALSE

Syntax

Syntax

Syntax

Syntax

Syntax

Page 382: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-16 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

EventsEvents to which the programmer is to assign a certain initial state in theinput menu are entered as follows in the enhanced file header:

%E% x:yy

Explanation: Event

x Process number [0-6]

yy Event number [0-99]

Optionally, a default value can be entered in the enhanced file headerwhen the above-mentioned command is modified as follows:

%E% x:yy %D%n

Explanation: D Preset value

n Default value

BOOL [text, text]

Explanation:

Sequence of the parameters:

Range type Range

[text] Text for TRUE

[text] Text for FALSE

The delimiter between the texts for TRUE/FALSE is ",".

Example:

%E% 0:25 BOOL [start P0,do not start P0]

%E% 0:26 BOOL [milling at bottom, milling at top] %D%1

Standard CallsIf the cycle requires special calls, these can be integrated into theenhanced cylinder header. These standard NC program lines are notchecked but are only copied into the request program. Several of theselines are possible, but no NC block continuation lines.

%N%

Explanation: NC block

Example:

%N% @140=SIN(@151+@152) @141=COS(@151+@152)

%N% G0 X=@141 Y=@140

%N% BSR .UP23 [UP23 is processed to completion]

%N% []

Syntax

Syntax

Syntax

Syntax

Page 383: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Appendix 15-17

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Graphic FileTo provide graphical support of the parameter entered in the data inputmenu, graphic files can be defined in the enhanced cycle header; theseare displayed upon a corresponding operator entry.

%GF% FILE NAME TEXT

Explanation: GraphicFile

File formats: BMP or PCX

Resolution: 226 x 262 pixels

Colors: 16

During the installation of the user interface, a basic image with the nameCYCLE000.PCX is stored in the \MT-CNC\CYCLE\GRAPH directory. Theimage can be edited using the graphic editor in the user interface.

Examples: cycle header for cycle G89 "Back spindles"

%CHBEGIN%%GF%ZYKL89.PCX%V% @171 Depth (abs)%V% @172 Safety distance (abs)%V% @173 Lift 1st main axis (inc)%V% @174 Lift 3rd main axis (inc)%V% @175 Feed%V% @176 Dwell time%N% BSR .*G89 ;Cycle call%CHEND%

Example: primary block at a lathe

%CHBEGIN%%GF% MAINBLOC.PCX%V% @1 %D% 16 INT [ 15 - 16 ] Radius/diameter program%V% @2 %D% 18 INT [ 17 - 19 ] Plane selection%V% @3 %D% 48 INT [ 47 - 49 ] Tool length correction%V% @4 %D% 54 INT [ 52 - 59 ] Zero offset%V% @5 %D% 95 INT [ 65 - 95 ] Feed program%V% @6 %D% 96 INT [ 96 - 97 ] Spindle speed program%V% @7 %D% 0 INT [ 0 - 1 ] Interpolation functions%V% @8 %D% 120 INT [ -30 - 130 ] Position of X-axis%V% @9 %D% 50 INT [ 90 - 500 ] Position of Z-axis%V% @10 %D% 200 INT [ 0 - 6000 ] Spindle RPM%V% @11 %D% 4 INT [ 3 - 5 ] Spindle rotation direction%N% G=@1 G=@2 G=@3 G=@4 G=@5 G=@6%N% G=@7 X=@8 Z=@9 S=@10 M=@11 %CHEND%

A primary block is generated in the NC program from which reference ismade to an NC cycle.

Syntax

Page 384: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

15-18 Appendix NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Page 385: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Index 16-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

16 Index

$$ 5-68

AA00.052 8-5A00.053 5-1A00.054 5-5, 5-13, 5-42A00.055 5-56, 5-57A00.056 5-56, 5-58A00.058 5-57A00.061 5-5, 5-34A00.069 5-5, 5-34A00.070 5-5, 5-63A00.074 5-5, 5-63A00.075 5-5A00.082 5-5A00.083 5-5A00.086 5-5A00.091 5-5, 5-33, 5-34, 5-64, 5-66A00.092 5-5, 5-63A00.096 5-5, 5-63ABS 10-8Absolute value function 10-8ACC 4-16ACC_EFF command 13-11Acceleration filter 4-78Access to Tool Data from NC Program 'TLD' 5-86, 12-6Access to tool data of NC program 'TLD'

General requirements 12-14Optional parameters 12-14

ACD_COMP 13-12Achsübergabe zwischen den Prozessen ‘FAX’, ‘GAX’ 9-6ACOS 10-9Activating and canceling tool path compensation

cancelling tool path compensation 'G40' 5-78constant feed at contour 'G99' 5-84constant feed on tool center line 'G98' 5-83inserting a 'chamfer' transition element 'G44' 5-82inserting transition element 'arc' 'G43' 5-82tool path compensation, left 'G41' 5-79tool path compensation, right 'G42' 5-79

Adaptive feed control 4-47Additional spindle speed limitation 4-58Additional tool carrier 8-4, 8-5, 8-6, 8-12Address label

I, J, K 10-2Address letter

Q 6-5, 10-3R 10-2S 4-52, 6-4S, S[1-3] 10-2

ADJUST 3-38ADJUST and REPOS subroutine 3-39Adjustable zero offset - G59 3-7Adjustable zero offsets - G54 3-7Adressbuchstabe

ACC 10-2, 10-3D 10-3E 10-3F 10-2O 10-3P 10-2RX, RY, RZ 10-3T 10-3

Page 386: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

16-2 Index NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

ADTRC command 13-11Alternate tool chain 5-4Alternate tool sequence 5-32Alternate tools 5-10Angle head tool 5-11Angle of rotation P See Zero offsetsAngle of skew 5-65Angle unit for trigonometric functions ‘RAD’, ‘DEG’ 10-5AP command 9-3Approach intermediate locations 8-15APR card 4-65APR function 4-39APR Sercos parameters 12-1

data exchange with digital drives ‘AXD’data block number 12-1group letter 12-1parameter set number 12-1

Data exchange with digital drives ‘AXD’Data address 12-1

Data exchange with digital drives 'AXD' 12-1SERCOS ID number 12-1

ASIN 10-9ASIN function 10-9ATAN 10-9Automatic equipment check 5-2Automatic Equipment Check 5-2Auxiliary function buffer 3-40Auxiliary functions ‘M’ 6-1

program control commandsconditional stop ‘M001’ 6-3End of NC Program ‘M002 / M030’ 6-3programmed stop (unconditional) ‘M000’ 6-3

spindle control commandsspindle counterclockwise and coolant/lubricant ON Mx14 6-3

Spindle control commands 6-3spindle positioning 6-4

Auxiliary Functions ‘M’Gear Changes 6-5

Available addresses 2-10Available adresses

Address letters 2-10AXD 3-41AXD command 12-1Axes 4-1

linear and rotary auxiliary axes 4-2Linear main axes 4-1rotary main axes 4-1

Axis filter, two-step 4-78Restrictions 4-80

Axis meaning 4-65Axis parameters 1-2Axis transfer 3-42Axis transfer between processes ‘FAX’, ‘GAX’ 9-6

free axis - FAX 9-6get axis - GAX 9-6

BBasic tool data 5-6BEQ branch command 9-17BER branch command 7-5, 9-17BES branch command 7-5, 9-16BEV command 7-7Block instructions 11-3BMI branch command 9-17BNE branch command 9-17Boring tool 5-10BPL branch command 9-17BRA branch command 9-9Branches depending on arithmetic results

Branch If Equal to Zero 'BEQ' 9-17

Page 387: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Index 16-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Branch If Greater Than or Equal to Zero 'BPL' 9-17Branch If Less Than Zero 'BMI' 9-17Branch If Not Equal to Zero 'BNE' 9-17

Branches Depending on Arithmetic Results 9-17BREAK 11-1BREAK instruction 11-5BRF branch command 9-16BSE branch command 9-16BSR command 9-12BST command 9-9BTE command 9-16Bxx.014 8-5Bxx.015 8-5Bxx.029 5-58Bxx.044 8-5Bxx.057 8-5

CCancelling tool path compensation 'G40' See Activating and Canceling ToolPath CompensationCartesian coordinate system 8-1 See Coordinate systemCEV 7-8Chamfers 13-1Chamfers and roundings 13-1

contiguous motion blocks 13-2Illegal commands 13-2No variables 13-3

Changing tools 8-8combined circular and linear interpolation See Interpolation Functions - HelicalInterpolationConditional branches 9-16

Branch if NC Event is Reset 'BER' 9-17Branch if NC Event is Set 'BES' 9-16Branch if Spindle is Empty 'BSE' 9-16Branch if T0 Was Set 'BTE' 9-16Branch upon Reference 'BRF' 9-16

Conditional jumps 3-42Constant cutting speed 8-6, 8-12Constant feed at contour 'G99' See Activating and Canceling Tool PathCompensationConstant feed on tool center line 'G98' See Activating and Canceling Tool PathCompensationConstant surface speed 'G96' See Spindle SpeedContact point 'B' 5-45CONTINUE 11-1CONTINUE instruction 11-5Control software 1-1Coordinate system 3-1Coordinate transformation

face machining 4-63lateral cylinder surface machining 4-63

COS 10-9Current grinding wheel diameter 5-65Current tool list 5-2Cycle header 15-14

creating input menus for cycles 15-14events 15-16header ID 15-14NC variables 15-15standard calls 15-16

Cycle Headergraphic file 15-17

DD corrections 1-3, 5-88

use 5-89Data exchange with digital drives with SERCOS Interface 3-41Default plane 8-1

Page 388: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

16-4 Index NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

DEG 10-5DEV 7-8Diameter programming 'G16' 3-24Dimension entry

Absolute dimension entry ‘G90’ 3-3Dimensions

incremental dimensions ‘G91’ 3-4DIN 66025

Deviation from standard with G00 4-80DP command 9-2Dwell time 'G04' See Feed

EEEV 7-8Effective radii 'RX', 'RY', 'RZ' See Rotary Axis ProgrammingElemente eines NC-Satzes 2-5Elements of a NC Block 2-5Elements of an NC block

skipping blocks 2-6Enhanced look-ahead function 13-1

ACC_EFF change effective resulting path acceleration 13-11access to current data in the controller 13-12ADTRC loading distance to establish the tool radius path compensation 13-11axis-related velocities 13-11contiguous motion blocks 13-11global variables 13-10METB minimum execution time of an NC block 13-10no variables 13-11percentual acceleration correction 13-11Possible uses 13-9TL_RADIUS specify tool radius 13-10Tool management 13-11TRC tool radius compensation 13-11

Enhanced Look-Ahead Function 13-9Equipment check 5-2Event 3-42Events

Asynchronous handling of NC eventsCall Subroutine if Event is Set 'BEV' 7-7Cancel NC Event Monitoring 'CEV' 7-8Disable NC Event Monitoring 'DEV' 7-8Enable NC Event Monitoring 'EEV' 7-8Program Branching if NC Event is Set 'JEV' 7-8

conditional branches for events 7-5Conditional branches for events

Branch if NC Event is Reset 'BER' 7-5Branch if NC Event is Set 'BES' 7-5

influencing events 7-2Influencing events

Reset Event 'RE' 7-3Set Event 'SE' 7-2Wait until NC Event is Reset 'WER' 7-4Wait until NC Event is Set 'WES' 7-3

Interrupting NC events 7-6Exact stop 4-80Exact stop limit See Interpolation conditions – exact stop limit'G61'

FF word See FeedFacing 3-40FAX 3-42, 9-6feed 4-40Feed

axis velocity 4-44dwell time 'G04' 4-43F word 4-40feed rate per spindle revolution 'G95' 4-42programmed path velocity (F) 4-44

for thread cutting

Page 389: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Index 16-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

with RZ 4-45without RZ 4-44

time programming 'G93' 4-41velocity programming 'G94' 4-42

Feed against positive stop 3-40Feed control 4-47Feed rate per spindle revolution 'G95' See FeedFeed to positive stop 3-31

cancel all axis preloads G76 3-34feed to positive stop G75 3-32

Fixed location-encoded tools 5-30Follower and Gantry axes

applications 4-75auxiliary functions for synchronized operation 4-76machine data for synchronized axis groups 4-77NC programming 4-77permissible configurations 4-76steps of a follower operation 4-76

Follower axes and gantry axes 4-75FOR 11-1FOR instruction 11-4Free plane selection 8-1Functions 15-3

GG00 4-18, 5-61, 5-62G01 4-19G02 4-20G03 4-20G04 4-43G06 4-2G07 4-5G08 4-8G09 4-10G10 4-78, 4-80G11 4-78, 4-80G15 Radius programming 3-24G17 8-1G17 plane selection XY 3-17G18 8-1G18 plane selection ZX 3-17G19 8-1G19 plane selection YZ 3-17G20 3-18, 8-1G21 3-18, 8-1G22 3-18, 8-1G30 4-70G31 4-63G32 4-68G33 4-28, 4-32G36 4-61G37 4-61G38 4-61G40 5-78, 8-8G41 5-62, 5-79G42 5-62, 5-79G43 5-82G44 5-82G47 5-85, 8-8, 8-12G48 5-58, 5-61, 5-85G49 5-58, 5-61, 5-86G50 3-7G50 absolute 3-13G51 3-7G51 incremental 3-13G52 3-7, 3-14G53 3-15G54 3-7, 8-8G54 G59 3-9

Page 390: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

16-6 Index NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

G59 3-7G61 4-80G61 – Exact stop 4-12G62 - Rapid NC Block Transition 4-14G63 - Spindle stops at the end of movement 4-34G64 - Spindle continues rotating after the end of motion 4-34G65 4-38G66 5-65G66 Constant grinding wheel peripheral speed 4-55G70 3-25G71 3-26G72 - Deactivate mirroring for all axes 3-27G73 - Activate mirroring 3-25, 3-26, 3-27G74 3-31, 8-10G75 3-32G76 3-34G77 3-37G78 - Scaling for all axes off 3-29G90 3-3G91 3-4G92 4-57G93 4-41G94 4-42G95 4-42G96 4-56, 8-6, 8-12G98 5-83G99 5-84GAX 3-42, 9-6GAX command 9-6Geometry registers 5-56Go to axes reference point ‘G74’ 3-31Graphic NC editor 13-13

function 13-13Instructions 13-13

Graphical NC editor 13-1Grinding wheel peripheral speed 4-55Grinding wheel-specific tool data 5-64Gripper 5-11

HHelical interpolation See Interpolation FunctionsHLT command 9-9HMI function

Acknowledge tool change/ tool breakage 5-57Home position 8-10Homing axes 3-40

IIF instruction 11-3IF-ELSE 11-1Inch data 3-25Inclined axis 4-50Inclined grinding wheel 5-67Inserting a chamfer transition element 'G44' See Activating and canceling toolpath compensationInserting an arc transition element 'G43' See Activating and Canceling Tool PathCompensationINT 10-8INT function 10-8Interpolation conditions 4-2Interpolation functions 4-18

circular interpolati 'G02' / 'G03'Interpolation parameters I, J, K 4-21

circular interpolation 'G02' / 'G03'circle radius programming 4-24clockwise 'G02' 4-20counterclockwise 'G03' 4-20interpolation parameters I, J, K

Page 391: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Index 16-7

DOK-MTC200-NC**PRO*V23-AW01-EN-P

machining on lathe in Z-X plane using absolute dimension input 4-24machining on lathe in Z-X plane using incremental dimension input 4-24

helical interpolation 4-26tapping 'G65' - spindle as lead axis 4-38tapping 'G65' - spindle as master axis 4-37tapping without compensating chuck 'G63' / 'G64' 4-34thread cutting 'G33' 4-28

starting point and end point coordinates for X axis 4-30taper threads 4-29thread lead 4-28thread length 4-28thread starting angle 4-28

thread sequences with 'G33' 4-32Invalid NC commands during transformation 4-64

JJerk filter 4-78JEV command 7-8JMP jump command 9-10Jogging

With nonuniform tool pocket distribution 8-20JSR command 9-11

LLA_OFF 13-10LA_ON 13-10Lateral cylinder surf. machining

plane selection 4-68Lateral cylinder surface machining 3-40, 4-67LD function 10-10Length compensation 5-58Length wear factors 5-61Level selection 3-16LG function 10-10Linear and rotary auxiliary axes See AxesLinear Main Axes 4-1LN function 10-10Location data 5-30Location-specific tool status bit 5-19LP command 9-4

MM functions 6-1M000 6-3M001 6-3M002 / M030 6-3M19 S... 6-4Machine parameter

Bxx.034 Time constant for acceleration 4-78Cxx.018 Maximumacceleration 4-78

Machining planes 8-1Macro technique 13-1, 13-5

enhancing NC functions 13-5macro 13-3

Main spindle synchronization 4-71functions 4-71Machine data for main spindle synchronization 4-74permissible configurations 4-72sequence of a synchronization operation

activate main spindle synchronization 4-73deactivate synchronization 4-73synchronization process 4-73

use 4-71Mainspindlesynchronization

sequenceofasynchronizationoperationauxiliaryfunctionsforselectingandcancelingmainspindlesynchronization 4-73

Mathematical expressions

Page 392: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

16-8 Index NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

functionstangent - TAN 10-9

Mathematical expressionsFunction

Arc-sine - ASINAngle unit - degrees 10-9

functions 10-8absolute value - ABS 10-8arc-cosine - ACOS 10-9

angle unit - radian 10-9arc-sine - ASIN 10-9arc-tangent - ATAN 10-9cosine - COS 10-9integer - INT 10-8logarithm to base 10 - LG 10-10logarithm to base 2 - LD 10-10logarithm to base e - LN 10-10power to base - E^ 10-10power to base 10 - 10^ 10-10power to base 2 - 2^ 10-10sine - SIN 10-8square root - SQRT 10-8time in seconds - TIME 10-10

FunctionsArc-cosine ACOS

Angle unit - degrees 10-9Inverse tangent - ATAN

Unit - degrees 10-10operands 10-7

constants 10-7floating-point constants 10-7

system constants 10-7operators 10-7

addition + 10-7division / 10-7multiplication 10-7remainder integer whole division (modulo) % 10-7subtraction - 10-7

parentheses 10-8Mathematical Expressions 10-6Maximum grinding wheel circumferential speed 5-65Maximum spindle speed 5-64Measurement units 3-25

millimeters 'G71' 3-26Measurements 3-3MEN 8-19METB command 13-10MFP 8-5, 8-16MHP 8-10MHP 8-5, 8-20Millimeter data 3-26Milling tool 5-10Minimum spindle speed (S min) 5-64Mirror imaging of coordinate axes ‘G72’ / 'G73

mirroring one axis 3-27Mirror imaging of coordinate axes ‘G72’ / 'G73' 3-27MMA 8-15MMP 8-5, 8-13, 8-20Modal function 13-1, 13-7

drilling holes 13-7Modal rounding and chamfering 13-8

MODF_OFF 13-7MODF_ON 13-7MODF_ON(STRI) - modal function ON 13-7MOP 8-5, 8-17Motion Blocks 4-1Motion commands 3-2

coordinate value 3-2Motion sequence 4-78, 4-80MRF 8-5, 8-10MRY 8-5, 8-19

Page 393: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Index 16-9

DOK-MTC200-NC**PRO*V23-AW01-EN-P

MTD command 12-21MTP 8-5, 8-11, 8-20Mx05 6-3Mx14 6-3Mx40 6-5Mx41 6-5Mx42 6-5Mx43 6-5Mx44 6-5

NNC compiler 13-1NC Compiler Functions 13-1NC control structures

Block instructions 11-3BREAK 11-1BREAK instruction 11-5Conditions 11-2, 11-6CONTINUE 11-1CONTINUE instruction 11-5FOR 11-1FOR instruction 11-4IF instruction 11-3IF-ELSE 11-1REPEAT-UNTIL 11-1REPEAT-UNTIL instruction 11-4SWITCH instruction 11-5SWITCH-CASE 11-1WHILE 11-1WHILE instruction 11-4

NC cycle programs 1-3NC events 1-3NC program 2-1NC program changeover between spindle and C axis See Rotary AxisProgrammingNC program package 1-3NC program restart 3-38NC program restart with ‘ADJUST’ and ‘REPOS’ 3-38NC programming 14-1NC syntax

Enhanced 11-1NC variable 1-3NC variables

Indexed 11-7NC word 2-7

numerical value 2-7NC wort

address letter 2-7NC-specific peculiarities in NC block restart 3-40Nonuniform spacing of tool positions 8-20Nonuniform tool pocket distribution 8-20Number of tool edges 5-13

OO[0-9] 3-11Offset register 5-56Offsets 3-5Operation without setup list 5-4Organization of setup lists

program-specific organization 2-1station-specific organization 2-1

Organization of setup lists 2-1OTD command 3-15, 12-4

PP 3-10Parameters 1-2

Page 394: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

16-10 Index NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

PHI 3-10PLC 3-42POK command 9-5Positions 1-4 8-20Possible allocations between AXD, OTD, TLD, MTD

allocations between AXD, OTD, TLD, DCD and MTD commandsinvalid allocations 12-25

Possible allocations between AXD, OTD, TLD, MTD, DCD 12-22allocations between AXD, OTD, TLD and MTD commands 12-25handling AXD commands

illegal allocations 12-22possible allocations 12-22

handling DCD commandsillegal allocations 12-24possible allocations 12-24

handling MTD commandsInvalid allocations 12-24possible allocations 12-24

handling OTD commandsillegal allocations 12-23possible allocations 12-23

handling TLD commands 12-23illegal allocations 12-23possible allocations 12-23

Preparing a tool 8-4Preparing tools and tool data

selecting tool spindle ‘SPT’ 8-6Preparing tools and tool data for a magazine 8-3Preparing tools and tool data for a turret 8-4Primary blocks 3-38Process control commands 9-1

Define Process 'DP' 9-2Lock Process 'LP' 9-4Select NC Program for Process 'SP' 9-2Start Advance Program 'AP' 9-3Wait for Process 'WP' 9-3

Process parameter 1-3Process-specific programming 2-4Program control commands 9-9

Branch Absolute 'BRA' 9-9Branch with Stop 'BST' 9-9Jump to Another NC Program 'JMP' 9-10Program End with Reset 'RET' 9-9Programmed Halt 'HLT' 9-9

Program organizationprogram no. 99 2-2reverse program 2-3

Program OrganizationAdvance program 2-3Program No. 0 2-2

Program structure 2-2Zero offset, absolute 3-7Zero offset, incremental 3-7Programmable absolute zero offset - G50 3-7Programmable incremental zero offset - G51 3-7Programmable work piece zero point - G52 3-7Prozess-spezifische Programmierung 2-4PxxC.MGITW 5-4, 5-29PxxC.MGNSL 5-4, 5-60PxxC.MGWTC 5-2PxxS.MGCP 8-15PxxS.MGTWO 5-39, 5-55PxxS.MGWRN 5-40, 5-55

QQ function 6-5

Page 395: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Index 16-11

DOK-MTC200-NC**PRO*V23-AW01-EN-P

RRAD 10-5Radius compensation 5-59Radius programming 'G15' 3-24Radiusverschleißfaktor 5-62RD command 13-1RDI 4-78, 4-79, 10-6RE command 7-3Read position value 3-42Read/write D corrections from the NC program 'DCD' 12-19Read/write machine data

purpose of machine datarequired data structure 12-20

Read/write machine data elements 'MTD'General requirements 12-21Verifications during access 12-21

Read/Write Machine Data 12-20Read/write zero offset data from the NC program 'OTD'

General requirements 12-5Reading and writing ZO data to/from the NC program ‘OTD’ 12-4Reading events in variable 7-10Reference position 8-10Remaining tool life in percent 5-53REPEAT-UNTIL 11-1REPEAT-UNTIL instruction 11-4Replacement tool s 5-26REPOS 3-38Reposition and restart to the contour

reposition in the automatic operating modes 3-36Repositioning and NC block restart to the contour 3-36Repositioning and restarting to contour

repositioning and restarting to destination position 'G77' 3-37RET command 9-9REV_SYNC 8-5Reverse vectors 9-13

set reverse vector ‘REV’clear reverse vectors by control-reset 9-15

Set Reverse Vector 'REV' 9-13Right-hand rule 3-1Rotary axis programming 4-60

approach logic for endlessly rotating rotary axesmodulo calculation

negative direction ‘G38’ 4-62positive direction ‘G37’ 4-62shortest path ‘G36’ 4-62

effective radii 'RX', 'RY', 'RZ' 4-60NC program changeover between spindle and C axis 4-61

changeover with rotary axis-capable main spindle drive 4-61rotary axis start-up logic

modulo calculation 4-61Rotary main axes 4-1 See AxesRound distance RDI 4-79, 10-6Rounding 13-1Rounding of NC blocks with axis filter

enabling/disabling 4-79, 4-80, 10-6Rounding within a motion sequence 4-80

Rounding of NC blocks with axis filter G11 / RDI 4-78RP command 9-3RTS command 9-12RX 4-60RY 4-60RZ 4-60

SS 4-52S max 5-64S min 5-64S word 6-5

Page 396: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

16-12 Index NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

S word for the spindle speed specification See Spindle SpeedScaling 'G78' / 'G79' 3-29Schleifspezifische Werkzeugdaten 5-64SE command 7-2Segmented tool magazines 8-6Select main spindle 'SPF' See Spindle SpeedSet Event 'SE' 7-2Setup list 5-1Setup-list-specific tool status bits 5-16SIN 10-8SIN function 10-8Skipped block 3-39Skipping blocks See Elements of an NC blockSP command 9-2SPC <spindle nummer> 4-71SPF <spindle number> 4-53Spindle control commands 3-40Spindle control commands M003, M004, M005, M013, M014 6-3Spindle speed 4-52

constant surface speed 'G96' 4-56S word for the spindle speed specification 4-52select main spindle 'SPF' 4-53spindle speed in RPM 'G97' 4-59spindle speed limitation 'G92' 4-57

Spindle speed in RPM 'G97' See Spindle SpeedSpindle speed limitation 'G92' See Spindle SpeedSPT <spindle number> 8-6SQRT 10-8SQRT function 10-8Straight circumferential grinding wheel 5-66Subroutines 9-10

Jump to NC Subroutine 'JSR' 9-11Return from NC Subroutine 'RTS' 9-12Subroutine Call 'BSR' 9-12subroutine nesting 9-11subroutine structure 9-11subroutine technique 9-10

SUG max 5-65Surface grinding wheel 5-67SWITCH instruction 11-5SWITCH-CASE 11-1S-Word as Auxiliary Function 6-5System parameters 1-2

TTAN 10-9TAN function 10-9Tapping 4-37Tapping 'G65' See Interpolation Functions See Interpolation FunctionsTapping without compensating chuck 'G63' / 'G64' See Interpolation FunctionsTCH 8-4, 8-22Technology data 5-33Theoretical edge tip 5-44Thread cutting 'G33' See Interpolation FunctionsThread sequence 4-32Thread Sequences with 'G33' See Interpolation FunctionsTID 5-2TIME 10-10TIME function 10-10Time programming 'G93' See FeedTime-optimized NC programming

CNC time data 14-4priorities 14-2programming in the NC block 14-1stopping block preparation by NC commands 14-3time data with digital drives 14-4

Time-Optimized NC Programming 14-1TL_RADIUS command 13-10TLD 5-86, 12-6

Page 397: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Index 16-13

DOK-MTC200-NC**PRO*V23-AW01-EN-P

TLD command 12-23TMS 8-23TMS 8-4, 8-23Tool change positions 8-20Tool changing commands of the NC 8-21Tool Compensation 4-65Tool data record 5-5Tool edge data 5-42Tool edge identification 5-44Tool edge invocation 8-6Tool editor

Edit 5-23, 5-24, 5-57Tool exchange 8-22Tool group 8-6Tool group data 5-35Tool group duplo number 8-6Tool Group Management 8-6Tool group number 8-6Tool identification 5-7Tool length compensation

active tool length compensation 5-85inactive tool length compensation 5-84no tool length compensation 'G47' 5-85

Tool length correction 5-84tool length correction, negative 'G49' 5-86Tool length correction, positive 'G48' 5-85

Tool life data 5-53Tool list 1-3Tool number 5-9Tool path compensation 5-68

active tool path compensation 5-69change in direction of compensation 5-78contour transitions

inside corners 5-70outside corners 5-70

insertion of arc as transition element with G43 5-70insertion of chamfer as transition element with G44 5-70

Establishment of tool path compensation at start of contour 5-74inactive tool path compensation 5-68Removal of tool path compensation at end of contour 5-76

Tool path compensation, left 'G41' See Activating and Canceling Tool PathCompensationTool path compensation, right 'G42' See Activating and Canceling Tool PathCompensationTool preselection 8-3Tool setup list 1-4Tool status (bits) 5-13Tool storage unit motion commands of the NC 8-9Tool-specific tool status bit 5-23TPE 8-24Transformation

selecting lateral cylinder surf. machining G32 4-67Transformations 4-63, 4-81

deselection of transformation G30 4-70deselection of lateral cylinder surface coordinate transformation G32 4-70

deselection of transformations G30deselection of face transformation G31 4-70

select face machining G31 4-63, 4-66select main spindle for transformation 'SPC' 4-70

translation and rotation movements 4-60Travel limits for transformation G31 4-66Traverse range limits 3-34TRC command 13-11Trigonometric functions SIN, COS, TAN 10-5TSE 8-24TSM 8-23, 8-24Turning center

selection and axis allocation 3-23Turning tool 5-10

Page 398: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

16-14 Index NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

UUnits 5-33User tool data 5-34User tool edge data 5-63Using the transformation function 4-63

VVariable Assignments and Arithmetic Functions 10-1Variables 10-1

data representation 10-1negating the contents of a variable 10-1value assignment 10-1variable assignment 10-2

acceleration factor 10-2, 10-3angle 10-2auxiliary function 10-3coordinate values of existing axes 10-2D correction 10-3effective distances 10-3feed rate 10-2G functions 10-3interpolation parameters 10-2M functions 10-4radius 10-2spindle speed 10-2tool edge number 10-3zero offset table 10-3

Variable assignmentTool number 10-3

variable assignmentsangle

angle of rotation ‘P’ 10-2starting angle ‘P’ 10-2

WWear factors 5-61Wear registers 5-57WES 7-3WHILE 11-1WHILE instruction 11-4workpiece zero point, programmable - G52 3-7WP command 9-3

ZZero offset, adjustable - G59 3-7Zero offsets 3-7

additional tool carrier 8-4, 8-5, 8-6, 8-12adjustable general offset in the zero offset table 3-15adjustable zero offsets ‘G54 - G59’ 3-9cancel zero offsets 'G53' 3-15coordinate rotation with angle of rotation 'P' 3-10programmable absolute zero offset 'G50' 3-13programmable incremental zero offset 'G51' 3-13read/write zero offset data from NC program via ‘OTD’ 3-15sum of zero offsets 3-8zero offset tables ‘O’ 3-11

Zero Offsetsprogrammable zero point of workpiece 'G52' 3-14

Zero offsets, adjustable - G54 3-7Zero points 1-4

machine reference point 3-5machine zero point 3-5workpiece zero point 3-5

Page 399: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Service & Support 17-1

DOK-MTC200-NC**PRO*V23-AW01-EN-P

17 Service & Support

17.1 Helpdesk

Unser Kundendienst-Helpdesk im Hauptwerk Lohram Main steht Ihnen mit Rat und Tat zur Seite.Sie erreichen uns

Our service helpdesk at our headquarters in Lohr amMain, Germany can assist you in all kinds of inquiries.Contact us

- telefonisch - by phone: 49 (0) 9352 40 50 60über Service Call Entry Center Mo-Fr 07:00-18:00- via Service Call Entry Center Mo-Fr 7:00 am - 6:00 pm

- per Fax - by fax: +49 (0) 9352 40 49 41

- per e-Mail - by e-mail: [email protected]

17.2 Service-Hotline

Außerhalb der Helpdesk-Zeiten ist der Servicedirekt ansprechbar unter

After helpdesk hours, contact our servicedepartment directly at

+49 (0) 171 333 88 26

oder - or +49 (0) 172 660 04 06

17.3 Internet

Unter www.boschrexroth.com finden Sieergänzende Hinweise zu Service, Reparatur undTraining sowie die aktuellen Adressen *) unsererauf den folgenden Seiten aufgeführten Vertriebs-und Servicebüros.

Verkaufsniederlassungen

Niederlassungen mit Kundendienst

Außerhalb Deutschlands nehmen Sie bitte zuerst Kontakt mitunserem für Sie nächstgelegenen Ansprechpartner auf.

*) Die Angaben in der vorliegenden Dokumentation könnenseit Drucklegung überholt sein.

At www.boschrexroth.com you may findadditional notes about service, repairs and trainingin the Internet, as well as the actual addresses *)of our sales- and service facilities figuring on thefollowing pages.

sales agencies

offices providing service

Please contact our sales / service office in your area first.

*) Data in the present documentation may have becomeobsolete since printing.

17.4 Vor der Kontaktaufnahme... - Before contacting us...

Wir können Ihnen schnell und effizient helfen wennSie folgende Informationen bereithalten:

1. detaillierte Beschreibung der Störung und derUmstände.

2. Angaben auf dem Typenschild derbetreffenden Produkte, insbesondereTypenschlüssel und Seriennummern.

3. Tel.-/Faxnummern und e-Mail-Adresse, unterdenen Sie für Rückfragen zu erreichen sind.

For quick and efficient help, please have thefollowing information ready:

1. Detailed description of the failure andcircumstances.

2. Information on the type plate of the affectedproducts, especially type codes and serialnumbers.

3. Your phone/fax numbers and e-mail address,so we can contact you in case of questions.

Page 400: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

17-2 Service & Support NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

17.5 Kundenbetreuungsstellen - Sales & Service Facilities

Deutschland – Germany vom Ausland: (0) nach Landeskennziffer weglassen!from abroad: don’t dial (0) after country code!

Vertriebsgebiet Mitte Germany Centre

Rexroth Indramat GmbHBgm.-Dr.-Nebel-Str. 2 / Postf. 135797816 Lohr am Main / 97803 Lohr

Kompetenz-Zentrum Europa

Tel.: +49 (0)9352 40-0Fax: +49 (0)9352 40-4885

S E R V I C E

C A L L E N T R Y C E N T E RMO – FR

von 07:00 - 18:00 Uhr

from 7 am – 6 pm

Tel. +49 (0) 9352 40 50 [email protected]

S E R V I C E

H O T L IN EMO – FR

von 17:00 - 07:00 Uhrfrom 5 pm - 7 am

+ SA / SOTel.: +49 (0)172 660 04 06

o d er / o rTel.: +49 (0)171 333 88 26

S E R V I C E

ERSATZTEILE / SPARESverlängerte Ansprechzeit- extended office time -

♦ nur an Werktagen- only on working days -

♦ von 07:00 - 18:00 Uhr- from 7 am - 6 pm -

Tel. +49 (0) 9352 40 42 22

Vertriebsgebiet Süd Germany South

Bosch Rexroth AGLandshuter Allee 8-1080637 München

Tel.: +49 (0)89 127 14-0Fax: +49 (0)89 127 14-490

Vertriebsgebiet West Germany West

Bosch Rexroth AGRegionalzentrum WestBorsigstrasse 1540880 Ratingen

Tel.: +49 (0)2102 409-0Fax: +49 (0)2102 409-406

+49 (0)2102 409-430

Gebiet Südwest Germany South-West

Bosch Rexroth AGService-Regionalzentrum Süd-WestSiemensstr.170736 Fellbach

Tel.: +49 (0)711 51046–0Fax: +49 (0)711 51046–248

Vertriebsgebiet Nord Germany North

Bosch Rexroth AGWalsroder Str. 9330853 Langenhagen

Tel.: +49 (0) 511 72 66 57-0Service: +49 (0) 511 72 66 57-256Fax: +49 (0) 511 72 66 57-93Service: +49 (0) 511 72 66 57-783

Vertriebsgebiet Mitte Germany Centre

Bosch Rexroth AGRegionalzentrum MitteWaldecker Straße 1364546 Mörfelden-Walldorf

Tel.: +49 (0) 61 05 702-3Fax: +49 (0) 61 05 702-444

Vertriebsgebiet Ost Germany East

Bosch Rexroth AGBeckerstraße 3109120 Chemnitz

Tel.: +49 (0)371 35 55-0Fax: +49 (0)371 35 55-333

Vertriebsgebiet Ost Germany East

Bosch Rexroth AGRegionalzentrum OstWalter-Köhn-Str. 4d04356 Leipzig

Tel.: +49 (0)341 25 61-0Fax: +49 (0)341 25 61-111

Page 401: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Service & Support 17-3

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Europa (West) - Europe (West)

vom Ausland: (0) nach Landeskennziffer weglassen, Italien: 0 nach Landeskennziffer mitwählenfrom abroad: don’t dial (0) after country code, Italy: dial 0 after country code

Austria - Österreich

Bosch Rexroth GmbHElectric Drives & ControlsStachegasse 131120 Wien

Tel.: +43 (0)1 985 25 40Fax: +43 (0)1 985 25 40-93

Austria – Österreich

Bosch Rexroth GmbHElectric Drives & ControlsIndustriepark 184061 Pasching

Tel.: +43 (0)7221 605-0Fax: +43 (0)7221 605-21

Belgium - Belgien

Bosch Rexroth NV/SAHenri Genessestraat 11070 Bruxelles

Tel: +32 (0) 2 582 31 80Fax: +32 (0) 2 582 43 10 [email protected] [email protected]

Denmark - Dänemark

BEC A/SZinkvej 68900 Randers

Tel.: +45 (0)87 11 90 60Fax: +45 (0)87 11 90 61

Great Britain – Großbritannien

Bosch Rexroth Ltd.Electric Drives & ControlsBroadway Lane, South CerneyCirencester, Glos GL7 5UH

Tel.: +44 (0)1285 863000Fax: +44 (0)1285 863030 [email protected] [email protected]

Finland - Finnland

Bosch Rexroth OyElectric Drives & ControlsAnsatie 6017 40 Vantaa

Tel.: +358 (0)9 84 91-11Fax: +358 (0)9 84 91-13 60

France - Frankreich

Bosch Rexroth SASElectric Drives & ControlsAvenue de la Trentaine(BP. 74)77503 Chelles Cedex

Tel.: +33 (0)164 72-70 00Fax: +33 (0)164 72-63 00Hotline: +33 (0)608 33 43 28

France - Frankreich

Bosch Rexroth SASElectric Drives & ControlsZI de Thibaud, 20 bd. Thibaud(BP. 1751)31084 Toulouse

Tel.: +33 (0)5 61 43 61 87Fax: +33 (0)5 61 43 94 12

France – Frankreich

Bosch Rexroth SASElectric Drives & Controls91, Bd. Irène Joliot-Curie69634 Vénissieux – CedexTel.: +33 (0)4 78 78 53 65Fax: +33 (0)4 78 78 53 62

Italy - Italien

Bosch Rexroth S.p.A.Via G. Di Vittorio, 120063 Cernusco S/N.MIHotline: +39 02 92 365 563Tel.: +39 02 92 365 1Service: +39 02 92 365 326Fax: +39 02 92 365 500Service: +39 02 92 365 503

Italy - Italien

Bosch Rexroth S.p.A.Via Paolo Veronesi, 25010148 Torino

Tel.: +39 011 224 88 11Fax: +39 011 224 88 30

Italy - Italien

Bosch Rexroth S.p.A.Via Mascia, 180053 Castellamare di Stabia NA

Tel.: +39 081 8 71 57 00Fax: +39 081 8 71 68 85

Italy - Italien

Bosch Rexroth S.p.A.Via del Progresso, 16 (Zona Ind.)35020 Padova

Tel.: +39 049 8 70 13 70Fax: +39 049 8 70 13 77

Italy - Italien

Bosch Rexroth S.p.A.Via Isonzo, 6140033 Casalecchio di Reno (Bo)

Tel.: +39 051 29 86 430Fax: +39 051 29 86 490

Netherlands - Niederlande/Holland

Bosch Rexroth Services B.V.Technical ServicesKruisbroeksestraat 1(P.O. Box 32)5281 RV BoxtelTel.: +31 (0) 411 65 16 40

+31 (0) 411 65 17 27Fax: +31 (0) 411 67 78 14

+31 (0) 411 68 28 [email protected]

Netherlands – Niederlande/Holland

Bosch Rexroth B.V.Kruisbroeksestraat 1(P.O. Box 32)5281 RV Boxtel

Tel.: +31 (0) 411 65 19 51Fax: +31 (0) 411 65 14 83 www.boschrexroth.nl

Norway - Norwegen

Bosch Rexroth ASElectric Drives & ControlsBerghagan 1 or: Box 30071405 Ski-Langhus 1402 Ski

Tel.: +47 (0) 64 86 41 00

Fax: +47 (0) 64 86 90 62

Hotline: +47 (0)64 86 94 82 [email protected]

Spain - Spanien

Bosch Rexroth S.A.Electric Drives & ControlsCentro Industrial SantigaObradors s/n08130 Santa Perpetua de MogodaBarcelona

Tel.: +34 9 37 47 94 00Fax: +34 9 37 47 94 01

Spain – Spanien

Goimendi S.A.Electric Drives & ControlsParque Empresarial ZuatzuC/ Francisco Grandmontagne no.220018 San Sebastian

Tel.: +34 9 43 31 84 21- service: +34 9 43 31 84 56Fax: +34 9 43 31 84 27- service: +34 9 43 31 84 60 [email protected]

Sweden - Schweden

Bosch Rexroth ABElectric Drives & Controls- Varuvägen 7(Service: Konsumentvägen 4, Älfsjö)125 81 Stockholm

Tel.: +46 (0)8 727 92 00Fax: +46 (0)8 647 32 77

Sweden - Schweden

Bosch Rexroth ABElectric Drives & ControlsEkvändan 7254 67 Helsingborg

Tel.: +46 (0) 42 38 88 -50Fax: +46 (0) 42 38 88 -74

Switzerland East - Schweiz Ost

Bosch Rexroth Schweiz AGElectric Drives & ControlsHemrietstrasse 28863 ButtikonTel. +41 (0) 55 46 46 111Fax +41 (0) 55 46 46 222

Switzerland West - Schweiz West

Bosch Rexroth Suisse SAAv. Général Guisan 261800 Vevey 1

Tel.: +41 (0)21 632 84 20Fax: +41 (0)21 632 84 21

Page 402: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

17-4 Service & Support NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Europa (Ost) - Europe (East)

vom Ausland: (0) nach Landeskennziffer weglassen from abroad: don’t dial (0) after country code

Czech Republic - Tschechien

Bosch -Rexroth, spol.s.r.o.Hviezdoslavova 5627 00 Brno

Tel.: +420 (0)5 48 126 358Fax: +420 (0)5 48 126 112

Czech Republic - Tschechien

DEL a.s.Strojírenská 38591 01 Zdar nad SázavouTel.: +420 566 64 3144Fax: +420 566 62 1657

Hungary - Ungarn

Bosch Rexroth Kft.Angol utca 341149 Budapest

Tel.: +36 (1) 422 3200Fax: +36 (1) 422 3201

Poland – Polen

Bosch Rexroth Sp.zo.o.ul. Staszica 105-800 Pruszków

Tel.: +48 22 738 18 00– service: +48 22 738 18 46Fax: +48 22 758 87 35– service: +48 22 738 18 42

Poland – Polen

Bosch Rexroth Sp.zo.o.Biuro Poznanul. Dabrowskiego 81/8560-529 Poznan

Tel.: +48 061 847 64 62 /-63Fax: +48 061 847 64 02

Romania - Rumänien

East Electric S.R.L.Bdul Basarabia no.250, sector 373429 Bucuresti

Tel./Fax:: +40 (0)21 255 35 07+40 (0)21 255 77 13

Fax: +40 (0)21 725 61 21 [email protected]

Romania - Rumänien

Bosch Rexroth Sp.zo.o.Str. Drobety nr. 4-10, app. 1470258 Bucuresti, Sector 2

Tel.: +40 (0)1 210 48 25+40 (0)1 210 29 50

Fax: +40 (0)1 210 29 52

Russia - Russland

Bosch Rexroth OOOWjatskaja ul. 27/15127015 Moskau

Tel.: +7-095-785 74 78+7-095 785 74 79

Fax: +7 095 785 74 77 [email protected]

Russia - Russland

ELMIS10, Internationalnaya246640 Gomel, BelarusTel.: +375/ 232 53 42 70

+375/ 232 53 21 69Fax: +375/ 232 53 37 69 [email protected]

Turkey - Türkei

Bosch Rexroth OtomasyonSan & Tic. A..S.Fevzi Cakmak Cad No. 334630 Sefaköy Istanbul

Tel.: +90 212 541 60 70Fax: +90 212 599 34 07

Turkey - Türkei

Servo Kontrol Ltd. Sti.Perpa Ticaret Merkezi B BlokKat: 11 No: 160980270 Okmeydani-Istanbul

Tel: +90 212 320 30 80Fax: +90 212 320 30 81 [email protected] www.servokontrol.com

Slowenia - Slowenien

DOMELOtoki 2164 228 Zelezniki

Tel.: +386 5 5117 152Fax: +386 5 5117 225 [email protected]

Page 403: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions Service & Support 17-5

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Africa, Asia, Australia – incl. Pacific Rim

Australia - Australien

AIMS - Australian IndustrialMachinery Services Pty. Ltd.28 Westside DriveLaverton North Vic 3026Melbourne

Tel.: +61 3 93 14 3321Fax: +61 3 93 14 3329Hotlines: +61 3 93 14 3321

+61 4 19 369 195 [email protected]

Australia - Australien

Bosch Rexroth Pty. Ltd.No. 7, Endeavour WayBraeside Victoria, 31 95Melbourne

Tel.: +61 3 95 80 39 33Fax: +61 3 95 80 17 33 [email protected]

China

Shanghai Bosch RexrothHydraulics & Automation Ltd.Waigaoqiao, Free Trade ZoneNo.122, Fu Te Dong Yi RoadShanghai 200131 - P.R.China

Tel.: +86 21 58 66 30 30Fax: +86 21 58 66 55 [email protected][email protected]

China

Shanghai Bosch RexrothHydraulics & Automation Ltd.4/f, Marine TowerNo.1, Pudong AvenueShanghai 200120 - P.R.China

Tel: +86 21 68 86 15 88Fax: +86 21 58 40 65 77

China

Bosch Rexroth China Ltd.15/F China World Trade Center1, Jianguomenwai AvenueBeijing 100004, P.R.China

Tel.: +86 10 65 05 03 80Fax: +86 10 65 05 03 79

China

Bosch Rexroth China Ltd.Guangzhou Repres. OfficeRoom 1014-1016, Metro Plaza,Tian He District, 183 Tian He Bei RdGuangzhou 510075, P.R.China

Tel.: +86 20 8755-0030+86 20 8755-0011

Fax: +86 20 8755-2387

China

Bosch Rexroth (China) Ltd.A-5F., 123 Lian Shan StreetSha He Kou DistrictDalian 116 023, P.R.China

Tel.: +86 411 46 78 930Fax: +86 411 46 78 932

China

Melchers GmbHBRC-SE, Tightening & Press-fit13 Floor Est Ocean CentreNo.588 Yanan Rd. East65 Yanan Rd. WestShanghai 200001

Tel.: +86 21 6352 8848Fax: +86 21 6351 3138

Hongkong

Bosch Rexroth (China) Ltd.6th Floor,Yeung Yiu Chung No.6 Ind Bldg.19 Cheung Shun StreetCheung Sha Wan,Kowloon, Hongkong

Tel.: +852 22 62 51 00Fax: +852 27 41 33 44

[email protected]

India - Indien

Bosch Rexroth (India) Ltd.Electric Drives & ControlsPlot. No.96, Phase IIIPeenya Industrial AreaBangalore – 560058

Tel.: +91 80 51 17 0-211...-218Fax: +91 80 83 94 345

+91 80 83 97 374

[email protected]

India - Indien

Bosch Rexroth (India) Ltd.Electric Drives & ControlsAdvance House, II FloorArk Industrial CompoundNarol Naka, Makwana RoadAndheri (East), Mumbai - 400 059

Tel.: +91 22 28 56 32 90+91 22 28 56 33 18

Fax: +91 22 28 56 32 93

[email protected]

India - Indien

Bosch Rexroth (India) Ltd.S-10, Green Park ExtensionNew Delhi – 110016

Tel.: +91 11 26 56 65 25+91 11 26 56 65 27

Fax: +91 11 26 56 68 87

[email protected]

Indonesia - Indonesien

PT. Bosch RexrothBuilding # 202, CilandakCommercial EstateJl. Cilandak KKO, Jakarta 12560

Tel.: +62 21 7891169 (5 lines)Fax: +62 21 7891170 - [email protected]

Japan

Bosch Rexroth Automation Corp.Service Center JapanYutakagaoka 1810, Meito-ku,NAGOYA 465-0035, Japan

Tel.: +81 52 777 88 41+81 52 777 88 53+81 52 777 88 79

Fax: +81 52 777 89 01

Japan

Bosch Rexroth Automation Corp.Electric Drives & Controls2F, I.R. BuildingNakamachidai 4-26-44, Tsuzuki-kuYOKOHAMA 224-0041, Japan

Tel.: +81 45 942 72 10Fax: +81 45 942 03 41

Korea

Bosch Rexroth-Korea Ltd.Electric Drives and ControlsBongwoo Bldg. 7FL, 31-7, 1GaJangchoong-dong, Jung-guSeoul, 100-391

Tel.: +82 234 061 813Fax: +82 222 641 295

Korea

Bosch Rexroth-Korea Ltd.1515-14 Dadae-Dong, Saha-guElectric Drives & ControlsPusan Metropolitan City, 604-050

Tel.: +82 51 26 00 741Fax: +82 51 26 00 747 [email protected]

Malaysia

Bosch Rexroth Sdn.Bhd.11, Jalan U8/82, Seksyen U840150 Shah AlamSelangor, Malaysia

Tel.: +60 3 78 44 80 00Fax: +60 3 78 45 48 00 [email protected] [email protected]

Singapore - Singapur

Bosch Rexroth Pte Ltd15D Tuas RoadSingapore 638520

Tel.: +65 68 61 87 33Fax: +65 68 61 18 25 sanjay.nemade

@boschrexroth.com.sg

South Africa - Südafrika

TECTRA Automation (Pty) Ltd.71 Watt Street, MeadowdaleEdenvale 1609

Tel.: +27 11 971 94 00Fax: +27 11 971 94 40Hotline: +27 82 903 29 23 [email protected]

Taiwan

Bosch Rexroth Co., Ltd.Taichung Branch1F., No. 29, Fu-Ann 5th Street,Xi-Tun Area, Taichung CityTaiwan, R.O.C.

Tel : +886 - 4 -23580400Fax: +886 - 4 -23580402 [email protected] [email protected] [email protected]

Thailand

NC Advance Technology Co. Ltd.59/76 Moo 9Ramintra road 34Tharang, Bangkhen,Bangkok 10230

Tel.: +66 2 943 70 62 +66 2 943 71 21Fax: +66 2 509 23 62Hotline +66 1 984 61 52 [email protected]

Page 404: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

17-6 Service & Support NC Programming Instructions

DOK-MTC200-NC**PRO*V23-AW01-EN-P

Nordamerika – North AmericaUSAHeadquarters - Hauptniederlassung

Bosch Rexroth CorporationElectric Drives & Controls5150 Prairie Stone ParkwayHoffman Estates, IL 60192-3707

Tel.: +1 847 6 45 36 00Fax: +1 847 6 45 62 [email protected] [email protected]

USA Central Region - Mitte

Bosch Rexroth CorporationElectric Drives & ControlsCentral Region Technical Center1701 Harmon RoadAuburn Hills, MI 48326

Tel.: +1 248 3 93 33 30Fax: +1 248 3 93 29 06

USA Southeast Region - Südwest

Bosch Rexroth CorporationElectric Drives & ControlsSoutheastern Technical Center3625 Swiftwater Park DriveSuwanee, Georgia 30124

Tel.: +1 770 9 32 32 00Fax: +1 770 9 32 19 03

USA SERVICE-HOTLINE

- 7 days x 24hrs -

+1-800-REX-ROTH+1 800 739 7684

USA East Region – Ost

Bosch Rexroth CorporationElectric Drives & ControlsCharlotte Regional Sales Office14001 South Lakes DriveCharlotte, North Carolina 28273

Tel.: +1 704 5 83 97 62+1 704 5 83 14 86

USA Northeast Region – Nordost

Bosch Rexroth CorporationElectric Drives & ControlsNortheastern Technical Center99 Rainbow RoadEast Granby, Connecticut 06026

Tel.: +1 860 8 44 83 77Fax: +1 860 8 44 85 95

USA West Region – West

Bosch Rexroth Corporation7901 Stoneridge Drive, Suite 220Pleasant Hill, California 94588

Tel.: +1 925 227 10 84Fax: +1 925 227 10 81

Canada East - Kanada Ost

Bosch Rexroth Canada CorporationBurlington Division3426 Mainway DriveBurlington, OntarioCanada L7M 1A8

Tel.: +1 905 335 5511Fax: +1 905 335 4184Hotline: +1 905 335 5511 [email protected]

Canada West - Kanada West

Bosch Rexroth Canada Corporation5345 Goring St.Burnaby, British ColumbiaCanada V7J 1R1

Tel. +1 604 205 5777Fax +1 604 205 6944Hotline: +1 604 205 5777 [email protected]

Mexico

Bosch Rexroth Mexico S.A. de C.V.Calle Neptuno 72Unidad Ind. Vallejo07700 Mexico, D.F.

Tel.: +52 55 57 54 17 11Fax: +52 55 57 54 50 [email protected]

Mexico

Bosch Rexroth S.A. de C.V.Calle Argentina No 3913Fracc. las Torres64930 Monterrey, N.L.

Tel.: +52 81 83 65 22 53+52 81 83 65 89 11+52 81 83 49 80 91

Fax: +52 81 83 65 52 [email protected]

Südamerika – South AmericaArgentina - Argentinien

Bosch Rexroth S.A.I.C."The Drive & Control Company"Rosario 2302B1606DLD CarapachayProvincia de Buenos Aires

Tel.: +54 11 4756 01 40+54 11 4756 02 40+54 11 4756 03 40+54 11 4756 04 40

Fax: +54 11 4756 01 36+54 11 4721 91 53

[email protected]

Argentina - Argentinien

NAKASEServicio Tecnico CNCCalle 49, No. 5764/66B1653AOX Villa BalesterProvincia de Buenos Aires

Tel.: +54 11 4768 36 43Fax: +54 11 4768 24 13Hotline: +54 11 155 307 6781 [email protected] [email protected] [email protected] (Service)

Brazil - Brasilien

Bosch Rexroth Ltda.Av. Tégula, 888Ponte Alta, Atibaia SPCEP 12942-440

Tel.: +55 11 4414 56 92+55 11 4414 56 84

Fax sales: +55 11 4414 57 07Fax serv.: +55 11 4414 56 86 [email protected]

Brazil - Brasilien

Bosch Rexroth Ltda.R. Dr.Humberto Pinheiro Vieira, 100Distrito Industrial [Caixa Postal 1273]89220-390 Joinville - SC

Tel./Fax: +55 47 473 58 33Mobil: +55 47 9974 6645 [email protected]

Columbia - Kolumbien

Reflutec de Colombia Ltda.Calle 37 No. 22-31Santafé de Bogotá, D.C.Colombia

Tel.: +57 1 368 82 67+57 1 368 02 59

Fax: +57 1 268 97 [email protected]@007mundo.com

Page 405: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

NC Programming Instructions

DOK-MTC200-NC**PROV23-AW01-EN-P

Notes

Page 406: Rexroth MTC 200 NC Programming Instructions Edition 01 · PDF fileRexroth MTC 200 NC Programming Instructions Application Manual Industrial Hydraulics Electric Drives and Controls

Printed in GermanyDOK-MTC200-NC**PRO*V23-AW01-EN-PR911296998

Bosch Rexroth AGElectric Drives and ControlsP.O. Box 13 5797803 Lohr, GermanyBgm.-Dr.-Nebel-Str. 297816 Lohr, GermanyPhone +49 93 52-40-50 60Fax +49 93 52-40-49 [email protected]