Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869...

589
Rexroth IndraMotion MTX Programming Manual R911314869 Edition 01 Electric Drives and Controls Pneumatics Service Linear Motion and Assembly Technologies Hydraulics

Transcript of Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869...

Page 1: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Rexroth IndraMotion MTXProgramming Manual

R911314869Edition 01

Application Manual

Electric Drivesand Controls Pneumatics Service

Linear Motion and Assembly TechnologiesHydraulics

Page 2: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

II Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Rexroth IndraMotion MTXProgramming Manual

Application Manual

DOK-MTX***-NC**PRO*V04-AW01-EN-P

Document number 120-2500-B316-01/EN

This manual provides information about:

D the standard programming of the IndraMotion MTX control.

Description ReleaseDate

Notes

120-2500-B316-01/EN 12.2005 Valid for 04VRS

E Bosch Rexroth AG, 2005

Copying this document, giving it to others and the use orcommunication of the contents thereof without express authority, areforbidden. Offenders are liable for the payment of damages. All rightsare reserved in the event of the grant of a patent or the registrationof a utility model or design (DIN 34-1).

The specified data is for product description purposes only andmay not be deemed to be guaranteed unless expressly confirmedin the contract. All rights are reserved with respect to the contentof this documentation and the availability of the product.

Bosch Rexroth Electric Drives and Controls GmbHPostfach 11 62D-64701 ErbachBerliner Straße 25D-64711 ErbachTel.: +49 (0) 60 62/78-0Fax: +49 (0) 60 62/78-4 28Dept.: BRC/ESM11 (DE), BRC/ESM6 (DiHa)

Title

Type of Documentation

Document Typecode

Internal File Reference

Purpose of Documentation

Record of Revisions

Copyright

Validity

Published by

Page 3: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Contents

Electric Drivesand Controls

IIIBosch Rexroth AGIndraMotion MTXR911314869 / 01

ContentsPage

1 Notes Regarding Safety 1-1 . . . . . . . . . . . . . . . . . . 1.1 Proper Use 1-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Qualified Personnel 1-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Safety Markings on Products 1-4 . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Safety Instructions in this Manual 1-5 . . . . . . . . . . . . . . . . . . . . . . 1.5 Safety Instructions for the Described Product 1-6 . . . . . . . . . . .

2 NC Programming Basics 2-1 . . . . . . . . . . . . . . . . . 2.1 Basic Information Regarding Standard and CPL Programming

2-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Linking NC Programs 2-5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Basic Components of an NC Program 2-7 . . . . . . . . . . . . . . . . . . 2.4 Effect of Program Words 2-17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Special Program Design Elements 2-19 . . . . . . . . . . . . . . . . . . . . . 2.6 Subroutines 2-24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7 Label Programming and Jump Instructions 2-31 . . . . . . . . . . . . . 2.8 Decision and Branch Instructions 2-37 . . . . . . . . . . . . . . . . . . . . . . 2.9 Repeat Instructions 2-41 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.10 Variable Programming 2-44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11 Reserved Instruction Words 2-59 . . . . . . . . . . . . . . . . . . . . . . . . . . 2.12 CPL Instructions 2-60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.13 Additional Basic CPL Elements 2-65 . . . . . . . . . . . . . . . . . . . . . . . . 2.14 NC Block Synchronization Commands 2-67 . . . . . . . . . . . . . . . . .

3 NC Functions with Syntax According to DIN 66025(incl. Supplements) 3-1 . . . . . . . . . . . . . . . . . . . . . .

3.1 Overview 3-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 G-Codes 3-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 M-Codes 3-85 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Feed and Speed Programming 3-95 . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Tool Correction 3-99 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4 NC Functions with High-Level Language Syntax4-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

See the appendix for an overview of all G instructions and functions.

5 CPL Functions 5-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Coordinate and Axis Values 5-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Zero Offsets 5-18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Tool Compensation 5-24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Tool Database 5-26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Placements (Inclined Plane) 5-29 . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6 General Access to XML Tables 5-32 . . . . . . . . . . . . . . . . . . . . . . . .

Page 4: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Contents

IV Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.7 Scaling 5-39 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8 System Data 5-40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.9 Variable Axis Address 5-54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.10 PLC Interface 5-55 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.11 Time Recording 5-57 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.12 Errors and Error Categories 5-58 . . . . . . . . . . . . . . . . . . . . . . . . . . 5.13 NCS Coupling 5-61 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.14 Character String Processing 5-105 . . . . . . . . . . . . . . . . . . . . . . . . . . 5.15 File Processing 5-121 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.16 Communication 5-146 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Appendix A-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1 Abbreviations A-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Overview Tables of NC Functions A-2 . . . . . . . . . . . . . . . . . . . . . A.3 ASCII Character Set A-53 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.4 Additional Key Codes A-53 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.5 Index A-54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 5: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

Electric Drivesand Controls

1-1Bosch Rexroth AGIndraMotion MTXR911314869 / 01

1 Notes Regarding SafetyL Please read this manual before programming the IndraMotion MTX or

modifying existing programs.

L Store this documentation in a place to which all users have access at alltimes.

1.1 Proper UseThis manual contains information on the proper use of the control. Ho-wever, for reasons of clarity, it cannot contain every detail of all functioncombinations possible. Likewise, it is impossible to consider every con-ceivable case of integration or operation.

A IndraMotion MTX-control is used toD program contours and the machining technology (path feed rate,

spindle speed, tool change) of a workpiece.D guide a machining tool along a programmed path.

Feed drives, spindles and auxiliary axes of a machine tool are control-led using the SERCOS interface.

Any other application is deemed improper use!

. Furthermore, a PLC with I/O components is required; in communi-cation with the actual CNC, this controls the machine processingcycles holistically and acts as a technical safety monitor.

. The faultless, safe functioning of the product presupposes propertransport, storage, erection and installation as well as careful ope-ration.

The products describedD have been developed, manufactured, tested and documented in

compliance with the safety standards. These products pose no dan-ger to persons or property if they are used in accordance with thehandling regulations and safety notes prescribed for their configura-tion, installation and proper operation.

D comply with the requirements ofD the EMC Directives (89/336/EEC, 93/68/EEC and 93/44/EEC)D the Low-Voltage Directive (73/23/EEC)D the harmonized standards EN 50081-2 and EN 50082-2

D are designed for operation in industrial environments, i.e.D no direct connection to public low-voltage power supply,D connection to the medium- or high-voltage system via a transfor-

mer.

Page 6: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

1-2 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

In residential environments, in trade and commerce as well as small ent-erprises, class A equipment may only be used if the following warning isattached:

. In a residential area, this device may cause radio interference. Insuch a case, the user may be required to introduce suitable coun-termeasures and to bear the cost of the same.

Page 7: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

Electric Drivesand Controls

1-3Bosch Rexroth AGIndraMotion MTXR911314869 / 01

1.2 Qualified Personnel

The requirements as to qualified personnel depend on the qualificationprofiles described by ZVEI (Central Association of the Electrical Indus-try) and VDMA (Association of German Machine and Plant Builders) in:Further Training in Automation Technologypublished by: ZVEI and VDMAMaschinenbauVerlagPostfach 71 08 6460498 Frankfurt, Germany

This manual is designed for NC programmers and NC project engi-neers. These persons require special knowledge ofD the operation, syntax and commands of the IndraMotion MTX stan-

dard programming..

Programming, start and operation as well as the modification of programparameters may be carried out only by properly trained personnel! Thispersonnel must be able to judge potential hazards arising from program-ming, program changes and in general from the mechanical, electrical,or electronic equipment.

Interventions in the hardware and software of our products, unless des-cribed otherwise in this manual, may be carried out only by our speciali-zed personnel.

Tampering with the hardware or software, ignoring warning signs atta-ched to the components, or non-compliance with the warning notes gi-ven in this manual may result in serious bodily injury or material damage.

Only electrotechnicians as recognized under IEV 826-09-01 (modified)who are familiar with the contents of this manual may install and servicethe products described.

Such personnel areD those who, being well trained and experienced in their field and fami-

liar with the relevant standards, are able to analyze the jobs being car-ried out and recognize any hazards which may have arisen.

D those who have acquired the same amount of expert knowledgethrough years of experience that would normally be acquired throughformal technical training.

With regard to the foregoing, please note our comprehensive range oftraining courses. Please visit our website at http://www.boschrexroth.defor the latest information concerning training courses, teachware andtraining systems.Information can also be obtained from:D our Didactic Center in Erbach,

Telephone: (+49) (0 60 62) 78-600D out training center in Lohr-Wombach,

Telephone: (+49) (0 93 52) 40 43 25.

Page 8: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

1-4 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

1.3 Safety Markings on Products

Warning of dangerous electrical voltage!

Warning of danger caused by batteries!

Components sensitive to electrostatic discharge!

Warning of hazardous light emissions (optical fiber emit-ters)!

Disconnect mains power before opening!

Lug for connecting PE conductor only!

Connection of shield conductor only

Page 9: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

Electric Drivesand Controls

1-5Bosch Rexroth AGIndraMotion MTXR911314869 / 01

1.4 Safety Instructions in this Manual

DANGEROUS ELECTRICAL VOLTAGEThis symbol is used to warn of dangerous electrical voltage. The fai-lure to observe the instructions in this manual in whole or in part mayresult in personal injury.

DANGERThis symbol is used wherever insufficient or lacking compliance with in-structions may result in personal injury.

CAUTIONThis symbol is used wherever insufficient or lacking compliance with in-structions may result in damage to equipment or data files.

. This symbol is used to draw the user’s attention to special circumstan-ces.

L This symbol is used if user activities are required.

Page 10: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

1-6 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

1.5 Safety Instructions for the Described Product

DANGERDanger of loss of life through inadequate EMERGENCY STOP de-vices!EMERGENCY STOP devices must be active and within reach in allsystem modes. Releasing an EMERGENCY STOP device must notresult in an uncontrolled restart of the system! First check the EMERGENCY STOP circuit, then switch the systemon!

DANGERIncorrect or unintentional axis movements!Always test new programs while inhibiting axis movements. Forthis purpose, as a function of the ’Execute’ mode, the control pro-vides the option to block axis movements or auxiliary functions bymeans of special softkey commands.

DANGERIncorrect or undesired control response!Rexroth accepts no liability for damage resulting from the execu-tion of an NC program, an individual NC block or the manual move-ment of axes. Furthermore, Rexroth accepts no liability for resul-ting damage which could have been avoided by programming thePLC appropriately.

DANGERRetrofits or modifications may adversely affect the safety of theproducts described!The consequences may include severe injury, damage to equip-ment, or environmental hazards. Possible retrofits or modifica-tions to the system using third-party equipment therefore must beapproved by Rexroth.

DANGERThe high output of the LED in the fiber optic connection can en-danger eyesight if viewed directly.When the converter is switched on, do not look directly at the LEDor into the open end of a short connected cable.

DANGEROUS ELECTRICAL VOLTAGEUnless described otherwise, maintenance work must be perfor-med on systems that are switched off! The system must be protec-ted against unauthorized or accidental restarting.Measuring or test activities on the live system must be carried outby qualified electrical personnel!

Page 11: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

Electric Drivesand Controls

1-7Bosch Rexroth AGIndraMotion MTXR911314869 / 01

DANGERTool or axis movements!Feed and spindle motors generate very powerful mechanical for-ces and can accelerate very quickly due to their high dynamics.D Always stay outside the danger area of a machine when the sy-

stem is on!D Never deactivate safety-relevant functions!D Report any malfunction of the unit to your servicing and repair

department immediately!

CAUTIONUse only spare parts approved by us!

ACHTUNGBeim Umgang mit Baugruppen und Bauelementen alle Vorkehrun-gen zum ESD-Schutz einhalten! Elektrostatische Entladungenvermeiden!

The following protective measures must be observed for modules andcomponents sensitive to electrostatic discharge (ESD)!D Personnel responsible for storage, transport and handling must have

been trained in ESD protection.D ESD-sensitive components must be stored and transported in the

prescribed protective packaging.D ESD-sensitive components may be handled only at special ESD

workplaces.D Personnel, working surfaces, as well as all equipment and tools

which may come into contact with ESD-sensitive components musthave the same potential (e.g. by grounding).

D Wear an approved grounding bracelet. The grounding bracelet mustbe connected with the working surface through a cable with an inte-grated 1-MΩ resistor.

D ESD-sensitive components may by no means come into contact withchargeable objects, including most plastic materials.

D When ESD-sensitive components are installed in or removed fromequipment, the equipment must be de-energized.

Page 12: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Notes Regarding Safety

1-8 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

TrademarksAll trademarks of software installed on our products upon delivery arethe property of the respective manufacturer.

Upon delivery, all installed software is copyright-protected. The softwaremay be reproduced only with our approval or in accordance with the li-cense agreement of the respective manufacturer.

PROFIBUSr is a registered trademark of the PROFIBUS Nutzerorgani-sation e.V.

SERCOS interfacet is a registered trademark of the of the Interessen-gemeinschaft SERCOS interface e.V.

Page 13: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-1Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2 NC Programming Basics

An NC control contains all the information about an NC program (partsprogram) that is required to machine a workpiece on a machine tool.

The structure of such an NC program is not fixed, so that nearly any kindof workpiece can be machined with a wide range of technologies (mil-ling, turning, grinding, etc.). The parts program contains information ab-out not only movements that the path of the tool describes relative to theworkpiece, but also about technologies.

Movement information is divided into individual elementary contourelements (straight lines, circles, spirals, splines, nurbs, etc.). The control can then carry out the movements for each of these geome-trically simple contour elements in one machining step if all the machi-ning steps are specified in the NC program in the correct sequence andwith all required boundary conditions. The required boundary conditionsconsist of, among other things, technology functions (velocities, speeds,etc.) and auxiliary machine functions (e.g. for coolants and axis clam-ping).

. Basic guidelines regarding the structure of an NC program can befound in DIN 66025.The contents of DIN 66025, ”Program structure for numericallycontrolled machines” (Parts 1 and 2) correspond to the ISO/DIS6983 and ISO/DP 6983 international standards, ”Numerical controlof machines”.

The IndraMotion MTX administrates NC programs in the ”File System” ofthe control. It is also possible to connect external drives and to run pro-grams directly from there. You can find additional information about the file system and accessrights, as well as about creating and editing parts programs, in the MTXOperating Instructions.

Each NC program has an NC program name which has to meet the ge-neral regulations for file names.D An NC program name may contain a maximum of 28 characters.D All letters, numbers and special characters ’.’ and ’_’ are permitted.D A distinction is made between capital and lowercase letters.D Filenames within a directory must be unique.D ’.’ and ’..’ are not permissible as program names.

Page 14: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-2 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.1 Basic Information Regarding Standard and CPL Programming

The control provides two ways of programming:D Standard or DIN programmingD CPL programming (CPL: Customer Programming Language).

Using standard or DIN programming, you describe the movement se-quences and their boundary conditions (geometry, kinematics, dyna-mics, corrections, etc.). Standard programming is a pure commandlanguage to control movements on the machine and to activate specificmachine functions.The syntax of the IndraMotion MTX consists of commands that are spe-cified in DIN 66025 (G- und M-codes), as well as important supplementsin the area of G-codes and additional high-level language-like syntaxelements.The basic elements of standard programming are the so-called NCfunctions; a programming syntax is assigned to each NC function. Additional parameters can be assigned to an NC function; these areused to set the parameters of the function.

Example:NC function: G2 Circular interpolation (clockwise)Parameter: I, J, K, R Center point coordinates, radius

CPL programming (Customer Programming Language) is similar tothe standard of the BASIC high-level language, but also contains Pa-scal-like structure elements. As a result, it is easy to learn. CPL is a real programming language, thus providing an alternative wayof programming. It includes program elements that lie outside the focusof machine controls; special system functions permit access to the sy-stem data of the control.

CPL programming offers the following options:D Symbolic programming with variablesD Character string processingD File processingD Mathematical operators: +, -, *, /,

and trigonometric functions, ...D Comparison operators: =, <, >, ...D Logical links: NOT, AND, OR, ...D Control structures to control the program run: REPEAT, WHILE, FOR,

IF, CASE, GOTO, ...D System functions to determine internal system states: positions, ac-

tive functions, tool data, interface signals, ...D Process services: program selection, control reset, program start,

operating mode selection

Therefore, it is possible to create and store any machining procedures invariable notation.

Page 15: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-3Bosch Rexroth AGIndraMotion MTXR911314869 / 01

In accordance with the existing formal input stipulations, CPL instruc-tions are usually written in capital letters.Using CPL leads to:D shortening of repeat procedures in NC programs and similar program

segments, andD status-dependent program variants as a result of access to control

system data.

An important difference between standard and CPL programming is thatall CPL portions are initiated as early as the time of block preparation,directly when reading the corresponding program line. The CPL portionsthus no longer exist for further block preparation and at the time of inter-polation of the NC block.

Mark CPL elements within a parts program!

Both CPL and standard programming can be used within a parts pro-gram. Due to reasons of uniqueness and, more importantly, in order tobe able to provide efficient program interpretation, the CPL portions ofthe program must be specially marked:D Program blocks that contains solely CPL elements are to be marked

directly at the start of the block by a whole-number value withouta positive/negative sign (line number).Example:20 Ax1$=”U” In CPL block 20, assign a value of ”U” to

string variable ”Ax1$”.

D If CPL elements are programmed within a standard NC block (e.g.due to symbolic variable programming), the CPL portions are to beenclosed by square brackets (”[” and ”]”). This allows a parameteri-zable value to be assigned to NC functions and to parameters of NCfunctions. Therefore, only expressions that can be placed on the rightside of an ”=” sign within CPL (variables, mathematic expressions, sy-stem functions that supply a corresponding value) are permitted wit-hin the square brackets.Example:N10 G1 Y[PCS(X)] In NC block N10, the Y-axis is to be traver-

sed to the workpiece position that was lastprogrammed for the X-axis.

N20ROT([360/A+SIN(B)])

In NC block N20, activate the Rotate in-put tool. The rotation angle is definedusing the CPL expression.

30 XPOS=100.5 In CPL block 30, a value of 100.5 is first as-signed to variable ”XPOS”.

N40 G1 X[XPOS] Y10 In NC block N40, the content of variable”XPOS” is transferred as a coordinate valueto the X-axis.

Page 16: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-4 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Pay attention to the interpretationtimes between the CPL and standard language portions!

Due to the special marking of CPL language portions, the programmercan immediately recognize which program portions have already beeninitiated during block preparation.Standard programming elements do not have an external effect on themachine before the time of block execution.Example:N523 KvProg(X[@KVX]) At the time that block N523 is executed, the

CO value for the X-axis that is used is theone that was set for permanent variable@KVX at the time of block preparation.

Up until the time that block N523 is executed, however, variable @KVXmay be set to a totally different value (for example, one that was writtenby another channel)!To avoid uncertainties, you should use the ”WAIT” function. The Waitcommand prevents block preparation until the NC block that was pro-grammed immediately before the block of interest has been completelyprocessed. Block preparation is thus synchronized with the active status(interpolation time) of the control. Then processing continues with blockpreparation of the subsequent programmed block. At this time, no otherprepared blocks exist; all have already been processed.Example:WAIT Synchronize block preparationN523 KvProg(X[@KVX]) At the time that block N523 is executed, the

CO value for the X-axis that is used is theone that was set for permanent variable@KVX at the time of block preparation. Ho-wever, since block preparation has nowbeen synchronized, it is now the active valueof the variable.

Page 17: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-5Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.2 Linking NC Programs

Subsequent to program selection, a program is first checked for propersyntax and for possible jump destinations and subroutine calls. Further-more, corresponding administration structures that the control accessesduring runtime are created for CPL variables. This process is termed lin-king (or ”preparing”).

The result of a successful linking procedure is the generation of a linktable for the corresponding NC program. All the link tables of the Indra-Motion MTX are saved to a special directory that is specified in machineparameter 3080 00004. The name of the link table of a program is deter-mined by the name of the parts program plus the extension ”.l” (l: link).

While the control is starting up, it searches the associated NC programfor all existing link tables. The search is carried out according to thesearch path set in machine parameter 3080 00001. Link tables for whichno parts program is found are erased.

If an NC program that is already linked is selected again, the IndraMotionMTX uses an existing link table, provided that the parts program has notbeen modified in the interim. Linking is carried out again after a programis changed.

Linking subroutines – subsequent linkage

In the event that subroutines are called in the program to be linked, theIndraMotion MTX checks whether valid link tables exist for the respec-tive programs. If this is the case, such subroutines will not be linkedagain. In this way, the linking procedure can be significantly shortened.

If a parts program contains no CPL portions (jumps, CPL variables, CPLexpressions, etc.), but rather only NC blocks (DIN) and subroutine calls,the program does not need to be explicitly linked before it is executed.In this case, the toggle softkey ”CPL Prog / DIN Prog” can be set to ”DINProg” when selecting a program. If necessary, subroutines are then sub-sequently linked when the program is executed; in certain cases, thismay lead to delays in the processing flow.

If subroutine calls are programmed using CPL variables (e.g. P[UP$] ),the linking procedure for this subroutine occurs no sooner than when theprogram is executed, because only then can the variable name be initia-ted. Therefore, a subroutine that is called in this manner is always subse-quently linked if a link table does not already exist.

Page 18: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-6 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Influencing the linkage process using DIN/CPL IDs

Under the prerequisites mentioned above, linking can also be influenceddirectly using instructions in the parts program, regardless of the currentposition of toggle softkey ”CPL Prog / DIN Prog”.To do this, the keyword ”(DIN)” must be programmed at the beginning ofthe first program line. If necessary, subroutines are subsequently linkedwhen the program is executed in this case also.

Each (DIN) instruction can also be programmed in the first line of a sub-routine; as a result, a subroutine that is marked in this way is not linked.Alternatively, key word ”DIN” (without parentheses) can also be writtendirectly behind the subroutine call in the calling program (also see sec-tion 2.6, Subroutines).

Analog to the (DIN) instruction, there is also keyword ”(CPL)”, which isalso programmed at the beginning of the first program line. This forcesthe generation of a link table for the corresponding program, even if it hasbeen selected using the ”DIN Prog” setting or if it was called as a subrou-tine with the DIN ID.

Link unitsIndependent link units result from subsequent linkage during the pro-gram runtime:D 1f a subroutine call is programmed using CPL variables (e.g. P[UP$]),

the calling program and the called subroutine belong to different linkunits.

D If a subroutine is programmed directly but linked subsequently (e.g.due to a DIN ID for subroutine call P UP DIN), the calling program andthe called subroutine belong to the same link unit, but all additionalsubroutines called by the subroutine belong to another link unit.

The following applies to the validity of CPL variables between programsthat belong to different link units:D Global variables are redefined for every link unit. Therefore, if global

variables with the same name exist in subroutines or programs thatbelong to different link units, these variables are independent of oneanother.

D If information regarding fixed variables is to be exchanged betweenprograms that belong to different link levels, this can be carried outonly with the help of permanent or structured CPL variables.

Page 19: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-7Bosch Rexroth AGIndraMotion MTXR911314869 / 01

HP:...N10 P UP1...

100 UP$=”UP2”...N200 P[UP$]...

...N300 UP3 DIN

SR1...N1010 P UP11 DIN...

UP11...N2010 P UP111 UP111

...

SR2...

UP3...N1010 P UP31...

UP31...

Limit of a link unit

2.3 Basic Components of an NC Program

An NC program consists of at least 1 program block.The following applies for program blocks:D A maximum of 1 contour element (e.g. straight line, arc) may be pro-

grammed for each program block.D Blank lines before or after a program block are permitted to improve

the organization/readability of the program code.D A program block may not contain more than 512 characters.D A program block is terminated by ASCII character <LINEFEED>.D A program block consists of at least one program word

(e.g. NC function, function parameter).

Page 20: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-8 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

InstructionsInstructions are program words that directly or indirectly affect the toolpath, program run, status or mode of reaction of the control. For exam-ple, all NC functions are typical instructions.Available NC functions, together with the corresponding required syntaxrules, can be found in chapter 4.

Path functions play a special role among instructions:Path functions describe in which way a position is to be approached (e.g.straight line, circle, with or without interpolation of the participating axes,approach movement in feed or rapid traverse, etc.).Examples: G0, G1, G2Path functions are often programmed in the same block as position, pathor radius specifications. In such cases, path functions always also in-itiate traverse movements.Similarly, position or path specifications that are programmed in a pro-gram block without a path function always initiate traverse movements,because some path function is always active.

Example: Path function with coordinate specificationG01 X40 Y50 Move at feedrate to X40/Y50

Path functionCoordinate specification

Additional conditionsAdditional conditions are program words with which you can set requiredtechnologies or processing boundary conditions for the machine.Important program words that function as additional conditions include:F<number> affects the feed of synchronous axesFA<number> affects the feed of asynchronous axesS<number> affects the spindle speedM<number> activates M-functions (e.g. gear range selection,

direction of spindle rotation subroutine call). Auxiliaryfunctions are also often programmed as M-functions.

T<number> selects tools

Program words are described in detail in chapter 4.

Example: Path information with additional conditionsG01 G71 X40 Y50 F250 S500 T05 M03 Move at feedrate to X40/

Y50; with programmedF-value (feedrate= 250mm/min) and S-value(speed= 500 mm/min); withspindle rotating clockwiseand prepare tool T05 in toolmagazine.

Additional conditions

Page 21: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-9Bosch Rexroth AGIndraMotion MTXR911314869 / 01

. Although such additional conditions are not used directly to des-cribe the contour or the path, they can nevertheless affect or in-itiate movements on the machine (e.g. tool magazine movements)!

2.3.1 Program WordsA program word is:1. an NC function or2. a parameter with a value or parameter list. A parameter is addres-

sed in the parts program using its syntax (address).

. NC block synchronization commands and subroutine calls arespecial cases of NC functions because they can be programmedtogether with a CPL parameter list.

Each program word always consists of one or two partial words whichcan be combined as follows:

Program word: Partial word 1: Partial word 2: Examples:

NC function Function syntax - AxAccG0G52.1

Function syntax Parameter list AxAcc(...)G0(NIPS)

Function syntax Value D5M777

Synchronization Command syntax - OFFSTOPAcommand

Command syntax CPL parameterlist

WPV[@9=10]

Subroutine SR syntax:

SR name

- P UP1

G4711

SR syntax

SR name

CPL parameterlist

P UP2[7,@25]

G81[Z,R1]

Parameters Parameter syntax Value X-23.45Y=AC(40)S250F5000

Parameter syntax Parameter list O(0,0,1)ROTAX(0,45)

. G- and M-codes can occur with or without partial word 2:D For G- and M-codes with fixed internal functions, the numerical

value is a component of the syntax, e.g. G0, G17, G54, M0, M3, M19, ... .

Page 22: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-10 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D For user-defined functions (subroutine calls and auxiliary func-tions), the numerical value is not a component of the syntax; in-stead, it represents the value for the function. These functionsare configured within the machine parameters.

Program words from NC functionsThe following applies in general:D The syntax of NC functions can consist of G- and M-codes as well as

high-level language elements.

Examples: ”G0”, ”G41”, ”G141”, ”G52.0”, ”M30”, ”Mirror(...)”You can find all the available NC functions, together with the corre-sponding syntax rules, in chapter 4.

D NC functions can contain additional parameters with which the me-thod of operation of the NC function can be controlled. Differentiationis made between 3 possible cases:D Parameters that are programmed as an independent program

word in the NC block, e.g. ”G02 X10 I1.3 J2.5 G94 F1000”. Theseare mainly parameters that are defined in DIN 66 025.

D Parameters that are programmed as a program word, but within aparameter list with specific syntax elements that is enclosed inparentheses, e.g. ”KvProg(X1.2,Y1.2)”.

D Parameters within a parameter list without specific syntax ele-ments that is enclosed in parentheses, for which only the value atthe defined position is programmed, e.g. ”Coord(0,1)”, ”Ro-tate(45)”, ”GetAxis(Z1,Z,W,REV)”.

D Parameter lists can be optional and contain at least one valid parame-ter. If several parameters exist for one parameter list, they are to beseparated from one another using commas.

. In this manual, we mark existing parameters that cannot be usedsimultaneously (alternative parameters) with the ”|” symbol bet-ween the two alternatives. The ”|” symbol is not programmed.

D Parameters from NC functions can be optional. If they are not inclu-ded in the programming, default settings that are permanently codedor are stored in the machine parameters are generally used.

. In this manual, we markD optional parameters with curly brackets andD wildcards for the values to be programmed by angle brak-

kets.Curly and angle brackets are not programmed.

Page 23: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-11Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:

Syntax rule:TangToolOri(SYM<s>,ANG<a>)

Using the syntax rule, you can see that parameters SYM and ANGare optional parameters. For SYM, a suitable value must be pro-grammed in place of wildcard <s> as well as in place of wildcard <a>for ANG. The syntax rule generally specifies which values are per-mitted for <s> and <a>.

For instance, one possible program for the syntax rule shown abovewould be ”TangToolOri(SYM4)” .

Parameter lists without specific syntax elements:All the parameters in this list type are constants that are transferred di-rectly as a numerical value or name. They must be programmed in a pre-cisely defined sequence because the meaning of each parameter isspecified solely by its position within the list.

Changing the sequence of parameters may result in a completely diffe-rent effect:

Example:GetAxis(X1,X,Y3,Y) The axes with system names X1 and Y3

transferred to the channel, where theyare assigned channel names ”X” and ”Y”.

GetAxis(X1,Y3,X,Y) The axes with system names X1 and Xare transferred to the channel, wherethey are assigned channel names ”Y3”and ”Y”.

Parameters in a parameter list without specific syntax elements can beoptional. The following applies in such cases:D Optional parameters at the start and within the list are not required;

however, the corresponding comma must be programmed. Only inthis way does the position of the parameter in the list remain unique.

D Optional parameters at the end of the list are not required; the list isthen terminated with ”)”.

Example:GetAxis(<Phy.Ax1> ,<Log.Ax1> ,<Phy.Ax2 ,<Log.Ax2> ,...)

programmed without parameters within the list: GetAxis(X,,Z)programmed without parameters at the end: GetAxis(X)

Using CPL expressions in parameter lists without specific syntax ele-ments:D If individual elements are to be transferred as an CPL expression,

each element is to be enclosed by angle brackets.

Page 24: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-12 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:Variable name as transfer parameter:10 AX1$=”U” String variable ”AX1$” receives the

content ”U”.20 AX2$=”V”:

String variable ”AX2$” receives thecontent ”V”.

N100 G17([AX1$],[AX2$]) G17 opens the working plane withaxes U and V.

Parameter lists with specific syntax elements:The sequence of all the parameters in this list type does not matter be-cause the meaning of a parameter is determined by its programmed syn-tax.

Example:”KvProg(X1.2,Y1.4,Z1.6)” and”KvProg(Z1.6,Y1.4,X1.2)” have the same effect because the individual CO values can be uniquelyassigned using axis addresses X, Y and Z.

CPL expressions can be used for both syntax elements and numericalvalues. These must be enclosed in square brackets: ”[” and ”]”.

Example:20 WERT=1.2 Assign a value of 1.2 to variable

”WERT”.

N30 KvProg(Y[WERT],X1.2) Program CO values of axes Y and X.The Y-axis receives the value contai-ned in variable ”WERT” while the X-axis receives a value of 1.2 (con-stant).

Example:40 ACHSB$=”X”:FACT%=2 Assign values of ”X” to string variable

”ACHSB$” and 2 to integer variable”FACT%”.

N50 Scale([ACHSB$][FACT%]) Switch on scaling by a factor of 2 foraxis ”X”.In the programming: Scale(X2)

Example:60 DIM PARAMETER$(10) Create a character field for a

string with a maximum length of10 characters.

70 PARAMETER$=”X2”N80 AxAcc([Parameter$]) Assign an axis acceleration of

2 m/s2 to axis ”X”.

Page 25: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-13Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Program words as parameter

Parameter with the following value:

The following applies to program words in general:D An address always starts with a letter and can consist of several cha-

racters.D Program words with an address and numbers are used to program,

for example:D axis and coordinate designations (e.g. X..., Y..., Z..., B...)D radii (R...) and interpolation parameters (I..., J..., K...)D feedrate / time values (F...)D spindle speeds and surface speeds (S..., Si=...)D external tool compensations (ED...)D D-corrections (D...)D auxiliary functions (M..., T...)

D Leading zeros must not be programmed.D Non-integers are written with a decimal point; trailing zeros may be

omitted (e.g. ”X100.500” corresponds to ”X100.5”).D If a plus sign (or none at all) is programmed, the following value is al-

ways interpreted as being positive. A negative sign declares a nega-tive value.

Example: Program word consisting of address letter and a number(here: coordinate value of the X axis)X-2407.0458

Decimal value

Value left of decimal pointSign

Address letter

Parameter with following parameter list:

The following applies to program words in general:D As a rule, the same statements apply as for program words consisting

of an address and a numberD The parameter list is programmed behind the address and is enclo-

sed by parentheses. The individual elements are to be separatedfrom one another by commas.

D The elements in the parameter list are constants that are transferreddirectly as a numerical value or name. They must be programmed in aprecisely defined sequence because the meaning of each parameteris specified solely by its position within the list.

D If individual elements are to be transferred as CPL expressions, eachelement is to be enclosed by angle brackets.

D Program words with an address and parameter list are used to pro-gram, for example

Page 26: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-14 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D spline coefficients (e.g. X(...)..., Y(...)..., Z(...)..., B(...)...)D vector orientation (O(...), ROTAX(...) )

Programming attributesWhen programming axis and coordinate positions, it is also possible toprovide a programming attribute for the programmed position value.

Without a programming attribute, the position value is interpreted accor-ding to the current modal machine status. With a programming attribute, the modal status can be overridden locallyaccording to axes/coordinates.

The IndraMotion MTX recognizes the following attributes:AC(...): The programmed position specification is interpreted abso-

lutely, regardless of G90/G91.IC(...) The programmed position specification is interpreted incre-

mentally , regardless of G90/G91.DC(...): The position programmed for an endless axis is approached

on the shortest path, regardless of the settings in the ma-chine parameters and the programming of function ”Pos-Mode”.

ACP(...): The position programmed for an endless axis is approachedwith a positive rotation direction, regardless of the settings inthe machine parameters and the programming of function”PosMode”.

ACN(...) The position programmed for an endless axis is approachedwith a negative rotation direction, regardless of the settingsin the machine parameters and the programming of function”PosMode”.

INCH(...): Regardless of G70/71, the programmed position specifica-tion is interpreted for an asynchronous linear axis.

Examples:N10 G90 G1 F1000 X10 Y=IC(15) The X-axis traverses absolutely to po-

sition 10, the Y-axis incrementally 15mm further.

N20 G91 X=AC(15) Y5 Despite G91, the X-axis traverses toabsolute position 15, the Y-axis incre-mentally 5 mm further.

N30 B=DC(90) The B-axis (endless axis) is to traverseto the 90-degree position following theshortest path.

N40 B=ACP(350) The B-axis is to traverse to the350-degree position with a positive di-rection of rotation (working path: 260degrees).

Page 27: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-15Bosch Rexroth AGIndraMotion MTXR911314869 / 01

N50 B=ACN(0) The B-axis is to be positioned at 0 de-grees with a negative direction of rota-tion (working path: 350 degrees).

Using separators between 2 partial words

Each partial word can consists of one or more characters (characterstring). Each programmable character can be classified into the follo-wing groups:D Letters: ”A” -”Z”, ”a” - ”z”D Numbers (including decimal point!): ”0”-”9”,”.”D Characters that act as separators: ” ”, ”=”, ”+”, ”-”, ”(”, ”)”D Other special characters (will not be discussed further)

A separator is to be programmed between 2 neighboring partial words if:D the partial word in front ends with a letter or a number andD the partial word in back starts with a letter or a number.

For example, this is the case,D if additional syntax follows an NC function without a value and a para-

meter list, orD if parameter syntax ends with a number and a numerical value is to be

assigned to the parameter.

Examples:

1. N10 OVE FeedForward(...) suitable separator: ” ”.

2. N20 X2=2 suitable separator: ”=”In the 2nd case, ” ” or ”+” can also be used as a separator; ”-” is also pos-sible in the case of negative value assignment.

Using separators can also be relevant for parameter lists with syntax-specific elements!

Special features for axis and coordinate designationsYou can specify which axis and coordinate designation you desire foryour control in the machine parameters:D MP 1003 00001 System axis designationD MP 7010 00010 Channel- axis designationD MP 7010 00020 Optional axis name of a channelD MP 7080 00010 Coordinate name of the channelD MP 7080 00020 Cartesian coordinate name of the channel

Axis and coordinate designations always start with a letter and can:D consist of one or more letters, where the resulting character string

may not have the same appearance as an NC function.

Page 28: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-16 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples: ”X”, ”PALETTE”D consist of one or more letters and end with a number.

Examples: ”X1”, ”PALETTE1”D In this case, a suitable separator must be programmed between the

designation and the following value: ”=”, ”+”, ”-” or a space.

Example: Axis designations ”X” and ”X2” are defined.N40 G1 X10 Axis X traverses to position 10N50 G1 X20 Axis X traverses to position 20N60 G1 X2.5 Axis X traverses to position 2.5N70 G1 X=2.2 Axis X traverses to position 2.2N80 G1 X 2.8 Axis X traverses to position 2.8N90 G1 X2 Axis X traverses to position 2N100 G1 X2 1 Axis X2 traverses to position 1N110 G1 X2=2.8 Axis X2 traverses to position 2.8N120 G1 X2+3 Axis X2 traverses to position 3N130 G1 X2-2.4 Axis X2 traverses to position -2.4

2.3.2 End of Program

A program/subroutine termination occurs in the following casesD at the end of file orD in a program line containing ”M2”, ”M02”, or ”M30”. For details concer-

ning these M-functions, refer to section 3-86.

Example::N250 ... N250 is the last program block.M30 End of program.

At the end of a subroutine, execution returns to the calling program. Allmodal states are retained (”modal”: see page 2-17).At the end of a main program, the system returns to the beginning ofthe program and waits for the next ”NC start”. If ”M2”, ”M02” or ”M30” isused as the end of a main program, the modal states are set to the M30portion of the init string.

Page 29: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-17Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.4 Effect of Program Words

Program words can have a ”modal” or ”non-modal” effect.

modal”Modal” means that a program word remains effective in every subse-quent program block until youD program the same program word with a different value,D program another program word that cancels its effect, orD specifically switch off the function of the program word.

. Sometimes, the term ”self-sustaining” is used as a synonym for”modal”.

Example for an NC parts program:N10 F1000 Set the feedrate to 1000 mm/min. F1000

acts modally.N20 G0 X0 Y0 Linear interpolation in rapid traverse to posi-

tion X0/Y0. G0 acts modally.N30 Z100 Linear interpolation in rapid traverse to posi-

tion Z100.N40 G1(IPS1) X10 Y10 Linear interpolation (in feed; with fine-scale

positioning window) with 1000 mm/min toposition X10/Y10.G1 cancels the effect of G0. G1(IPS1) acts modally.

N50 X20 Linear interpolation (in feed; with fine-scalepositioning window) with 1000 mm/min toposition X20/Y10.

N60 G1(IPS2) X30 Y30 Linear interpolation (in feed; with coarse-scale positioning window) with 1000 mm/minto position X30/Y30.G1 was programmed with another value(IPS2). G1(IPS2) acts modally.

N70 X40 Y40 F500 Linear interpolation (in feed; with coarse-scale positioning window) with 500 mm/minto position X40/Y40.F was programmed with another value(500). F500 acts modally.

N80 G0 X0 Y0 Linear interpolation in rapid traverse to posi-tion X0/Y0.G0 cancels the effect of G1(...). G0 acts modally.

N90 Scale(X2,Y2) Activate the scaling function. Scaling actsmodally.

: Scaling remains active.N200 Scale() Deactivate the scaling function.

Page 30: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-18 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Nonmodal”Nonmodal” means that a program word has an effect only in the pro-gram block in which it was programmed.

. Sometimes, the terms ”not self-sustaining” or ”local” are used assynonyms for ”nonmodal”.

Example for an NC parts program:N10 G1 F1000 Activate linear interpolation. G1 acts mo-

dally.Set the feedrate to 1000 mm/min. F1000acts modally.

N20 G75 X100 Y100 Probe G75 acts nonmodally. In this block,function G75 overrides the modal functionG1.

N30 Z100 Linear interpolation at feedrate to Z100. G1remains modally active.

Page 31: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-19Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.5 Special Program Design Elements

2.5.1 Channel Designation

You can use this to specify in which channel the corresponding programmay be used exclusively. Starting it in another channel generates a run-time error.The channel designation is written at the beginning of the program.

Syntax:

$<Channel number>

Example:N10 $2 This program can run only in channel 2.: Program instructionsM30 End of program

2.5.2 Block Numbers

D You can mark program blocks with a block number to improve the re-adability of the program code.As long as you assign unique block numbers, it is possible to programjumps to these block numbers.

D Program blocks that contain solely CPL elements must be markedwith block numbers. Such blocks are also called CPL blocks.

The following applies:D Block numbers must always be programmed as the first NC word in a

program line.D Block numbers of standard NC blocks consist of address letter ”N”

and an immediately following positive number.(Example: ”N10”, ”N10.2”).Note that CPL expressions within standard NC blocks must be enclo-sed by square brackets.

D Block numbers of pure CPL blocks consist solely of a positive num-ber, without a positive/negative sign(Example: ”10”, ”11.9”).The CPL instruction or specification of the block is programmed be-hind the block number.

D If a CPL block concludes with a ”:”, it must be followed by another CPLblock without a line number.

Page 32: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-20 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.5.3 Blank Lines in Program Code

Blank lines can be used to structure the program, thus increasing the re-adability. Blank lines are skipped by the control.

2.5.4 Remarks in a Parts Program

Remarks are skipped by the control when the program runs. Use re-marks to:D document the program code or to insert explanationsD provide remarks for entire program lines or for individual parts.

Well-remarked programs facilitate and accelerate subsequent editing,e.g. if the program needs to be changed. However, each remark charac-ter will increase the size of the program file by 1 byte.

Providing remarks for entire program lines

You can completely hide any program line, regardless whether it is astandard NC block or a CPL block. To provide remarks for entire lines:D at the beginning of the block, program a semicolon ”;” orD enclose the entire line in parentheses ”(” and ”)”.

Remarks in a standard NC block

You can program a remark at any location within a standard NC block:D Program a semicolon ”;” where the remark starts. Starting at the semi-

colon until the end of the line, the control interprets the program lineas a remark.

D Enclose completed remarks within a standard NC block with paren-theses ”(” and ”)”. This also makes it possible to program ”nested re-marks”, for example when you want to hide, within a program line, asequence that already contains a remark with parentheses.Parentheses may not be used behind functions for which a parameterlist with parentheses can be programmed as an option (e.g. G0, G1,G61), but the parameter list was not programmed.

Example:N10 G0 (<Remark text<) Invalid programming!N20 G0 (NIPS) (<Remark text<) Valid programming

D You can initiate a remark with ”//” behind a function with a possible op-tional parameter list if the list is missing. Such a remark can be optio-nally terminated with ”\\”.

Page 33: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-21Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Remarks in a CPL blockWithin a CPL block, initiate a remark with ”REM”. Starting at the REMinstruction until the end of the line, the control interprets the program lineas a remark.

Syntax:

REM <Remark text>

Example:...10 REM ***SR to demask the status word***...

Example for remarks in a parts program:: Program code; <Remark> Remark line;N10 <Standard NC block> Hide standard NC block;20 <CPL> Hide CPL block( <Remark> ) Remark line(N30 <Standard NC block>) Hide standard NC block(40 <CPL>) Hide CPL blockN50 G1 X0 Y0 ; <Remark> Remark in a standard NC blockN60 G1(IPS) (<Remark>) F1000 Completed remark in a standard

NC blockN70 X10 (Y10 (<Remark>)) ”Nested remark” in a standard NC

blockN80 G0 //<Remark> Remark behind a function for

which optional parameters couldbe programmed

N90 G0 //<Remark>\\ X0 Y0 Completed remark behind a func-tion for which optional parameterscould be programmed

100 REM <Remark> Remark in a CPL block.

Page 34: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-22 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.5.5 Notes in the User Interface

Use note programming to display note texts in the NC user interface(max. 80 characters). In this way, you can, for example, provide the ma-chine operator with the following while the program is runningD information about the current program status, orD handling instructions.

Differentiation is made between 2 possible types of notes:D Channel-specific notes:

These are deleted when the program is deselected or the channel isreset.Syntax: MSG(<Note text>)

D Cross-channel notes:These can be deleted with an overall reset.Syntax: GMSG(<Note text>)

You can also program a note to provide the machine operator with ahandling instruction. To do this, program e.g. an ”M0” in the very sameline or in the following one. In this way, you ensure that the program isinterrupted immediately after the note text is output. The rest of the pro-gram runs only after ”NC start” is pressed .

Example:: Program codeN60 (MSG Measure workpiece!) Output channel-spec. note.N70 M0 Wait for NC start button.: Program code

For reasons of compatibility, some alternative syntax variants exist fornote programming; in terms of functions, they are all equal.D Syntax variants for channel-specific notes:

(MSG <Note text>)(*MSG <Note text>)(MSG, <Note text>)(*MSG, <Note text>)

D Syntax variants for cross-channel notes:(GMSG <Note text>)(GMSG, <Note text>)

Page 35: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-23Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.5.6 Jumps in Program Execution

A consequence of increasing program size is the increased importanceof ”clean programming”. This mainly includes:D structured programming,D fault tolerance andD software ergonomics.

Generally speaking, structured programs tend to be clearer in their over-all architecture. Bundling program segments that serve related purpo-ses or containing frequently used functions into (parameterized)subroutines or into a single jump destination, with the added identifica-tion by a comprehensible designation (label), results in not only impro-ved readability, but also more efficient work because these programscan be utilized in other programs.

The following possibilities are available:D Subroutine calls

(see section 2.6, page 2-24 ff.)Use subroutines if a certain processing section occurs several timesin an identical or similar form within processing. Program this section only once (if necessary, with the possibility oftransferring parameters), save it as a program and simply call it whenneeded.This will save programming code and memory space. In addition,your programs will become clearer and easier to maintain.

D Jump instructions(see section 2.7, page 2-31 ff.)Use jump instructions to continue the program at other locations wit-hin the current program depending on the defined events (e.g. calcu-lation results).

D Decision/branch instructions(see section 2.8, page 2-37 ff.)

Use such commands if individual program blocks, different programsections or entire subroutines are to be executed depending on cer-tain conditions.

D Repeat instructions(see section 2.9, page 2-41 ff.)Use repetition operations if program sections or entire subroutinesare to be run repeatedly. You can generally also enter how often therepetition should take place.

Page 36: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-24 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.6 Subroutines

Subroutines (SR) are programs that are called using a subroutine call.Once the execution of a subroutine has been concluded, the calling pro-gram will continue to run from the point where the SR was called. A pro-gram calling itself is called a ”recursive” subroutine call.The main program (MP) is the program from which execution jumps intothe first subroutine level (SR level).Formally, no differentiation is made between main programs and sub-routines; however, only subroutines can have transfer parameters. Thefollowing applies:D Subroutines can contain standard NC blocks and CPL blocks.D Each parts program can be called by other programs as a subroutine.

However, a program is incapable of calling itself as a subroutine (re-cursive calling is not possible).

D The calling program can transfer parameters to a subroutine.D The maximum nesting depth is 8, i.e. the control can keep a maximum

of 8 subroutine levels open at the same time.D Subroutine names are case-sensitive for the control.

. For information regarding the end of a subroutine, see section2.3.2, page 2-16.

Example:Subroutine nesting. SRx: subroutine name

N1

N9N10 SR1

N11

M30 M30 M30 M30 M30

N1 N1 N1 N1

N23 SR2 N32 SR3 N44 SR8N45N33N24

...

...

MP SR1 SR2 SR7 SR8

1. SR level 2. SR level 7. SR level 8. SR level

Differentiation is made between local and modal subroutines:D Generally, subroutines are local. In this case, the subroutine is called

once at the point of calling.D On the other hand, if a modal subroutine is activated, this is called

again at every following programmed traverse movement until it is de-selected again. This is used in, for example, drilling cycles.

The IndraMotion MTX provides the following variants for calling subrou-tines:D Call with P address and subroutine name from a standard NC block

(optionally with path information).

Page 37: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-25Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D Call only with subroutine name without path information and without Paddress from a standard NC block.

D Subroutine as a self-defined G- or M-function in a standard NC block.D Activation of a modal subroutine with self-defined syntax from a stan-

dard NC block.D Call using the CALL function from a CPL block.

Subprogram call with P addressD The subroutine name is directly programmed behind the P address.

Optionally, the directory in which the subroutine is located can be inc-luded in programming.

D To improve readability, a blank can be programmed as a separatorbetween the P address and the subroutine name.

D The subroutine call must be programmed at the end of the block.Traversing movements which are programmed in the same block willbe executed prior to the subroutine call (see example).

D No more than 1 subroutine call may be programmed in a block.D The subroutine call is local (not modal).

Syntax:

P<Path><Name> DIN

where:<Path> Directory in which the subroutine is located .<Name> Name of the calling program.DIN Optional. Prevents the subroutine from being linked.

Use this parameter only if the SR does not call any CPLblocks or any additional SRs. Otherwise, an error messageoccurs during the program runtime. For further information, see the CALL command on page2-28.

Example::N40 P Drill pattern Call program "Drill pattern".N50 X100 Block N50 follows the end of the SR.:N140 G0 X10 Y0 PUP1N150 Z0:

First positioning to X10/Y0 in rapid traverse.Then call of program "SR1".Block N150 follows the end of the SR.

Page 38: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-26 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Subprogram call without P addressSubroutines can also be called directly without a preceding P address.D Only the subroutine name is programmed directly.D Path information is not possible.D The subroutine call must be programmed at the end of the block.

Traversing movements which are programmed in the same block willbe executed prior to the subroutine call (see example).

D No more than 1 subroutine call may be programmed in a block.D The subroutine call is local (not modal).

Syntax:

<Name>

where:<Name> Name of the calling program.

. Ensure that this programming variant does not cause confusionwith normal syntax!

Therefore, always give your subroutines unique names to avoid misin-terpretations by the control interpreter.

Examples::N40 XUP Call program "XUP".N50 X100 Block N50 follows the end of the SR.:N100 X1UP::::

Caution! The SR name ”X1UP” programmedhere leads to a syntax error because ”X1” isinterpreted as a coordinate of an axis named”X” and a program named ”UP” does not exist.

:N140 G0 X10 Y0 XUPN150 Z0:

First positioning to X10/Y0 in rapid traverse.Then call of program "XUP".Block N150 follows the end of the SR.

Page 39: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-27Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Self-defined subroutine calls with G and M codesIn addition to the subroutines described above, the control allows you todefineD ”nonmodal” subroutine calls using the M address

(see MP 3090 00003 and MP 3090 00004), andD ”nonmodal” subroutine calls using the G address

(see MP 3090 00001 and MP 3090 00002)yourself.

Subroutines can be assigned for a maximum of 16 user-defined G co-des and a maximum of 8 user-defined M codes; these subroutines arecalled as local (not modal) subroutines when programming the corres-ponding G or M code.

The G and M codes configured as subroutine calls may not collide withpermanently defined G and M codes.

. Please contact your system administrator for the subroutine callsthat are configured on your specific machine.

The following applies to the programming of self-defined SR calls:D Only the corresponding G or M code is programmed in the parts pro-

gram. The subroutine that is called as a result is determined by theconfiguration in the machine parameters.

D The subroutine call must be programmed at the end of the block.Traversing movements which are programmed in the same block willbe executed prior to the subprogram call.

D No more than 1 subroutine call may be programmed in a block.D The subroutine call is local (not modal).

Self-defined modal subroutine calls

Subsequent to their initial call, modal subroutines will continue to be au-tomatically executed after each traversing movement prescribed by astandard NC block. This will continue until they are deselected via a spe-cial NC function.

Modal subroutine calls, including the syntax of the switch-off function,are configured in the machine parameters (see MP 3090 00005 ff.).

A maximum of 15 modal subroutines that mutually deselect each othercan be set. The subroutine names are assigned to the freely definablesyntaxes. The maximum number of parameters that can be transferredto the corresponding subroutine must also be entered.

Page 40: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-28 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

The syntaxes of the modal subroutine calls may not collide with the per-manently defined NC functions.

. Please contact your system administrator for the subroutine callsthat are configured on your specific machine. By default, drillingcycles G80, G81-G86 and G184 are configured.

The following applies to the programming of modal SR calls:D Only the corresponding configured syntax of the modal subroutine is

programmed in the parts program. The subroutine that is called as aresult is determined by the configuration in the machine parameters.

D Only 1 subroutine call may be programmed in a block.D The subroutine call is modal, i.e. the subroutine is called again after

every programmed traverse movement until it is deselected.

Subroutine call in CPL using the CALL commandThe CALL command makes it possible to call subroutines from pure CPLprograms. The following applies to programming:D The subroutine programmed after the CALL command is called di-

rectly.D The CALL command must be programmed in its own separate CPL

block.D The subroutine call is local.

The CALL keyword is followed by the program name. This, in turn, maybe followed by transfer parameters enclosed in square brackets and, toconclude the instruction, the ”DIN” identifier (to influence the link pro-cess).

. A CPL block that includes the CALL command must not contain a”:”. Subsequent CPL commands must be programmed in a newCPL block.

Example:50 IF A% = 1 THEN%! CALL P999%” ENDIF:

Using ”DIN” identifier to influence the link process (”Preparing”)If you conclude a subroutine call by means of CALL terminated with the”DIN” identifier, the control will exclude the subroutine thus called fromthe linking process. For example, the linking process of a main programthat includes numerous SR calls can be significantly accelerated in thismanner.

Page 41: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-29Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:50 IF A% = 1 THEN51 CALL P999 DIN SR ”P999” is excluded from linking52 ENDIFM30

It is strongly recommended that you include the ”DIN” identifier in theprogram only if the called subroutineD consists exclusively of DIN blocks, andD does not call any additional subroutines.

In the event that a subroutine containing CPL elements was excludedfrom the linking process due to the presence of the ”DIN” identifier, thecontrol will return an appropriate error message at program runtime.

As an alternative, the ”DIN” identifier can be inserted as a remark intothe first line of the subroutine to be called. The control will respond byexcluding the program from the linking process.

Example: ”DIN” identifier in subroutine to be calledN10(DIN) SR ”P999” is excluded from linkingN20 ...:

Parameter transfer to subroutines

Using a CPL parameter list, parameters can be transferred to a subrou-tine. To do this, the parameters are programmed in a list enclosed bysquare CPL brackets ”[” and ”]” immediately behind the subroutine call.The individual parameters are separated by commas.

The following parameters are permitted:D NumbersD CPL string constants (in quote marks: ”<CPL string constants>”D CPL variablesD Arithmetic CPL expressions

The parameters transferred during the subroutine call are always ad-dressed via variables P1, P2, P3, etc. in accordance with the sequenceof the parameter transfer.The parameters may also be addressed by means of, for example,P1TEST, P2XYZ, etc. However, the capital letters following P1, P2, etc.,will be ignored (P1 = P1TEST = P1XYZ).

Example:D P1 has a value of 2.75 in SR P999,D P2 has the value of variable X% at the time of the parameter transferD P3 has a value of 0.

Page 42: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-30 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

If P2 is also to represent an INTEGER value in the subroutine, this can beaccomplished by attaching a % character to P2. This mode of identifyingthe type of variable can also be used with the other types of variables.In the subroutine, the value of the individual parameters can be assignedto additional variables.

Main program:50 IF A% = 1 THEN51 CALL P999 [2.75, X%, 0] Subroutine call with parameter trans-

fer52 ENDIFM30

Subroutine P999:1 FAKTOR=P1 : XVALUE%=P2% : COMPTAB%=P3%N1 G1 X[XWERT%*FAKTOR]N2 G22 K[KORRTAB%]

If a subroutineD is to be invoked with a string constant as a transfer parameter andD the invoking program is selected without linking,the PDIM command must be used.

Syntax:

PDIM <Parameter name>(<Field size>)

If the field size programmed is too small or missing entirely, the controlreports parts program error ”Invalid variable”.

Example:Main program:N10(DIN):N50 P UP[”Test”]M30

Subroutine:10 PDIM P1$(4)M30

String variable P1$ has the value ”TEST”.

Page 43: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-31Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.7 Label Programming and Jump Instructions

Jump instructions can be used to continue program execution at certainentry points.

The IndraMotion MTX offers the following functions in terms of jump in-structions:D Label programming for standard NC blocks (DIN)D Label programming for CPL blocksD GoAhead (GOA): Forwards jump to a standard NC blockD GoBack (GOB): Backwards jump to a standard NC blockD GoCond (GOC): Conditional jump to a standard NC blockD GoTo: Unconditional jump to a standard NC blockD CPL jump (GOTO): Jump to any program block

. CPL jump GOTO is already initiated at the linking time. In the stan-dard NC commands, on the other hand, the target for the jump isfirst searched while the program is running; this has a particularlyunfavorable effect on the runtime behavior when the target for thejump is far away from the jump call.

. The CPL jump GOTO must not be used to jump into a CASE-LABEL...LABEL-OTHERWISE-ENDCASE command.

. The standard NC jump commands GoAhead, GoBack, GoCond andGoTo may not be used to jump into or out of a CPL repetition orbranch instruction. This affects CPL instructions:D REPEAT – UNTILD WHILE – DO – ENDD FOR – STEP – TO – NEXTD IF – THEN – ELSE – ENDIFD CASE – LABEL ... LABEL – OTHERWISE – ENDCASE.

Labels in standard NC blocks and CPL blocks

A label is a jump marker for a jump command. The IndraMotion MTX dif-ferentiates between labels in a standard NC block (DIN) and those in aCPL block.

Label programming in a standard NC block (DIN)D The target of the jump must always be programmed directly at the

start of the block.D In the cases of blocks with a block number, the target of the jump is

located directly behind the block number, separated by a space.

Page 44: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-32 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D The label name can consist of 2 to 32 characters. Letters, underlinesand numbers are allowed, but the first two characters may not benumbers. A distinction is made between capital and lowercase let-ters.

D At the target of the jump, a colon must be programmed behind the la-bel name.

Label programming in a CPL block:D The target of the jump is located directly behind the block number, se-

parated by a space.D The label name consists of a decimal point followed by ASCII charac-

ters, starting with a capital letter.D A label may not be a variable.

GoAhead (GOA) Forwards jump to a standard NC blockContinues program execution at a jump target (label) without conditions.General rule:D The target of the jump must be defined.D In terms of the current program block, the target of the jump must be in

the direction of the end of the file.

For the required label programming, see page 2-31.

Syntax:

GoAhead <Label>

Abbreviation: GOA

where:<Label> Name of target of jump.

2 to 32 characters. Letters, underlines and numbers are allo-wed, but the first two characters may not be numbers.

Example::N40 GoAhead LABEL1:

Forwards jump to the target”LABEL1”.

N80 LABEL1::

Label programming of the target of the jump”LABEL1”.

. The standard NC jump command GoAhead may not be used tojump into or out of a CPL repetition or branch instruction. For theaffected CPL instructions, see page 2-31.

Page 45: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-33Bosch Rexroth AGIndraMotion MTXR911314869 / 01

GoBack (GOB) Backwards jump to a standard NC blockContinues program execution at a jump target (label) without conditions.General rule:D The target of the jump must be defined.D In terms of the current program block, the target of the jump must be in

the direction of the start of the file.

For the required label programming, see page 2-31.

Syntax:

GoBack <Label>

Abbreviation: GOB

where:<Label> Name of target of jump.

2 to 32 characters. Letters, underlines and numbers are allo-wed, but the first two characters may not be numbers.

. Note that it is easy to accidentally generate infinite loops when pro-gramming backwards jumps!

Example::N40 LABEL1::

Label programming of jump target ”LA-BEL1”.

N80 GoBack LABEL1:

Backwards jump to the target”LABEL1”.If no additional jump command is pro-grammed between N40 and N80, theprogram runs through an infinite loopbetween N40 and N80!

. The standard NC jump command GoBack may not be used to jumpinto or out of a CPL repetition or branch instruction. For the affec-ted CPL instructions, see page 2-31.

Page 46: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-34 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

GoCond (GOC) Conditional jump to a standard NC blockContinues program execution at an entered block number if input signal”Conditional jump” was active on the channel interface at the time ofblock preparation. General rule:D The entered block number must exist.D The entered block number can have any position within the program

file in terms of the current program block.

Syntax:

GoCond N<Number>

Abbreviation: GOC

where:<Number> Block number.

D Number in integer or real format, with max. 15 digits.D If the target block number is programmed with leading ze-

roes (e.g. ”N0020 ...”), preceding zeroes must also beprogrammed.(”GoCond N0020”).

Special features and restrictions:D Except for a possible programmed preceding block number, no addi-

tional program words are permitted in the same block.D Changes to channel interface signal ”conditional jump” within the time

between block preparation and block execution are not taken into ac-count. If this behavior is not permitted for your application, you must programa ”WAIT” function in the previous program line.

. Note that it is easy to accidentally generate infinite loops jumpingin the direction of the start of the file!

Example:10 WAITN20 GoCond N090::::

Pause block preparation until all blocks be-fore N20 have been processed. Then jump to N090 if input signal ”Conditio-nal jump” is active at the time of block pre-paration of N20.

N090 ...:

. The standard NC jump command GoCond may not be used to jumpinto or out of a CPL repetition or branch instruction. For the affec-ted CPL instructions, see page 2-31.

Page 47: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-35Bosch Rexroth AGIndraMotion MTXR911314869 / 01

GoTo Unconditional jump to a standard NC blockContinues program execution at any block number without conditions.General rule:D The entered block number must exist.D The entered block number can have any position within the program

file in terms of the current program block.

Syntax:

GoTo N<Number>

where:<Number> Block number.

D Number in integer or real format, with max. 15 digits.D If the target block number is programmed with leading ze-

roes (e.g. ”N0020 ...”), preceding zeroes must also beprogrammed here (”GoTo N0020”).

Special features and restrictions:D Except for a possible programmed preceding block number, no addi-

tional program words are permitted in the same block.

. Note that it is easy to accidentally generate infinite loops jumpingin the direction of the start of the file!

Example::N40 GoTo N080:

Forwards jump to block N080.

N080 GoTo N40:

Backwards jump to block N40.If no additional jump command is program-med between N40 and N080, the programruns through an infinite loop between N40and N080!

. The standard NC jump command GoTo may not be used to jumpinto or out of a CPL repetition or branch instruction. For the affec-ted CPL instructions, see page 2-31.

Page 48: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-36 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

CPL-Sprung (GOTO) Jump to any program blockContinues program execution at a jump target without conditions. Gene-ral rule:D A specified jump destination can be a CPL block number, a standard

NC block number or a ”label” (jump marker).D The target of the jump can have any position within the program file in

terms of the current program block.

Syntax:

GOTO <Target>

Example:10 GOTO N20 Jump to block N20N20 X10030 GOTO 120 Jump to CPL block 120...120 GOTO .ZIEL1 Jump to label .ZIEL1...150 .ZIEL1

. The CPL jump GOTO must not be used to jump into a CASE-LABEL...LABEL-OTHERWISE-ENDCASE command.

For label programming conditions, see page 2-32.

Page 49: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-37Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.8 Decision and Branch Instructions

Decision and branch instructions are used to execute individual programblocks and sections or entire subroutines depending on certain events.

The IndraMotion MTX provides the following possibilities:D ”Skip block” function for standard NC blocks (DIN)D CPL instruction IF-THEN-ELSE-ENDIFD CPL instruction CASE-LABEL...LABEL-OTHERWISE-ENDCASE

”Skip block” functionWith the help of this function, individual standard NC blocks (DIN) can beskipped by the control. To do so, program the ”/” sign at the beginning ofthe corresponding program line.

The indicated program blocks are skipped only if interface signalqCh_BlockSlash (Block skip) is set for the bit interface of the correspon-ding channel.

Example:::

Interface signal ”Skip block” is activated.

/N100 ... Block N100 is ignored.::

Interface signal ”Skip block” is deactivated.

/N300 ... Block N300 is processed.:

. The ”Skip block” function can be used only for standard NC blocks(DIN)!

Page 50: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-38 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

CPL instruction: IF-THEN-ELSE-ENDIF

This function is a simple conditional branch instruction:”IF a specific condition is fulfilled, THEN perform the routine, or ELSEperform the other routine!”.

Syntax:

IF <Condition> THEN <Routine> [ELSE <Alternative routine>] ENDIF

General rule:D The condition is located in the same line as IF and is concluded by the

THEN in that line.D Both the THEN and the ELSE routine comprise program branches

that do not have to be processed in every case.D If the ELSE component is omitted, the program, provided that the

condition is not fulfilled, will continue to run immediately after proces-sing the ENDIF instruction.

Similar to the abort conditions for loop instructions, the condition for theIF instruction may contain arithmetic, trigonometric and logical links.Here, too, nesting is possible.

The IF instruction must always be concluded with an ENDIF instruction,because otherwise the end of the routine or that of the alternative routinewill not be recognized. Since the placement of the ENDIF instruction de-pends upon the program processing logic, the control sometimes fails toreliably detect and interpret a missing ENDIF instruction. The result willbe confusing or misleading fault messages. It is therefore good practicefor the programmer to verify the completeness of the IF instruction.

Example:...10 X = 120 .START30 IF X>=100 THEN40 GOTO .ENDE50 ELSE X=X+2.7560 GOTO .START70 ENDIF...90 ENDE...

. The standard NC jump commands GoAhead, GoBack, GoCond andGoTo may not be used to jump into or out of an IF-THEN-ELSE-EN-DIF instruction.

Page 51: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-39Bosch Rexroth AGIndraMotion MTXR911314869 / 01

CPL instruction: CASE-LABEL...LABEL-OTHERWISE-ENDCASEWithin a program, it is often necessary to query more than two states ofan integer expression or an integer variable. In such cases, a query bymeans of an IF instruction is possible only with the use of several nestedIF instructions. This requires additional computing time and worsens thereadability and maintainability of the program.

The attendant disadvantages can be overcome through the use of theCASE structure:

CASE <integer expression> OFLABEL <Int. constant>[,<int. constant>] [: <instruction>]

<Instruction>:

LABEL ...:

[OTHERWISE <Instruction><Instruction>

:]ENDCASE

Subsequent to the CASE instruction, the program branches to the LA-BEL instruction in which one of the <integer constants> is identical to thevalue of the <integer expression>. Now all instructions up to the next oc-currence of the LABEL or OTHERWISE instruction will be carried out.The program then branches directly to the ENDCASE instruction.

If no LABEL instruction that fulfills this condition exists, the programbranches to the OTHERWISE instruction or (if OTHERWISE has notbeen programmed) directly to the ENDCASE instruction.

The <instruction> area of a CASE construct can include all CPL instruc-tions. A maximum of 10 CASE constructs can be nested.

Examples:10 CASE A% OF20 LABEL 0 : Y=130 LABEL 240 Y=Y*Y50 LABEL 4 : Z=Y*Y60 Y=Z*Z70 OTHERWISE Y=080 ENDCASE

Page 52: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-40 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

10 CASE (INT(X/Y)+C%) OF20 LABEL 1,2 : X=1 : Y=230 LABEL 4,840 X=2 : Y=450 LABEL 060 X=0 : Y=170 OTHERWISE X=0 : Y=080 ENDCASE

10 CASE INTFELD%(1,2) OF20 LABEL 1,2,3 : GOTO .MARK130 LABEL 4,5,6 : GOTO .MARK240 OTHERWISE GOTO .ENDE50 ENDCASE

. The standard NC jump commands GoAhead, GoBack, GoCond andGoTo may not be used to jump into or out of a CASE-LABEL...LA-BEL-OTHERWISE-ENDCASE instruction.

. The CPL jump GOTO must not be used to jump into a CASE-LABEL...LABEL-OTHERWISE-ENDCASE command.

Page 53: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-41Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.9 Repeat Instructions

If one or more program blocks are to be processed repeatedly depen-ding on certain conditions, this can be programmed using CPL repeatinstructions. The multiple repetition of the program is known as a loop.

The IndraMotion MTX provides the following possibilities:D CPL instruction FOR-STEP-TO_NEXTD CPL instruction REPEAT-UNTILD CPL instruction WHILE_DO_END

CPL instruction: FOR-STEP-TO-NEXTIf the abort condition for the repeat instruction is to be a direct conse-quence of the processing of the routine, a tracking counter would be re-quired, for example. This counter requires no specific programming for the FOR-NEXT loop.A counting variable (INTEGER) is declared, the start and end count ofwhich must be specified. If the counting increment deviates from 1, thestep size (STEP) can be specified.

Syntax:

FOR <Count variable>=<Starting value> [STEP <Step size>] TO<End value><Routine>NEXT [<Count.variable>]

Example:10 FOR I%=0 TO 1820 XSINUS(I%)=SIN(I%*10)30 NEXT I%

After the end of the loop, the counting variable will have a value which islarger than the end value (max. step size).In this example, the sine values for 0 through 180 degrees are written tothe XSINUS field. The ”I%” that was appended to the ”NEXT” in line 30 isfor clarification purposes only and may be omitted.

It is also possible to program FOR NEXT loops with variable step size.In this case, the step size variable should possess the same type of va-riable as the counting variable.

Example:10 OPENW(1,”P222”,130)20 STEP%=2 : START%=1 : END%=3500 : NJUSTFOR COUN-TER%=START% STEP STEP% TO END%40 STEP%=ROUND(STEP%*SORT(STEP%))50 PRN#(1,”COUNTER: ”,COUNTER%,”STEP SIZE: ” ,STEP%)60 NEXT70 CLOSE(1)

Page 54: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-42 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Subsequent to program execution, the following appears in the ”P222”file:COUNTER: 1 STEP SIZE: 3COUNTER: 4 STEP SIZE: 5COUNTER: 9 STEP SIZE: 11COUNTER: 20 STEP SIZE: 36COUNTER: 56 STEP SIZE: 216COUNTER: 272 STEP SIZE: 3175COUNTER: 3447 STEP SIZE: 178902

. The standard NC jump commands GoAhead, GoBack, GoCond andGoTo may not be used to jump into or out of a FOR-STEP-TO-NEXT instruction.

CPL instruction: REPEAT-UNTILIf the abort condition for the repeat instruction is to be queried only afterthe first time that the routine is processed, the REPEAT loop can beused.

Syntax:

REPEAT <Routine> UNTIL <Condition>

Example::30 REPEAT40 X=X+1 Loop until X = 10050 UNTIL X=100:

. The standard NC jump commands GoAhead, GoBack, GoCond andGoTo may not be used to jump into or out of a REPEAT-UNTIL in-struction.

Page 55: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-43Bosch Rexroth AGIndraMotion MTXR911314869 / 01

CPL instruction: WHILE-DO-ENDIf the abort condition for the repeat instruction is to be queried before thefirst time that the loop is processed, the following can be formulated:”WHILE the condition is fulfilled, DO execute the routine.” The WHILEloop has the following structure:

Syntax:

WHILE <Condition> DO <Routine> END

Example::30 WHILE SD(9)=0 DO Wait loop until SD(9) takes on a value of 040 I=I+150 END:

. The standard NC jump commands GoAhead, GoBack, GoCond andGoTo may not be used to jump into or out of a WHILE-DO-END in-struction.

Page 56: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-44 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.10 Variable Programming

2.10.1 Variable Name

. Variable programming is a component of the CPL text range!

Variable programming in the CPL is used to design programs so that pa-rameters can be set within them, thus adapting program execution to thecurrent conditions.D A variable is any symbol name to which a few special boundary condi-

tions apply:D Variable names must be unique.D Variable names may not be identical to reserved CPL command

words.Due to the formal separation between standard NC and CPL pro-gramming, however, variable names can theoretically agree withthe name of NC functions or NC function parameters; for example,a variable ‘X‘ could be defined although there is already an axiswith the designation ‘X‘ in the system.

D The variable name consists of any sequence of capital letters andnumbers; the first character must be a capital letter. A variablename which consists of the letter ”N” and is only followed by num-bers is not a valid variable name. This character string corres-ponds to the identification of an NC block.

. Since only the first 8 characters of the name of the variableare used to distinguish the name, only these 8 characters aretermed significant (exception; definable permanent varia-bles).

D There is a total of 3 variable groups that specify the validity range ofthe variables. The variable group is specified by appending an identi-fier to the start of the name of the variable. This character always iscounted among the significant characters of the name! The followingvariable groups, with the corresponding identifiers, exist:D Local variables: no special identifierD Global variables: ‘#‘D Permanent variables: ‘@‘

D The type of variable is always specified by appending an identifier tothe end of the name of the variable. This also applies if the variablename exceeds the number of significant characters. The following va-riable types, with the corresponding identifiers, exist:D INTEGER: ‘%‘D DOUBLE: ‘!‘D BOOLEAN: ‘?‘D CHARACTER: ‘$‘D REAL: no special identifier

Page 57: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-45Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Examples of local, global and permanent variables:10 NUMBER1% = 1 Local INTEGER variable20 #NUMBER2% = 2 Global INTEGER variable30 @36% = 3 Permanent INTEGER variable40 @ABCD% = 4 Defined permanent INTEGER variable

2.10.2 Groups of Variables

Declarations with regard to the effective range of variables are requireddue to the option of using subroutines, as well as due to the possible re-quirement to commit the values of variables to intermediate storage in-dependent of the respective program being executed. To this end, adistinction is made between the following groups of variables:

Local variables take effect only within the program for which they have been declared.When the referred program reaches the end of program (EP), the varia-bles are deleted, thus releasing the occupied memory. In the case of asubroutine call, the name of a variable that is local with respect to themain program will not be ”visible” to the subroutine. However, the samevariable can also be declared as a local variable in the subroutine withoutconsequential interference due to the similarity of their respective na-mes. Upon the return to the main program, the original local variable willagain be available, bearing the value that was current at the time the sub-routine was invoked from within the main program.

Global variables are identified by a leading ”#” (number sign, gate or hash) character.Once a value has been assigned to a global variable, it can be accessed,read and/or modified from within all program parts for the remainder ofthe entire program. Global variables are deleted subsequent to end ofprogram (EP).

. The validity of each global variable is limited by a link unit!(Explanations of link units can be found in section 2.2, Linking NCPrograms, page 2-6, ”Link Units”).

Page 58: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-46 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Permanent variables are identified by a leading ”@” character that is followed by the name ofthe variable. They can be addressed by any active program. The varia-ble will be permanently retained even subsequent to EP. Deletion is pos-sible only through direct overwriting. Permanent variables are stored in aseparate memory range. As a result, clearing the entire memory will notaffect permanent variables.

Permanent variables of the INTEGER type can be addressed under de-signations @1 through @100 (for detailed information on the INTEGERtype, see Variable Types on page 2-51). To improve program readability,the indication of such permanent variables can also be augmented byappending letters to the number.In addition, the permanent one-dimensional field variable @_R can beused with 100 elements of ”Double”. The two permanent variables@_RES_DOUBLE and @_RES_DWORD are reserved for internal ap-plications and should not be used.

Definable permanent variables are also identified by a leading ”@” character followed by the name of avariable.The differences compared to permanent variables are as follows:1. Definable permanent variables are not automatically declared as a

component of the system software but must be manually declaredvia user entry in the files named ”wmhperm.dat” (for proprietary datasupplied by the machine tool manufacturer) and ”anwperm.dat” (forend user-specific data). The declaration syntax is discussed under”File structure of wmhperm.dat and anwperm.dat,” below.During system start-up, the control searches for the files first in theroot directory, then in the user FEPROM, and finally in the FEPROM.The control interprets the file identified by the first occurrence of therespective filename, using the entries found therein to create defina-ble permanent variables, provided they do not already exist. Existingdefinable permanent variables that are not declared in one of theabove-named files will be deleted.The maximum possible number of definable permanent variables isdictated by the available memory capacity. In the event that no morememory capacity is available for generating variables, the control willreturn an appropriate error message.

2. The names of definable permanent variables always begin with the”@” character and a character string. This character string con-sists of one capital letter, followed by any combination of capital let-ters or numbers.In the case of the definable permanent variables, the first 16 charac-ters of the name of the variable are significant. If two names of varia-bles exhibit a difference only with the 17th character or later, CPL willinterpret them as a single variable!

Page 59: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-47Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3. Defined permanent variables may be of the INTEGER, REAL,DOUBLE, BOOLEAN or CHARACTER type. The type of variable is specified by appending an identifier to the endof the name of the variable. This specification must be entered intothe parts program:@ABCD% defined permanent variable of INTEGER type@EFGH defined permanent variable of REAL type

(without %, !,$ or ?)@IJKL! defined permanent variable of DOUBLE type@MNOP? defined permanent variable of BOOLEAN type@QRST$ defined permanent variable of CHARACTER type

4. One- and two-dimensional fields may be used.The maximum field index is 65535 with field variables of the INTE-GER, REAL, DOUBLE or BOOLEAN type. With field variables of theCHARACTER type, the maximum field index is 1024.

Examples:@WZNR%(1)=4 The first variable (with Index 1) of the 1-dimen-

sional field @WZNR of the INTEGER type isassigned a value of 4.

@WZKOR(2,2)=0.2 The variable (with the indices 2,2) within the2-dimensional field @WZKOR of the REAL typeis assigned a value of 0.2.

5. Estimating the available number of newly definable permanent va-riables:D Total memory space for permanent variables:

100 Kbyte (102400 byte)

Item Reserved for Memoryin bytes

Comment

1 all permanent variables 102400 Total memory

of which the following arereserved for

2 @1 - @100 (permanent variables)

800

3 administrative information 24

4 all definablepermanent variables

101576 (4) = (1) - (2) - (3)

Page 60: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-48 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Item Reserved for Memoryspace in by-tes

Comment

4 all definable permanent va-riables

101576 (4) = (1) - (2) - (3)

of which the following arereserved for

5 @_R 823 Permanent field va-riable with 100 ele-ments of the typeDOUBLE

6 @_RES_DOUBLE 40 Permanent variableof the typeDOUBLE, reservedfor internal applica-tions

7 @_RES_DWORD 35 Permanent variableof the type INTE-GER, reserved forinternal applica-tions

8 new definablepermanent variables

100678 (8) = (4) - (5) - (6) - (7)

Each definable permanent variable occupies the following memoryspace:

Item Reserved for Memoryspace in by-tes

Comment

9 the names of the definablepermanent variables

max. 16 1 byte percharacter

10 the value of the definablepermanent variables

1, 4 or 8 Integer: 4 bytesDouble: 8 bytesReal: 4 bytesBoolean: 1 byte

11 administrative information 20

12 a definable permanent varia-ble of the DOUBLE type witha name length of 16 charac-ters

44 e.g.: maximum as-signment of memoryspace(9) + (10) + (11)

Page 61: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-49Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Number of ”definable permanent variables” of the types DOUBLEand INTEGER:

Variable type Number ofvariables

Comment

Type DOUBLE with a namelength of max. 16 characters

2288 100678/44=2288

Type INTEGER with a namelength of max. 16 characters

2516 100678/(16+4+20)=2516

Type INTEGER with a namelength of max. 8 characters

3146 100678/(8+4+20)=3146

Field variables with namelengths of max.16 characters,Type INTEGER

25160 (100678-16-20)/4=25160

Field variables with namelengths of max.16 characters,Type DOUBLE

12580 (100678-16-20)/8=12580

Structure of ”wmhperm.dat” and ”anwperm.dat” files:The files may contain only declarations of ”definable permanent varia-bles”. Each declaration occupies a separate line and concludes with aRETURN.

A line of declaration always exhibits the following structure:

DEF <Variable type> @<Variable name>; [<Remark>]

Examples of ”wmhperm.dat” and ”anwperm.dat”:DEF INT @ABCD ;simple INTEGER variableDEF REAL @EFGH ;simple REAL variableDEF DOUBLE @IJKL ;simple DOUBLE variableDEF BOOL @MNOP ;simple BOOLEAN variableDEF CHAR @PSTR1(3) ;CHARACTER variable with a length of 3DEF INT @WZNR(9) ;1-dimensional INTEGER field with 9 variablesDEF INT @WZKOR(9,2) ;2-dimensional REAL field with 18 variablesDEF CHAR@PSTR2(9,2)

;2-dimensional CHARACTER field with 9 partialstrings of 2 characters each

Sample applications for permanent variables:10 @1 = 115 @2_COUNTER = 220 @ABCD% = 325 @EFGH = 4.130 @IJKL! = 5.1234535 @MNOP? = TRUE40 @PSTR1$ = ”ABC”

45 @WZNR%(2) = 6

50 @WZKOR(3,2) = 7.6

55 @PSTR2$(3) = ”DE”

Page 62: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-50 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Structured variablescan be replaced by system data (SD), but are retained for reasons ofcompatibility (see section 5.8.2, System Data of Structured Types).

Structured variables are characterized by various structure levels thatare separated by a period (”.”) when they are represented. Structuredvariables always start with ”SV.”.

All structured variables that are to be accessed in a CPL instruction mustbe declared manually in file ”machdef.dat”. During system startup, thecontrol searches for the files first in the root directory, then in the userFEPROM, and finally in the FEPROM. The file found first is evaluatedwhen the NC is starting up; the administration data and the memory forthe structured variable user data are created at the same time. The me-mory is created again and all values are preset to 0 during every startup.

File ”machdef.dat” is used only to define structured variables. Each defi-nition occupies a separate line and concludes with a semicolon.A definition line always exhibits the following structure:DEF <Variable type> SV.<Variable name>; [<Remark>]<Variable type> and <Variable name> are strings that can consist of lo-wercase or capital letters, numbers, a dash and an underline.

. For all variable names, the first 16 characters are significant. If twonames of variables exhibit a difference only with the 17th charac-ter or later, CPL will interpret them as a single variable!

Example:DEF DBT1Rec_t SV.A; Definition of a structured varia-

ble of type DBT1Rec_t

CPL instructions can access both SV.A and all the structure componentsof SV.A. The various structure components are separated from one an-other by a ”.”.

Example:10 SV.A.Hd=DBSEA(”DBT1”,-1,-1,”K1=1”,FOUND%)

Page 63: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-51Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.10.3 Variable Types

INTEGER variableAn INTEGER variable occupies 32 bits of memory space. It is identifiedby a ”%” (percentage) character appended to the name of the variable.The value range extends from -2.147.483.647 through +2.147.483.647.

10 NUMBER1% = 4

INTEGER variable

Floating-point variable (REAL)If no special identification is appended to the name of the variable, thevariable will be interpreted as a REAL variable of single precision. In this case, the variable occupies 32 bits of memory space. The valuerange is +/-1038. This corresponds to 7 significant positions.

10 PI = 3.141593

REAL variable with single precision

Floating-point variable (DOUBLE)If an exclamation mark ”!” is appended to the name of the variable, thevariable will be interpreted as a REAL variable with double precision. In this case, the variable occupies 64 bits of memory space. The valuerange is +/- 10308. This corresponds to 15 significant positions.

10 PI! = 3.141592653589793

REAL variable with double precision

Logical variable (BOOLEAN)These variables are identified by a ”?” question mark that is appended tothe name of the variable. Logical variables (Boolean variables) can as-sume only the values TRUE or FALSE. They are used to store logicalstates or conditions that will be needed throughout the course of pro-gram execution.

10 START? = FALSE

BOOLEAN variable

Page 64: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-52 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Field variable (ARRAY)The use of ARRAY variables makes it possible to reserve, under a singledesignation, a one- or two-dimensional field (array), consisting of one ormore variables of the same type, within the memory range. Field definitions are possible for variables of the INTEGER, REAL,DOUBLE, BOOLEAN and CHARACTER types. To enable access to theindividual field elements of an array, the field index and/or indices arespecified in addition to the name of the field variable.

Example: Dimensioning an ARRAY variable10 DIM FELDVAR(2,3)

INTEGER constants for field sizes (index)

Name of variable (REAL variable)

DIM instruction word

Example: Access to array variable100 FELDVAR(1,1) = MCS(1)110 FELDVAR(2,1) = PCS(1)120 FELDVAR(1,2) = MCS(2)130 FELDVAR(2,2) = PCS(2)140 FELDVAR(1,3) = MCS(3)150 FELDVAR(2,3) = PCS(3)

Prior to the initial access to the field variables, the index range and/or thefield size must be dimensioned with INTEGER constants:D Field size of the field variable of types INTEGER and REAL:

max. 65536D Field size of the field variables of type CHARACTER:

max. 1024

DIM <Variable name>(<Field size1>[,<Field size2>])

. Dimensioning with DIM may not be applied to ”definable perma-nent variables”. Instead, the dimensioning of these variables oc-curs in the file wmhperm.dat or anwpwerm.dat.

Page 65: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-53Bosch Rexroth AGIndraMotion MTXR911314869 / 01

CHARACTER- and STRING-variablesA CHARACTER variable is identified by a trailing ”$” (dollar) sign. Thistype of variable can accommodate a single character as well as a com-plete character string.However, character string instructions (see section ”Processing Charac-ter Strings”) are possible only if a character string is stored in a one-ortwo-dimensional field (array) of CHARACTER variables. For this, thefield must be declared by means of a DIM instruction.Each CHARACTER variable in this field then contains only one charac-ter of the character string.A one-dimensional field comprised of variables of the CHARACTERtype is termed a STRING variable. No index is entered when accessing aone-dimensional CHARACTER variable. However, when accessing atwo-dimensional CHARACTER variable, an index must be entered.

Example:1 REM String variable AB (length 10)2 DIM AB$(10)3 REM 3 string variables CD (each with a length of 5)4 DIM CD$(3,5)5 AB$ = ”Z”6 CD$(2) = ”ABC”

Overview of variables

Variable group Variable name Variable type Fields (arrays)possible (X=yes)

Local max. 8 significantcharacters

% INTEGERREAL

! DOUBLE? BOOLEAN$ CHARACTER

XXXXX

Global # incl. ”#”character,max. 8 significantcharacters

% INTEGERREAL

! DOUBLE? BOOLEAN$ CHARACTER

XXXXX

Permanent@ 1 - 100

Definablepermanent@

max. 16 signifi-cant characters

% INTEGERREAL

! DOUBLE? BOOLEAN$ CHARACTER

XXXXX

Page 66: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-54 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.10.4 Variables in Standard NC Programming

It often happens that you want to set NC functions or parameters of NCfunctions using variables in a parts program within standard NC pro-gramming (DIN).In this value assignment, note that CPL expressions within standard NCprogramming must be enclosed within square brackets ”[” and ”]”.

Samples for setting the parameters of standard NC blocks:10 ANGLE = 45

20 VAL1 = 1.5

30 VAL2 = 1.5

40 XPOS = 10.2

50 YPOS = 5.73

60 FEEDRATE = 1000

N70 Rotate([ANGLE])

N80 Scale(X[VAL1],Y[VAL2])

N90 G1 X[XPOS] Y[YPOS] F[FEEDRATE]

. The block number cannot be parameterized using CPL variables!

. None of the addresses invoking a subprogram are intended for va-riable syntax!

Page 67: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-55Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.10.5 Variable ERRNO for Evaluating Errors in CPL Functions

CPL variable ERRNO, in which the called function returns errors, can betransferred as a transfer parameter to a CPL function, which generates aruntime error if an error occurs.

ERRNOCPL variable ERRNO is an optional parameter that can be programmedin the CPL functions in which it has been entered as a parameter. It canbe programmed at any position there.

If ERRNO is not programmed, the CPL function generates a runtime er-ror or a warning if an error occurs. If ERRNO is programmed, the CPL function does not generate a run-time error or a warning. In this case, CPL variable ERRNO must be eva-luated in the CPL program and a runtime error (using SETERR) or awarning (using SETWARN) must be generated explicitly.

If the CPL function is executed correctly, ERRNO has a value of 0. Errorsare returned using negative values. The meaning of the negative valuesis generally valid; however, not all values are relevant for every CPLfunction. The error values possible for a CPL function are carried out forthe appropriate function.

Page 68: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-56 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

List of generally valid error values:0 : Access OK

-1 : Parameter error-2 : Coordinate/axis does not exist.-3 : Invalid coordinate/axis in channel.-4 : Axis is not a pseudocoordinate.-5 : Channel does not exist.-6 : Function may be called only in an autonomous channel.-7 : Data cannot be read.-8 : Name of source file, including path, is too long-9 : Access to source file impossible

-10 : Name of target file, including path, is too long-11 : File name (source or target) invalid-12 : Copying impossible.-13 : Data cannot be written-14 : XML table exists-15 : XML table not found-16 : invalid file extension-17 : invalid table type-18 : Insert position faulty-19 : Maximum number of axes exceeded-20 : Faulty root tag-21 : File access not possible-22 : Invalid key-23 : Data record is locked-24 : No read rights for the file-25 : No write rights for the file-26 : Command with invalid parameter value-27 : Command with invalid parameter type-28 : Error during access to the XML table-29 : Incorrect field index-30 : Not enough memory-31 : Search condition faulty-32 : In the channel, a data block of this database table is locked-33 : Data block not locked in the channel-34 : Variable on the right of the assignment not assigned

Example: Read the position of channel axis X in the first channel.One of the following four lines (all with the same effect) can be program-med:

10 POS = ACS(”X”,1,1,ERRNO)

10 POS = ACS(”X”,1,ERRNO,1)

10 POS = ACS(”X”,ERRNO,1,1)

10 POS = ACS(ERRNO,”X”,1,1)

Page 69: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-57Bosch Rexroth AGIndraMotion MTXR911314869 / 01

SETERRAfter ERRNO has been evaluated, CPL command SETERR can beused to generate a runtime error. As a result, the parts program is inter-rupted at this point.The text entered in parameter <Error string> is always output, regard-less of the general language setting.

Syntax:

SETERR(<Error string>[,<Channel>])

where:<Error string> Text that is output as an error.

(under Wera error number 3371)<Channel> Channel number in which the error is to be output.

If <Channel> is not entered, the current channel isused as the default value.

ERRNO CPL variable that can be programmed in any positionwithin parentheses.When ERRNO is programmed, no runtime error is is-sued; the return values are:

0: Access OK-1: Parameter error-5: Channel does not exist.

Example: Read the position of channel axis X in the first channel10 POS = ACS(”X”,1,1,ERRNO)20 IF ERRNO <> 0 THEN30 SETERR(”Position could not be read”)40 ENDIF

Page 70: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-58 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

SETWARNAfter ERRNO has been evaluated, CPL command SETWARN can beused to generate a warning; the parts program will continue to run.The text entered in parameter <Warning string> is always output, re-gardless of the general language setting.

Syntax:

SETWARN(<Warning string>[,<Channel>])

where:<Warning string> Text that is output as a warning.

(under Wera error number 3372)<Channel> Channel number in which the warning is to be

output.If <Channel> is not entered, the current channelis used as the default value.

ERRNO CPL variable that can be programmed in any po-sition within parentheses.When ERRNO is programmed, no runtime erroris issued; the return values are:

0: Access OK-1: Parameter error-5: Channel does not exist.

CLRWARNCommand CLRWARN makes it possible to clear all the warnings of achannel generated by SETWARN.

Syntax:

CLRWARN([<Channel>])

where:<Channel> Channel number in which all the warnings generated

by SETWARN are to be cleared.If <Channel> is not entered, the current channel isused as the default value.

ERRNO CPL variable that can be programmed in any positionwithin parentheses.When ERRNO is programmed, no runtime error is is-sued; the return values are:

0: Access OK-1: Parameter error-5: Channel does not exist.

Example:10 CLRWARN(,ERRNO)20 IF ERRNO <> 0 THEN30 SETWARN(”Warnings not cleared”)40 ENDIF

Page 71: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-59Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.11 Reserved Instruction Words

The key terms listed below must be used in stand-alone fashion or bedelimited by special characters, identifying them as instruction words.The selection of names for variables must not encompass any reservedinstruction words!

Example:GOTO 10 Jump to line 10GOTO10 any symbol name (variable); if it is alone, it leads to error

message ”Runtime error 2167 = missing” because a va-lue assignment for variable ”GOTO10” is expected.

Key terms

A: ABS AXO B: BCD C CALL COF D: DATE DIRDELACOSANDAPOSASCASINATAN

AXP BINBITIF

CASECHR$CLOCKCLOSECLRWARN

COSCPROBE

DBSEADBTABDCTDIMDIRCR

DIRINFDODPC

E: ELSE ERRNO F: FALSE FILESIZE G: GETERR I: IFENDENDIFENDCASEEOFERASE

FILEACCESSFILECOPYFILEDATEFILENOFILEPOS

FORFXCFXCRFXDELFXINS

GOTO INP#INSTRINT

L: LABELLEN

M: MCODSMCOPS

N: NCFNEXT

O: OFOPENRLEN

LJUSTMCOPSMID$MMC

NEXTNJUSTNOTNUL

OPENROPENWOTHERWISEOR

P: PDIM R: REM S: SCL SETERR T: TAN TRUEPMTPMVPPOSPRN#PROBE

REPEATREWRITEROUND

SCSSCSLSDSDRSEEK

SETWARNSINSPOSSQRTSTEPSTR$

TCVTHENTIMETOTRIM$

U: UNTIL V: VAL W: WAIT X: XORVERSINF$ WHILE XTAB

Z: ZOTZOV

Page 72: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-60 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.12 CPL Instructions

Local as well as global variables can be assigned values. This is accom-plished with the use of the ”=” (equals) sign.

Example: Value assignment for a BOOLEAN variable10 START? = FALSE

Value

Assignment symbol

(Logical) variable

Example: Value assignment for a REAL variable1 X1MIN! = 2097.876

Value (max. 7 digits)

Assignment symbol

Double-precision REAL variable

Example: Value assignment between variables1 XSOLL = X1MIN!

Value (double-precision REAL variable)

Assignment symbol

Single-precision REAL variable

The variable to be assigned a value must be positioned to the left of theassignment symbol and the respective value to the right. This declara-tion must be used with caution especially in cases where the value of onevariable is to be assigned to another variable.

NULIf a value has not been assigned to a variable, it will have the value ofNUL. As a consequence, the statement <Variable>= NUL is true. Thissignifies that the equals sign can also be used in expressions represen-ting comparisons or conditional operations.

If the direct deletion of a local or global variable is desired, this can beaccomplished by assigning the NUL value. In contrast, a permanent va-riable cannot be deleted but requires overwriting.

Example: Delete a variable1 XSET = NUL2 IF XSET = NUL THEN3 PRN#(0,”Variable not assigned.”)4 ENDIF

Page 73: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-61Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Mathematical operationsBesides the assignment of a value in the form of a constant expression(numerical) or a variable, it is also possible to assign the value of a CPLexpression to a variable. A CPL expression may contain functions usingboth constants and variables.

The simplest functions include the four basic arithmetical operations:Addition » + « (plus sign)Subtraction » - « (minus sign)Multiplication » * « (asterisk)Division » / « (slash character)

As a rule, multiplication and division take priority over addition and sub-traction. It is also possible to use parentheses, the nesting of which, to adepth of seven, can be used with simple expressions (containing nofunction calls).

Example:1 I% = 25: XACTUAL = 102 XSOLL = 150/(100-I%)+XHABEN XSOLL has a value of 12

It is also possible to invoke arithmetical functions that act upon variables,constants or CPL expressions which must be placed in parentheses im-mediately behind the respective instruction word. The function alwaysrefers to the internal numerical representation of the input value. This re-presentation can be verified during program execution with the use of”Program check.” In the case of nested expressions, and particularlywhen these contain function calls, the maximum possible nesting depthmust be considered. It is dependent upon the memory capacity requiredby the expressions within parentheses during their respective execution.

ABSReturns the absolute value of the input value, i.e. negative values be-come positive, while positive values remain positive.

Example:1 I% = -1252 XWERT = 2*SQRT(ABS(100+I%)) XWERT has a value of 10

INTconverts the input value (REAL) by cutting off the decimal places (roun-ding) to a whole number (INTEGER). The input value may be a constantor a variable.

Example:1 XWERT% = INT(10.9) XWERT has a value of 10

Page 74: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-62 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ROUNDconverts the input value into a whole number (INTEGER) by rounding itdown or up. The input value can be a REAL expression.

Example:1 XWERT% = Round(10.9) XWERT has a value of 112 XWERT% = Round(5.5) XWERT has a value of 63 XWERT% = Round(5.49) XWERT has a value of 5

SQRTThis command forms the square root of an input value. The input valuemust not be a negative value; this is not defined.

Example:1 I% = 442 XSOLL = 4*SQRT(100+I%) XSOLL has a value of 48

SIN, COS, TAN, ASIN, ACOS, ATANIn the case of trigonometric functions that process angles in terms ofconventional degrees of arc, it is useful to identify the angles as double-precision REAL variables. The following trigonometric functions can beused:D SIN Sine functionD COS Cosine functionD TAN Tangent functionD ASIN Arc-sine functionD ACOS Arc-cosine functionD ATAN Arc-tan function

Example:1 ANGLE = 302 XWERT = SIN(ANGLE) XWERT has a value of 0.53 YWERT = ASIN(XWERT) YWERT has a value of 30

Page 75: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-63Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Logical linksBinary logical operations can be effected by means of logical variables,and decimal logical operations by using INTEGER variables. As depic-ted in the diagram below, logical operations can be represented with theusual operating symbols, i.e. the ”·” and the ”+” symbol (not in CPL, ho-wever). Here, too, the governing rule is that of priority of multiplicationand division over addition and subtraction. As a consequence, multipli-cation/division calculations take priority over addition/subtraction cal-culations, i.e. the AND operation takes priority over the OR operation.Parentheses may be nesting up to a depth of seven.

NOT, AND, OR, XORCPL provides four types of linking functions:D NOT function NOTD AND function ANDD OR function ORD EXCLUSIVE OR function XOR

NOT!member AND!member OR!member XOR!member

XOR E1 = A E1 E1 + E2 = A E1

E1E1 E1 E1

E2E2E2o−!A A A A

NOT AND OR XOR

E1E2A

0−L

L−0

000

0L0

L00

LLL

000

0LL

L0L

LLL

000

0LL

L0L

LL0

E2 = A. E2+E1 E2=A. .

1 & >1 =1

Logical operations can be utilized for bit masking.

Example: Is bit 0 set in @20?...20 IF @20 AND 1 <> 0 THEN GOTO . SET30 ELSE GOTO . UNSET ENDIF...

Page 76: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-64 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Conversion between numeric systems

BCDConverts binary value into BCD format:

<BCD value>=BCD(<Binary value>)

Example:1 BCD_WERT = BCD(49) BCD_WERT has a value of 73

BINConverts BCD-coded numbers into binary value:

<Binary value>=BIN(<BCD value>)

Example:1 BIN_WERT = BCD(49) BIN_WERT has a value of 31

Comparison operations

=, >=, >, <>, <=, <The following comparison operations are permitted:» = « equal» >= « greater than/equal» > « greater than» <> « not equal» <= « less than/equal» < « smaller than

Comparison operations are used to describe the relation (”fulfilled” or”not fulfilled”) of a condition (e.g. for the commands REPEAT - UNTIL,WHILE - DO - END, IF - THEN - ELSE - ENDIF).

Page 77: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-65Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.13 Additional Basic CPL Elements

ConstantsIf numerical values are declared for program execution and are to re-main unchanged (constant), such values may be entered into the in-structions as a numerical expression.

Integer constant (INTEGER)Integers are written without decimal points.

Example:NUMBER% = 4 INTEGER constant

Floating-point constant (REAL)Real numbers (decimal numbers or fractions) are identified by a decimalpoint (floating point).

Example:PI = 3.141593 REAL constant

Double-precision constants and double-precision operationsConstants assigned to or compared with a double-precision REAL varia-ble are represented with double precision, (i.e. precise to 15 digits).

Example: Assignment of double-precision REAL constants and comparison of va-riables with double-precision REAL constants:

4 D5! = -1234.123456 + 12345 + 1234.23456720 D0! = 123456789.123456 22 D1! = 1.12345678901234 24 D2! = -123456789012345 26 D3! = -1234.123456

Page 78: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-66 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

The following queries produce the result: E? = TRUE28 IF D0!=123456789.123456 THEN E?=TRUE ELSE E?=FALSE ENDIF29 IF D1!=1.12345678901234 THEN E?=TRUE ELSE E?=FALSE ENDIF30 IF D2!=-123456789012345 THEN E?=TRUE ELSE E?=FALSE ENDIF31 IF D3!=-1234.123456 THEN E?=TRUE ELSE E?=FALSE ENDIF 32 IF D0! + 2.1 + 3.1 = 123456789.123456 + 2.1 + 3.1 THEN33 E? = TRUE34 ELSE35 E? = FALSE36 ENDIF 37 IF (D0! + 2.1) + 3.1 = 123456789.123456 + 2.1 + 3.1THEN38 E? = TRUE39 ELSE40 E? = FALSE41 ENDIF

Character string constantA character string constant is limited by quotation marks ( ” ).

Example:BEISPIEL$ = ”This is a characterstring”

STRING constant

Code charactersCPL uses the following code characters:

# ! ? , " < − / &

% $ : ( ) = > + *

][

@

The comma is normally used as a delimiter. It is used as a grammaticalpunctuation mark only within character strings. The period is used as adecimal point in decimal numbers and as a label identifier in jump de-stinations. Within character strings, the period is interpreted as a gram-matical punctuation mark.

Page 79: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-67Bosch Rexroth AGIndraMotion MTXR911314869 / 01

2.14 NC Block Synchronization Commands

2.14.1 Overview

NC block synchronization commands can be used to:D Synchronize NC programs to specific events.D Synchronize block preparation with program execution.D Limit Look-Ahead to a certain number of blocks.D Synchronize NC programs in different channels to one another.

Synchronization functions go into effect either at the time of block prepa-ration or at the active time of block execution.

Synchronization functions of block preparation:D WAIT(no parameter): Pauses block preparation until all previous

blocks have been processed.D CPL function WAIT(,<Waiting time>): Block preparation is paused for

the entered time.D CPL function WAIT(BITIF(...)): Block preparation waits for a certain

signal within the PLC-NC bit interface.D BlkNmb: Limits Look-Ahead to the programmed number of blocks.

Synchronization functions for active time:D WAITA / WAITO: Wait for a certain status on the PLC-NC bit interface.D WPV / WPVE: Wait for the value of a permanent CPL variable.D SPV / SPVE: Write permanent CPL variablesD ASTOPA / ASTOPO: Movement stop until certain axis positions have

been attained.D BSTOPA / BSTOPO: Movement stop until certain axis positions in the

basic workpiece coordinate system (BCS) have been attained.D WSTOPA / WSTOPO: Movement stop until certain axis positions in

the current workpiece coordinate system (WCS) have been attained.D OFFSTOPA / OFFSTOPO: Cancellation of stop conditions in the con-

trol channel.

Page 80: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-68 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.14.2 Synchronization Functions of Block Preparation

WAIT (no parameter)Function WAIT stops block preparation until all the blocks that wereprogrammed before the WAIT block have been fully processed. It is ab-solutely required if current machine- or process-based data are to besubsequently accessed within the program.

Viewed in terms of elapsed time, block preparation, i.e. the operation bywhich the individual program lines are analyzed and interpreted, is al-ways carried out in advance of its execution on the machine. The periodbetween preparation and execution is not constant; instead, it dependson many parameters (feedrate, distance traversed, Look-Ahead, etc.).

Therefore, if the program is to respond to a machine- or process-relatedactual status (e.g. current actual position, signal at the bit interface, etc.),the WAIT instruction must be used to ensure that the aforementionedtime lag equals ”zero” at the precise evaluation time.

Example: WAIT (no parameter)N10 X0N100 (MSG, still running)N20 X15030 WAIT Pause block execution40 XPOS = MCS(1)-15050 IF XPOS < 0.0001 THEN (MSG, position reached)

”Position reached” is output toX=150

70 ENDIF

. Function WAIT (no parameter) can be programmed in both stan-dard NC blocks (DIN) and CPL blocks. A CPL block that includesthe WAIT instruction must not contain a ”:”. The subsequent CPLcommands must be written in a new CPL block.

Page 81: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-69Bosch Rexroth AGIndraMotion MTXR911314869 / 01

CPL function: WAIT(,<Waiting time>)Stops block preparation until the programmed waiting time has elapsed.

Syntax:

WAIT(,<Waiting time>[,<ResVar>])

where:<Waiting time> Waiting time in milliseconds; no places to the right of

the decimal point. The waiting time may also be pro-grammed as an arithmetic expression.

<ResVar> Optional integer variable. After the waiting time haselapsed, <ResVar> is assigned a value of 1.

Examples of WAIT with waiting time:10 WAIT(,1000,E%) Block processing is paused for 1000ms.

Subsequently, the E% variable is assignedinteger value ”1”.

10 WAIT(,ZEIT%) The duration that block processing is helddepends on the content of the ZEIT% inte-ger variable. No value is returned.

CPL function: WAIT(BITIF(...))Stops block preparation until a certain status occurs on the PLC-NC bitinterface. A duration may be programmed as an option. Block preparation is thenpaused until the status occurs on the bit interface or until the duration haselapsed.

Syntax:

WAIT(<BITIF condition>[,[<Timeout>][,<ResVar>]])

where:<BITIF condition> Specifies the condition that is to be checked on

the PLC-NC bit interface. The following syntaxmust be maintained:[NOT(]BITF(<Parameter>)[)][=<Sta-tus>]

<Parameter> Transfer parameter of the BITIFfunction (for a description,please refer to BITIF Function,page 5-55).

<Status> BOOLEAN expression withwhich the result of the BITIFfunction is compared. If <Status>is not programmed, the compari-son will be made to TRUE.

If the condition is fulfilled, block preparation re-sumes.

Page 82: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-70 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

<Timeout> Block preparation waits until the <BITIF condi-tion> has been fulfilled, but not longer than untilthe <Timeout> time has elapsed.

<ResVar> Optional integer variable. After the waiting timehas elapsed, <ResVar> is assigned a value of 1.

Examples for WAIT(BITIF(...):10 WAIT(BITIF(1,1,1)=TRUE) Wait until the 2nd axis-based input signal of the 1st axis

has been set.

10 WAIT(BITIF(2,0,2)=(E1? OR E2?)) Wait until the 3rd channel-based input signal of the 2ndchannel has the value of the logical expression (E1? ORE2?).

10 WAIT(NOT BITIF(3,2,1),,C%)20 IF C%=0 THEN30 DSP(10,10,”COND. SCHON OK”)40 ENDIF

Wait until the 4th spindle-based input signal of the 1stspindle has a value of FALSE. Variable C% supplies a va-lue of either ”0” if the condition had already been fulfilledwhen WAIT was called or ”2” if the condition was fulfilledduring the wait.

10 WAIT(BITIF(4,4,1)=E7?,250,ERG%)20 IF ERG%=0 THEN30 DSP(10,10,”NOT WAITED”)40 ENDIF50 IF ERG%=2 THEN60 DSP(10,10,”>WAITED 250ms”)70 ENDIF

Wait until the 5th axis-based output signal of the 1st axistakes on a value of variable E7? or until 250 ms have elap-sed. Variable ERG% supplies a value of either ”0” if thecondition had already been fulfilled when WAIT was called,”1” if the duration has elapsed or ”2” if the condition wasfulfilled during the wait.

Page 83: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-71Bosch Rexroth AGIndraMotion MTXR911314869 / 01

BlkNmb (BNB) Using the standard NC function BlkNmb, the maximum number of blocksin the block preparation function can be limited.

For example, the BlkNmb function can be used to control further proces-sing of runtime measuring results in the parts program.

Syntax:BlkNmb(<Num>) Limit ON.

BlkNmb() orBlkNmb(0)

Limit OFF.The max. permitted number of blocksdepends on MP 7060 00110.

Abbreviation: BNB(...)

where:<Num> Maximum desired number of blocks.

Integer. Input range: greater than or equal to 0.0: The number of blocks depends onMP 7060 00110.

Special features and restrictions:D If more than <Num> blocks have been prepared at the time that the

function is called, block preparation pauses until the number of prepa-red blocks drops below <Num>.

D If the entry in <Num> is greater than the number of blocks that is plan-ned within the framework of the control configuration, the effectivenumber of blocks is automatically reduced to the settings inMP 7060 00110 .

Page 84: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-72 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

2.14.3 Synchronization Functions for Block Execution Time

One program per channel can run in the IndraMotion MTX. If the indivi-dual processing segments are divided into different individual programsand if these programs run on different channels, the processing se-quence of all individual programs can be controlled by the synchroniza-tion functions for the block execution time.

All synchronization functions for the block execution time have CPL pa-rameter lists (similar to subroutines). Lists of CPL expressions thatmust be enclosed in square brackets: ”[” and ”]” are programmed inthese.

General rule:D The permanent CPL variables used in the functions WPV, WPVE,

SPV, SPVE are valid throughout the system. Therefore, the program-mer has to make sure that incorrect use does not lead to unintendedfunction interaction.

D In the framework of the NC functions offered, only the following sim-ple types of permanent CPL variables are permitted:- INT- BOOL- REAL- DOUBLEIn the case of arrays, only individual elements may be addressed!

Functions WAITA, WAITO, WVP, WVPE implicitly effect a downs-lope at the end of the block. Synchronization points which havebeen set incorrectly can lead to damage of the machine.Test the program sequence for possible synchronization pro-blems prior to the actual processing.

Page 85: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-73Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Wait for the states on the PLC-NC bit interface: WAITA / WAITOUsing function WAITA / WAITO starts the waiting process at runtime untilone or more of a maximum of 16 interface signals have reached a speci-fied value.

The following can be programmed, depending on the link, in the case ofseveral interface signals:D WAITA: ”AND link” of the individual signals

Wait until all interface signals have taken on the specified value.D WAITO: ”OR link” of the individual signals

Wait until one interface signal has taken on the specified value.

Example:Program 1 on channel 1 processes the end face of a turned part. Pro-gram 2 in channel 2 is to cut a groove into this end face and must wait forprogram 1 to release the turned part for program 2. The release for pro-gram 2 is effected by setting certain interface signals. When the inter-face signals have reached the status, channel 1 transmits the release tochannel 2. While program 2 is machining, program 1 is waiting for pro-gram 2 in order to continue its machining task.

Syntax:Wait for each of the specified signals:

WAITA[BITIF(<Parameter>)=<Status>, BITIF(<Parame-ter>)=<Status>,...,<Timeout>]

Wait for one of the specified signals:

WAITO[BITIF(<Parameter>)=<Status>, BITIF(<Parame-ter>)=<Status>,...,<Timeout>]

where:BITIF BITIF function queries the PLC-NC interface.

Optionally, 2 to 16 interface signals can be queriedsimultaneously.

<Parameter> Transfer parameter of the BITIF function (for a des-cription, please refer to BITIF Function, page 5-55).

<Status> BOOLEAN expression with which the result of the BI-TIF function is compared. If <Status> is not program-med, the comparison will be made to TRUE.If the condition is fulfilled, block preparation resumes.

<Timeout> Optional time in ms; default = 0.If <Timeout> elapses before the pertaining conditionhas been fulfilled, a warning is triggered and the sy-stem continues to wait.If Timeout has not been programmed or is equal to 0,no warning will be triggered.

Page 86: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-74 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples:N10 WAITO[BITIF(10,1,1)=FALSE, BITIF(11,1,2)]

Waits actively until BI-TIF(10,1,1) takes on a value of 0 or BITIF(11,1,2) avalue of 1.

N10 WAITA[BITIF(10,1,1)=FALSE, BITIF(11,1,2)]

Waits actively until BI-TIF(10,1,1) takes on a valueof 0 and BITIF(11,1,2) a va-lue of 1.

Please note for WAITA, WAITO:D If WAITA and WAITO are programmed in one NC block, block execu-

tion is stopped until both conditions have been fulfilled. The WAITOcondition is evaluated first.

Functions WAITA, WAITO, WVP, WVPE implicitly effect a downs-lope at the end of the block. Synchronization points which havebeen set incorrectly can lead to damage of the machine.Test the program sequence for possible synchronization pro-blems prior to the actual processing.

Page 87: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-75Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Wait for the value of a permanent CPL variable: WPV / WPVEUsing the function WPV / WPVE starts the waiting process at runtimeuntil a permanent CPL variable has reached a certain comparison value.

The comparison value can be determined at different times:D WPV: The comparison value is a CPL expression which is calculated

during runtime exactly at the point in time at which the NC block is acti-vated. A change to the comparison value effected after activation ofthe NC block has no effect. The comparison value is compared to thevalue of the permanent variable.Due to the evaluation at runtime, only a simple CPL expression is per-mitted.

D WPVE: The comparison value is a CPL expression which, although itwas determined at preparation time, is not compared with the value ofthe permanent variable until runtime.

Syntax:The comparison value is determined at runtime:

WPV[<Perm.CPL variable><Comparison operator><simple CPL ex-pression>,<Timeout>]

The comparison value is already determined during the preparationtime:

WPVE[<Perm.CPL variable><comparison operator><CPL expres-sion>,<Timeout>]

where:

<Perm. CPL variable> Permanent variable, marked by the ”@”symbol followed by a variable name.

If these are the elements of an array, only aconstant or a permanent integer variable ispermissible as an index for WPV. With WPVE,the index may be a constant or any CPL inte-ger variable.

<Comparison opera-tor>

The following comparison operators may beselected:

Page 88: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-76 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

= Permanent CPL variable is equal to thevalue of the CPL term. Only makessense in case of integer or Boolean va-lues.

< > Permanent CPL variable is not equal tothe value of the CPL term. Only makessense in case of integer or Boolean va-lues.

< Permanent CPL variable is less thanthe value of the CPL term.

3 Permanent CPL variable is less than orequal to the value of the CPL term.

> Permanent CPL variable is greater thanthe value of the CPL term.

. Permanent CPL variable is greater thanor equal to the value of the CPL term.

<SimpleCPL expression>

To avoid impairment of movement generation,only simple CPL terms may be evaluated atruntime.A simple CPL term is a mathematical termconsisting of permanent CPL variables, con-stants and the mathematical operations allo-wed in CPL.

<CPL expression> Any mathematical term in the CPL program-ming language.

<Timeout > Optional time in ms; default = 0.If <Timeout> elapses before the pertainingcondition has been fulfilled, a warning is trig-gered and the system continues to wait.If Timeout has not been programmed or isequal to 0, no warning will be triggered.

Examples:N10 WPV[@9=10] The program waits at the active point in

time until the permanent variable @9 re-aches a value of 10.

N10 WPVE[@8=(5*#VAR2%)] The term ”5 * #VAR2%” is evaluated atpreparation time. The value thus determi-ned is compared to permanent variable@8 at runtime. As long as @8 does notcorrespond to the value determined, nonew NC block will become active.

Page 89: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-77Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Writing a permanent CPL variable: SPV / SPVEUsing function SPV / SPVE, a value is assigned to a permanent CPL va-riable by writing at runtime.

The value can be determined at different times:D SPV: the value to be assigned to the permanent variable is only defi-

ned at runtime.Due to the evaluation at runtime, only a simple CPL expression is per-mitted.

D SPVE: the value to be assigned to the permanent variable is determi-ned at preparation time (CPL interpretation time) but only assigned tothe permanent CPL variable at runtime.

Syntax:The value to be assigned is determined at runtime:

SPV[<Perm.CPL variable> = <Simple CPL expression>]

The value to be assigned is determined at preparation time:

SPVE[<Perm.CPL variable> = <Simple CPL expression>]

where:

<Perm. CPL variable> Permanent variable, marked by the ”@”symbol followed by a variable name.

<SimpleCPL expression>

To avoid impairment of movement generation,only simple CPL terms may be evaluated atruntime.A simple CPL term is a mathematical termconsisting of permanent CPL variables, con-stants and the mathematical operations allo-wed in CPL.

<CPL expression> Any mathematical term in the CPL program-ming language.

Examples:N10 SPV[@6=1] A value of 1 is assigned to

permanent variable ”@6” atruntime.

N10 SPV[@5=(7*(@PERMVAR1% +5))] The value of the term(7*(@PERMVAR1% + 5)) isdetermined at runtime andthen assigned @6.

N10 SPVE[@5=(7*#VAR1%)] The value of the term (7 *#VAR1%) is determined atpreparation time and assigned@5 at runtime.

Page 90: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-78 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Movement stop until an axis positions has been attained: ASTOPA / ASTOPOUsing function ASTOPA / ASTOPO, it is possible to synchronize move-ments between channels. Depending on the position of one or moreaxes of the axis coordinate system ACS on a channel, the synchro-nous movement on another channel is stopped and resumed.

Restrictions:D The axes used for synchronization must belong to a channel other

than the channel to be controlled; otherwise a modal interlock mayoccur.

D The channel to be controlled must be in automatic or manual inputmode.

D If AND and OR conditions have been specified for the channel simul-taneously, there will be a channel stop when the respective conditionfor at least one of the two functions has been fulfilled.

One or more conditions for stopping the channel can be entered for eachchannel to be controlled:D ASTOPA: As long as all conditions are fulfilled, the synchronous

movement of the channel to be controlled will be stopped (logicalAND link).

D ASTOPO: As long as at least one condition is fulfilled, the synchro-nous movement of the channel to be controlled will be stopped (logi-cal OR link).

. If new AND and OR conditions are entered, all previous conditionsin this channel become invalid.

Syntax:AND conditions:

ASTOPA[<Channel num-ber>,<Cond.1>,<Cond.2>..,<Cond.8>.]

OR conditions:

ASTOPO[<Channel num-ber>,<Cond.1>,<Cond.2>..,<Cond.8>.]

where:

<Channel num-ber>

Number of the channel to be controlled (1-n).Integer value or integer variable.

<Cond.1,Cond.2...Cond.8>

Entry of 1 to 8 conditions in the form:<Axis><Comparison operator><Comparison va-lue>

where:

<Axis> System or channel axis name, pro-grammed as a CPL string constantor as a CPL string variable.

Page 91: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-79Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Compari-son opera-tor>

permitted operators: < , ≤, > , ≥

<Compari-son value>

Real value or real CPL expression.The value is determined at prepara-tion time and remains modally effec-tive.

. From one channel, a maximum of 4 other channels can be stoppedby AND/OR conditions.

Example: Use of axis names and numbers10 AXISNO% = 220 AXISNAME$ = ”X”30 STOPCHAN% = 2:

Definition:- axis number,- axis name- channel number

N40 ASTOPO[STOPCHAN%, ACHSNR%<10]:

N90 ASTOPO[STOPCHAN%, ”Z”>20.3]:

N150 ASTOPO[STOPCHAN%, ACHSNAME$<1.5]

Page 92: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-80 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Movement stop until a basic workpiece position has been attained: BSTOPA / BSTOPOUsing function BSTOPA / BSTOPO, it is possible to synchronize move-ments between channels. Depending on the position of one or morecoordinates of the basic workpiece coordinate system BCS on achannel, the synchronous movement on another channel is stopped andresumed.

Restrictions:D The coordinates used for synchronization must belong to a channel

other than the channel to be controlled; otherwise a modal interlockmay occur.

D The channel to be controlled must be in automatic or manual inputmode.

D If AND and OR conditions have been specified for the channel simul-taneously, there will be a channel stop when the respective conditionfor at least one of the two functions has been fulfilled.

One or more conditions for stopping the channel can be entered for eachchannel to be controlled:D BSTOPA: As long as all conditions are fulfilled, the synchronous

movement of the channel to be controlled will be stopped (logicalAND link).

D BSTOPO: As long as at least one condition is fulfilled, the synchro-nous movement of the channel to be controlled will be stopped (logi-cal OR link).

. If new AND and OR conditions are entered, all previous conditionsin this channel become invalid.

Page 93: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-81Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Syntax:AND conditions:

BSTOPA[<Channel num-ber>,<Cond.1>,<Cond.2>..,<Cond.8>.]

OR conditions:

BSTOPO[<Channel num-ber>,<Cond.1>,<Cond.2>..,<Cond.8>.]

where:

<Channel num-ber>

Number of the channel to be controlled (1-n).Integer value or integer variable.

<Cond.1,Cond.2...Cond.8>

Entry of 1 to 8 conditions in the form:<Coordinate><Comparison operator><Compari-son value>

where:

<Coordinate> For BCS:Coordinate name or coordinateindex, programmed as a CPLstring constant or as a CPL stringvariable.

<Comparisonoperator>

permitted operators: < , ≤, > , ≥

<Comparisonvalue>

Real value or real CPL expres-sion. The value is determined atpreparation time and remainsmodally effective.

. From one channel, a maximum of 4 other channels can be stoppedby AND/OR conditions.

Example: Activate an AND condition for basic workpiece coordinatesN10 BSTOPA[3,”z”<12.0,”x”>15] Channel 3 is stopped for as

long as the following is applica-ble to the controlling channel: Position of basic workpiececoordinate z < 12 mm and position of basic workpiececoordinate x > 15 mm

Page 94: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-82 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Movement stop until a workpiece position has been attained: WSTOPA / WSTOPOUsing function WSTOPA / WSTOPO, it is possible to synchronize move-ments between channels. Depending on the position of one or morecoordinates of the workpiece coordinate system WCS on a channel,the synchronous movement on another channel is stopped and resu-med.

Restrictions:D The coordinates used for synchronization must belong to a channel

other than the channel to be controlled; otherwise a modal interlockmay occur.

D The channel to be controlled must be in automatic or manual inputmode.

D If AND and OR conditions have been specified for the channel simul-taneously, there will be a channel stop when the respective conditionfor at least one of the two functions has been fulfilled.

One or more conditions for stopping the channel can be entered for eachchannel to be controlled:D WSTOPA: As long as all conditions are fulfilled, the synchronous

movement of the channel to be controlled will be stopped (logicalAND link).

D WSTOPO: As long as at least one condition is fulfilled, the synchro-nous movement of the channel to be controlled will be stopped (logi-cal OR link).

. If new AND and OR conditions are entered, all previous conditionsin this channel become invalid.

Page 95: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

Electric Drivesand Controls

2-83Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Syntax:AND conditions:

WSTOPA[<Channel num-ber>,<Cond.1>,<Cond.2>..,<Cond.8>.]

OR conditions:

WSTOPO[<Channel num-ber>,<Cond.1>,<Cond.2>..,<Cond.8>.]

where:

<Channel num-ber>

Number of the channel to be controlled (1-n).Integer value or integer variable.

<Cond.1,Cond.2...Cond.8>

Entry of 1 to 8 conditions in the form:<Coordinate><Comparison operator><Compari-son value>

where:

<Coordinate> For WCS:Coordinate name or coordinateindex, programmed as a CPLstring constant or as a CPL stringvariable.

<Comparisonoperator>

permitted operators: < , ≤, > , ≥

<Comparisonvalue>

Real value or real CPL expres-sion. The value is determined atpreparation time and remainsmodally effective.

. From one channel, a maximum of 4 other channels can be stoppedby AND/OR conditions.

Example: Activate an AND condition for workpiece coordinatesN10 WSTOPA[3,”Z”<12.0,”X”>15] Channel 3 is stopped for as

long as the following is applica-ble to the controlling channel: Position of workpiece coordi-nate Z of the channel is lessthan 12 mm and position ofworkpiece coordinate (WCS) Xis greater than 15 mm

Page 96: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC Programming Basics

2-84 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Canceling the stop conditions: OFFSTOPA / OFFSTOPO

Clearing the stop conditions for a control channel.

Syntax:

OFFSTOPA Clears all AND stop conditions

OFFSTOPO Clears all OR stop conditions

Please note for the synchronization functions:D ASTOPO, BSTOPO, WSTOPO, OFFSTOPO act modally and cancel

each other mutually.D ASTOPA, BSTOPA, WSTOPA, OFFSTOPA act modally and cancel

each other mutually.

Clearing the stop conditions by means of end of program (M30):At the end of a parts program (M30), at channel reset or program dese-lection, the stop conditions activated in this channel are canceled impli-citly.

CAUTIONUndesired traversing motion!Many NC functions expect the programming of axis/coordinateaddresses. Generally, only the addresses of the correspondingaxes of the channel, i.e. synchronous axes, may be programmedin addition to the coordinate addresses.Programming the address of an asynchronous axis within a para-meter list generally leads to a syntax error, while programmingoutside of a parameter list leads to a synchronous traversing mo-tion!Exceptions:G74(Home) VA1: asynchronous axis VA approaches referencepoint.GAX(VA): asynchronous axis VA is transferred to

the channelFsMove, FsTorque, FsReset: Function Move to positive stop

also affects asynchronous axes.

Page 97: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Electric Drivesand Controls

3-1Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3 NC Functions with Syntax According to DIN 66025(incl. Supplements)

3.1 Overview

The control has a variety of NC functions. In addition to the commandsthat are specified within DIN 66025, this includes important supplementsin the area of G-codes and additional high-level language-type syntaxelements.The control’s NC functions includeD 1- and 2-digit G-codes:

these are geared mainly towards the DIN 66025, providing sensiblesupplements to its ”G-code vocabulary” toD supplement function groups that exist in the DIN

(e.g. G52, G53, G54, ...), orD introduce new function groups that relate to existing function

groups.1-digit G-codes can always be written with 2 digits with a leading zero(e.g. G0=G00, G1=G01, ...).

D 3-digit G-codes (exceptions):such G-codes are used if an existing function from the 2D area is ap-plied in the same manner in the 3D area (e.g. G41, G42 -> G141,G142).

D G-codes with ”.” extension:these are used together with zero offsets or coordinate transforma-tions.These functions have up to 6 pages that can be addressed/program-med using the ”.” extension.Examples:G54.4 1st zero offset of page 4G59.4 6th zero offset of page 4

D M-functions with defined NC functionse.g. M0, M30

D NC functions with high-level language syntax:D (see Chapter 4)

. A tabular overview of all NC functions can be found in the Appen-dix, A-2 ff. In addition, all NC functions are in the index starting on page A-54.

Page 98: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

3-2 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Used notationsThe following notations are used for the syntax of NC functions in thismanual:

Font”Courier bold” or ”Courier”:Character strings in this font must be programmed as shown below.Example: G0(POL)

Angle brackets < >indicate a wildcard for an expression/parameter to be programmed. Thewildcard is written in italics.Example: <Axis1>

Curly brackets indicate an optional expression/parameter. Such syntax elements may, but do not have to be specified. Example: G0(POL,<Par1>)

Character ”|”separates possible parameters that cannot be used simultaneously (al-ternative parameters).Example: G0(POL,NIPS|IPS1|IPS2|IPS3)

Page 99: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G00

Electric Drivesand Controls

3-3Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2 G-Codes

3.2.1 Linear Interpolation at Rapid Traverse G00

EffectApproaches a programmed position with interpolation on a straight lineat the maximum path speed (= in rapid travel).

The following applies:D At least one axis travels at maximum velocity or acceleration. The ve-

locity of the axes is controlled in such a manner that they reach thetarget point at the same time.

D When the function is active, the ”Rapid traverse active” channel IF (=interface) signal is output.

D The following distance (displacement between the command and ac-tual values) at the end of the block can be reduced to the size of cer-tain target windows (= ”Precise stop” function).

D The function acts modally and cancels G1, G2, G3, G5, G6, G33.

+Y

+XW

100

200

300

100 200 300 400 500

Target position

Starting position

G0

Programming

Basic function Syntax:

G0 Rapid traverse with precise stop (fine positioning window)and programming of the end position in Cartesian coordi-nates.

Example::N40 X100 Y100 Starting position.N50 G0 X500 Y300 Approach target position in rapid tra-

verse.

Page 100: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G00

3-4 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Optional parameters Syntax:

G0(NIPS|IPS|IPS1|IPS2|IPS3,POL)

where:NIPS Precise stop OFF. No braking to v=0 at the end of a block.IPS Precise stop ON. The Precise stop window that was last set

for rapid traverse is taken into account (default = fine posi-tioning window).At the end of the block, the control first brakes the pathvelocity to v=0. Only when this positioning window has beenreached for all axes involved will the traversing movement ofthe next block be executed.The Precise stop window for feed mode is not affected by theRapid traverse positioning window.

IPS1 As for IPS, but always with a fine positioning window.IPS2 As for IPS, but always with a coarse positioning window.IPS3 As for IPS; however, no positioning window is checked – in-

stead, merely braking to a velocity v=0 occurs at the end ofthe block.For more information regarding the precise stop, seefunction G61/G62.

POL Activates polar coordinate programming and sets polarangle 1 to 0, polar angle 2 to 90 degrees.See section 4.60.2, page 4-105 ff. on how to program polarcoordinates.

Special features and restrictions:D The function can be programmed with or without axis addresses in

the same block.D The corresponding velocity is determined using the machine parame-

ters for the maximum axis velocity.D The Rapid traverse velocity can be limited to the reduced value set in

the machine parameters using channel IF signal ”Reduced rapid tra-verse ” (qCh_RedRap).

D The Rapid traverse velocity can also be limited using function ”Test ofrapid traverse”, which is controlled using channel IF signal ”Test of ra-pid traverse” (qCh_TestRap).

D The velocity can be influenced using the potentiometer.

Page 101: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G01

Electric Drivesand Controls

3-5Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.2 Linear Interpolation at Feedrate G01

EffectApproaches a programmed position with interpolation on a straight linewith the effective feedrate (programmable using F-address). The movement is coordinated in such a manner that all axes involvedarrive at the programmed end point simultaneously.General rule:D The programmed feedrate value (F) acts as path feed; this means – in

the case of more than one moving axis – that the portion of each indi-vidual axis is less than F.

D The function acts modally and cancels G0, G2, G3, G5, G6, G33.

+Y

+XW

100

200

300

100 200 300 400 500

Target position

Starting position

G1

Programming

Basic function Syntax:

G1 Movement according to active feedrate and programmingof the end position in Cartesian coordinates.

Example::N40 X100 Y100 Starting position.N50 G0 X500 Y300 F100 Approach target position with feedrate

F100.

Optional parameters Syntax:

G1(IPS|IPS1|IPS2|IPS3,POL)

where:IPS Precise stop ON, regardless of G61/G62. The Precise stop

window that was last set for the feed mode is taken intoaccount (default = fine positioning window).At the end of the block, the control first brakes the pathvelocity to v=0. Only when this positioning window has beenreached for all axes involved will the traversing movement ofthe next block be executed.

IPS1 As for IPS, but always with a fine positioning window.

Page 102: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G01

3-6 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

IPS2 As for IPS, but always with a coarse positioning window.IPS3 As for IPS; however, no positioning window is checked – in-

stead, merely braking to a velocity v=0 occurs at the end ofthe block.For more information regarding the precise stop, seefunction G61/G62.

POL Activates polar coordinate programming and sets polarangle 1 to 0, polar angle 2 to 90 degrees.See section 4.60.2, page 4-105 ff. on how to program polarcoordinates.

Special features and restrictions:D The function can be programmed with or without axis addresses in

the same block.D If no feedrate is yet active, a feedrate must be programmed in the

same line using the F-address. This feedrate remains effective until it is overwritten by a new one.

D The programmed path velocity can be limited using machine parame-ters.

D The path velocity can be influenced using the feedrate potentiometer.

Page 103: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G02, G03

Electric Drivesand Controls

3-7Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.3 Circular/Helical/Helical-N Interpolation G02, G03

EffectApproaches the programmed target position in the active working planewith interpolation on a circular path with the current feedrate (program-mable using F-address).D G2: Clockwise circular pathD G3: Counterclockwise circular path

Furthermore, additional axes outside of the working plane can be inclu-ded in the programming; their movements are linearly interpolated.

+Y

+XW

Target position

G2

+Y

+XW

Target position

G3

Circular interpolation:Solely the axes of the active working plane participate.

Helical interpolation:An additional synchronous axis to the axes of the active working planeparticipates.If this axis is positioned perpendicular to the active working plane (e.g.the remaining axis of the workpiece coordinate system), a helical pathwith a constant slope is generated (helical interpolation).

Z

X

A

E

Y

W

Helical interpolation(Special case: helical interpolation)

A: Starting pointE: End point

Helical-N interpolation:More than one additional synchronous axis (max. 6) to the axes of theactive working plane is programmed.

Page 104: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G02, G03

3-8 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Z

X

A

E

Y

W

Helical-N interpolation

U

A: Starting pointE: End point

The following applies:D The axes traveling along a circular arc are clearly defined by the se-

lected working plane (G17, G18, G19, G20).D The programmed feedrate value (F) acts as the path feed, generally

referring to all the axes traversing in a block; this means – in the caseof more than one moving axis – that the portion of each individual axisis less than F.

D The real feedrate can be limited by the maximum possible radial ac-celeration.

D Functions G0, G1, G2, G3, G5, G6 form a modal group and thereforecancel each other mutually.

D The circular path can be programmed using:D radius programming orD center point programming.

Page 105: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G02, G03

Electric Drivesand Controls

3-9Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Radius programmingUsing the current position as the starting point, you specify a circular mo-vement by programming the circle’sD end point andD radius.The circle’s end point can be given as an absolute or incremental posi-tion value.

Basic function Syntax:

G2 <EP> R<Value> Clockwise circular pathG3 <EP> R<Value> Counterclockwise circular path

where:<EP> Coordinates of the end point.<Value> Radius of the circular path.

The radius must be at least half the distance between thestarting and the end point.The positive/negative sign is used to specify whether thepath is to traverse with the smaller or the larger arc if two cir-cular paths are possible:positive radius value: arc ≤ 180 degreesnegative radius value: arc > 180 degrees.If the radius is exactly half the distance between the startingand the end point, a semicircle results and any positive/ne-gative sign can be used.

+R

G2:

Starting point

-R

End point

+R

G3:

Starting point

-R

End point

Starting point End point

-R +R

Special case for semicircle:any positive/negative sign for R

Starting point End point

-R +R

Special case for semicircle:any positive/negative sign for R

Special features and restrictions:D Full circles cannot be generated.D The control automatically corrects imprecise radius entries according

to the tolerances set in the machine parameters. Otherwise, a runtime error results.

Page 106: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G02, G03

3-10 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Center point programmingUsing the current position as the starting point, you specify a circular mo-vement by programming the circle’sD end point andD center point.The circle’s center point is incrementally programmed, based on the cor-responding starting point of the circle.

Basic function Syntax:

G2 <EP> <IP> Clockwise circular pathG3 <EP> <IP> Counterclockwise circular path

where:<EP> Coordinates of the end point.

If the starting and end points within the circle plane are iden-tical, a full circle is generated automatically.

<IP> Interpolation parameters I, J and K.These define the distance between circle starting point Aand circle center point M for each axis. Their sign resultsfrom the vector direction from A to M.Which interpolation parameter is assigned to which axis de-pends on the meaning of the coordinates in the machine pa-rameters.By default: I = M(X) - A(X) for X-coordinate

J = M(Y) - A(Y) for Y-coordinateK = M(Z) - A(Z) for Z-coordinate

G2: G3:+Y

+X

M+!I

−!J

W

+Y

+X

A

EM

−!I

+!J

W

A: Starting pointE: End pointM: Center point

A

E

A: Starting pointE: End pointM: Center point

Special features and restrictions:D If the starting and end points are identical, the control automatically

generates a full circle.D The control automatically corrects imprecise center point entries ac-

cording to the tolerances set in the machine parameters.To do this, it offsets the position of the center point accordingly.

D If interpolation parameters as well as a circle radius are programmedin the same block, only the circle radius is taken into account (= radiusprogramming).

Page 107: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G02, G03

Electric Drivesand Controls

3-11Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D If interpolation parameters that are not suitable for the selected planeare programmed, the control reports a runtime error.Example: G17 G2 X5 I9 K7 (Error: K is not suitable for the X/Y-plane)

Optional parameters Syntax:

G2G3(POL) <EP> R<Value> Radius programming in polar coor-dinates

G2G3(POL) <EP> <IP> Center point programming in polarcoordinates

where:POL Activates polar coordinate programming for the end point

coordinates and sets polar angle 1 to 0, polar angle 2 to 90degrees.See section 4.60.2, page 4-105 ff. on how to program polarcoordinates.

Example: Radius programming (Cartesian):N40 G1 X10 Y10 F100 Traverse to starting point.N50 G2 X38 Y20 R15 Circular interpolation.

+Y

+XW

10

20

10 20 30 40

End point

Starting point

G2

Example: Center point programming (Cartesian):N80 G1 X100 Y100 F100 Traverse to initial position.N90 G90 G17 G3 X350 Y250 I200 J-50:

Counterclockwise circular interpola-tion in the X/Y-plane. Absolute dimen-sion programming for the end pointcoordinates is active.

Page 108: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G04

3-12 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

+Y

+X

50100

250

100 300 350

A

E

M

+!I

−!J

W

3.2.4 Dwell Time G04

EffectStops program execution. The subsequent programmed block is pro-cessed only after the programmed dwell time has elapsed.

The dwell time starts when the previous NC block has been completelyprocessed. Rotating spindles or traversing auxiliary axes is not stopped. Synchro-nous axes can reduce their lag, if necessary. The dwell time can be programmed inD seconds orD in spindle revolutions.

To determine the spindle revolutions, the current actual revolutions areestablished cyclically from the main spindle, calculating the revolutionsperformed on that basis. In case of highly dynamic spindles, a certaindeviation between the programmed and the actual spindle revolutionswaited may therefore occur in the acceleration or deceleration phases.If the configured main spindle is an analogous spindle (without speedfeedback), the rpm setpoint is used for the calculation instead of the ac-tual rpm.

ProgrammingSyntax:G4(F<Value>) Dwell time in seconds.G4(S<Value>) Dwell time in spindle revolutions.

where:<Value> Entry in seconds or spindle rotations.

If ”0” is entered, the G4 block is discarded internally.

Page 109: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G05

Electric Drivesand Controls

3-13Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Special features and restrictions:D The function must be programmed in a separate block without path

information. Only auxiliary and special functions are permissible inthis block.

D The programmed spindle revolutions refer to the main spindle confi-gured in the machine parameters or using the MainSp function (referto page 4-80).

3.2.5 Circle with Tangential Entry G05

EffectUsing the last-programmed traversing movement, the control automati-cally calculates a tangential circle entry for the G5 block. Only a transition involving no reversal of direction is referred to as ’tan-gential’.

. The first entry tangent determines all following G5 contour ele-ments if several G5 movements take place consecutively.

Functions G0, G1, G2, G3, G5, G6 form a modal group and thereforecancel each other mutually.

CAUTIONMachining marks are possible at the block transition in the caseof helical/helical-N interpolation!The calculated tangential transition refers only to the circle plane.The spatial tangent may jump at the block transition!

ProgrammingSyntax:

G5 <EP>

where:<EP> Coordinates of the circle’s end point.

If the starting and end points within the circle plane are iden-tical, a full circle is generated automatically.

Special features and restrictions:D Programming G5 is not possible in the ”Manual data input” operating

mode.D A block containing a traversing movement must be programmed

ahead of G5 in the same program.D The current plane must not be switched over directly ahead of or du-

ring an active G5.

Page 110: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G06

3-14 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples

+Y

+X

70

50 110

+Y

+X

70

50 130

+Y

+X

70

50 90

A

M

W

10A

100

W

ME

A

40M1

WG1 X20 Y70 F200

X50X110 Y10G5

G1 X20 Y70 F200X50X130 Y100G5

G1 X-15 Y40 F200X50X90 Y120G5

G2 Y70 R-60

E

T

T

E

−15

120 M2

T

T: Tangent. A: Starting point of the circular segment. E: End point of the circular segment. M: Center point

3.2.6 Spline Programming G06

Compared to linear interpolation, spline interpolation – despite a lowernumber of support points – provides nearly the same surface quality andcontour precision because continuous curves are calculated betweenthe points.

The IndraMotion MTX supports the following spline types:D Spline type 0: Spline with coefficient programming

(polynomial coefficients of CAD/CAM system)D Spline type 1: C1-continuous cubic splines with support point pro-

gramming (tangential transitions at the support points)

D Spline type 2: C2-continuous cubic splines with support point pro-gramming(continuous-curvature transitions at the support points)

D Spline type 3: B-spline with coefficient programming(curve shape near the support points)

The desired spline type is selected and initialized using function ”Spline-Def” (SDF; see page 4-155). Then spline programming can be activatedwith function G6.

. For detailed information about the individual spline types, see the”Description of Functions”.

Special features and restrictions:The following functions can not be programmed with splines:D Tensor orientationD 2D path compensation G41/G42.D Punching/nibbling with path separationD Chamfers and roundingsD Tangential tool guidance

Page 111: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G06

Electric Drivesand Controls

3-15Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D Precision programmingD G5 after a splineD Cancel distance to go

ProgrammingSyntax:G6 Activate the ”Spline” type of path.

Depending on the required programming type, G6 can be programmedfor the various spline types with different, modally effective parameters:

3.2.7 Spline with Coefficient Programming (Spline Type 0)

Coordinate/axis programming:Each channel coordinate may be moved if desiredD as a spline by specifying the polynomial coefficients:

<Coordname>(<c0>,<c1>,....,<cn>) Programming indivi-dual coordinates withpolynomial coeffi-cients.

D or linearly by specifying the end positions:<Coordname>(<Endpos>) Programming the end

position of individualcoordinates/axes.

where:<Coordname>: Name of coordinate or axis.<c0>,<c1>,...,<cn>: Polynomial coefficients of a coordinate.

n corresponds to the spline degree de-fined in ”SplineDef”.

<Endpos>: End position of the coordinate.

Example:SplineDef(3)G6 X(0.1,1.25,0.5,0.73) Y30 B(0.0,-1.0,0.1,-0.2)

Denominator polynomial programming:DN(<g0>,<g1>,...,<gn>) Common denominator polynomial for all

spline coordinates.Exact description of rational Bezier spli-nes, rational B splines (NURBS) and allconics.

Page 112: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G06

3-16 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

where:<g0>, <g1>, ..., <gn>: Polynomial coefficients of the denomina-

tor polynomial.n corresponds to the spline degree de-fined in ”SplineDef”.

Example:SplineDef(3)G6 X(0.1,1.25,0.5,0.73) B(0.0,-1.0,0.1,-0.2) DN(1,0,1)

Orientation vector programming:Active vector orientation-capable axis transformation (”Coord(..)”) is re-quired for this programming method.O1(<o10>,<o11>,...,<o1n>) x-component of the orientation vector

O2(<o20>,<o21>,...,<o2n>) y-component of the orientation vector

O3(<o30>,<o31>,...,<o3n>) z-component of the orientation vector

where:<o10>,<o11>,...,<o1n>: Spline coefficients of the x-component of

the orientation vector.<o20>,<o21>,...,<o2n>: Spline coefficients of the y-component of

the orientation vector.<o30>,<o31>,...,<o3n>: Spline coefficients of the z-component of

the orientation vector.n corresponds to the spline degree de-fined in ”SplineDef”.

Example:N00 ;Spline coefficients for vector orientation001 PI=3.14159:PIH=PI/2:PIHQ=PIH*PIH:PIHC=PIHQ*PIHN10 G1 F30000 X0 Y0 Z0 B90 C0N20 SplineDef(3)N30 Coord(1) ;5-axis transformation with vector orienta-tion ONN40 G6 PL[PIH] ;PL: see spline parameter length programmingN50 O1(1,0,-3/PIHQ,2/PIHC) O3(0,1,(3-PI)/PIHQ,(-2+PIH)/PIHC)

N60 O1(0,0,3/PIHQ,-2/PIHC) O3(1,0,(-3+PIH)/PIHQ,(2-PIH)/PIHC)

N70 O(0,1,0) ;Normal vector orientationN80 G1N90 Coord(0)

Page 113: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G06

Electric Drivesand Controls

3-17Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Spline parameter length programming:The spline parameter length is the length of the interval defined for w,where w is active between 0 and we. The value we acts modally and remains valid for all NC blocks until G6 isdeselected.PL must be programmed in the first traversing block after G6; otherwise,a runtime error will occur.PL<we> Optional programming of the spline pa-

rameter length.

where:<we>: any value > 0

Example:G6 X(0.1,1.25,0.5,0.73) B(0.0,-1.0,0.1,-0.2) PL0.6

(X = 0.1 + 1.25 w + 0.5 w2 + 0.75 w3 und B = 0.0 - 1.0 w + 0.1 w2 - 0.2 w3 wherew is active between 0 and 0.6)

3.2.8 C1- and C2 Continuous Cubic Spline (Spline Type 1 and 2)

Coordinate/axis programming:The end points of the channel coordinates are programmed. All <members> listed in ”SplineDef” move along the spline curve; the re-maining coordinates not defined in ”SplineDef” move on a straight line.<Coordname>(<Endpos>) and/or<Axisname>(<Endpos>) and/or<Orientation coordinates>(<Endorient>)

Programming of indivi-dual coordinates/axes/orientation coordinatesand their values.

where:<Coordname>: Name of coordinate.<Axisname>: Name of axis.<Endpos>: End position of the coordinate/axis.<Orientation coordinates > Orientation coordinates ”O” or ”phi” and

”theta”.<Endorient>: End orientation in polar angles or Carte-

sian coordinates.

Example:Coordinates x, y, z and orientation coordinates phi, theta.SplineDef(2203,”x”,”y”,”z”,”phi”,”theta”)G6 x10 y20 phi20 theta30

Example:Axes X,Y,USplineDef(1213,”X”,”Y”)G6 X10 Y10 U20 (X and Y move as spline, U linearly)

Page 114: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G06

3-18 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Starting and end conditions:Syntax:SBC(<Type>,<Values>) Boundary conditions for the starting

point of a spline sequenceC1 with 3 starting conditionsC2 with 5 starting conditions

EBC(<Type>,<Values>) Boundary conditions for the end point ofa spline sequenceC1 with 3 starting conditionsC2 with 5 starting conditions

where:<Type> Default: 2

1: (valid for C1 and C2)Specification of tangential direction at the starting/end point of the spline sequence. A value must beentered in the <Values> list for each spline member.

2: (valid for C1 and C2)Specification of the second derivation at the starting/end point of the spline sequence. A value must beentered in the <Values> list for each spline member.

3: (valid for C2)De Boor’s boundary condition: links the second de-rivatives at the first/last two interpolation points.<Values> is usually 1 here.

4: (valid for C2)Periodic boundary condition: the last and the firstpoint of the spline sequence match. SBC(4) abso-lutely requires EBC(4) orEBC(4) absolutely requires SBC(4). The entire spline sequence must be in the look-ahead range; otherwise, a runtime error will be gen-erated.

11: (valid for C1 and C2)For starting condition: First spline starts tangentiallyrelative to the previous linear block.For end condition: The last spline leads tangentiallyto the subsequent linear block.

<Values> Default: 0,...,0All information entered in <Values> taken together indi-cates the direction and size of the starting/end tangentor the second derivative at the starting/end point.A positive or negative value may be entered for eachspline member.Type 11 does not need any <Values>.

Example:SBC(1,1.0,1.0,0.2) if SplineDef(1213,X,Y,B)

Page 115: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G06

Electric Drivesand Controls

3-19Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Spline parameter length:The spline parameter length is calculated by the NC from the specifiedinterpolation points. The process (parameter setting) defined in thespline ID is used for this purpose. The spline parameter length may alsobe programmed, if necessary.PL<we> Optional programming of the spline parameter length if

the <parameterization> selection is to be overwritten(see page 4-155 ”SplineDef”, parameter <Id>).

where:<we>: any value > 0

3.2.9 B Splines (NURBS) (Spline Type 3)

Coordinate/axis programming:The end points of the channel coordinates (checkpoints) are program-med. All <members> listed in ”SplineDef” move along the spline curve;the remaining coordinates not defined in ”SplineDef” move on a straightline.<Coordname>(<Endpos>) and/or<Axisname>(<Endpos>) and/or<Orientation coordinates>(<Endorient>)

Programming of indivi-dual checkpoints (coor-dinates/axes) and theirvalues.

where:<Coordname>: Name of coordinate.<Axisname>: Name of axis.<Endpos>: End position of the coordinate/axis.<Orientation coordinates > Orientation coordinates ”O” or ”phi” and

”theta”.<Endorient>: End orientation in polar angles or Carte-

sian coordinates.

Page 116: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G06

3-20 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example: Coordinates x, y, z and orientation coordinatesSplineDef(3103,X,Y,z,O)G6 x10 y20 z30 O(0.1,0,1.0)

Example: Axes X,Y,USplineDef(3102,X,Y)G6 X10 Y10 U20 (X and Y move as spline, U linearly)

Spline parameter length:The spline parameter length is automatically calculated by the NC fromthe specified checkpoints. The process (parameter setting = 1) definedin the spline ID is used for this purpose. The spline parameter length mayalso be programmed, if necessary.PL<we> Optional programming of the spline parameter length if

the <parameterization> selection is to be overwritten(see page 4-155 ”SplineDef”, parameter <Id>).

where:<we>: any value > 0

Spline point weighting for checkpoint of B splines:PW<we> Optional programming of point weights. This can be

used to modify the spline in the vicinity of a checkpoint.

where:<we>: Default: 1

0 < we < 1: presses the spline away from the checkpointwe > 1: Pulls the spline towards the checkpoint

Example: Coordinates x, y, z and orientation coordinatesSplineDef(3103,X,Y,z,O)G6 x10 y20 z30 O(0.1,0,1.0) PW2.3

Page 117: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G09G-Codes G08

Electric Drivesand Controls

3-21Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.10 Path Slope ON G08Path Slope OFF G09

EffectD Without ”path slope”, the control performs a complete up and down

slope (speed ramp) to v=0 at the start and end of a traversing block.Although this reduces the contour deviation at the block transition, itrequires a longer processing time.

D Using ”path slope”, the control attempts to generate a speed as con-stant as possible within the magnitude of the programmed feedrate,even at the block transition. This reduces the processing time.The fact that the contour may be ”rounded” at the contours in this casemay also be an advantage for certain processing procedures (moreuniform surface).

P0 X

Y

G0

G1

P1 P2

P3 P4

P5 P6

P7

P8

t

Contour

withoutpath slope(G9)

t

VPath

wherepath slope(G8)

Rapidtraverse

Feedrate

VPathRapid

traverseFeedrate

During the determination of the optimum velocity profile, the controltakes into account not only the value for the jumping ability of the axes(MP 1010 00011), but also the number of subsequent program blocks(block look-ahead; MP 7060 00110 - 7060 00130) because brakingwithin the leeway for the dynamics of the machine must be ensured atall times.

To limit contour deviations occurring at real corners, the maximumstep change must not be set at too high a value. On the other hand, ifthe maximum step change is set too low, this will result in undesirabledeceleration at minor knees in the contour (quasicontinuous transi-tions).

Smoothing of the path acceleration can be entered for G8 as the de-fault setting in machine parameter 7050 00320 (SHAPE function;also see page 3-23).

Page 118: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G08 G09

3-22 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Programming

Basic function Syntax:

G8 Path slope ON.

G9 Path slope OFF.

Special features and restrictions:D If Precise stop is active, the control will, despite the active G8, brake to

v=0 after each block.D Auxiliary functions can ameliorate the effect of G8 if their execution

time (including acknowledgement) is not significantly less than the in-terpolation time of a block. If necessary, the working path of a blockmust be lengthened or the feedrate must be reduced.

D Path slope acts only on synchronous axes (machining axes).D Functions G8 and G9 form a modal group together with the ramp

functions and therefore cancel each other mutually.

Page 119: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G8(SHAPE...) G9(SHAPE...) G9(ASHAPE...)

Electric Drivesand Controls

3-23Bosch Rexroth AGIndraMotion MTXR911314869 / 01

G9(X... , Y... , ...)

3.2.11 Jolt-Limited Velocity Control G8(SHAPE...)G9(SHAPE...)

G9(ASHAPE...)G9(X... , Y... , ...)

EffectJolt-limited velocity control smoothes jumps during path accelerationover several interpolation cycles. The number of interpolation cycles canbe programmed.This results in gentle velocity transitions (jolt limitation).Jolt-limited velocity control is possible in bothD ”contour mode” (with G8 active) andD ”positioning mode” (with G9 active).

Jolt-limited velocity control is also known as the SHAPE function.

t

t

a(t)

a(t)

a1

a1: Jump height

nipo: Numper of interpolation cycles over which acceleration -jump a1 is to be distributed

nipo nipo

a1

without SHAPE

with SHAPE

Acceleration distribution with/without SHAPE

Page 120: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G8(SHAPE...) G9(SHAPE...)

3-24 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

G9(ASHAPE...) G9(X... , Y... , ...)

Shape for contour modeSyntax:G8(SHAPE<Value>)

where:<Value> 0 or 1:

Switch off shape for contour mode.2 to 100 (whole numbers):Number of interpolation cycles over which the controlshould divide the jump linearly (SHAPE order).

without SHAPE parameter:Traverse with the default value for SHAPE stored in machine parameter 7050 00320.

. Changing the SHAPE order always leads to a block transition velo-city of v = 0.

Example:N30 G8(SHAPE10)::

Switch on SHAPE in contour mode and dividethe acceleration jumps over 10 IPO cycles.

N50 G8(SHAPE0)::

Switch off shape for contour mode.

N70 G8(SHAPE1)::

Switch off shape for contour mode.

N90 G8 Traverse with the default value for SHAPE sto-red in machine parameter 7050 00320.

Shape for positioning modeSyntax:

G9(SHAPE<Value>) Switch on linear SHAPE for positioningmode.

where<Value> Number of interpolation cycles over which the control should

divide the acceleration jump linearly.Range of values: 2 ... 100 cycles (whole number).

without SHAPE parameter:Traverse with the default value for SHAPE stored in

machine parameter 7050 00340.

G9(SIN<Value>) Switch on sin2-shaped SHAPE for positio-ning mode.

Page 121: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G8(SHAPE...) G9(SHAPE...) G9(ASHAPE...)

Electric Drivesand Controls

3-25Bosch Rexroth AGIndraMotion MTXR911314869 / 01

G9(X... , Y... , ...)

where<Value> Number of interpolation cycles over which the control should

divide the acceleration jump with a sin2 shape.The following values are permitted:

5: 5 IPO cycles10: 10 IPO cycles15: 15 IPO cycles20: 20 IPO cycles40: 40 IPO cycles

G9(ASHAPE,TYP<i>) This assigns the corresponding axis-speci-fic SHAPE order (number of IPO cycles)from MP 1003 00008 to every axis of thechannel and makes a blockwise calculationof the resulting block-specific SHAPE or-der for the path.

G9(<Par1>,<Par2>,... ,TYP<i>)

Program SHAPE order axis-by-axis. In thecase of unprogrammed axes, the SHAPEorder from MP 1003 00008 is used.

where:<Parx> Logical axis name with the SHAPE order that is to be assi-

gned to this axis (maximum of 100).

Example:N30 G9(X4,Y6,Z10) SHAPE order (X-axis) = 4

SHAPE order (Y-axis) = 6SHAPE order (Z-axis) = 10

TYPE 0 or no TYPE Filter order is defined through shape orderand jolt.

TYPE 1 Filter order: maximum shape order of theinvolved axes.

Resulting shape orderThe resulting path shape order Sb is the maximum of the effective axis

shape orders Seffi of all the axes involved in the interpolation.

SeffnbS = max ,...,S

eff1

In case of axis shape of type 1, the effective axis shape orders are theprogrammed or configured shape orders. With axis shape of type 0, theare determined based on the jolt.

The effective axis shape orders Seffi are computed from the program-

med shape orders using the formula:

Sa

a

ieff

maxi

effi

p

iS=

Page 122: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G8(SHAPE...) G9(SHAPE...)

3-26 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

G9(ASHAPE...) G9(X... , Y... , ...)

In this case,

Spi

axis shape order programmed with G9(...).

aeffi effective axis acceleration in the current NC block.

With linear interpolation, the value depends on the current pathsegment of the axis. With other types of interpolation (e.g. circular,helical), it is the axis acceleration usually programmed with ”Ax-Acc”.If the functions ”Inclined plane” or ”Axis coupling” are used, the ef-fective axis acceleration is generally decreased once again ascompared to the ”AxAcc” value!

amaxi Maximum axis acceleration (from MP 1010 00001).

. ”AxAcc” does not change the maximum axis acceleration fromMP 1010 00001!

Relationship between shape order and jolting

With axis shape orders Seffi , a maximum jolt r

maxi (derivative from ac-

celeration after time) is defined as a limit not to be exceeded in any mo-vement.This jolt is defined by:

ra i

maxmaxi p

iS

=

ipoT

Tipo: Clock time of the interpolator

Example:Axis X has a maximum acceleration (MP 1010 00001) of 10 m/s2. Theprogrammed axis shape order is 5 and the interpolation cycle is 4 ms.According to the formula above, a maximum jolt of 500m/s3 is thus defi-ned for axis X.

Page 123: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G16

Electric Drivesand Controls

3-27Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.12 No Plane G16

EffectDeactivates a plane that may be active.The following applies:D If a main or secondary axis is removed from a channel (e.g. in connec-

tion with function ”Axis transfer”), the control automatically switchesoff the selected plane and activates function G16.Circular or helical interpolation cannot be performed in this channelbefore a valid plane is selected.

D Some applications, types of machines, or processing functions do notrequire the configuration of a plane if neither circular nor helical inter-polation is necessary (e.g., for channels with only one machiningaxis).Classification ”999” – no processing function – can then be entered inMP 7010 00030 for each axis.

D If no plane function (G17, G18, G19, G20) has been entered for achannel after power-up (MP 7060 00010 and 7060 00020), functionG16 is automatically activated for the respective channel.

D Functions G16, G17, G18, G19 and G20 form a modal group and the-refore cancel each other mutually.

ProgrammingSyntax:

G16

Special features and restrictions:D If cutter path compensation (G41/G42) is active, the active plane may

not be switched or deactivated.

Page 124: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G17, G18, G19

3-28 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.13 Plane Switching G17, G18, G19

EffectFor a typical Cartesian standard machine tool, axes X, Y and Z areused to open a Cartesian workpiece coordinate system (WCS). Using 2coordinate axes each of the workpiece coordinate system, a total of 3different basic levels can be defined.

The plane switching function is used to select the active plane. It is defi-ned using one primary and one secondary coordinate, as well as – if ne-cessary – a feed axis that is positioned perpendicular to this plane.G17, G18 or G19 is programmed without parameters for this.

G17, G18 and G19 specify these coordinates and the active plane as fol-lows:

G2G2

G41 G2

+X

+Y

+Z

+X

+Y

+Z

+X

+Y

+Z

G17

G41

G41

G18 G19

W / P

W / P W / P

X/Y plane Z/X plane Y/Z plane

Primary coordi-nate

Secondarycoordinate

Feed coordi-nate

Active plane

G17 X Y Z XY

G18 Z X Y ZX

G19 Y Z X YZ

ProgrammingSyntax:

G17

G18

G19

Page 125: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G17, G18, G19

Electric Drivesand Controls

3-29Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Special features and restrictions:D If cutter path compensation (G41/G42) is active, the active plane may

not be switched or deactivated.D The following applies to interpolation parameters I, J, K for G02/G03

and G33:I refers to the X-axisJ refers to the Y-axisK refers to the Z-axis

D Tool length compensation is assigned to the active plane withG47(ActPlane) as follows:L1: primary coordinateL2: secondary coordinateL3: feed coordinate.This assignment is updated when the active plane is switched.

D Functions G16, G17, G18, G19 and G20 form a modal group and the-refore cancel each other mutually.

Assignment independently of axis nameAxis names can be set in any manner in the IndraMotion MTX. The axesthat the workpiece coordinate system WCS are to open are thus selec-ted using machine parameter 7010 00030 (coordinate meaning). Thisspecifies, independently of the configured axis name, which axes openthe X-, Y- and Z-coordinate of the workpiece coordinate system:

Axis with ”axis meaning X”: X-coordinate of the WCSAxis with ”axis meaning Y”: Y-coordinate of the WCSAxis with ”axis meaning Z”: Z-coordinate of the WCS

In general, the following assignment results for G17, G18 and G19:

Primary coordi-nate

Secondarycoordinate

Feed coordinate Active plane

G17 X-coord. WCS Y-coord. WCS Z-coord. WCS XY-coord. WCS

G18 Z-coord. WCS X-coord. WCS Y-coord. WCS ZX-coord. WCS

G19 Y-coord. WCS Z-coord. WCS X-coord. WCS YZ-coord. WCS

Page 126: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G17(...), G18(...), G19(...)

3-30 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.14 Enhanced Plane Switching G17(...), G18(...), G19(...)

EffectEnhanced plane switching specifies, in addition to the selection of theactive plane, which axes are to currently cover the workpiece coordinatesystem WCS. As a result, it is possible at runtime to define a workpiece coordinate sy-stem that deviates from the setting within the machine parameter and,based on this, to select the current plane.

The plane is selected according to the following overview:

Primary coordi-nate

Secondarycoordinate

Feed coordinate Active plane

G17 X-coord. WCS Y-coord. WCS Z-coord. WCS XY-coord. WCS

G18 Z-coord. WCS X-coord. WCS Y-coord. WCS ZX-coord. WCS

G19 Y-coord. WCS Z-coord. WCS X-coord. WCS YZ-coord. WCS

ProgrammingSyntax:

G17(<Axis1>,<Axis2>,<Axis3>)

G18(<Axis1>,<Axis2>,<Axis3>)

G19(<Axis1>,<Axis2>,<Axis3>)

where:<Axis1> ”X-coordinate” of the workpiece coordinate system WCS<Axis2> ”Y-coordinate” of the workpiece coordinate system WCS<Axis3> ”Z-coordinate” of the workpiece coordinate system WCS

Special features and restrictions:D The axes can be programmed with a logical (channel-based) or phy-

sical (system-wide) axis designation and must differ from one an-other. Entry can be made directly or as a CPL string variable.

D The programmed axes must be currently assigned to the channel.D In programming, only entering the axes that are to be reconfigured as

parameters is sufficient. The corresponding coordinates of the WCSremain unchanged for all other axes.Example:G17(,,W)The Z-coordinate of the WCS is defined by the W-axis. The X- andY-coordinates of the WCS remain unchanged.The active plane is covered by the X- and Y-coordinates of the WCS.

D Programming an empty bracket expression restores the WCS that isconfigured in MP 7010 00030 and then activates the selected plane.Example: G17()

Page 127: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G17(...), G18(...), G19(...)

Electric Drivesand Controls

3-31Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D The function may not be programmed while cutter path compensation(G41/G42) is active.If cutter path compensation is active, the plane may not be switchedor deactivated as a rule.

D If axis transformation is active, enhanced plane switching may not beprogrammed because the WCS is covered by the space coordinates.

D Functions G16, G17, G18, G19 and G20 form a modal group and the-refore cancel each other mutually.

Page 128: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G20

3-32 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.15 Free Plane Selection (WCS-independent) G20

EffectFree plane selection is required for applications for which the activeplane must be decoupled from the current workpiece coordinate systemWCS. It permits covering using any axis, regardless whether they arecurrently also covering the WCS.In this way, it is possible to, among other things, calculate the tool com-pensations (G41, G42, G47) in the primary, secondary and feed coordi-nate of the current plane while the workpiece transformations(placements, opening corrections) simultaneously refer to a workpiececoordinate system that is covered by other axes.

ProgrammingSyntax:

G20(<Axis1>,<Axis2>,<Axis3>)

where:<Axis1> Primary coordinate of the plane to be opened; assigned to

interpolation parameter ”I”.<Axis2> Secondary coordinate of the plane to be opened; assigned

to interpolation parameter ”J”.<Axis3> Feed coordinate of the plane to be opened.

Can be programmed if it is necessary to arrange a feed axisfor tool compensation ”G47(ActPlane)”.

Special features and restrictions:D The axes can be programmed with a logical (channel-based) or phy-

sical (system-wide) axis designation.D Cutter path compensation G41/G42 refers to the selected plane. The-

refore, the active plane may be switched only when cutter path com-pensation (G40) is not active. Otherwise, an error is reported.

D Tool length compensation is assigned to the active plane with”G47(ActPlane)” as follows:L1: primary coordinateL2: secondary coordinateL3: feed coordinate.This assignment is updated when the active plane is switched.

D Functions G16, G17, G18, G19 and G20 form a modal group and the-refore cancel each other mutually.

Page 129: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G33

Electric Drivesand Controls

3-33Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.16 Thread Cutting G33

EffectPermits the cutting ofD longitudinal threads

(cutting motion parallel to the main axis of the active plane),D transversal threads

(cutting motion parallel to the secondary axis of the active plane),D tapered threads

(the main and the secondary axis of the active plane are involved inthe cutting movement).

G33 can be programmed with a speed-controlled and position-control-led spindle. The cutting motion is always linked to the main spindle active on thechannel in question (refer to page 4-80).The feedrate of the cutting motion results from the current spindle speedand the programmed pitch portions (fixed, variable – refer to ”Program-ming”).Special features:D single and multiple threads can be producedD constant and variable thread pitches can be programmedD special dynamics adjustment during the cutting processD programmable quick retraction movementD chained threads can be produced.

. The feedrate potentiometer has no effect while G33 is active.

. As for circular interpolation (G2, G3), the tapping function is sub-ject to the active plane (G17 - G20).

The behavior of the ”Thread cutting” function is normally defined in ma-chine parameter 7050 006xx. In individual cases, or during commissioning, it may be advantageous toadjust individual sections quickly. This requirement is satisfied by func-tion ”ThreadSet” (for a description, refer to page 4-170 ff.).”ThreadSet” allowsD adjustment of the dynamics and retraction movement.D switching of the spindle operating mode (speed control, position con-

trol)D setting of a signal on the channel interface (configurable within the

”Active function” signals using machine parameters).

Page 130: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G33

3-34 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ProgrammingSyntax:

G33 <EP>,<Fixed pitch>,<Var. pitch>,<Starting angle>

where:<EP> Axis coordinates of the primary and secondary axis of

the active plane. The active plane is defined by G17,G18, G19 or G20.Example:The active plane for G18 is usually defined by axes Z(primary axis) and X (secondaryaxis).

<Fixed pitch> Defines the path (in mm) traveled in the direction of theprimary or secondary axis with each spindle revolu-tion. This value is programmed by the interpolation pa-rameter (I, J or K) valid in the respective active plane.In the event of tapered threads, the pitch thread speci-fied always must relate to the main cutting direction.Example:For G18, parameter K is assigned to the main axis,and I to the secondary axis. For a longitudinal thread(pitch in direction of main axis), the fixed thread pitch isprogrammed with the K address.

<Var. pitch> Optional parameter with address DF. Defines the pitch increase/decrease per spindle revo-lution in mm. Programming: ”DF<Value>” with <Value> in mm.

<Starting angle> Optional parameter. If no <Starting angle> has been programmed, it is as-sumed to be 0 degrees.The starting angle (offset) is needed for multiplethreads. The interpolation parameter not assigned tothe active plane is used as the address.Example:Addresses I and K have been assigned to the plane forG18. Therefore, the address of the starting angle is J.

Page 131: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G33

Electric Drivesand Controls

3-35Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example: Longitudinal threadG91 G18 G8 M3 S1000 Activate relative dimension programming.

Activate Z/X planeG0 X-10 Feed motion of the cutting tool (1).G33 Z-50,K2 Thread cutting (2). End point: incremental by

-50 mm in Z direction. Fixed thread pitch: 2 mm/rev. Interpolation pa-rameter: Interpolation parameters: K here.

G0 X10 Move out cutting tool (3).

X

Z

12

3

Example: Transversal threadG91 G18 G8 M3 S1000 Activate relative dimension programming.

Activate Z/X planeG0 Z-10 Feed motion of the cutting tool (1).G33 X40,I2 Thread cutting (2). End point: incremental by

+40 mm in X direction. Fixed thread pitch: 2 mm/rev. Interpolation pa-rameter: Interpolation parameters: I here.

G0 Z10 Move out cutting tool (3).

X

Z

1

2

3

Page 132: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G33

3-36 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example: Tapered threadG91 G18 G8 M3 S1000 Activate relative dimension programming.

Activate Z/X planeG0 X-20 Feed motion of the cutting tool (1).G33 Z-50 X15,K2 Thread cutting (2). End point: incremental by

-50 mm in Z direction and +15 mm in X direc-tion.Fixed thread pitch: 2 mm/rev. Interpolation pa-rameter: Interpolation parameters: I here.

G0 X5Move out cutting tool (3).

X

Z

12

3

max. 45 degrees!

K

The thread pitch (K in this case) alwaysrefers to the main direction of cutting.

Chained threadD These can be produced from all the types of thread described above.D They are programmed by several consecutive G33 blocks.With each G33 block programmed, the NC checks whether a subse-quent G33 block has been programmed with path information. If this isthe case, the next block is processed without halting the axes.

Page 133: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G33

Electric Drivesand Controls

3-37Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Multiple threadsMultiple threads are produced by a starting angle offset (for starting an-gle, refer to page 3-34).Example:A 4x thread is produced by four cuts displaced by 90 degrees each (0,90, 180, 270).

X

Z

12

3

1. cutStarting angle: 0 degrees

X

Z

12

3

2. cutStarting angle: 90 degrees

X

Z

12

3

3. cutStarting angle: 180 degrees

Z

12

3

4. cutStarting angle: 270 degrees

Dynamic behaviorAt the beginning and at the end of a thread-cutting process, the axes in-volved must be accelerated and stopped, respectively.

L Therefore, you should always provide for a sufficiently long entry path(for accelerating the cutting axes) and discharge path (for stopping).

As a rule, a distinction is made between 2 process options:D ”hard” start and ”hard” end of the cutting motion:

At the beginning of the G33 movement, the axis/axes jump(s) to thecutting speed (spindle speed * fixed pitch) when the starting angle isreached. At the end of the G33 movement, the speed returns to 0.

D Start/end of the cutting motion with individual dynamics selection:Since the ”hard” solution is not always desirable, or cannot be perfor-med due to restrictions existing in the area of axis dynamics, you mayset the dynamic behavior concerning the speed jump, starting anddeceleration speed individually.D statically with machine parameters (7050 00610, 7050 00615 and

7050 00620)D dynamically in the parts program using ”TreadSet(DYN)” (see

page 4-170).The control uses the programmed starting angle to compute a star-ting angle offset, taking into account the slope of the accelerationramp. Thus, it can be ensured that the same thread is always cut, re-gardless of the size of the acceleration.At the end of the thread, the cutting axis/axes are uncoupled from thespindle and initially decelerated to the jump speed, depending on thedeceleration setting, in order to be finally decelerated to stop.

Page 134: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G33

3-38 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

However, if the G33 block is followed by another traversing block withG8 active, the motion of this block will start at the speed that wouldhave resulted if the thread-cutting block had been a G1 block.

Rapid retractionThe ”fast retract” function can be used in conjunction with G33. If retraction data have beenD configured

(- statically with machine parameters (7050 00645, 7050 00650)or

- dynamically in the program using ”TreadSet(RD...)” (page 4-170))

andD have been activated

(- statically with machine parameter (7050 00640) or - dynamically in the program using ”TreadSet(RON1)” (page4-170)),

a positive edge at channel IF signal ”Fast retract” will initiate the retrac-tion with the following sequence:1. The cutting motion is superimposed by a motion that is oriented verti-

cally to the main cutting direction.2. If more than 70% of the retract path has been traveled, the cutting

axis/axes is/are uncoupled from the spindle and stopped at the confi-gured deceleration (machine parameter 7050 00620).

. If the retract motion was initiated, this condition can only be cance-led by ”Control reset” or ”Move away from the contour”.

Retract motions are always carried out perpendicularly to the main cut-ting direction of the secondary cutting axis.Retract motions are automatically initiated if either of the events ”Chan-nel reset”, ”System reset”, or ”Spindle reset” is triggered by the NC.

Example: Retraction from longitudinal threadG18TST(RON1)TST(RD(0,5)):

Activate Z/X plane (G18).Activate fast retract (RON1).Retract motion (RD ...) by +5 mm in the secon-dary cutting direction (X in this case).

G91 G33 Z-20,K1 Incremental programming ON (G91).Thread tapping (G33). End point: incrementalby -20 mm in Z direction. Fixed thread pitch: 1 mm/rev. Interpolation pa-rameter: Interpolation parameters: K here.

Page 135: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G40, G41, G42

Electric Drivesand Controls

3-39Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.17 Cutter Path Compensation G40, G41, G42

EffectThe cutter path compensation function causes the tool to move along anequidistant path parallel to the programmed path during execution of apart-specific program (equidistant path = path with right-angled, con-stant distance from the programmed contour). The distance between theequidistant and the programmed path depends on the active radiuscompensation value.The following illustration shows the principle:

G41

G42

G42 G41

= programmed contour

= direction of feed

= equidistant

Cutter path compensationto the right ofthe workpiece

to the left ofthe workpiece

ProgrammingSyntax:

G40 Cutter path compensation OFF (power-up state).If no traversing movement is programmed in the G40 block,the control immediately deactivates cutter pathcompensation vertically to the last traversing block!If a traversing movement is programmed in the G40 block,the control deactivates cutter path compensation linearlywhile traveling to the end point of the traversing movement.An active tool length compensation is not influenced by G40.

G41 Cutter path compensation to left of workpiece ON(for positive compensation values seen in the direction ofmachining).In addition to a D-address containing the required radiuscompensation value, a linear traversing movement of theaxes of the active plane may be programmed in the sameblock as G41. This selects the compensation while travelingto the end of the traversing movement.If no traversingmovement is programmed in the G41 block, the controlimmediately deactivates cutter path compensation verticallyto the last traversing block.

G42 Cutter path compensation to right of workpiece ON. Otherwise identical to G41.

Page 136: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G40, G41, G42

3-40 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

CAUTIONCompensation values may be immediately activated or deactiva-ted without programming a separate traversing movement. Thismay result in damage to the workpiece or the tool.Please note the information provided in this section in this con-text!

Special features and restrictions:D G40, G41 and G42 act modally and cancel each other mutually.D With G2, G3 or G5 active, functions G40, G41 or G42 may only be

programmed without any traversing movement.D The following is not allowed with G41 or G42 active:

D G17 - G20 (Plane switch)D G70, G71 (Inch/metric change-over)D G63 (Tapping without compensation chuck)D G74 (Traverse to reference point coordinates)D G75 (Probe input)D G76 (Traverse to fixed machine axis position)D G54.x - G59.x (Zero offsets)D G154.x - G159.x (Inclined plane)

Page 137: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G44G-Codes G43

Electric Drivesand Controls

3-41Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.18 Contour Transitions for Cutter Path Compensation:Arc G43Intersection Point G44

EffectFunction for active cutter path compensation (G41, G42). The control implements a contour transition on outside corners eitheras an automatically generatedD arc (G43) or as anD intersection point of the equidistant path (G44).

G43: ArcThe path gap is closed by a tangential arc with the radius ”r”:

ar

automatically generatedprogrammed points

equidistant traversing path

G44: Intersection pointThe control tries to close the path gap by determining the intersection ofthe two equidistants.Depending on the distance ”A” between contour corner ”KE” and inter-section point ”S”, the control proceeds as follows:

equidistanttraversing path

r

S

KE

for A ≤ √2 x r , the two equidistant paths are lengthened up to the intersection point

If the distance is large, the control cuts off the tip at a distance of A = √2 x rand closes the path gap using a straight line:

KE

rA S

a

Page 138: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G43 G44

3-42 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

. If no intersection point exists, the line is closed using an arc, as forG43.

ProgrammingSyntax:

G43 Contour transition as arc

G44 Contour transition as intersection of the equidistants.

The following applies:D G43 and G44 act modally and cancel each other mutually.D The power-up state can be specified in the machine parameters.

Special features and restrictions:D G43/G44 are programmed without any path conditions.

Page 139: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G46G-Codes G45

Electric Drivesand Controls

3-43Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.19 Feedrate Compensation:Cutter Contact Point G45Cutter Center Point G46

EffectFunction for active cutter path compensation (G41, G42). You define whether the control should keep the programmed feedrateD at the cutter contact point (cutter cutting path) orD on the cutter center point pathconstant.

FM

FB

FB

FM

Feed along the centerpoint path

Feed along the cuttingpath

FM

FB

FB

FM

G46G45

FM =FB =

ProgrammingSyntax:

G45 Keep feed FB along the cutting path constant.

G46 Keep feed FM along the cutter center point path constant.

The following applies:D G45 and G46 act modally and cancel each other mutually.D The power-up state can be specified in the machine parameters.

Special features and restrictions:D G45 should be used only for finish milling because the feedrate speed

can increase considerably along circular contours.

Page 140: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G47, G48

3-44 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.20 Tool Length Compensation G47, G48

EffectThe functionD activates/deactivates tool length compensationD optionally switches the assignment of length compensation values

L1, L2 and L3 to individual coordinates (method of operation as forG78; see page 3-60).

When tool length compensation is active, the following are in effect:D length compensation values L1, L2 and L3 of the currently selected

D-correction block (Dxx)D plus length compensation values L1, L2 and L3 of an external tool

compensation (EDxx)D function ”Static tool orientation” (parameters can be set using STO;

see page 4-159)D function ”Tool edge compensation”, if a tool edge has been entered in

the currently selected D-correction block (Dxx) and cutter path com-pensation G41/G42 (see page 3-39) is active.

ProgrammingSyntax:

G47 Tool length compensation ON.

G47(ActPlane) Assign length compensation values L1,L2 and L3 of the primary, secondary andnormal coordinates of the active planeand then switch length compensationon. Remains modally effective and isautomatically reconfigured at every follo-wing plane switch.

G47(-<L1 coord>,-<L2-Koord>,-<L3-Koord>)

Change the assignment of length com-pensation values L1, L2 and L3 to theindividual coordinates and then switchlength compensation on.

G47() Assign length compensation values L1,L2 and L3 according to the settings inmachine parameters 7050 01300 and7050 01310 and then switch lengthcompensation on.

G48 Tool length compensation OFF.

where:<Licoord> Name of the WCS coordinate that is to be assigned

correction Li (where i = 1, 2, 3) in the active workpiececoordinate system.If correction Li (where i = 1, 2, 3) is to affect coordinatesin the tool coordinate system (TCS), coordinate desi-gnators XTR, YTR und ZTR must be used and a cor-responding axis transformation must be active.

Page 141: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G47, G48

Electric Drivesand Controls

3-45Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Optional negative sign in front: correction is calculatedin the negative direction.Li correction values to which no coordinates are assi-gned are not taken into account.

Special features and restrictions:D Coordinates that do not belong to the default setting of the channel

are never taken into account in the ”G47()” syntax.D G47.. and G48 act modally and deselect each other.D Whether the coordinate addresses programmed under G47 refer to

workpiece or tool coordinates depends on the coordinate designatorthat is used (see <Coordinate i>, above).

D G47/G48 may be programmed with other path conditions, traversinginformation or auxiliary functions.

Example:G47(X,,ZTR) The L1 compensation is assigned to the X-coordinate of

the workpiece coordinate system (WCS), the L3 com-pensation to the Z axis of the tool coordinate system(TCS). Both compensations are calculated in the positivedirection. Then tool length compensation is switched on.The L2 compensation is not calculated because it is notassigned to any coordinate.

Page 142: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G53 G53.1-G59.1 G53.5-G59.5

3-46 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.21 Zero Offsets (ZO) G53,G53.1-G59.1

to G53.5-G59.5

EffectZO can be used to offset the machine coordinate system in space.

. If an opening compensation is required, see function ”BcsCorr”(workpiece transformation: workpiece length compensation; seepage 4-29).

The offset distances for the machine coordinates in the channel are sto-red in the ”zero offset tables”:D A ZO table contains 5 ZO pages (groups) with 6 zero offsets (ZO)

each.D Offsets from different ZO pages always work additively.D Offsets within a ZO page mutually overwrite each other.D Offsets with the channel number 0 act in every channel in which the

are activated. Offsets with a channel number >0, on the other hand,can only act in the specified channel. Ensure that the channel number0 is not used in case of multiple inputs of identical machine coordina-tes with different channel information, as all subsequent channel-specific offsets of this coordinate would not be taken intoconsideration.

ZO table

ZO group 1

ZO group 2

ZO group 3

ZO group 4

ZO group 5

ZO page

1. ZO

2. ZO

3. ZO

4. ZO

5. ZO

6. ZO

ZOZO values of

the machine

coordinates

. For details about editing the ZO tables, please refer to the operatinginstructions.

Page 143: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G53.1-G59.1 G53.5-G59.5G-Codes G53

Electric Drivesand Controls

3-47Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Programming1. Activate the desired ZO table with ”ZoTSel” (see page 4-179).2. Program the required function:

Syntax:

G53 All ZOs for all compensation pages OFF

G53.<ZO page> All ZOs of the <ZO page> OFF

G54.<ZO page> 1. ZO of the <ZO page> ON

G55.<ZO page> 2. ZO of the <ZO page> ON

G56.<ZO page> 3. ZO of the <ZO page> ON

G57.<ZO page> 4. ZO of the <ZO page> ON

G58.<ZO page> 5. ZO of the <ZO page> ON

G59.<ZO page> 6. ZO of the <ZO page> ON

Abbreviation: G54 to G59 For the corresponding ZO of page 1

where:<ZO page> 1 - 5, integer

The following applies:D G53 works modally and deselects every active ZO.

G53.1 to G59.1 act modally and cancel each other mutually.G53.2 to G59.2 act modally and cancel each other mutually.G53.3 to G59.3 act modally and cancel each other mutually.G53.4 to G59.4 act modally and cancel each other mutually.G53.5 to G59.5 act modally and cancel each other mutually.

D If they are programmed by themselves, the functions cause no traver-sing movement. All that happens is that the current machine coordi-nate system is offset.

D Then functions may be written together with path conditions in thesame block. In such cases, the corresponding zero offset is activatedfirst; then traversing to the programmed position occurs.

D ZO offsets for a certain channel (channel > 0) only act in the specifiedchannel. Thus, you have the option to activate different zero points foridentical machine coordinate identifiers with one ZO table separatelyfor each channel.

Page 144: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G53 G53.1-G59.1 G53.5-G59.5

3-48 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:ZO table ”Z01” contains the following offset values under ZO page 1:1st ZO: X100, Y1002nd ZO: X300, Y1003rd ZO: X500, Y1004th ZO: X100, Y4505th ZO: X300, Y4506th ZO: X500, Y450

Effect of functions G54.1 to G59.1:

M

300

200

100

200

+Y

400

500

100 300 400 500 600 700 +X

W W W

W W W

G57.1 G58.1 G59.1

G55.1 G56.1G54.1

Example:Additive effect of ZOs from different ZO pages.ZO table ”Z01” contains the following offset values:ZO page 1, 1st ZO: X100, Y100ZO page 1, 2nd ZO:X300, Y100ZO page 2, 4th ZO: X200, Y350

:::

Current machine position = 0.0 No ZO.All following coordinates are machine coor-dinates!

N40 ZOS(Z01) Activate ZO table ”Z01”.N50 G54.1 No traversing motion.

Offset to X100, Y100 activated.N60 G55.1 X...Y... Offset to X300, Y100 activated.

Then traversing motion.N70 G57.2 X...Y... Offset to X500, Y450 activated.

Then traversing motion.N80 G53 All still-active offsets OFF.

Page 145: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G61, G62

Electric Drivesand Controls

3-49Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.22 Precise Stop ON/OFF G61, G62

EffectMinimizes the following error at the end of a block.During tool movements, a time offset between the command and the ac-tual values of the individual axes occurs owing to the dynamics of themachine. This ”lag effect” causes a following error during machining, thesize of which depends on the feedrate and the CO factor (axis dyna-mics). In the case of unsteady contour transitions (corners), this follo-wing error becomes noticeable in the form of a ”slurring” of the corner.General rule:D The following distance (displacement between the command and ac-

tual values) at the end of the block can be reduced to the size of cer-tain target windows.

D G61 only acts on feed movements. It has no effect on rapid traversemovements.

D As opposed to the Precise stop function for G1, G61 (with the excep-tion of G0) affects all interpolation functions (i.e. also for circular/heli-cal interpolation and spline interpolation).

D G61/G62 act modally and cancel each other mutually.

+Y

+X

Without Precisestop

With Precisestop

. When G61 is active (Precise stop switched on), the control alwaysbrakes to v = 0 at the end of a block.

Programming

Basic function Syntax:

G61 Precise stop ON.G62 Precise stop OFF.The last-activated positioning window for contour mode remains in ef-fect for Precise stop ON. Default: fine positioning window.

Page 146: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G61, G62

3-50 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Optional parameters For selecting the positioning window for feed mode.

Syntax:

G61(IPS1|IPS2|IPS3)

where:IPS1 Precise stop ON. Wait for fine positioning window.

At the end of the block, the control first brakes the pathvelocity to v=0. Only when this positioning window has beenreached for all axes involved will the traversing movement ofthe next block be executed.

IPS2 Precise stop ON. Wait for coarse positioning window. ”Inpos range 2 active” is displayed on the channel interface(also see the ”PLC Interface” manual).At the end of the block, the control first brakes the pathvelocity to v=0. Only when this positioning window has beenreached for all axes involved will the traversing movement ofthe next block be executed.

IPS3 Precise stop ON. Braking to v=0 at the end of a block.At the end of the block, the control brakes the path velocity tov=0. Then the next block is traversed to a positioning windowwithout executing a check.

. The ”Positioning window fine” and ”Positioning window rough”parameters can be determined in the SERCOS files for Phase 3.For further details about SERCOS files, please refer to the ”Ma-chine parameters” manual under ”SERCOS initialization”.

Special features and restrictions:D At the latest, G61/G62 must be programmed in the block in which they

are to act.

Example::N40 G61:

Precise stop ON.

N50 Y200 Position.:N60 G62:

Precise stop OFF.

N70 Y0 Position.:N80 G61 Y200:

Positioning with Precise stop ON.

Page 147: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G63

Electric Drivesand Controls

3-51Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.23 Rigid Tapping G63

EffectD This synchronizes linear interpolation of the drill axis with the spindle

switched to C-axis operation. This eliminates the need for a compen-sation chuck which would otherwise be required for taking up thespeed difference between the drill axis and the spindle.

D G63 acts only in the programmed block.D A signal can be output on the channel interface for the duration of rigid

tapping (configurable within the ”Active function” signals using ma-chine parameters).

D Only the feed potentiometer acts during rigid tapping.

. When G63 is activated, the spindle-C axis must be in spindle mode.

. For tapping with several spindles, also see chapter 4.100.If axes need to be hidden for feedrate computing, see section 4.32.

ProgrammingSyntax:

G63(M<3|4>,S<Speed>|H<Thread pitch>) <Drill axis><Infeeddepth> F<Feedrate>,

The thread pitch results from the relationship between the path feed tothe speed (F/S).

CAUTIONDifferent thread pitches during drilling and retraction will damagethe workpiece/tool!Therefore, always program drilling and retraction in such a waythat the resulting thread pitch is identical!

Special features and restrictions:D The retraction block must be programmed immediately after the dril-

ling block.D During peck drilling, a blank line must be programmed between the

individual drilling segments.D If no other feedrate (address F) is entered for the G63 block, the con-

trol uses the active path feedrate.D Addresses M and S act only within the programmed G63 block.D Neither ”Align spindle” nor ”Spindle stop” is required before G63.D Switch-over to C axis operation is done automatically. Prior to star-

ting, the control internally waits for ”INPOS” of all axes involved. If anaxis drifts out of its INPOS range, G63 is not started.

Page 148: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G63

3-52 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D After the retraction block, the spindle automatically runs again inspindle mode.

Example:N20 G0 X20 Y15 Z10 F1000 Position.N30 G63(M3,S500) Z-20 F500 Drilling (Z drill axis).N40 G63(M4,S500) Z5 F500:

Retraction (Z drill axis)

N120 G0 X20 Y15 Z10 F1000 Positioning for peck drilling.N130 G63(M3,S500) Z-20 F500 Drilling of section 1.N140 G63(M4,S500) Z5 F500 Retraction of section 1.<Blank line> Program a blank line.N150 G63(M3,S500) Z-40 F500 Drilling of section 2.N160 G63(M4,S500) Z5 F500:

Retraction of section 2.

Page 149: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G70

Electric Drivesand Controls

3-53Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.24 Inch Programming G70Local Inch Programming INCH(...)

EffectThis permits the entry of path/feed information and accelerations in inchunits.

ProgrammingSyntax:G70 Path/feed information and accelerations

are interpreted in inches.

<Axis>=INCH(<value>) The path information for asynchronouslinear axis is interpreted in inch.

The following applies:D G70 works modally and deselects G71.D The power-up state can be specified in the machine parameters.D G70 may also be written together with other path conditions in the

same block.D G70 refers to:

D working pathsD feedsD accelerationsD other geometric auxiliary variables, such as interpolation parame-

ters I, J, K.

Example:N40 G70:

Starting at N40 (inclusive), all path and feed informationis interpreted in inches

N50 W=INCH(2) Traverse the asynchronous linear axis W to position 2(inch).

Page 150: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G71

3-54 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.25 Metric Programming G71

EffectThis permits the entry of path/feed information and accelerations in me-tric units.

ProgrammingSyntax:G71 Path/feed information and accelerations are

interpreted in metric units.

The following applies:D G71 works modally and deselects G70.D The power-up state can be specified in the machine parameters.D G71 may also be written together with other path conditions in the

same block.D G71 refers to:

D working pathsD feedsD accelerationsD other geometric auxiliary variables, such as interpolation parame-

ters I, J, K.

Example:N40 G71:

Starting at N40 (inclusive), all path and feed informationis interpreted in metric units

Page 151: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G74

Electric Drivesand Controls

3-55Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.26 Traverse to Reference Point Coordinates G74

EffectThe axes programmed in the same block as G74 traverse simulta-neously to their reference position.The traverse speed occurs in rapid traverse / feed, depending on G0/G1.

With G74, neither reference point cams nor markers are taken into ac-count. G74 is purely a positioning process for the absolute axispositions (i.e. it also applies to axes with distance-coded encoders).

CAUTIONPossibly active compensations will remain unconsidered in thecourse of this positioning process!

The following applies:D G74 acts on a block-by-block basis and is canceled when all the ma-

chine axes programmed with G74 in the block have reached the refe-rence point.

D When traversing to the reference point with G74, the actual axis va-lues are nor reset.

D Any compensations, ZOs, etc. that are still active are not taken ac-count in the G74 block for the programmed axes.

ProgrammingSyntax:G74 <Axis coordinates> Start ”Traverse to reference point coor-

dinates”

where:<Axis coordinates>: The axis addresses must be programmed toge-

ther with a numerical value (e.g. X1 Y1 Z1).This numerical value has no effect on the posi-tion of the reference point. It is only needed toform a complete word.

Special features and restrictions:D G74 is programmed in a separate block together with the axes to be

traversed. Auxiliary and special functions may be programmed withinthe same block.

Example:N100 G74 X1 Y1 Z1:

The X, Y and Z axes start the traverse totheir reference positions simultaneously andreach them simultaneously.

Page 152: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G74(HOME)

3-56 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.27 Traverse to Reference Point G74(HOME)

. The G74(HOME) function can also be used for asynchronous axes!

EffectThis uses the parts program to trigger the homing of programmed axes.

SERCOS command ”Drive-controlled referencing” (S-0-0148) is trigge-red by the function for each drive of the programmed axes. As a consequence, the drive decouples from the control and generatesits own position inputs for referencing using SERCOS parametersS-0-0147 (Referencing parameter), S-0-0041 (Referencing velocity)and S-0-0042 (Referencing acceleration).

. For details, please refer to the ”Description of Functions”.

The following applies:D If several axes have been programmed in the G74(HOME) block,

these axes approach their respective reference points independentlyof each other (no continuous-path operation). This means that the re-ference points are not attained simultaneously.

D Both synchronous and asynchronous axes can be programmed.Block processing is suspended until all axes of the control acknow-ledge that they have reached their respective reference points.

D The function does not differentiate between ”Traverse to referencepoints” and the operation mode ”Manual”.

ProgrammingSyntax:G74(HOME) <Axis coordinates> Trigger SERCOS command

”Drive-controlled referencing” forthe programmed axes.

where:<Axis coordinates>: The axis addresses must be programmed toge-

ther with a numerical value (e.g. X1 Y1 Z1).This numerical value has no effect on the posi-tion of the reference point. It is only needed toform a complete word.

Example:N1 G74(HOME) X1 Y1 Z1:

Send SERCOS command ”Drive-con-trolled referencing” to the drives ofaxis X, Y and Z.

Page 153: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G75

Electric Drivesand Controls

3-57Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.28 Probe G75

EffectThe control guides one or more measuring axes at feedrate to the posi-tion programmed via G75 and checks whether the probe was triggered.As soon as the edge defined in the machine parameters is detected, thecontrol reacts by:D storing the actual positionD braking to v=0 with the maximum permitted decelerationD canceling G75 and the distance to goD switching to the next block.

. The G75 function should only be used in combination with a CPLprogram for analysis.

. The parameters of the probe function can be set using machine pa-rameters.

ProgrammingSyntax:G75 <Axis coordinate> Activate the measurement input and tra-

verse the measurement axis to <Axiscoordinate>.

Special features and restrictions:D G75 acts block by block.D No auxiliary functions may be programmed in the G75 block. Howe-

ver, other path conditions are permitted.D G75 must be programmed together with at least one <axis coordi-

nate>. This value represents the maximum search depth to which theprobe must have switched at the latest.

D Stopping block preparation after the G75 block is not required (WAITis not necessary).

D Evaluation of axis information, safety monitoring, generation of errormessages etc. must be realized in the CPL program.

Example:N100 G75 Y250 F500 Traverse with F500 to position Y250.110 IF SD(9)=0 THEN Query whether probe was displaced.120 YPOS=PPOS(2):

Save the position in the switching torque ofthe 2nd axis (Y-axis) to the YPOS variable.

N130 (MSG, CONTACT)140 GOTO N180150 ENDIFN160 (MSG, NO CONTACT)N170 M0 Program haltN180 ...

Page 154: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G76

3-58 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.29 Traverse to Fixed Machine Axis Position G76

EffectPermits the programming and linear traversing to positions in the ma-chine coordinate system without having to separately deactivate any ac-tive compensations and transformations in the parts program.This can be necessary, for example, when changing the tool, checkingtools for damage or changing pallets.

G76 acts on a block-by-block basis in rapid traverse (G0) or in feed (G1),as well as together with G93 (Time programming), G94/G95 (Feed pro-gramming) and the F-word.The following functions are not taken into account in G76:D Tool compensations (G41, G42, G47 Dxx, EDxx)D Input tools (Mirror, Scale, Rotate, Shift)D Zero offsets (G54.1 - G59.5)D Placements (BcsCorr, G154.1 - G159.5)D Axis transformations based on machine coordinates,

(e.g. 5-axis transformation)D Relative dimension programming (G91)D Set program position (SetPos)

ProgrammingSyntax:G76 <Machine coordinates>

where:<Machine coordinates>: Machine coordinates to be approached.

Special features and restrictions:D G76 can be written together with other path conditions (e.g. G0, G1,

G93, G94, G95, F-word)D Local relative dimension programming (”IC(...)”; see page 3-69) is

not permitted in conjunction with G76, leading to a runtime error.

Page 155: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G77

Electric Drivesand Controls

3-59Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.30 Asynchronous Subroutines: Repositioning Individual Coordinates G77

EffectTraverses the defined coordinates to the point of return to path after theend of the asynchronous subroutine in which G77 is programmed.The point of return to path is always approached on a straight line.

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the ”Description ofFunctions”.

ProgrammingSyntax:

G77 <Coord 1><Mode> <Coord n><Mode> ... F<Value>

where:<Coord i> Coordinate name (e.g. ”x”)

<Mode> <Coord i> for point of return to path1 take into account.0 do not take into account. The coordinate remains at its

current value.<Value> Feedrate with which positioning on the point of return to

path is to be executed.

Special features and restrictions:D The function has been designed for use in an asynchronous subrou-

tine.D All coordinates that are not programmed by G77 are automatically

traversed on a straight line to the point of return to path at the end ofthe asynchronous subroutine.

D Any correction modifications made within an asynchronous subrou-tine are automatically taken into account in the internal calculation ofthe required point of return to path.

D As an alternative syntax, REPOS can be programmed instead ofG77.

Page 156: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G78 G79

3-60 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.31 Compensation Switching ON G78Compensation Switching OFF G79

EffectThis assigns the length compensationsof the geometry correctionfunctions to individual coordinates. These are the coordinates:D of the current workpiece coordinate system (WCS) orD of the tool coordinate system (TCS).

An assignment with respect to the coordinates of the workpiece coordi-nate system (WCS) is possible whenever the tool is aligned perpendi-cularly to the current working plane and its orientation with regard to theworking plane remains constant during machining.

An assignment with reference to the coordinates of the tool coordinatesystem (TCS) is necessary if the orientation of the tool changes duringmachining, e.g. milling of freeform surfaces. An active axis transforma-tion (e.g. 5-axis or 6-axis transformation) is necessary for this compen-sation. The compensation values are taken into account within the axistransformation.

Z

Y

X

L1

WCS

L2L3

Z

Y

XWCS

Tool compensation in workpiececoordinatesystem (WCS)

Tool compensation intool coordinate-system (TCS)

Z

Y

X

L1TCS

L2

L3

. To activate the current compensation values for machining, seeG47, page 3-44 ff.

ProgrammingSyntax:

G78(-<Coordinate1>,-<Coordi-nate2>,-<Coordinate3>)

Compensation swit-ching ON.

Page 157: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G79G-Codes G78

Electric Drivesand Controls

3-61Bosch Rexroth AGIndraMotion MTXR911314869 / 01

where:<Coordinate i> Name of the WCS coordinate (logical/physical axis

name) that is to be assigned correction Li (where i = 1,2, 3).If correction Li is to affect coordinates in the tool coor-dinate system (TCS), coordinate designators XTR,YTR and ZTR must be used.Optional negative sign in front: correction is calculatedin the negative direction.Li corrections to which no coordinates are assignedare not taken into account.

G78(ActPlane) Compensations L1, L2 and L3 are assigned to theprimary, secondary and normal coordinates of thecorresponding active plane.

G79 Compensation switching OFF.The settings in the machine parameters are validagain.

Special features and restrictions:D G78 and G79 act modally and deselect each other.D Coordinates that do not belong to the default setting of the channel

are never taken into account in G79.D The coordinate addresses programmed under G78 can refer to work-

piece coordinates or tool coordinates (see above under <Coordinatei>).

D G78/G79 may be programmed with other path conditions, traversinginformation or auxiliary functions.

Examples:G78(X, ,ZTR) The L1 compensation is assigned to the X-axis of the

workpiece coordinate system (WCS), the L3 compensa-tion to the Z axis of the tool coordinate system (TCS).Both compensations are calculated in the positive direc-tion.

G78( , ,-Y) The L3 compensation is assigned to the Y axis of theworkpiece coordinate system (WCS) and taken into ac-count in the negative direction.

G78(YA,YB) The L1 compensation is assigned to the YA-axis and theL2 compensation to the YB-axis of the workpiece coordi-nate system (WCS). Both compensations are calculatedin the positive direction.

G79 Compensations are switched off for all default coordi-nates of the channel.

Page 158: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G80 G81

3-62 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.32 Switch off Drilling Cycle G80

EffectSwitches off an active drilling cycle (G81 - G86, G184).

ProgrammingSyntax:G80

Special features and restrictions:D No bracket expression may be programmed in a G80 block.

3.2.33 Drilling Cycle: Drilling with Retraction in Rapid Traverse G81

ApplicationD Centering and simple drilling operation, facing, drilling out.

EffectUpon reaching the Z drilling depth, an optional dwell time becomes ac-tive. Subsequently, retraction at rapid traverse takes place.

Rx

Z

ZP

Reference plane 1.2

Drilling depth

FeedrateRapid traverse

G81 with R1 plane G81 with R2 plane

PE

ZP

PE PE Positioning plane

P Dwell timeR1

R2

R1

ProgrammingSyntax:G81[<Z>,<R1>,<P>,<R2>]

Special features and restrictions:D This drilling cycle is executed in every new traversing block.D Deselect with G80.D Before switching the cycle, the current cycle must be deselected with

G80.

Page 159: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G82

Electric Drivesand Controls

3-63Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.34 Drilling Cycle: Drilling with Retraction in Feed G82

As for G81. However, retraction to R1 is at feedrate.

Rx

Z

ZP

Reference plane 1.2

Drilling depth

FeedrateRapid traverse

G82 with R1 plane G82 with R2 plane

PE

ZP

PE PE Positioning plane

P Dwell timeR1

R2

R1

ProgrammingSyntax:G82[<Z>,<R1>,<P>,<R2>]

Special features and restrictions:D This drilling cycle is executed in every new traversing block.D Deselect with G80.D Before switching the cycle, the current cycle must be deselected with

G80.

Page 160: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G83

3-64 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.35 Drilling Cycle: Peck Drilling G83

ApplicationD Peck drilling with removal of drilling chips.

EffectAfter the arrival at the programmed K infeed depth, a retraction move-ment at rapid traverse to the reference R1 plane is performed.Renewed infeed to the programmed k distance (speed-change point) isalso performed at rapid traverse. Subsequently, the control switchesback to feedrate.Stepwise infeed with corresponding retraction to the reference plane isexecuted until the programmed Z total drilling depth is reached.

Rx

K

Z

Reference plane 1.2

Infeed depth

: Feedrate: Rapidtraverse

G83 with R1 plane G83 with R2 plane

PE PE Positioning plane

P Dwell time

K

K

K

k

k

R1

P

Z

PE

K

K

K

k

k

R1

P

R2

Z Drilling depth

k Distance to speed-switchingpoint

ProgrammingSyntax:G83[<Z>,<R1>,<K>,<k>,<P>,<R2>]

L The K infeed depth must be programmed without a positive/negativesign in incremental data input, irrespective of the drilling direction.If the max. drilling depth Z is exceeded owing to erroneous programmingof infeed depth K, the control first interrupts the drilling cycle via M0 anddisplays the ”DRILLING DEPTH K TOO LARGE” error message.After a new start, the drilling cycle is cancelled (M30).

Special features and restrictions:D This drilling cycle is executed in every new traversing block.D Deselect with G80.D Before switching the cycle, the current cycle must be deselected with

G80.

Page 161: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G84

Electric Drivesand Controls

3-65Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.36 Drilling Cycle: Tapping with Compensation Chuck G84

Application:D Tapping (left and right) with compensation chuck.

Prerequisite:D internal spindle as drilling axis. External spindles are not allowed.

EffectTool infeed occurs at the programmed M3 clockwise-rotating spindle orM4 counterclockwise-rotating spindle (right- or left-handed thread).As soon as drilling depth Z (thread depth) has been reached, the senseof rotation is reversed, and dwell time P (if programmed) starts to run.Subsequently, the retraction movement to the reference plane is perfor-med at feedrate. As soon as it has been reached, the reversal of the rota-tion direction is cancelled again.

Rx

Z

ZP

Reference plane 1.2

Thread depth

: Feedrate: Rapid traverse

G84 with R1 plane G84 with R2 plane

PE

ZP

PE

PE Positioning plane

P Dwell timeR1

R2

R1

D

G63

DG66 D

D

D Rotation directionreversal

ProgrammingSyntax:G84[<Z>,<R1>,<P>,<R2>]

CAUTIONPossible damage to tools or workpieces!During the cycle, any active single-block processing will not besuppressed! This means that the spindle will keep on running after apositioning process within the cycle. This may lead to damage tothe tool and the workpiece.You should therefore ensure that the control executes the cycle inthe ”Automatic” mode only!

Special features and restrictions:D This drilling cycle is executed in every new traversing block.D Deselect with G80.D Before switching the cycle, the current cycle must be deselected with

G80.

Page 162: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G85

3-66 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.37 Drilling Cycle: Drilling out with Retraction in Rapid Traverse G85

ApplicationD Drilling out

EffectAfter drilling depth Z is reached,D the spindle stops andD a dwell time (if programmed) goes into effect.D Subsequently, retraction at rapid traverse takes place.

Rx

Z

ZP

Reference plane 1.2

Drilling depth

: Feedrate: Rapid traverse

G85 with R1 plane G85 with R2 plane

PE

ZP

PE PE Positioning plane

P Dwell timeR1

R2

R1

M05

M03

M05

M03

ProgrammingSyntax:G85[<Z>,<R1>,<P>,<R2>]

Special features and restrictions:D This drilling cycle is executed in every new traversing block.D Deselect with G80.D Before switching the cycle, the current cycle must be deselected with

G80.

Page 163: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G86

Electric Drivesand Controls

3-67Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.38 Drilling Cycle: Drilling out with Retraction in Feed G86

As for G85. However, retraction to R1 is at feedrate.

Rx

Z

ZP

Reference plane 1.2

Drilling depth

: Feedrate: Rapid traverse

G86 with R1 plane G86 with R2 plane

PE

ZP

PE PE Positioning plane

P Dwell timeR1

R2

R1

M05

M03 M03

ProgrammingSyntax:G86[<Z>,<R1>,<P>,<R2>]

Special features and restrictions:D This drilling cycle is executed in every new traversing block.D Deselect with G80.D Before switching the cycle, the current cycle must be deselected with

G80.

Page 164: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G184

3-68 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.39 Drilling Cycle: Tapping without Compensation Chuck G184

ApplicationD Tapping (left and right) without compensation chuck.

Prerequisites:D controlled spindleD G63 (Tapping without compensation chuck).

EffectTool infeed is calculated internally on the basis of the product of ”speed xthread pitch” (U1*GS). You select the direction of rotation (right- or left-handed thread) via the positive/negative sign of the GS parameter(thread pitch).As soon as drilling depth Z (thread depth) is reached, the direction of ro-tation is reversed. Subsequently, the retraction movement to the refe-rence plane is performed at feedrate. The direction of rotation of thespindle remains effective until you program a new drilling cycle.

Rx

Z

Z

Reference plane 1.2

Thread depth

: Feedrate: Rapid traverse

G184 with R1 plane G184 with R2 plane

PE

Z

PE

PE Positioning plane

P Dwell timeR1

R2

R1

G63

U1 G66U1 Rotational speed

U1 U2 U2 Speed upon retraction

U1

U1 U2

G63

GS Thread pitch

GS

PP

ProgrammingSyntax:Clockwise thread:G184[<Z>,<R1>,<P>,<R2>,<GS>,<U1>,<U2>,<RP*>]

Counterclockwise thread:G184[<Z>,<R1>,<P>,<R2>,-<GS>,<U1>,<U2>,<RP*>]*) RP determines the orientation position of the spindle.

. P may be programmed for reasons of compatibility, but it is not eva-luated!

Special features and restrictions:D This drilling cycle is executed in every new traversing block.D Deselect with G80.D Before switching the cycle, the current cycle must be deselected with

G80.

Page 165: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G91 IC(...)G-Codes G90 AC(...)

Electric Drivesand Controls

3-69Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.40 Absolute Dimension Programming G90Relative Dimension Programming G91Local Absolute Dimension Programming AC(...)Local Relative Dimension Programming IC(...)

EffectThis specifies whether the control is to interpret unit information for theaxes and coordinates as absolute or relative (incremental) values.D Absolute dimension information refers to the current zero point (in the

program coordinate system).D Relative dimension information refers to the last-approached posi-

tion.

Y

X

Starting pt.

Target point

Absolute dimension X

Abs

olut

e di

men

sion

Y

Y

X

Starting pt.

Target point

Relative dimension X

Rel

ativ

e di

men

sion

YG90 G91

The following applies:D G90 and G91 act modally and cancel each other mutually.D AC(...) and IC(...) act independently of an active G90/G91 only for the

path information of the axes whose position is programmed withAC(...) or IC(...).

ProgrammingSyntax:G90 Absolute dimension programming

G91 Relative dimension programming

<Axis>=AC(<Value>) Local absolute dimension programming.

<Axis>=IC(<Value>) Local relative dimension programming.

where:<Axis>: Logical axis address.<Value>: Path information for <Axis>.

Example:N10 G1 G90N20 X100 Y100

Absolute dimension programming ON.Traverse to coordinates X100, Y100.

N30 G91N40 X100 Y100

Relative dimension programming ON.Traverse to coordinates X200, Y200.

N50 X=AC(50) Y50 Local absolute dimension programming forX-axis. Traversing movement on the ma-chine to X50, Y250.

Page 166: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G93

3-70 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.41 Time Programming G93

EffectThe control interprets F-words (see the description in the ”Auxiliary andspecial functions” section) as the machining time (in seconds) for theprogrammed contour (block duration).The following applies:D Functions G93, G94 and G95 act modally and cancel each other mu-

tually.

. The desired power-up status (G93, G94 or G95) can be specified inthe machine parameters (default: G94).

ProgrammingSyntax:G93 Switch to time programming.

Example:N5 G93 G1 X30 Y20 F20:

The programmed linear interpolation lasts20 seconds.

Special features and restrictions:D An F-word programmed during G93 remains in internal memory

when switching to G94 or G95 and becomes active again when swit-ching back to G93.

D After a power-up or control reset, the F-word specified in the machineparameters is active (default: F0).

D The control internally calculates the required feedrate on the basis ofthe path length of the corresponding traversing block and the pro-grammed machining time.However, the resulting effective feedrate can be limited by the controlaccording to the programmed contour and the maximum values of theparticipating axes so that the block duration increases.

D A feed override remains in effect even in the case of G93, dependingon function OvrEna / OvrDis.

Page 167: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G94

Electric Drivesand Controls

3-71Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.42 Feed Programming (per min) G94

EffectThe control interprets F-words (see page 3-95) or Omega words (seepage 3-96) as feed for a programmed contour.The following applies:D Functions G93, G94 and G95 act modally and cancel each other mu-

tually.D The programmed feed is interpreted

D as mm/min if G71 is activeD as inches/min if G70 is activeD as degrees/min in connection with rotary axes.

. Machine parameters can be used to set the weighting of the fee-drate for G70/G71.

. The desired power-up status (G93, G94 or G95) can be specified inthe machine parameters (default: G94).

ProgrammingSyntax:G94 Switch to feed programming.

Example:N10 G71 Switch on metric programming.N20 G1 G94 X20 Y30 F200 Traverse with a feedrate of 200 mm/min.N30 G4(F40) Dwell time of 40 seconds.N40 G70 Inch programming ON.N60 X300 Y400 Feedrate F200 (in mm/min) is again ef-

fective.N70 F100:

New feedrate: 100 inches/min.

Special features and restrictions:D An F- or Omega word programmed during G94 remains in internal

memory when switching to G93 or G95 and becomes active againwhen switching back to G94.

D After a power-up or control reset, the F-word specified in the machineparameters is active (default: F0). The Omega word is always automatically initialized to ”0” after apower-up.

D Due to configured maximum velocities of the participating axes, thecontrol can limit the effective feedrate.

D The feedrate is influenced by the feed override, depending onOvrEna / OvrDis.

Page 168: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G94(...)

3-72 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.43 Incremental Speed Programming G94(...)with Acceleration Adaptation

EffectChanges the feedrate or speed relative to the last actively effective va-lue. The acceleration within the G94(...) block is adapted in such a man-ner that the resulting speed/velocity is attained no earlier than the end ofthe block. This leads to a very gentle acceleration behavior.

The following applies:D Although function G94 is modal, the resulting feedrate is not modal for

the following blocks.D The unit of the incremental feedrate is inches/min or mm/min, accor-

ding to G70/G71.D The feedrate is influenced by the feed override, depending on

OvrEna / OvrDis.

ProgrammingSyntax:G94(DF<F-word>) Program the path velocity incre-

mentally

G94(DS1<S-word>) Program the spindle speed forspindle 1 incrementally

G94(DF<F-word>,DS7<S-word>) Program the path velocity andthe spindle speed for spindle 7incrementally.

where:<F-word>: Incremental path velocity. Positive values increase and

negative values decrease the currently effective path ve-locity.

<S-word>: Incremental spindle speed. Positive values increase andnegative values decrease the currently effective spindlespeed.

Example:N30 G94(DF100) X250 Y300:

Increase path feedrate linearly by100 mm/min to the end of the block.

N50 G94(DF-50) X300 Y200:

Reduce path feedrate linearly by 50mm/min to the end of the block.

N70 G94(DS1=100) X25 Y30:

Increase speed of spindle 1 by 100rpm to the end of the block.

N90 G94(DF100,DS7=150) X2 Y2:

Increase path velocity linearly by 100mm/min and speed of spindle 2 by150 rpm to the end of the block.

Page 169: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G94(...)

Electric Drivesand Controls

3-73Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Special features and restrictions:D The existing acceleration and braking limits are monitored. It may

happen that the resulting final velocity can only be attained in the nextblock.

D The calculated acceleration acts only in the G94(...) block. If the blockis cancelled, braking occurs with the calculated acceleration.

D Absolute and incremental feedrates may not be programmed simul-taneously in the same block.

Page 170: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G95

3-74 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.2.44 Feed Programming (per rot.) G95

EffectThe control interprets F-words (see page 3-95) as feedrate/rotation.This is required in conjunction with the main spindle. The following ap-plies:D Functions G93, G94 and G95 act modally and cancel each other mu-

tually.D The programmed feed is interpreted

D as mm/rot. if G71 is activeD as inches/rot. if G70 is active

. Machine parameters can be used to set the weighting of the fee-drate for G70/G71.

. The desired power-up status (G93, G94 or G95) can be specified inthe machine parameters (default: G94).

. For the definition of the main spindle, see MP 7020 00010 or func-tion ”MainSp”.

ProgrammingSyntax:G95 Switch to rotary feed programming.

Example:N05 G71 Switch on metric programming.N10 S200 M4 Spindle speed 200 rpm, counterclock-

wise.N20 G1 G95 X20 Z30 F0.2 Traverse with a feedrate of 0.2 mm/rot.N30 G4(S20) Dwell time of 20 rotations.N40 G70 Inch programming ON.N60 X300 Z40 Feedrate F0.2 (in mm/rot) is again effec-

tive.N70 F0.1:

New feedrate = 0.1 inches/rot.

Special features and restrictions:D G95 requires a turning main spindle.D The effective feed is influenced by both the spindle and the feed po-

tentiometers.D Due to configured maximum velocities of the participating axes, the

control can limit the effective feedrate.D An F-word programmed during G95 remains in internal memory

when switching to G93 or G94 and becomes active again when swit-ching back to G95.

D After a power-up or control reset, the F-word specified in the machineparameters is active (default: F0).

Page 171: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G97G-Codes G96

Electric Drivesand Controls

3-75Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.45 Constant Cutting Speed G96Direct Speed Programming G97

EffectDuring turning, the control interprets S-words asD the command cutting speed of the tool (G96) orD the speed of the workpiece axis of rotation (G97).

With the given spindle speed, the cutting speed depends on the distancebetween the cutting tool and the workpiece axis of rotation.

To compensate for this, function G96 automatically changes the speedof the axis of rotation depending on the distance between the cutting tooland the workpiece axis of rotation:D for G71:

SAkt[min1] SG96 10002 p position(coordinate, referencesystem) toolcorrection

m 1000minmm

D for G70:

feet 12min inch

By default, the NC calculates the distance in the machine coordinate sy-stem (MCS reference system):

G96 position

MCS machine zero point

X-axis

Page 172: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G96 G97

3-76 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

If the spindle must be positioned between different tool magazine points,G96 can include corresponding zero offsets that cover a local coordinatesystem (LCS reference system):

G96 position

MCS machine zero point

X-axis

G96 position

MCS+ZO1

MCS+ZO2

In the case of tools that are not arranged axis-parallel to the spindle, off-sets and placements of the workpiece zero point can also be taken intoaccount (PCS reference system):

G96 position

MCS machine zero point

Y-axis

MCS+ZO+PMT

X-axis

The cutting speed on the workpiece is thus no longer influenced by thedistance between the cutting tool and the workpiece’s axis of rotation.

If this behavior is not required or desired, use G97 instead. The speed ofthe workpiece’s axis of rotation is then determined solely by the pro-grammed S-word.

The following applies:D The reference axis for the distance between the cutting tool and the

workpiece’s axis of rotation is defined by machine parameter 701000110 (default value).

D The programming of the reference axis can be changed at runtime.D The reference coordinate system (point of contact) for the reference

axis is preset using machine parameter 7010 00120. The followingpossibilities are available:D PCS: Position in program coordinate system

Page 173: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G97G-Codes G96

Electric Drivesand Controls

3-77Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D LCS: Position in local machine coordinate system (offset by ZO)

D MCS: Position in machine coordinate system (default)D The point of contact of the reference axis can be changed at runtime.D The programmed cutting speed is interpreted as

D m/min if G71 is activeD feet/min if G70 is active.

D In addition to the spindle override, the functions for speed limitation(SMin, SMax; see page 4-135) are also in effect.

ProgrammingSyntax:G96(<Reference axis>,<Point of action>) ... S<i>=<V>

S-words of spindles that are program-med in the G96 block are interpreted ascommand cutting speeds on the tool du-ring turning. All other spindles revert to direct speedprogramming!

G96 The last programmed settings becomeactive; if none were made, the defaultvalues apply.

G96() ... The default values for the reference axisand the point of contact are reactivated.

G97 ... S<i>=<Speed> Only the spindles whose S-words areprogrammed in the G97 block revert todirect speed programming. For thesespindles, programmed S-words are in-terpreted as the speed of the workpie-ce’s rotation axis.

G97 All spindles revert to direct speed pro-gramming.

where:<Reference axis> Physical or logical name of the reference axis. Pro-

gramming remains in effect until a new value is pro-grammed or the default value is activated.

<Point of contact> Coordinate system of the reference axis:PCS, LCS or MCSProgramming remains in effect until a new value isprogrammed or the default value is activated.

<i> Spindle index. 1: first spindle; 2: second spindle, etc.

<V> Cutting speed of the relevant spindle in m/min or feet/min.

<Speed> Speed of the relevant spindle in rpm.

Page 174: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G96 G97

3-78 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example (2 spindles are configured in the system):N10 G71 S1=500 S2=500:

Define command rotations of both spindlesfor the first time in the program.

N60 G96 S1=50:::

Activate G96 for the 1st spindle with a cut-ting speed of 50 m/min.The 2nd spindle is still running with speedprogramming. G96 active.

N100 S1=30:::

Reduce the cutting speed of the 1st spindleto 30 m/min.The 2nd spindle is still running with speedprogramming. G96 active.

N140 G96(Y,LCS) S2=100:::::

The reference axis is Y and the point of con-tact is the local machine coordinate systemLCS.Activate a cutting speed of 100 m/min for the2nd spindle. The 1st spindle reverts to speed program-ming. G96 active.

N180 G97::

All spindles revert to direct speed program-ming, if this has not already happened. G97active.

Special features and restrictions:D Several spindles can be switched together in the same block by pro-

gramming the corresponding S-words in sequence (example: G96S1=100 S2=1000).

D To change the cutting speed of a spindle that has already been swit-ched to G96 for the remainder of the program execution, merely theS-word of the appropriate spindle needs to be reprogrammed.

D The currently effective cutting speed of a spindle remains in internalmemory after switching to G97. It is reactivated as soon as the corres-ponding spindle is switched back to G96.

D If switching from G96 to G97 occurs, the control uses the currentspeed as the new command speed value for all spindles whose S-word is not programmed in the G97 block.

D A possibly desired gear-range change has to be carried out beforeG96 is activated.

D When G96 is active, function ”Automatic gear range switching” doesnot switch any gear ranges.

D When G96 is active, the control checks whether the reference axisaffects the active point of contact. If this is not the case (e.g. if the axisexits the channel), a runtime error is reported.

Page 175: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G140, G141, G142

Electric Drivesand Controls

3-79Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.2.46 3D Tool Radius Compensation G140, G141, G142

EffectThe function moves a rotation-symmetric tool to the left or right of theprogrammed path, guiding its point of action to the programmed pathwith feed active. In the case of pure orientation movements, the current position of thepoint of contact remains fixed and the TCP moves.At exterior corners, the path is closed using an automatically generatedintermediate block (arc). An intersection is calculated in the case of inter-ior corners.The control takes the following into account for compensationD tool radius r (automatically taken from the active tool data D, G146 to

G846 or G147 to G847).D insertion depth d (see syntax for INSDEP)D an optional allowance for the path that acts additively to the tool ra-

dius (see syntax for COFFS)

The following illustration shows the principle:

G142 G141

= programmed path= direction of feed

Correction

to right ofprogr. path

to left ofprogr. path

TCP

Workpiece

PE

TCP

dr

Orientation vector

TCP: Tool tipPE: Tool point of action

r: Tool radiusd: Insertion depth

A change in the insertion depth (INSDEP), the allowance (COFFS), thetool length or the milling tool radius is carried out immediately and gently(using splines) when G141/G142 is active.

. For detailed information about this function, see the ”Descriptionof Functions”.

CAUTIONCompensation values may be immediately activated or deactiva-ted without programming a separate traversing movement. Thismay result in damage to the workpiece or the tool.Please note the information provided in this section and the ”Des-cription of Functions” in this context.

Page 176: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G140, G141, G142

3-80 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ProgrammingSyntax:

G140 3 D tool radius compensation OFF(start-up state after starting controller).The compensation (radius, insertion depth) isreduced in an interpolating manner, if necessary witha programmed traversing movement (using3rd-degree splines). An active tool length compensa-tion is not influenced by G140.

G141 3 D tool radius compensation to left of path ON(seen in the direction of machining for positivecompensation values).Traversing movements or orientation movementsmay be programmed in the same block. The radius and insertion depth are retracted if one ofthe active space coordinates is programmed in thesame block. Otherwise, the control builds up thecompensation D no sooner than in the next traversing block if

G140 was active beforehand.D immediately (in active feed) if G141/G142 was

active beforehand.

G142 3 D tool radius compensation to right of path ON. Otherwise identical to G141.

INSDEP<ID> Defines insertion depth <ID>. Acts modally.Start-up state after starting controller: 0

COFFS<KA> Defines allowance <KA>. Acts modally and additive totool radius r.Start-up state after starting controller: 0

Special features and restrictions:D G140, G141 and G142 act modally and cancel each other mutually.D Buildup and breakdown of compensation on any contour (G2, G6,

etc.).D The following is not allowed with G141 or G142 active:

- G17 - G20 (Plane switch)- G70, G71 (Inch/metric switching)- G63 (Rigid tapping)- G74 (Traverse to reference point coordinates)- G75 (Probe input)- G76 (Traverse to fixed machine axis position)- SetPos (Set program position)- G54.x - G59.x (Zero offsets)- G154.x - G159.x (Inclined plane)- G40 - G42 (Tool radius compensation)- Coord() (Axis transformation on/off/switch)- Transfers of axes that participate in the current space coordinates

via axis/coordinate transformation.D If G141 or G142 is active, a collision check is not carried out.

Page 177: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G152 - G159.5

Electric Drivesand Controls

3-81Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D If the program ends without M30, G140 must be active at this time.The current insertion depth and allowance values are retained.

D G140 is automatically activated after a control reset, a system reset orM30. The current insertion depth and allowance values are set to 0.

3.2.47 Placement: Inclined Plane G152 - G159.5

EffectPlacement ”Inclined plane” can shift and orientate the workpiece coordi-nate system anywhere in space. Inclined plane has an effect on the coor-dinates with the meanings ”x”, ”y” and ”z” in the corresponding channel.Since there are 3 degrees of freedom for orientation, every orientationcan be represented by 3 consecutive basis rotations.

Machine

+ZB +YB

BCS +XB

+ZW = +ZB

+YB

+XB

+XW

+YW

+XW

+XW

+Y’W=+YW

+ZW +ZW

+XW

+YW

+ZW = +ZB

+YW

+XW

Rotation of thecoordinate system bycoordinate Y’W(=YW)and the angle theta

Basis workpiececoordinate system

Rotation of thecoordinate system bycoordinate ZB andthe angle phi

Rotation of thecoordinate system bycoordinate Z’’W(=Z’W)and the angle psi.

+ZM+YM

BCS +XM

+ZW

+YW

+XW

DY

DX

DZ

Resulting workpiece coordinate system (WCS), offset by distanceDX, DY, DZ and oriented by the angles phi, theta, and psi (seeabove), relative to the BCS:

BCS = basis workpiece coordinate system, WCS = workpiece coordinate system

WCS

WCS WCS WCS-ϕ (phi)

ϑ (theta)

-ψ (psi)

1. basis rotation 2. basis rotation 3. basis rotation

Page 178: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G152 - G159.5

3-82 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

The resulting functioning of ”Inclined plane” is affected byD 5 pages (1 to 5), each of which acts additively to each other.

This allows up to 5 workpiece coordinate systems that build on oneanother to be generated.

D 7 alternative sets per page. Each set contains all required offset and orientation data for a work-piece coordinate system. Within a page, only one single set can be active at any given time, i.e.the sets of a page mutually deselect one another.

Inclined plane acts additively to placement ”Tool length compensation”;therefore, it is located behind workpiece position compensation in the”calculation chain”:

+ZB+YB

BCS +XB

+ZW1

+YW1

+XW1

BCS: Basic workpiece coordinate systemWCS1:Workpiece coordinate system, generated by ”workpiece position

compensation”WCS2:Workpiece coordinate system, building up on WCS1 and

generated by ”Inclined plane”WCSn:Workpiece coordinate system, building up on WCSn-1 and

generated by ”Inclined plane”. General rule: n = 2 - 6

WCS1

+ZW2

+YW2

+XW2

WCS2

WCSn

Programming ...A ”set” is all the data required for the offset and orientation of a workpiececoordinate system. Sets can be eitherD programmed directly in the parts program as function parameters, orD entered in a placement table (see page 4-103).

A placement table can contain up to 30 sets (5 pages, each with 6sets).

Page 179: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G152 - G159.5

Electric Drivesand Controls

3-83Bosch Rexroth AGIndraMotion MTXR911314869 / 01

... directly in the program line as a parameter:

Syntax:G152.<Page>(<XW-Offset>, <YW-Offset>,<ZW-Offset>, <Angle1>,<Angle2>, <Angle3>)

Inclined plane of the desired pageON with programmedoffset/orientation data.

Abbreviation: G152 = G152.1

G153.<Stage> Inclined plane of the progr. pageOFF

G153 Inclined plane OFF (switch off allpages).

where:<Page>: Number of the desired page.

Range of values: 1 to 5<XW-Offset>: Offset value in main coordinate direction<YW-Offset>: Offset value in secondary coordinate direction<ZW-Offset>: Offset value in normal coordinate direction<Angle1>: Angle of rotation around the Z-coordinate.

Value range: 0 ≤ <Angle1> < 360 degrees<Angle2>: Angle of rotation around the Y’-coordinate.

Value range: 0 ≤ <Angle2> < 180 degrees<Angle3>: Angle of rotation around the Z’’-coordinate.

Value range: 0 ≤ <Angle3> < 360 degrees

Example::N40 G152.1(100,0,0,90):::::

Inclined plane of page 1 ON. No traversing motion.The zero point is offset by 100 mm in theX-direction and the WCS is rotated by 90degrees around the Z-coordinate.

N180 G153 Switch off all pages (switch off Inclinedplane altogether).

... in conjunction with placement tables:

1. Activate the desired placement table (see page 4-103).2. Program the required function:

Syntax:G154.<Page> Inclined plane of the progr. page set 1 ON.G155.<Page> Inclined plane of the progr. page set 2 ON.G156.<Page> Inclined plane of the progr. page set 3 ON.G157.<Page> Inclined plane of the progr. page set 4 ON.G158.<Page> Inclined plane of the progr. page set 5 ON.

Page 180: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

G-Codes G152 - G159.5

3-84 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

G159.<Page> Inclined plane of the progr. page set 6 ON.

Abbreviation: G152 -G159

= G154.1 - G159.1

G153.<Page> Inclined plane of the progr. page OFFG153 Inclined plane OFF (switch off all pages).

where:<Page>: Number of the desired page.

Range of values: 1 to 5

. Please refer to the Operating Instructions for how to create and editplacement tables.

Example:N40 PMS(Tab1) Activate placement table ”Tab1”N50 G154.1:

Switch on page 1 with set 1. No traversingmotion.

N90 G154.2 X1 Y2 Z3::

Switch on page 2 with set 1 (acts additively topage 1). In the resulting WCS, traverse to theprogrammed position P(1,2,3).

N120 G153.2:

Switch off page 2 (page 1 remains in effect).

N180 G153 Switch off all pages (switch off Inclined planealtogether).

Special features and restrictions:D If an axis transformation is active, Inclined plane may not be program-

med in the same block as traverse movements.D The power-up status and the behavior in case of a control reset are

configured in machine parameters 7060 00010 and 7060 00020.D All functions are modal within each page (1 - 5) and deselect each

other mutually.D Activating and deactivating Inclined plane interrupts block look-

ahead; therefore, it may not be programmed when cutter path com-pensation is active (G41/G42, see page 3-39).

Page 181: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M0, M00 M1, M01

Electric Drivesand Controls

3-85Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.3 M-Codes

3.3.1 Interrupt Program (Program Stop) M0, M00

EffectD Interrupts the NC program,D stops machine movements after executing the block, andD issues the channel-based interface signal ”Program stop M0”.

The current channel status switches to ”NC Ready”.Program execution is restarted by ”NC-Start”.

. See M1/M01 to interrupt programs depending on the channel-ba-sed interface signal ”Optional stop”.

ProgrammingSyntax:

M0 or M00

Special features and restrictions:D You may program ”Program stop” in the same block as other NC func-

tions. Only after all other programmed functions have been executeddoes ”Program stop” become effective.

3.3.2 Interrup Program Conditionally (Cond. Progr. Stop) M1, M01

EffectD Interrupts the NC program andD stops machine movements after executing the block if the channel-

based interface signal ”Optional stop” is active.

The current channel status switches to ”NC Ready”.Program execution is restarted by ”NC-Start”.

ProgrammingSyntax:

M1 or M01

Special features and restrictions:D You may program ”Conditional program stop” in the same block as

other NC functions. Only after all other programmed functions havebeen executed does ”Conditional program stop” become effective.

Page 182: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M2, M02, M30

3-86 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.3.3 Terminate Program (End of Program) M2, M02, M30

EffectTerminates a program.If the program is a subroutine,D the NC issues the auxiliary function (M2, M02 or M30),D returns to the calling program andD processes the calling program.

. Modal states that have been changed in the subroutine are not re-set!

If the program is a main program,D the NC sets channel-based interface signal ”Program end M30”,D cancels channel-based interface signal ”Program running”,D selects any ”Automatic gear range selection” that may be active (but

the current gear range remains selected)D switches to ”Direct speed programming” (G97)D activates all states defined in machine parameter 7060 00020, ”De-

fault status”, for an ”M30” event,D returns to the start of the main program, andD waits for the next ”NC-Start”.

Program execution is restarted by ”NC-Start”.

ProgrammingSyntax:

M2 or M02 or M30

Special features and restrictions:D Program the function in a separate program line.

CAUTIONUndefined default states may cause damage!If certain states or functions are required after terminating a mainprogram, it must be ensured that the parameters of the ”M30”event’s init string are set correctly in MP 7060 00020! It must con-tain all the functions that bring the NC into the required/desiredstatus after a main program is terminated.In this regard, remember that modally acting functions remain ac-tive even after the end of the program!

. For detailed information about the power-up states, see the ”Des-cription of Functions”.

Page 183: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M13, M113, M213M-Codes M3, M103, M203

Electric Drivesand Controls

3-87Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.3.4 Spindle, Clockwise Rotation M3, M103, M203Spindle, Clockwise Rotation and Coolant ON M13, M113, M213

CAUTIONThe described syntax applies only to the default setting ofmachine parameter ranges 1040 001xx and 1040 002xx.It is freely configurable and can therefore be different on yourmachine! Therefore, the documentation provided by the machinetool manufacturer always takes priority.To determine whether the functions described herein actuallyapply to your machine, contact your system administrator!

EffectD Starts clockwise spindle rotation based on a ”tool-to-workpiece” per-

spective.D Cancels a position control that was activated by ”Align/position

spindle”.D Reserves the corresponding spindle(s) for the current channel.

. Spindle movement starts only if an S- or SSPG-word greater than 0was programmed for the relevant spindle/spindle group in a pre-vious or in the same block (see page 3-97).

ProgrammingSyntax:M3 Acts on the 1st spindle group.M103 Acts on the 1st spindle.M203 Acts on the 2nd spindle.

M13 Acts on the 1st spindle group. In addition, coolant ON.M113 Acts on the 1st spindle. In addition, coolant ON.M213 Acts on the 2nd spindle. In addition, coolant ON.

Special features and restrictions:D The appropriate function automatically reserves the corresponding

spindle(s) for the current channel. Use of reserved spindle(s) by an-other channel is permitted only if function ”Spindle stop” (see page3-89) or ”SpAdmin” (SPA, see page 4-136) is used for the correspon-ding spindle(s).

D The appropriate function acts until a new state of motion is program-med for the same spindle(s) (e.g. another direction of rotation, with/without coolant, ”Spindle stop” or ”Align spindle”).

D Competing jobs between single spindles and spindle groups that areprogrammed in the same block lead to a runtime error.(Example: M3 and M104 are not permitted in the same block.)

D After the gear range is changed, the previously programmed directionof rotation of a spindle is automatically restored.

Page 184: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M4, M104, M204 M14, M114, M214

3-88 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.3.5 Spindle, Counterclockwise Rotation M4, M104, M204Spindle, Counterclockwise Rotation and Coolant ON

M14, M114, M214

CAUTIONThe described syntax applies only to the default setting ofmachine parameter ranges 1040 001xx and 1040 002xx.It is freely configurable and can therefore be different on yourmachine! Therefore, the documentation provided by the machinetool manufacturer always takes priority.To determine whether the functions described herein actuallyapply to your machine, contact your system administrator!

EffectD Starts counterclockwise spindle rotation based on a ”tool-to-work-

piece” perspective.D Cancels a position control that was activated by ”Align/position

spindle”.D Reserves the corresponding spindle(s) for the current channel.

. Spindle movement starts only if an S- or SSPG-word greater than 0was programmed for the relevant spindle/spindle group in a pre-vious or in the same block (see page 3-97).

ProgrammingSyntax:M4 Acts on the 1st spindle group.M104 Acts on the 1st spindle.M204 Acts on the 2nd spindle.

M14 Acts on the 1st spindle group. In addition, coolant ON.M114 Acts on the 1st spindle. In addition, coolant ON.M214 Acts on the 2nd spindle. In addition, coolant ON.

Special features and restrictions:D The appropriate function automatically reserves the corresponding

spindle(s) for the current channel. Use of reserved spindle(s) by an-other channel is permitted only if function ”Spindle stop” (see page3-89) or ”SpAdmin” (SPA, see page 4-136) is used for the correspon-ding spindle(s).

D The appropriate function acts until a new state of motion is program-med for the same spindle(s) (e.g. another direction of rotation, with/without coolant, ”Spindle stop” or ”Align spindle”).

D Competing jobs between single spindles and spindle groups that areprogrammed in the same block lead to a runtime error.(Example: M3 and M104 are not permitted in the same block.)

D After the gear range is changed, the previously programmed directionof rotation of a spindle is automatically restored.

Page 185: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M5, M105, M205

Electric Drivesand Controls

3-89Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.3.6 Spindle Stop M5, M105, M205

CAUTIONThe described syntax applies only to the default setting ofmachine parameter ranges 1040 001xx and 1040 002xx.It is freely configurable and can therefore be different on yourmachine! Therefore, the documentation provided by the machinetool manufacturer always takes priority.If you are not sure whether the functions described herein actuallyapply to your machine, contact your system administrator!

EffectD Stops spindle(s).D Cancels any possibly active reservation of the given spindle(s) by the

active channel.D Cancels a position control that was activated by ”Align/position

spindle”.

ProgrammingSyntax:

M5 Acts on spindle group 1.

M105 Acts on the 1st spindle.

M205 Acts on the 2nd spindle.

Special features and restrictions:D The appropriate function acts until a new state of motion is program-

med for the same spindle(s) (e.g. ”Spindle, counterclockwise/clock-wise rotation” or ”Align spindle”).

D Competing jobs between single spindles and spindle groups that areprogrammed in the same block lead to a runtime error.(Example: M3 and M105 are not permitted in the same block.)

Page 186: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M19, M119, M219

3-90 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.3.7 Align Spindle / Position Spindle M19, M119, M219

CAUTIONThe described syntax applies only to the default setting ofmachine parameter ranges 1040 001xx and 1040 002xx.It is freely configurable and can therefore be different on yourmachine! Therefore, the documentation provided by the machinetool manufacturer always takes priority.If you are not sure whether the functions described herein actuallyapply to your machine, contact your system administrator!

EffectThe spindle is reserved for the current channel and positioned in a defi-nable position using position control.Positioning occursD at a standstill: as specified in parameter S-0-0154

of the driveD with active rotation: retaining the direction of rotation.

ProgrammingSyntax:

M19 Spindle group 1: position all participatingspindles on their reference angle (drive para-meter S-0-0153).

M119 1. Position second spindle on its referenceangle (S-0-0153).

M219 2. Position second spindle on its referenceangle (S-0-0153).

M19 S<Angle> Spindle group 1: position all participatingspindles on <Angle>.

M119 S1=<Angle> 1. Position second spindle on <Angle>.

M219 S2=<Angle> 2. Position second spindle on <Angle>.

<Angle> Desired absolute spindle position, in degrees.Value range: 0_≤ Spindle position < 360_.If another value is programmed for the position, it is auto-matically converted to the given interval.If the spindle is already in the given position, no motion isexecuted.

Special features and restrictions:D The appropriate function must not be programmed in the same block

as a competing spindle function (”Spindle, counterclockwise/clock-wise rotation”, ”Spindle stop”).

D If the S-word is required, it must be programmed in the same block.D After the positioning procedure, the spindle remains in position con-

trol. Position control is automatically cancelled only by ”Spindle, co-unterclockwise/clockwise rotation” or ”Spindle stop”.

Page 187: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M19, M119, M219

Electric Drivesand Controls

3-91Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D Competing jobs between single spindles and spindle groups that areprogrammed in the same block lead to a runtime error.(Example: M3 and M119 are not permitted in the same block.)

Examples:N60 M19:

All the spindles of the 1st spindle groupposition themselves relative to their refer-ence angle.

N70 M219:

Only the 2nd spindle positions itself relativeto its reference angle.

N80 M19 S180:

All the spindles of the 1st spindle groupposition themselves to 180 degrees.

N90 M119 S1=370:

1st spindle positions itself to 10 degrees.

N95 M19 S1=10 S2=20:

If the 1st and 2nd spindle are assigned tothe 1st spindle group:The 1st spindle positions itself to 10, andthe 2nd spindle to 20 degrees. All other spindles of the 1st spindle groupposition themselves relative to their refer-ence angle.

Page 188: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M40, M140, M240

3-92 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.3.8 Automatic Gear Range Selection M40, M140, M240

CAUTIONThe described syntax applies only to the default setting ofmachine parameter ranges 1040 001xx and 1040 002xx.It is freely configurable and can therefore be different on yourmachine! Therefore, the documentation provided by the machinetool manufacturer always takes priority.If you are not sure whether the functions described herein actuallyapply to your machine, contact your system administrator!

EffectThe control automatically selects the suitable gear range from the onesavailable according to the active speed.In the event of overlapping speed ranges of the various gears, the con-trol always selects the lower gear (with the higher motor speed).

ProgrammingSyntax:

M40 Automatic gear range selection for spindle group 1 ON.

M140 Automatic gear range selection for 1st spindle ON.

M240 Automatic gear range selection for 2nd spindle ON.

Special features and restrictions:D Programming ”0” for the speed has the effect that the current gear

range does not change.D M40, M41-M44, M48, M140, M141-M144 and M148 act modally and

cancel each other mutually.D M240, M241-M244 and M248 act modally and cancel each other mu-

tually.D M30 selects any automatic gear range selection that may be active

(but the current gear range remains selected).D Automatic gear range selection does not affect analog spindles.

Page 189: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M41 - 44, M141 - 144, M241 - 244

Electric Drivesand Controls

3-93Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.3.9 Manual Gear Range Selection M41 - 44, M141 - 144, M241 - 244

CAUTIONThe described syntax applies only to the default setting ofmachine parameter ranges 1040 001xx and 1040 002xx.It is freely configurable and can therefore be different on yourmachine! Therefore, the documentation provided by the machinetool manufacturer always takes priority.If you are not sure whether the functions described herein actuallyapply to your machine, contact your system administrator!

EffectSelects the corresponding gear range.If a speed outside of the corresponding gear range speed spectrum isprogrammed, the control issues the minimum/maximum speed of the af-fected gear range.

ProgrammingSyntax:

M4<Stage> Gear range <Stage> for spindle group 1 ON.

M14<Stage> Gear range <Stage> for 1st spindle ON.

M24<Stage> Gear range <Stage> for 2nd spindle ON.

where:<Stage> Input range: 1 - 4.

Special features and restrictions:D M40, M41-M44, M48, M140, M141-M144 and M148 act modally and

cancel each other mutually.D M240, M241-M244 and M248 act modally and cancel each other mu-

tually.D Manual gear range selection does not affect analog spindles.

Page 190: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

M-Codes M48, M148, M248

3-94 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.3.10 Disengage Gear Range M48, M148, M248

CAUTIONThe described syntax applies only to the default setting ofmachine parameter ranges 1040 001xx and 1040 002xx.It is freely configurable and can therefore be different on yourmachine! Therefore, the documentation provided by the machinetool manufacturer always takes priority.If you are not sure whether the functions described herein actuallyapply to your machine, contact your system administrator!

EffectDisengages the gear range. The gear is then in idling mode.

ProgrammingSyntax:

M48 Disengage gear range stage for spindle group 1.

M148 Disengage gear range stage for 1st spindle.

M248 Disengage gear range stage for 2nd spindle.

Special features and restrictions:D M40, M41-M44, M48, M140, M141-M144 and M148 act modally and

cancel each other mutually.D M240, M241-M244 and M248 act modally and cancel each other mu-

tually.D The functions do not affect analog spindles.

Page 191: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

FFeed and Speed

Electric Drivesand Controls

3-95Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.4 Feed and Speed Programming

3.4.1 F-Address F

EffectDepending on the currently active G-function G93, G94, G95, the controlinterprets F-addresses asD interpolation time in seconds (see G93, page 3-70)D feedrate in mm/min or inch/min (see G94, page 3-71)D feedrate in mm/rev (see G95, page 3-74).

The following applies:D F acts modally for G94 and G95.

CAUTIONThe last F-word may change after a power-up, control reset or re-set!After the events listed above, the F-word defined in machineparameter 7060 00020 or 7060 00010 is effective (default value: F0).The specification whether G93, G94 or G95 is to be then active isalso stored there (default value: G94).Therefore, ensure that the required feedrate has beenprogrammed before starting machining!

ProgrammingSyntax:

F<Value>

where:<Value> Depends on the active G-function, interpreted as interpo-

lation time, feedrate or dwell time.

Special features and restrictions:D The programmed path velocity can be suppressed using function

Test feed. This is controlled by channel IF signal qCh_TestFeed.

Page 192: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Feed and Speed FA Omega

3-96 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.4.2 Velocity of Asynchronous Axes FA

EffectAll traversing movements of asynchronous axes programmed in the FAblock are traversed with the programmed velocity instead of in rapid tra-verse.

CAUTIONIncorrect programming may cause machine damage!The given velocity acts only in the current FA block!Programming asynchronous axes without reprogramming the FAword in a subsequent block will let the axes traverse in rapid modeagain!

ProgrammingSyntax:

FA<Value>

where:<Value> Desired velocity.

Example:N10 G1 G94 X200 Z300 F200 Feedrate of synchronous axes:

is active again

N11 UA400 VA140 FA250 Asynchronous axes UA and VA tra-verse at 250mm/min.

N12 UA0 WA10 Asynchronous axes UA and WA tra-verse at rapid traverse again.

3.4.3 Omega Address (Feedrate) Omega

EffectIf only axes that are hidden for feedrate computing are to be moved in ablock (see ”FeedAd”, page 4-48), their feedrate can be set using ad-dress ”Omega”.

ProgrammingSyntax:

Omega<Value>

where:<Value> Desired feedrate.

Page 193: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

S, SSPGFeed and Speed

Electric Drivesand Controls

3-97Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.4.4 Program Spindle Speed S, SSPG

EffectWhen G97 is active, this specifies the desiredD speed of a single spindle (S...) orD a complete group of spindles (SSPG...).

. The spindle reaches the programmed speed only if a spindle rota-tion command (e.g. Clockwise rotation: M3; Counterclockwise ro-tation: M4 exists).

ProgrammingSyntax:

S<Number>=<Value> Program the speed for a single spindle.

SSPG<Group>=<Value> Program the speed for a complete group ofspindles.

S<Value> Abbreviated notation for programming thespeed of the 1st spindle.Acts only on the 1st spindle if it is not assi-gned to any group of spindles using MP104000002. If this is not the case, this programs thecomplete group of spindles that containsthe 1st spindle.

where:<Number> Number of the spindle (spindle index).

Input range:1 to the number of defined spindles (defined usingMP 1040 00001). Integer.

<Group> Number of the spindle group.Input range: 1 - 4

<Value> Desired spindle speed (default unit: rpm).Input value: ≥ 0.

Special features and restrictions:D When G96 is active, an S-word is interpreted as the cutting speed.

For the syntax, see page 3-75.D In conjunction with function ”Align spindle”, an S-word is interpreted

as a positioning angle. For the syntax, see page 3-90.D The speeds of several spindles / groups of spindles may be program-

med in the same block.D The resulting speed depends on the spindle-specific override.D The resulting speed may be limited by

D function SMin or SMax (see page 4-135)D gear range stage limit values (MP 1040 00011, 1040 00012).

Page 194: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Feed and Speed S, SSPG

3-98 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D The maximum permitted speed of a group of coupled spindles (syn-chronously running spindles) depends on the NC cycle time. The fol-lowing applies: Smax [rpm] = 14400 / (MP 9030 00001 [ms])

D The set speed is in effect until it is overwritten by a new speed settingfor the same spindle(s). After the control is powered up, S=0.

Example:N10 G97 Activate speed programming.

N20 SSPG1=1000:

Set the speed of all the spindles of the 1stgroup of spindles to 1000 rpm.

N50 S1=2000 S2=60:

Set the speed of the 1st spindle to 2000rpm.Set the speed of the 2nd spindle to 60 rpm.

N80 S3=2000:

Set the speed of the 3rd spindle to 2000rpm.

N90 S1500:

Set the speed of the 1st spindle to 1500rpm.If the 1st spindle has been assigned to agroup of spindles, the speed setting appliesto the complete group of spindles.

Page 195: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

DTool Correction

Electric Drivesand Controls

3-99Bosch Rexroth AGIndraMotion MTXR911314869 / 01

3.5 Tool Correction

3.5.1 D-Correction D

EffectThe D-correction calls tool compensation values that are stored in XML-D-correction tables in the IndraMotion MTX. A correction table can con-tain a maximum of 99 data records.Each data record contains the following correction values:D 3 tool lengths L1, L2, L3,D tool edge radius RAD,D tool edge position ORI.

The D-correction is equally suitable for drilling, milling, lathing andcross-staff tools. With a total of 3 offset values (L1, L2 and L3), you canperform both constant three-dimensional tool offsets for a tool and pa-rallel length compensations of 3 different tools as a maximum.A D-correction table is activated using function ”DcTSel” (DCS); then acorrection block is selected from the max. 99 data records using NCcommand ”D”. The correction values go into effect if tool compensation G47 (tool lengthand tool edge position), cutter path compensation G41/G42 orG141/G142 (tool radius) is active. They are additively superimposed bythe active selected correction values of external tool compensation ED.

The following applies:D The preselected tool record has a modal effect. New programming

deletes the preselected tool record that was previously active.D A D-correction may be programmed in the same block as other path

conditions, traversing movements or auxiliary functions.D The tool compensation is calculated only when the corresponding NC

function has been activated: G47, G41, G42, G141, G142.

ProgrammingSyntax:D<No. Tool record> Preselect the tool compensation

record from the active D-correctiontable

D0 Deselect the tool compensationrecord without selecting a newone.

where:<No. Tool record> Number of the correction data record.

Input range: 1 - 99.

Example:N10 D7:

Preselect correction values for tool record 7.

Page 196: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Tool Correction ED

3-100 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

3.5.2 ED-Correction ED

EffectExternal tool compensation (ED-correction) calls correction values for amaximum of 16 tool edges. The correction values can be written usingprogram module MT_TCorr by the PLC or using a parts program withCPL command ”DCT”.Each of the 16 data records contains the following correction values:D 3 tool lengths L1, L2, L3,D tool edge radius RAD,D tool edge position ORI.

The ED-correction is equally suitable for drilling, milling, lathing andcross-staff tools. With a total of 3 offset values (L1, L2 and L3), you canperform both constant three-dimensional tool offsets for a tool and pa-rallel length compensations of 3 different tools as a maximum.

NC command ”ED” is used to select a correction record from the max. 16data records. The correction values go into effect if tool compensation G47 (tool lengthand tool edge position), cutter path compensation G41/G42 orG141/G142 (tool radius) is active. They are additively superimposed bythe active selected correction values of the D-correction.

The following applies:D The preselected tool edge has a modal effect. New programming de-

letes the preselected tool edge that was previously active.D An ED-correction may be programmed in the same block as other

path conditions, traversing movements or auxiliary functions.D The tool compensation is calculated only when the corresponding NC

function has been activated: G47, G41, G42, G141, G142.D The preselected tool edge can be output on the PLC interface of the

corresponding channel: iCh_ActFunc1 - 24

ProgrammingSyntax:ED<No. tool edge> Preselect the correction record

ED0 Deselect the correction record wi-thout selecting a new one.

where:<No. tool edge> Number of the tool edge.

Input range: 1 - 16.

Example:N10 ED7:

Preselect correction values for tool edge 7.

Page 197: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions

Electric Drivesand Controls

4-1Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4 NC Functions with High-Level Language Syntax4.1 Overview

The control has a variety of NC functions. In addition to the commandsthat are specified within the DIN 66025, this includes important supple-ments in the area of G-codes and additional high-level language-typesyntax elements that are described in this chapter.

D NC functions with high-level language syntax:In NC functions with high-level language syntax, the meaning of thefunction can generally be seen in the name (e.g. ”Scale”). Usually thefollowing variants of equal importance exist:D Long form with no case sensitivity.

To improve readability in this manual, the first letter of the compo-site partial words is capitalized. Example: ”KvProg”

D Abbreviation, consisting of 3 capital letters (4 capital letters in ex-ceptions).Example: abbreviation of KvProg: KVPThe corresponding abbreviation is also shown in the process datadisplay of the active modal NC functions.

The following syntax descriptions show both variants.

. A tabular overview of all NC functions can be found in the Appen-dix, A-2 ff. In addition, all NC functions are in the index starting on page A-54.

Used notationsThe following notations are used for the syntax of NC functions in thismanual:

Font”Courier bold” or ”Courier”:Character strings in this font must be programmed as shown below.Example: G0 (POL)

Angle brackets < >indicate a wildcard for an expression/parameter to be programmed. Thewildcard is written in italics.Example: <Axis1>

Curly brackets indicate an optional expression/parameter. Such syntax elements may, but do not have to be specified. Example: G0(POL,<Par1>)

Character ”|”separates possible parameters that cannot be used simultaneously (al-ternative parameters).Example: G0(POL,NIPS|IPS1|IPS2|IPS3)

Page 198: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Area, ARA

4-2 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.2 Area Monitoring Area, ARA

EffectDefines, activates or deactivates up to 10 rectangular, two-dimensionaldead or working ranges with axis-parallel boundaries.

D Dead ranges:May be neither crossed nor contacted – incl. their boundaries – duringa traversing movement.

D Working areas:May not be exited – incl. their boundaries – during a traversing move-ment.

. Default data of all areas are defined using machine parametergroup MP 8002.

Programming: Activate/deactivate individually or all monitoring areastogether.

Syntax:

Area(<ANo>,<Sta>)

Abbreviation: ARA(...)

where:<ANo> Area number.

Integer. Input range: -1, 1...10.-1: Activate/deactivate all areas.

<Sta> Desired monitoring status.0: Deactivate monitoring.1: Activate monitoring.

Programming: Define, activate, deactivate an individual monitoring area.

Syntax:

Area(<BNo>,<Sta>,<Mod>,<P1>,<P2>,<D1>,<D2>)

Abbreviation: ARA(...)

where:<ANo> Area number.

Integer. Input range: 1...10.<Sta> Desired monitoring status.

0: Deactivate monitoring of area <ANo>.1: Activate monitoring of area <ANo>.

<Mod> 0: Area <ANo> is not used.1: Area <ANo> is a dead area.2: Area <ANo> is a working area.

Page 199: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Area, ARA

Electric Drivesand Controls

4-3Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<P1> Position in the machine coordinate system.Specifies the position values of the center point of thearea, based on the first system axis participating in thearea (defined using MP 8002 00001). See the following example.Programming unit as for the axis coordinates.

<P2> Position in the machine coordinate system.Specifies the position values of the center point of thearea, based on the second system axis participating inthe area (defined using MP 8002 00002). See the follo-wing example.Programming unit as for the axis coordinates.

<D1> Specifies the length of the area, based on the first sy-stem axis participating in the area (defined using MP8002 00001). See the following example.Programming unit as for the axis coordinates.

<D2> Specifies the length of the area, based on the secondsystem axis participating in the area (defined usingMP 8002 00002). See the following example.Programming unit as for the axis coordinates.

. Unprogrammed values are retained if they have been entered oncein the program execution.If they were not yet entered during the program execution, the con-trol uses the corresponding values from machine parameter group8002.

Special features and restrictions:D All system axes that participate in the individual areas must be defi-

ned in MP 8002 00001 and MP 8002 00002.D In order to be able to influence areas using ”Area”, MP 8002 00032

must be set accordingly.D The function requires referenced axes.D When an area is activated, the associated axes must lie in the current

channel.D Influencing an area using ”Area” has an effect only in the channel in

which ”Area” is programmed.If the axes of an area are transferred to another channel, this area isassigned the default values of the target channel as preset in ma-chine parameter group 8002 and the area is deactivated.Any values programmed using ”Area” in the source channel are nottransferred.

D In jog mode: axes that are moved using the handwheel are not moni-tored.

D In jog mode: only one of the axes spanning a dead area may be jog-ged at a time.

D Area violations in jog mode result in a warning. The affected axis doesnot move and can be jogged only in the opposite direction.

Page 200: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Area, ARA

4-4 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:N100 Area(4,0,,100,200) Deactivate area 4 and set the center

point of the area to the given machinecoordinates (100,200).The area lengths remain unchanged.

X

Y

100

200

Area 4

<D2>:Area length in thedirection of thesecond systemaxis participatingin the area.

M

Second systemaxis participatingin the area(defined in MP8002 00002).

Center point (100,200)

First system axisparticipating in thearea (defined inMP 8002 00001).

<D1>:Area length inthe direction ofthe first system

axis participatingin the area.

<P2>:Area center

point position inthe direction of

the secondsystem axis

participating inthe area.

<P1>:Area center point

position in the directionof the first system axis

participating in thearea.

Page 201: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ASPCLR

Electric Drivesand Controls

4-5Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.3 Asynchronous Subroutines: Log off ASPCLR

EffectLogs off an asynchronous subroutine in the current channel.Logged-off subroutines can be neither activated nor deactivated.

. To log on asynchronous subroutines that have been logged off,see function ASPSET, page 4-8.

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the Description ofFunctions.

ProgrammingSyntax:

ASPCLR(<SR No>)

where:<SR No> Number of the subroutine.

Input value: 1 - 8. Integer.

Special features and restrictions:D The corresponding subroutine must be logged on in the target chan-

nel (see ASPSET, page 4-8).D To temporarily deactivate a subroutine, see function ASPDIS, page

4-6.

Page 202: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ASPDIS ASPENA

4-6 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.4 Asynchronous Subroutines: Switch off ASPDIS

EffectDeactivates an asynchronous subroutine in the current channel.A deactivated subroutine is not called if the relevant event occurs.

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the Description ofFunctions.

ProgrammingSyntax:

ASPDIS(<SR No>)

where:<SR No> Number of the subroutine.

Input value: 1 - 8. Integer.

Special features and restrictions:D The corresponding subroutine must be logged on in the target chan-

nel (see ASPSET, page 4-8).D To activate a deactivated subroutine, see function ASPENA , page

4-6.

4.5 Asynchronous Subroutines: Switch on ASPENA

EffectActivates an asynchronous subroutine in the current channel.Only activated subroutines can be called if the relevant event occurs.

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the Description ofFunctions.

ProgrammingSyntax:

ASPENA(<SR No>)

where:<SR No> Number of the subroutine.

Input value: 1 - 8. Integer.

Special features and restrictions:D The corresponding subroutine must be logged on in the target chan-

nel (see ASPSET, page 4-8).D To deactivate a subroutine, see function ASPDIS, page 4-6.

Page 203: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ASPRTP

Electric Drivesand Controls

4-7Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.6 Asynchronous Subroutines: Define Point of Return to Path ASPRTP

EffectDefines whether the control, at the end of an asynchronous subroutine,is to position onD the starting pointD the end point, orD the point of interruptionof a traversing block that may have been interrupted.If no traversing block was active at the time of interruption, the controlalways positions on the last active coordinates.

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the Description ofFunctions.

ProgrammingSyntax:

ASPRTP(<SR No>,<Point>)

where:<SR No> Number of the subroutine.

Input value: -1; 1 - 8. Integer.-1: Define the desired point of return to path for all

asynchronous subroutines of the current channel.<Point> Desired point of return to path:

1: Starting point2: End point3: Interruption point

Special features and restrictions:D The desired point of return to path that is set is cleared by a control

reset or M30.D Any correction modifications made within an asynchronous subrou-

tine are automatically taken into account in the internal calculation ofthe required point of return to path.

D Function REPOSTP (see page 4-125) can be used to temporarily sup-press the defined point of return to path in the asynchronous subrou-tine.

Page 204: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ASPSET

4-8 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.7 Asynchronous Subroutines: Log on ASPSET

EffectLogs on an asynchronous subroutine in the current channel and activa-tes it (for activation, also see function ASPENA, page 4-6).Only subroutines that have been logged on and activated may be used.

. To log off asynchronous subroutines that have been logged on,see function ASPCLR, page 4-5.

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the Description ofFunctions.

ProgrammingSyntax:

ASPSET(<SR No>,<SR name>,<Flags>)

where:<SR No> Number of the subroutine.

Input value: 1 - 8. Integer.<SR name> Name of the subroutine; with or without path information.

If the path is missing, the file is searched according toMP 3080 00001 (search path for subroutines).

<Flags> Switch with which the behavior after the call can be in-fluenced:00 neither a linking procedure nor an automatic start.10 a linking procedure, but not an automatic start.01 not a linking procedure, but an automatic start.11 a linking procedure and an automatic start.

Example::N30 ASPSET(1,ASUP1,10):

Log on program ASUP1 as the first asyn-chronous subroutine in the active channel.After it is called (e.g. via the interface sig-nal), it is – if required – automatically linkedand started explicitly using NC-Start.

Page 205: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ASPSTA

Electric Drivesand Controls

4-9Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.8 Asynchronous Subroutines: Triggering via Program ASPSTA

EffectCalls an asynchronous subroutine – program-controlled – in any chan-nel.

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the Description ofFunctions.

ProgrammingSyntax:

ASPSTA(<SR No>,<Channel No>)

where:<SR No> Number of the subroutine.

Input value: 1 - 8. Integer.<Channel No> Target channel in which <SR No> is to be called.

If it is not programmed, <SR No> is called in the currentchannel.

Special features and restrictions:D Asynchronous subroutines may not be nested.D The called subroutine must be logged on in the target channel (see

ASPSET, page 4-8).D The called subroutine must not be deactivated in the target channel

(see ASPDIS , page 4-6 / ASPENA , page 4-6).

Page 206: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AssLogName, ALN

4-10 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.9 Assign Logical Axis Name AssLogName, ALN

EffectAssigns a new logical axis name to a synchronous axis in the callingchannel. The old logical axis name becomes invalid.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

AssLogName(<PAN> | <PAI> | <LAN>,<LANnew>,<PAN> | <PAI> | <LAN>,<LANnew>...)

Abbreviation: ALN(..)

where:<PAN> Physical axis name.

Specifies the axis that is to be renamed in the currentchannel.

<PAI> Physical axis index.Same effect as <PAN>.

<LAN> Logical axis name.Same effect as <PAN>.

<LANnew> New logical axis name.The axis entered using <PAN>, <PAI> or <LAN> receivesthe logical name <LANnew> in the current channel.<LANnew> must have been defined in MP 7010 00010(”Logical axis designation”) or MP 7010 00020 (”Optionalaxis designation”).

Special features and restrictions:D An axis to be renamed must be at a standstill. If this is not the case, the

control generates an error message and terminates the program.

D Axis positions in the same block must always be programmed accor-ding to the expression AssLogName(...).

Example::N030 ALN(YP,X,3,Y,B,Z):

Physical axis YP is assigned the logical axisname X, the 3rd physical axis is assignedthe logical name Y, and logical axis B is as-signed the logical name Z.Programming B subsequently will generatea runtime error.

Page 207: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATBWD

Electric Drivesand Controls

4-11Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.10 Calibration of Axis Kinematics: Backwards TransformationATBWD

EffectIs used for converting coordinates of the workpiece coordinate system(WCS) in real axis positions (ACS). This procedure is called ”forwardstransformation”.

ProgrammingSyntax:

AtBwd(<AxCoord>,<Coord>)

where:<AxCoord>Permanent, global or local CPL array.

Type: double. Dimension: at least as large as the number ofaxes in the current channel.After a subprogram call, the individual variables of the arrayget the resulting real axis positions in the ACS.

<Coord> Permanent, global or local CPL array.Type: double. Dimension: at least as large as the number ofchannel coordinates of the coordinate system generated byaxis transformation.The variables of the array must contain the workpiece coor-dinates of all the coordinates in the WCS participating in theaxis transformation.

Special features and restrictions:D The backwards transformation is performed for the axis transforma-

tion active at the time of callup. The required lengths and angle para-meters are taken from the machine parameters.

Page 208: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATCAL

4-12 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.11 Calibration of Axis Kinematics: Optimize Parameters ATCAL

EffectCombined with function ”Calibration of axis kinematics”, this function isused to optimize axis kinematics-specific length and angle parameters.These data are different for every axis transformation type and are con-tained in MP 1030 00140 for every axis transformation. As a rule, theymust be read using function ATGET (see page 4-15) before optimizationand transferred back to the NC using function ATPUT (see page 4-17)after optimization.

. You can find extensive information regarding the calibration of axiskinematics in the Description of Functions.

ProgrammingSyntax:

ATCAL(<File>,<OptData>,<Mask>,<Info>,<NumIt>)

where:<File> Name of the calibration file; with or without path information.

If the path is missing, the file is searched according toMP 3080 00001 (search path for subroutines).<File> contains data that are required for optimization. Formore information, see the Description of Functions.

<OptData> Permanent, global or local CPL array.Type: double. Dimension: min. 16.After calculation, the array contains a parameter block withthe optimized length and angle parameters.The sequence of the individual variables (index 1 to 16) cor-responds to the element index of MP 1030 00140. The va-lues have the same unit as the individual parameters inMP 1030 00140.

<Mask> CPL variable. Type: Integer.Bit mask which is used to determine the individual parame-ters to be optimized. Example:

...1

Array <OptData> before optimization

Index: 2 3 4 5 6 7 8 15 16

...1

Array <OptData> after optimization

Index: 2 3 4 5 6 7 8 15 16

...

1Priority: 2 4 16 32 64 128

Bit mask:

1 1 1 0 1 0 0 0 0 0

8 ...

: optimized individual parameter

1req. value in<Mask>: 2 4 16

1 = Optimize individual parameter

+ + + 23=

Page 209: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATCAL

Electric Drivesand Controls

4-13Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Info> Permanent, global or local CPL array.Type: double. Dimension: min. 4.After optimization, it contains the following data:<Info>[1] Value of the criterion function (quadratic devi-

ation) before optimization. Unit: mm.<Info>[2] Value of the criterion function (quadratic devi-

ation) after optimization. Unit: mm.<Info>[3] Max. deviation before optimization (in mm).<Info>[4] Max. deviation after optimization (in mm).

<NumIt> Maximum number of iteration steps to optimization.If this is not entered, or has a value of ”-1”, iteration is termi-nated only if the deviation of two subsequently calculatedparameter blocks drops below a sufficiently low internal NCthreshold (a relevant deviation no longer exists).If ”1” is entered, a linear computation of adjustment is requi-red.

Example:01 DIM PAR!(16) Dimension a local CPL array with 16

fields of type Double (for the opti-mized length/angle parameters).

02 DIM GA!(4) Dimension a local CPL array with 4fields of type Double (for criterion anddeviation).

03 MASK%=2+4+32 Optimization of individual parameterswith field indices 2, 3 and 6.

N4 ATCAL(CL.TXT,[PAR!], [MASK%],[GA!],-1)

Start optimization.

Page 210: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATFWD

4-14 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.12 Calibration of Axis Kinematics: Forwards Transformation ATFWD

EffectTogether with function ”Calibration of axis kinematics”, this function isused to convert real axis positions to the coordinates of a coordinate sy-stem generated by axis transformation. This procedure is also called”forwards transformation”.

. You can find extensive information regarding the calibration of axiskinematics in the Description of Functions.

ProgrammingSyntax:

ATFWD(<Coord>,<AxCoord>,<ParData>)

where:<Coord> Permanent, global or local CPL array.

Type: double. Dimension: at least as large as the number ofchannel coordinates of the coordinate system generated byaxis transformation.The individual variables of the array receive the resultingchannel coordinates in the transformed coordinate systemafter conversion.

<AxCoord>Permanent, global or local CPL array.Type: double. Dimension: at least as large as the number ofaxes in the current channel.The variables of the array must contain the real axis posi-tions of all the channel axes participating in the axis transfor-mation.

<ParData> Permanent, global or local CPL array.Type: double. Dimension: min. 16.The array must contain a parameter block with all length andangle parameters for an axis transformation. The sequence of the individual variables (index 1 to 16) cor-responds to the element index of MP 1030 00140. The va-lues have the same unit as the corresponding individualparameters in MP 1030 00140.If this is not programmed, the parameter block of the cur-rently active axis transformation is used. If two axis transformations are active in the control at thesame time (AT1, AT2; see function ”Coord”, page 4-36 ff.),the AT2 data are used.

Special features and restrictions:D If <ParData> has been programmed and no axis transformation is ac-

tive, a runtime error is issued.

Page 211: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATGET

Electric Drivesand Controls

4-15Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.13 Calibration of Axis Kinematics: Read Parameter from NC ATGET

EffectCombined with function ”Calibration of axis kinematics”, this function isused to read axis transformation-specific machine parameters.These data are different for each type of axis transformation. As a rule,they must be read before optimization (see function ATCAL, page 4-12)and transferred back to the NC using function ATPUT (see page 4-17)after optimization.

. You can find extensive information regarding the calibration of axiskinematics in the Description of Functions.

ProgrammingSyntax:

AtGet(<ParData>,<AxTrafoNo>,<MachParNo>)

where:<ParData> Permanent, global or local CPL array.

Type: double. Dimension: min. 8 (MachParNo =103000130) or min. 16 (MachParNo = 103000140).After the function has been executed, the array compri-ses the currently valid values of the machine parameter”MachParNo” of axis transformation ”AxTrafoNo”.The sequence of the individual variables (index 1,2,....)corresponds to the element index of the respective ma-chine parameters. The values have the same unit as thecorresponding machine parameter.

<AxTrafoNo> Number of axis transformation whose parameters are tobe read.If this is not programmed, the data of the currently activeaxis transformation are read.If two axis transformations are active in the control at thesame time (AT1, AT2; see function ”Coord”, page 4-36ff.), the AT2 data are used.

<MachParNo> Number of the machine parameter that is read.If this is not programmed, the default value 103000140 isassumed, i.e. the length and angle parameters are readout.

Special features and restrictions:D Permissible values for MachParNo are 103000130 (axis positions of

reference position) and 103000140 (length and angle parameter).D The ”ATGET” command causes a runtime error if AxTrafoNo has not

been programmed and no axis transformation (COORD(0,2) andCOORD(0,1)) is active.

Page 212: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATGET

4-16 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:01 DIM LENPARAM!(16) Local CPL array with 16 elements for

length and angle parameters.

01 DIM ZEROPOS!(8) Local CPL array with 8 elements for ref-erence positions of the channel axes.

The following values are read in:

N1 ATGET (LENPARAM!) MP 103000140 of the current axis trans-formation

N1 ATGET (LENPARAM!,3) MP 103000140 of axis transformation 3

N1 ATGET (LENPARAM!,2,103000140)

MP 103000140 of axis transformation 2

N1 ATGET (ZEROPOS!,,103000130)

MP 103000130 of the current axis trans-formation

N1 ATGET (ZEROPOS!,3,103000130)

MP 103000130 of axis transformation 3

Page 213: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATPUT

Electric Drivesand Controls

4-17Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.14 Calibration of Axis Kinematics: Write Parameter to NC ATPUT

EffectCombined with function ”Calibration of axis kinematics”, this function isused to overwrite axis transformation-specific machine parameters.These data are different for each type of axis transformation. As a rule,they must be read before optimization (see functions ATCAL, page 4-12and ATGET, page 4-15) and transferred back to the NC using functionATPUT after optimization.

. You can find extensive information regarding the calibration of axiskinematics in the Description of Functions.

ProgrammingSyntax:

AtPut(<ParData>,<AxTrafoNo>,<MachParNo>)

where:<ParData> Permanent, global or local CPL array.

Type: double. Dimension: min. 8 (MachParNo =103000130) or min. 16 (MachParNo = 103000140).The array must comprise a complete parameter block ofthe machine parameter ”MachParNo” of the ”AxTrafoNo”axis transformation. The sequence of the individual variables (index 1,2,....)corresponds to the element index of the respective ma-chine parameters. The values have the same unit as thecorresponding machine parameter.

<AxTrafoNo> Number of axis transformation whose parameters are tobe written.If this is not programmed, the data of the currently activeaxis transformation are overwritten.If two axis transformations are active in the control at thesame time (AT1, AT2; see function ”Coord”, page 4-36ff.), the AT2 data are changed.

<MachParNo> Number of the machine parameter that is overwritten.If this is not programmed, the default value 103000140 isassumed, i.e. the length and angle parameters are chan-ged.

Special features and restrictions:D Permissible values for MachParNo are 103000130 (axis positions of

reference position) and 103000140 (length and angle parameter).D The ”ATPUT” command causes a runtime error if AxTrafoNo is not

prese and no axis transformation (COORD(0,2) and COORD(0,1)) isactive.

D Executing function ATPUT requires an NC user level that permits theoverwriting of machine parameters.

D The written parameter block becomes active afterD a system reset andD reprogramming of COORD(<AxTrafofNo>).

Page 214: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ATPUT

4-18 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:01 DIM LENPARAM!(16) Local CPL array with 16 elements for

length and angle parameters.

01 DIM ZEROPOS!(8) Local CPL array with 8 elements for ref-erence positions of the channel axes.

01 LENPARAM!(1) =123.456 : :

Value assignment :

01 ZEROPOS!(8) = 1.0

The following values are overwritten:

N1 ATPUT (LENPARAM!) MP 103000140 of the current axis trans-formation

N1 ATPUT (LENPARAM!,3) MP 103000140 of axis transformation 3

N1 ATPUT (LENPARAM!,2,103000140)

MP 103000140 of axis transformation 2

N1 ATPUT (ZEROPOS!,,103000130)

MP 103000130 of the current axis trans-formation

N1 ATPUT (ZEROPOS!,3,103000130)

MP 103000130 of axis transformation 3

Page 215: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AUXFUNC

Electric Drivesand Controls

4-19Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.15 Execute Active Auxiliary Functions of all Groups AUXFUNC

EffectExecutes the currently active channel-specific and cross-channel auxi-liary functions of all existing auxiliary function groups.The function is relevant in connection with NC program restart (e.g. afterprocessing termination) to restore all auxiliary function states at a certainparts program position.

For example, if a parts program is terminated during processing, it maybe possible to use NC program restart to restart processing at the blockthat was being processed at the time of interruption. Although the parts program is restarted at the beginning using NC pro-gram restart, processing on the machine starts at the defined programblock.Since the control neither interpolates nor issues programmed auxiliaryfunctions during NC program restart, all auxiliary functions states mustbe restored at the end of the NC program restart.

. You can find extensive information regarding the use and parame-ters of auxiliary functions in the Description of Functions.

ProgrammingSyntax:

AUXFUNC

Example:N100 T102 Select tool T102.

N110 M6:

Install tool T102.

N150 M3:

Switch on 1st spindle / spindle group. Clockwiserotation.

... Program termination in N160... - T102 and M3 were active. - T102 is installed. The tool position is not changed.The program is then reselected and runs via NC program restart up toand including N150 without traversing movements. Programmed auxi-liary functions are activated but not output.Before N160 is processed, AUXFUNC is used now to execute the cur-rently active channel-specific and cross-channel auxiliary functions ofall existing auxiliary function groups.In the example, AUXFUNC has the following effects: - Activate tool number T102 (tool is still installed).- Switch on 1st spindle / spindle group with clockwise rotation.

Page 216: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxAcc, AAC

4-20 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.16 Change Maximum Axis Acceleration AxAcc, AACSave Maximum Axis Acceleration AxAccSave, AAS

EffectD AxAcc:

temporarily changed the upper limits of the axis accelerations.The function overrides the maximum axis acceleration values fromthe machine parameters with the programmed values.

D AxAccSave:saves the current maximum acceleration values of all axes to an inter-nal memory. This internal memory is preinitialized with the values from the ma-chine parameters whenever the program is selected.

ProgrammingSyntax:

AxAccSave

Abbreviation: AAS

Temporarily buffers the current maximum ac-celeration values.

AxAcc(<Values>) Change the maximum axis accelerations.

AxAcc orAxAcc(1)

Reactivate axis accelerations that were sa-ved earlier using ”AxAccSave”.

AxAcc() orAxAcc(0)

Reactivate axis accelerations from the ma-chine parameters.

Abbreviation: AAC(..)

where:<Values> Axis name and acceleration value.

Entries for several axes are separated by commas.Depending on the active measuring unit (G71/G70), thecontrol interprets the programmed data as ”1000 inch/s2” or”m/s2”.

Special features and restrictions:D If both a physical and a logical axis of the active channel exist under

the same name in the system, the acceleration of the logical axis isalways influenced .

Page 217: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxAcc, AAC

Electric Drivesand Controls

4-21Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example: Starting situation: The value of 8.0 m/s2 is preassigned to axes X throughZ in the machine parameters.:N40 AAC(X1.0,Z2.1):::

Max. acceleration for X-axis: 1.0 m/s2,Max. acceleration for Z-axis: 2.1 m/s2.The max. acceleration of the Y-axis is unchan-ged (8.0 m/s2).

N80 AxAccSave:

Temporarily buffer all currently active maximumacceleration values.

N90 AxAcc()::::

Reactivate the values from the machine para-meters:Max. acceleration for X-axis: 8.0 m/s2

Max. acceleration for Y-axis: 8.0 m/s2

Max. acceleration for Z-axis: 8.0 m/s2

N150 AxAcc(Y5)::

Max. acceleration for Y-axis: 5.0 m/s2.The max. accelerations of the X- and Z-axis areunchanged .

N200 AxAcc::

Reactivate the values saved using ”AxAc-cSave”:Max. acceleration for X-axis: 1.0 m/s2

Max. acceleration for Y-axis: 8.0 m/s2

Max. acceleration for Z-axis: 2.1 m/s2

Page 218: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxCouple, AXC

4-22 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.17 Axis Coupling AxCouple, AXC

EffectAxis coupling is used to create a specific relationship between the move-ment of a synchronous ”master axis” and one or more (max. 7) synchro-nous ”slave axes”.

If the slave axes are not in coupling position when coupling is activated,they are moved to this position by means of an internally generated li-near traversing movement. Here, the active path feed rate and the over-ride potentiometer.

If the master axis traverses, all the slave axes move automatically accor-ding to their own defined relationship to the master axis. The combina-tion of the master and all participating slave axes is also called a ”groupof coupled axes”.

Possible relationships between the master and a slave axis:D The command positions of the master axis are transformed using a

constant offset to the corresponding command positions of theslave axis (see formula 1). This can be used to offset the slave axis by any constant path in thepositive or negative traversing direction compared to the master axis.

D The command positions of the master axis are transformed using aconstant coupling factor to the corresponding command positionsof the slave axis (see formula 1).This can be used to move the slave axis in a certain relationship com-pared to the master axis.

D The command positions of the master axis are transformed using a(coupling) table to any corresponding command positions of theslave axis. Here, support points that provide the corresponding slaveaxis position for a master axis position and – if required – a masteraxis offset are stored in the table (see formula 2). The control can determine positions between individual supportpoints using linear interpolation or with the cubic spline function.

Formula 1 (for linear coupling):

Formula 2 (for any coupling):

ps = f (p - p ) * k + o omm

Master axis offsetCoupling factorOffset

Coupling function (in coupling table format)

ps = pm * k + o

Coupling factorOffset

Page 219: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxCouple, AXC

Electric Drivesand Controls

4-23Bosch Rexroth AGIndraMotion MTXR911314869 / 01

All listed relationships can be combined in any way.In this way, parallel axes (e.g. for machining tables arranged in parallel)as well as electronic gears (e.g. 1 rotation of the master axis = 10 rota-tions of the slave axis) can be implemented very easily.

The following applies:D All axes belonging to a group of coupled axes must be in the same

channel.D Several groups of coupled axes within a channel are permitted.

. For detailed information about the ”Axis coupling” function, seethe ”Description of Functions”.You can also find information about the coupling table required for”any couplings” there.

ProgrammingSyntax:

AxCouple(<M><Variant>,<S>(<SO>,<SF>,<MO>,<Tab>),...)

AxCouple() orAxCouple(0)

Clear all the groups of coupledaxes in the current channel.

Abbreviation: AXC(..)

where:<M> Logical address of the master axis.<Variant> 0 Generate a new group of coupled axes

1 Change a group of coupled axes(add new slave axes or change a coupling-designation)

-1 Delete slave axis or completely cancel group of cou-pled axes

<S> Logical address of the slave axis.If <S> cannot be differentiated from the programming ofan axis/coordinate with a value, an equals signs muststand between <S> and ”(”: (..,<S>=(..))Also see the following example.

<SO> Offset of the slave axis.If this is not programmed, <SO> = 0.

<SF> Coupling factor of the slave axis. If this is not programmed, <SF> = 1.

<MO> Master axis offset.Relevant only for ”any coupling” (see formula 2 above). Ifthis is not programmed, <MO> = 0.

<Tab> Name of the coupling table of the corresponding slaveaxis. Relevant only for ”any coupling” (see formula 2above).

Page 220: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxCouple, AXC

4-24 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples:N100 AXC(Z0,A(4,2),B(2,1))

:::

Generate a group of coupledaxes.Z: master axis,A/B: slave axes.Both slave axes run with ”li-near” coupling.

N200 AXC(X0,A(4,2),B(,0.5,,T_B))

::

Generate a group of coupledaxes.X: master axis,A/B: slave axes.Slave axis A runs with ”linear”coupling, slave axis B with”any” coupling.

:N100 AXC(Z-1,A(),B()):

Slave axes A and B are deletedfrom the Z group of coupledaxes.

N200 AXC(Z-1):

The entire Z group of coupledaxes is deleted.

Another example:Master axis X slave axis Y2Slave axis has the ambiguous axis name Y2 which does not differ fromprogramming the Y axis with the value 2. The programming of AXC mustbe as follows:

AXC(X,Y2=(....))

CAUTIONThe function triggers a traversing movement of all the slave axesprogrammed in this block!They traverse to their specific coupling position (reference value)defined by the position of the master axis and the coupling charac-teristics.

Special features and restrictions:D All axes participating in a group of coupled axes must be synchronous

axes, at least during the axis coupling.Asynchronous axes or Hirth axes are not permitted.

D Programming a traversing motion of slave axes is not permitted; thisleads to an error message.

D A slave axis cannot simultaneously be a master axis in another groupof coupled axes.

D The end of program does not automatically disband a group of cou-pled axes.

D If the master axis is a modulo axis, the slave must also be a moduloaxis in the case of a linear coupling relationship.

D To allow axis-by-axis traversing to the reference point, the group ofcoupled axes must be opened.

Page 221: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxCouple, AXC

Electric Drivesand Controls

4-25Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D The permitted traversing range of the master axis can be reduced bycoupled slave axes, (e.g. if the slave axis attains its end ranges morequickly than the master axis or if the traversing range of the slave axisis less than that of the master axis).

D If limit switches have been suppressed for the master and/or slaveaxis, no limit switches are effective for the entire group of coupledaxes.

D The maximum dynamics of the ”weakest” axis determines the maxi-mum dynamics of the entire group of coupled axes.

D Locking axes when a group of coupled axes is active is prohibited.D Axes coupled in test mode must be uncoupled before test mode is

switched off.

Page 222: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxisToSpindle, ATS

4-26 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.18 Switch off C-Axis Mode for Spindles AxisToSpindle, ATS

EffectSwitches a spindle that is in C-axis mode (see page 4-153) to spindlemode.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

AxisToSpindle(<PAN> | <PAI>,<PAN> | <PAI>...)

Abbreviation: ATS(..)

where:<PAN> Physical axis name.

Specifies the spindle that is to be switched from C-axismode back to spindle mode.

<PAI> Physical axis index.Same effect as <PAN>.

Special features and restrictions:D A given axis must be at a standstill and must not belong to an axis

group. If this is not the case, the control generates an error message and ter-minates the program.

D Axis positions in the same block must always be programmed accor-ding to the expression AxisToSpindle(...).

Example::N030 ATS(CH):

The physical axis CH (i.e. the spindle withthe name CH during axis operation) is swit-ched to spindle operation.

Page 223: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxVel

Electric Drivesand Controls

4-27Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.19 Change Maximum Axis Velocity AxVel (AVE)Save Maximum Axis Velocity AxVelSave (AVS)

EffectAxVel:This temporarily changes the upper limits of the axis velocities. The func-tion overrides the maximum axis velocities values from the machine pa-rameters with the programmed values.AxVelSave:saves the current maximum velocities values of all axes to an internalmemory. This internal memory is preinitialized with the values from themachine parameters whenever the program is selected.

ProgrammingAxVelSave Saves the current maximum axis velocity va-

lues.

Abbreviation: AVS

AxVel(<Value>) Change maximum axis velocity.AxVel() or AxVel(0) Re-activate maximum axis velocity from the

machine parameter.AxVel(1) Activate maximum axis velocities saved by Ax-

VelSave.AxVelSave Saves the current maximum axis velocity va-

lues.

Abbreviation: AVS (..)

where:<Values> Axis name and velocity value.

Entries for several axes are separated by commas.

Depending on the active measuring unit (G71/G70), the control inter-prets the programmed data for linear axis as ”Inch/min” or ”mm/min”. Ro-tary axes are always specified in ”1000 degree/min”.

Page 224: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions AxVel

4-28 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:Starting situation: The value of 50000 mm/s is preassigned to axes Xthrough Z in the machine parameters.:N40 AVE(X10000,Z30000) max. velocity X axis: 10000.0 mm/s,

max. velocity Z axis: 30000.0 mm/min.The max. velocity of the Y axis remains un-changed (50000.0 mm/min).

:N80 AVS Temporarily buffer all currently active maxi-

mum velocity values.:N90 AVE() Reactivate the values from the machine pa-

rameters.:N200 AVE Reactivate the values saved using ”AVS/Ax-

VelSave”:max. velocity X axis: 10000.0 mm/s,max. velocity Z axis: 30000.0 mm/min.max. velocity Y axis: 50000.0 mm/min.

:

Page 225: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions BcsCorr, BCR

Electric Drivesand Controls

4-29Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.20 Placement: BcsCorr, BCRWorkpiece Position Compensation

EffectUsed as a spanning compensator.Placement ”Workpiece position compensation” can shift and orientatethe workpiece coordinate system anywhere in space. Workpiece posi-tion compensation has an effect on the coordinates with the meanings”x”, ”y” and ”z” in the corresponding channel .The set-up effort is significantly reduced because the workpiece posi-tion is measured after spanning and taken into account using workpieceposition compensation.Since there are 3 degrees of freedom for orientation, every orientationcan be represented by 3 consecutive basic rotations. For the sake of re-adability, the following figure shows only the basic rotation around theZ-coordinate:

BCS

WCS

Y’ X’

Zero offsetwith coordinate rotation

D X

D Y

YB

XB

Angle1

. Placement ”Inclined plane” (see page 3-81) is functionally identi-cal. A representation of all 3 basic rotations can also be foundthere.

Additional placements (e.g. Inclined plane) have an additive effect.Workpiece position compensation is located before Inclined plane in the”chain of calculation”:

+ZB+YB

BCS +XB

+ZW1

+YW1

+XW1

BCS: Basic workpiece coordinate systemWCS1:Workpiece coordinate system, generated by ”workpiece position

compensation”WCS2:Workpiece coordinate system, generated by ”Inclined plane”

WCS1

+ZW2

+YW2

+XW2

WCS2

Page 226: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions BcsCorr, BCR

4-30 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ProgrammingSyntax:BcsCorr(<XW-Offset>,<YW-Off-set>,<ZW-Offset>,<Angle1>,<Angle2>,<Angle3>)

Workpiece positioncompensation ON.

BcsCorr() orBcsCorr(0)

Workpiece positioncompensation OFF.

Abbreviation: BCR(..)

where:<XW-Offset>: Offset value in main coordinate direction<YW-Offset>: Offset value in secondary coordinate direction<ZW-Offset>: Offset value in normal coordinate direction<Angle1>: Angle of rotation around the Z-coordinate.

Value range: 0 ≤ <Angle1> < 360 degrees<Angle2>: Angle of rotation around the Y’-coordinate.

Value range: 0 ≤ <Angle2> < 180 degrees<Angle3>: Angle of rotation around the Z’’-coordinate.

Value range: 0 ≤ <Angle3> < 360 degrees

Example:N70 G40 Cutter path compensation OFF.N80 BCR(50,300,10,1.23)::::::::

Workpiece position compensation ON.The zero point of the new workpiececoordinate system lies on X50 Y300 andZ10 in the BCS. In terms of the BCS, theX- and Y-coordinate axes of the newworkpiece coordinate systems arerotated counterclockwise by 1.23degrees around the new Z-coordinateaxis.

N200 BCR() Workpiece position compensation OFF.

Special features and restrictions:D Activating and deactivating workpiece position compensation inter-

rupts block look-ahead; therefore, it may not be programmed whencutter path compensation is active (G41/G42, see page 3-39).

D The power-up status and the behavior in case of a control reset areconfigured in machine parameters 7060 00010 and 7060 00020.

Page 227: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

ChLength, CHLChSection, CHSNC-Functions

Electric Drivesand Controls

4-31Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.21 Chamfer Programming ChLength, CHLChSection, CHS

EffectThe function ”Chamfer programming” inserts a transition phase betweentwo consecutive NC blocks of the type straight line or circle, the length ofwhich can be specified as absolute chamfer length or as length of thechamfer segment. The chamfer is generated within the active workingplane.

The following chamfer transitions are possible.D Chamfer between two abutting straight lines

The chamfer runs at a right angle to the bisector between neighboringpath segments. The length of the chamfer is automatically corrected(reduced) when there is no intersection with the neighboring pro-grammed path segments.

Chamfer length

Bisector of the angle

Straight lineStraight line

Chamfer segment

D Chamfer between two abutting circle segmentsIn case of contour transitions involving circle segments, the dimen-sions of the chamfers refer to the respective end or starting tangent ofthe path segments involved in the contour transition. The actual resul-ting chamfer length is strongly dependent on, among other things, theradii of the circles involved and thus deviates more or less from theprogrammed dimensions.

Chamfer length

Bisector of the angle

Circle segment 2

Tangent line 1

Tangent line 2

Circle segment 1

Chamfer segment

Page 228: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ChLength, CHLChSection, CHS

4-32 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ProgrammingSyntax:

ChLength(<Chamfer length>) ”Chamfer programming” ON.Preassign the desired <chamferlength> in the unit mm (G71) or Inch(G70).

ChLength() orChLength(0)

”Chamfer programming” OFF.

Abbreviation: CHL(..)

ChSection(<Chamfer section>) ”Chamfer programming” ON.Preassign the desired <chamfersection> in the unit mm (G71) or Inch(G70).

ChSection() orChSection(0)

”Chamfer programming” OFF.

Abbreviation: CHS(..)

Special features and restrictions:D Functions ”ChLength”, ”ChSection”, ”RoundEps” and ”Rounding” act

modally and cancel each other.D The chamfer exclusively refers to the active working plane (G17,

G18, G19, G20). If additional axes are involved in the movement, thechamfers are not influenced by this. Since the coordinates of the programmed traversing blocks of theaxes within the working plane are manipulated by the chamfers, butthe values for the axes outside the working plane remain unchanged,the direction of straight lines in space may change, for example.

D The function is effective only in the ”Execute” operating mode under”Automatic”, ”Single block” and ”Single step”. Since ”Program block” behaves like manual input, chamfer program-ming is not effective here.

D The switch on/off procedure as well as the behavior upon a controlreset is determined by the init strings in machine parameters7060 00010 and 7060 00020 .

D If the plane, a zero offset, or an axis transformation is switched bet-ween 2 subsequent blocks, no chamfer is generated.

Page 229: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Collision, CLNNC-Functions

Electric Drivesand Controls

4-33Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.22 Collision Monitor Collision, CLN

EffectAllows collision monitoring of cutter path compensation G41/G42 to beD switched on or off andD adapted to the application in terms of the look-ahead range and the

behavior in case of a collision.

The following applies:D The collision monitor has an effect only if cutter path compensation

G41/G42 is active, even if the compensation radius has a value of ”0”.D If the current radius compensation value does not permit machining

of individual contour elements, the control will try to modify the relatedpath so as to avoid damage to the contour.

D During the course of the contour, the collision monitor takes only thecoordinates of the active working plane into account. If collisions areprevented using the program, e.g. by changing the tool feed depth,the collision monitor is nevertheless activated within the current look-ahead range.In such cases, the collision monitor can be temporarily switched off inthe affected machining section.

. For detailed information about the ”Collision monitor” function,see the ”Description of Functions”.

. We recommend that the desired power-up behavior of the collisionmonitor be entered in MP 7060 00010 / MP 7060 00020.

ProgrammingSyntax:Collision(1) Collision monitoring ON.

Retain the current behavior in thecase of a collision.If the behavior has not been pro-grammed or entered inMP 7060 00010/MP 7060 00020 un-til now, the behavior corresponds tothat of Collision(CollErr 0).

Collision() orCollision(0)

Collision monitoring OFF.

Collision(DEF) Specify the preset for the look-ahead range of the collision monitorto 2 blocks.

Page 230: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Collision, CLN

4-34 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Collision(CollErr <Type>)

Activate the collision monitor andspecify the behavior in the case of acollision.

Collision(DLA <Blocks>) Specify the preset for the look-ahead range of the collision monitor.

Goes into effect the next time thatG41/G42 is programmed.

Collision(LA <Blocks>) Temporarily change the look-aheadrange until the next time thatG41/G42 is programmed.

Abbreviation: CLN(...)

where:<Type> Specifies the behavior of the control when a collision is

detected:0: neither a runtime error nor warnings are issued.

Machining is not terminated but contour loops areleft out.

1: run-time error is issued. Machining is terminated.

2: warning is issued.Machining is not terminated.

<Blocks> Specifies the size (number of blocks) of the look-aheadrange. Integer value. Recommended look-ahead range: 1 to 10 blocks.

Special features and restrictions:D The preset for the look-ahead range is 2 blocks.

D The maximum possible look-ahead range depends on machine pa-rameters 7060 00110 to 7060 00130.

D In order to be able to traverse backwards without triggering the colli-sion monitor when cutter path compensation has been activated forthe contour, the active compensation direction must be replaced star-ting at the point of reversal (G42 is programmed when G41 is activeand G41 is programmed when G42 is active).The control thus automatically terminates the look-ahead range ofthe collision monitor in a G41 or G42 block and restarts look-aheadimmediately thereafter.

Page 231: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Collision, CLNNC-Functions

Electric Drivesand Controls

4-35Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example::N100 CLN(DLA 5)::

Preset for the look-ahead range of the collisionmonitor starting at the next G41/G42: 5 blocks.

N110 G41 D10 Cutter path compensation to left of workpiece.N120 X10 Traverse forwards.N130 X20N140 X30N150 G42:::

Switch to cutter path compensation to right ofworkpiece The look-ahead of the collision mo-nitor is terminated as of block 150 and then re-started.

N160 X20 Traverse backwards.N170 X10N180 X0N190 G40:

Cutter path compensation OFF. The collisionmonitor thus becomes inactive, but it is notdeactivated!

Page 232: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Coord, CRD

4-36 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.23 Select Axis Transformation Coord, CRD

EffectActivates or deactivates axis transformations that are configured in ma-chine parameter group 1030.

. The function is required, for example, together with spatial coordi-nate programming (see the ”Description of Functions”) or possiblywhen calibrating axis kinematics (see pages 4-15, 4-17 and 4-14).

An axis transformation may be in effect at a maximum of 2 points of ac-tion:

ACS: Axis coordinate system

MCS: Machine coordinate system

LCS: Local machine coordinate system

BCS: Basic coordinate system

WCS: Workpiece coordinate system

Axis transformation on point of action 1(e.g. for rod kinematics for transformation in a Cartesiancoordinate system)

(e.g. for zero offsets)

(e.g. for coordinate transformations such as planerotation or workpiece position compensation)

Axis transformation on point of action 2(e.g. for 5-axis transformation)

. For every available axis transformation, it has already been inter-nally specified on which point of action this transformation takeseffect.

Page 233: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Coord, CRD

Electric Drivesand Controls

4-37Bosch Rexroth AGIndraMotion MTXR911314869 / 01

ProgrammingSyntax:Coord(<AxTransfNo>) Axis transformation ON

Coord() orCoord(0)

Axis transformation on point ofaction 2 OFF

Coord(0,<Point of action>) Axis transformation on theselected point of action OFF

Abbreviation: CRD(...)

where:<AxTransfNo> Number of the axis transformation.

Input range: 1 - 20. Integer.

<Point of ac-tion>

Points of action of the axis transformation to beswitched off.Input:1 or 2

Special features and restrictions:D It is possible to switch directly between different axis transformations

on point of action 2. It is not necessary to deactivate it beforehand!D An axis transformation on point of action 1 may be activated only if no

axis transformation is active on point of action 2.

. The assignment between the axis transformation type and thenumber of the axis transformation is specified in MP 1030 00110. For detailed information about the available axis transformations,see the ”Description of Functions”.

Page 234: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions CoupleSplineTab, CST

4-38 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.24 Spline-Axis Coupling Table CoupleSplineTab, CST

EffectIn an axis coupling, the coupling function is stored in the form of supportpoint pairs in a coupling table. To calculate the positions of the slave axisbetween support points, block preparation generates a spline table.Spline tables are created when the coupling syntax is being interpreted.They are stored as a file in the link table directory.

Spline tables are created automatically. CoupleSplineTab(...) can beused to also create a spline table in defined form:D CST(STAB(<TabName>,1)) explicitly forces the creation of the spline

table.D CST(STAB(<TabName>,0)) forces the creation if no spline table exi-

sts or if it is older than the coupling table.

With CoupleSplineTab(...) , you can create a spline table even without anexisting group of coupled axes (e.g. in Manual Data Input mode).

The name of the spline table is generated from the name of the currentlyactive coupling table by attaching the extension ”.s”; for example, if thename of the coupling table is curve.fct, the name of the spline table be-comes curve.fct.s.

. The coupling table is searched in the current search path. Thesearch path is set in machine parameter 3080 00001.The default link table directory is /usr/lnk. However, it may also befreely defined using machine parameter 3080 00004.

ProgrammingSyntax:CoupleSplineTab(STAB(<TabName>,<1|0>)) Create a spline

table

Abbreviation: CST(...)

where:<TabName> Name of the coupling table that is searched in the cur-

rent search path and for which a spline table is crea-ted.

<1|0> Optional:0: The spline table is not created, unless it does not exist or is older than the coupling table

(default).1: A new spline table is created.

Example:CST(STAB(curve.fct)) Creates spline table /<Link directory>/cur-

ve.fct.s, if requiredCST(STAB(curve.fct,1)) Creates the /<Link directory>/curve.fct.s

spline table irrespective of the date andwhether or not the spline table already exists

Page 235: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions DcTSel, DCS

Electric Drivesand Controls

4-39Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.25 Activate D-Correction Tables DcTSel, DCS

EffectActivates a D-correction table (geometry correction table, GEO table).D-correction tables are stored as XML files in the file system of the con-trol.

ProgrammingSyntax:

DcTSel(<Path><Filename>)

Abbreviation: DCS(..)

where:<Path> Optional path information for the directory in which <File-

name> is stored.If there is no information, the file will be searched in the ”/da-tabase” directory. If <Filename> is not present there, the control uses the searchpath for subroutines so that the search for <Filename> canalso be carried out in other directories.

<Filename> File name of the D-correction table, incl. the file exten-sion.Tables with standard names (DC<Number>.dct) can beactivated directly using the number, e.g. DcTSel(7) activates table DC7.dct.

. Please refer to the Operating Instructions for how to create and editD-correction tables.

Example::N030 DCS(geotab.dct):

First searches for D-correction table ”geo-tab.dct” in directory ”/database” and then, ifit is not there, in the search path for subrou-tines. The first D-correction table with thename ”geotab.dct” that is found is activated.

N130 DCS(/mnt/ge.dct):

Searches and activates D-correction table”ge.dct” in directory ”/mnt”. If it is not foundthere, an error message appears.

Page 236: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions DefAxis, DAX DefSpindle, DSP

4-40 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.26 Transfer Axis Setting from MP DefAxis, DAX

EffectCross-channel activation of the default axis configuration according toMP 1003 00002.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

DefAxis

Abbreviation: DAX

Special features and restrictions:D If a participating axis that is to be transferred has not been released

yet, this will cause a runtime error.

. Since it often happens that several channels take part in the axistransfer, we recommend that the function in MP 7060 00020 be ent-ered behind key word ”#SysRes”. In this way, the default axis configuration can always be regenera-ted together with the system reset.

4.27 Reset Channel Spindles to MP DefSpindle, DSP

EffectActivates the default spindle setting in accordance with MP 7020 00020.

ProgrammingDefSpindle

Abbreviation: DSP

Page 237: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions DefTangTrans, DTT

Electric Drivesand Controls

4-41Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.28 Block Transition without DecelerationDefTangTrans, DTT

EffectThe function ”Block transition without deceleration” limits the impact ofthe maximum step change on wide transition angles. By proper parame-terisation, the behavior can be defined so as to take major knees in thecontour into account in detail, whereas quasi continuous contour transi-tions are rounded and thus smoothed due to the higher machiningspeed. This can result in a real machine to a slurring of the programmedcontour.

ProgrammingSyntax:

DefTangTrans (<Angle>)

Abbreviation: DTT (<Angle>)

where:<Angle> Ifthe change of the share of an axis in the standardi-

zed direction vector is greater than sin(<angle>) at thecontour transition, the maximum step change for thecontour transition in question is taken into considera-tion. In case of changes smaller than sin(<angle>), themaximum step change is ignored and no decelerationtakes place at the contour transition (provided that thebrake path available in the scope of the set block look-ahead is sufficient).Range of values: 0 to 50 degrees.

DefTangTrans(0)

The limit angle entered in machine parameter 703000310 takes effect.

Special features and restrictions:D When precise stop is active, the velocity at each block transition is de-

celerated to v = 0.D After reset, the setting from the startup string becomes effective.D When the DefTangTrans funciton is used, always consider the velo-

city at which the system is to traverse. As the limit values configuredwithin the machine parameter are temporarily ignored, servo errorsmay occur above all with high velocities and great transition angles!

Page 238: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions DiaProg, DIA RadProg, RAD

4-42 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.29 Diameter Programming DiaProg, DIARadius Programming RadProg, RAD

EffectCoordinate information for flat axes (on lathes; usually X-coordinates)can alternatively be interpreted as a diameter or radius. In this way, anydimensional information that may exist can be transferred directly to theparts program without conversion.If ”Diameter programming” is activated, the diameter symbol is placed infront of the axis displays of the flat axis for the workpiece position, di-stance to go, end position and program value.The machine position, actual axis value and coasting are always dis-played as radius values.

CAUTIONImproper interpretation of dimension information possible!”DIA” affects only the entered/configured diameter coordinates.Diameter programming has no influence on circular interpolationparameters I, J, K.Always ensure that only suitable dimension information is pro-grammed.

ProgrammingSyntax:DIA(<Coord1>,...,<Coord8>) Diameter programming for

up to 8 linearaxes/coordinates ON.Diameter programming isswitched off for allcoordinates that are notentered.

where:<Coordi> Max. 8 linear axes/coordinates (i = 1 - 8) whose di-

stances are to be evaluated as diameter information.

DIA Restores the last RAD status. After the controlpowers up, the default values of the machine para-meters apply.

DIA() The default values are activated. If no diametercoordinates are defined in the machine parameters,an axis of classification X becomes a diameter axis.If this also does not exist, the control reports a run-time error.

RAD Radius programming for all coordinates ON.

Special features and restrictions:D The functions are modal and deselect each other mutually.

Page 239: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions DiaProg, DIA RadProg, RAD

Electric Drivesand Controls

4-43Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D If a diameter coordinate is incorporated in an axis transformation, theNC switches off diameter programming for this axis. However, if axistransformation is switched on, coordinates can be switched to diame-ter programming.

D The following applies for the ”Manual data input” and ”Automatic”operating modes:In the case of dimension information for circle center coordinates, toollengths and zero offsets, coordinates of the flat axis are always inter-preted as the radius value.

D The following applies for the ”Handwheel” and ”Jog” operating mo-des:Axis interface signal ”Diameter incr. step” (qAx_JogDia) can be usedto switch between diameter and radius programming.

Example:N10 DIA() Switch on configured diameter coordinates.

N20 DIA(Y1,W2) The given coordinates Y1 and W1 becomediameter coordinates and all unprogrammedcoordinates become radius coordinates.

N30 RAD Diameter programming is switched off for allcoordinates.

N40 DIA:

Coordinates Y1 and W1 become diametercoordinates (last RAD status).

Page 240: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions DistCtrl, DCR

4-44 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.30 Axis Distance Control for Digitizing DistCtrl, DCR

EffectThis function keeps the distance between the surface scanned and themeasuring device (e.g. laser) constant during digitizing. This is to ensurethat the available working range of the measuring device is not excee-ded.

. For detailed information about this function, see the ”Descriptionof Functions”.

ProgrammingSyntax:DistCtrl(1) orDistCtrl

Starts distance control and takes on the currentdistance between the surface and the measuringdevice as the reference value. The configuration data defined using machineparameter 7050 007xx are effective.

DistCtrl() orDistCtrl(0)

Deactivates axis distance control, stores the cur-rent correction value and stops axis movement.If this is programmed in the same block as a tra-versing movement, axis distance control will notbe turned off before the movement has beencompleted.

DistCtrl(<Fct>) Suppresses certain function-specific configura-tion data in the machine parameters.

Abbreviation: DCR(...)

where:<Fct> DcAxis(<Axis>,<Corr>)

Overrides MP 7050 00702.Abbreviation: DCA(...)<Axis> Name or number of the channel axis for which

axis distance control is to be activated.<Corr> Direction of movement in which the correction

values are to be included in the calculation:+1 or 1: in the positive direction of movement -1: in the negative direction of movement

DcFilter(<Time>) Overrides MP 7050 00730.Abbreviation: DCF(...)<Time> Filter parameter to smooth the sensor values.

0: Filter off>0: Filter on, smoothing time in ms

Page 241: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions DistCtrl, DCR

Electric Drivesand Controls

4-45Bosch Rexroth AGIndraMotion MTXR911314869 / 01

DcLimit(<Speed>,<Accel>) Overrides MP 7050 00740 / MP 7050 00741.Abbreviation: DCL(...)<Speed> Maximum modification speed of the correction

value. Overrides MP 7050 00740.Value input, depending on active unit of mea-surement (G71,G70), in the unit mm/min or inch/min.

<Accel> Maximum steepness (acceleration) of thecorrection value. Overrides MP 7050 00741.Value input, depending on active unit of mea-surement (G71,G70), in the unit m/s2 or 1000inch/s2.

DcMon(<Collision>,<Hole>) Overrides MP 7050 00750 / MP 7050 00751.Abbreviation: DCM(...)<Collision> Range of tolerance for collision detection.

Overrides MP 7050 00750.Value input, depending on active unit of mea-surement (G71,G70), in the unit mm or inch.0: Collision detection off.

<Hole> Range of tolerance for hole detection. Overrides MP 7050 00751.Value input, depending on active unit of mea-surement (G71,G70), in the unit mm or inch.0: Hole detection off.

DcBreak Interrupts axis distance control. The current cor-rection value remains active.

Abbreviation: DCB

DcCont Resumes axis distance control after an interrup-tion using DCB. The NC controls the deviationfrom the reference value as fast as possible.

Abbreviation: DCC

Page 242: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions EndPosCouple, EPC

4-46 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.31 End Position Coupling EndPosCouple, EPC

EffectCouples two currently synchronous coordinates within a channel accor-ding to the following relationship:D ∆ slave coordinate = coupling factor * ∆ master coordinate.

To calculate the resulting slave coordinate, the position values of the ma-ster coordinates are always automatically converted into incrementalpaths.

The control uses the relationship above to calculate the required end po-sition of the slave coordinate for every NC block in which a position valueof the master coordinate is programmed. The slave coordinate behaves – based on other NC functions – as if itsworking path in the parts program has been written especially for it usinglocal relative dimension programming (IC). This means, for example,that the current feedrate affects the resulting path movement.

ProgrammingSyntax:

EndPosCouple(<M-coord>,<S-coord>,<Factor>)

End position coupling ON.

EndPosCouple() orEndPosCouple(0)

End position coupling OFF.

Abbreviation: EPC(...)

where:<M-coord> Name of the master coordinate.<S-coord> Name of the slave coordinate.<Factor> Relationship between slave working path and master

working path.

Special features and restrictions:D End position coupling cannot be used together with endless coordi-

nates (coordinates whose values are automatically transformed intothe defined range of values when they exceed their range limits).

D Polar coordinate programming is not permitted if end position cou-pling is activated.

D Master and slave coordinates may not be programmed together inone NC block if end position coupling is active. However, program-ming only slave coordinates in an NC block is permitted.

D Neither the master nor the slave coordinate may exit the channel ifend position coupling is active. An axis exchange and changes to theactive axis transformation are not permitted.

D Even if diameter programming is switched on for the master coordi-nate (see page 4-42), the corresponding radius value is used for thecoupling.

Page 243: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions EndPosCouple, EPC

Electric Drivesand Controls

4-47Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:N10 G18 G0 Z0 Active plane: z,x. Using rapid traverse to

z=0.

N20 G1 F1000 Z3 X1 Positioning to P1.

N30 EPC(Z,X,1)::

End position coupling ON. Master coordinate: Z; slave coordinate: XSlave working path = master working path.

N40 Z4 Positioning to P2.

N50 X1 Positioning to P3.

N60 Z5 Positioning to P4.

N70 X3 Positioning to P5.

N80 Z0 Positioning to P6.

N90 EPC():

End position coupling OFF.

+X

+Z

10

2010 30 40

P2

P1

PCS

20

30

-10

-20

50

P4

P3

P5

P6

Page 244: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FeedAd, FAD

4-48 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.32 Feedrate Computing: Hide Axes FeedAd, FAD

EffectRemoves all the axes that are defined in MP 1003 00020 from feedratecomputing. The removed axes are then moved synchronously.As a result, the real path velocity can increase in comparison with theprogrammed F-value.

ProgrammingSyntax:FeedAd(1) orFeedAd

Removes axes from feedrate com-puting

FeedAd(0) orFeedAd()

Take axes into account during fee-drate computing

Abbreviation: FAD(..)

Special features and restrictions:D If only axes that are hidden for feedrate computing are to be moved in

a block, their feedrate can be set using address ”Omega” instead ofaddress ”F” (see page 3-96).

Example: (The Y-axis is entered in MP 1003 00020):N100 G94 G0 X0 Y0 Positioning on P(0;0) in rapid traverse.N110 FeedAd()N120 X100 Y100 F100::

Positioning on P(100;100).Progr. path velocity: 100 mm/minReal path velocity: 100 mm/min

N150 FeedAdN160 X200 Y200 F100::

Positioning on P(200;200).Progr. path velocity: 100 mm/minReal path velocity: 141.42 mm/min

Page 245: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FeedForward, FFW

Electric Drivesand Controls

4-49Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.33 Feed Forward Control FeedForward, FFW

EffectThis function reduces system-caused coasting by appropriately correc-ting the command interpolator values in the drive. The result is an increa-sed contour accuracy or ”operation without following errors”.

. The ”Feed forward control” function is integrated in the drive ac-cording to the manufacturer’s specifications and is only activated/deactivated by the displayed command syntax of the partsprogram. For a detailed description of the ”Feed forward control” function,please refer to the drive documentation.

. The possibility for activating the feed forward control must havebeen released for the corresponding axes using machine parame-ter 1003 00009.

ProgrammingSyntax:FeedForward(1)orFeedForward

Activate the feed forward controlfor all the axes releasedaccording to MP 1003 00009 (therelevant drives are switched tosecondary mode 1).

FeedForward(<Addr><Va-lue>,...)

Activate/deactivate the feedforward control for theprogrammed axes (effectdepends on <Value>).

FeedForward() orFeedForward(0)

Deactivate feed forward controlfor all axes. (All relevant drives are switchedto their primary modes.)

Abbreviation: FFW(..)

where:<Addr>: Physical or logical axis address.<Value>: Path information for <Addr>.

0: Deactivate feed forward control.not equal to 0: Activate feed forward control.

Example:N10 FFW:

Activate the feed forward control for all the axes ofthe channel released by MP 1003 00009.

N50 FFW(Z0):

Deactivate the feed forward control for Z (switch Zto primary mode).

N90 FFW()::

Deactivate the feed forward control for all the axesof the channel (switch to primary mode).

Page 246: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FeedForward, FFW

4-50 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Special features and restrictions:D When the feed forward control is deactivated, all the axes of the chan-

nel are switched to their primary modes.D The parameters of the feed forward control function can be set in the

drive only by writing the relevant drive parameters. ”WriteId” is available as a function for writing SERCOS parametersusing the parts program (see page 4-176).

Page 247: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FlyMeas, FME

Electric Drivesand Controls

4-51Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.34 Measurement on-the-fly FlyMeas, FME

EffectThe ”Measurement on-the-fly” function is used for accompanying mea-surement during machining. The traversing movement is not terminatedwhen the sensor is switched on.

The measured position is transferred from the drive to the NC. It can bequeried with CPL command PPOS.

ProgrammingSyntax:FlyMeas(MpiAxis<i>)<Axis coordinate> Start measuring cycle.

Abbreviation: FME(..)

where:<i>: Index of the physical axis that is to be used in the

measurement.<Axis coordinate>: Position that is to be approached during the

measuring procedure.

Special features and restrictions:D Before the first measurement, the sensor must be initialized using the

”InitMeas” function.D The function acts blockwise.D The function can be programmed together with all interpolation types

and works parallel to the active interpolation.D If the probe does not switch on, the NC waits at the end of the block

until a measuring event appears.D If the probe information is to be processed further in the subsequent

program blocks, pay attention to the block look-ahead. A WAIT mayhave to be programmed or the look-ahead may have to be limited byBlkNmb.

D The measuring position can be queried via PPOS.D The function can be used for linear endless axes if the programmed

positions have a positive sign. Backward traveling using the probe(programming of negative positions) will not provide unique values!

Page 248: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FlyMeas, FME

4-52 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example::N100 IME(MpiAxis 1):

N110 G0 X0 Y0

Initialize the probe logic of phy-sical axis 1 (here: X axis).

N120 FME(MpiAxis 1) G1 X10 Y10:

Start the measuring cycle andpositioning in feed at X10,Y10.

+Y

+X

Workpiece

10 20

10

20Continue to traverse tothe progr. End point

Probe is triggered.Current position (here:the X-axis) is saved.

Page 249: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FsProbe, FSP

Electric Drivesand Controls

4-53Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.35 Measuring at Fixed Stop FsProbe, FSP

EffectWhile the control traverses all the programmed synchronous axes usinglinear interpolation and the given feedrate to the programmed end point,the current torque is monitored for a selected axis.If the torque of this axis exceeds a configurable limit value during the mo-vement, the following actions occur in the control:D Setting the axis ”Fixed stop reached” IF signalD storing the actual positionD Braking of the path movement to v=0 with the maximum permitted de-

celerationD Clearing of the distance to goD Clearing of ”FsProbe” (effective block-by-block).

The control generates an error message if no ”fixed stop” has been re-ached at the end of the path (specified torque threshold is exceeded).

. ”FsProbe” should only be used in combination with a CPL programfor analysis.

Programming

Syntax:FsProbe(MfsAxis<i>) <Coordinates> <Feedrate>

”Measuring at fixed stop” ONfor axis <i> and traverse program-med coordinates with linear inter-polation.

FsProbe(MfsAxis(<i>,<threshold>)) <Coordinates> <Feedrate>

”Measuring at fixed stop” ONwith torque threshold for axis <i>and traverse programmed coordi-nates with linear interpolation.

Abbreviation: FSP(..)

where:<i> Index of the physical axis that is to be used in the

measurement.<Threshold> Torque threshold

Input value: in % of maximum torque. If <Threshold> is not programmed, machine parame-ter 1003 00031 (Fixed stop torque limit value) is effec-tive.

<Coordinate> Position that is to be approached during the measu-ring procedure.

<Feedrate>: Desired path feed.Limited by MP 1005 00030 (Maximum feedrate for”Move to fixed stop”) and MP 1005 00002 (Maximumaxis speed and rapid velocity).

Page 250: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FsProbe, FSP

4-54 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:N100 FSP(MfsAxis(1,30)) X100 F500 Activate ”Measurement at fi-

xed stop” for the first physicalaxis and approach positionX100 with F500. Set the tor-que threshold as 30% of themaximum torque.

110 IF SD(9)=0 THEN Query whether torque thres-hold was exceeded.

120 XPOS=PPOS(1)::

Save the position in the swit-ching torque of the 1st axis(X-axis) to the XPOS varia-ble.

N130 (MSG, CONTACT)140 GOTO N180150 ENDIFN160 (MSG, NO CONTACT)N170 M0 Program stopN180 ...

Special features and restrictions:D The following functions are not permitted in the ”FsProbe” block:

D G75 (Probe),D InitMeas/FlyMeas (Measurement on-the-fly),D RedTorque (Torque reduction)D FsMove/FsReset/FsTorque (Move to fixed stop).

D ”FsProbe” must be programmed together with at least one coordi-nate. Its value represents the maximum search depth which the ”fixedstop” must have reached at the latest.

D ”FsProbe” implicitly pauses the block preparation of the subsequentblocks. ”WAIT” therefore need not be programmed.

D Evaluation of whether the ”fixed stop” has been reached, continuationof program (after an error), safety monitoring, generation of errormessages, etc. must be implemented in the CPL program.

D SD(9) can be used to query whether the fixed stop was reached.D PPOS can be used to query the fixed stop position.

Page 251: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FsMove, FSM FsTorque, FST FsReset, FSR

Electric Drivesand Controls

4-55Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.36 Move to Fixed Stop FsMove, FSMFsTorque, FSTFsReset, FSR

. The Move to fixed stop function can also be used for asynchronousaxes!

EffectThe overall ”Move to fixed stop” function covers the following partialfunctions:1. ”Torque reduction fixed stop”: FsTorque, FST

Sets the maximum torque that the drive can have after switching on”Move to fixed stop”. If ”FsTorque” is not used, MP 1003 00031 is effective.

2. ”Move to fixed stop”: FsMove, FSMStart movement in the direction of the fixed stop, taking into accountthe maximum permitted torque.If the max. permitted torque is attained (see 1.) during this movement,the control triggers the following sequence of actions:D Outputting the axis ”Fixed stop reached” IF signal.D Braking of the path movement to v=0 with the maximum permitted

deceleration.D Setting the command position to:

actual position + 0.1 mm (or actual position + 0.1 degree).D Monitoring of the axis position for:

Position of fixed stop + MP 1003 00032 (”Monitoring window fixedstop in mm or degrees”)

D Stop the specified torque on the affected drive.D Continue processing of the parts program.The control generates an error message if no fixed stop has been re-ached at the programmed end of the path (specified torque thresholdis attained; see ”FsTorque”).

”FsMove” remains effective beyond the ”FsMove” block and is swit-ched off only by ”FsReset”.

3. ”Cancel fixed stop”: FsReset, FSRRelease the axes and, if necessary, traverse away from the fixedstop.D If synchronous and/or asynchronous axes have been program-

med in the ”FsReset” block, the control will traverse all axes at thespecified feedrate to the programmed end points. The maximumpermitted torque of the individual axes applies to the movementaway from the stop.

Page 252: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FsTorque, FSTFsMove, FSM

4-56 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

FsReset, FSR

D If no axes have been programmed in the ”FsReset” block, only thesynchronous axes will released. In this case, asynchronous axesfor which ”Move to fixed stop” is still active can only be released byinterface signal ”Cancel fixed stop”.

. If desired and if ”FsReset” (see 3.) is not yet programmed, an activetorque affecting the fixed stop can be changed later in the partsprogram using ”FsTorque” (see 1.).

Programming

Syntax:FsTorque(<Addr><Torque>) Activate the maximum permitted

torque<Torque> for axis <Adr>.Synchronous and asynchronousaxes are permitted.

Abbreviation: FST(..)

FsMove..<Coord-Syn> <Feedrate> <Coord-Asyn> <Feedrate-Asy>

Activate ”Move to fixed stop”.Move synchronous and asynchro-nous axes to the programmed endpositions.

Abbreviation: FSM..

FsReset..<Coord-Syn> <Feedrate> <Coord-Asyn> <Feedrate-Asy>

Switch off ”Move to fixed stop”.Move synchronous and asynchro-nous axes to the programmed endpositions.

Abbreviation: FSR..

where:<Addr>: Physical or logical axis address; asynchronous

axes are also possible.<Torque>: Maximum torque in % of the corresponding axis

standstill torque. Value range: 0 to 500%.<Coord-Syn>: Desired end point coordinates of synchronous

axes (e.g. ”X100 Y100 Z100”). Is traversed to bylinear interpolation of all axes involved, taking<Feedrate> and MP 1010 00030 (Maximumacceleration ”Move to fixed stop”) into account.

<Feedrate>: Desired path feed.Programming by F address, limited byMP 1005 00030 (Maximum feedrate ”Move to fi-xed stop”) and MP 1005 00002 (Maximum axisand rapid velocity).

Page 253: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions FsTorque, FSTFsMove, FSM FsReset, FSR

Electric Drivesand Controls

4-57Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Coord-Asy>: Desired end point coordinates of asynchronousaxes. The coordinates are traversed to, takinginto account <Feedrate-Asy> andMP 1010 00030 (Maximum acceleration ”Moveto fixed stop”).

<Feedrate-Asy>: Desired feedrate of asynchronous axes.Programming by ”FA” address, limited by MP1005 00030 (Maximum feedrate ”Move to fixedstop”) and MP 1005 00002 (Maximum axis andrapid velocity).

Example::N100 FST(X20) Limit the torque for the axis with designation

”X” to 20% of the axis standstill torque.N110 FSM X100 F200:::

Activate ”Move to fixed stop”. Start move-ment with a feedrate of 200 mm/min to posi-tion X=100. Continue processing of parts program.

N500 FSR:

Switch off ”Move to fixed stop” and releaseall synchronous axes.

Special features and restrictions:D The following functions are not permitted in the ”FsReset” block and

while ”Move to fixed stop” is active:D G75 (Probe)D InitMeas/FlyMeas (Measurement on-the-fly)D Torque reduction via PLC interfaceD FsProbe (Measuring at fixed stop).

D FsMove must be programmed together with at least one endpointcoordinate. Its value represents the maximum search depth whichthe ”fixed stop” must have reached at the latest.

Page 254: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions GetAxis, GAX

4-58 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.37 Integrate Axis GetAxis, GAX

EffectTransfers a synchronous axis to the calling channel. This turns an asyn-chronous axis into a synchronous axis.The axis can then be programmed in the current channel using its physi-cal or logical axis name.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

GetAxis(<PAN> | <PAI>,<LAN>,<PAN> | <PAI>,<LAN>...)

Abbreviation: GAX(..)

where:<PAN> Physical axis name.

Specifies the axis that is to be transferred to the currentchannel.

<PAI> Physical axis index.Same effect as <PAN>.

<LAN> Logical axis name.If this is programmed, the axis to be integrated into thecurrent channel receives the logical name <LAN>.<LAN> must have been defined in MP 7010 00010 (”Lo-gical axis designation”) or MP 7010 00020 (”Optionalaxis designation”).

Special features and restrictions:D An axis to be integrated must be at a standstill.

If this is not the case – as opposed to function ”WaitAxis” (see page4-175) – the control generates an error message and terminates theprogram.

D Axis positions in the same block must always be programmed afterGetAxis(...) and may be programmed only if axis transformation is notactive.

D Axes to be transferred must not be participating in any active monito-ring area (see page 4-2).

Example::N030 GAX(YP,,ZP,Z):

Physical axes YP and ZP are integrated inthe receiving channel.While YP is also addressed as YP in the cal-ling channel, ZP receives address Z in thecalling channel.

Page 255: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions GCT(1)

Electric Drivesand Controls

4-59Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.38 Straightness and Angle Error Compensation: Activate GCT(1)

EffectActivates the straightness and angle error compensation to compensatefor geometrical errors which are caused by inaccuracies of the mechanicsystem and cannot be recorded by the encoders.

. You can find extensive information regarding the use and parame-ter settings of ”Straigthness and angle error compensation” in the”Description of Functions”.

ProgrammingSyntax:

GCT(1) (alternatively: GCT, GeoComp(1), GEOCOMP(1))

Special features and restrictions:D The user saves the compensation files to an XML schema.D These files are stored in the root directory or in the USRFEP of the

control The file name is freely selectable, the file extension must be”gct”.

4.39 Straightness and Angle Error Compensation: Deactivate GCT(0)

EffectDeactivates straightness and angle error compensation.

ProgrammingSyntax:

GCT(0) (alternatively: GeoComp(0), GEOCOMP(0))

Page 256: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions GetSpindle, GSP

4-60 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.40 Create Channel Spindles GetSpindle, GSP

EffectTransfers a system spindle to the calling channel. This turns a systemspindle into a channel spindle. Following this, the spindle can be pro-grammed in the current channel via its logical names and its logical auxi-liary functions.

ProgrammingGetSpindle (<SysSpNo> | <SysSpName> , <ChanSpNo> |<ChanSpName> , ...)

Transfers a systsem spindle as logical spindle into the channel (channelspindle).where:<SysSpNo> 1..32<SysSpName> SSp01 .. SSp32 or SSP01 .. SSP32<ChanSpNo> 1..8<ChanSpName> S1 .. S8

Abbreviation: GSP

Special features and restrictions:D A system spindle can be logically present in several channels.D GetSpindle will not cause a runtime error if there exists already a

channel spindle with the specified number.Exceptions: The spindle to be replaced is operated at constant cuttingspeed (G96).

Example:...N50 GSP(7,2) transfers the 7th system spindle as 2nd

channel spindleN60 M203 S2=500 starts the 2nd channel spindle...N110 GSP(SSP12,S2) transfers the 12th system spindle as 2nd

channel spindle...

Page 257: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions HsBlkSwitch, HSB

Electric Drivesand Controls

4-61Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.41 Block Transition on-the-fly Using High-Speed SignalHsBlkSwitch, HSB

EffectPermits a premature block transition using the high-speed inputs of thecontrol. In this way, a linear traveling movement can be prematurely ter-minated, depending on external events.

CAUTIONModification of the programmed path!If the programmed end points of the ”HsBlkSwitch” block and theblock following it do not lie on a straight line, the occurrence of anexternal event always leads to a modification of the path that cannot be precisely predicted!

. The high-speed signals can be configured using machine parame-ters.

The following applies to on-the-fly block transitions: D without Cancel distance to go in operating modes ”Automatic”, ”Sin-

gle block” and ”Single step”.D with Cancel distance to go in operating modes ”Program block” and

”Manual data input”.D usually without axis standstill. The block is exited with the current

velocity (for exceptions, see ”Special features and restrictions”).D no check for maximum possible axis jump capabilityD effect depends on the current operating mode (Automatic, Single/

Program block, Single step, Manual data input). See ”Special featu-res and restrictions”.

ProgrammingSyntax:HsBlkSwitch(HS<x>=<y>) oderHsBlkSwitch(CI<x>=<y>)

Block transition on-the-fly

Abbreviation: HSB(..)

where:<x>: Number of the highspeed signal or the customer input

(qCh_Custom<x>).Range of values: 1-8, integer.

<y>: Logical signal status required for a block transition:0: Low1: High

Page 258: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions HsBlkSwitch, HSB

4-62 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Special features and restrictions:D The function requires a linear traversing movement in both the

”HsBlkSwitch” block and the following one.D The function must be written with path information; it can be written

together with other path conditions.D Under operating modes Automatic, Single block and Single step, the

endpoints of the axes that are not programmed in the following blockare transferred from the prematurely terminated block.

D ”Block transition on-the-fly” with an axis standstill occurs in the follo-wing cases:D Contour knee >90 degrees between the ”HsBlkSwitch” block and

the following one.D Precise stop is active, i.e. G0(IPS...) or G1(IPS...).D Due to additional programming, the following block starts with v=0

(e.g. if CO programming or feed forward control is active).D ”Jolt-limited speed guidance” (G8(SHAPE...), G9(SHAPE...),

etc.) is active.D Operating mode ”Single block”, ”Single step”, ”Program block” or

”Manual data input” is active.

Example: Event-dependent feedrate.The traversed feed is to be reduced, depending on an external event, ona straight path.Three NC blocks in which different feed information is entered are requi-red for this. Since braking to v=0 is not to occur at the block transition,block transition on-the-fly is required.Note that, due to the nature of the task (...”on a straight path”...), all pro-grammed endpoints must lie on the same straight line.

. The endpoints of a following block may not be identical to those ofthe preceding block. Otherwise a traversing movement is not car-ried out in the following block!

. The programmed distance traversed of a following block influen-ces the maximum possible feed velocity at the block transition. Ifthe distance traversed is too short, the path velocity may be auto-matically reduced!

:N20 G0 X0 Y0 Traverse to initial position.N30 HSB(HS1=1) G1 X100 Y10 F500 Traverse with F500 until high-

speed signal 1 = ”High” or X100Y10 is attained.

N40 HSB(HS1=0) X110 Y11 F100 Traverse with F100 until high-speed signal 1 = ”Low” or X110Y11 is attained.

N50 X120 Y12 F500:

Traverse distance to go untilX120 Y12 with F500.

Page 259: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions HsBlkSwitch, HSB

Electric Drivesand Controls

4-63Bosch Rexroth AGIndraMotion MTXR911314869 / 01

N30

N40

V

t

HS1=1

N50Y

X

500

100

10

100 110 120HS1=0

V

t

HS1=1 and remains 1500

100

V

t

500

100

HS1=0 and remains 0 (no external event)

N30 N40 N50

N30 N40 N50

N30 N50

N40: immediate block transition because HS1=0

Page 260: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions HsBlkSwitch(..,HSSTOP=..), HSB(..,HSSTOP=..)

4-64 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.42 Block Transition with Cancellation Using High-Speed SignalHsBlkSwitch(..,HSSTOP=..), HSB(..,HSSTOP=..)

EffectPermits a premature block transition using the high-speed inputs of thecontrol. In this way, a linear traveling movement can be prematurely ter-minated, depending on external events.

CAUTIONModification of the programmed path!If the programmed end points of the ”HsBlkSwitch” block and theblock following it do not lie on a straight line, the occurrence of anexternal event always leads to a modification of the path that cannot be precisely predicted!

. The high-speed signals can be configured using machine parame-ters.

The following applies to block transition with cancellation:D in all operating modes with Cancel distance to go.D always brake to v=0, either with velocity step or downslope.

Braking to v=0 occurs at the end of the block if the external eventdid not occur.

ProgrammingSyntax:HsBlkSwitch(HS<x>=<y>,HSSTOP=<z>)or HsBlkSwitch(CI<x>=<y>,HSSTOP=<z>)

Block transition withcancellation

Abbreviation: HSB(..,HSSTOP=..)

where:<x>: Number of the highspeed signal or the customer input

(qCh_Custom<x>).Range of values: 1-8, integer.

<y>: Logical signal status required for a block transition:0: Low1: High

<z>: Braking type if the event occurs:0: Ramp down to v=0 with max. deceleration-1: Velocity step to V=0.

Special features and restrictions:D The function requires a linear traversing movement in both the

”HsBlkSwitch” block and the following one.D The function must be written with path information; it can be written

together with other path conditions.

Page 261: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions HsBlkSwitch(..,HSSTOP=..), HSB(..,HSSTOP=..)

Electric Drivesand Controls

4-65Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D When ”Jolt-limited velocity guidance” (G8(SHAPE...),G9(SHAPE...), etc.) is active, there will be no speed jump atHSSTOP=-1.

Example: Event-dependent cancellation of traversing movement::N20 G1 X0 Y0 F1000 Traverse to initial position.N30 HSB(HS1=1,HSSTOP=-1) X10 F10

Traverse X-axis with F10 until high-speedsignal 1 = ”High” or X10 is attained.An event triggers a jump to v=0 and swit-ches off Cancel distance to go.

N40 HSB(HS2=1,HSSTOP=0) Y100 F200

Traverse Y-axis with F200 until high-speed signal 2 = ”High” or Y100 is attai-ned.An event triggers downramping to v=0with the max. deceleration and switchesoff Cancel distance to go.

Page 262: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions HWOC HWOCDIS

4-66 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.43 Online Correction in Workpiece Coordinates HWOCHWOCDIS

EffectOnline correction in workpiece coordinates is used to ”superimpose”currentD positions or orientations in the workpiece coordinate system of a

channel, orD positions of the tool length axis in the TCS z-directionby a correction. The control derives the magnitude of the correction froma connected handwheel (usual case) or drive or from the value of a CPLvariable.For detailed information about this function, see the ”Description ofFunctions”.

ProgrammingSyntax:HWOC(CHAN<Channel No>,CRDNO<Coord No>,STEP<Incr>)

Online correction ON

HWOCDIS(CHAN<Channel No>) Online correction OFF;current correction magnituderemains in internal storage.

HWOC() orHWOC(0)

Online correction OFF andclear the relevant correctionvalues.

where:<Channel No> Channel number in which the online correction is acti-

vated/deactivated.If CHAN<Channel No> is not programmed, the number of thecurrent channel is effective.

<Coord No> Coordinate on which the online correction is to have aneffect.Value range: 1 to 9 and 103.1 to 8: . Coordinate number in the given channel9 or 103: TCS coordinate.

<Incr> Specification of the desired increment step per 1 incr.Effective only if MP 7050 00926 = 0.

Special features and restrictions:D A coordinate position generated by online correction is not analyzed

for possible travel beyond the software limit switches.Therefore, end limit monitoring on the drive side should be activatedwhen using online correction.

D Online correction is not possible in ”Manual” operating mode (joggingmode) or in ”Manual traverse to reference point”.

D G76 approaches a position that is offset by the current correction va-lue.

Page 263: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions HWOC HWOCDIS

Electric Drivesand Controls

4-67Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D CPL functions PPOS and PCSPROBE do not take the correction va-lue of the online correction into account.

D G75 measures the real actual position (incl. online correction).D ”FsProbe” measures the real actual position (incl. online correction).

Page 264: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions InitMeas, IME

4-68 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.44 Initialization of on-the-fly Measurement InitMeas, IME

EffectFunction InitMeas is used to initialize the probe for function ”Measure-ment on-the-fly” (FlyMeas). Initialization must be called before the firstmeasuring procedure of an axis.

ProgrammingSyntax:InitMeas(MpiAxis<i>) Initializing the probe logic.

Abbreviation: IME(..)

where:<i>: Index of the physical axis that is to be used in the

measurement.

Special features and restrictions:D The function acts blockwise.D The function can be programmed together with all interpolation types

and works parallel to the active interpolation.D The function must be called before the first call of function ”FlyMeas”

for the corresponding axis.

Page 265: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions JogWCSSelect

Electric Drivesand Controls

4-69Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.45 Jogging in Workpiece Coordinates JogWCSSelect

EffectFor operating mode ”Set-up mode, jogging in workpiece coordinates”,this function defines which coordinate is to be jogged or traversed usingthe handwheel.The following coordinates can be selected for jogging:D all the coordinates of individual machine axes (pseudocoordinates) if

no axis transformation is activeD all linear and orientation coordinates – based on the active WCS – if

an orientatable axis transformation is activeD TCS coordinate z if an orientatable axis transformation is active.

The setting in MP 7050 01010 determines whether the feed velocity andincrement (for incremental jogging) can be derived from the settings ofan existing machine axis or whether they must be explicitly program-med.

. For detailed information about this function, see the ”Descriptionof Functions”.

ProgrammingSyntax:

JogWCSSelect(JWSCHAN<Channel No>,JWSCOORD<Coord No>,JWSFEED<F-value>,JWSSTEP<Incr>)

where:<Channel No> Channel number in which a coordinate is to be jogged.

Default: Number of the channel in which the function is pro-grammed.

<Coord No> Coordinate selection. Value range: 1 to 8 and 103. Integer.1 to 8: Number of the coordinate to be jogged103: TCS coordinate is to be jogged.

<F-value> Jogging speed. Entered value depends on active unit of measurement (G71,G70), in the unit mm/min, inch/min or degrees/min.Effective only if MP 7050 01010 = 0.

<Incr> Selects incremental jogging and specification of the desiredstep size in increments.Effective only if MP 7050 01010 = 0.

Special features and restrictions:D The function is designed for use in a special NC program for coordi-

nate selection (also see MP 705001110). For details, please refer to the ”Description of Functions”.

Page 266: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions KvProg, KVP

4-70 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.46 CO Programming KvProg, KVP

EffectThe function enables a program-controlled change of the CO values ofindividual axes. This can be used for temporary increases of the rigidityof axes (e.g. for milling a bore).After the control is powered up, the NC (among other things) reads thecurrent CO values of all coupled drives and saves them. During CO programming, the control loads the programmed CO valuesinto the relevant drives (parameter S-0-0104). When CO programming is switched off, the control transfers the pre-viously saved CO values back to the drives, thus restoring the initialstate.The following applies:D CO = (path velocity in m/min) / (coasting in mm)D Decelerating to v=0 is performed ahead of each block containing a

CO switch, since the CO value in the drive should only be switchedover at standstill.

D After the command for the CO switchover, the control always waitsinternally for the acknowledgement by all participating drives.

D The CO switchover occurs immediately before any traversing move-ment that may also be programmed in the same block.Example::N10 G1 F1000:N40 X40 Positioning with default CO value.N50 KVP(X2) X50:

Transfer CO value 2 to axis X andthen traverse.

N40 N50

1000

VSwitch CO

t

Page 267: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions KvProg, KVP

Electric Drivesand Controls

4-71Bosch Rexroth AGIndraMotion MTXR911314869 / 01

ProgrammingSyntax:CoProg(<Axis1>,<Axis2>,...) CO programming ON.

KvProg(0) CO programming OFF.

Abbreviation: KVP(..)

where:<Axis> Physical (system-wide) or logical (channel-based) axis de-

signation, incl. the desired CO value.Max. programmable CO value: 655.35

Special features and restrictions:D Only axes that are currently assigned to the channel may be program-

med.

Example:::

Starting point: a CO value of 1.0 is activein all drives.

N10 G0 X0 Y0 Z100 Positioning with CO value = 1.0N20 KVP(Z2.1):

Transfer the CO value 2.1 to the drive ofphysical axis Z.

N30 G1 Z0 Positioning with CO value = 2.1N40 KVP() Z100::

KV programming OFF. The NC automatically reloads the CO va-lue 1.0 into all the drives. Then the Z-axis traverses.

Page 268: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions LEN

4-72 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.47 Divide Traversing Block: Length of Partial Path LEN

EffectDivides a programmed traversing block into several partial paths ofequal length.

. Works together with functions ”Punch” (see page 4-119) and ”Nib-ble” (see page 4-84).

ProgrammingSyntax:

LEN=< Value>

where:<Value> For linear blocks: length of partial path.

For circular blocks: length of arc.Programming unit as for the axis coordinates.<Value> does not have to be an integral divisor of the pro-grammed length of path. Internally, the NC automaticallycomputes an effective LEN value that is less than/equalto the programmed LEN value with the effect that the ef-fective path segments are always integral divisors of theprogrammed length of path.

Special features and restrictions:D The motion from one stroke to the next is always linear in the case of

divided circular blocks.D LEN works modally as long as function Punching/Nibbling is active.

However, it can be overridden on a block-by-block basis by NUM(see page 4-86).

D Programming LEN is possible at any time when Punching/Nibbling(MP 8001 00010) has been released. However, block splitting beginsonly after Punching/Nibbling has been activated.

Example:- G90 is active (absolute dimension programming)- active plane: X/Y- current position: X=0, Y=0, C=0- punching/nibbling is switched off.:N20 X100 Y100 LEN=15 Divide the following traversing blocks

into identical partial paths with a maxi-mum of 15 mm. LEN is not yet in ef-fect because punching/nibbling isswitched off.

Page 269: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions LEN

Electric Drivesand Controls

4-73Bosch Rexroth AGIndraMotion MTXR911314869 / 01

N30 X200 Y200 C180 Punch(1) Punching ON. LEN is in effect. Thepath length is split into 10 block seg-ments. Resulting stroke positions (X,Y,C): P1 (110,110,18)P2 (120,120,36):P10 (200,200,180).

N40 Y290 C210 The path length (90 mm) is split into 6block segments. Resulting strokepositions (X,Y,C):P11 (200,215,185)P12 (200,230,190):P16 (200,290,210).

N50 Punch():

Punching OFF.

LEN=15: results in 6path segments of 15

mm each(X200, Y200, C180

throughX200, Y290 C210)

110120

130160

150140

170180

190200

110

120

130

190

170

160

150

180

0

0

Y

140

200

275

245

230

215

260

290

LEN=15: results in 10path segments of 10 mm

each(X120, Y120, C18

throughX200, Y200 C180)

100

100

X

Tool rotationby 15_ each

Tool rotationby 18_ each

: No stroke

: Stroke

P1P2

P0

P10

P11

P16

Page 270: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions LFP LFConf, LFC

4-74 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.48 Path Velocity-Dependent Laser Power ControlLFP

LFConf, LFC

EffectControls the power of a laser using an analog voltage signal (0 - 10 V)depending on the current path velocity vpath.

. For detailed information about this function, see the ”Descriptionof Functions”.

ProgrammingSyntax:LFP(1) oderLFP

Laser power control ON with cur-rent parameter settings.

LFP(LL(... )) Laser power control ON with ad-ditional parameter settings asdescribed under LFCont.

LFP(0) Laser power control OFF.

LFConf(LL(<Volt>,<Vmin>),UL(<Spg>,<Vmax>),PL(<Mode>),CD(<Coord 1>,<Coord n>...),)

Set the laser power control para-meters The relevant coordinatesare selected by means of PL(..)or CD(..).

Abbreviation: LFC(..)

where:<Volt> Voltage in % of the maximum output voltage (10 V).

Together with <Vmin>: Output at a path velocity of less than<Vmin>.Together with <Vmax>:Output at a path velocity of greaterthan <Vmax>.

<Vmin> Lower path velocity limit.Entered value depends on active unit of measurement (G71,G70), in the unit mm/min, inch/min or degrees/min.

<Vmax> Upper path velocity limit.Entered value depends on active unit of measurement (G71,G70), in the unit mm/min, inch/min or degrees/min.

<Mode> Defines which coordinates are to be used to determine vpath:APL All coordinates of the current plane.ASP All coordinates of the current space.CFD Coordinates according to MP 7050 00820.

<Coord x> Defines which coordinates are to be used to determine vpath.Input values: Name of the participating space coordinates (ifaxis transformation is active) or logical axis name (pseudo-coordinates; if axis transformation is not active).

Page 271: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

LFConf, LFCNC-Functions LFP

Electric Drivesand Controls

4-75Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Examples:LFP (LL(10,100), UL(60,700))

Laser power control ON. Additional parame-ter settings: Output voltage to 10% (=1V) ifthe path velocity drops below 100 mm/min,and 60% (=6V) if the path velocity increasesbeyond 700 mm/min.

LFP(0) Laser power control OFF.LFConf (PL(APL)) Only parameter settings: The path velocity is

derived from the path movement in the ac-tive plane.

LFConf (CD(X , Z)) Only parameter settings: The path velocity isderived from the movement of the X and Zcoordinates.

LFConf (UL(80,500)) Only parameter settings: Limit output vol-tage to 80% (=8V) if the path velocity risesabove 500 mm/min.

Special features and restrictions:D The available analog outputs limit the number of channels that may

use this function.D The voltage signal for the laser control falls to 0 V in the following ca-

ses:D Error occurs (runtime error, diagnostics class 1 error)D ”Drive under control” signal of a drive participating in the path is

deactivated (no enable signal, drive off)D ”Feed hold” signal becomes active.

Page 272: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions LinUpFeed, LNU

4-76 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.49 Velocity Profile (Ramp Functions)The function allows the definition of machining sections that are to be ex-ecuted with separate velocity profiles. The following individual compo-nents are available for this purpose:D 1 constant speed interpolator,D 3 acceleration and 3 braking interpolators

(each with a linear, sinusoidal and sin2-shaped velocity profile).

The following applies:D All functions described below work modally, form a modal group with

G8 and G9, and mutually deselect each other.

Effect of acceleration interpolators LinUpFeed, LNUSinUpFeed, SNU

Sin2UpFeed, S2U

Starting from velocity V0 (velocity at the beginning of the block), the con-trol accelerates across the entire programmed path length to the targetvelocity V1. Depending on the programmed function, this occurs with a linear, sinu-soidal or sin2-shaped velocity rise.The target velocity V1 is reached together with the programmed endpoint, and results from the programmed feedrate as a function of the cur-rent override value. It is limited byD the maximum path acceleration andD the maximum permitted path velocity.Both quantities are calculated by the control specifically for each pathsegment and each NC block; a 1-block look-ahead is performed in con-nection with the maximum permitted velocity. This prevents a violation ofthe maximum axis velocities in the next block.

. If V1 is not greater then V0, the call of the acceleration interpolator inthe current block is ignored.

Behavior in the event of override changes:D Increasing the override results in the recalculation of the acceleration

ramp.D An override reduction to final values below the start velocity V0

D results in a recalculation of the braking ramp in the case of ”LinUp-Feed”; this lasts until the programmed endpoint.

D is ignored in the case of ”SinUpFeed” and ”Sin2UpFeed”.

Effect of constant speed interpolator ConstFeed, CFD

The control tries to reach the programmed velocity, taking the maximumpermitted path velocity and the current override value into account.Velocity changes during override changes are executed with the permit-ted accelerations in each case.

Page 273: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

LinDownFeed, LNDNC-Functions

Electric Drivesand Controls

4-77Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Effect of braking interpolators LinDownFeed, LNDSinDownFeed, SND

Sin2DownFeed, S2D

Starting from velocity V0 (velocity at the beginning of the block), the con-trol brakes across the entire programmed path length to a standstill(V1=0). Depending on the programmed function, this occurs with a linear, sinu-soidal or sin2-shaped velocity drop.Override changes have no effect, with the following exception:If the override was set to 0% in the previous block and the command ve-locity of 0 was reached afterwards exactly at the block transition to thedeceleration interpolator, the control maintains the deceleration interpo-lator until the override is increased to a value > 0!The velocity is increased by one acceleration step (depending on thepermitted path acceleration). The control calculates the necessary deceleration ramp on the basis ofthe velocity value resulting from this function. Afterwards, the actualoverride value will be of no effect until the end of the block.

ProgrammingSyntax:LinUpFeed

Abbreviation: LNUActivate acceleration interpolator with linearvelocity rise

SinUpFeed

Abbreviation: SNUActivate acceleration interpolator withsinusoidal velocity rise

Sin2UpFeed

Abbreviation: S2UActivate acceleration interpolator withsin2-shaped velocity rise.

ConstFeed

Abbreviation: CFDActivate constant speed interpolator.

LinDownFeed

Abbreviation: LNDActivate acceleration interpolator with linearvelocity drop.

SinDownFeed

Abbreviation: SNDActivate acceleration interpolator withsinusoidal velocity drop.

Sin2DownFeed

Abbreviation: S2DActivate acceleration interpolator withsin2-shaped velocity drop.

Page 274: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions LinDownFeed, LND

4-78 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example: Velocity profile for an oscillation cycle of the U axis.

V(t)

t

N10 N20 N30 N40 N60 N70N50

0

N5

N5 G0 U10 U axis is traversed to starting position (U=10mm)N10 S2U U17 F500 Sin2-shaped acceleration up to position U=17.

Feedrate setpoint at the end point: F=500 mm/min.N20 CFD U23 Constant speed until position U=23.N30 LND U29 Linear braking until position U=29.

End speed: 0 mm/min.N40 G4 F0.5 Dwell time in the point of reversal.N50 LNU U20 Linear acceleration until position U=20.N60 CFD U17 Constant speed until position U=17.N70 SND U10 Sinusoidal braking until position U=10. End speed:

0 mm/min.

Special features and restrictions:D The desired end point coordinate must always be entered in the pro-

grammed block.D All ramp functions can be used only in the Automatic operating mode.

Other operation modes (Manual data input, Single block, Single step,or Program block) lead to a runtime error.

D When using braking interpolators in connection with extremely shorttraversing paths, excessive acceleration is possible, which may leadto a servo error. Therefore, please note the maximum possible machine dynamics al-ready when creating the parts program.

D Auxiliary functions or functions such as ”Precise stop” are not permit-ted while the constant speed and acceleration interpolators are active(can lead to sudden speed drops). Prohibited functions include: G0, G4, ”KvProg”, G63, G33, G61, ”G1(IPS)”, G75, ”G74(HOME)”,”HsBlkSwitch”, ”WriteId”.

Page 275: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions LinModZp, LMZ

Electric Drivesand Controls

4-79Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.50 Zero-Setting of Modulo Axis (Linear Endless Axis)LinModZp, LMZ

Effect”LinModZp” can be used to define the current position of a linear endlessaxis as a new program zero point.The axis indicator then jumps to a value of ”0”. The resulting offset is sto-red within the control and is internally added to all subsequent coordi-nate information of the corresponding axis.After a control reset, it is subtracted from the indicator value and deleted.

. For linear endless axes, see machine parameter 1003 00004.

ProgrammingSyntax:LinModZp Define the current positions of all

linear endless axes configured inMP 1003 00004 as a new programzero point.

LinModZp(LinModAxis<i>) Define the current position of thelinear endless axes configured inMP 1003 00004 with physical axisindex <i> as a new program zeropoint coordinate of this axis.

Abbreviation: LMZ(..)

where:<i>: Physical axis index.

Example:N10 LMZ::

Define the current positions of allconfigured linear endless axes as anew program zero point.

N50 LMZ(LinModAxis1) X-20::

Define the position of the linearendless axis with axis index 1 as anew program zero point coordinate.Then traverse to X-20.

Special features and restrictions:D Position values greater than the modulo value are not permitted.D Negative position values are possible as long as the amount is less

than the modulo value.

. The modulo value is defined in the drive using SERCOS parameterS-0-0103 when the SERCOS is powered up. A changed modulo va-lue goes into effect only after the SERCOS is restarted!

Page 276: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions MainSp, MSP

4-80 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.51 Switching the Main Spindle MainSp, MSP

EffectDefines – as opposed to the setting in MP 7020 00010 – the givenspindle as a main spindle in the current channel.In this way, you can dynamically specify on which spindle functionsD G33 (Thread cutting)D G95 (Feedrate programming in mm/rev) andD G4 (Dwell time)are to have an effect.

ProgrammingSyntax:

MainSp(<Num>) or

MainSp(<Spindle>)

Abbreviation: MSP...

where:<Num> Number of the spindle (spindle index).

Input value: -1; 1 - 8. Integer.-1: Main spindle according to MP 7020 00010.

<Spindle> as for <Num> orspindle name (e.g. S1)

Page 277: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Mirror(...), MIR(...)

Electric Drivesand Controls

4-81Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.52 Input Tool: Mirror Mirror(...), MIR(...)

EffectThe Mirror function is one of the input tools.The control machines a programmed contour or, for instance, a boreholepattern as a mirror image.Mirroring always refers to the current mirror point (see function PoleSet,page 4-109). If this was not explicitly programmed, the current programzero point is the mirror point.

. Mirroring is an input tool; as a result, it does not change the currentprogram coordinate system. An input tool merely provides anotherinput method for the program coordinates.Mirror can also be used together with Scale and Rotate.

The following applies:D The function acts modally. It remains active until it is switched off.D It may be programmed in the same block as other path conditions and

input tools.

ProgrammingSyntax:Mirror(<Axis1>1,<Axisn>1) Switch on mirroring for the

given axes.

Mirror(<Axis1>0,<Axisn>0) Switch off mirroring for thegiven axes.

Mirror(0) orMirror()

Switch off mirroring for all theaxes in the channel.Approached axis positions areretained until they arereprogrammed.

Abbreviation: MIR(..)

where:<Axis 1>, <Axis n>: Axis addresses (e.g. X) combined with a value of

”1” activate the function: all subsequentlyprogrammed path commands of thecorresponding axes (e.g. X100) are multipliedinternally by a value of ”-1”.Mirroring does not become effective until thenext traversing information.

Special features and restrictions:D The function takes into account the interpolation parameters in the

case of circular interpolationD It influences the programmable contour shift. See page 4-134.D It does not influence:

Page 278: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Mirror(...), MIR(...)

4-82 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D zero offsets (G54-G59.5; see page 3-46),D program coordinate offsets (Trans or ATrans; see page 4-172),D setting of the program position (”SetPos”; see page 4-133),D approaching reference point coordinates (G74 ; see page 3-55),D approaching axis position coordinates (G76 ; see page 3-58),D milling radius and tool length correction values.

Mirroring examples:

Y

XP

Effect of: MIR(X1)

Y

XP

Effect of: MIR(Y1)

Y

XP

Effect of: MIR(X1,Y1)

Y

XP

Effect of: PLS(X10,Y13)MIR(X1)

1

2

10

13

1: Definition of the mirror point (X10;Y13)2: Mirroring on

Mirroring of an orientation vectorAn orientation vector is only mirrored on a component-by-componentbasis using the following function syntax. Any scaling that may be active or a mirror/rotation point has no effect onthe result.

Syntax:Mirror(O(<Sx>,<Sy>,<Sz>)) Switch on/off mirroring for the

given components of anorientation vector.

Abbreviation: MIR(..)

Page 279: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Mirror(...), MIR(...)

Electric Drivesand Controls

4-83Bosch Rexroth AGIndraMotion MTXR911314869 / 01

where:<Sx>,<Sy>,<Sz> Mirroring factors for the individual vector

components.0: no mirroring1: mirroring

Please note for the orientation vector:D Polar coordinates ϕ and ϑ proper cannot be mirrored.D Programming MIR(phi1,theta1) is not permitted.

Page 280: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Nibble, NIB

4-84 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.53 Nibbling Nibble, NIB

EffectSwitches the ”Nibbling” function on or off.If nibbling is activated, no stroke is released in the following cases:D at the end of every partial path that is programmed or generated by

function ”NUM” (see page 4-86) or ”LEN” (see page 4-72), andD at the beginning of the first partial path if no traversing movement was

programmed in the active plane or nibbling was switched off in theprevious block.

The subsequent traversing motion always starts before the stroke is fi-nished.

. Functions to influence the stroke release time:PtDefault (see page 4-117)PtBlkEnd (see page 4-115)PtInpos (see page 4-118).

ProgrammingSyntax:Nibble(1) orNibble

Nibbling ON.

Nibble(0) orNibble()

Nibbling OFF.

Abbreviation: NIB(..)

Special features and restrictions:D Nibbling must be released using MP 8001 00010.D Programming function ”NUM” or ”LEN” is mandatory. The control thus

automatically generates partial paths from the programmed distancetraversed; a stroke is released at the end of each of these partialpaths.

D The function already has a modal effect on traversing movementsthat are programmed in the same block.

D If punching is switched on (see page 4-119), the function deselectsnibbling.

D Blocks that do not contain axis coordinates from the active plane alsodo not release a stroke.

D If the PLC suppresses the stroke release, processing remains at thestroke release position until the PLC releases the stroke release.

Page 281: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Nibble, NIB

Electric Drivesand Controls

4-85Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:- G90 is active (absolute dimension programming)- active plane: X/Y- current position: X=0, Y=0, C=0:N10 LEN=12 Divide the traversing blocks into identical

partial paths with a maximum of 12 mm.LEN must be programmed before Nibbleis switched on!

N20 C10 Nibble(1) Nibbling ON. Modal LEN is in effect. C-axis rotates to 10 degrees. No stroke be-cause the X- and Y-axes are not pro-grammed.

N30 X0 No traversing movement because theX-axis is already located on position 0. A stroke occurs because the X-axis islocated in the active plane.

N40 X110 The traversing block is divided into 10identical 11-mm partial paths. Strokesare executed in positions X11, X22, X33... X99, X110Additional stroke at position X0 be-cause no traversing movement occurredin N30.

N50 Y30 NUM=3 Overrides the modally effective LEN(N10) for the current block. Divide the traversing blocks into 3 identi-cal partial paths. Strokes at Y10, Y20,Y30.

N60 Y90 LEN from N10 is in effect again. Strokes at Y42, Y54, Y66, Y78, Y90.

N70 X50 Y50 Nibble():

Nibbling OFF. Traversing movement to X=50, Y=50.

11 22 33 665544 77 88 99 110

10

20

30

90

66

54

42

78

00

X

Y

: 1x stroke LEN=12X0 through X110

(10 path segments of 11 mm each)

LEN=12Y42 through Y90(5 path segmentsat 12 mm each)

NUM=3Y10 through Y30(3 path segmentsat 10 mm each)

: 2x stroke

Page 282: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions NUM

4-86 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.54 Divide Traversing Block: Number of Partial Paths NUM

EffectDivides a programmed traversing block into a defined number of partialpaths of equal length.

. Works together with functions ”Punch” (see page 4-119) and ”Nib-ble” (see page 4-84).

ProgrammingSyntax:

NUM=<Value>

where:<Value> Number of partial paths

Input value: Integer, greater than 0.NUM=1 does not produce any division.

Special features and restrictions:D The motion from one stroke to the next is always linear in the case of

divided circular blocks.D NUM has an effect only in the programmed block and suppresses an

active LEN (see page 4-72).D Programming NUM is possible only when Punching/Nibbling has

been released (MP 8001 00010) and is active.

Example:See example in section 4.47, page 4-72 ff.

Page 283: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

Electric Drivesand Controls

4-87Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.55 Orientation Programming O(), ROTAX()phi, theta, psi

Orients a tool (milling machine, drill, laser, gripper) anywhere in spacebased on the current program coordinate system (PCS).

. If the TCP is to be moved in addition to the tool orientation move-ment, also see function ”Space Coordinate Programming” in the”Description of Functions”.

If a tool orientation movement is programmed without a simultaneousTCP movement, the active feed (F) affects only the orientation move-ment. If necessary, programmed pseudocoordinates are guided alongsynchronously (pseudocoordinate movements are movements that arecaused by programming direct axis positions). Alternatively, if G94 is ac-tive, ”Omega” programming can be used.

The orientation vector is located along the tool symmetry axis and pointsto the tool holder. Various types of orientation programming are availa-ble:

4.55.1 Vector Orientation

EffectProgramming the tool orientation is also possible usingD orientation coordinates of the orientation vector

(e.g. phi and theta).

z

x

y

+

+

Orientation vector

P (ϕ,ϑ)

Pole

phi.

theta.

ρ→

Page 284: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

4-88 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D Function O(..) with polar angles (ϕ,ϑ) or Cartesian components (ρx,ρy, ρz) of the orientation vector.

ϕ

í

z

x

y

+

+

Pole

z

x

y

P (ρx, ρy, ρz)

Pole ρx

ρy

ρz

Vector using angle Vector using Cartesiancomponents

Orientation vector

P (ϕ,ϑ)

ρ→ Orientation vector ρ→

D Function ROTAX(..) for defining an axis of rotation oriented anywherein space so that the orientation vector can be turned around it by aspecific angle β using function O(..). The axis of rotation can be programmed both with polar angles (ϕu,ϑu) and Cartesian components (ux, uy, uz).

z

x

y

Axis of rotationu→

Orientation vector(initial orientation)

TCP

Orientation vector(final orientation)

Angle β

ρe→

ρa→

The following applies:D Vector orientation can be programmed only together with an axis

transformation whose 100th position is type = 2.D The orientation motion is carried out as a rotary movement of the

orientation vector from the programmed initial orientation to the finalorientation.

D This is suitable for rotation-symmetrical tools.

Page 285: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

Electric Drivesand Controls

4-89Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Programming

1. Activate the permitted axis transformation type (type of 100th posi-tion = 2) with ”Coord(...)” (see page 4-36).

2. Use the syntax shown below.

Syntax:

<No> <TCP mvmt> <phi><j> <theta><J> or

<No> <TCP mvmt> O(<j>,<J>) or

<No> <TCP mvmt> O(<rx>,<ry>,<rz>) or

<No> <TCP mvmt> ROTAX(<ju>,<Ju>) O(<b>) or

<No> <TCP mvmt> ROTAX(<ux>,<uy>,<uz>) O(<b>)

where:<No> Block number. See page 2-19.<TCP mvmt> Additional TCP movement.

For the syntax, please refer to the ”Descriptionof Functions” under space coordinate program-ming.

<phi> Angle name that is entered inMP 7080 00010[4]. Default: phi

<theta> Angle name that is entered inMP 7080 00010[5]. Default: theta

<j>,<J>,<ju>,<Ju> Absolute angle values in degrees.Value range: 0_≤ j < 360_; 0_≤ J ≤ 180_.If another value is programmed for J, it is auto-matically converted to the given interval.

O(<j>,<J>) Orientation using function O(..) and polar angles<j> and <J> of the orientation vector.

O(<rx>,<ry>,<rz>) Orientation using function O(..) and Cartesiancomponents <rx>,<ry>,<rz> of the orientationvector in absolute dimensions. Automatic standardization to 1. As a result, thefollowing sample entries cause the identicalorientation: O(1,2,4), O(2,4,8)

ROTAX(<ju>,<Ju>) Define the axis of rotation using polar angles (ϕu,ϑu).

ROTAX(<ux>,<uy>,<uz>) Define the axis of rotation using Cartesiancomponents <ux>,<uy>,<uz> in absolute di-mensions. Automatic standardization to 1.

O(<b>) Indicates (in degrees) the incremental angle<b> around which the orientation vector is to beturned around the axis of rotation. Values grea-ter than 360 degrees are allowed.The direction of rotation can be selected usingthe positive/negative sign.

Special features and restrictions:D The initial and final orientation of the orientation vector may not run

parallel nor antiparallel, except in the case of programming RO-TAX(..).

Page 286: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

4-90 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.55.2 Tensor Orientation

EffectTool orientation is affected by orienting the entire tool coordinate systemTCS, based on the current PCS.

z

x

y

TCP

z

x

y

PCS

TCS

Gripping tool:TCS permanently coupled to tool

zTCS

x

y

z

TCS

x

y

TCPTCP

D Programming is also possible usingD Euler angles phi ϕ, theta ϑ and psi ψ.

As a result of successive rotations with the Euler angles, the TCSreceives its desired orientation.

D 3x3 orientation tensor (rotation matrix that realigns the entire TCSaround the TCP). The components of its column vectors (Ox, Oy,Oz) precisely specify the TCS orientation and can be programmedas polar angles or Cartesian components.

D Function ROTAX(..) for defining an axis of rotation oriented anyw-here in space so that the orientation tensor can be turned around itby a specific angle β using function O(..). The axis of rotation can be programmed both with polar angles (ϕu,ϑu) and Cartesian components (ux, uy, uz).

The following applies:D Tensor orientation can be programmed only together with an axis

transformation whose 100th position is type = 3.D The orientation motion is carried out as a rotary movement of the

orientation tensor from the programmed initial orientation to the finalorientation.

D This is suitable only for tools that are not rotation-symmetric becausethe TCS is permanently coupled to the tool in this case.

Programming

1. Activate the permitted axis transformation type (type of 100th posi-tion = 3) with ”Coord(...)” (see page 4-36).

2. Use the syntax shown below.

Page 287: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

Electric Drivesand Controls

4-91Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Syntax:

<No> <TCP> <phi><j> <theta><J> <psi><y> or

<No> <TCP> Ox(<jx>,<Jx>) Oy(<jy>,<Jy>) or

<No> <TCP> Ox(<jx>,<Jx>) Oz(<jz>,<Jz>) or

<No> <TCP> Oy(<jy>,<Jy>) Oz(<jz>,<Jz>) or

<No> <TCP> Ox(<O11>,<O21>,<O31>) Oy(<O12>,<O22>,<O32>)or

<No> <TCP> Ox(<O11>,<O21>,<O31>) Oz(<O13>,<O23>,<O33>)or

<No> <TCP> Oy(<O12>,<O22>,<O32>) Oz(<O13>,<O23>,<O33>)or

<No> <TCP> ROTAX(<ju>,<Ju>) O(<b>) or

<No> <TCP> ROTAX(<ux>,<uy>,<uz>) O(<b>)

where:<No> Block number. See page 2-19.<TCP mvmt> Additional TCP movement.

For the syntax, please refer to the ”Descriptionof Functions” under space coordinate program-ming.

<phi> Angle name that is entered inMP 7080 00010[4]. Default: phi

<theta> Angle name that is entered inMP 7080 00010[5]. Default: theta

<psi> Angle name that is entered inMP 7080 00010[6]. Default: psi

<j>,<J>,<y> Absolute Euler angle in degrees. AC/IC programming is permitted.Value range: 0_≤ j < 360_;

0_≤ J ≤ 180_;0_≤ y ≤ 360_.

Values outside this range are automatically con-verted into the corresponding interval.

<j..>,<J..> Absolute angle values in degrees.Value range: 0_≤ j.. < 360_;

0_≤ J.. ≤ 180_.If a value outside of the range is programmed forJ.., it is automatically converted to the given in-terval.

Page 288: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

4-92 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Ox(<O11>,<O21>,<O31>)Oy(<O12>,<O22>,<O32>)Oz(<O13>,<O23>,<O33>)Ox(<jx>,<Jx>)Oy(<jy>,<Jy>)Oz(<jz>,<Jz>) Orientation using function Ox(..), Oy(..), Oz(..).

For example, Ox(..) defines the direction of thex-coordinate of the TCS in the reference coordi-nate system. The same applies analogously toOy(..) and Oz(..).The direction can be specified either by the cor-responding polar angles <j..> and <J..> or theCartesian components of the orientation ten-sors column vectors.Only absolute dimensions are allowed.The component values of the column vectors(o..) are automatically standardized to 1.

ROTAX(<ju>,<Ju>) Define the axis of rotation using polar angles (ϕu,ϑu).

ROTAX(<ux>,<uy>,<uz>) Define the axis of rotation using Cartesiancomponents <ux>,<uy>,<uz> in absolute di-mensions. Automatic standardization to 1.

O(<b>) Indicates (in degrees) the incremental angle<b> around which the orientation tensor is to beturned around the axis of rotation. Values greater than 360 degrees are allowed.The direction of rotation can be selected usingthe positive/negative sign.

Page 289: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

Electric Drivesand Controls

4-93Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:Settings for example:MP 1030 00110[1] for axis transformation 2: 3333301MP 7080 00010[1]: xMP 7080 00010[2]: yMP 7080 00010[3]: zMP 7080 00010[4]: phiMP 7080 00010[5]: thetaMP 7080 00010[6]: psi

N100 G1 X10 Y20 Z30 Ox(1,0,0) Oy(0,0.707,-0.707) or

N100 G1 X10 Y20 Z30 Ox(1,0,0) Oz(0,0.707,0.707) or

N100 G1 X10 Y20 Z30 Oy(0,0.707,-0.707) Oz(0,0.707,0.707)

45_

x

y

z

ϕ = 90_, ϑ = 45_, ψ = 270_ PCS

Tensor column vectors:

xt

yt

zt 45_

= = =

Orientation using Euler angle:

ez

→t

ey

→t

ex

→t

ez

→t

ey

→tex

→t

TCS

1/√20

-1/√2

1

0

0

1/√20

1/√2

Special features and restrictions:D Except when ROTAX(..) is programmed, the orientation movement

always occurs on the shortest path to the final orientation. For ROTAX(..), the direction of rotation depends on the positive/ne-gative sign of <b>.

D The following limitations are required to uniquely generate the orien-tation tensor:For ϑ = 0_: the sum of ϕ and ψ is required to specify an orientation.For ϑ = 180_: the difference of ϕ and ψ is required to specify an orien-tation.

D If programming of the tensor columns results in two column vectorsbeing parallel or anti-parallel, it is not possible to calculate the orienta-tion tensor. A runtime error is issued.

Page 290: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

4-94 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.55.3 Linear Orientation Movement with Axis Programming

. Valid only for axis transformation type 3032101.

EffectTo program the tool orientation, the position values of two rotary axesthat act on the tool are programmed (e.g. B, C).

TCP

C-axis

B-axis

z

x

y

+

+

Pole

C..

B..

Orientation vector

P (ϕ,ϑ)

ρ→

Orientationvector ρ→

The following applies:D Only the axis kinematics for which the position values of both rotary

axes can be mapped one-to-one to the orientation coordinates of theorientation vector (e.g. phi and theta) are permitted.

D The orientation movement is performed as a linear movement in therotary axes.

D This is suitable for rotation-symmetrical tools.

Page 291: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

Electric Drivesand Controls

4-95Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Programming

1. Activate axis transformation type 3032101 with ”Coord(...)” (seepage 4-36).

2. Use the syntax shown below.

Syntax:

<No> <TCP mvmt> <B><Pos> <C><Pos>

where:<No> Block number. See page 2-19.<TCP mvmt> Additional TCP movement.

For the syntax, please refer to the ”Description ofFunctions” under space coordinate programming.

<B>, <C> Axis addresses of the rotary axes located on the tool<Pos> Absolute axis position in degrees.

Example:Settings for example:MP 1030 00110[1] for axis transformation 2: 3032101MP 7080 00010[1]: xMP 7080 00010[2]: yMP 7080 00010[3]: z N10 G1 X0 Y0 Z0 B0 C0 Programming logical/physical axis

names.N20 Coord(2) Switch axis transformation 2 on.

Linear coordinates x, y, z andorientation coordinates phi, thetacan now be programmed.

N30 x100 y200 z300 B20 C60 Linear coordinate interpolation withadditional orientation movement.

N40 G2 x.. y.. z.. I.. J.. B20 C60 TCP helical movement with addi-tional orientation movement.

N50 G1 B20 C10 Pure orientation movement. TCPremains constant.

N60 Coord(0):

Axis transformation off.

Special features and restrictions:D Axis transformation type 3032101 must be active.D Special path search logic avoids rotary axis rotations of more than

180 degrees.

Page 292: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

4-96 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.55.4 Linear Orientation Movement with Coordinate Programming

. Valid only for axis transformation type 3232101.

EffectProgramming the tool orientation is also possible using:D orientation coordinates of the orientation vector

(e.g. phi and theta).

z

x

y

+

+

Orientation vector

P (ϕ,ϑ)

Pole

phi.

theta.

ρ→

D Function O(..) with polar angles (ϕ,ϑ) or Cartesian components (ρx,ρy, ρz) of the orientation vector.

ϕ

í

z

x

y

+

+

Pole

z

x

y

P (ρx, ρy, ρz)

Pole ρx

ρy

ρz

Vector usingangle

Vector using Cartesiancomponents

Orientation vector

P (ϕ,ϑ)

ρ→ Orientation vector ρ→

D The basic axis kinematics is not important.D The orientation movement occurs as a linear interpolation in ϕ and ϑ,

i.e. as a straight line in a theoretical ϕ/ϑplane.D This is suitable for rotation-symmetrical tools.

Programming

1. Activate axis transformation type 3232101 with ”Coord(...)” (seepage 4-36).

2. Use the syntax shown below.

Page 293: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions O(), ROTAX() phi, theta, psi

Electric Drivesand Controls

4-97Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Syntax:

<No> <TCP mvmt> <phi><j> <theta><J> or

<No> <TCP mvmt> O(<j>,<J>) or

<No> <TCP mvmt> O(<rx>,<ry>,<rz>)

where:<No> Block number. See page 2-19.<TCP mvmt> Additional TCP movement.

For the syntax, please refer to the ”Descriptionof Functions” under space coordinate program-ming.

<phi> Angle name that is entered inMP 7080 00010[4]. Default: phi

<theta> Angle name that is entered inMP 7080 00010[5]. Default: theta

<j>,<J> Absolute angle values in degrees.Value range: 0_≤ j < 360_; 0_≤ J ≤ 180_

O(<j>,<J>) Orientation using function O(..) and polar angles<j> and <J> of the orientation vector.

O(<rx>,<ry>,<rz>) Orientation using function O(..) and Cartesiancomponents <rx>,<ry>,<rz> of the orientationvector in absolute dimensions. Automatic standardization to 1. As a result, thefollowing sample entries cause the identicalorientation: O(1,2,4), O(2,4,8)

Example:Settings for example:MP 1030 00110[1] for axis transformation 2: 3232101MP 7080 00010[1]: xMP 7080 00010[2]: yMP 7080 00010[3]: zMP 7080 00010[4]: phiMP 7080 00010[5]: thetaN10 G1 X0 Y0 Z0 B0 C0 Programming logical/physical axis na-

mes.N20 Coord(2) Switch axis transformation 2 on.

Linear coordinates x, y, z andorientation coordinates phi, thetacan now be programmed.

N30 x1 y2 z3 phi5 theta5 Linear coordinate interpolation with addi-tional orientation movement.

N40 Coord(0) Axis transformation off.

Special features and restrictions:D Axis transformation type 3232101 must be active.D Special path search logic avoids rotary axis rotations of more than

180 degrees.D Programming ”ROTAX(... | O(<b>)” is not possible.

Page 294: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions OvrDis, OVD OvrEna, OVE

4-98 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.56 Feed 100%, OvrDis, OVD, OvrEna, OVE

EffectThe program control influences the effect of the feedrate potentiometerfor feedrate and rapid travel. Both functions are in effect in the ”manual data input” and ”automatic”operating modes.

ProgrammingSyntax:OvrDis

Abbreviation: OVD

Feed potentiometer OFF The feedrate is set to 100% of the programmedvalue irrespective of the feedrate potentiometer.

OvrEna

Abbreviation: OVE

Feed potentiometer ON The feedrate depends on the position of thefeedrate potentiometer.

The following applies:D Both functions are modal and deselect each other mutually.D The power-up state can be specified in the machine parameters.D Both functions may be written together with other path conditions in

the same block.

Example:: Feed potentiometer set to

100%.N40 OVD G1 X5 Z-2 F200 S100 M4 Deactivate feed potentiometer.: Switch feed potentiometer to

40%, feedrate stays at 100%.N80 OVE X100 Y50 Activate feed potentiometer.

Feedrate switches to 40%.

Page 295: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PathAcc, PAC

Electric Drivesand Controls

4-99Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.57 Change the Maximum Path Acceleration PathAcc, PAC

EffectIn the parts program, reduces the upper limits forD path acceleration andD path deceleration.Both the acceleration and deceleration values are preset using the ma-chine parameters and can be switched together or separately in theparts program.

. The programmed or preset path acceleration can be limited by themaximum permitted axis accelerations of the axes participating inthe path.

ProgrammingSyntax:PathAcc(ACC<Value>) Setting of the path acceleration and

deceleration together.PathAcc(UP<Value1>, DOWN<Value2>)

Setting the path acceleration and de-celeration separately.

PathAcc()orPathAcc(0)

Reactivate the acceleration valuesfrom MP 7030 00210 and7030 00220.

Abbreviation: PAC(..)

where:<Value> Acceleration value. Depending on the currently active mea-

suring units (G71/G70), the control interprets the program-med value as ”1000 inch/s2” or ”m/s2”.

<Value1> Value for acceleration. Otherwise, the same as for <Value>.<Value2> Value for deceleration. Otherwise, the same as for <Value>.

Special features and restrictions:D The maximum programmable acceleration values are limited at all ti-

mes by the machine parameter values.D We recommend that the function be programmed in a separate block.

Page 296: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PathAcc, PAC

4-100 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:N30 G71 Switch on metric programming.N40 PAC(UP1.5):

Set path acceleration to 1.5 m/s2.

N140 PAC(ACC5):

Set path acceleration and deceleration to 5m/s2.

N200 PAC(UP3.5,DOWN2):

Set path acceleration to 3.5 m/s2 and pathdeceleration to 2 m/s2.

N240 PAC():

Reset acceleration values to machine para-meter setting.

Page 297: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PosDepHSOut, PHS

Electric Drivesand Controls

4-101Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.58 Position-Dependent High-Speed Output PosDepHSOut, PHS

EffectAffects the status of a high-speed (HS) output using a programmed tra-versing movement.As soon as the command NC position, based on the start or end of thecurrent block, reaches a programmable value, the HS output is set or re-set, depending on the programming.How long the output is to remain set after the specified event has occur-red can be programmed.

. Setting the parameters of available HS outputs: using MP4075 00102.

ProgrammingSyntax:

PosDepHSOut(<Mode>,<Distance>,<Duration>)

Abbreviation: PHS(..)

where:<Mode> Desired method of operation of the function.

Input values: 0, 1 or -1.0 Modally saves programmed data using <Distance>

and/or <Duration>. The current status of the HS output is not changed.

1 Modally saves programmed data using <Distance>and/or <Duration> and sets the HS output.The relevant modal data values apply to the unpro-grammed parameters.

-1 Resets the HS output.If a <Distance> is programmed, it has only a local effectfor this block. If a <Duration> is programmed, it is ignored.

<Distance>Distance to the start/end of the block where, when it isattained, the signal is to be set (in mm/inches).Default value: 00: At end of blockgreater than 0: Distance to start of blockless than 0: Distance to end of block

<Duration> Maximum time that the HS output is switched on (in ms).Range of values: 0.5 - 10000.0Programmed values are internally rounded to the next largerinteger multiple of the NC cycle time.

Page 298: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PosDepHSOut, PHS

4-102 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples::N05 G71N10 PHS(0,-1.2,40)::::

Configure function.In a subsequent call using PHS(1) syn-tax, the HS output is set for approx.40 ms about 1.2 mm before attaining theend point.

N210 G1 G91 F1000N220 X10 Y23 PHS(1):

Set HS output according to configurationin N10.

:N330 X10 PHS(1,0.1,900):

Set HS output for max. 900 ms 0.1 mmafter the start position.

N350 X20 PHS(-1,-0.3):

Reset HS output 0.3 mm before the endposition.

Special features and restrictions:D 1 HS output is supported per channel.D The function has an effect on a traversing movement only if it is pro-

grammed in the same block.D A set HS output is reset only after the ON time has elapsed. A control

reset does not affect this time.D <Distance> always refers to the current command position from the

NC block.System-related delays (caused by e.g. drive functions or axis coa-sting) are not taken into account here.

D If a new PHS job occurs during an elapsing ON time, the NC deletesthe still-active job and executes the new job.

. If no signal change occurs on the HS output in the case of two sub-sequent PHS jobs, the external hardware is generally not capableof recognizing the new job.

Page 299: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PmTSel, PMS

Electric Drivesand Controls

4-103Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.59 Activate Placement Tables PmTSel, PMS

EffectActivates placement tables (correction tables of the ”Inclined plane”placement). Such correction tables are stored as XML files in the file sy-stem of the control.

ProgrammingSyntax:

PmTSel(<Path><Filename>)

Abbreviation: PMS(..)

where:<Path> Optional path information for the directory in which <File-

name> is stored.If there is no information, the file will be searched in the ”/da-tabase” directory. If <Filename> is not present there, the control uses the searchpath for subroutines so that the search for <Filename> canalso be carried out in other directories.

<Filename> File name of the placement table, incl. the file extension.Tables with standard names (PM<Number>.pmt) can beactivated directly using the number, e.g. PmTSel(3) activates table PM3.pmt.

. Please refer to the Operating Instructions for how to create and editplacement tables.

Page 300: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PolarPol, POP

4-104 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.60 Polar Coordinate Programming

4.60.1 Define Pole PolarPol, POP

EffectD Defines the origin of the polar coordinate system based on the active

plane of the active program coordinate system.D Sets polar angle 1 for polar coordinate programming (standard ad-

dress: A; definable in MP 8005 00001) to 0 degrees.D Sets polar angle 2 for polar coordinate programming (standard ad-

dress: B; definable in MP 8005 00002) to 90 degrees.

ProgrammingSyntax:PolarPol(<PCValue>,<SCValue>) Specify pole.

PolarPol(ACTPOS) Set pole to current position.

PolarPol()orPolarPol(0)

Set pole to coordinate 0.0.

Abbreviation: POP(..)

where:<PCValue>Pole value for the primary coordinate.<SCValue>Pole value for the secondary coordinate.

Special features and restrictions:D If ”PolarPol” is not used, the NC uses the origin of the active program

coordinate system as the pole.D A programmed pole remains effective for the current plane only until

the next time that the plane is switched (see page 3-28).

Example::N10 G18:

switch to the ZX plane with Z as the primaryand X as the secondary coordinate.

N30 G0 X10 Z25:

Positioning movement in rapid traverse toCartesian coordinates X10 and Z25.

N40 POP(ACTPOS):

The current position values (PCValue=25,SCValue=10) are taken on for the pole defi-nition.

Page 301: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PolarPol, POP

Electric Drivesand Controls

4-105Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.60.2 Programming Polar Coordinates

The IndraMotion MTX permits the programming of polar coordinatesboth in a plane (2D) and in space (3D).The desired end point is entered usingD radius value (distance of target point P from pole)D polar angle 1 andD polar angle 2.

Z

X

Y

XR

YR

RA

Pole

B

R: Radius value (= XR=YR)A: Polar angle 1.B: Polar angle 2.

+P

Example: Polar coordinates in the plane with active G17

Radius value:An axis address is always used to program the current working plane(e.g. ”X” or ”Y” for an active G17). This programmed coordinate is alsocalled a radius coordinate. In the case of absolute dimension programming, it indicates the distanceof the target point from the pole; in the case of incremental programming,it indicates the distance of the target point from the starting point. If both possible axis addresses are programmed in a single block, a run-time error occurs.

Polar angle 1:D By default, this is programmed as address ”A”; it always lies in the cur-

rent working plane.D Each programmed polar angle 1 refers to the last-programmed ra-

dius coordinate axis. A positive value indicates rotation in the mathe-matically positive sense; it remains in effect until a new value isprogrammed.If incremental programming is active, the programmed angle is calcu-lated incrementally.

D When polar coordinate programming is activated with POL, polar an-gle 1 is set to a value of 0 degrees.

Page 302: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PolarPol, POP

4-106 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Polar angle 2:D By default, this is programmed as address ”B”; if absolute dimension

programming is active, it describes the angle between the normalaxis (to the current working plane) and the vector of the current pole tothe target point. It remains in effect until a new value is programmed. If incremental programming is active, the programmed angle is calcu-lated incrementally.

D When polar coordinate programming is activated with POL, polar an-gle 2 is set to a value of 90 degrees. In this case, the target point is located precisely in the active workingplane. Now the polar coordinates have an effect only in the plane. Allother coordinates outside of the working plane are interpreted accor-ding to Cartesian coordinates. This applies especially to programmedcoordinate values of the current normal axis!

D ”Real” spatial polar coordinates (spherical coordinates) occur if polarangle 2 becomes unequal to 90 degrees. Programming coordinatevalues of the current normal axis then leads to a runtime error. Howe-ver, all coordinates outside of the 3D space may be included simulta-neously in programming. As in the 2D case, they are also interpretedaccording to Cartesian coordinates.

D If polar angle 2 is 0 degrees, the value of polar angle 1 is unimportantbecause the programmed point lies exactly vertically over the pole.

Z

X

Y

XR

YR

A

Pole

B

R: Radius value (= XR=YR)A: Polar angle 1.B: Polar angle 2.

+

P

R

Example: Polar coordinates in space with active G17

. The default addresses for polar angles 1 and 2 can be changedusing machine parameters 8005 0001 and 8005 0002. Therefore,they may be different in your system.

Page 303: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PolarPol, POP

Electric Drivesand Controls

4-107Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example: Polar coordinate programming in absolute dimensionsN10 G18::

Plane switch. Here: switch to the ZX plane withZ as the primary and X as the secondary coor-dinate.

N40 POP(25,10)::

Pole definition in the current plane (here: withCartesian coordinates Z=25 and X=10).

N50 G1(POL) Z20 A70:::

Path movement in polar coordinates accordingto P2 (see Fig.): P2 is defined by the absolutedistance from the pole (here: 20 mm) and thepolar angle 1 (here: A=70 degrees), based onthe programmed radius axis (here: Z axis).

P 10 20 30 40

10

20

Pole

A70

P2

20

X

P1

: Traversed path

Z’

Z

N60 G1(POL) X20 A90::::::::::

Path movement in polar coordinates accordingto P3 (see Fig.):P3 is defined by the absolute distance from thepole (here: 20 mm) and polar angle 1 (here:A=90 degrees), based on the programmed ra-dius axis (here: X axis).Alternatively, the following programming is alsopossible:N60 G1(POL) Z20 A180 orN60 Z20 A180

P 10 20 30 40

10

20

PoleA90

P2

20P1

: Traversed path

Z’

X’

P3

: Position vectorX

Z

Page 304: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PolarPol, POP

4-108 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example: Polar coordinate programming in incremental dimensionsN10 G17 G90 G0 X0 Y0 Starting position: P0N20 G1(POL) X200 A0 P1N30 G91 Y200 A30 P2N40 A60 P3N50 A60 P4N60 A60 P5N70 A60 P6N80 A60 P7N90 X0 P0N100 M30

A30

P0

Y : Traversed path

X

P1

Y’

P2P3

P4

P5 P6

P7

P0

A60

Page 305: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PoleSet, PLS

Electric Drivesand Controls

4-109Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.61 Define Mirroring/Rotation Point PoleSet, PLS

EffectThis function specifies the absolute position of the pole for the Mirror,Scale and Rotate input tools. The defined pole is then the reference pointof these input tools, thus providing the mirroring/rotation point.

. The function is not required if mirroring or rotation is to take placewith reference to the program zero point.

The following applies:D PoleSet is modally effective. The position of the pole refers to the cur-

rent program coordinate system and thus remains in effect until it isreset to the program coordinate origin or is redefined.

D The function does not cause any axis traversing.D The function may be written in the same block as other path condi-

tions and input tools.D The programmed pole refers to the functions Mirror, Scale and Ro-

tate.

ProgrammingSyntax:PoleSet(<Coordinates>) Set pole to given coordinates. The given

coordinates are to be separated bycommas (e.g.: PoleSet(X5,Y2)).

PoleSet(0) orPoleSet() or

reset the pole to the origin of theprogram coordinate system.

Abbreviation: PLS(..)

Example::N30 PLS(X5,Y2):

Set the mirror/rotation point to a position ofX=5 and Y=2.

N130 PLS():

Reset the mirror/rotation point to theprogram coordinate origin.

Special features and restrictions:D The position of the pole must be entered absolutely, i.e. based on the

current program zero point.

Page 306: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PosMode, PMD DC ACP

4-110 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ACN

4.62 Positioning Type for Endless Axes PosMode, PMDLocal Positioning Type for Endless Axes DC, ACP, ACN

EffectSpecifies in which direction axes of type ”endless” are to rotate during apositioning procedure.The following applies:D As opposed to ”PosMode”, DC(...), ACP(...) and ACN(...) have a

block-by-block effect, overriding the active positioning type of thecorrespondingly programmed axis in the current block.

D Position information that is programmed in combination with DC,ACP and ACN functions are always interpreted as absolute positionvalues.

ProgrammingSyntax:PosMode(<Adr><Type>) Activate the positioning type for the axis

with address <Addr> according to <Type>.Several axes may be programmed in theparentheses. Activate the positioning typefor nonprogrammed rotary/endless axes inthe current channel according toMP 1003 00005.

PosMode() orPosMode(0)

Activate the positioning type for all axes inthe current channel according toMP 1003 00005.

Abbreviation: PMD(..)

<Addr>=DC(<Value>) Axis <Addr> approaches the absolute posi-tion <Value> along the shortest path.

<Addr>=ACP(<Value>) Axis <Addr> approaches the absolute posi-tion <Value> in the mathematically positivedirection (see the following note).

<Addr>=ACN(<Value>) Axis <Addr> approaches the absolute posi-tion <Value> in the mathematically nega-tive direction.

where:<Addr>: Axis address.

Axes of type ”endless” are permitted.<Value>: Path information for <Addr>.

Page 307: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

ACPNC-Functions PosMode, PMD DC ACN

Electric Drivesand Controls

4-111Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Type>: Positioning type.0: no positioning logic.

The direction of travel always results solely from thedifference between the old and the new position.

1: shortest path. The maximal traverse path of the axis is no morethan half of the relevant modulo value.

2: According to programmed positive/negative sign: ”+”: Clockwise rotation; ”-”: Counterclockwise rota-tion.

3: The active software limit switches (1020 00001/3and 1020 00002/4) define the permissible traversingrange and the possible direction. The permissibletraversing range extends from the negative to thepositive limit switch. The limit switch ranges turn ac-tive once the axis has been referenced. Coordinateinformation is permissible in negative and in positivemodulo range (e.g. 20_ corresponds to -340_). Thecoordinate signs and the local coordinate attribute”DC” are ignored. The attributes ”ACP”. ”ACN” and”IC”, on the other hand, are observed. In case ofviolation of the working range, they cause an errormessage.

. Mathematically positive direction: Counterclockwise sense of ro-tation seen from a coordinate axis in the direction of the coordinateorigin.

Example:N40 B=ACP(-258):::

Irrespective of ”PosMode”, the physical axis desi-gnated ”B” traverses in the mathematically positivedirection to the position 258 degrees. The positive/negative sign is ignored.

N80 PMD(A1C2):::

Positioning type ofAxis A: shortest pathAxis B: according to MP 1003 00005Axis C: positive/negative sign

Special features and restrictions:D Several DC, ACP and ACN functions (for correspondingly different

axes) can be programmed in the same block.D DC, ACP and ACN functions are effective only for axes of type ”Ro-

tary” or ”Endless”. If they are programmed in conjunction with otheraxis types, the control ignores them.

D Negative signs in the position information of DC, ACP and ACN func-tions are ignored.

Page 308: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PosMode, PMD DC ACP

4-112 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ACN

D The following applies for the positioning type ”limited path”:Negative full angles are always indicated in the positive modulo range(0..360_).The coordinate attribute DC ”shortest path” is ignored. Instead, thecontrol selects the ”permissible path” with automatic adjustment of di-rection.Direction positioning by means of signs, coordinate attributes or in-cremental (+/-, ACP/ACN and G91/IC) are not adjusted; these arepermissible only within the limit switch range.Movements are only permitted within a full rotation.

Page 309: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PrecProg, PRP

Electric Drivesand Controls

4-113Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.63 Precision Programming PrecProg, PRP

EffectReduces the feedrate at contour transitions and on circular path seg-ments so that a preset precision can be maintained.Alternatively the precision can be influenced by the information for theD maximum permitted contour or radius error e on the contour transi-

tion or for arcs, or theD maximum path overtravel d (distance from corners) that is not to be

exceeded when traversing through a contour transition.

d

Act2

Comm1

Act3Act4

Act5

Act6 Comm5

Comm4

= command contour; command position

= actual contour, actual position with ”PrecProg”

= actual contour’; actual position’ without ”PrecProg”

Comm2

Comm3

Act1 Comm6

Contour error

Comm3

Comm2

Act3Act4

Act5

Act6

Comm4

Comm5

Act2

Comm1

Ract(with ”PrecProg”)

Rcomm

Radius error on arc(at constant path velocity)

Ract(without ”PrecProg”)

Contour error at block transition with”PrecProg”

Contour error at block transition without”PrecProg”

Actual contour with ”PrecProg”

Command contour

Actual contourwithout ”PrecProg”

Actual contour with ”PrecProg”Command contour

Actual contour without ”PrecProg”

e

Command contour

e

. In contrast to the ”Precision” function (G61/G62; see page 3-49),the feedrate does not have to be reduced to 0 at a block transition.See ”Special features and restrictions”.

Page 310: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PrecProg, PRP

4-114 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ProgrammingSyntax:PrecProg orPrecProg(1)

Precision programming ON.Max. Max. permitted contour/radius er-ror e according to MP 8003 00001.

PrecProg(EPS<e>) Precision programming ON.Maximum permitted contour/radius er-ror: <e>.

PrecProg(DIST<d>) Precision programming ON.Maximum permitted path coasting: <d>.For circular path segments: Take e valuefrom MP 8003 00001 into account.

PrecProg() orPrecProg(0)

Precision programming OFF.

Abbreviation: PRP(..)

where:<e>: Maximum permitted contour/radius error in mm/inches (de-

pending on G70/G71).<d>: Maximum permitted path coasting in mm/inches (depending

on G70/G71).

Special features and restrictions:D All affected axes must be set with the identical dynamics.D If G8 and G62 are not active, braking to v=0 occurs at every block

transition.D Precision programming supplies sensible results only if the influence

of the acceleration on coasting is ignored.

Page 311: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PtBlkEnd, PTE

Electric Drivesand Controls

4-115Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.64 Stroke Release Time (Interpolation End Point) PtBlkEnd, PTE

Effect

. Works together with functions ”Punch” (see page 4-119) and ”Nib-ble” (see page 4-84).

The functionD defines time reference event ”NC interpolator is reaching the end

point of the traverse movement” for the given axes andD specifies the period between the time reference event and the stroke

release.

In this manner, the stroke release point – based on the time reference –can be offset as far as desired. The following is possible:D Early stroke release

(e.g. to compensate for a constant, application-dependent waitingtime that is caused by signal processing) and

D Delayed stroke release(e.g. to increase the positioning precision for axes with lower dyna-mics, or for punching with hold-down devices).

. Additional functions that influence the stroke release time:PtBlkEnd (see page 4-115)PtInpos (see page 4-118).

ProgrammingSyntax:

PtBlkEnd(<Axis><Time>,<Axis><Time>...)

Abbreviation: PTE(..)

where:<Axis> Logical axis name.<Time> Desired period (in ms) between the time reference event

and the stroke release.0: stroke release at time reference event.negative value: early stroke releasepositive value: delayed stroke release

Special features and restrictions:D Functions PTD, PTE and PTI act modally and cancel each other mu-

tually.D Punching or nibbling must be applied in MP 8001 00010 .D All programmed time values are rounded up to match the SERCOS

cycle time slots.

Page 312: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PtBlkEnd, PTE

4-116 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D In the case of traverse movements in which several axes with va-riously defined time references and waiting times participate, the”weakest” axis determines the actual stroke release behavior. Gene-ral rule:D Axes where the time reference = ”Inpos window” (see page 4-118)

are ”weaker” than axes where the time reference = ”Interpolationend point”.

D If the time reference is identical, the ”weakest” axis is the one withthe highest waiting time.

D Function PtDefault (see page 4-117) can be used to reset the strokerelease of all axes in the system to the default values.

Example:- Axis configuration: X, Y, C- SERCOS cycle time: 3 ms

Setting the stroke release times::N10 PTE(X-10):::

Time reference event for axis X:”NC interpolator is reaching the end point of thetraverse movement”.Early stroke release by 10 ms.

N20 PTI(Y10,C2)::::

Time reference event for axes Y and C: ”Inpos win-dow reached”(For the function, see page 4-118).Y axis: delayed stroke release by 10 ms.C axis: delayed stroke release by 2 ms.

Effect during traverse movements::N100 G1 Y20 C10::::::

Y determines the stroke release behavior becausea longer waiting time has been programmed withan identical time reference (see N20).Since the waiting times are rounded up to theSERCOS cycle time slots, an actual delayed strokerelease of 12 ms results.

N110 X20 C20:::::::

C determines the stroke release behavior becauseaxes where the time reference = ”Inpos window”are ”weaker” than axes where the time reference =”Interpolation end point”.Since the waiting times are rounded up to theSERCOS cycle time slots, an actual delayed strokerelease of 3 ms results.

N120 X30::

X determines the stroke release behavior becauseonly X is moved.Actual early stroke release: -9 ms.

N130 PTD::

Set a stroke release of all axes in the system ac-cording to MP 8001 00020 and MP 8001 00021(For the function, see page 4-117).

Page 313: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PtDefault, PTD

Electric Drivesand Controls

4-117Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.65 Stroke Release Time (Set to Default) PtDefault, PTD

Effect

. Works together with functions ”Punch” (see page 4-119) and ”Nib-ble” (see page 4-84).

Set the time of the stroke release of all axes in the system according tothe values defined in MP 8001 00020 and MP 8001 00021.

ProgrammingSyntax:

PtDefault

Abbreviation: PTD

Special features and restrictions:D Functions PTD, PTE and PTI act modally and cancel each other mu-

tually.D Punching or nibbling must be applied in MP 8001 00010 .

Example:See page 4-116.

. Additional functions that influence the stroke release time:PtBlkEnd (see page 4-115)PtInpos (see page 4-118).

Page 314: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions PtInpos, PTI

4-118 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.66 Stroke Release Time (Inpos Window) PtInpos, PTI

Effect. Works together with functions ”Punch” (see page 4-119) and ”Nib-

ble” (see page 4-84).

The functionD defines time reference event ”Inpos window reached” for the given

axes andD specifies the period between the time reference event and the stroke

release.

In this manner, the stroke release point – based on the time reference –can be offset as far as desired (e.g. to increase the positioning precisionfor axes with lower dynamics, or for punching with hold-down devices).

. Additional functions that influence the stroke release time:PtBlkEnd (see page 4-115)PtInpos (see page 4-118).

ProgrammingSyntax:

PtInpos(<Axis><Time>,<Axis><Time>...)

Abbreviation: PTI(..)

where:<Axis> Logical axis name.<Time> Desired period (in ms) between the time reference event

and the stroke release.

Special features and restrictions:D Functions PTD, PTE and PTI act modally and cancel each other mu-

tually.D Punching or nibbling must be applied in MP 8001 00010 .D All programmed time values are rounded up to match the SERCOS

cycle time slots.D In the case of traverse movements in which several axes with va-

riously defined time references and waiting times participate, the”weakest” axis determines the actual stroke release behavior. Gene-ral rule:D Axes where the time reference = ”Inpos window” (see page 4-118)

are ”weaker” than axes where the time reference = ”Interpolationend point”.

D If the time reference is identical, the ”weakest” axis is the one withthe highest waiting time.

D Function PtDefault (see page 4-117) can be used to reset the strokerelease of all axes in the system to the default values.

For an example, see section 4.64.

Page 315: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Punch, PUN

Electric Drivesand Controls

4-119Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.67 Punching Punch, PUN

EffectSwitches the ”Punching” function on or off.When punching is activated, a stroke is releasedD at the end of each programmed traversing movement (individual

stroke operation), orD at the end of every partial path generated by function ”NUM” (see

page 4-86) or ”LEN” (see page 4-72) The subsequent traversing motion always starts before the stroke is

finished.

. Functions to influence the stroke release time:PtDefault (see page 4-117)PtBlkEnd (see page 4-115)PtInpos (see page 4-118).

ProgrammingSyntax:Punch(1) orPunch

Punching ON.

Punch(0) orPunch()

Punching OFF.

Abbreviation: PUN(..)

Special features and restrictions:D Punching must be released using MP 8001 00010.D The function already has a modal effect on traversing movements

that are programmed in the same block.D The control can use function ”NUM” or ”LEN” to automatically gene-

rate partial paths from the programmed distance traversed; a strokeis released at the end of each of these partial paths.

D If nibbling is switched on (see page 4-84), the function deselects pun-ching.

D Blocks that do not contain axis coordinates from the active plane alsodo not release a stroke.

D If the PLC suppresses the stroke release, processing remains at thestroke release position until the PLC releases the stroke release.

Page 316: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Punch, PUN

4-120 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:- G90 is active (absolute dimension programming)- active plane: X/Y- current position: X=0, Y=0, C=0:N10 C10 Punch(1) Punching ON. C-axis rotates to 10 de-

grees. No stroke because the X- and Y-axes are not programmed.

N20 C60 C-axis rotates to 60 degrees. No strokebecause the X- and Y-axes are not pro-grammed.

N30 X0 No traversing movement because theX-axis is already located on position 0. A stroke occurs because the X-axis islocated in the active plane.

N40 LEN=12 Divide the following traversing blocks intoidentical partial paths with a maximum of12 mm.

N50 X110 The traversing block is divided into 10identical 11-mm partial paths. Strokesare executed in positions X11, X22, X33... X99, X110

N60 Y30 NUM=3 Overrides the modally effective LEN(N40) for the current block. Divide the traversing blocks into 3 identi-cal partial paths. Strokes at Y10, Y20,Y30.

N70 Y90 LEN from N40 is in effect again. Strokes at Y42, Y54, Y66, Y78, Y90.

N80 X50 Y50 Punch():

Punching OFF. Traversing movement to X=50, Y=50.

11 22 33 665544 77 88 99 110

10

20

30

90

66

54

42

78

00

X

Y

: Stroke

LEN=12X0 through X110

(10 path segments of 11 mm each)

LEN=12Y42 through Y90(5 path segmentsat 12 mm each)

NUM=3Y10 through Y30(3 path segmentsat 10 mm each)

Page 317: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions RedTorque, RDT

Electric Drivesand Controls

4-121Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.68 Torque Reduction RedTorque, RDT

Effect”RedTorque” suppresses the value of machine parameter 1003 00010with the programmed value on an axis-to-axis basis.The value of the machine parameter itself is not changed.In this way, the reduced maximum torque of an axis that can go into effectafter a positive slope of axis interface signal ”Torque reduction”(qAx_TrqLim) is no longer permanently limited to the value of the ma-chine, but can instead be set ”dynamically”.

ProgrammingSyntax:RedTorque(<Axis1>,<Achse2>, ...)

Set the values for the reduced maximumtorque to the programmed values.

RedTorque(0) orRedTorque()

Set the values for the reduced maximumtorque to the machine parameter values(MP 1003 00010).

Abbreviation: RDT(..)

where:<Axis i>: Physical or logical axis designation, incl. the

corresponding maximum torque as a % of the axisstandstill torque. Range of values: 0 to 500%.

Example:N8 RDT(X5)::

With the next positive edge of the relevant axis-based”Torque reduction” signal, the maximum torque for the axis(X in this case) will be limited to 5% of its standstill torque.

Page 318: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions RemAxis, RAX

4-122 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.69 Remove Axis from Axis Group RemAxis, RAX

EffectRemoves a synchronous axis from the calling channel. This turns a syn-chronous axis into an asynchronous axis.The asynchronous axis can then be programmed in any channel usingits physical axis name.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

RemAxis(<PAN> | <PAI> | <LAN>,<PAN> | <PAI> | <LAN>...)

Abbreviation: RAX(..)

where:<PAN> Physical axis name.

Specifies the axis that is to be removed from the currentchannel.

<PAI> Physical axis index.Same effect as <PAN>.

<LAN> Logical axis name.Same effect as <PAN>.

Special features and restrictions:D Block preparation is not interrupted by removing an axis.

D Invalid axis names generate an error message.

D If an axis to be removed is defined in the system but is already no lon-ger present in the current channel, an error message is not issued.

D Axis positions in the same block must always be programmed accor-ding to RemAxis(...).

Example::N030 RAX(XP,2,Z):

Physical axis XP, the physical axis assignedindex 2 and logical axis Z are removed fromthe channel.

Page 319: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions RemLogName, RLN

Electric Drivesand Controls

4-123Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.70 Remove Logical Axis Name RemLogName, RLN

EffectDeletes the logical axis name of a synchronous axis in the calling chan-nel. The axis remains in the channel, but can be programmed there onlyusing its physical axis name or physical axis index.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

RemLogName(<PAN> | <PAI> | <LAN>,<PAN> | <PAI> | <LAN>...)

Abbreviation: RLN(..)

where:<PAN> Physical axis name.

Specifies the axis whose logical axis name is to be remo-ved from the current channel.

<PAI> Physical axis index.Same effect as <PAN>.

<LAN> Logical axis name.Same effect as <PAN>.

Special features and restrictions:D A given axis must be at a standstill. If this is not the case, the control

generates an error message and terminates the program.

D Axis positions in the same block must always be programmed accor-ding to the expression RemLogName(...).

Example::N030 RLN(YP,3,Z):

The logical names of physical axis YP, the3rd physical axis and logical axis Z are re-moved from the calling channel.

Page 320: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions RemSpindle, RSP

4-124 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.71 Remove Channel Spindles RemSpindle, RSP

EffectRemoves a logic spindle from the calling channel.

ProgrammingRemSpindle (<SysSpNo> | <SysSpName> | <ChanSpName , ...)

Removes one channel spindle from the channel.where:<SysSpNo> 1..32<SysSpName> SSp01 .. SSp32 or SSP01 .. SSP32<ChanSpName> S1 .. S8

Abbreviation: RSP

Special features and restrictions:D A spindle which is operated at constant cutting speed (G96) cannot

be removed from the channel.

Example:...N50 RSP(S2) Removes the 2nd channel spindle from the

channel.N60 M203 S2=500 generates a runtime error as there is no 2nd

channel spindle....

Page 321: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions REPOSTP

Electric Drivesand Controls

4-125Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.72 Asynchronous Subroutines: Define the Point of Return to Path in Asynchronous Subroutine REPOSTP

EffectDefines whether the control, after the end of the asynchronous subrou-tine in which function REPOSTP is programmed, is to position onD the starting pointD the end point, orD the point of interruptionof a traversing block that may have been interrupted.If no traversing block was active at the time of interruption, the controlalways positions on the last active coordinates.

REPOSTP thus suppresses a point of return to path that was set earlierusing ASPRTP for the currently running asynchronous subroutine (seepage 4-7).

. You can find extensive information regarding the use and parame-ter settings of asynchronous subroutines in the Description ofFunctions.

ProgrammingSyntax:

REPOSTP(<Point>)

where:<Point> Desired point of return to path:

1: Starting point2: End point3: Interruption point

Special features and restrictions:D The function has been designed for use in an asynchronous subrou-

tine.D The point of return to path set previously using ASPRTP (see page

4-7) for the running asynchronous subroutine automatically goesback into effect after the end of the subroutine.

D Any correction modifications made within an asynchronous subrou-tine are automatically taken into account in the internal calculation ofthe required point of return to path.

Page 322: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Rotate(...), ROT(...)

4-126 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.73 Input Tool: Rotate Rotate(...), ROT(...)

EffectThe Rotate function is one of the input tools.The control rotates a programmed contour in the active plane (for pla-nes, please refer to G17, G18, G19 or G20).Rotation always refers to the current point of rotation (see function Pole-Set, page 4-109). If this was not explicitly programmed, the current pro-gram zero point is the point of rotation.Using this function, you need program only once recurrent programmingsteps that are rotated around a specific angle.In addition, you do not have to convert the dimensions of angled work-pieces to the basic workpiece coordinate system; you simply take themover directly from a production drawing and specify the correspondingangle of rotation. The control will do the rest.

. Rotation is an input tool; as a result, it does not change the currentprogram coordinate system. An input tool merely provides anotherinput method for the program coordinates.Rotate can also be used together with Mirror and Scale.

The following applies:D The function acts modally. It remains active until it is switched off.D It may be programmed in the same block as other path conditions and

input tools.

ProgrammingSyntax:Rotate(<Angle of rota-tion>)

Switch on rotation around the desired<angle of rotation>.

Rotate(0) orRotate()

Switch off rotation for all the axes in thechannel. Set all angles of rotation to ”0”.Approached axis positions are retaineduntil they are reprogrammed.

Abbreviation: ROT(..)

where:<Angle of rotation> > 0: Counterclockwise rotation

< 0: Clockwise rotation= 0: Switch off rotation.

All following programmed coordinates of the activeplane are rotated around the rotation point (seePoleSet, page 4-109).Rotation does not become active until the nexttraversing information.

Page 323: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Rotate(...), ROT(...)

Electric Drivesand Controls

4-127Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Special features and restrictions:D The function takes into account the interpolation parameters in the

case of circular interpolationD It influences the programmable contour shift. See page 4-134.D It does not influence:

D zero offsets (G54-G59.5; see page 3-46),D program coordinate offsets (Trans or ATrans; see page 4-172),D setting of the program position (”SetPos”; see page 4-133),D approaching reference point coordinates (G74 ; see page 3-55),D approaching axis position coordinates (G76 ; see page 3-58),D milling radius and tool length correction values.

Example::N30 ROT(45):::

Rotation ON. All following programmed coordinates ofthe active plane are rotated counterclockwise by 45degrees around a possibly programmed rotation point.

Y

XP

Effect of: ROT(45)(Rotation point is program zero point)

Y

X

P

Effect of: ROT(-45)(Rotation point is program zero point)

Rotating an orientation vectorAn orientation vector is rotated around the normal of the active plane. Any scaling that may be active or a mirror/rotation point have no effect onthe result.Syntax as described under ”Programming”.

Page 324: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions RoundEps, RNE

4-128 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.74 Rounding Corners with Specification of the Deviation RoundEps, RNE

EffectThis function inserts tangential transition arcs between 2 linear blocks inthe main plane. On the one hand, this leads to a minor modification of the programmedcontour at these corners, but on the other hand, continuous speed andacceleration patterns are achieved during interpolation.

ProgrammingSyntax:RoundEps(<Deviation>) Rounding corners ON between 2 li-

near blocks.

RoundEps(DEF) Rounding corners ON between 2 li-near blockswith default deviationfrom MP 7050 00110.

RoundEps(0) orRoundEps()

Rounding corners OFF between 2linear blocks.

Abbreviation: RNE(..)

where:<Deviation> Maximum permitted deviation (in mm) between the

modified and the programmed contour. Positions afterthe decimal point are allowed. The control calculates a suitable tangential transitionarc on its own.

Special features and restrictions:D Functions ”ChLength”, ”ChSection”, ”RoundEps” and ”Rounding” act

modally and cancel each other.D The control does not execute ”corner rounding” if

D at least one of the two neighboring blocks is not a linear block.D at least one of the two neighboring blocks has a path segment out-

side the selected principal plane, orD at least one of the two neighboring blocks has a traversing path

which is smaller than the path set in MP 7050 00120 (2 to 90 mm,default value: 10 mm), or

D the block transition is considered to be continuous according to themachine parameters, i.e. the angle between the two blocks issmaller than the maximum angle specified in MP 7050 00130 (de-fault = 1 degree).

D If the plane, a zero offset, or an axis transformation is switched bet-ween 2 subsequent blocks, no rounding is generated.

Page 325: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Rounding, RND

Electric Drivesand Controls

4-129Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.75 Rounding Corners with Specification of the RadiusRounding, RND

EffectThis function inserts tangential transition arcs between 2 linear, circularor helical blocks in the main plane. On the one hand, this leads to a minor modification of the programmedcontour at these corners, but on the other hand, continuous speed andacceleration patterns are achieved during interpolation.

ProgrammingSyntax:Rounding(<Radius>) Rounding corners ON between 2 linear/

circular/helical blocks.

Rounding(0) orRounding()

Rounding corners OFF between 2 li-near/circular/helical blocks.

Abbreviation: RND(..)

where:<Radius> desired radius of the transition arc; positions after the

decimal point are allowed.

Special features and restrictions:D Functions ”ChLength”, ”ChSection”, ”RoundEps” and ”Rounding” act

modally and cancel each other.D The control does not execute ”corner rounding” if

D at least one of the two neighboring blocks has a traversing pathwhich is smaller than the path set in MP 7050 00120 (2 to 90 mm,default value: 10 mm), or

D the block transition is considered to be continuous according to themachine parameters, i.e. the angle between the two blocks issmaller than the maximum angle specified in MP 7050 00130 (de-fault = 1 degree).

D If the plane, a zero offset, or an axis transformation is switched bet-ween 2 subsequent blocks, no rounding is generated.

D Only the components of the active working plane for rounding aretaken into account. In the case of spatial straight lines, this leads to achange in direction in space. There is a similar effect for helical pathsegments.

: modified contour: programmed contour

Radius

Page 326: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Scale(...), SCL(...)

4-130 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.76 Input Tool: Scale Scale(...), SCL(...)

EffectThe Scale function is one of the input tools.The control scales a programmed contour up or down based on the pro-gram zero point.Scaling always refers to the current mirror point (see function PoleSet,page 4-109). If this was not explicitly programmed, the current programzero point is the mirror point.The Scale function can be used in parts programs for programming con-tours using one fixed size (standard size). Then, prior to calling such a”standardized” parts program (e.g. as a subprogram), you use scalingfactors for each axis to determine the scale of the programmed contour.In this way it is, for instance, easy to compensate for the contraction ofthe workpieces in the manufacture of the moulds for cast and forgedparts.

. Scaling is an input tool; as a result, it does not change the currentprogram coordinate system. An input tool merely provides anotherinput method for the program coordinates.Scale can also be used together with Mirror and Rotate.

The following applies:D The function acts modally. It remains active until it is switched off.D It may be programmed in the same block as other path conditions and

input tools.

ProgrammingSyntax:Scale(<Axis1><Factor>,...) Scaling ON with the programmed

factor for the given axes.

Scale(0) orScale()

Switch off scaling for all the axesin the channel. Set all scalingfactors to a value of ”1”.Approached axis positions areretained until they arereprogrammed.

Abbreviation: SCL(..)

where:<Axis1> Axis address (e.g. X) that is to be scaled.

Page 327: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Scale(...), SCL(...)

Electric Drivesand Controls

4-131Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Factor> Programming the axis address with a positive factor acti-vates the function.By doing so, all subsequently programmed pathcommands of the corresponding axis (e.g. X10) aremultiplied internally by this value:Factor> 1 : the contour will be scaled upFactor< 1 : the contour will be scaled downFactor =1 : the contour is not changed.Scaling itself does not release a traversing movement; itdoes not become active until the next traversinginformation.

Special features and restrictions:D Negative scaling factors are not permitted.D The scaling factors of all participating coordinates of the circle plane

must be identical for a circular/helical/helical-N interpolation! Other-wise an error message will be generated.

D The function also affects the I, J, K interpolation parameters as well asthe amount of the R address (for radius programming).

D It influences the programmable contour shift. See page 4-134.D It does not influence:

D feed programming or the active feedrate,D zero offsets (G54-G59.5; see page 3-46),D program coordinate offsets (Trans or ATrans; see page 4-172),D setting of the program position (”SetPos”; see page 4-133),D approaching reference point coordinates (G74 ; see page 3-55),D approaching axis position coordinates (G76 ; see page 3-58),D milling radius and tool length correction values.

Example::N30 SCL(X3,Y0.5)::

Scaling ON. All X-coordinates programmedsubsequently are multiplied by ”3”, and theY-coordinates by ”0.5”.

+Y

+X

10

20

2010 30 40

P2

P1

P1 = before scalingP2 = scaling result

P

Page 328: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SelCrdCouple, SCC

4-132 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.77 Selective Additive Coordinate Coupling SelCrdCouple, SCC

EffectCouples a workpiece coordinate of the current channel (target) to aworkpiece coordinate of another channel (source). The coordinate valueof the source thus has an additive effect for the coordinate value of thetarget.In this way, movements in the current channel can be superimposed bymovements that are programmed in another channel.

ProgrammingSyntax:

SelCrdCouple(SC<Channel>,CL(<Q1>,<Z1>,<Qn>,<Zn>...))

Selective additive coordinatecoupling ON.

SelCrdCouple(0) orSelCrdCouple()

All active coordinatecouplings OFF.

Abbreviation: SCC(..)

where:<Channel> Channel number in which <Qn> is located.

Input value: Integer.<Channel> must be less than the number of the activechannel.

<Qn> Source. Logical name or logical number of the coordinate in<Channel>.

<Zn> Target. Logical name or logical number of the coordinate inthe current channel.

Examples:SCC(SC1,CL(YA,YB)) Couples coordinate YB in the current chan-

nel to coordinate YA from channel 1.SCC(SC1,CL(1,1,2,2)) Couples the coordinates with logical num-

bers 1 and 2 in the current channel to thecoordinates with logical numbers 1 and 2from channel 1.

Page 329: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SetPos, SPS

Electric Drivesand Controls

4-133Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.78 Set Program Position SetPos, SPS

EffectSets the current program zero point (based on the current program coor-dinate system and the active zero point) to the corresponding program-med value without triggering axis movements. Then the new position values are displayed automatically.

ProgrammingSyntax:SetPos(<Coordinates>) Set the program zero point for the axes

programmed under <Coordinates>.

SetPos Cancel all offsets triggered by SetPos.

Abbreviation: SPS(..)

where:<Coordinates> Set the axis values to the given coordinates. The given

coordinates are to be separated by commas (e.g.:(X0,Y0)).

Special features and restrictions:D Whether SetPos offsets are cleared or deleted after a control reset

can be set for each channel using the machine parameters.

Example:

P1:

P2:

P3:

P4:

P5:

P6:

P7:

P8:

P9:

P10:

P11:

P0:

Y

X

P0

10

20

30

40

50

60

70

80

10 20 30 40 50 60 70 80 90 100 110 120 130 140 150

-130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 10

P

0

P10

P9

P8 P7

P6 P5

P4 P3

P2

P1 P11

N10 G90 F200N20 G1 X140 Y70N30 SetPos(X0)N40 G1 Y30N50 G2 X-10 Y20 I-10N60 G1 X-55N70 X-65 Y30N80 X85N90 X95 Y20N100 X-100N110 G2 X-110 Y30 J10N120 G1 Y70N130 X5N140 X0 Y80N150 SetPosM30

SetPos(X0)

. Alternatively, DIN command ”G92” can be programmed.However, the G92 command may not be programmed in the sameblock as traversing information.

Page 330: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Shift, SHT

4-134 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.79 Programmed Contour Shift Shift, SHT

EffectThe Shift function is one of the input tools.The control shifts a programmed contour parallel to the axes of the pro-gram coordinate system.

. Shift is an input tool; as a result, it does not change the current pro-gram coordinate system. An input tool merely provides another in-put method for the program coordinates.

The following applies:D Programmed shift coordinates remain in effect until they are overwrit-

ten by a new Shift block or are switched off.D If Shift is programmed by itself, it does not result in a traversing move-

ment; however, traversing information may be included in the pro-gramming for the same block.

CAUTIONIncorrect programming may cause damage to the workpiece andthe machine!Shift is influenced by Mirror, Scale and Rotate, i.e. the coordinatesof the new contour zero point which were programmed in the Shiftblock will also be mirrored, scaled or rotated

ProgrammingSyntax:Shift(<Coordinates>) Contour shift ON.

Shift(0) orShift()

Contour shift OFF.

Abbreviation: SHT(..)

where:<Coordinates> Program coordinates of the shifted contour zero point.

If there are several coordinates, they are to beseparated by commas (e.g.: SHT(X5,Y2)).

Example:N10 SHT(X10,Y10,Z50):

New contour zero point at X10, Y10, Z50.Does not cause any axis traversing.

N100 G1 X...Y...Z...:

Traversing of axes with shift values takeninto account.

N110 SHT(X20,Y20)::

New contour zero point at X20, Y20, Z50(Z shift is retained!). Does not cause anyaxis traversing.

N210 SHT() X...Y...Z...:

Switch off shift; the axes traverse to theprogrammed position.

Page 331: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SMin, SMN SMax, SMX

Electric Drivesand Controls

4-135Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.80 Speed Limitation SMin, SMN, SMax, SMX

EffectDefines the range in which the spindle speed may be located in the caseof direct speed programming (G97) and constant surface speed G96;(see page 3-75) during a machining section. The defined speed rangeapplies for all gear stages. When speed limitation is active, all speed in-formation is limited to the programmed values.The system executes modifications to the speed (including those thatare caused by the spindle potentiometer) only if they are located withinthe given speed range.

ProgrammingSyntax:SMin(S<Speed1>) Activates <Speed1 >as the lower limit of

the permitted speed range.

SMin(S0) cancels the lower limit of the first spindleor spindle group.

Abbreviation: SMN(..)

SMax(S<Speed2>) Activates <Speed2 >as the upper limit ofthe permitted speed range.

SMax(S-1) cancels the upper limit of the firstspindle or spindle group.

Abbreviation: SMX(..)

where:<Speed1>: Lowest permitted speed. Value range: > 0.

Must be lower than <Speed2>.<Speed2>: Highest permitted speed. Value range: > 0.

Must be higher than <Speed1>.

The general syntax is SMin(Sx=0 ,Sx=0 ... ) resp. SMax(Sx=-1,Sx=-1 ... ).

Example:N50 X.. Y.. SMN(S1500)N60 X.. Y.. SMX(S2500)

The spindle speed must be between1500 and 2500 rpm.

:N90 X.. Y.. SMN() SMX() Switch off the lower and upper limits (=

speed limitation OFF).

Special features and restrictions:D Speed limitation has an effect only if the programmed speed limit va-

lues lie within the gear range limits.

Page 332: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpAdmin, SPA

4-136 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.81 Release/Transfer Reserved Spindle SpAdmin, SPA

EffectPermitsD the release of a spindle that is currently reserved in the current chan-

nel without stopping a turning spindleD followed by its transfer to any channel.

. Function ”Spindle Stop” is also used to release a spindle (see page3-89).

ProgrammingSyntax:

SpAdmin(S<Num>=<Mode>,S<Num>=<Mode>...)

Abbreviation: SPA(...)

where:<Num> Number of the spindle (spindle index).

Input value: 1 - 8. Integer.<Mode:> 0: Release spindle

1: Reserve and transfer released spindle

Special features and restrictions:D A control reset or M30 releases spindles reserved by the current

channel only if the command for ”Spindle Stop” is entered in the cor-rect position in MP 7060 00020.

Example:N60 SPA(S1=0,S2=0):

1st and 2nd spindle.

Page 333: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpCoupleConfig, SPCC

Electric Drivesand Controls

4-137Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.82 Define Group of Coupled Spindles (Activate)Cancel Group of Coupled Spindles (Deactivate)

SpCoupleConfig, SPCC

EffectD Defines a group of coupled spindles and activates its spindle cou-

pling.The control automatically switches the participating spindle drives tothe position interface.

D Adds following spindles to an existing group of coupled spindles orremoves them from an existing group of coupled spindles. Added spindle drives are automatically switched to the position inter-face; removed spindle drives are switched to the speed interface (ifthe speed interface was active on the affected spindles before cou-pling).

D Deactivates spindle coupling for a group of coupled spindles and can-cels the entire group.All participating spindle drives are switched to the speed interface ifthe speed interface was active on the affected spindles before cou-pling.

ProgrammingSyntax:

SpCoupleConfig(CP=<Coupling>,MA=<Ma-ster>,S<Sequence>=1,S<Se-quence>=1...)

Define group of coupled spind-les.

SpCoupleConfig(CP=<Coupling>,MA=0)

Cancel group of coupled spind-les.

SpCoupleConfig(CP=<Coupling>,S<Following>=<Mode>,S<Folge>=<Modus>...)

Add/remove following spindlesto the group of coupled spind-les.

Abbreviation: SPCC(...)

where:<Coupling> Number of the group of coupled spindles.

Input value: 1 - 4. integer.<Master> Number of the master spindle (spindle index).

Input value: 1 - 8. Integer.<Following> Number of the following spindle (spindle index).

Input value: 1 - 8. Integer.<Mode> 0: Remove following spindle from <Coupling>.

1: Add following spindle to <Coupling>.

Page 334: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpCoupleDist, SPCD

4-138 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.83 Coupling Lag of Following Spindle SpCoupleDist, SPCD

EffectConfigures the desired position lag between the master and followingspindles at the time of coupling (when the group of coupled spindles iscreated) for the ”Spindle coupling” function.If the function is not used for a desired following spindle, its lag differenceto the master spindle is 0 degrees (at the time of coupling).

. To retract an additive angle displacement between the master andthe following spindle during an active spindle coupling, see func-tion ”SpCouplePosOffs”, page 4-140.

ProgrammingSyntax:

SpCoupleDist(S<Num>=<Lag>,S<Num>=<Lag>...)

Abbreviation: SPCD(...)

where:<Num> Number of the following spindle (spindle index).

Input value: 1 - 8. Integer.<Lag> Position lag between the master and the following spindle

(in degrees).Value range: 0_≤ Position lag < 360_. If another value is programmed, it is automatically con-verted to the given interval.

Special features and restrictions:D The function may be programmed only with spindles that currently do

not belong to a group of coupled spindles.

Page 335: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpCoupleErrWin, SPCE

Electric Drivesand Controls

4-139Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.84 Synchronous Mode Error Window SpCoupleErrWin, SPCE

EffectConfigures the maximum permitted position deviation between the com-mand and actual values of a following spindle for the ”Spindle coupling”function.If the position deviation lies within the defined interval during an activespindle coupling, the spindle-based output signal ”Synchronous mode2” is issued.If the function is not used for a desired following spindle, its synchronousmode error window is +/-10 degrees.

. Also see function ”SpCoupleSyncWin”, page 4-142.

ProgrammingSyntax:

SpCoupleErrWin(S<Num>=<Window>,S<Num>=<Window>...)

Abbreviation: SPCE(...)

where:<Num> Number of the following spindle (spindle index).

Input value: 1 - 8. Integer.<Window> Maximum permitted position deviation from the com-

mand value (in degrees).Input range: 0 - 359.9999.

Special features and restrictions:D The function may be programmed only with spindles that currently do

not belong to a group of coupled spindles.

Page 336: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpCouplePosOffs, SPCP

4-140 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.85 Angular Offset While Coupling is Active SpCouplePosOffs, SPCP

EffectRetracts an angular offset between the master and the following spindlewhile spindle coupling is active. The relative speed between the masterand the following spindle at which the angular offset is to be retracted canbe optionally programmed.

. The control resets the spindle-specific output signal ”Synchro-nous mode 1” for the duration of rotation.

ProgrammingSyntax:

SpCouplePosOffs(S<Num>=<Displacement>,S<Num>=<Displa-cement>...,POSVEL<Speed>)

Abbreviation: SPCP(...)

where:<Num> Number of the following spindle (spindle index).

Input value: 1 - 8. Integer.<Displacement> Absolute turning angle between the master and the

following spindle (in degrees).Wertebereich: -3600_ ... +3600_

<Speed> The relative speed between the master and the followingspindle at which the angular offset is to be retracted.The unit and the default value depend on drive parameterS-0-0222.Once it is entered, <Speed> is stored internally until it ismodified by calling the function again.

Special features and restrictions:D The angle displacement has an additive effect to the possibly configu-

red coupling lag (see page 4-138).

Page 337: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpCouplePosOffs_Wait, SPCP_WAIT

Electric Drivesand Controls

4-141Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.86 Wait for Angular Offset SpCouplePosOffs_Wait, SPCP_WAIT

EffectPauses the parts program until a programmed angular offset of a groupof coupled spindles (SPCP; see page 4-140) is actually retracted on themachine.

ProgrammingSyntax:

SpCouplePosOffs_Wait(CP=<Coupling>)

Abbreviation: SPCP_WAIT(...)

where:<Coupling> Number of the group of coupled spindles.

Input value: 1 - 4. integer.

Page 338: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpCoupleSyncWin, SPCS

4-142 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.87 Synchronous Mode Window SpCoupleSyncWin, SPCS

EffectConfigures the maximum permitted position deviation between the com-mand and actual values of a following spindle for the ”Spindle coupling”function.D Method of operation to create/edit a coupling (at the start of the syn-

chronization phase):The parts program waits until the position deviation lies within the de-fined interval.

D Method of operation during coupling:If the position deviation lies within the defined interval, the spindle-based output signal ”Synchronous mode 1” is issued.

If the function is not used for a desired following spindle, its synchroniza-tion window is +/-1 degrees.

. For additional monitoring while coupling is active, see function”SpCoupleErrWin”, page 4-139.

ProgrammingSyntax:

SpCoupleSyncWin(S<Num>=<Window>,S<Num>=<Window>...)

Abbreviation: SPCS(...)

where:<Num> Number of the following spindle (spindle index).

Input value: 1 - 8. Integer.<Window> Maximum permitted position deviation from the com-

mand value (in degrees).Input range: 0 - 20.

Special features and restrictions:D The function may be programmed only with spindles that currently do

not belong to a group of coupled spindles.

Page 339: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpCouple_Wait, SPC_WAIT

Electric Drivesand Controls

4-143Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.88 Wait for Synchronous Mode SpCouple_Wait, SPC_WAIT

EffectThe parts program waits until a group of coupled spindles is successfullycreated, reconfigured or disbanded (SPCC; see page 4-137).

ProgrammingSyntax:

SpCouple_Wait(CP=<Coupling>)

Abbreviation: SPC_WAIT(...)

where:<Coupling> Number of the group of coupled spindles.

Input value: 1 - 4. integer.

Page 340: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SPG.., SPGALL

4-144 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.89 Define/Cancel Spindle Groups SPG.., SPGALL

If the ”Channel spindles” function is activated (MP 1040 00999 = 1), thespindle groups are automatically preset during control startup:D The first channel spindle is a member of the first spindle group.

EffectSpindle groups (also called parallel spindles) permit the simple program-ming of several spindles combined with the functions for gear ranges,clockwise/counterclockwise rotation, spindle stop and spindle align-ment. In this way, you do not have to program each individual spindle.

. Function ”Spindle group” is not to be confused with a group ofcoupled spindles consisting of two or more spindles with positioncontrol.While all the spindles in a spindle group can run at differentspeeds, all the spindles in a group of coupled spindles run syn-chronously as a rule.

ProgrammingSyntax:SPG<Group>(<Numbers>) Specifies which channel spindles are to

be gathered together as a spindle group in thecurrent channel.

SPG<Group>(0) Resets the group to default setting in the currentchannel.

SPG<Group>(-1) Cancels the corresponding spindle group in thecurrent channel.

SPGALL(0) Resets all groups to default setting in the currentchannel.

where:<Group> Number of the spindle group.

Input range: 1 to 4, integer.<Numbers> Numbers (separated by commas) of all the

channel spindles that are to be assigned to thecorresponding spindle group.Input range: 1...8.

SPG<Group>(<Numbers>) is an abbreviation of SPG1(<Numbers>)

Special features and restrictions:D When a spindle transfer takes place (GSP, RSP, DSP), the assign-

ment of channel spindle to system spindle will change. This assign-ment change directly affects the spindle group.

D Competing jobs between single spindles and spindle groups that areprogrammed in the same block lead to a runtime error (example: N10M3 M104)

Page 341: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SPG.., SPGALL

Electric Drivesand Controls

4-145Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:GSP(SSP01, S1, SSP07, S2) The channel spindles 1 and 2 are assi-

gned the system spindles 1 and 7.SPG1(1,2) Spindle group 1 consists of S1 and S2.M3 Start S1 and S2 (SSP01 and SSP07)

with clockwise rotation.GSP(SSP14,S2) System spindle 14 is assigned to spindle

2.M4 Start S1 and S2 (SSP01 and SSP14)

with counterclockwise rotation.RSP(S1) Now, no system spindle is assigned to

channel spindle 1(S1).M3 Start S2 (SSP14) with clockwise rota-

tion.

Page 342: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SSp.....

4-146 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.90 System Spindle Programming SSp.....

System spindles are activated via the following functions. These func-tions supplement the traditional spindle activation through auxiliary func-tions.The abbreviation SSp stands for SystemSpindle.

4.90.1 Spindle Speed Programming

EffectSpeed setting for one or more system spindles.

ProgrammingSyntax:

SSpSpeed, SSPSPEED, SSPS

SSpSpeed(<SSpNo.> | <SSpName>, <Speed> , <SSpNo.> |<SSpName>, <Speed> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32

Special features and restrictions:D The speed values programmed are interpreted by default as revolu-

tions per minute.D When G96 is active, the programmed speed is interpreted as the cut-

ting speed in m/min.D The control always limits the output speed setpoint in such a manner

that the limit values of active gear range and the programmed speedlimit (see SMin, SMax, SSpMin and SSpMax) are observed.

D The set speed value is applied until it is overwritten by a new speed(acting modally).

Example:SSpSpeed(SSp05, 1000, SSp08, 2000)

sets the speed of system spindle 5 to 1000, and of systemspindle 8 to 2000 rpm.

Page 343: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SSp.....

Electric Drivesand Controls

4-147Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.90.2 Programming of Movements

EffectStarts or stops one or several system spindles.

ProgrammingSSpMove, SSPMOVE, SSPM

SSpMove(<SSpNo.> | <SSpName>, <Job> , <SSpNo.> |<SSpName>, <Job> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32<Job> 3 - spindle clockwise rotation

4 - spindle counterclockwise rotation5 - spindle stop

Special features and restrictionsD none

Example:SSpMove(SSP05, 3, SSP08, 5)

Starts system spindle 5 in clockwise rotation, and stops systemspindle 8.

4.90.3 Spindle Orientation

EffectThe programmed system spindles position to the programmed angularposition.

ProgrammingSSpOri, SSPORI, SSPO

SSpOri(<SSpNo.> | <SSpName>, <Angle> , <SSpNo.> |<SSpName>, <Angle> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32<Angle> 0.0 .. 359.9999

Special features and restrictionsD The NC waits for execution of the orientation movement.D Other than in case of the orientation movement via M19, M119, ..., the

angle must always be programmed.

Page 344: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SSp.....

4-148 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D If the input of a traversing motion has been programmed viaSSpMove in the same NC block, SSpMove will be ignored (no errormessage).

Example:SSpOri(5, 20, 8, 0)

orientates system spindle 5 to 20 degrees, and system spindle8 to 0 degrees.

4.90.4 Limit Minimum Speed

EffectLimits the lower speed limit of one or several system spindles.

ProgrammingSSpMin, SSPMIN

SSpMin(<SSpNo.> | <SSpName>, <Speed> , <SSpNo.> |<SSpName>, <Speed> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32

Special features and restrictionsD none

Example:SSpMin(5, 100, 8, 500)

sets the lower speed limit of system spindle 5 to 100, and ofsystem spindle 8 to 500 rpm.

SSpMin(5, 0, 8, 0)cancels the lower speed limit of the system spindles 5 and 8.

Page 345: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SSp.....

Electric Drivesand Controls

4-149Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.90.5 Limit Maximum Speed

EffectLimits the upper speed limit of one or several system spindles.

ProgrammingSSpMax, SSPMAX

SSpMax(<SSpNo.> | <SSpName>, <Speed> , <SSpNo.> |<SSpName>, <Speed> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32<Speed> > 0 upper speed limit in rpm

-1 switches speed limitation off

Special features and restrictionsD none

Example:SSpMax(SSp05, 2000, SSp08, 3000)

sets the upper speed limit of system spindle 5 to 2000, and ofsystem spindle 8 to 3000 rpm.

SSpMax(SSp05, -1, SSp08, -1)cancels the upper speed limit of the system spindles 5 and 8.

4.90.6 Change Gear Range

EffectChanges the gear range of one or several system spindles.

ProgrammingSSpGear, SSPGEAR

SSpGear(<SSpNo.> | <SSpName>, <Range> , <SSpNo.> |<SSpName>, <Range> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32<Range> 1..4 for gear ranges 1 to 4

8 for neutral.

Special features and restrictionsD The NC waits for execution of the gear change.

Page 346: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SSp.....

4-150 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D Automatic gear range selection is a channel property. For this reason,SSpGear cannot be used to change between automatic and manualmode.

D Automatic gear range selection, if active in a channel, is not affectedby SSpGear. This is to say that the next programmed S-word mayexecute a gear range change if ”M40” is active.

Example:SSpGear(SSP05, 4)

changes to the 4th gear range for system spindle 5.

4.90.7 Release/Transfer Reserved Spindle

EffectReleases one or several system spindles from the current channel thathave been reserved by movement or orientation settings. Releasedspindles may be taken over into the current channel.This function only exists for reasons of symmetry. We recommend to usethe SpAdmin channel function.

ProgrammingSSpAdm, SSPADM

SSpAdm(<SSpNo.> | <SSpName>, <Mode> , <SSpNo.> |<SSpName>, <Mode> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32<Mode> 1 transfers a released spindle

0 conditionally releases a spindle

Special features and restrictionsD none

Example:SSpAdm(SSP05, 0, SSP08, 1)

releases system spindle 5, and transfers the released systemspindle 8.

Page 347: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SSp.....

Electric Drivesand Controls

4-151Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.90.8 Switch off Administration of Spindle Movement for SpecifiedChannels

EffectSwitches off administration of spindle movement of a system spindle forspecific channels. This function has the same effect as machine para-meter 1040 00070 ”Spindle administration”.

ProgrammingSSpAdmOff, SSPADMOFF

SSpAdmOff(<SSpNo.> | <SSpName>, <ChannelNo> , <Chan-nelNo> ...)

SSpAdmOff(<SSpNo.> | <SSpName>)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32<Channelno> 1 .. 12 Channel numbers

0 Release for jobs from the bit interface

Special features and restrictionsD In deviation from the schema of the other SSp functions, this function

can only affect one system spindle at a time.D A specification from channel 0 switches off the administration of mo-

vements of this system spindle for specifications from the bit inter-face.

Example:SSpAdmOff(SSP05, 1 , 2 , 4)

switches off the administration of movements of system spindle5 for the channels 1, 2, and 4.

SSpAdmOff(5)resets the administration of movements of system spindle 5 tothe state according to MP 1040 00070.

Page 348: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SSp.....

4-152 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.90.9 Switching of Position/Speed Interface

EffectSwitches the drive of the programmed system spindles between speedand position mode.

ProgrammingSSpMode, SSPMODE

SSpMode(<SSpNo.> | <SSpName>, <Mode> , <SSpNo.> |<SSpName>, <Mode> ...)

where:<SSpNo> 1..32<SSpName> SSp01 .. SSp32 or SSP01 .. SSP32<Mode> 1 Activate position interface

0 Deactivate position interface

Special features and restrictionsD The position interface is always activated when the spindle is at

standstill.

Example:SSpMode(5, 1, 8, 0)

switches the position interface on for system spindle 5, and offfor system spindle 8.

Page 349: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpindleToAxis, STA

Electric Drivesand Controls

4-153Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.91 Switch on C-Axis Mode for Spindles SpindleToAxis, STA

EffectSwitches a spindle that is enteredD as a spindle/C-axis in MP 1001 00001 (Drive function type) andD as a SERCOS spindle in MP 1040 00001 (Selection of spindle type)to C-axis mode. In terms of machining, this turns a spindle into an asyn-chronous axis.It appears in the display as an asynchronous axis that is at first locatedon any position between 0 and 359.9999 degrees.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

SpindleToAxis(<PAN> | <PAI>,<PAN> | <PAI>...)

Abbreviation: STA(..)

where:<PAN> Physical axis name.

Specifies the spindle that is to be switched to C-axismode.

<PAI> Physical axis index.Same effect as <PAN>.

Special features and restrictionsD A given spindle must be at a standstill. If this is not the case, the con-

trol generates an error message and terminates the program.

D Axis positions in the same block must always be programmed accor-ding to the expression SpindleToAxis(...).

Example::N030 STA(CH):

The physical axis CH (i.e. the spindle withthe name CH during axis operation) is swit-ched over to an asynchronous axis.

Page 350: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SplineCornering, SCO

4-154 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.92 Rounding Corners with Splines SplineCornering, SCO

EffectThe modal NC function ”Rounding corners with splines” does not roundall tangetial contour transitions with a spline.

ProgrammingSyntax:

SplineCornering(E<Distance>)

”Corner rounding on” with specifica-tion of a maximum permissible tole-rance E

SplineCornering(DEF) ”Corner rounding on” with toleranceE of MP 7050 00110

SplineCornering(L1=<L1>,L2=<L2>)

”Corner rounding on” with specifica-tion of a pre-and post-corner di-stance I1 or I2.

SplineCornering(0) ”Corner rounding off”

Abbreviation: SCO

Special features and restrictions:D With each contour types, rounding is done in all coordinates (max. 8)

of the channel.

D The same machine parameters apply as in case of circularcorner rounding.

Page 351: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SplineDef, SDF

Electric Drivesand Controls

4-155Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.93 Definition of the Spline Type SplineDef, SDF

EffectThe IndraMotion MTX supports the following spline types:D Spline type 0: Spline with coefficient programming

(polynomial coefficients of CAD/CAM system)D Spline type 1: C1-continuous cubic splines with support point pro-

gramming (tangential transitions at the support points)

D Spline type 2: C2-continuous cubic splines with support point pro-gramming (continuous-curvature transitions at the support points)

D Spline type 3: B-spline with coefficient programming(curve shape near the support points)

The desired spline type is selected and initialized using function ”Spline-Def” (SDF). Then spline programming can be activated with function G6.

ProgrammingSyntax:SplineDef(<ID>,<Members>)

Abbreviation: SDF(..)

Initialize spline type

where:<ID>: Whole number (maximum of 4 digits) for the spline va-

riant:

Spline type Position1000s 100s 10s 1s

Spline type0...3

Parametersettings0: none1: equidistant2: chordal3: centripetal

Tangent cal-culation0: none1: Bessel2: Akima3: Sehnen

Splinedegrees

1...5

Spline type 0 0 0 0 1...5

Spline type 1 1 1...3 0...3 1...5

Spline type 2 2 1...3 0...3 1...5

Spline type 3 3 1...3 0 1...5

<Members>: Not for spline type 0!List with names of the coordinates/axes that are to partici-pate in the spline movement.Coordinates/axes that are not programmed in <Mem-bers> are included linearly.Orientation coordinates can also be programmed as spli-nes. For this purpose, ”O” for orientation, or polar coordi-nates ”phi” and ”theta”, are provided under <Members>.

Page 352: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SplineDef, SDF

4-156 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples:N10 SplineDef(5):

Initialize spline type 0 with spline de-gree 5.

N20 SplineDef(2203,X,Y,Z):

Initialize spline type 2 with spline de-gree 3 and chordal parameters. Coor-dinates X, Y and Z participate.

N30 SplineDef(3103,x,y,z,O):

Initialize spline type 3 with spline de-gree 3 and equidistant parameters.Coordinates x, y and z, as well as theorientation coordinates, participate.

Page 353: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Split, SPLIT

Electric Drivesand Controls

4-157Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.94 Programmable Path Split Split, SPLIT

EffectDivides programmed movement blocks into several partial paths if theyexceed a certain length.

ProgrammingSyntax:

Split(<Mode>,<Part length>)

Abbreviation: SPLIT(...)

where:<Mode> 0: Function has no effect.

1: Function acts modally.2: Function acts only in the programmed block.Not programmed: Effect as for 0.

<Part length> For linear blocks: length of partial path.For circular blocks: length of arc.Programming unit as for the axis coordinates.If <Part length> is not programmed:the effective <Part length> roughly corresponds to themaximum path that can be traversed in 2 subsequent in-terpolation cycles, depending on the current feedrate.

Special features and restrictions:D The programmable path split divides a traversing block only if its

length does not exceed <Part length> .D If <Part length> is not a whole divisor of the traversing path, the re-

mainder will also be traversed separately.D If the programmable split is effective on a block-by-block basis

(<Mode>=2), a traversing movement must be programmed in thesame block.

Example::N20 Split(2,10) X100::

Blockwise effective path split for N20 ON.The traversing movement in N20 is split intopartial paths, each with a length of 10 mm.

N120 Split(1):::

Modally effective path split starting at N120ON. Starting at N120, traversing movementsare split into partial paths that can be traver-sed in approx. 2 interpolator cycles.

N220 Split(1,3.0)::

Modally effective path split starting at N220ON. The traversing movements starting atN220 are split into partial paths, each with alength of 3 mm.

N320 Split():

Programmable path split OFF.

Page 354: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions SpMode, SPM

4-158 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.95 Spindle: Switching Between Position and Speed Interfaces SpMode, SPM

EffectSwitches the spindle drive between the speed and position modes.

ProgrammingSyntax:

SpMode(S<Num>=<Mode>,S<Num>=<Mode>...)

Abbreviation: SPM(...)

where:<Num> Number of the spindle (spindle index).

Input value: 1 - 8. Integer.<Mode:> 0: Speed mode

1: Position mode

Special features and restrictions:D Spindle alignment is terminatedD A rotating spindle is briefly stopped when a switch to position mode is

made.

Example:N60 SPM(S1=1,S2=1):

1st and 2nd spindle to position mode.

Page 355: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

TCM( , , )NC-Functions StatToolOri, STO

Electric Drivesand Controls

4-159Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.96 Set Parameters of Static Tool Orientation StatToolOri, STO

EffectUsing G47(...) or G78, tool length corrections L1, L2 and L3 are assignedto the L1-, L2- and L3 coordinate directions. These coordinate directionsform a coordinate system in which tool length correction vector L hascomponents L1, L2 and L3.Command StatToolOri is used to rotate L around Euler angles phi, thetaand psi in this coordinate system.With this tool orientation, vector L is rotated as follows:D first around the L3 coordinate direction by the angle phi,D then around the included L2 coordinate direction by the angle theta,D and finally around the L3 coordinate direction, which was included in

both rotations, by the angle psi (ψ).

ProgrammingSyntax:

StatToolOri(<j> ,<J> ,<y>)

Abbreviation: STO(..)

where:<j>,<J>,<y> Absolute Euler angle in degrees.

AC/IC programming is permitted.Value range:0_≤ j < 360_; 0_≤ J ≤ 180_; 0_≤ y ≤ 360_.Values outside this range are automatically con-verted into the corresponding interval.

Special features and restrictions:D The parameters of static tool orientation are set using STO and acti-

vated by G47 (see page 3-44).D If G47 is already active when STO is executed, the change to the tool

orientation is effective immediately.D If coordinate designations were not assigned to all 3 tool length cor-

rections L1, L2 and L3 using G47(...) or G78, the control takes only theassigned coordinates during tool orientation and generates a war-ning.

4.97 Traversing in the TCS TCM( , , )

EffectLinear traversing movements in the tool coordinate system TCS, also incase of active axis transformation 2.This is a local relative dimensionprogramming, i.e. the programmed position specification is interpretedincrementally, independent of G90/G91.

You can find extensive information regarding the use and parameters ofTcsMove in the Description of Functions.

Page 356: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions StatToolOri, STO TCM( , , )

4-160 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ProgrammingSyntax:

TCM(<xVal>,<yVal>,<zVal>)(alternatively: TcsMove(,,))

where:<xVal>, <yVal>, <zVal> Values to be traversed incrementally in re-

spect to the tool coordinate system TCSExample:TCM (,,-100) ;plunge in 100 [mm] in the direction of the toolTCM (,,0.200) ;retract in 200 [mm] in the direction of the tool

Page 357: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TangTool, TTL

Electric Drivesand Controls

4-161Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.98 Tangential Tool Guidance TangTool, TTL

EffectGuides a rotary or endless axis along the programmed path in the activeplane with an adjustable angle. In this way, a tool can move at any timeduring application with a required positioning angle to the programmedpath.In order to rotate the tool axis to the corresponding required positioningangle, the function takes any existing tool symmetry into account in thecase of tools with multiple tool edges. Furthermore, the control can auto-matically insert an intermediate block that rotates the tool axis by the re-quired angle if there is a knee in the contour at the block transition.

The following appliesD At the 0-degree position of the tool axis of rotation, the default tool

edge direction of the tool is parallel to the positive traversing directionof the main axis in the current plane.

Main axis of current plane(for G17: X)

Secondary axis of the current plane(for G17: Y)

Default tool edge directionat 0-degree position of tool axis of rotation

: Tool axis of rotation

D The positioning angle indicates the angular difference between thepath and the default tool edge direction. It is 0 degrees if the default tool edge direction runs tangential to theprogrammed path.

Pos. positioning anglepath

Neg. positioning angle

Default tool edge direction

+-

: Tool axis of rotation

Pos. positioning anglepath

Neg. positioning angle

Default tool edge direction

+-

Tool position withactivated tool correction

Tool position withoutactivated tool correction

D ”TangTool” does not produce a traversing motion after power up. A programmed tool axis is not executed until the next traversing mo-vement. Depending on the adaptation angle that is set, eitherD an intermediate block for tool rotation is traversed previously, orD the tool jumps to its new position at the beginning of the block.

Page 358: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TangTool, TTL

4-162 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D The calculation for the required rotation of the tool axis for the givenpositioning angle in a circular path occurs in the interpolator clockpulse. Consequently, the tool axis keeps turning by the respective po-sitioning angle calculated with each interpolator clock pulse in thecase of such contour sections.

ProgrammingSyntax:TangTool(TAX=<Axis> ,SYM=<s>,ANG=<a>,IA=<zsw>,PLC=<p>)

Tangential tool guidance ON.

TangTool() orTangTool(0)

Tangential tool guidance OFF.

Abbreviation: TTL(..)

where:<Axis>: Designation of the axis on which the function ”Tangential tool

guidance” is to apply. A logical or physical axis name or a logical axis number arepermitted.If this is not programmed, MP 7050 00210 is effective.

<s>: Tool symmetry (generally tool edges). Input value: Integer, not equal to 0.A tool with symmetry value <s> attains a technologicallyidentical position after a rotation of 360 degrees / <s> .Examples: Rectangle tool: <s> = 2; square tool: <s> = 4.1: Asymmetric tool or only one tool edge exists.>0: Symmetric tool having several, equally spaced tool

edges. If there is a knee in the contour, the tool is rotatedjust enough for the nearest tool edge to be posi-tioned at the positioning angle with the contour.

<0: In the case of a change of direction(180-degreeknee) the tool is not rotated, regardless of the posi-tioning angle. Otherwise, the same as for ”>0”.

If this is not programmed, MP 7050 00220 is effective.

<a>: Positioning angle. Value range: -180 to +180 degrees.This indicates the angular difference between the path andthe default tool edge direction.If this is not programmed, MP 7050 00250 is effective. Thisis used to specify whether the current angle of the tool axis ofrotation is to be used as a positioning angle or if the valuefrom MP 7050 002540 is to be used.

<ada>: Adaptation angle. Value range: 0 to 180 degrees.This specifies from how many degrees upwards of a contourknee angle between two blocks an intermediate block is in-serted to rotate the tool axis. If the angle at the contour knee is less than <ada>, no sepa-rate block is inserted to rotate the tool axis. Instead, at thestart of the next block, the tool jumps to its new position.If this is not programmed, MP 7050 00230 is effective.

Page 359: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TangTool, TTL

Electric Drivesand Controls

4-163Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<p>: Switch NC-PLC communication on or off while an inter-mediate block is being executed.0: NC-PLC communication OFF.

The NC executes the intermediate block uncondi-tionally.

1: NC-PLC communication ON. Execution of a rotation block is controlled via NC-PLC communication.

If this is not programmed, MP 7050 00260 is effective.

Examples:TTL::::

Tangential tool guidance isactivated with the correspondingmachine parameter values forthe axis entered inMP 7050 00210.

TTL(TAX=C,SYM1,ANG90,IA20,PLC0):

Programming with logical axisname.

TTL(TAX3,SYM1,ANG90,IA20,PLC0):

Programming with logical axisnumber.

TTL(TAX[NAME$],SYM1,ANG90,IA20):

Programming with CPL variable.

Special features and restrictions:D Function ”Tangential tool guidance” must not be active at the same

time as ”Tangential tool orientation” and ”Tangential tool gui-dance”(see page 4-164).

D ”Tangential tool guidance” must never be programmed in combina-tion with a traversing motion.

Page 360: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TangToolOri, TTO

4-164 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.99 Tangential Tool Orientation TangToolOri, TTO

Effect

. Works together with functions ”Punch” (see page 4-119) and ”Nib-ble” (see page 4-84).

When Punch/Nibble is switched on, this ensures that a punching/nib-bling tool is located at a definable angle to the programmed path duringevery stroke procedure.For a stroke at the start of the block, a block for rotating the tool – if requi-red – is automatically inserted.The control automatically determines the optimum direction of rotation(shortest path).The axis of rotation is permanently specified by MP 7050 00210.

ProgrammingSyntax:TangToolOri(SYM<s>,ANG<a>) orTangToolOri(1)TangToolOri

Tangential tool orientationON

TangToolOri() orTangToolOri(0)

Tangential tool orientationOFF

Abbreviation: TTO...

where:<s>: Tool symmetry (generally tool edges).

Input value: Integer, greater than 0.A tool with symmetry value <s> attains a technologicallyidentical position after a rotation of 360 degrees / <s> .Examples: Rectangle tool: <s> = 2; square tool: <s> = 4.1: Asymmetric tool or only one tool edge exists.>1: Symmetric tool having several, equally spaced tool

edges.If SYM is not programmed: effect as for SYM1.

<a>: Positioning angle to programmed path. Range of values: -180 to +180 degrees.0: Tool axis is positioned at an angle of 0 degrees to the pro-grammed path.If ANG is not programmed: Effect as for ANG0.

Special features and restrictions:D The function may not be programmed together with function ”Tang-

Tool” (Tangential tool guidance, TTL).D When the function is active, ”Tangential tool guidance” (TTL, see

page 4-161) is not possible.

Example:D G90 is active (absolute dimension programming)D active plane: X/Y

Page 361: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TangToolOri, TTO

Electric Drivesand Controls

4-165Bosch Rexroth AGIndraMotion MTXR911314869 / 01

D tool axis: C (modulo 360)D current position: X=0, Y=0, C=0D punching/nibbling is switched off.

:N10 TangToolOri(1) Tangential tool orientation ON; effect as

for SYN1 and ANG0.N20 G1 G91 X10 Y10 No orientation of the C-axis yet because

punching/nibbling is switched off.N30 X10 Y10 Punch(1) Punching ON. C-axis rotates to 45_.N40 Y-10 C-axis rotates to -90_. After modulo cal-

culation: C=270_.N50 Punch(0) Punching OFF.N60 LEN=30 Nibble(1) Nibbling ON.

Desired block segment lengths: 30 mm.N70 G2 X114.6 I57.3 J0 Semicircle with 180 mm length of arc.

The block is divided into 6 block seg-ments, each with an arc length of 30 mm.

N80 TTO() Tangential tool orientation OFF.:

C=270_(N70: 6th partial path)

C=300_(N70: 5thpartial path)

C=90_(N70. Automatically generatedintermediate block at start ofblock to rotate the tool)

: Tool position

X

Y

C=60_(N70: 1st partial path)

C=-90_=270_(N40)

: Actual traversing motion: Programmed path

C=45_(N30)

C=0_(N20)

C=30_(N70: 2nd partialpath)

C=0_(N70: 3rd partial path) C=-30_=330_

(N70: 4th partial path)

Page 362: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TappSp, TSP

4-166 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.100 Spindle Selection for Rigid Tapping TappSp, TSP

EffectD Specifies the spindles to which G63 is to refer.

”TappSp” is in effect until it is reprogrammed. It is still in effect evenafter a ”control reset”!

D If ”TappSp” is not programmed, G63 will always refer to the 1stspindle.

ProgrammingSyntax:TappSp(CAX<i>) Activate tapping for individual spind-

les using spindle number(s).

TappSp(GRP<j>) Activate tapping for all spindles usinga spindle group.

TappSp(GRP<j>,CAX<i>) Activate tapping for all spindles usinga spindle group as well as for additio-nal spindles using spindle number(s).

Abbreviation: TSP(..)

where:<i> Number of the Spindle to which G63 refers.

Range of values: 1 ... n, wobei n für die höchste Spindelnum-mer im System steht (max. 8).Ganzzahlig.Several spindles are programmed by several CAX<i>, sepa-rated by commas.

<i> Number of the Spindle group to which G63 refers. Range of values: 1 ... n, where n stands for the highestspindle group number (max. 4). Whole number.

Special features and restrictions:D Only a single spindle group can be activated for G63.D Spindle numbers, plus 1 spindle group if required, can be combined in

any way.

Example:N20 TappSp(CAX2):

Select the spindle with a spindlenumber of 2 for G63.

N120 TappSp(CAX2,CAX4,CAX7):

Select the spindles with spindlenumbers of 2, 4 and 7 for G63.

N220 TappSp(GRP2):

Select the spindle group with aspindle number of 2 for G63.

N320 TappSp(GRP3,CAX4):

Select the spindle group with anumber of 3 plus the spindle with aspindle number of 4 for G63.

Page 363: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TcsDef, TCS

Electric Drivesand Controls

4-167Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.101 TCS Definition in Program Coordinates TcsDef, TCS

EffectWhen 6-axis transformation is active, this generates a tool coordinatesystem TCSp that can be offset and/or rotated compared to the last cur-rent TCS.The coordinate values given for TCSp are converted within the NC andstored in the tool correction memory.

The generated TCSp can be cleared by switching off the function. In thisprocess, the last current TCS is reactivated.

Programming1. If not already executed, activate axis transformation type 3333301

(see function ”Coord(...)”, page 4-36).2. Use the syntax shown below.

Syntax:TcsDef(<Position>,<Orientation>) Define and activate the

position and orientation ofTCSp. For detailed syn-tax, see below.

TcsDef() orTcsDef(0)

Delete TCSp and reacti-vate the last current TCS.

Abbreviation: TCS(...)

Detailed syntax:

TcsDef(<x><px>,<y><py>,<z><pz>,<phi><j>,<theta><J>,<psi><y> or

TcsDef(<x><px>,<y><py>,<z><pz>,O(<j>,<J>,<y>) or

TcsDef(<x><px>,<y><py>,<z><pz>,Ox(<jx>,<Jx>) Oy(<jy>,<Jy>) or

TcsDef(<x><px>,<y><py>,<z><pz>,Ox(<jx>,<Jx>) Oz(<jz>,<Jz>) or

TcsDef(<x><px>,<y><py>,<z><pz>,Oy(<jy>,<Jy>) Oz(<jz>,<Jz>) or

TcsDef(<x><px>,<y><py>,<z><pz>,Ox(<o11>,<o21>,<o31>) Oy(<o12>,<o22>,<o32>) or

TcsDef(<x><px>,<y><py>,<z><pz>,Ox(<o11>,<o21>,<o31>) Oz(<o13>,<o23>,<o33>) or

TcsDef(<x><px>,<y><py>,<z><pz>,Oy(<o12>,<o22>,<o32>) Oz(<o13>,<o23>,<o33>) or

TcsDef(<x><px>,<y><py>,<z><pz>,ROTAX(<ju>,<Ju>) O(<b>) or

TcsDef(<x><px>,<y><py>,<z><pz>,ROTAX(<ux>,<uy>,<uz>) O(<b>)

where:<x> Coordinate name that is entered in

MP 7080 00010[1]. Default: x<y> Coordinate name that is entered in

MP 7080 00010[2]. Default: y<z> Coordinate name that is entered in

MP 7080 00010[3]. Default: z

Page 364: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TcsDef, TCS

4-168 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

<px>, <py>, <pz> Absolute Cartesian coordinates of axis addres-ses <x>, <y> and <z>, based on the currentPCS. The values define the origin of the newTCSp.AC/IC programming is permitted.

<phi> Angle name that is entered inMP 7080 00010[4]. Default: phi

<theta> Angle name that is entered inMP 7080 00010[5]. Default: theta

<psi> Angle name that is entered inMP 7080 00010[6]. Default: psi

<j>,<J>,<y> Absolute Euler angle in degrees, based on thecurrent PCS. The values define the orientationof the new TCSp.AC/IC programming is permitted.Value range: 0_≤ j < 360_;

0_≤ J ≤ 180_;0_≤ y ≤ 360_.

Values outside this range are automatically con-verted into the corresponding definition interval.

<j..>,<J..> Absolute angle values in degrees.Value range: 0_≤ j.. < 360_;

0_≤ J.. ≤ 180_.If a value outside of the range is programmed forJ.., it is automatically converted to the given in-terval.

Ox(<o11>,<o21>,<o31>)Oy(<o12>,<o22>,<o32>)Oz(<o13>,<o23>,<o33>)Ox(<jx>,<Jx>)Oy(<jy>,<Jy>)Oz(<jz>,<Jz>) Orientation using function Ox(..), Oy(..), Oz(..).

For example, Ox(..) defines the direction of thex-coordinate of TCSp in the reference coordi-nate system. The same applies analogously toOy(..) and Oz(..).The direction can be specified either by the cor-responding polar angles <j..> and <J..> or theCartesian components of the TCSp orientationtensor column vectors.Only absolute dimensions are allowed.The component values of the column vectors(o..) are automatically standardized to 1.

ROTAX(<ju>,<Ju>) Define the axis of rotation using polar angles (ϕu,ϑu).

ROTAX(<ux>,<uy>,<uz>) Define the axis of rotation using Cartesiancomponents <ux>,<uy>,<uz> in absolute di-mensions. Automatic standardization to 1.

Page 365: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions TcsDef, TCS

Electric Drivesand Controls

4-169Bosch Rexroth AGIndraMotion MTXR911314869 / 01

O(<b>) Indicates (in degrees) the incremental angle<b> around which the TCSp orientation tensor,starting from the orientation tensor of the lastcurrent TCS, is to be turned around the axis ofrotation. Values greater than 360 degrees are allowed.The direction of rotation can be selected usingthe positive/negative sign.

Special features and restrictions:D Axis transformation type 3333301 must be active.D If function ”Coord(...)” (see page 4-36) is reprogrammed, a pre-

viously generated TCSp is automatically cleared and the last currentTCS is reactivated.

D If programming of the tensor columns results in two column vectorsbeing parallel or anti-parallel, it is not possible to calculate the orienta-tion tensor. A runtime error is issued.

Page 366: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ThreadSet, TST

4-170 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.102 Additional Tapping Functions ThreadSet, TST

EffectIndividual partial areas of G33 can be temporarily adjusted by program-ming ”ThreadSet”.In this case, the control superimposes the static values stored in the ma-chine parameters.”ThreadSet” allowsD the adjustment of the dynamics and retraction movementD switching of the spindle operating mode (speed control, position con-

trol)D setting of a signal on the channel interface (configurable within the

”Active function” signals using machine parameters).

Control reset or M30D cancels the settings superimposed by ”ThreadSet”D clears an IF signal that had been set by ”ThreadSet”D switches the main spindle back to speed-controlled operation if it had

previously changed over to position-controlled spindle operationusing ”ThreadSet(SPC1)”.

. All partial functions described below can be jointly programmed(separated by commas) in a ”ThreadSet” block.

Programming: Configuring the retract dataSyntax:

ThreadSet(RD(<PA value>,<SA value>,-1))

Abbreviation: TST(..)

where:<PA value> Retract path (incremental in mm) towards the primary

axis of the currently selected plane (G17, G18, G19,G20). The value must always be programmed; however, it isonly relevant for longitudinal and tapered threads.

<SA value> Retract path (incremental in mm) towards the secondaryaxis of the currently selected plane.The value must always be programmed; however, it isonly relevant for transversal and tapered threads.

-1 ”-1” is an optional third parameter. In this case, the retract data from MP 7050 00645 andMP 7050 00650 will be active again.

Page 367: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ThreadSet, TST

Electric Drivesand Controls

4-171Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Programming: Activating retractionSyntax:

ThreadSet(RON<Status>) or

TST(..)

where:<Status> 0: Deactivate fast retract.

1: Activate fast retract.

Programming: Configuring the dynamicsSyntax:

ThreadSet(DYN(<Jump>,<Accel>,<Decel>)) or

TST(..)

where:<Jump> Max. permitted jump speed in mm/min

Entering ”-1” will activate MP 7050 00610 again.<Accel> Acceleration in m/s2

Entering ”-1” will activate MP 7050 00615 again.<Decel> Deceleration in m/s2

Entering ”-1” will activate MP 7050 00620 again.

Programming: Switching the spindle modeSyntax:

ThreadSet(SPC<Status>) or

TST(..)

where:<Status> 0:

Switch the main spindle into speed-controlled mode.1:Switch the main spindle into position-controlled mode,depending on the setting of 7050 00600 [3].

For details on main spindles, refer to page 4-80.

Programming: Influencing the channel IF signalSyntax:

ThreadSet(TCI<Status>) or

TST(..)

where:<Status> 0: Clears the channel IF signal

1: Sets the channel IF signal

. Which signal is influenced on the channel interface can be configu-red within the ”Active function” signals using machine parame-ters.

Page 368: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Trans, TRS ATrans, ATR

4-172 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.103 Program Coordinate Offset Trans, TRSAdditive Program Coordinate Offset ATrans, ATR

Effect”Trans” offsets the active program coordinate system parallel to thecoordinate axes of the current workpiece coordinate system.”ATrans” permits additional parallel and always additive offsets of theprogram coordinate system.In this way, a parts program can execute the programmed contour anyw-here within the workpiece coordinate system without modifications. In-put tools that are based on the active program coordinate system (e.g.programmed contour offset, scaling, mirroring, rotation) are indepen-dent of a program coordinate offset and therefore need not be adapted.

+ZW

+XW

+YW

W

W = Zero point of the active workpiece coordinate systemP1 = Zero point of the 1st program coordinate offsetP2 = Zero point of the 2nd program coordinate offset

P1

+ZP1 +YP1

+XP1

TransP2

+ZP2 +YP2

+XP2ATrans

ATransPn

The following applies:D Programming a program coordinate offset does not trigger a traver-

sing movement.

ProgrammingSyntax:Trans(<Coordinates>) Program coordinate offset ON.

The zero point of the program coordinatesystem is set to the programmed <coordi-nates> of the active workpiece coordinatesystem.Several coordinate axes, separated bycommas, may be programmed in the par-entheses.(Example: TRS(X100,Y50,Z50)).

Trans() orTrans(0)

All program coordinate offsets OFF.

Abbreviation: TRS(..)

Page 369: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions Trans, TRS ATrans, ATR

Electric Drivesand Controls

4-173Bosch Rexroth AGIndraMotion MTXR911314869 / 01

ATrans(<Coordinates>) Additive program coordinate offset ON.The zero point of the resulting programcoordinate system is set to the program-med <coordinates> of the active programcoordinate system.Several coordinate axes, separated bycommas, may be programmed in the par-entheses.

ATrans() orATrans(0)

Additive program coordinate offsets OFF.

Abbreviation: ATR(..)

Example:N10 TRS(X10,Y10,Z50):::

Set the zero point of the program coordinatesystem to position X10 Y10 Z50 of the currentworkpiece coordinate system.

N50 ATR(X20,Y10):::

The zero point of the resulting program coordi-nate system lies on position X30 Y20 Z50, ba-sed on the original workpiece coordinate sy-stem.

N80 ATR()::::

Additive program coordinate offset OFF. Thezero point of the program coordinate systemlies on position X10 Y10 Z50, based on theoriginal workpiece coordinate system.

N180 TRS() All program coordinate offsets OFF.

Page 370: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions VirtAxisPos, VAP

4-174 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.104 Virtual Drives VirtAxisPos, VAP

EffectSets the axis position of virtual synchronous axes in the current channel.

. For detailed information about virtual dives, see the ”Descriptionof Functions”.

ProgrammingSyntax:

VirtAxisPos(<Axis 1><Value>,<Axis n><Value>, ...)

Abbreviation: VAP(...)

where:<Axis x> Address of the virtual axis.<Value> Position information for <Axis x>.

Example:VAP(VX150) Position axis VX to 150mm.

Special features and restrictions:D Local incremental programming (IC...) is not permitted.

Page 371: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions WaitAxis, WAX

Electric Drivesand Controls

4-175Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.105 Transfer Axis, Wait if Necessary WaitAxis, WAX

EffectTransfers a synchronous axis to the calling channel. This turns an asyn-chronous axis into a synchronous axis.The axis can then be programmed in the current channel using its physi-cal or logical axis name.

. For detailed information about the ”Axis transfer” function, see the”Description of Functions”.

ProgrammingSyntax:

WaitAxis(<PAN> | <PAI>,<LAN>,<PAN> | <PAI>,<LAN>...)

Abbreviation: WAX(..)

where:<PAN> Physical axis name.

Specifies the axis that is to be transferred to the currentchannel.

<PAI> Physical axis index.Same effect as <PAN>.

<LAN> Logical axis name.If this is programmed, the axis to be integrated into thecurrent channel receives the logical name <LAN>.<LAN> must have been defined in MP 7010 00010 (”Lo-gical axis designation”) or MP 7010 00020 (”Optionalaxis designation”).

Special features and restrictions:D If an axis to be transferred is not yet at a standstill, block preparation

waits for it to come to a standstill. Then the axis is transferred.As opposed to function ”GetAxis” (see page 4-58), no error messageappears and the program is not terminated.

D Axis positions in the same block must always be programmed afterWaitAxis(...) and may be programmed only if axis transformation isnot active.

D Axes to be transferred must not be participating in any active monito-ring area (see page 4-2).

Example:N030 WAX(YP,,ZP,Z):

If necessary, block preparation waits for phy-sical axes YP and ZP to come to a standstill.Then the axes are transferred to the callingchannel.While YP is also addressed as YP in the cal-ling channel, ZP receives address Z in thecalling channel.

Page 372: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions WriteId, WID

4-176 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

4.106 Writing SERCOS Parameters WriteId, WID

EffectWrites the programmed SERCOS drive parameter (S-x-xxxx, P-x-xxxx)to one or more drives.For product-specific SERCOS drive parameters (P-x-xxxx), completevalue lists with a maximum of 16 values or ID lists with a maximum of 8 IDnumbers can also be written.

Prerequisites:D The parameter must be valid and editable in SERCOS Phase 4.D The parameter value lies within the permitted range.D The drive is connected to the control using the SERCOS interface;

cyclic communication between the control and the drive is running.

. CPL command SCS is available to help read SERCOS drive para-meters.

DANGERImproper or random modifications of SERCOS drive parameterscan lead to damage to the workpiece and/or machine and todangerous and unpredictable machine reactions.Information about the SERCOS drive parameters available in thedrive is required for proper use. For this, consult your drivedocumentation.

Programming Write a Parameter to One or More Drives(for synchronous axes):

Syntax:

WriteId(<Par>,<SA1><W1>,<SAn><Wn>...)

Abbreviation: WID(...)

where:<Par> Default parameter (S-x-xxxx) or

product-specific parameter (P-x-xxxx).<SA1>...<SAn> Logical axis address of the SERCOS drive.<W1>...<Wn> Value that is to be written to<Par>.Example:N100 WID(P-0-0500,X10,Y20,Z30) Write P-0-0500:

in the drive of the X-axis: 10in the drive of the Y-axis: 20in the drive of the Z-axis: 30

Page 373: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions WriteId, WID

Electric Drivesand Controls

4-177Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Programming Write a Parameter to One or More Drives(for spindles and asynchronous axes):

Syntax:

WriteId(<Par> DRIVE(<AA1>,<W1>,<AAn>,<Wn>...))

Abbreviation: WID(...)

where:<Par> Default parameter (S-x-xxxx) or

product-specific parameter (P-x-xxxx).<AA1>...<AAn> Physical axis index or physical axis name of the SER-

COS drive. A maximum of 8 drives may be definedusing DRIVE(...) syntax.

<W1>...<Wn> Value that is to be written to<Par>.

Programming Write values of a parameter list to a drive:

Syntax:

WriteId(<Par> LIST(<A1>,<W1>,<Wn>...))

Abbreviation: WID(...)

where:<Par> Product-specific parameter (P-x-xxxx) containing a

value list.(Default parameters (S-x-xxxx) are not permitted!)

<A1>...<An> Physical axis index or physical axis name of the SER-COS drive.

<W1>...<Wn> A maximum of 16 values that are to be written to<Par>.

Example:N100 WID(P-0-0515 LIST(1,0.5,0.2) Write P-0-0515 in

drive 1 with 2 values

Programming Write ID numbers of an ID list to a drive:

Syntax:

WriteId(<Par> ID_LIST(<A1>,<Id1>,<Idn>...))

Abbreviation: WID(...)

where:<Par> Product-specific parameter (P-x-xxxx) containing an

ID list.(Default parameters (S-x-xxxx) are not permitted!)

<A1>...<An> Physical axis index or physical axis name of the SER-COS drive.

<Id1>...<Idn> A maximum of 8 ID numbers that are to be written to<Par>.

Page 374: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions WriteId, WID

4-178 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:N100 WID(P-0-0417 ID_LIST(X,S-0-47,S-0-51) Write P-0-0417 in

the drive of axis Xwith 2 ID num-bers.

Special features and restrictions:D The function may not be programmed during contour machining.D Programmed parameters are written only after the corresponding

drive comes to a standstill.

Page 375: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ZoTSel, ZOS

Electric Drivesand Controls

4-179Bosch Rexroth AGIndraMotion MTXR911314869 / 01

4.107 Activate Zero Offset Tables ZoTSel, ZOS

EffectActivates a zero offset table (ZO table). ZO tables are stored as XML filesin the file system of the control.

ProgrammingSyntax:

ZoTSel(<Path><Filename>)

Abbreviation: ZOS(..)

where:<Path> Optional path information for the directory in which <File-

name> is stored.If there is no information, the file will be searched in the ”/da-tabase” directory. If <Filename> is not present there, the control uses the searchpath for subroutines so that the search for <Filename> canalso be carried out in other directories.

<Filename> File name of the ZO table, incl. the file extension.Tables with standard names (ZO<Number>.zot) can beactivated directly using the number, e.g. ZoTSel(5) activates table ZO5.zot.

Special features and restrictions:D When the table is activated, the control can optionally check whether

the current axis configuration of the channel is suitable for the tablecontents (”Strict assignment” option; this is set using the table editoror the first time that the table is generated). If it is unsuitable when the ”Strict assignment” option is activated, theprogram is terminated with an error message.

. Please refer to the Operating Instructions for how to create and editZO tables.

Example::N030 ZOS(npvtab.zot):

First searches for ZO table ”npvtab.zot” indirectory ”/database” and then, if it is notthere, in the search path for subroutines.The first ZO table with the name”npvtab.zot” that is found is activated.

N130 ZOS(/mnt/np.zot):

Searches and activates ZO table”npvtab1.npv” in directory ”/mnt”. If it is notfound there, an error message appears.

Page 376: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NC-Functions ZoTSel, ZOS

4-180 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Notes:

Page 377: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-1Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5 CPL Functions

5.1 Coordinate and Axis Values

The CPL contains functions that can be used to query various values ofcoordinates and axes.

Differentiation is made among:D Functions for reading coordinate and axis positions

(PCS, WCS, MCS, ACS, SPOS, APOS)D Functions for reading probes

(PCSPROBE, PROBE, PPOS)D Functions for reading offsets and placements

(AXO, COF, DPC).

In the parts program, coordinates that are interpolated during proces-sing of the program are always programmed. The axis transformationscalculate the appropriate command values for the affected axes (spatialand machine coordinates) from the current coordinate values.

. You can find detailed information about coordinates, axes andtransformations in the ”Description of Functions” manual.

Page 378: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-2 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Overview

Last programmed position: PCSProbe value: PCSROBE

LCS

Parts programProgram coordinate system: PCS

Calculation of workpiece coordinatesProgram coordinate offsetContour offsetScaling

Tool coordinate system: WCS Probe value: PPOS

Interpolated workpiece position: WCSInterpolationTool coordinate system: WCS

Coordinate transformationBasic tool coordinate system: BCS

Axis transformation 2Local machine coordinate system: LCS

Zero offsetMachine coordinate system: MCS

Blockpreparation

Block execution

Axis command values: SPOSAxis actual values: APOSProbe value: PROBE

Drives (axes)

Axis coordinate system: ACSAxis transformation 1

Command values of system axes: ACS

MCS

Units for supplied axis and coordinate positions

Synchronous linear axes and translatory spatial coordinates:

”mm” or ”Inch”;depending on the currentsetting (G71, G70) in the cal-ling channel.

Synchronous rotary axes and rotary spatial coordinates:

”Degrees”

Asynchronous linear axes: ”mm”

Asynchronous rotary axes: ”Degrees”

Page 379: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-3Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example: Configuration and assignment of axis names to channels

IndexSystem axis

System axis nameMachine parameter

1003 00001

XYZX2Y2Z2UA

12345678

IndexChannel

axis12345678

11122213

Channel assignmentMachine parameter

1003 00002 Channel 1

XYZU_CH1−−−−

X2Y2Z2−−−−−

A−−−−−−−

− −−U_CH1−−−−

Channel axis nameMachine parameter

7010 00010[1]

Channel-Axis name

Channel-Axis index

1234

123

1

Channel 2

Channel 3

Page 380: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-4 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.1.1 Functions for Reading Coordinate and Axis Positions

Please note:D The coordinate index in the channel is always fixed for spatial and

machine coordinates.D On the other hand, coordinates can be incorporated or surrendered

by a channel using the axis transfer functions. As a result, the coordi-nate index of the other coordinates in the channel can change.Using the option of presetting the system axis index, work with fixedindices can also be carried out.

D A runtime error is issued when an unconfigured system axis is pre-set.

The described functions work with similar parameters; therefore, thesewill be explained in the following.

<Coordinate> Index or name of a coordinate:Aname is interpreted as a coordinate name. Only if nocorresponding coordinate name exists is it interpre-ted as a channel or system axis name.Anindex is interpreted according to the given <Selec-tion type>.Programming an unconfigured coordinate/axis leadsto a runtime error if the optional variable ERRNO isnot programmed.

<Axis> Index or name of a axis:Aname is interpreted as a channel axis name. If noneexists, the system axis name is used.Anindex is interpreted according to the given <Selec-tion type>.Programming an unconfigured axis leads to a runtimeerror if the optional variable ERRNO is not program-med.

<Selection type> optional:Determines how an index programmed under <Coor-dinate> or <Axis> is interpreted:0: System axis index1: Coordinate index or channel axis index (default)If there is no explicit programming, <Selection type>is set to 1.

Page 381: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-5Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Channel> optional: Channel number; permitted only when <Selectiontype> = 1.If coordinates/axes are to be read by third-partychannels, and if they can be addressed using their in-dex or name, the number of the channel to which thecoordinate/axis is currently assigned is entered in<Channel>.If no channel is entered, the coordinates/axes of thecurrent channel are accessed. If a system axis is ad-dressed (with name or index) and a channel is ent-ered at the same time, an error message is issued,even if variable ERRNO has been programmed.

ERRNO CPL variable that can be programmed in any position.When ERRNO is programmed, no runtime error is is-sued; the return values are:

0 : Access OK-1 : Parameter error-2 : Coordinate/axis does not exist.-3 : Invalid coordinate/axis in channel.-4 : Axis is not a pseudocoordinate.-5 : Channel does not exist.-6 : Function may be called only in an autonomous

channel.-7 : Data cannot be read.

Page 382: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-6 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

PCSSupplies the last programmed value for a coordinate.

The following applies:D If the workpiece coordinate system is switched after programming

the coordinate and before querying the position, the supplied valuealready takes the new workpiece coordinate system into account.

D Only coordinates of the autonomous channel may be queried.

Syntax:

PCS(<Coordinate>[,<Selection type>])

(For the parameters, see page 5-4;for programming ERRNO, see page 2-55)

Examples:PCS(”X”,ERRNO)

PCS(”X”,1)

Channel 2 according to sample configuration on page 5-3:N1 G0 G90 X2=150 Y2=10002 X2WERT=PCS(1,ERRNO)03 IF ERRNO <>0 THEN04 PRN#(0,”Error:”,ERRNO)05 ENDIF

X2WERT is assigned the program-med absolute position of the 1st coor-dinate in the current channel(X2WERT = 150)

N10 G91 X2=10011 X2WERT=PCS(1,1) X2WERT is assigned the program-

med absolute position of the 1st coor-dinate in the current channel(X2WERT = 160)

N12 X2=5 Y2=1013 Y2WERT=PCS(”Y2”,1) Y2WERT is assigned the program-

med absolute position of system axisY2 (Y2WERT = 110)

14 X2WERT=PCS(”X2”) X2WERT is assigned the program-med absolute position of the X2 coor-dinate in the current channel(X2WERT = 165)

15 XWERT=PCS(1,0) Runtime error: Access to the 1st sy-stem axis in channel 2 is not permit-ted (axis is assigned to channel 1).

Page 383: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-7Bosch Rexroth AGIndraMotion MTXR911314869 / 01

WCSSupplies the current workpiece position, without online compensationvalues, for a coordinate.

The following applies:D If the supplied value is to be determined at the time of block execu-

tion, a ”WAIT” must be programmed first in an autonomous block(also see section 2.14.2).Without WAIT, no uniquely predictable values are supplied becauseit is not precisely known how far block execution ”lags” behind blockpreparation.

D When accessing the coordinate values of a third-party channel, syn-chronization measures may need to be taken to measure a definedposition.

Syntax:

WCS(<Coordinate>[,<Selection type>[,<Channel>]])

(For the parameters, see page 5-4;for programming ERRNO, see page 2-55)

Examples:WCS(”X”,ERRNO)

WCS(”X”,1)

WCS(”X”,1,1)

Channel 2 according to sample configuration on page 5-3:10 WAIT20 Z2POS=WCS(3,1,2,ERRNO)21 IF ERRNO <>0 THEN22 PRN#(0,”Error:”,ERRNO)23 ENDIF

Z2POS is assigned the currently inter-polated workpiece position of the 3rdcoordinate of the 2nd channel(Z2-axis)

30 WAIT110 YPOS = WCS(”Y”) YPOS is assigned the currently inter-

polated workpiece position of the Y-coordinate of the current channel

120 XPOS = WCS(1) XPOS is assigned the currently inter-polated workpiece position of the 1stcoordinate of the current channel.

Page 384: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-8 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

MCSSupplies the current machine position (MCS) for a machine coordinatewithout straightness and angle error compensation.Coordinates on other channels can also be accessed.

The following applies:D If the supplied value is to be determined at the time of block execu-

tion, a ”WAIT” must be programmed first in an autonomous block(also see section 2.14.2).Without WAIT, no uniquely predictable values are supplied becauseit is not precisely known how far block execution ”lags” behind blockpreparation.

D When accessing the coordinate values of a third-party channel, syn-chronization measures may need to be taken to measure a definedposition.

Syntax:

MCS(<Coordinate>[,<Selection type>[,<Channel>]])

(For the parameters, see page 5-4;for programming ERRNO, see page 2-55)

Examples:MCS(”X”,ERRNO)

MCS(”X”,1)

MCS(”X”,1,1)

Channel 2 according to sample configuration on page 5-3:N10 G0 G90 X2=150 Y2=10020 WAIT30 X2WERT=MCS(”X2”,ERRNO)31 IF ERRNO <>0 THEN32 PRN#(0,”Error:”,ERRNO)33 ENDIF

X2WERT is assigned the currently in-terpolated machine position of theX2-coordinate

N40 G91 X2=10 Y2=1050 WAIT60 X2WERT=MCS(1,1) X2WERT is assigned the currently in-

terpolated machine position of the 1stmachine coordinate of the currentchannel (X2-coordinate).

70 Y2WERT=MCS(”Y2”,1,2) Y2WERT is assigned the currently in-terpolated position of the Y2-coordi-nate of the 2nd channel

80 XWERT=MCS(1,0) XWERT is assigned the currently in-terpolated axis position of the 1st sy-stem axis.

This access is permitted only if thesystem axis is identical to the ma-chine coordinate.

Page 385: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-9Bosch Rexroth AGIndraMotion MTXR911314869 / 01

ACSSupplies the current command position of an axis.Axes can be addressed using their channel axis name or their channelaxis index.Alternatively, axes can also be addressed using their system axis nameor their system axis index.

The following applies:D The result of ACS always corresponds to function SPOS.D If the supplied value is to be determined at the time of block execu-

tion, a ”WAIT” must be programmed first in an autonomous block(also see section 2.14.2).Without WAIT, no uniquely predictable values are supplied becauseit is not precisely known how far block execution ”lags” behind blockpreparation.

D When accessing the axis values of a different channel, synchroniza-tion measures may need to be taken to measure a defined position.

Syntax:

ACS(<Axis>[,<Selection type>[,<Channel>]])

(For the parameters, see page 5-4;for programming ERRNO, see page 2-55)

Examples:ACS(”X”,ERRNO)

ACS(”X”,1)

ACS(”X”,1,1)

Channel 2 according to sample configuration on page 5-3:N10 G0 G90 X2=150 Y2=10020 WAIT30 X2WERT=ACS(”X2”,ERRNO)31 IF ERRNO <>0 THEN32 PRN#(0,”Error:”,ERRNO)33 ENDIF

X2WERT is assigned the currently in-terpolated axis position of channelaxis X2

N40 G91 X2=10 Y2=1050 WAIT60 X2WERT=ACS(1,1) X2WERT is assigned the currently in-

terpolated axis position of the 1stchannel axis of the current channel(X2-axis).

70 Y2WERT=ACS(”Y2”,1,2) Y2WERT is assigned the currently in-terpolated axis position of channelaxis Y2 of the 2nd channel

80 XWERT=ACS(1,0) XWERT is assigned the currently in-terpolated axis position of the 1st sy-stem axis.

Page 386: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-10 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

SPOSSupplies the current command position of an axis based on the axiscoordinate system.All system axes can be addressed using their system axis name or theirsystem axis index.

The following applies:D SPOS and ACS always supply identical values.D If the supplied value is to be determined at the time of block execu-

tion, a ”WAIT” must be programmed first in an autonomous block(also see section 2.14.2).Without WAIT, no uniquely predictable values are supplied becauseit is not precisely known how far block execution ”lags” behind blockpreparation.

D When accessing the axis values of a different channel, synchroniza-tion measures may need to be taken to measure a defined position.

Syntax:

SPOS(<Axis>)

<Axis> Index or name of a system axisProgramming an unconfigured axis leads to a runtimeerror.

ERRNO cannot be programmed.

Example:Channels according to sample configuration on page 5-3.30 POS1=SPOS(1):

Variable POS1 is assigned the current com-mand axis value of the 1st system axis (X-axis in channel 1).

50 POS5=SPOS(”Y2”):

Variable POS5 is assigned the current com-mand axis value of the 5th system axis(Y2-axis in channel 2).

Page 387: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-11Bosch Rexroth AGIndraMotion MTXR911314869 / 01

APOSSupplies the current actual position of an axis based on the axis coor-dinate system.All system axes can be addressed using their system axis name or theirsystem axis index.

The following applies:D If the supplied value is to be determined at the time of block execu-

tion, a ”WAIT” must be programmed first in an autonomous block(also see section 2.14.2).Without WAIT, no uniquely predictable values are supplied becauseit is not precisely known how far block execution ”lags” behind blockpreparation.

D When accessing the axis values of a different channel, synchroniza-tion measures may need to be taken to measure a defined position.

Syntax:

APOS(<Axis>)

<Axis> Index or name of a system axisProgramming an unconfigured axis leads to a runtimeerror.

ERRNO cannot be programmed.

Example:Channels according to sample configuration on page 5-3.30 AKT4=APOS(4):

Variable AKT4 is assigned the current actualaxis value of the 4th system axis (X2-axis inchannel 2).

50 AKT8=APOS(”A”):

Variable AKT8 is assigned the current actualaxis value of the 8th system axis (A-axis inchannel 3).

Page 388: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-12 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.1.2 Functions for Reading Probes

PCSPROBEIf a switching measuring probe is connected to the axes of a channeland a measurement is launched, PCSPROBE can read the measuredvalue for any one coordinate.

The prerequisite for PCSPROBE is that the probe must be latched by allthe axes of the channel. The latched axis values are converted to pro-gram coordinates using the transformation chain that was activatedlast. PCSPROBE supplies the value for a coordinate.

Syntax:

PCSPROBE (<Coordinate>[,<Selection type>])

(For the parameters, see page 5-4;for programming ERRNO, see page 2-55)

. PCSPROBE cannot be used in conjunction with the ”FlyMeas”(FME) on-the-fly measurement function because only one singleaxis is measured during on-the-fly measurement.

Example:Channel 1 according to sample configuration on page 5-3:N10 G75 X100 Y100 Z5020 IF SD(9)=1 THENN30 (MSG, probe has not been deflected!)40 GOTO .FEHLER50 ELSE60 ZMESS=PCSPROBE(3,ERRNO)61 IF ERRNO <>0 THEN62 GOTO .Fehler05 ENDIF

Variable ZMESS is assigned the valueof the 3rd coordinate of the measuredposition.

70 ENDIF

Page 389: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-13Bosch Rexroth AGIndraMotion MTXR911314869 / 01

PROBESupplies axis values that refer to the ASC axis coordinate system.

The following applies:D PROBE permits access to only the axes of its own channel. As a re-

sult, the positions of asynchronous axes cannot be queried.D Only lead screw error and cross-compensation are taken into ac-

count.D The triggering of the probe in the channel can be checked with func-

tion SD(9).D In FsProbe function ”Measurement on positive stop”, the measured

values are read using functions PPOS or PROBE.

Syntax:

PROBE(<Axis>[,<Selection type>])

(For the parameters, see page 5-4; ERRNO cannot be programmed)

Example:Channel 2 according to sample configuration on page 5-3:N70 G75 Y2 25080 IF SD(9)=1 THENN90 (MSG, probe has not been deflected!)100 GOTO .FEHLER110 ELSE120 Y2MESS=PROBE(2) Variable Y2MESS is assigned the measured

actual position of the 2nd channel axis (inthis case, the Y2-axis of channel 2).

130 ENDIF

Page 390: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-14 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

PPOSSupplies the current actual axis position of a synchronous axis in theswitch point of the probe.

PPOS takes into account the following compensations:D Axis zero offsets (G54 - G59)D Tool compensations (G48, ED)D Program coordinate offset (Trans, ATrans)D Lead screw error and cross-compensation

The following are not taken into account:D Axis transformation (Coord)D Coordinate transformations (BcsCorr, G152 - G159)D Scaling (PoleSet, Mirror, Scale, Rotate)

The following applies:D PPOS permits access to only the axes of its own channel. As a result,

the positions of asynchronous axes cannot be queried.D Without any axis transformation or coordinate transformation, the

supplied value refers to the WCS workpiece coordinate system thatwas programmed last.

D In FSB function ”Measurement on positive stop”, the measured va-lues are read using functions PPOS or PROBE.

D The triggering of the probe in the channel can be checked with func-tion SD(9).

Syntax:

PPOS(<Axis>[,<Selection type>])

(For the parameters, see page 5-4; ERRNO cannot be programmed)

Example:Channel 3 according to sample configuration on page 5-3:N10 G1 G75 A250 F50020 IF SD(9) = 1 THENN30 (MSG, probe has not been deflected!)40 GOTO .FEHLER50 ELSE60 AMESS = PPOs(1,1) Variable AMESS is assigned the measured

value of the 1st channel axis of the channel.70 ENDIF

Page 391: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-15Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.1.3 Functions for Reading Offsets and Placements

AXOAXO supplies the current G92 offset for a coordinate at the time of blockpreparation, i.e. the offset that was last activated at the time of programinterpretation is supplied.

Syntax:

AXO(<Coordinate>[,<Selection type>])

(For the parameters, see page 5-4; ERRNO cannot be programmed)

. AXO permits access to only the offset values of its own channel.Since asynchronous axes do not have any G92 offset, AXO is notpermitted for asynchronous axes.

Example:Channel 1 according to sample configuration on page 5-3:N10 G1 G90 X100 F1000N20 G92 X75 Y12530 XD = AXO(”X”) XD is assigned the G92 offset of the X-coor-

dinate of the current channel that was acti-vated last (XD=100-75=25)

40 YD = AXO(2,0) YD is assigned the G92 offset of the 2ndsystem axis that was activated last(YD=200-125=75))

50 X2D = AXO(4,0) Runtime error because the 4th system axisis assigned to channel 2.

Page 392: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

5-16 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

COFSupplies the last programmed contour shift of a coordinate.Since the programmed contour shift acts only on the coordinates in thecurrent channel, selecting a nonexistent coordinate in the current chan-nel results in an error message.Compensation values are supplied in the active unit of the current chan-nel, i.e. in ”Inch” for G70 and in ”mm” for G71. In the case of rotary axes /rotatory spatial coordinates, the unit is always ”degrees”.

Syntax:

COF(<Coordinate>[,<Selection type>])

(For the parameters, see page 5-4; ERRNO cannot be programmed)

Examples:10 A=COF(3):

Supplies the last-programmed contour shift of thecoordinate with the 3rd coordinate index in the ac-tive channel.

20 B=COF(”X”):

Supplies the last-programmed contour shift of theX-coordinate in the active channel.

30 C=COF(2.0):

Supplies the last-programmed contour shift of the2nd system axis in the active channel.This access is permitted only if the system axis isidentical to the WCS coordinate.

100 C=COF(0):

Runtime error because 0 is not a valid coordinateindex.

Page 393: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Coordinate and Axis Values

Electric Drivesand Controls

5-17Bosch Rexroth AGIndraMotion MTXR911314869 / 01

DPCSupplies the last-programmed parameter of the workpiece positioncompensation (BCR) of a coordinate (offset values and turning angle).

Since the workpiece position compensation acts only on the coordina-tes in the current channel, selecting a nonexistent coordinate in the cur-rent channel results in an error message.Compensation values are supplied in the active unit of the current chan-nel, i.e. in ”Inch” for G70 and in ”mm” for G71. In the case of rotary axes /rotatory spatial coordinates, the unit is always ”degrees”.

Syntax:

DPC(<Coordinate>[,<Selection type>])

(For the parameters, see page 5-4; ERRNO cannot be programmed)<Coordinate> Additional effect of the specifications:

”1” to ”n” or ”Name”: Supplies the offset value”0” Supplies turning angle Phi.

Examples:10 A=DPC(1):

Supplies the last-programmed workpiece positioncompensation of the coordinate with the 1st coor-dinate index in the channel.

15 B=DPC(”X”):

Supplies the last-programmed workpiece positioncompensation of the X-axis/coordinate in the chan-nel.

20 B=DPC(2):

Supplies the last-programmed workpiece positioncompensation of the coordinate with the 2nd coor-dinate index in the channel.

25 B=DPC(2,0):

Supplies the last-programmed workpiece positioncompensation of the 2nd system axis in the activechannel.

30 WINKEL=DPC(0):

Supplies the last-programmed turning angle Phi.

100 C=DPC(9):

Runtime error because 9 is not a valid coordinateindex if there are 8 axes in the system.

Page 394: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Zero Offsets

5-18 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.2 Zero Offsets

The following CPL commands permit ZO tables to be read, created andmodified.

ZOV ZeroOffsetValueSupplies the sum of the last-programmed and thus effective ZO valuesof a machine coordinate (axis) or, optionally, the effective value of a sin-gle ZO page.

Syntax:

ZOV(<Axis selection>[,<ZO page>])

<Axis selection> Name of the machine coordinate (axis), programmedin turned commas, orindex of the machine coordinate (axis); values = 1-8

<ZO page> Index of the ZO page; values = 1-5

Examples:ZOV(”X”) Supplies the sum of all effective (last-programmed) ZOs

for machine coordinate (axis) X.ZOV(2,3) Supplies the effective ZO of the 3rd ZO page for the 2nd

machine coordinate (axis).

ZOT ZeroOffsetTableRead/write access to any XML zero offset table within the IndraMotionMTX file system. Only single elements can be accessed. During writing,incremental modifications can also be preset.

Syntax:

ZOT(<Column selection>,<ZO code>[,[<ZO page>][,[<Ta-ble>][,<Unit>]]])

<Column selection> Name of the machine coordinate (axis), pro-grammed in turned commas, orcolumn index within the table.The following is possible during write access:- overwriting the table value, or- entering data additively if the <column

selection>starts with a negative symbol.<ZO code> 54: 1st zero offset

55: 2nd Zero offset56: 3rd Zero offset57: 4th Zero offset58: 5th Zero offset59: 6th Zero offset

Page 395: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Zero Offsets

Electric Drivesand Controls

5-19Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<ZO page> Index of the ZO page (1-5). Default value: 1

<Table> Name of the ZO table; if required, with absoluteor incremental path information (table suffix”.zot” must not be included in the programming).If there is no path information, a search withinthe configured search path is carried out. For tables with default names such as ZO1,ZO2, etc., only the value of the number can beprovided. If there is no table name, the last-acti-vated table is accessed.

<Unit> 0 or ”MM”: mm1 or ”INCH”: inchesDuring write access, the assigned value is inter-preted in the unit provided. During read access,the value is converted into the unit provided. Default value: mm

<Channel> Channel assignment (0..12).Channel-specific coordinates of the ZO tablewith identical names can be differentiated bymeans of channel assignment.Default: The 1. column according to <columnselection> is accessed.The channel entry is ignored.The 1. found column with column selection1 and <channel> is accessed.If not found: Error.

ERRNO CPL variable. If the CPL variable ERRNO isspecified at any place in the parameter list, noruntime error is generated. The error is suppliedby a corresponding value of the variable.The following return values are possible: 0 : Access OK <0 : Error (exact error description:

see Chapter 2.10.5 ERRNO variable onerror evaluation of CPL functions).

If the CPL variable ERRNO is not specified, aruntime error is generated in case of an accesserror.

Page 396: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Zero Offsets

5-20 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples:ZOT(”X”,54) Access to the G54 offset of axis / machine

coordinate ”X” in the last-activated ZO table ofthe channel.

ZOT(2,55,2) Access to the G55.2 offset of the 2nd enteredaxis / machine coordinate in the last-activatedZO table of the channel.

ZOT(3,57,,”V1”) Access to the G57 offset of the 3rd enteredaxis / machine coordinate in ZO table ”V1.zot”.

ZOT(”Z”,58,4,21,1) Inch access to the G58.4 offset of axis / ma-chine coordinate ”Z” in ZO table ”ZO21.zot”.

ZOT(”Y”,59,5,”/mnt/esmuser/de/HHGENIUS”,”MM”)Metric access to the G59.5 offset of axis / ma-chine coordinate ”Y” in table ”HHGENIUS” indirectory ”/mnt/esmuser/de”.

ZOT(”Y”,56,1,”/mnt/ZOF”,”MM”,2)Metric access to the G56.1 offset of axis / ma-chine coordinate ”Y” assigned to channel 2 intable ”ZOF” in directory ”/mnt/”.

ZOTCRCreates an XML zero offset table with no correction records within theMTX file system.

Syntax:

ZOTCR(<Table>,<Channel/Template>)

<Table> : Name of the XML table, if applicable including path.<Channel/Template> : Channel number or name of the XML table, if

applicable including path.ERRNO CPL variable. If the CPL variable ERRNO is specified

at any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable.The following return values are possible: 0 : Access OK <0 : Error (exact error description:

Chapter 2.10.5 ERRNO variable on error evaluation of CPL functions).

If the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

Example:ZOTCR(”/usr/user/zot.tst”,1)

Generation of the new ”/usr/user/zot.tst” ta-ble with columns for each axis of the firstchannel.

Page 397: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Zero Offsets

Electric Drivesand Controls

5-21Bosch Rexroth AGIndraMotion MTXR911314869 / 01

ZOCINSInserts a new axis in front of an existing column in an XML zero offsettable. The new axis comprises the same number of correction recordsas the 1. axis of the table. The values are preset with 0.0.

Syntax:

ZOCINS(<Table>,<Position>,<AxisName>[,[<AxisType>][,[<Axi-sChannel>][,<PosChannel>]]])

<Table> : Name of the XML table, if applicable including path.<Position> : Coordinate name or column index of the insert posi-

tion<Axis name> : Axis name of the new table column<AxisType> : optional axis type of the new axis

0 : linear axis (default value)1 : rotary axis

<AxisChannel> : channel number of the new axis:Default : 0

<PosChannel> : Channel number of the coordinate at the insert posi-tion if a coordinate name has been specified; other-wise, no meaning.

ERRNO CPL variable. If the CPL variable ERRNO is specifiedat any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable.The following return values are possible: 0 : Access OK <0 : Error (exact error description:

Chapter 2.10.5 ERRNO variable on error evaluation of CPL functions).

If the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

Page 398: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Zero Offsets

5-22 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples:ZOCINS(”/usr/user/zot.tst”,”X”,”Y”)

Insertion of a new axis in the ”/usr/user/zot.tst” table with the column name ”Y” infront of the table column with the name ”X”.

Variant with axis nameZOCINS(”/ZOT_Trafo.zot”,”X”,”U”,,1,1)

Insertion of a new linear axis (for channel 1),in the ”/ZOT_Trafo.zot” table with the co-lumn name ”U” before the table column withthe name ”X” of channel 1;After input of this command, the axis withthe designation ”X” and the channel 1 issearched in the table; the new linear axis”U” is inserted in its position for cahnnel 1.

Variant with column index of the insert positionZOCINS(”/ZOT_Trafo.zot”,1,”U”,1,,2)

Insertion of a new rotary axis (for channel 2)in table ”/ZOT_Trafo.zot” with the columndesignation ”U” in table column 1.

ZOCDELDeletes an axis in an XML zero offset table

Syntax:

ZOCDEL(<Table>,<Position>[,<Channel>])

<Table> : Name of the XML table, if applicable including path.<Position> : Axis name or column index of the axis to be deleted<Channel> : Channel number of the axis to be deleted

Default : 0ERRNO CPL variable. If the CPL variable ERRNO is specified

at any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable.The following return values are possible: 0 : Access OK <0 : Error (exact error description:

Chapter 2.10.5 ERRNO variable on error evaluation of CPL functions).

If the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

Page 399: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Zero Offsets

Electric Drivesand Controls

5-23Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Examples:ZOCDEL(”/usr/user/zot.tst”,”X”)

Deleting the axis with the column designa-tion ”X” in the table ”/usr/user/zot.tst”.

Variant with axis name of the axis to be deletedZOCDEL(”/ZOT_Trafo.zot”,”X”,1)

Deleting the axis with the column designa-tion ”X” in the table ”/ZOT_Trafo.zot”.After input of this command, the axis withthe designation ”X” (in channel 1) is sear-ched in the table and then deleted.

Variant with spindle index of the axis to be deletedZOCDEL(”/ZOT_Trafo.zot”,1)

Deleting the axis with the column index 1 inthe table ”/ZOT_Trafo.zot”.After input of this command, the first axis inthe table is deleted.

Page 400: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Tool Compensation

5-24 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.3 Tool Compensation

The following CPL commands permit access to internal tool compensa-tion data (D-corrections) and external tool compensation data (ED-cor-rections) to which the PLC has access.

TCV ToolCorrectionValueSupplies the last-programmed tool compensation values, whether as asum (D-correction + external correction memory) or as a single value.

Syntax:TCV(<Value selection>[,<Correction selection>])

<Value selection> Number of the D-/ED-correction:0: D-/ED corrections

activated last1 or ”L1”: L1-correction length2 or ”L2”: L2-correction length3 or ”L3”: L3-correction length4 or ”RAD”: Tool / tool edge radius 5 or ”ORI”: Tool edge position6 or ”PHI”: Euler angle ϕ

(only ED-correction)7 or ”THE”: Euler angle ϑ

(only ED-correction)8 or ”PSI”: Euler angle ψ

(only ED-correction)

<Correction selection> 1 or ”D”: D-correction (internal)2 or ”E”: ED-correction (external)Default: Sum of D- and ED-

corrections

Examples:TCV(0,”D”) Supplied the D correction programmed last.TCV(”L1”) Reading of the sum of L1-values of the last-pro-

grammed D- and ED-corrections.TCV(4,1) Reading of the tool radius of the last-programmed

D-correctionTCV(2,”E”) Reading of the L2-tool length of the last-program-

med ED-correction

Page 401: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Tool Compensation

Electric Drivesand Controls

5-25Bosch Rexroth AGIndraMotion MTXR911314869 / 01

DCT D-CorrectionTableRead and write access to tool compensation values in any D-correctiontables as well as to external correction values (ED-correction). Duringwriting, incremental modifications can also be preset.

Syntax:DCT(<Value selection>,<Data block>[,[<Table>][,<Unit>]])

<Value selection> Number of the D-/ED-correction:1 or ”L1”: L1-correction length2 or ”L2”: L2-correction length3 or ”L3”: L3-correction length4 or ”RAD”: Tool / tool edge radius 5 or ”ORI”: Tool edge position6 or ”PHI”: Euler angle ϕ (only ED-correction)7 or ”THE”: Euler angle ϑ (only ED-correction)8 or ”PSI”: Euler angle ψ (only ED-correction)The value can be read or written.The following is possible during write access:- overwriting the table value, or- adding the value to the table value if

<Value selection> starts with a negative symbol. Incremental writing is not possible for the tool edgeposition (5 or ”ORI”).

<Data block> 1-99: for a D-correction1-16: for an ED-correction

<Table> Name of the D-correction table;if required, with absolute or incremental path informa-tion (without table suffix ”.dct”). If there is no path infor-mation, a search within the configured search path iscarried out. For tables with default names such as DC1, DC2, etc.,only the value of the number need be provided. without <Table>, the last-selected D-correction tableis accessed.0: Access to ED-correction.

<Unit> 0 or ”MM”: mm (default)1 or ”INCH”: inchesDuring write access, the assigned value is interpretedin the unit provided. During read access, the value isconverted into the unit provided.

Examples:DCT(1,10,”K4”) Access to the ”L1 ” correction value of data block

10 in D correction table ”K4”.DCT(”RAD”,7) Incremental writing to the tool radius of data block

7 of the last-activated table.DCT(”L2”,16,0,”INCH”)

Inch access to the ”L2” correction of data block 16of the external tool compensation.

Page 402: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Tool Database

5-26 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.4 Tool Database

DBTABThis can read a complete data block or a substructure of a tool databasetable into a CPL variable or write from the variable back to the datablock.

Syntax:DBTAB(<DbTable>,<Key1>,<Key2>[,<ResVar>])

<DbTable> Name of the database table with substructures(Xpath string). A ”.” or ”/” can be used as a separatorbetween structure components.

<Key2> Database key 1<Key2> Database key 2<ResVar> Variable of type Integer.

If<ResVar> is entered, a runtime error does not resultin case of an access error. The following return valuesare possible:0: Access OK1: Error during access2: Not enough memory3: Invalid variable typeIf <ResVar> is not entered, a runtime error results incase of an access error.

Example:10 SV.A=DBTAB(”DBT1.Rec”,1,1)20 D!=DBTAB(”DBT1.Rec.UD.Ed.Geo.L1”,1,1)30 SV.A.UD.Ed.Geo.L1 = 1040 DBTAB(”DBT1.Rec”,1,1) = SV.A

Page 403: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Tool Database

Electric Drivesand Controls

5-27Bosch Rexroth AGIndraMotion MTXR911314869 / 01

DBSEASearches for a data block in a tool database table.

Syntax:DBSEA(<DbTab>,<Key1>,<Key2>,<SeachCond>,<SeachRes>[,<ResVar>])

<DbTab> Name of the database table.<Key2> Start key 1<Key2> Start key 2<SearchCond> Search condition as a string (see below)<SearchRes> Search result, variable of type Integer.

0: No data block that fits the search condition found1: Data block that fits the search condition found.

<ResVar>: Variable of type Integer.If<ResVar> is entered, a runtime error does not resultin case of an access error. The following return valuesare possible:0: Access OK1: Error during access2: Not enough memory3: Invalid variable type4: Search condition faultyIf <ResVar> is not entered, a runtime error results incase of an access error.

Search condition (<SearchCond>)The following syntax must be maintained:D A list of individual conditions, all of which must be fulfilled, is provi-

ded.D The individual conditions are separated by ’,’.D A normal individual condition has the form:

<Tag name><Relational operator><Value> where:D <Relational operator>: ”=” equal to

”>” greater than”>=” greater than or equal to”<” less than”<=” less than or equal to”<>” not equal to

D Only the following is permitted for SKQ as the relational operator:”=” and ”<>”,e.g. SKQ=4711

Page 404: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Tool Database

5-28 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

D A bit mask individual condition has the form:- <Tag name>=<Value>:<Mask>e.g. BQ1=0x307000:0xF0FF00where:D <Value>: Value that the relevant bits must haveD <Mask> : Specification of the relevant bitsThe values and masks are interpreted:D as a hexadecimal number if they start with ”0x” or ”0X”D as an octal number if they start with ”0”D otherwise as a decimal number.Within <Value>, preceding or following spaces are not evaluated. If astring is to be specified in which these spaces are important, the sub-string must be surrounded by turned commas (e.g.: SKQ=’ ’). To use a turned comma in a substring that is surrounded by turnedcommas, the ”\” symbol bust precede the turned comma (e.g.:SKQ=’Achim\’s’)

Boundary conditions:D Only predefined tag names may be usedD Only queries regarding equality are possible.

Example:K1=1IKQ2=3BQ2=0x1:0x1

The CPL function returns the first data block that satisfies the searchcondition. In this case, variable <SearchRes> returns a value of 1. Thesearch starts at the data block that is defined by the two start keys. If oneof the two start keys has a value of -1, the search starts at the first datablock of the database table.

Example:10 SV.A.Hd=DBSEA(”DBT1”,-1,-1,”K1=1”,FOUND%)

20 WHILE FOUND%=1 DO

30 SV.A.Hd=DBSEA(”DBT1”,SV.A.Hd.K1,SV.A.Hd.K2,”K1=1”,FOUND%)

40 END

Page 405: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Placements (Inclined Plane)

Electric Drivesand Controls

5-29Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.5 Placements (Inclined Plane)

The following CPL commands allow access to placement tables.

PMV PlaceMentValueSupplies the sum of the last-programmed, and thus effective, place-ment values for a coordinate. Optionally, the effective value of an indivi-dual placement page can be read.

Syntax:PMV(<Coord.selection>[,<Pl. page>])

<Coord.selection> Index of the coordinate (1-6) or fixed identifier”X”, ”Y”, ”Z”, ”PHI”, ”THE”, ”PSI” for WCS coordi-nates.

<Pl. page> Index of the placement page (1-5)

Examples:PMV(”Y”) Supplies the sum of all effective (last-programmed)

placements for coordinate Y. Due to the possible rota-tions, not only the sum of the individual pages is invol-ved, but also the resulting offset in the ”Y”-direction ofthe basic workpiece coordinate system.

PMV(4,4) Supplies Euler angle PHI of the active placement of the4th page.

Page 406: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Placements (Inclined Plane)

5-30 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

PMT PlaceMentTableRead/write access to any XML placement table of IndraMotion MTX;only individual elements may be accessed. During writing, incrementalmodifications can also be preset.

Syntax:PMT(<Coord.selection>,<Pl. code>[,[<Pl. page>][,[<Table>][,<Unit>]]])

<Coord.selection> Index of the coordinate (1-6) or fixed identifier”X”, ”Y”, ”Z”, ”PHI”, ”THE”, ”PSI” for WCS coordi-nates.The value can be read or written. The followingis possible during write access:- overwriting the table value, or- adding the value to the table value if

<Coord.selection> starts with a negativesymbol.

<Pl. code> 154: Placement 1155: Placement 2156: Placement 3157: Placement 4158: Placement 5159: Placement 6

<Pl. page> Index of the placement page (1-5)Default value: 1

<Table>: Name of the placement table; if required, withabsolute or incremental path information (tablesuffix ”.pmt” must not be included in the pro-gramming). If there is no path information, asearch within the configured search path is car-ried out. For tables with default names such as PM1,PM2, etc., only the value of the number need beprovided. If there is no table name, the last-acti-vated table is accessed.

<Unit> 0 or ”MM”: mm1 or ”INCH”: inchesFor the 3 translatory coordinates, the assignedvalue is interpreted in the unit provided for writeaccess; in the case of read access, the value isconverted into the unit provided. Default value: mm

Page 407: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Placements (Inclined Plane)

Electric Drivesand Controls

5-31Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Examples:PMT(”Z”,155) Access to the G155 offset of coordinate ”Z” in the

last-activated placement table of the channel.PMT(5,157,3) Access to Euler angle ϑ of G157.3 in the last-acti-

vated placement table of the channel.PMT(”X”,154,,”P1”) Access to the G154.1 offset of coordinate ”X” in

placement table P1.PMT(3,158,4,,1) Inch access to the G158.4 offset of coordinate ”Z”

in the last-activated placement table of the chan-nel.

PMT(”Y”,159,5,”/mnt/esmuser/de/PL5”,”MM”)Metric access to the G159.5 offset of coordinate”Y” in table ”PL5” in directory ”/mnt/esmuser/de”.

Page 408: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

XML Tables

5-32 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.6 General Access to XML Tables

XTABRead/write access to any XML table.As opposed to the special functions for ZO, D-correction and placementtables, this function also permits access to any substructures of a tableif a corresponding data type has been defined.

Syntax:XTAB(<Table>,<Substructure>)

<Table> Name of the XML table; if necessary with path infor-mation

<Substructure> Desired substructure, provided as an XPATH expres-sion.

Example:10 X!=XTAB(”/database/PM1.pmt”,”/PMT/set[1]/G154/Corr/Trans/XWCS”)

20 XTAB(”/database/PM1.pmt”,”/PMT/set[1]/G154/Corr/Trans/XWCS”)=X!+1.0

Increment the va-lue in the table by1.

XTABCRCreates an XML table with no data within the MTX file system.

Syntax:

XTABCR(<Table>,<Type>[,<Tabl layout>])

<Table> : Name of the XML table, if applicable including path.<Type> : Table type (XML root tag)<Table template> : Name of the template XML table, if applicable inc-

luding path. The specified <type> must correspond tothe <table template> type.

Page 409: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

XML Tables

Electric Drivesand Controls

5-33Bosch Rexroth AGIndraMotion MTXR911314869 / 01

ERRNO CPL variable. If the CPL variable ERRNO is specifiedat any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable. The following return values arepossible: 0 : Access OK -1 : Parameter error-13 : Data cannot be written-14 : XML table exists-15 : XML table not found-16 : invalid file extension-17 : invalid table typeIf the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

DBMOVETranslation of a data set within a database table.

Syntax:

DBMOVE(<DbTab>,<SrcKey1>,<SrcKey2>,<DestKey1>,<Dest -Key2>[,<Mode>])

<DbTab> : Root tag of the XML file.<SrcKey1> : 1. key of source data record<SrcKey2> : 2. key of source data record<DestKey1> : 1. key of target data record<DestKey2> : 2. key of target data record<Mode> : optional, (default: 0)

0 :The contents of the source data record is shiftedinto the target

data record, and the contents of the source datarecord is set to zero.

1 :The contents of the source data record is copied into the targetdata record, and the contents of the source dataremains unchanged.

2 :The content of the source data record and the target data record are exchanged.

Page 410: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

XML Tables

5-34 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ERRNO CPL variable. If the CPL variable ERRNO is specifiedat any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable. The following return values arepossible: 0 : Access OK -1 : Parameter error -7 : Data cannot be read-13 : Data cannot be written-20 : Faulty root tag-21 : File access not possible-22 : Invalid key-23 : Data record is lockedIf the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

Example:DBMOVE(”/DBT1”,1,1,2,2)

The contents of the data record (1,1) is shif-ted into the data record (2,2).

DBLOADCan read in parts of a database table or a complete database table froma file into the database. Via the <Mode> parameter, it is possible to con-trol whether all data of the data record or only tool- or place-specificdata are read in.

Syntax:

DBLOAD(<DbTable>,<Key1>,<Key2>>,<Filename>[,<Mode>] )

<DbTable> : Root tag of the database table.<Key1> : Database key 1<Key2> : Database key 2<Mode> : The following values are possible for <Mode>:

0: all data of the data record are read in

1: only tool-specific data are read in

2: only place-specific data are read in

If <Mode> is not specified, 0 is used as a default va-lue.

Page 411: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

XML Tables

Electric Drivesand Controls

5-35Bosch Rexroth AGIndraMotion MTXR911314869 / 01

ERRNO CPL variable. If the CPL variable ERRNO is specifiedat any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable. The following return values arepossible: 0 : Access OK <0 : Error (exact error description:

Chapter 2.10.5 ERRNO variable on error evaluation of CPL functions).

If the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

Example:10 DBLOAD(”/DBT1”,1,1,”/dbdaten.txt”,1,ERRNO)

The tool-specific data of the data record(1,1) are read in from the ”dbdaten.txt” file.

DBSAVEVia DBSAVE, parts of a database table or a complete database tablecan be saved to a file.

Syntax:

DBSAVE(<DbTab>,<Key1>,<Key2>,<FileName>[,<Mode>] )

<DbTab> : Root tag of the XML file.<Key1> : 1. Key of the data record<Key2> : 2. Key of the data record<FileName> : File name<Mode> : optional, (default: 0)

0 : The data is written in the ”FileName” file. If the file exists already, the content is overwritten.

1 : The data is annexed to the existing ”FileName” file.

ERRNO CPL variable. If the CPL variable ERRNO is specifiedat any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable. The following return values arepossible: 0 : Access OK -1 : Parameter error -7 : Data cannot be read-13 : Data cannot be written-20 : Faulty root tag-21 : File access not possible-22 : Invalid key-23 : Data record is lockedIf the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

Page 412: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

XML Tables

5-36 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

If both keys have the value -1, all data records are written into the file. Ifthe 1st key has a value not equal to -1, and the 2nd key the value -1, alldata record whose 1st key has the specified value are written into thefile.

Example:DBSAVE(”/DBT1”,1,1,”/dbdaten.txt”)

The contents of the data record (1,1) is sa-ved to the ”dbdaten.txt” file.

DBTABXThis can read a complete data block or a substructure of a tool databasetable into a CPL variable or write from the variable back to the datablock. Via the <Mode> parameter, it is possible to control whether alldata of the data record or only tool- or place-specific data are written.

Syntax:

DBTABX(<DbTabelle>,<Key1>,<Key2>[,<Mode>] )

<DbTable> : Name of the database table with substructures(Xpath string). A ”.” or ”/” can be used as a separatorbetween structure components.

<Key1> : Database key 1<Key2> : Database key 2<Mode> : The following values are possible for <Mode> with

write access:0: all data of the data record are

written1: only tool-specific data are

written2: only place-specific data are

writtenIf <Mode> is not specified, 0 is used as a default va-lue.With read access, <Mode> has no meaning.

ERRNO CPL variable. If the CPL variable ERRNO is specifiedat any place in the parameter list, no runtime error isgenerated. The error is supplied by a correspondingvalue of the variable. The following return values arepossible: 0 : Access OK <0 : Error (exact error description:

Chapter 2.10.5 ERRNO variable on error evaluation of CPL functions).

If the CPL variable ERRNO is not specified, a runtimeerror is generated in case of an access error.

Page 413: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

XML Tables

Electric Drivesand Controls

5-37Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:10 SV.A = DBTABX(”DBT1.Rec”,1,1)20 D! = DBTABX(”DBT1.Rec.UD.Ed.Geo.L1”,1,1)30 SV.A.UD.Ed.Geo.L1 = 1040 DBTABX(”DBT1.Rec”,1,1,1,ERRNO) = SV.A50 IF ERRNO <>0 THEN60 SETERR(”Tool data record could not be written”)70 ENDIF

DBTABXLThis can read a complete data block or a substructure of a tool databasetable into a CPL variable or write from the variable back to the datablock. With read access, the data record is locked. For writing the datarecord, this lock is removed once more.

Syntax:

DBTABXL(<DbTabelle>,<Key1>,<Key2>[,<Mode>] )

<DbTabelle> : Name of the database table with substructures(Xpath string). A ”.” or ”/” can be used as a separatorbetween structure components.

<Key1> : Database key 1<Key2> : Database key 2<Mode> : With write access, the lock is removed irrespective of

<Mode>.The following values are possible:

0: all data of the data record are written1: only tool-specific data are written2: only place-specific data are written3: no data are written.

If <Mode> is not specified, 0 is used as a default valuewith write access. With read access, <Mode> has nomeaning.

ERRNO : CPL variable. If the ERRNO CPL variable is speci-fiedat any place in the parameter list,no runtime error is generated. The error issupplied by the a corresponding value of the variable.The following return values are possible: 0 : Access OK <0 : Error (exact error description:

Chapter 2.10.5 ERRNO variable on error evaluation of CPL functions).

If the ERRNO CPL variable is not specified,a runtime error is generated in case of access error.

Page 414: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

XML Tables

5-38 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:10 SV.A = DBTABXL(”DBT1.Rec”,1,1)20 D! = DBTABXL(”DBT1.Rec.UD.Ed.Geo.L1”,1,1)30 SV.A.UD.Ed.Geo.L1 = 1040 DBTABXL(”DBT1.Rec”,1,1) = SV.A

DBSEAXSearches data sets which correspond to the search criterium in a tooldatabase table. Provided the result variable is large enough, All corres-ponding data records are saved to this variable. As a result, the functionsupplies the number of elements written in the result variable.

Syntax:

DBSEAX(<DbTable>,<Key1>,<Key2>,<SearchCond>,<ErgArr>,<ErgSize>)

<DbTable> Name of the database table.<Key1> Database key 1<Key1> Database key 2<SearchCond> Search criterium as a string<ErgArr> Result variable (system data array)<ErgSize> Number of resultsERRNO CPL variable. If the ERRNO CPL variable is specified

at any place in the parameter list,no runtime error is generated. The error issupplied by the a corresponding value of the variable.The following return values are possible: 0 : Access OK <0 : Error (exact error description:

Chapter 2.10.5 ERRNO variable on error evaluation of CPL functions).

If the ERRNO CPL variable is not specified,a runtime error is generated in case of access error.

Example:10 ANZ% = DBSEAX(”DBT1.Rec”,1,1,”K1=1”,SV.A,5)

Page 415: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Scaling

Electric Drivesand Controls

5-39Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.7 Scaling

SCLSupplies for the current channel (here: channel in which the programwith the SCL command is running) the parameters last programmed ofthe functions PLS, SCL, MIR and ROT (pole coordinates, scaling fac-tors and rotation angles).Since PLS, SCL, MIR and ROT(...) act only on the coordinates in thecurrent channel, selecting a nonexistent coordinate in the current chan-nel results in an error message.Position values are supplied in the active unit of the current channel, i.e.in ”Inch” for G70 and in ”mm” for G71. In the case of rotary axes / rotatoryspatial coordinates, the unit is always ”degrees”.

Syntax:

SCL(<Selection>[,<Coordinate>[,<Selection type>]])

<Selection > 0: rotation angle of the main plane programmed last1: Last-progr. pole of a channel axis2: Last-progr. scaling factor of a channel axis

<Coordinate> Index or name of a coordinate:A name is interpreted as a coordinate name. Only ifno corresponding coordinate name exists is it inter-preted as a channel or system axis name.Anindex is interpreted according to the given <Selec-tion type>.Programming an unconfigured coordinate/axis leadsto a runtime error if the optional variable ERRNO isnot programmed.

<Selection type> optional:Determines how an index programmed under <Coor-dinate> is interpreted:0: System axis index1: Coordinate index (default)If there is no <selection type,> the index is interpretedas a coordinate index!

Examples:10 W=SCL(0):

Writes the last-programmed turning angle to varia-ble W.

20 P=SCL(1,2):

Writes the pole of the coordinate with the 2ndcoordinate index in the channel to variable P.

30 F=SCL(2,2,1):

Writes the scaling factor of the coordinate with the2nd coordinate index in the channel to variable F.

40 D=SCL(2,”X”) Writes the scaling factor of the X-coordinate in thechannel to variable D.

Page 416: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

5-40 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.8 System Data

5.8.1 System Data of Simple Types

MCATransfers the contents of a MACODA individual parameter. Dependingon the type of data, this value can be of the ”integer”, ”float”, ”double” oreven ”string” type. The variable in which the transferred value is to bestored must be of the same type!Type conflicts between the value trans-ferred and the destination variable are detected during the program’sruntime and acknowledged in the form of an error message.

Syntax:

MCA(<Block>,<Index>[,<Channel>])

<block> Number of a MACODA parameter. Within one MA-CODA parameter, more than one MACODA indivi-dual parameter (parameter list) can be contained.If a nonexistent parameter number is programmed, aruntime error will appear.

<index> Index of the MACODA individual parameter, begin-ning with ”0”.If a nonexistent index number is programmed, a run-time error will appear.

<Channel> Channel number. If not programmed, the function willsupply the MACODA individual parameter of thechannel in which the CPL program is presently beingexecuted.If a nonexistent channel number is programmed, aruntime error will appear.

Example: MCA command

10 BLOCKNR%=10030000420 ERG%=MCA(BLOCKNR%,0) !

MACODA no.

The integer variable ERG% isassigned the contents of the firstindividual parameter of the MACODA parameter 100300004of the active channel(=axis movement type)

Page 417: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

Electric Drivesand Controls

5-41Bosch Rexroth AGIndraMotion MTXR911314869 / 01

NCFSupplies the syntax of the NC function that was programmed last withinthe modal group or the auxiliary function group of <NC functions>. All ofthe modal groups of the control, as well as the auxiliary functions thatare defined in the auxiliary function groups, can be queriedThe variable in which the result is to be stored must be of type ”Dimen-sioned character field”.Type conflicts are detected during the running time of the program andconfirmed with an error message.

Syntax:

NCF(<NC function>)

<NC function> Syntax of any NC function or auxiliary function.If a nonexistent syntax is programmed, a run-time error is issued.

Examples:10 DIM A$(4):

Set the size of a character field for a string with amaximum length of 4 characters.

20 A$=NCF(”G1”):

The syntax of the last-programmed NC function ofthe group that contains ”G1” as the syntax is assi-gned to string variable A$.

N80 [A$] The previously queried NC function is programmedagain.

N10 M3 S1234 T2345123 DIM A$(4)20 A$=NCF(”M3”)N30 [A$] The previously queried NC function is

programmed again.50 PRN#(0,”M3 group:” ,A$,”is active”)N30 M533 A$=NCF(”M3”)34 PRN#(0,”M3 group:” ,A$,”is active”)N70 M30

. The spindle syntax of the IndraMotion MTX is freely configurableand is set in machine parameter 1040 00101 ff.

Page 418: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

5-42 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

SCSPermits read access to SERCOS drive parameters of the active para-meter set.

Syntax:

SCS(<Axis selection>,<ID type>,<ID No>[,<ResVar>])

<Axis selection> System axis index or system axis name<ID type> String expression.

”S”: S parameter”P”: P parameter

<ID No> Number of the SERCOS parameter<ResVar>: If<ResVar> is entered, a runtime error does not result

in case of an access error:the following return values are possible:0: Access OK1: Access is currently impossibleIf <ResVar> is not entered, a runtime error results incase of an access error.<ResVar> is an Integer variable.

The parameter content is supplied without a unit or scaling.

. Parameters that contain a list (several values separated by com-mas) cannot be read. In such cases, the control issues an errormessage.

If the drive data are located in the SERCOS drive telegram, they areread out from it (see Servodyn-D Parameter Manual). Otherwise, thedrive data are read directly in the drive.If other applications access drive data, the drive data can currently notbe read. Parameter <ResVar> can be used to react to this error in theparts program. Repeating the access attempt may supply the desireddrive datum.

. Continuous access to drive data can prevent access for other ap-plications!

Access todrive data

LAGE% FEHLER% Error message

yes New actual positionvalue of the i-th axis

0 none

No Retain the old actualposition value of thei-th axis

1 SERCOS SERVICECHANNEL IS OCCU-PIED

Page 419: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

Electric Drivesand Controls

5-43Bosch Rexroth AGIndraMotion MTXR911314869 / 01

A reaction to the error in the parts program can be provided by evalua-ting integer variable FEHLER%.

Example:10 LAGE%=SCS(1,”S”,51,FEHLER%) The actual position value of the

1st axis is assigned to theLAGE% integer variable.

12 IF FEHLER% = 0 THEN Error evaluation13 REM***Actual position value was read correctly***14 ELSE15 REM***Actual position value could not be read***16 ENDIF

SCSLCertain SERCOS parameters exist as lists that can be read using com-mand SCSL. Since the length (required memory) for a list is not known,the read list elements are stored in ASCII files. Then the read data canbe processed using CPL file commands.

Using the SCSL command, the file indicated in the command is regene-rated if it does not yet exist. The content of an existing file is overwritten.

Syntax:

SCSL(<Axis index>,<ID type>,<ID No>,<FileName>[,<Res-Var>])

<Axis index> System axis index or system axis name<ID type> String expression.

”S”: S parameter”P”: P parameter

<ID No> Number of the SERCOS parameter<FileName> Name of the ASCII file in which the read list is to be

stored.<ResVar> Integer variable.

If<ResVar> is entered, a runtime error does not resultin case of an access error.The following return values are possible:0: Access OK1: SERCOS access is currently not possible2: Error accessing the file.If <ResVar> is not entered, a runtime error results incase of an access error.

Page 420: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

5-44 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

It may be impossible to access drive data at certain times if other ap-plications access drive data. Parameter <ResVar> can be used to re-act to this error in the parts program. Repeating the access attempt maysupply the desired drive datum.

. Continuous access to drive data can prevent access for other ap-plications.

SDReads the IndraMotion MTX in integer format from a collection of sy-stem data.

Syntax:

SD(<Group>[,<Index1>[,<Index2>[,<Index3>]]])

The SD function outputs INTEGER values.

Group Index1 Index2 Index3 Affectsfunction

Description

2

2

2

2

1

2

3

4

Active override setting for the corresponding potentiometer(in percent):

D Feedrate

D Rapid traverse

D Spindle (SD(202,1); SD(2,3)=0, if no spindle is applied)

D 2. spindle (SD(202,2); (SD(2,4)=0, if no 2nd spindle is applied)

* : Number of a channel:If the given channel is not active, axes from this channel may already be assigned, i.e. they are currentlyactive in another channel. Nevertheless, assigned axes belong to the given channel.

Example: axis X2 belongs to channel 2 (not active) and X2 is currently being driven synchronously in channel 1. Axis X2 is taken into account in both SD instructions ”Number of synchronous axes of the channel”of SD(21,2,...) and SD(21,1...).

Page 421: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

Electric Drivesand Controls

5-45Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Group DescriptionAffectsfunction

Index3Index2Index1

5

5

5

5

5

5

5

5

5

1

2

3

4

1

3

4

3

4

1

1

1

1

2

2

2

3

3

Active velocities, rounded to whole number value:

D Feed in entry units per minute; evaluated usingpotentiometer (for OvrEna, SD supplies a value of100%)

D Rapid traverse in mm/min or inches/min (100% value)

D Spindle speed in rpm; evaluated using potentiometer(SD(205,1,1); SD(5,3,1)=0 if no spindle is applied)

D Spindle speed of 2nd spindle in rpm; evaluated usingpotentiometer(SD(205,1,2); SD(5,4,1)=0 if no 2nd spindle is applied)

Last-programmed velocities:

D Feed in entry units per minute

D Spindle speed in rpm; evaluated using potentiometer(SD(205,2,1); SD(5,3,2)=0 if no spindle is applied)

D Spindle speed of 2nd spindle in rpm; evaluated usingpotentiometer(SD(205,2,2); SD(5,4,2)=0 if no 2nd spindle is applied)

Actual speed (SD(205,3,1))

Actual speed of 2nd spindle (SD(205,3,2))

8 Supplies the channel number of the calling channel.

9 G75

FsProbe

Probe activated:Probe not activated:

Measurement at fixed stopexecuted:Measurement at fixed stopnot yet executed:

SD(9)=0 (G75 not active)SD(9)=1 (G75 active)

SD(9)=0 (FSB not active)

SD(9)=1 (FSB active)

10 1,2 1,2,3 Index 1: 1= No. of last-programmed tap2= No. of the active tap

Index 2: 1= axis that affects the L1 correction2= axis that affects the L2 correction3= axis that affects the L3 correction

SD(10, i ) = SD(10, i ,3)

* : Number of a channel:If the given channel is not active, axes from this channel may already be assigned, i.e. they are currentlyactive in another channel. Nevertheless, assigned axes belong to the given channel.

Example: axis X2 belongs to channel 2 (not active) and X2 is currently being driven synchronously in channel 1. Axis X2 is taken into account in both SD instructions ”Number of synchronous axes of the channel”of SD(21,2,...) and SD(21,1...).

Page 422: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

5-46 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Group DescriptionAffectsfunction

Index3Index2Index1

11

11

11

11

1

2

1

2

1

1

2

2

Main axis of the last-programmed plane switching

Secondary axis of the last-programmed plane switching

Main axis of the active plane

Secondary axis of the active plane

12

12

12

12

1

2

3

4

Active spindle direction of rotation (SD(212,1,1):SD(12,1)= 3 Spindle rotates clockwiseSD(12,1)= 4 Spindle rotates counterclockwiseSD(12,1)= 0 Spindle stopSD(12,1)= -1 Spindle not appliedSD(12,1)= 19 Align spindle

Last-programmed spindle direction of rotation(SD(212,2,1); Functions as with ”Active sense of spindlerotation”An active change of the direction of rotation for each inter-face signal is not taken into account!

Active direction of rotation of spindle (2nd spindle)(SD(212,1,2); functions as for ”Active direction of rotationof spindle”)

Last-programmed direction of rotation of spindle (2ndspindle)(SD(212,2,2); functions as for ”Active direction of rota-tion of spindle”)

13 Processing types when processing at interpretation time:SD(13)= 0 Single block, single stepSD(13)= 1 Next blockSD(13)= 2 Program blockSD(13)= 11 NC program restart with next block

(selected block not yet interpreted).

14 Number of active language(machine parameter 6010 00010)

15 Test without movement SD(15)=0 : noSD(15)=1 : yes

20 1, 2 Supplies the number of synchronous axes of the callingchannel:

SD(20,1) = Value (default) at time ofblock preparation

SD(20,2) = Value at active time.

* : Number of a channel:If the given channel is not active, axes from this channel may already be assigned, i.e. they are currentlyactive in another channel. Nevertheless, assigned axes belong to the given channel.

Example: axis X2 belongs to channel 2 (not active) and X2 is currently being driven synchronously in channel 1. Axis X2 is taken into account in both SD instructions ”Number of synchronous axes of the channel”of SD(21,2,...) and SD(21,1...).

Page 423: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

Electric Drivesand Controls

5-47Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Group DescriptionAffectsfunction

Index3Index2Index1

21 1 to n* 1, 2 Supplies the number of synchronous axes of a channel:

SD(21, <1 - n> ,1) = Value (default) at time ofblock preparation

SD(21, <1 - n> ,2) = Value at active time.

1 - n = Channel number, n = max. number of channels

22 1 - mor

Channelaxis de-signa-tion

1, 2 Supplies the system axis number of a channel axis of thecalling channel or -1:

SD(22, <1 - m>|String ,1) = Value (default) at time of block preparation.SD(22, <m>|String ,2) = Value at active time.

1 - m = System axis number; m = max. number of system axesString = System axis name

23 1 - mor

Channelaxis de-signa-tion

1, 2 Supplies the system axis number of a channel axis of thecalling channel or -1:

SD(23, <1 - m>|String ,1) = Value (default) at time of block preparation.SD(23, <1 - -m>|String ,2) = Value at active time.

1 - m = Channel axis number; m = max. number of channel axesString = Channel axis name

24 1 - mor

Channelaxis de-signa-tion

1 to n* 1, 2 Supplies the system axis number of a channel axis or -1:

SD(24, <1 - m>|String ,<1-n>,1) = Value (default) at time of block preparation.SD(24, <1 - m>|String ,<1 - n>,2) = Value at active

time.

1 - n = Channel number, n = max. number of channels1 - m = Channel axis number;m = max. number of channel axesString = Channel axis name

25 1 - mor

Channelaxis de-signa-tion

Supplies the channel of a system axis:

SD(25, <1 - m>|String) = Value at active time.

1 - m = System axis number; m = max. number of system axesString = System axis name

* : Number of a channel:If the given channel is not active, axes from this channel may already be assigned, i.e. they are currentlyactive in another channel. Nevertheless, assigned axes belong to the given channel.

Example: axis X2 belongs to channel 2 (not active) and X2 is currently being driven synchronously in channel 1. Axis X2 is taken into account in both SD instructions ”Number of synchronous axes of the channel”of SD(21,2,...) and SD(21,1...).

Page 424: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

5-48 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Group DescriptionAffectsfunction

Index3Index2Index1

68

68

168

168

268

268

1

2

1

2

1

2

1...8

1...8

1...8

1...8

1...8

1...8

Trans,ATrans

D Sum of the last-programmed program coordinate off-sets (Trans + ATrans) for the given axis (Index2).

D Sum of the active program coordinate offsets (Trans +ATrans) for the given axis (Index2).

D Value of the last-programmed program coordinate offset(Trans) for the given axis (Index2).

D Value of the active program coordinate offset (Trans) forthe given axis (Index2).

D Value of the last-programmed additive program coordi-nate offset (ATrans) for the given axis (Index2).

D Value of the active additive program coordinate offset(ATrans) for the given axis (Index2).

77 Supplies the currently set restarting point of an asynchro-nous subroutine:

1: Starting point

2: End point

3: Interruption point

131

131

1

2

TangTool Channel axis number of the rotating axis

Symmetry

200

200

200

200

200

200

200

1

1

3

11

12

21

22

1...10

1...10

1...10

1...10

1...10

1...10

Workingrange,

dead range

D Number of active ranges in the channel.

D Indicates whether range i (Index2) is active:0: Area i (Index2) is not active

D Type of range i: 0: Type not defined1: dead range2: Working range

D Position of the center point of range i (Index2) in pro-gramming units (for the 1st range axis).

D Position of the center point of range i (Index2) in pro-gramming units (for the 2nd range axis).

D Extent of range i (Index2) in programming units (for the1st range axis).

D Extent of range i (Index2) in programming units (for the2nd range axis).

* : Number of a channel:If the given channel is not active, axes from this channel may already be assigned, i.e. they are currentlyactive in another channel. Nevertheless, assigned axes belong to the given channel.

Example: axis X2 belongs to channel 2 (not active) and X2 is currently being driven synchronously in channel 1. Axis X2 is taken into account in both SD instructions ”Number of synchronous axes of the channel”of SD(21,2,...) and SD(21,1...).

Page 425: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

Electric Drivesand Controls

5-49Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Group DescriptionAffectsfunction

Index3Index2Index1

202

205

205

205

212

212

1...8

1

2

3

1

2

1...8

1...8

1...8

1...8

1...8

Spindles 1...8 = Spindle number

Current potentiometer value

Active command speed (incl.potentiometer)

Last-progr. commandspindle speed

Actual speed

Active movement function

Last-progr. movement func-tion

Old but still valid SDfunctions:

SD(2,3), SD(2,4)

SD(5,3,1), SD(5,4,1)

SD(5,3,2), SD(5,4,2)

SD(5,3,3), SD(5,4,3)

SD(12.1), SD(12.3)

SD(12.2), SD(12.4)

222 1...32 1,2 Supplies the channel spindle number of a system spindle ofthe active channel or -1:

SD(222, <”SSPxx>”|<1..32>, 1) Value (default value) attime of block preparation.SD(222, <”SSPxx”>|<1..32>, 2) Value at active time.”SSP01”..”SSP32” or 1..32 = System spindle numbers

223 1...8 1,2 Supplies the system spindle number of a channel spindle ofthe active channel or -1:

SD(223, <”Sx>”|<1..8>, 1) Value (default value) at time ofblock preparation.SD(223, <”Sx”>|<1..8>, 2) Value at active time.”S1”..”S8” or 1..8 = Channel spindle number

230 1...32 1,2 Supplies the system axis number of a system spindle or -1:

SD(230, <”SSPxx>”|<1..32>)”SSP01”..”SSP32” or 1..32 = System spindle numbers

231 1...8 1,2 Supplies the system axis number of a channel spindle or-1:

SD(231, <”Sx”>|<1..8>)”S1”..”S8” or 1..8 = Channel spindle number

* : Number of a channel:If the given channel is not active, axes from this channel may already be assigned, i.e. they are currentlyactive in another channel. Nevertheless, assigned axes belong to the given channel.

Example: axis X2 belongs to channel 2 (not active) and X2 is currently being driven synchronously in channel 1. Axis X2 is taken into account in both SD instructions ”Number of synchronous axes of the channel”of SD(21,2,...) and SD(21,1...).

Page 426: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

5-50 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Group DescriptionAffectsfunction

Index3Index2Index1

328

328

328

1

2

PrecProg Last-programmed precision limit of PrecProg

Last-programmed precision limit of PrecProg

Last-programmed corner spacing of PrecProg

581

581

581

581

581

0

1 - 8(s)

1 - 8(s)

1 - 8(s)

1 - 8(s)

1...8(m)

0

1

2

3

Axis cou-pling

m: Channel axis number of the master in the current chan-nels: Channel axis number of the slave in the current channel

D Channel axis number = m if the axis is a leading axis;0: if there is no master axis

D Number of the leading axis for which axis s is a followingaxis 0: if s is not a slave

D Programmed following axis offset in programming units.0: if s is not a slave

D Programmed coupling factor0: if s is not a slave

D Programmed leading axis offset in programming units0: if s is not a slave

* : Number of a channel:If the given channel is not active, axes from this channel may already be assigned, i.e. they are currentlyactive in another channel. Nevertheless, assigned axes belong to the given channel.

Example: axis X2 belongs to channel 2 (not active) and X2 is currently being driven synchronously in channel 1. Axis X2 is taken into account in both SD instructions ”Number of synchronous axes of the channel”of SD(21,2,...) and SD(21,1...).

Examples:30 A% = SD(2,1):

A% contains the active position of the feedpotentiometer in percent

40 B% = SD(5,1,1):

B% contains the active feed velocity

Sample program: SD (probe query)N4 G75 X12060 IF SD(9)= 1 THENN7 (MSG, probe has not been deflected!)80 GOTO .FEHLER90 ELSE100 XMESS = PPOS(1)110 ENDIF

In the SD (probe query) example, the X-axis is driven in the direction ofthe given position. If the position is attained and the probe has not beendeflected, a message (line N7) is issued and a jump to label .FEHLERoccurs. If the probe is deflected, the current position, based on the pro-gram coordinate system in XMESS, can be saved.

Page 427: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

Electric Drivesand Controls

5-51Bosch Rexroth AGIndraMotion MTXR911314869 / 01

SDRReads the IndraMotion MTX in REAL format from a collection of sy-stem data. The format and application of the command correspond tothe SD function.

Syntax:

SDR(<Group>[,<Index1>[,<Index2>]])

Group Index1 Index2 Affectsfunction

Description

1 1...8 Axis positions of all processing axes that were calculated in the NCprogram restart / re-entry (Index1 = axis number).If there is no NC program restart, 0 is returned.If an unapplied axis or an auxiliary axis is addressed, a runtime erroroccurs.

2

2

2

1

3

4

Active override setting for the corresponding potentiometer (in per-cent):

D Feedrate

D Spindle (SD(2,3)=0 if no spindle is applied)

D 2. spindle (SD(2.4)=0 if no 2nd spindle is applied)

202 1...8 Current potentiometer value(old but still valid SDR function: SDR(2,3), SDR(2,4)

68

68

168

168

268

268

1

2

1

2

1

2

1...8

1...8

1...8

1...8

1...8

1...8

Trans,ATrans

D Sum of the last-programmed program coordinate offsets (Trans +ATrans) for the given axis (Index2).

D Sum of the active program coordinate offsets (Trans + ATrans) forthe given axis (Index2).

D Value of the last-programmed program coordinate offset (Trans)for the given axis (Index1).

D Value of the active program coordinate offset (Trans) for the givenaxis (Index2).

D Value of the last-programmed additive program coordinate offset(ATrans) for the given axis (Index1).

D Value of the active additive program coordinate offset (ATrans) forthe given axis (Index2).

77 Nameof ma-chine

coordi-nate

0

1

2

3

In asynchronous subroutine:

D Supplies the current approach point according to ASPRTP/RE-POSTP of a machine coordinate in the interruption block.

D Supplies the starting point of a machine coordinate in the interrup-tion block.

D Supplies the end point of a machine coordinate in the interruptionblock.

D Supplies the interruption point of a machine coordinate in the in-terruption block.

The supplied position permits repositioning of the coordinates in thevicinity of the desired approach point within an asynchronous subrou-tine using G76.

Page 428: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

5-52 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Group DescriptionAffectsfunction

Index2Index1

131

131

3

4

Tangentialtool gui-dance

D Supplies the positioning angle in degrees (Index2).

D Supplies the intermediate block angle in degrees (Index2).

328

328

328

1

2

PrecProg D Last-programmed precision limit of PrecProg

D Last-programmed precision limit of PrecProg

D Last-programmed corner spacing of PrecProg

581

581

581

581

581

0

1 - 8(s)

1 - 8(s)

1 - 8(s)

1 - 8(s)

1...8(m)

0

1

2

3

Axis cou-pling

m: Channel axis number of the master in the current channels: Channel axis number of the slave in the current channel

D Channel axis number = m if the axis is a leading axis0: if there is no master axis

D Number of the leading axis for which axis s is a following axis0: if s is not a slave

D Programmed following axis offset in programming units0: if s is not a slave

D Programmed coupling factor0: if s is not a slave

D Programmed leading axis offset in programming units0: if s is not a slave

5.8.2 System Data of Structured Types

Structured system data (abbreviated SD) are a class of data in the over-all system with the following properties:D Individual SD can be located in the volatile or the nonvolatile memory

(permanent SD), as desired.D The number, size and structure can be freely defined within the fra-

mework of the existing memory.

You can find extensive information regarding the use and definition ofsystem data in the Description of Functions.

Access in the CPL is carried out with keyword SD. As opposed to XPathaddressing (standardized access to structured data), the point operator”.” is used in place of the separator ”/”. Arrays are addressed with [ ], e.g.Xpath: /MyArrVar[2,3,4]/subcomponentCPL: SD.MyArrVar[2,3,4].subcomponent

Example:10 SD.MyChanVar=DBSEA(”/dbt1/Rec”,-1,-1,”Key1=1”,I%)

For channel-specific SDs, the channel index is not required, e.g.:SD.MyArrVar[,3,4] or SD.MyChanVar without [ ] for a one-dimensional channel SD.

Page 429: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

System Data

Electric Drivesand Controls

5-53Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Any CPL expressions that supply an integer value can be programmedwithin the square brackets.SDs with the same structure types can be assigned to one another. Thefollowing assignment rules apply to basic types:

Name Length in bytes Description C-type IndraLogic type CPL

String 2 * maxLength + 1 String(UTF-8 format)

char [ ] STRING() STRING

IsoLatin1String maxLength + 1 String(Latin1 format)

char [ ] STRING() STRING

Byte_t 1 Signed 8-bit integer

char SINT INT

Short_t 2 Signed 16-bit integer

short INT INT

Int_t 4 Signed 32-bit integer

int DINT INT

UnsignedByte_t 1 Unsigned 8-bit integer

unsigned char USINT INT

UnsignedShort_t 2 Unsigned 16-bitinteger

unsignedshort

UINT INT

UnsignedInt_t 4 Unsigned 32-bitinteger

unsigned int UDINT INT

Float_t 4 32-bit real float REAL REAL

Double_t 8 64-bit real double LREAL DOUBLE

Boolean_t 1 true, false, 1, 0 char BOOL BOOLEAN

Permanent system data are reinitialized once while volatile system dataare reinitialized each time the system is started. The values can be spe-cified in an initialization file. If nothing is specified there, the values arepreset to 0.Structured variables (SV) can be replaced by SDs; however, they areretained for reasons of compatibility.

Page 430: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Variable Axis Address

5-54 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.9 Variable Axis Address

AXPThis function allows parts and measurement programs to be written re-gardless of the plane.

AXP(<Axis number>,<Path information>[,<Axis type>])

The function is applied in an NC block. It must be between brackets ”[ ]”and is programmed in place of the address values.

<Axis number> Index of workpiece coordinate or system axis<Path information> Variable or value of the path information<Axis type> optional:

Determines how an index programmed under<Axis number> is interpreted:”0”: System axis index.”1”: Index of the workpiece coordinate of the

channel in which the program is currentlybeing processed.

If there is no explicit programming, <Axis type>is set to 1.

Example:Subroutine:10 A%=P1% : B%=P2% Transfer axis No. from P1%

and P2% to A% and B%20 C=P3:D=P4:RA=P5 Transfer command values for

G230 E=0 Constant for pole at G20N40 G20 [AXP(A%,E)][AXP(B%,E)] Plane switch with G20;

pole at 0.0N50 G2 [AXP(A%,C)][AXP(B%,D)] R[RA]] F1000

Radius programming with G2

Plane definition using A% and B%. Then switch the plane using G20.Finally, the axes move with F1000 through an arc that is defined by va-riables C, D (end point) and RA (radius).

Page 431: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

PLC Interface

Electric Drivesand Controls

5-55Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.10 PLC Interface

BITIFThis function permits access to the digital interface between the NC andthe PLC.D All inputs and outputs can be read.D CPL customer outputs Ch_Cpl01 - 16 in the channel interface can

also be written.

BITIF(<Bit signal>[,<Index>[,<IF unit>]])

where:<Bit signal> Bit offset or symbolic address.

Bit offset: 0 - 31 for global interface0 - 111 for channel interface0 - 95 for axis interface0 - 95 for spindle interface0 - 7 for high-speed interface

For the symbolic addresses, see the PLC Interface Ma-nual.

<Index> Index of the axis, the spindle or the channel. If an index is not programmed, the following applies forthe query:- active channel for channel interface- axis 1 for axis interface- spindle 1 for spindle interface

<IF unit> 0 or QCH: PLC output signals (channel-based)1 or QAX: PLC output signals (axis-based)2 or QSP: PLC output signals (spindle-based)3 or ICH: PLC input signals (channel-based)

(incl. CPL customer outputs of the NC)4 or IAX: PLC input signals (axis-based)5 or ISP: PLC input signals (spindle-based)6 or QGEN: PLC output signals (global)7 or IGEN: PLC input signals (global)8 or QHS: PLC output signals (high-speed)9 or IHS: PLC input signals (high-speed)

Page 432: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

PLC Interface

5-56 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Examples:I?=BITIF(”QGEN_RESET”) Reads global output signal ”System re-

set”.I?=BITIF(”ICH_RESET”,1) Reads channel input signal ”Channel re-

set” from channel 1I?=BITIF(0,1,”IAX”) Reads axis input signal ”Reference point

known” for axis 1I?=BITIF(88,2,5) Reads spindle input signal ”Status class

1 error” for spindle 2BITIF(”ICH_CPL05”)=1 Writes CPL customer output 5 with a va-

lue of 1BITIF(50,1,3)=TRUEBITIF(”ICH_CPL02”)=FALSE

PLCThis function permits access to the operands of the PLC.

PLC(<Type>,<Empty param.>,<Address>,<Size>)

where:<Type> 1: Input (E)

2: Output (A)3: Flag (M)Read access is permitted for all the types.Write access to flags is permitted when 2060 00200is set to a value of 5 (= IndraLogic).

<Empty param.> (not assigned)<Address> Relevant byte address starting at beginning of area.

The control checks the parameter according to theactive PLC.

<Size> Size of the data type:1: byte2: word4: double word

Example::30 REM Read 2 bytes starting at input 1040 I% = PLC(1,,10,2):

Page 433: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Time Recording

Electric Drivesand Controls

5-57Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.11 Time Recording

CLOCKReads out the system time within the control in milliseconds.

Example::20 WAITSTARTTIME% = CLOCKN4 G1 X50 Y7040 WAIT50 ENDTIME%=Clock : DIFF%=ENDTIME%-STARTTIME%:

The current clock status is assigned to variables ”STARTZEIT%” /”ENDZEIT%” before and after block N4 is executed. The block execu-tion time of N4 (in milliseconds) can be determined from the differencebetween the contents of the two variables.Note that the WAIT command is absolutely required for this!

DATESupplies the current value for the date.

Example::30 A$ = DATE:

The date in the form DD.MM is assigned toSTRING variable A$.

TIMESupplies the current value for the time.

Example::40 B$ = TIME:

The time in the form HH.MM.SS is assignedto STRING variable B$.

. If DATE/TIME is used several times within a program, the corres-ponding result variables must be dimensioned. Otherwise, the lastread value of the DATE/TIME function is assigned to all nondimen-sioned variables that contain the result of a DATE/TIME assign-ment.

Page 434: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Errors and Error Categories

5-58 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.12 Errors and Error Categories

GETERRThis function calls the current errors in a CPL program. It contains thecurrent error No., the channel No. of the error and the associated errorcategory.Each error that occurs is saved, together with these elements, to an ar-ray. The max. number of errors that fit into the array is limited by the di-mensioning (DIM) of parameter <Error No> .

Function GETERR supplies the following return values:D -1: Function could not be executed.D 0: Number of errors in the <channel>.

GETERR(<Channel>,[<Category>],<Error No>[,<Number>])

<Channel> Channel No. of the queried channel -1 : All channels> 0: Channel no.

<Category> 0: All warnings and errors (default)1: Minor system errors2: Control or drive errors3: Interpolator errors4: Hardware errors5: PLC errors6: Part program errors7: Runtime warnings8: MSD messages: Error9: MSD messages: Warnings10: MSD messages: Notes

<Error No> Result variable:Two-dimensional integer array with at least 3 ele-ments in the second dimension (DIM <Error-No.>%(x,3)), default value: 0.The function supplies the current error numbers fromthe <channel> in decreasing order according to thetime they occurred.Meaning of the 3 elements of the 2nd dimension:<Error No>(x,1): Error No.<Error No>(x,2): Error channel

(-1 = cross-channel)<Error No>(x,3): Error category (if declared using

DIMcommand).0 = Unknown categoryOther values = as for <Category>

Example: DIM ERRNO% (100,3).

. Only the variable name, without dimension/index,may be entered!

Page 435: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Errors and Error Categories

Electric Drivesand Controls

5-59Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Number> Integer variable (default value: 1 )Specifies the number of errors to be read.1: Default value> 0: Parameter values are not checked for

validity; i.e. if the number of data to be readis greater than the array dimension,

a parts program error is not issued.Example: <Number> =120, but DIM ERRNO% (100,3).In this case, 20 errors are not read.

Example: Query the last parts program error in channel 210 DIM ERRN=%(5,3) : REM Integer array with 5 elements20 REM Query the last parts program error in channel 230 CHAN%=2:CATEGORY%=640 ERG%=GETERR(CHAN%,CATEGORY%,ERRNO%,1):

Example:Result evaluation for 5 array elements.10 DIM ERRNO%(5,3):REM Integer array with 5 elements20 CHAN%=2 : CATEGORY%=025 REM query part program error on channel 230 ERG%= GETERR(CHAN%, CATEGORY%, ERRNO%, 5)40 FOR I%= 1 TO ERG%50 IF ERRNO%(I%,3)=6 THEN60 PRN#(0, ”Part program error: ”,ERRNO%(I%,1))70 ENDIF80 NEXT I%

Page 436: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Errors and Error Categories

5-60 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Error No.Error channel

Error category

12

3

18562

2

DIM ERRNO%(5,3)

12

3

18692

1

12

3

19382

6

12

3

19702

10

12

3

19712

6

12

3

19702

6

Result in Erg% that fulfills thecriteria of GETERR(..):= 2, i.e. 2 errors werefound

Criteria for selecting the errors:- Channel 2- Category 6- Max. number of errors to be recorded: 5

Latestreported error

This error is no longertaken into accountbecause the array cantake on only 5 elementsaccording to the DIMcommand

Array index: 1

Array index: 2

Array index: 3

Array index: 4

Array index: 5

ERRNO%(3.1)= 1938

ERRNO%(5.1)= 1971

Array element

Earliest reported error

As the result, parts program errors 1938 and 1971 are output in theMSG window. Variable Erg% contains a value of 2.

. Among other things, GETERR can be used to record the chronolo-gical occurrence of one or more errors, permitting the actualcause of the errors to be traced.

Page 437: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-61Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.13 NCS Coupling

NCS coupling functions can be used to access process and data ser-vices of the internal NCS interface using CPL.

5.13.1 Possible Error Return Values of the Functions

All function calls supply a return value for control and error handling. Aninteger or real variable can be assigned to this value.

Example:ERR_VAR% = MCOPS(...)ERR_VAR% = MCODS(...)

CAUTIONImproper program reactions possible!When called functions return an error code, it may happen that im-portant actions in the remainder of the program run are carried outincompletely or not at all.We therefore strongly recommend that you check the program(e.g. using CASE) after a function is called to see whether thefunction could be executed without errors.The remaining program behavior then is determined by the typeand severity of the error that occurred.

The following return values have been defined:0: No error has occurred1: The given channel does not exist2: The function can not be executed because the given channel is cur-

rently occupied (the current status does not permit the action)3: A reset that has been started in the given channel has not yet been

completed.4: The given program name is too long (currently not in use)5: The function requires approached reference points6: The given program does not exist or cannot be executed7: During buffered NC block input, writing to the buffer was interrupted. A

second instance attempted to write to the buffer at the same time.8: The function cannot be executed in the current operating mode9: The channel cannot be started because the status is not READY10: The function cannot be executed because no program has been se-

lected11: The given program cannot be selected because the channel status

does not permit this (e.g. the status of block preparation and the inter-polator is RUNNING)

12: currently not in use13: The operating mode cannot be switched because the channel status

does not permit this

Page 438: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-62 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

14: The target of ”Search block” was not found15: ”Search block” is not possible because, although the channel status is

READY, processing of the main program has already started (e.g.program is at M0)

16: The number of axes is too high for the presetting of external zero pointoffsets

17: The number of axis ZO groups is too high for the presetting of externalzero point offsets

18: The entered syntax is unknown19: Invalid index when entering an external tool correction20: Number of corrections when entering an external tool compensation

is exceeded (may be displayed with the correction index).21: Improper format when entering an external tool compensation. Tool

correction22: Improper tool edge position when entering an external tool correction23: Invalid compensation group24: Addressed axis does not exist25: In the case of an NC block input with automatic start, a runtime error,

e.g. a syntax error, was detected.26: In the case of a buffered NC block input, the buffer has been ex-

ceeded.27: The entry for the coordinate filter is not correct.100: The magic number of the telegram is incorrect101: NCS communication is not working properly102: The given function is not available in this software version103: An internal error has occurred (currently not in use)

. If the calling program also contains NC blocks, block preparationgenerally occurs before processing in the machine. If a processservice is requested or a machine status queried using the MCOPSor MCODS function at the time of block preparation, any require-ments on the machine may not have been fulfilled. However, this problem only occurs for functions that access preci-sely the channel in which they are executed themselves.In this case, use the WAIT command in the line preceding the func-tion call. This stops block preparation until all the blocks beforeWAIT have actually been processed.

Page 439: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-63Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.13.2 Available Functions

MCODSCalls Motion Control data services of the NCS via CPL. This allows thedata and states to be read from the CNC.

. All read values refer to the time at which the CPL block is proces-sed by block preparation. If the calling program also contains NC blocks, block preparationgenerally occurs before processing in the machine. If program ex-ecution is to be affected by functions that determine current ma-chine data or states, you must eliminate the ”time delay” betweenblock preparation and the current machine status. However, thisapplies only to functions that access precisely the channel inwhich they are executed themselves.In this case, use the WAIT command in the line preceding the func-tion call. This stops block preparation until all the blocks beforeWAIT have actually been processed.

The functions supply a return value (see section 5.13.1).

General syntax:

MCODS(<Type>,<Channel>,<Version>,<Buffer>,<Size>,<Axisnumber>,<ID number>[,<P1>])

<Type> Integer expression. This indicates the function to beexecuted. The following table lists all the available functions.

<Channel> Integer expression. Indicates the channel which thefunction is to affect.

<Version> Initialized integer or real variable (no constant!).If the variable content = 0 when the function is called,the function specified by <Type> immediately writesthe requested data to the<Buffer>.In addition, the function returns a version ID of thesupplied data in <Version>. If this version ID is stillcontained in the variable the next time that the func-tion is called, the function does not write the reque-sted data immediately, but rather after the next timethe data in <Buffer> are modified.In this way, for example, a program loop can be rununtil a channel has attained a certain status. Howe-ver, you should incorporate a timeout condition (e.g.counter or elapsed period) in the loop to prevent end-less loops!

<Buffer> The function returns the requested data values in<Buffer>. Depending on the type of data, <Buffer>must be a:

Page 440: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-64 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

- simple variable of type integer, real, double- field variable of type integer, real, double- string variable (1-dimensional character field).

. For field or string variables, only the variablename, without dimension/index, may be entered!

<Size> Integer expression. Specifies the field size of <Buf-fer> If <Buffer> is not a field variable, but rather a simplevariable of type integer, real or double, enter a valueof 1 for <Size>.

<Axis number> Integer expression. Indicates the axis number of a sy-stem axis.

<ID number> Integer expression. Supplies the value of an <IDnumber> from the cyclic axis telegram for all axes.

. The size of a field variable that is used must firstbe defined using the DIM command; it may not beexceeded in parameter <Size>!

<P1>: Optional parameter that depends on <Type>.

Function overview of MCODS(...)

Positions

Command axis position see MCODS(1..)

Command axis position see MCODS(2..)

Actual axis position see MCODS(35..)

Actual axis values (machine coordinate system) see MCODS(38..)

Coasting see MCODS(4..)

Axis program value (program coordinatesystem)

see MCODS(37..)

Programmed end positions, incl. offsets see MCODS(16..)

Programmed end positions, without offsets see MCODS(23..)

Velocity and speed

Path velocity see MCODS(3..)

Programmed path velocity see MCODS(24..)

Jog speeds see MCODS(27..)

Command spindle speed, surface speed see MCODS(5..)

Actual spindle speed see MCODS(36..)

Maximum spindle speed see MCODS(19..)

Minimum spindle speed see MCODS(20..)

Programmed spindle speeds see MCODS(25..)

Page 441: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-65Bosch Rexroth AGIndraMotion MTXR911314869 / 01

States

Status ”InPos” see MCODS(6..)

Status ”Test mode” see MCODS(29..)

Status ”Traverse to reference point” see MCODS(26..)

Status ”Dwell time active” see MCODS(39..)

Status ”Auxiliary function which requiresacknowledgement active”

see MCODS(40..)

Status ”Reading release” see MCODS(41..)

Status ”Travel command” see MCODS(47..)

Status ”Feed inhibit” see MCODS(49..)

SAV and IPO status see MCODS(32..)

Potentiometer

Value of feed potentiometer see MCODS(7..)

Values of spindle potentiometer see MCODS(8..)

Value of axis potentiometer see MCODS(50..)

Corrections

Active length correction number see MCODS(9..)

Active length correction see MCODS(10..)

Active tool radius correction number see MCODS(11..)

Active tool radius correction see MCODS(12..)

Name of active tool correction table see MCODS(13..)

Name of active axis ZO table see MCODS(14..)

Active axis ZO values see MCODS(15..)

Active external tool correction values see MCODS(51..)

Active external axis ZO values see MCODS(52..)

Active universal tool correction see MCODS(54..)

Operating modes

Channel operating mode see MCODS(31..)

Axis operating mode see MCODS(48..)

System structure

Number of feed axes, auxiliary axes, spindles;movement types, drive types

see MCODS(34..)

Number of channels see MCODS(44..)

Number of axes see MCODS(45..)

Axis name see MCODS(33..)

Active channel axis name see MCODS(59..)

Channel axis name (default setting) see MCODS(60..)

Axis-channel assignment see MCODS(43..)

Axis-channel default assignment see MCODS(58..)

Page 442: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-66 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

ID number from cyclic axis telegram see MCODS(62..)

Units

Axis units (default setting) see MCODS(61..)

Axis units see MCODS(53..)

Type of programming (inch/metric) see MCODS(18..)

Diameter programming see MCODS(91..)

Auxiliary functions

Group numbers of auxiliary functions see MCODS(94..)

Active syntax of auxiliary function groups see MCODS(65..)

Spindles

Movement functions of spindles see MCODS(63..)

Gear ranges of spindles see MCODS(64..)

Automatic/manual gear range selection see MCODS(66..)

Information whether gear switching is active see MCODS(67..)

Spindle names see MCODS(102..)

No. of spindles see MCODS(103..)

Spindle system no. see MCODS(104..)

Spindle axis no. see MCODS(105..)

Drives

Manufacturer version see MCODS(55..)

Control type see MCODS(56..)

Motor type see MCODS(57..)

Other

Messages in parts program see MCODS(28..)

Path and name of main program see MCODS(30..)

Return-to-path strategy and recording ofjogging movements

see MCODS(46..)

Customer-specific data see MCODS(42..)

Optional stop (activated) see MCODS(68..)

Skip block (activate) see MCODS(69..)

Automatic program reselection active see MCODS(70..)

. In the following table, integer constants are sometimes shown asparameters for the syntax. In place of these constants, you canalso program integer variables; however, these must have beenassigned the given value at the time that the function is called.

Page 443: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-67Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

<Buffer> is oftype 2)

Syntax / description

Command axis position Double, Array MCODS(1,-1,<Version>,<Buffer>,<Size>)

Z Supplies in increasing, channel-independent order thecommand positions of all feed and auxiliary axes in thesystemto <Buffer>:

in mm for linear axesin degrees for rotary axes

”Set actual value” (e.g. G92) is included in the values.

Command axis position Integer, Array MCODS(2,-1,<Version>,<Buffer>,<Size>)

Z Supplies in increasing, channel-independent order thecommand positions of all feed and auxiliary axes in thesystemto <Buffer>:

in 0.0001 mm for linear axesin 0.0001 degrees for rotary axes

”Set actual value” (e.g. G92) is included in the values.

Path velocity Real, Array MCODS(3,<Channel>,<Version>,<Buffer>,3)

Z Supplies 3 values with current path velocities of<Channel> (incl. the feed potentiometer) in increasingorder to <Buffer> in the unit mm/min:

1. the command velocity that is assigned externally tothe interpolator.

2. the actual interpolator velocity (= current path veloc-ity).

3. the command internal interpolator velocity. It mayhave changed compared to the externally assignedone due to an application (e.g. Feed-Adapt function).If feed programming is in mm/rotation (G95), it sup-plies the path acceleration in mm/min.

Coasting Real, Array MCODS(4,-1,<Version>,<Buffer>,<Size>)

Z Supplies, in increasing order, the coasting of all system axes to <Buffer>:

in mm for linear axesin degrees for rotary axes

If transferring coasting (via SERCOS parameter) is notsupported by the drives, a value of 0.0 is returned.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 444: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-68 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Command spindle speed,surface speed

Real, Array MCODS(5,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies, in increasing order (S or S1, S2, S3, etc.), thecommand spindle speeds or surface speeds of all thespindles that exist in the channel to <Buffer>. If -1 or 0 istransferred for <Channel,> <Buffer> supplies the data ofthe system spindles; otherwise, the data of the channelspindles are supplied. If G196 is active, the surfacespeeds are supplied in m/min; otherwise the currentcommand spindle speeds are supplied in rpm. Thepotentiometer, the speed limitations (SMin, SMax) and thelimitations due to the gear range are included in thecalculation. If a spindle does not exist , 0.0 is returned atthe corresponding position in <Buffer>.

Status ”InPos” Integer, Array MCODS(6,-1,<Version>,<Buffer>,<Size>)

Z Supplies, <in increasing, >channel-independent order, avalue of 0 or 1 as the InPos signal for each feed andauxiliary axisin Buffer

Axis is in position: 1Axis is not in position: 0

An axis is in position if it is in the parameterized InPoswindow (MP 1015 00100) and there is no movementcommand (also see MCODS(47...) ).

Value of feed potentiometer Real MCODS(7,<Channel>,<Version>,<Buffer>,1)

Z Supplies the current value of the feed potentiometer of<Channel> in 1/100 percent to <Buffer>.

Values of spindlepotentiometers

Real, Array MCODS(8,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies, in increasing order (S or S1, S2, S3, etc.), thecurrent values of the feed potentiometers in 1/100 percent to <Buffer>.If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.

Active length correction number Integer MCODS(9,<Channel>,<Version>,<Buffer>,1)

S Supplies the length correction number that is active in<Channel> to <Buffer>. If length correction is not active,-1 is returned.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 445: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-69Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Active length correction Real MCODS(10,<Channel>,<Version>,<Buffer>,1)

S Supplies the length correction (in mm) that is active in<Channel> to <Buffer>. If length correction is not active,0.0 is returned.

Active tool radius correctionnumber

Integer MCODS(11,<Channel>,<Version>,<Buffer>,1)

S Supplies the radius correction number that is active in<Channel> to <Buffer>. If radius correction is not active,-1 is returned.

Active tool radius correction Real MCODS(12,<Channel>,<Version>,<Buffer>,1)

S Supplies the radius correction (in mm) that is active in<Channel> to <Buffer>. If tool radius correction is notactive, 0.0 is returned.

Name of active tool correctiontable

Character,Array

MCODS(13,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the name of the tool correction table that isactive in <Channel> to <Buffer>. If none is active, 3blanks are returned as a string.

Name of active axis ZO table Character,Array

MCODS(14,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the name of the axis ZO table that is active in<Channel> to <Buffer>. If none is active, 3 blanks arereturned as a string.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 446: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-70 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Active axis ZO values Real, Array MCODS(15,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the axis ZO values of all the pages for all thefeed axes (in mm) that are active in <Channel> to<Buffer>. If no offset is active, 0.0 is returned.The following order applies:

D Offset of the 1st axis in page 1

D Offset of the 2nd axis in page 1

D Offset of the nth axis in page 1

D Offset of the 1st axis in page 2

:

D Offset of the nth axis in page 2

:

D Offset of the nth axis in page 3

Programmed end positions,incl. offsets

Real, Array MCODS(16,0,<Version>,<Buffer>,<Size>)

S Supplies, <in increasing, channel-independent order>, theend positions of the active blocks for all feed and auxiliaryaxis based on the workpiece coordinates to Buffer:

D in mm for linear axes

D in degrees for rotary axes

All offset values have been calculated.”Set actual value” (e.g. G92) is not included in the values.

Type of programming(inch/metric)

Integer MCODS(18,<Channel>,<Version>,<Buffer>,1)

S Supplies the programming type of the axes that exist in<Channel> to <Buffer>.0: Inch1: Metric2: Degree3: No axis present

Maximum spindle speed Real, Array MCODS(19,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies, <in increasing order> (S or S1, S2, S3, etc.), themaximum permissible spindle speeds in U/min. to Buffer.If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.The speed limitations are included in the calculation.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 447: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-71Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Minimum spindle speed Real, Array MCODS(20,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies,< in increasing order> (S or S1, S2, S3, etc.), theminimum permissible spindle speeds in U/min. to Buffer.If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.The speed limitations are included in the calculation.

Programmed end positions,without offsets

Real, Array MCODS(23.0,<Version>,<Buffer>,<Size>)

S as for MCODS(16...), but without offsets.

Programmed path velocity Real MCODS(24,<Channel>,<Version>,<Buffer>,1)

S Supplies the programmed path velocity of <Channel> to<Buffer>.

Programmed spindle speed Real, Array MCODS(25,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies, in increasing order (S or S1, S2, S3, etc.), theprogrammed spindle speeds in U/min. to <Buffer>.If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.

Status ”Traverse to referencepoint”

Integer, Array MCODS(26,-1,<Version>,<Buffer>,<Size>)

E Supplies, in increasing, channel-independent order, avalue of 0 or 1 as the ”Traverse to reference point” signalfor each feed and auxiliary axis to <Buffer>:

Traversed to reference point: 1Not traversed to reference point: 0

Jog speeds Real, Array MCODS(27,-1,<Version>,<Buffer>,<Size>)

E Supplies in increasing, channel-independent order thecurrent jog speeds of all feed and auxiliary axes in thesystemto <Buffer>:

in mm/min for linear axesin rpm for rotary axes

Messages in parts program Character,Array

MCODS(28,<Channel>,<Version>,<Buffer>0.80)

E Supplies the notes programmed using the MSG commandin <Channel> to <Buffer>.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 448: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-72 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Status ”Test mode” Integer MCODS(29,0,<Version>,<Buffer>,1)

E Supplies a value of 1 to <Buffer> if test mode has beenactivated. Otherwise the value is 0.

Path and name of main program Character,Array

MCODS(30,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies the path, including the name, of the mainprogram that is selected in <Channel> to <Buffer> as astring.A value present in <Version> is ignored when the functionis called.For files that are stored in the NC-internal file system, avalue of 31 must be entered in <Size> (the path, incl. thefile name, may not exceed 30 characters here).For files that are stored in mounted file systems, the valuein <Size> depends on the maximum permitted number ofcharacters that is supported by the external file system forthe path and name of a file.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 449: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-73Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Channel operating mode Integer MCODS(31,<Channel>,<Version>,<Buffer>,1)

E Supplies the operating mode that is active in <Channel>to <Buffer>:

0: No operating mode, and thus no process, is active.1: Jog mode. The axes can be jogged (+/-).2: Traverse to reference point. The axes can be started

using signals Manual+ / Manual-.3: reserved.4: Manual entry. Individual NC blocks can be entered for

processing.5: Automatic (next block). Parts programs are processed

completely.6: Automatic (program block). Individual blocks of a parts

program are processed sequentially. Each individualblock is prepared and started with NC-Start.

7: Automatic (single step). Under certain conditions, theNC generates and prepares several blocks from anindividual NC block in the parts program. In this operating mode, NC-Start is always used topass an individual block on to the interpolator for proc-essing.

8: reserved.9: reserved.10:Automatic (single block). With NC-Start, all the blocks

that were generated and prepared due to an individualNC block in the parts program are passed on to theinterpolator for processing.

11:Restart. The axes can be moved manually away fromthe contour, as well as restarted automatically ormanually.

12:CPL debugger (program block mode):Individual blocks located in the parts program are pro-cessed.

13:CPL debugger (following block mode):All the blocks up to the next point of interruption areprocessed.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 450: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-74 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

SAV and IPO status Integer, Array MCODS(32,<Channel>,<Version>,<Buffer>,2)

E To <Buffer>, supplies from <Channel> the - the SAV status (block preparation) and- the state of the interpolator.

The following values are defined for the SAV status:

1: The operating mode is not active. A process can beselected.

2: The operating mode is ready. A process can bestarted.

3: The operating mode is active. A program or NC blockis being processed.

4: reserved.5: reserved.6: An error has occurred in the operating mode; this can

be cleared only by ”Control reset” or ”Program de-selection”.

7: reserved.8: Control reset is currently being executed.9: A program has been selected and is currently being

prepared (e.g. linked).10:”Cancel distance to go” was triggered and is not fin-

ished.11:The operating mode is active and is reprocessing ex-

isting buffers.12:The operating mode is ready. The process is at the

beginning of the program and may be started.13:All the blocks of the buffered NC block input have

been executed. Waiting for the next input.

The following values are defined for the IPO status:

1: The interpolator is running.2: The interpolator is stopping due to a feed stop.3: The interpolator has stopped the axes.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 451: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-75Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Axis name Character,Array

MCODS(33,<Channel>,<Version>,<Buffer>,<Size>)

R In the case of <Channel> = -1, <Buffer> supplies thenames of all the system axes, separated by the character”0” (0 byte) in increasing order for 9 bytes each.In the case of <Channel> = the existing channel number,<Buffer> supplies the names of all the axes in the givenchannel, separated by the character ”0” (0 byte) inincreasing order.Names that are shorter than 8 characters are filled withspaces up to the 8th character.<Size> displays the size of <Buffer>. For 16 axes, it canbe a maximum of 144 (9x16) bytes.

For an example, see section 5.13.3, page 5-101.

Number of feed axes, auxiliaryaxes, spindles;movement types, drive types

Integer, Array MCODS(34,-1,<Version>,<Buffer>,<Size>)

R reserved. Instead, use MCODS(45...)

Actual axis position Real, Array MCODS(35,-1,<Version>,<Buffer>,<Size>)

Z Supplies, <in increasing, channel-independent order> ,the actual positions of all feed and auxiliary axes thatare transferred from the drivesto the CNC via SERCOSparameters to Buffer:

in mm for linear axesin degrees for rotary axes

”Set actual value” (e.g. G92) is not included in the values.

Actual spindle speed Real, Array MCODS(36,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies, in increasing order (S or S1, S2, S3, etc.), theactual spindle speeds in U/min. to <Buffer>. If -1 or 0 issupplied for <channel>, <Buffer> will supply the data ofthe system spindles; otherwise, the channel spinde data issupplied. The potentiometer, the speed limitations (SMin,SMax) and the limitations due to the gear range areincluded in the calculation. If a spindle does not exist , 0.0is returned at the corresponding position in <Buffer>.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 452: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-76 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Axis program value (programcoordinate system)

Double, Array MCODS(37,-1,<Version>,<Buffer>,<Size>)

Z Supplies in increasing, channel-independent order theworkpiece-based command positions of the interpolatorfor all feed axes in the systemto <Buffer>:

in mm for linear axesin degrees for rotary axes

”Set actual value” (e.g. G92) and the axis ZO (G54.x -G59.x) is not included in the values.

Actual axis values (machinecoordinate system)

Double, Array MCODS(38,-1,<Version>,<Buffer>,<Size>)

Z Supplies, in increasing, channel-independent order, the”actual values” based on the corresponding (Cartesian)machine coordinate system to <Buffer>.The values are calculated from the actual axis positionsby using the channel-by-channel machine-specifickinematic forward transformation (axis transformation). Ifno kinematic axis transformation has been activated,MCODS(38) supplies values identical to MCODS(35).The prerequisite for applying MCODS(38) is acorresponding setting of machine parameter 9030 00002,which is used to configure whether and how often actualvalues are calculated in the machine coordinate system.

Status ”Dwell time active” Integer MCODS(39,<Channel>,<Version>,<Buffer>,1)

E Supplies a value of 1 to <Buffer> if a dwell time has beenactivated in <Channel>. Otherwise the value is 0.

Status ”Auxiliary function whichrequires acknowledgementactive”

Integer MCODS(40,<Channel>,<Version>,<Buffer>,1)

E Supplies a value of 1 to <Buffer> if an auxiliary function iswaiting for acknowledgement in <Channel>. Otherwise thevalue is 0.

Status ”Reading release” Integer MCODS(41,<Channel>,<Version>,<Buffer>,1)

E Supplies a value of 1 to <Buffer> if NC input signal ”Blocktransfer inhibit” has been set for <Channel>. Otherwisethe value is 0.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 453: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-77Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Customer-specific data MCODS(42,<Channel>,<Version>,<Buffer>,<Size>,<P1>)

E Supplies customer-specific data from <Channel> to<Buffer>.In <P1>, an integer value in the range between 0 and65535 can be transferred to the customer’s server in orderto select certain data when the function is called.The function has been designed for customer-specificdevelopments in the area of the ”NC core”.

Axis-channel assignment Integer, Array MCODS(43,-1,<Version>,<Buffer>,<Size>)

E Supplies the following information for every <system >axisto Buffer:≥0: Channel number of the synchronous axis-1: Axis is asynchronous-2: Axis is a spindle-3: Axis is not defined

Number of channels Integer, Array MCODS(44,-1,<Version>,<Buffer>,3)

R Supplies to <Buffer>, in increasing order,

D the number of usable user channels

D the number of channels on the interface

D the number of internal and external channels

Number of axes Integer, Array MCODS(45,-1,<Version>,<Buffer>,3)

R Supplies to <Buffer>, in increasing order,

D The maximum index of the axes in the system. This is required for grinding over all axes. If no gapsare present, this is the number of drives in the system.

D The maximum index of the axes in the system. This is required e.g. for the size of the axis interface. Ifno gaps are present, this is the number of axes in thesystem.

D The maximum number of spindles in the system. This is required e.g. for the size of the spindle inter-face.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 454: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-78 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Return-to-path strategy andrecording of joggingmovements

Integer, Array MCODS(46,<Channel>,<Version>,<Buffer>,3)

E Supplies to <Buffer>, in increasing order for the given<channel>

D the return-to-path operating mode

D the point of return-to-path

D the recording status of jog movements.

The following values are possible for the return-to-pathoperating mode:

1 automatic return-to-path 2 return-to-path with individual block3 manual return-to-path

For the point of return-to-path:

1 return-to-path at starting point2 return-to-path at end point3 return-to-path at point of interruption

For the recording status:

0 recording not active1 recording active

Status ”Travel command” Integer, Array MCODS(47,<Channel>,<Version>,<Buffer>,<Size>)

Z In the case of <Channel> = -1, <Buffer> supplies thetravel command signals of all system axes in increasingorder.In the case of <Channel> = the existing channel number,<Buffer> supplies the travel command signals of all theaxes in the given channel, followed by those of theasynchronous axes in increasing order.

Travel command exists: 1Travel command does not exist: 0

A travel command is always set as soon as an axis is toexecute a travel movement using manual entry or entry inthe parts program.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 455: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-79Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Axis operating mode Integer, Array MCODS(48,<Channel>,<Version>,<Buffer>,<Size>)

E In the case of <Channel> = -1, <Buffer> supplies theoperating modes of all system axes in increasing order.In the case of <Channel> = the existing channel number,<Buffer> supplies the operating modes of all the axes inthe given channel, followed by those of theasynchronous axes in increasing order.

Possible return values for the operating modes:

0: No operating mode, and thus no process, is active.1: Jog mode. The axes can be jogged (+/-).2: Traverse to reference point. The axes can be started

using signals Manual+ / Manual-.3: reserved.4: Manual entry. Individual NC blocks can be entered for

processing.5: Automatic (next block). Parts programs are processed

completely.6: Automatic (program block). Individual blocks of a parts

program are processed sequentially. Each individualblock is prepared and started with NC-Start.

7: Automatic (single step). Under certain conditions, theNC generates and prepares several blocks from anindividual NC block in the parts program. In this operating mode, NC-Start is always used topass an individual block on to the interpolator for proc-essing.

8: reserved.9: reserved.10:Automatic (single block). With NC-Start, all the blocks

that were generated and prepared due to an individualNC block in the parts program are passed on to theinterpolator for processing.

11:Restart. The axes can be moved manually away fromthe contour, as well as restarted automatically ormanually.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 456: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-80 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Status ”Feed inhibit” Integer, Array MCODS(49,<Channel>,<Version>,<Buffer>,<Size>)

E In the case of <Channel> = -1, <Buffer> supplies the feedinhibit signals of all system axes in increasing order.In the case of <Channel> = the existing channel number,<Buffer> supplies the feed inhibit signals of all theaxes inthe given channel, followed by those of theasynchronous axes in increasing order.1: Feed inhibit is present0: Feed inhibit is not present

Value of axis potentiometer Real, Array MCODS(50,<Channel>,<Version>,<Buffer>,<Size>)

E In the case of <Channel> = -1, <Buffer> supplies the axispotentiometer values of all system axes in increasingorder (in 0.01 percent).In the case of <Channel> = the existing channel number,<Buffer> supplies the channel potentiometer value forevery axis in the given channel, followed by the axispotentiometer values of all asynchronous axes inincreasing order (in 0.01 percent).

Active external tool correctionvalues

Real, Array MCODS(51,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the external tool correction values that are activein <Channel> to <Buffer>.Order: radius correction, length correctionIf external tool correction is not active, 0.0 is returned.

Active external axis ZO values Real, Array MCODS(52,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the external axis ZO values that are active in<Channel> to <Buffer>.Order: 1. log. axis, ... 8. log. axisIf no external offset is active, 0.0 is returned.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 457: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-81Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Axis units Integer, Array MCODS(53,<Channel>,<Version>,<Buffer>,<Size>)

E Für <Kanal> = -1 liefert <Puffer> die Maßeinheiten(metrisch, inch, Grad) aller System-Achsen inaufsteigender Reihenfolge.Für <Kanal> = vorhandene Kanalnummer liefert <Puffer>die Maßeinheit für jede Achse im angegebenen Kanalund anschließend die Maßeinheit aller asynchronenAchsen in aufsteigender Reihenfolge.

In the case of asynchronous linear axes in the ”Jog” and”Traverse to reference point” axis operating modes, theaxis interface determines the unit. If no axis operatingmode is entered, ”metric” is supplied.In the case of synchronous linear axes in the ”Jog” and”Traverse to reference point” channel operating modes,the axis interface determines the unit. In the other opera-ting modes, it depends on the metric/inch channel unit(G70/G71).For rotary axes and spindles, the unit is degrees; for Hirthaxes with location programming, an appropriate unit issupplied.

Possible return values for the units:

0: inch1: metrisch2: Grad3: Achse ist nicht vorhanden4: position-programmable Hirth axis

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 458: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-82 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Active universal tool correction Real, Array MCODS(54,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the universal tool correction values that areactive in <Channel> to <Buffer>.

Order:

D Radius compensation

D L3 length compensation

D L1 length compensation

D L2 length compensation

D Tool edge position

D Correction type

The following correction types have been defined:0: no compensation1: drill tool2: milling tool3: lathe tool4: anglehead tool

If no universal tool correction is active, 0.0 is returned.

Manufacturer version Character,Array

MCODS(55,-1,<Version>,<Buffer>,<Size>,<Axis number>)

R Outputs the manufacturer version of the drive. The axesare selected in parameter <Axis number> by entering thesystem axis. (No. 0 also supplies the 1st axis). Themanufacturer version corresponds to SERCOS parameterS-0-0030. An array of max. 40 characters is supplied toparameter <Buffer>.

Control type Character,Array

MCODS(56,-1,<Version>,<Buffer>,<Size>,<Axis number>)

R Outputs the control type of the drive. The axes areselected in parameter <Axis number> by entering thesystem axis. (No. 0 also supplies the 1st axis). Thecontrol type corresponds to SERCOS parameterS-0-0140. An array of max. 40 characters is supplied toparameter <Buffer>.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 459: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-83Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Motor type Character,Array

MCODS(57,-1,<Version>,<Buffer>,<Size>,<Axis number>)

R Outputs the motor type of the drive. The axes areselected in parameter <Axis number> by entering thesystem axis. (No. 0 also supplies the 1st axis). The motortype corresponds to SERCOS parameter S-0-0141. Anarray of max. 40 characters is supplied to parameter<Buffer>.

Axis-channel defaultassignment

Integer MCODS(58,-1,<Version>,<Buffer>,<Size>)

R Supplies the following default assignment for everysystem axis to <Buffer>:-≥0: Channel number of the synchronous axis-1: Axis is asynchronous-2: Axis is a spindle-3: Axis is not defined

In the case of 16 axes, <Buffer> must have a <size> of 16(integer).

Active channel axis name Character,Array

MCODS(59,<Channel>,<Version>,<Buffer>,<Size>)

E In the case of <Channel> = -1, <Buffer> supplies thenames of all the active channel axes, separated by thecharacter ”0” (0 byte) in increasing order for 9 bytes each.In the case of <Channel> = the existing channel number,<Buffer> supplies the names of all the axes in the givenchannel, separated by the character ”0” (0 byte) inincreasing order.Names that are shorter than 8 characters are filled withspaces up to the 8th character.<Size> displays the size of <Buffer>. For 16 axes, it canbe a maximum of 144 (9*16) bytes.

For an example, see section 5.13.3, page 5-101.1) Data that the control provides cyclically are marked by a ”Z”.

Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 460: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-84 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Channel axis name, defaultsetting

Character,Array

MCODS(60,<Channel>,<Version>,<Buffer>,<Size>)

R In the case of <Channel> = -1, <Buffer> supplies thenames of all the channel axes (in the default setting),separated by the character ”0” (0 byte) in increasing orderfor 9 bytes each.In the case of <Channel> = the existing channel number,<Buffer> supplies the names of all the axes in the givenchannel, separated by the character ”0” (0 byte) inincreasing order.Names that are shorter than 8 characters are filled withspaces up to the 8th character.<Size> displays the size of <Buffer>. For 16 axes, it canbe a maximum of 144 (9*16) bytes.

For an example, see section 5.13.3, page 5-101.

Axis units, default setting Integer, Array MCODS(61,<Channel>,<Version>,<Buffer>,<Size>)

R In the case of <Channel> = -1, <Buffer> supplies theunits (metric, inch, degree) of all the system axes (in thedefault setting), separated by the character ”0” (0 byte) inincreasing order for 9 bytes each.In the case of <Channel> = the existing channel number,<Buffer> supplies the names of all the axes in the givenchannel, separated by the character ”0” (0 byte) inincreasing order.

D For asynchronous linear axes, ”metric” is supplied.

D For synchronous linear axes, the unit depends on thepower-up state after the machine is started (machineparameter 7060 00010): ”Metric/Inch” (G70/G71)

D For rotary axes and spindles, the unit is degrees; forHirth axes with location programming, an appropriateunit is supplied.

Possible return values for the units:0: inch1: metric2: Degree3: axis not available4: position-programmable Hirth axis

In the case of 16 axes, <Buffer> must have a <size> of 16(integer).

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 461: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-85Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

ID number from cyclic axistelegram

Integer, Array MCODS(62,-1,<Version>,<Buffer>,<Size>,<ID number>)

Z Supplies the value of an <ID number> from the cyclic axistelegram for all axes.If the <ID number> is not in the cyclic telegram, a value ofNCS_MCO_NOT_IN_CYCL_AT_C (-2147483648) isoutput.The value is ”Integer” in SERCOS -scaling.

In the case of 16 axes, <Buffer> must have a <size> of 16(integer).

Movement functions of spindles Integer, Array MCODS(63,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies the movement functions of the spindles.Coding of the movement functions:0: Spindle is not defined1: Turn right (clockwise) without coolant2: Turn right (clockwise) with coolant3: Turn left (counter-clockwise) without coolant4: Turn left (counter-clockwise) with coolant5: Spindel stop6: Spindle orientation

In the case of 32 spindles, <Buffer> must have the <size>of 32 (integer).If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 462: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-86 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Gear ranges of spindles Integer, Array MCODS(64,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies the gear ranges of the spindles.Coding of the gear ranges:40:automatic gear range selection41:gear 142:gear 243:gear 344:gear 448:neutral gear

In the case of 32 spindles, <Buffer> must have the <size>of 32 (integer).If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.

Automatic/manual gear rangeselection

Integer, Array MCODS(66,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies automatic or manual gear range selection:0: manual1: automatic

In the case of 32 spindles, <Buffer> must have the <size>of 32 (integer).If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.

Information whether gearswitching is active

Integer, Array MCODS(67,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies information whether gear switching is active:0: gear switching is not active.1: gear switching is active.

In the case of 32 spindles, <Buffer> must have the <size>of 32 (integer).If -1 or 0 is supplied for <channel>, <Buffer> will supplythe data of the system spindles; otherwise, the channelspinde data is supplied.

Skip block (activate) Integer, Array MCODS(68,<Channel>,<Version>,<Buffer>,2)

E Supplies the status of NC output signal Activate blockskip and of input signal Block skip of <Channel> to<Buffer>.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 463: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-87Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Optional stop (activated) Integer, Array MCODS(69,<Channel>,<Version>,<Buffer>,2)

E Supplies the status of NC output signal Optional stopactivated and of input signal Optional stop of <Channel>to <Buffer>.

Automatic program reselectionactive

Integer MCODS(70,<Channel>,<Version>,<Buffer>,1)

I Supplies whether automatic program reselection isapplied in the given channel to <Buffer>>:0: function has not been applied1: function has been applied

Workpiece coordinates Real, Array MCODS(71,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies the workpiece coordinate (WCS) values of thegiven channel to <Buffer>. First all the spatial coordinates,then the pseudocoordinates of the channel.

Basic coordinate commandvalues

Real, Array MCODS(72,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies the basic coordinate command values (BCS)of the given channel to <Buffer>. First all the spatialcoordinates, then the pseudocoordinates of the channel.

Axis coordinates Real, Array MCODS(73,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies the axis coordinate values (ACS) of the givenchannel to <Buffer>.Channel = -1: All axis coordinates0< Channel≤ Max. channel: Data of the given channel

Machine coordinates Real, Array MCODS(74,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies the machine coordinate (MCS) values of thegiven channel to <Buffer>.Channel = -1: All axis coordinates0< Channel≤ Max. channel: Data of the given channel

Basic coordinate actual values Real, Array MCODS(75,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies the basic coordinate actual values (BCS) ofthe given channel to <Buffer>. First all the spatialcoordinates, then the pseudocoordinates of the channel.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 464: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-88 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Programmed coordinate endpoints

Real, Array MCODS(76,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the programmed coordinate end points of thegiven channel to <Buffer>. First all the spatial coordinates,then the pseudocoordinates of the channel.

Coordinate end points Real, Array MCODS(77,<Channel>,<Version>,<Buffer>,<Size>)

S Supplies the coordinate end points of the given channel,including the offsets, to <Buffer>. First all the spatialcoordinates, then the pseudocoordinates of the channel.

Coordinate name Character,Array

MCODS(78,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies the name of the active coordinate of the givenchannel to <Buffer>. First all the spatial coordinates, thenthe pseudocoordinates of the channel.

INPOS status coordinates Integer, Array MCODS(79,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies the INPOS status of the coordinates of thegiven channel to <Buffer>: First all the spatial coordinates,then the pseudocoordinates of the channel.The status from the AND link of the axis signals isgenerated for a spatial coordinate .

Reference status of thecoordinate

Integer, Array MCODS(80,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies the reference point status of the coordinates of the given channel to <Buffer>. First all the spatialcoordinates, then the pseudocoordinates of the channel.The status from the AND link of the axis signals isgenerated for a spatial coordinate .

Unit of the coordinates Integer, Array MCODS(81,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies the units of the coordinates of the givenchannel to <Buffer>: First all the spatial coordinates, thenthe pseudocoordinates of the channel.Possible return values for the units:0: inch1: metric2: Degree3: coordinate is not available

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 465: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-89Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Number of coordinates Integer, Array MCODS(82,<Channel>,<Version>,<Buffer>,<Size>)

E Supplies the number of coordinates/axes of the givenchannel in 3 elements to <Buffer>.1st value: the total number of axes of the channel2nd value: number of working range coordinates +

number of pseudocoordinates in the channel.3rd value: the number of pseudo coordinates of the

channel.

Distance to go of workpiececoordinates

Real, Array MCODS(83,<Channel>,<Version>,<Buffer>,<Size>)

Z Supplies the distance to go of the workpiececoordinates (WCS) of the given channel to <Buffer>.First all the spatial coordinates, then thepseudocoordinates of the channel.

Channel wait states Integer MCODS(87,<Channel>,<Version>,<Buffer>,1)

E Supplies the wait states of a Channel to <Buffer>.This function indicates the reasons why a channel entersa wait state.The active wait states are bit-coded.The following constants define the corresponding bits ofthe first integer value, starting with the lowest value:0: Dwell time1: Acknowledgement-compulsory auxiliary function2: Block transfer inhibit3: Feed in channel equals 04: Program stop with M0/M15: Feed hold on the channel6: Feed inhibit on the channel or of a channel axis7: Block transfer inhibit entered by customer8: synchronized movement stop between

channels (ASTOP, ...)9: wait for axis during axis exchange (G511)

10: Waiting for a permanent variable (WPV)11: wait for interface signal at active time (WAITA, ...)12: wait for interface signal (WAIT(BITIF...)) or a specified period (WAIT(,TIME%)) in block preparation13: Motion Control data service (MCODS(...))

See example in 5.13.31) Data that the control provides cyclically are marked by a ”Z”.

Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 466: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-90 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Online correction values (WCS) Real, Array MCODS(89, <Channel>, <Version>, <Buffer>, <Size>)

E Supplies the values of the online correction (WCS) of thegiven channel to <Buffer>. First all the spatial coordinates,then the pseudocoordinates of the channel.

Status of online correction(WCS)

Integer, Array MCODS(90, <Channel>, <Version>, <Buffer>, <Size>)

E Supplies the current status of the online correction (WCS)of the given channel to <Buffer>. First all the spatialcoordinates, then the pseudocoordinates of the channel.0: inactive1: active

Diameter programming Integer, Array MCODS(91, <Channel>, <Version>, <Buffer>, <Size>)

S Supplies a value of 1 for axes with diameter programmingto <Buffer>.If the value Ncs_MCoNoChannel_C (-1) is provided forthe channel, the values of all the system axes aresupplied. If a channel number is provided, the values for thechannel axes are supplied.

Basic coordinates of the tool tip(BCS Tcp)

Real, Array MCODS(92, <Channel>, <Version>, <Buffer>, <Size>)

Z In case of active 3D radius correction in <Buffer>, thissupplies the command values of the tool tip in the basiccoordinate System (BCS-Tcp); first the space coordinates,then the pseudo coordinates of the specified channel.If 3D radius compensation is switched off, the values areidentical with MCODS(72,...).

Group numbers of auxiliaryfunctions

Character,Array

MCODS(94, <Channel>, <Version>, <GroupId>,<Size>,<Syntax>)

Z Supplies the auxiliary function group numbers to theauxiliary function given in <Syntax> of the given channelto <GroupId>. <Syntax> contains the auxiliary functions, separated byspaces and terminated with CHR$(0); see the example onpage 5-92.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 467: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-91Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function supplies /Refresh1)

Syntax / description

<Buffer> is oftype 2)

Active syntax of auxiliaryfunction groups

Character,Array

MCODS(95, <Channel>, <Version>, <Syntax>,<Size>,<GroupId>)

Z Supplies the active syntax to the auxiliary function groupnumber given in <GroupId> of the given channel to<Syntax>. An <array (terminated with CHR$(0)) of the desiredauxiliary function group numbers is transferred using>GroupId; see the example below.

End points of axis coordinate Real, Array MCODS(101, <Channel>, <Version>, <Buffer>, <Size>)

S Supplies the end points of the axis coordinates (ACS)of the given channel to <Buffer>. 0< Channel≤ Max. channel: Data of the given channel

Spindle names Char, Array MCODS(102, <Channel>, <Version>, <Buffer>, <Size>)

E Supplies the name of the active spindles of the givenchannel to <Buffer>. If -1 or 0 is supplied for <channel>,<Buffer> will supply the data of the system spindles;otherwise, the channel spinde data is supplied.

No. of spindles Integer MCODS(103, <Channel>, <Version>, <Buffer>, <Size>)

E Supplies in <Buffer> the number of spindles of thespecified channel. If -1 or 0 is supplied for <channel>,<Buffer> will supply the data of the system spindles;otherwise, the channel spinde data is supplied.

Spindle system no. Integer, Array MCODS(104, <Channel>, <Version>, <Buffer>, <Size>)

E Supplies, in increasing order (S or S1, S2, S3, etc.), thesystem numbers of the spindle (system spindle numbers)in <Buffer>. If -1 or 0 is supplied for <channel>, <Buffer>will supply the data of the system spindles; otherwise, thechannel spinde data is supplied.

Spindle axis no. Integer, Array MCODS(105, <Channel>, <Version>, <Buffer>, <Size>)

E Supplies, in increasing order (S or S1, S2, S3, etc.), theaxis numbers of the spindles in <Buffer>. If -1 or 0 issupplied for <channel>, <Buffer> will supply the data ofthe system spindles; otherwise, the channel spinde data issupplied.

1) Data that the control provides cyclically are marked by a ”Z”.Data that are available after every block change are marked by an ”S”.Data that are supplied in irregular intervals after a change are marked by an ”E”.Data that are supplied immediately after the request are marked by an ”I”.Data that never change (they must be requested only once) are marked by an ”R”.

2) Indicates the variable type (integer, real, double, character) required for <Buffer>. If a simple variable is not required, but rather a field variable, ”Array” is written behind the variable type.

Page 468: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-92 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example for auxiliary functions::N10 M3 S1234 T5678WAIT10 DIM GROUPID$(64)15 DIM SYNTAX$(256)17 VERSION=018 CHAN%=120 REM Find the group numbers of M3 and T25 SYNTAX$=”T M3”+CHR$(0)30 ERR_VAR%=MCODS(94,CHAN%,VERSION,GROUPID$,64,SYNTAX$)31 PRN#(0,”94 Error:”,ERR_VAR%)32 PRN#(0,”T M3:”,ASC(MID$(GROUPID$,1,1)), ASC(MID$(GROUPID$,2,1)))33 REM Read groups 2 and 136 GROUPID$=CHR$(2)+CHR$(1)+CHR$(0) :37 REM Query groups 2 and 150 VERSION=058 CHAN%=160 ERR_VAR%=MCODS(95,CHAN%,VERSION,SYNTAX$,256,GROUPID$)65 PRN#(0,”95 Error:”, ERR_VAR%)70 PRN#(0,”Group 2 1 : ”, SYNTAX$)71 REM SYNTAX$ contains e.g. “S1234 M3“

Page 469: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-93Bosch Rexroth AGIndraMotion MTXR911314869 / 01

MCOPSCalls Motion Control process services of the NCS via CPL. This allowschannels in the CNC to be controlled.

General syntax:

MCOPS(<Fct>,<Channel>[[,[<P1>][,[<P2>],[<P3>]]],<P4>])

<Fct> Integer expression. This indicates the function to beexecuted. The following table lists all the availablefunctions.

<Channel> Integer expression. Indicates the channel which thefunction is to affect.

<P1> - <P1> Optional parameters that depend on <Fct>. Sequen-ces of commas are permitted; however, a comma be-fore a close-parentheses sign is not.

. In the following table, integer constants are sometimes shown asparameters for the syntax. In place of these constants, you canalso program integer variables; however, these must have beenassigned the given value at the time that the function is called.

Effect Syntax/Description

Cancel distance to go MCOPS(1,<Channel>)

Initiates ”Cancel distance to go” in the programmed <Channel>:

D Having initiated ”Cancel distance to go”, all prepared NC blocks,including the remainder of the current block, are cancelled andprepared again.

.CPL blocks or CPL parts are not taken into consideration:

Example: CPL variable POS was given value 10 in preparation; theX[POS] NC word is interpreted as X10 following ”Cancel distance togo” even though POS may have a totally different value at that time.Any compensation values that may have been changed are takeninto account.

D In the display, the indicated end point is set to the current position,simultaneously deleting the indicated distance to go. The <Channel>then changes to the NC ready state (iCh_NCReady PLC input signal)

D Following the NC start (PLC output signal qCh_NCStart), the programis continued at the point of interruption, taking into account the newcompensation values.

Example for using MCOPS(1,<Channel>): after the correction tableshave been changed if the new values are also to apply to the previouslyprepared blocks.

Page 470: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-94 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Effect Syntax/Description

Control reset MCOPS(2,<Channel>[,<Control reset type>])

Initiates ”Control reset” in the programmed <Channel>.To initiate an overall control reset: <Channel> = -2

D The channel temporarily does not accept any more orders, such asprogram selection or operating mode switching.

D The interpolator is stopped.

D Orders to the channel that have not yet been processed arecancelled.

D The main program is deselected.

D Modified machine parameters that do not require that the machine bestarted are accepted, e.g. machine parameter 1020 00001 (softwarelimit switch).

D Error and warnings that this channel initiated are deleted.

D The interpolator is restarted.

D The startup status for the control reset (machine parameter 706000020) is accepted, i.e. the corresponding modal states becomeactive.

D The channel issues interface signal 0.2 ’Control reset executed’ andis again ready for new orders.

D <Control reset type>: Integer expression. Specifies the behavior ofthe function.The following list contains all the defined behavioral patterns. Eachpattern is preceded by an ID. To set a certain behavior, thecorresponding ID must be provided in <Control reset type>. If severalbehavioral patterns are to be combined, the sum of all thecorresponding IDs in <Control reset type> must be transferred to thefunction. Until now, the list has had only one element:

ID:2: Automatic program reselection is suppressed

if it is active.

Example: ERR_VAR=MCOPS(2,2,2)Control reset in 2nd channel without automatic

program reselection

Page 471: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-95Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Effect Syntax/Description

Search block MCOPS(3,<Channel>[,[<Starting block>][,<End block>]])

Initiates ”Search block” in the selected, but not yet started, main programof the programmed <Channel>:

D <Starting block> and <End block> are transferred as stringexpressions. The following conventions apply in the search for the<Starting block> and <End block>:

D Space, <tab>, <LF> at the start of an NC block are ignored.

D If the <Starting block> or <End block> starts with a numeral and ifthe expression is not found in the searched program, the systemrestarts its search for the expression, but this time with apreceding ”N” character.In this way, for example, a search term of ”50” also finds NC block”N50X100”.

D If the <Starting block> or <End block> ends with a numeral, theexpression in the searched program is found only if a numeraldoes not occur immediately after it.For example, ”G1X10” does not find NC block ”G1X100”.

D If the <Starting block> or <End block> ends with a letter, theexpression in the searched program is found only if a spaceoccurs immediately after it.For example, ”50A” finds NC block ”50A =1”, but not ”50A=1”.

D Processing starts with the <Starting block> and ends with the <Endblock>.If the <Starting block> is missing or if the block is not found,processing starts at the start of the program. If the <End block> ismissing or if the block is not found, processing stops at the end of theprogram.

D The NC status changes to READY.

Example: ERR_VAR=MCOPS(3,2,”N50”,”N100”)Initiates ”Search block” in channel 2. The main program is to beprocessed starting at N50 until and including N100.

Select the program orthe string for manual entry

MCOPS(4,<Channel>[[,[<String>][,[<Starting block>],[<Endblock>]]],<Selection type>])

In the programmed <Channel>, this selects a program for processing ora string for processing using the manual data input operating mode.

Presets for asynchronous subroutines are possible if <Selection type> =32768. They can be logged in, switched off, restarted, deleted and star-ted.

D <String>: String expression. Depending on the <Selection type>, thesystem interprets the parameter as

D the path name (incl. parts program name) of a parts program to beselected (max. 100 characters), or

D if 32 is provided in <Selection type>: as an NC block (size max.512 bytes incl. the terminating 0 byte) that is to be processedusing the manual data input operating mode, or

Page 472: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-96 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Effect Syntax/Description

D if 32+4096 is provided in <Selection type>: as several NC blocksthat are to be processed using the manual data input operatingmode.Several NC blocks are separated by NewLine (”\n”, Hex 0x0A).The max. size of all NC blocks must not exceed 4096 bytes,including the terminating 0 byte.

D if 32768 is provided in <Selection type>: the name or path name isprovided for job ”SETINT” for asynchronous subroutines.

D The <Starting block> and <End block> specify the starting and endblocks in the parts program for processing. This is treated likeMCOPS(3,..). If the system interprets <String> as manual data input, the <Startingblock> and <End block> are ignored.For specifications for asynchronous subroutines (<Selection type>=32768), the number (1 ≤ number ≤ 8) is provided as a string (e.g. ”1”)in <Starting block> and the job is provided in <End block>.Jobs for asynchronous subroutines are:”SETINT” log on”DISABLE” switch off”ENABLE” switch back on”CLRINT” delete”START” start

D <Selection type>: Integer expression. Specifies the behavior of thefunction. The following list contains all the defined behavioralpatterns. Each pattern is preceded by an ID. If a certain behavior is to be set, this ID must be provided in<Selection type>.If several behavioral patterns are to be combined, the sum of all thecorresponding IDs in <Selection type> must be transferred to thefunction.

.If <Selection type> 2 (Wait until the NC status switches to RE-ADY) is entered and the program to be selected does not existor cannot be executed, error message 6 is returned. In all othercases, no check is made whether the program can be executed.The function supplies 0 (no error has occurred). Only the following linking generates a corresponding runtimeerror.

Page 473: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-97Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Effect Syntax/Description

1 During the selection, the system carries out a link run. If onedoes not already exist, a link table is generated for theselected main program. Link tables are required if subroutinecalls or CPL instructions exist in the program.

2 The system acknowledges the validity of a selection onlyafter the NC status switches to READY.Normally, the selection is acknowledged without waiting forNC status READY.

32 The system interprets <String> as a manual data inputblock. Also see ID 128.

64 Before the function selects the given program or manualdata input block, an active program or manual data inputblock is deselected.

128 A manual data input block is started immediately. There are2 cases:<Channel> is not active: The block is processed immediatelyas a normal manual data input block.<Channel> is already active: The block is processedimmediately as a switching function. For limitations, see ID1024.

256 Prerequisite to move axes in ”Jog” operating modeorif movements are to occur in the ”Jog in workpiece coordi-nates” operating mode.

512 Prerequisite to start axes in ”Traverse to reference point”operating mode.

1024 Switch function. Works together with ID 128. A manual data input block is processed at the same time asthe given <Channel>. However, only auxiliary functions andasynchronous axis movements are permitted in the manualdata input block.

2048 A program that is already active is replaced by the newlyselected one. As a result, all modal states are maintained.In manual data input, the old character sequence is replacedby the new one.

4096 Entering buffered NC blocks acts in connection with codenumber 32. While preceding blocks are being executed, oth-ers can already be specified.

32768 Asynchronous subroutines can be controlled using this flag(see <Starting block> and <End block>).

Examples: ERR_VAR=MCOPS(4,1,”sect.cnc”,”N50”,”N100”,1)Program selection of ”sekt.cnc” in channel 1, incl. block search andlinking.

ERR_VAR=MCOPS(4,1,”/usr/user/p1.cnc”)Program selection of ”p1.cnc” in channel 1, without block search andlinking.

ERR_VAR=MCOPS(4,1,”F1000G1X500”,,,32)Selects block ”F1000G1X500” in channel 1 using manual data input.

Page 474: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-98 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Effect Syntax/Description

Program deselection MCOPS(5,<Channel>,<Deselection type>)

Deselects a selected program or manual data input block in theprogrammed<Channel> .

D <Deselection type>: Integer expression. Specifies the behavior of thefunction.The following list contains all the defined behavioral patterns. Eachpattern is preceded by an ID. To set a certain behavior, thecorresponding ID must be provided in <Deselection type>. If severalbehavioral patterns are to be combined, the sum of all thecorresponding IDs in <Deselection type> must be transferred. Untilnow, the list has had only one ID:

2: If automatic program reselection is active, it can be sup-pressed with a value of 2 in this program deselection.

Example:ERR_VAR=MCOPS(5,2,2) Program deselection in channel 2 without

automatic program reselection.

Start program MCOPS(6,<Channel>)

Starts a selected program or manual data input block in the programmed<Channel> .

Page 475: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-99Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Effect Syntax/Description

Assign operating mode MCOPS(7,<Channel>,<Operating mode>)

Assigns an operating mode in the programmed <Channel>.

D <Operating mode>: Integer expression. Specifies the operating modethat is to be started.

1 Jog mode. The axes can be jogged (+/-). Also see MCOPS(4..) under <Selection type>: ID 256.

2 Traverse to reference point. The axes can be started usingsignals Manual+ / Manual-.Also see MCOPS(4..) under <Selection type>: ID 512.

4 Manual entry. Individual NC blocks can be entered for proc-essing.

5 Automatic (next block). Parts programs are processed com-pletely.

6 Automatic (program block). Individual blocks of a parts pro-gram are processed sequentially. Each individual block isprepared and started with NC-Start.

7 Automatic (single step). Under certain conditions, the NCgenerates and prepares several blocks from an individualNC block in the parts program. In this operating mode, NC-Start is always used to pass anindividual block on to the interpolator for processing.

10 Automatic (single block). With NC-Start, all the blocks thatwere generated and prepared due to an individual NC blockin the parts program are passed on to the interpolator forprocessing.

11 Restart. The axes can be moved manually away from thecontour, as well as restarted automatically or manually.

12 CPL debugger: Individual blocks located in the parts pro-gram are processed.

13 CPL debugger: All the blocks up to the next break point areprocessed.

14 Jog mode: movement in workpiece coordinates

The operating mode can be changed only under the following conditions:

D Channel interface signal qCh_OpModePlc (PLC operating mode) maynot be set

D No program or block is selected for the NC- or -Switching is to be carried out solely between automatic operatingmodes Next block, Program block, Single step or Single block.

Example:ERR_VAR=MCOPS(7,2,5)Operating mode change in the 2nd channel to Automatic (Next block).

Page 476: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-100 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Effect Syntax/Description

Change return-to-path strategy MCOPS(8,<Channel>,<How>,<Where>)

Specifies the return-to-path strategy in the programmed <Channel>.

D <How>: Integer expression. Indicates whether

1 automatic return-to-path

2 return-to-path with individual block, or

3 manual return-to-path is desired.

D <Where> : Integer expression. Indicates whether

1 the starting point

2 the end point, or

3 the interruption point is to be approached for the return topath.

Terminate return-to-path recording MCOPS(9,<Channel>)

Terminates return-to-path recording in the programmed <Channel>. Jogmovements are thus no longer recorded.

Page 477: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-101Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.13.3 Programming Examples

Example 1: Immediately request the SAV and interpolator status fromchannel 210 DIM BUF%(2) Create field20 VERSION=0 Supply data immediately30 ERR_VAR%=MCODS(32,2,VERSION, BUF%,2)

Function call

BUF%(1) contains the SAV status, BUF%(2) the IPO status.VERSION contains the current version number of the data(important for example 2).

Example 2: Wait until the SAV status of channel 2 switches to ”Inactive”<Code of example 1>:10 INACTIVE = 120 WHILE BUF%(1) <> INACTIVE DO30 ERR_VAR% = MCODS(32,2,version,BUF%,2)40 END

After it is called, the function returns to the calling program only after theSAV status changes (VERSION still contains a value not equal to 0; forthe version number, see example 1). The loop is exited only afterBUF%(1) receives a value of 1.

Example 3: Outputting the axis name in the MSG window:30 VERSION=040 DIM AXNAME$(512)50 REM Request all axis names60 ERR=MCODS(33,-1,VERSION,AXNAME$,512)70 IF ERR=0 THEN80 REM Determine number of axes90 DIM AXNMB%(3)100 VERSION=0110 ERR=MCODS(45,-1,VERSION,AXNMB%,3)120 ANZ=AXNMB%(2)130 ENDIF140 IF ERR<>0 THEN150 PRN#(0,”Error occurred: ”,ERR)160 ELSE170 REM Display axis name180 FOR I%=0 TO (ANZ-1)190 NAME$=MID$(AXNAME$,I%*9+1,8)200 IF ASC(NAME$)<>0 THEN210 REM Axis name is defined220 PRN#(0,I%+1,”. Axis name: ”,NAME$)230 ENDIF240 NEXT

Page 478: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-102 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

250 ENDIFN260 M30

Example 4: Channel / wait state

10 CHAN%=120 VERSION%=030 STATES%=040 ERR=MCODS(87,CHAN%,VERSION%,STATES%,1)50 IF ERR=0 THEN60 MASK%=170 WHILE MASK% <= STATES% DO80 CASE (STATES% AND MASK%) OF90 LABEL 1:PRN#(0,”Dwell time”)100 LABEL 2:PRN#(0,”Auxiliary function requiring acknowledgement”)110 LABEL 4:PRN#(0,”Block transfer inhibit”)120 LABEL 8:PRN#(0,”Feed in channel equals 0”)130 LABEL 16:PRN#(0,”Program stop with M0/M1”)140 LABEL 32:PRN#(0,”Feed stop in channel”)150 LABEL 64:PRN#(0,”Feed inhibit in channel or a channel axis”)160 LABEL 128:PRN#(0,”Block transfer inhibit assigned by customer”)170 LABEL 256:PRN#(0,”Synchronized movement stop

between channels (ASTOP, ...)”)180 LABEL 512:PRN#(0,”Wait for axis in axis exchange (G511)”)190 LABEL 1024:PRN#(0,”Wait for permanent variable (WPV)”)200 LABEL 2048:PRN#(0,”Wait for interface signal at

active time (WAITA, ...)”)210 LABEL 4096:PRN#(0,”Wait for If signal (WAIT(BITIF(...))) or”)220 PRN#(0,” (WAIT(,ZEIT%)) in block preparation”)230 LABEL 8192:PRN#(0,”Motion Control data service (MCODS(...))”)240 ENDCASE250 MASK%=MASK%*2260 END270 ENDIFM30

Page 479: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

Electric Drivesand Controls

5-103Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example 5: Axis-channel assignment

10 REM The program queries the number of axes in the system

15 REM and the axis numbers of the channel axes. Using this

20 REM information, the channel axes are first traver-sed to30 REM position 0 and then to the <Channel number>40 REM position.50 CHAN%=SD(8) : REM Separate channel number60 IDCHAX%=43 : REM Function type for axis-channel assignment70 IDMAXAX%=45 : REM Function type for axis number80 DIM BUF%(16): REM Buffer for axis-channel assignment90 SIZE%=16100 ANZ%=0 : REM Maximum index of system- axes120 REM Determine channel axes of active channel130 VERSION=0140 ERR=MCODS(IDCHAX%,CHAN%,VERSION,BUF%,SIZE%)150 IF ERR=0 THEN160 VERSION=0170 ERR=MCODS(IDMAXAX%,CHAN%,VERSION,ANZ%,1)180 IF ERR=0 THEN190 FOR I%=1 TO ANZ%200 IF BUF%(I%) = CHAN% THENN210 F1000 [AXP(I%,0,0)]; Traverse channel axes ; to 0220 ENDIF230 NEXT240 FOR I%=1 TO ANZ%250 IF BUF%(I%) = CHAN% THENN260 M0N270 WAITN280 F1000 [AXP(I%,CHAN%,0)]; Traverse channel ; axes to CHAN%290 ENDIF300 NEXT310 ENDIF330 ENDIFN310 M30

Page 480: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

NCS Coupling

5-104 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Notes:

Page 481: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-105Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.14 Character String Processing

In order to process character strings in the CPL, they must be filed in aone-dimensional field (array) of identified character variables. Eachcharacter variable in this field is addressed via an index and may con-tain exactly 1 character.

CPL instructions MID$, LEN, INSTR, ASC, STR$, VAL and TRIM$ areavailable for string processing.

5.14.1 Dimensioning Character Fields

DIMIn order to create a character field, you must index a character variableusing a DIM instruction.In this way, character fields with a max. capacity of 1024 characters canbe created (value range of the index: 1 to 1024).

If the value range is not adhered to, the error message INVALID FIELDLIMIT appears.

Example:1 DIM VWX$(14)

In this example, character field VWX$, consisting of 14 individual charac-ter variables, is created. Strings with up to 14 characters in length cantherefore be stored in VWX$.

Examples:1 DIM ABC$(1) Character field for a string with a max. length of 1 cha-racter.2 DIM BCDE$(10) Character field for a string with a max. length of 10characters.

Page 482: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-106 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.14.2 Read a Character in a Character String

MID$This function removes parts from a string expression.The result can be transferred to a dimensioned or to a non-dimensionedcharacter variable:D A dimensioned character variable receives the complete partial

string defined in the MID$ command.D A non-dimensioned character variable receives only the beginning

address and length of the defined partial string. If the string expres-sion from which the partial string was taken changes, then the non-dimensioned character variable changes correspondingly.

If chaining (e.g. MID$(A$+B$,2,3) ) occurs within the MID command,the result can be assigned only to a character field.

MID$(<STR expression>,<Starting point>[,<Number of charac-ters>])

<STRING expression> String expression from which parts are to be re-moved.

<Starting point> Determines the position within the <STRING ex-pression> character field from which the charac-ters are to be removed.

<Number of characters> Determines the number of characters to beremoved. If <Number of characters> is not pro-grammed, all characters up to the end of the char-acter field length will be removed.

The range of values for the 2nd and 3rd parameters encompasses inte-ger values from 1 to 1024. If the range of values is not adhered to, thefault message ”Invalid parameter” is returned.

”NUL” is returned if a character field portion which has not yet been assi-gned is accessed.

Example:1 DIM A$(10)2 DIM B$(5)3 A$=”ABCDEFGHIJ”4 B$=MID$(A$,2,5)5 C$=MID$(A$,2,5)6 REM Variables B$ and C$ both

have the content: BCDEF7 A$=”QRSTUVWXYZ”8 REM Variable B$ has the content: BCDEF

The variable C$ has the content: RSTUV

Page 483: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-107Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.14.3 Modifying Character Strings

MID$The MID$ instruction overwrites parts of a character field.

MID$(<Character field>,<Starting point>[,<Number of characters>])

<Character field> Character field in which parts are to be overwritten.<Starting point> Determines from which position in the <character

field> the characters are to be overwritten.The <Starting point> value may exceed the num-ber of previously assigned components (length) bya maximum of 1.

<Number of characters> Determines the number of characters whichare overwritten. If <Number of characters> is notprogrammed, all assigned characters are enteredin <Character field> in so far as the dimensioningof the character field allows.

The range of values for the 2nd and 3rd parameters is between 1 to1024. If the range of values is not adhered to, the fault message INVA-LID PARAMETER appears.

Example:1 DIM A$(10)2 A$=”ABC” Length of A$ is 3.3 MID$(A$,4,3)=”DEF”

The 4th to 6th components of the character field are written. This is per-missible because the first three components have already been assi-gned.

Example:1 DIM A$(10)2 A$=”ABC” Length of A$ is 3.3 MID$(A$,5,3)=”DEF”

An attempt is made to write the 5th to 7th components of the characterfield. This, however, results in the error message CHARACTER FIELDNOT ASSIGNED, because the 4th component has not yet been assi-gned.

If more characters are assigned than permitted by the maximum cha-racter field length, these characters will be discarded.

Page 484: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-108 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.14.4 Character String Length

LENLEN(<STRING expression>)

Returns the number of characters in a <STRING expression>. The re-sult is an INTEGER value.If the <STRING expression> is empty, LEN returns a value of 0.If the <STRING expression> is not defined, LEN returns a value of -1.

Example:1 DIM XYZ$(10)2 XYZ$=”ABC”3 I%=LEN(XYZ$) INTEGER variable I% has a value of 34 XYZ$=” ”5 J%=LEN(XYZ$) INTEGER variable J% has a value of 06 XYZ$=NUL7 K%=LEN(XYZ$) INTEGER variable K% has a value of -1

5.14.5 Searching for a Character String

INSTRINSTR(<Character string>,<String expression>[,<Startingpoint>])

Beginning at the <Starting point>, INSTR searches for a <characterstring> within a <string expression> and outputs the position of the firstcharacter of the <character string> found in the <string expression> asan INTEGER value.A value of 0 is returned if the <character string> is not found. The <character string> can be programmed as a STRING expression.

The range of values for the 3rd parameter is between 1 to 1024. Thefollowing error message appears if the range of values is not adheredto:INVALID PARAMETER.

Example:1 DIM A$(8)2 DIM B$(16)3 A$=”A” : MID$(A$,2) = ”UVWXYZ”4 B$=”ABCDEF UVWXYZ GH”5 POS1%=INSTR(MID$(A$,2),B$,4) INTEGER variable POS1%

has a value of 86 POS2%=INSTR(MID$(A$,2,4),B$,10) INTEGER variable POS2%

has a value of 0

Page 485: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-109Bosch Rexroth AGIndraMotion MTXR911314869 / 01

7 POS3%=INSTR(MID$(A$,2),B$) INTEGER variable POS3%has a value of 8

5.14.6 Character Strings and Numbers

ASCASC(<Character string>)

Outputs the ordinal number of the first character (ASCII code) of <Cha-racter string> as an INTEGER value.If <Character string> is empty or not defined, ASC returns a value of -1.

<Character string> must be a STRING expression. ASC is the reversal of CHR$.

Example:10 DIM A$(1)20 A$ = ”ABC”30 B$ = ”BCD”40 I% = ASC(A$) INTEGER variable I% has a value of 6550 J% = ASC(B$) INTEGER variable J% has a value of 6660 A$ = ””70 K% = ASC(A$) INTEGER variable K% has a value of -180 A$ = NUL90 L% = ASC(A$) INTEGER variable L% has a value of -1

CHR$CHR$ is the reversal of ASC.

CHR$(<Integer expression>)

Converts an <Integer expression> into the corresponding ASCII cha-racter.All ASCII character decimal priorities appear in the ”ASCII characterset” table in the Appendix of this manual.

Example:10 DIM A$(1)20 I% = 6540 A$ = CHR$(I%) STRING variable A$ has a value of 65

Page 486: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-110 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

STR$STR$([<Format string>,]<Value>)

Converts numeric expression <Value> into a character string that canbe assigned to only one character field. Assignment to a STRING varia-ble leads to a runtime error.

<Value> may be an INTEGER or REAL expression of single or doubleprecision.If <Format string> is programmed, the string can be output in formattedform. The symbol ”#” indicates digits and ”.” indicates decimal points.Output occurs in standard format if a <Format string> entry is not made.

Standard formats:INTEGER number: 9 digits Single-precision REAL number: 4 digits before and 3 after the

decimal point. Double-precision REAL number: 9 digits before and 6 after the

decimal point.

Example:10 DIM A$(50)20 DIM B$(21)30 A$=STR$(”Num-ber=##.###”,(37/3)

Content of character field A$:”Number = 12.333”

40 B$=STR$(2.5) Content of character field B$: ” 2.500”

Page 487: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-111Bosch Rexroth AGIndraMotion MTXR911314869 / 01

VALVAL(<STRING expression>)

Returns the numerical value for a <STRING expression>. If the stringcontains a character other than a leading space, the leading ”+” or ”-”sign, the numbers 0 to 9 or the decimal point ”.”, the conversion will beperformed up to this (other) character. Leading spaces and zeros areignored for purposes of value formation. If none of the characters aboveappear, then ”NUL” is returned. If the string contains a decimal point, theresult may only be assigned to a REAL or double-precision REAL varia-ble. Assignment to an INTEGER variable in this case would lead to anINVALID ASSIGNMENT error message.

Example:1 I% = VAL(”1.23DE”)2 K% = VAL(”123DE”)3 J% = VAL(”ABC”)4 R = VAL(”-1.23DE”)5 Z = VAL(”+ 000001234TEST4365”)6 X = VAL(”ABC1.23DE”)7 D! = VAL(”1234567.234567”)

Line 1 leads to an error message because an assignment to an INTE-GER variable is to take place.

The value of the INTEGER variable K% is 123. The numbers 1,2,3 areconverted to an INTEGER number. The ”D” character aborts the conver-sion because it cannot belong to an INTEGER number. The characterswhich follow it are ignored.

The value of INTEGER variable J% is NUL, i.e. the variable is not assi-gned. The ”A” character aborts the processing of the <STRING expres-sion>.

The value of the REAL variable R is -1.23. The ” -” character is recogni-zed as a positive/negative sign for the REAL number. The digit 1, the ” .”character and the digits 2 and 3 are converted to a REAL number. The”D” character aborts the conversion because it cannot belong to a REALnumber. The ”E” character is not processed further.

The value of the REAL variable Z is 1234. The ”+” character is recogni-zed as a positive/negative sign for the REAL number. The spaces whichfollow as well as the leading zeros are ignored for purposes of value for-mation. The digits 1, 2, 3 and 4 are converted to a REAL number.The ”T” character aborts the conversion because it cannot belong to aREAL number. The remaining characters are not processed further.

The REAL variable X is NUL, i.e. not assigned. The conversion is abor-ted when the character ”A” is recognized.

The value of the double-precision REAL variable D! is1234567.234567.

Page 488: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-112 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.14.7 Removing Leading and Trailing Spaces

TRIM$TRIM$(<Character string>)

TRIM$(<Character string>,”L”)

TRIM$(<Character string>,”R”)

When a character field range is assigned to a STRING variable or cha-racter field, TRIM$() returns a string without preceding (→ index L) ortrailing (→ index R) spaces. The TRIM function without index hides both preceding and concludingspaces.If chaining occurs within the TRIM command (e.g. TRIM$(A$+B$)), theresult may be assigned only to a character field.

Example:1 A$ = ” ABCDEF ”2 B$ = TRIM$(A$,”L”)3 C$ = TRIM$(A$,”R”)4 D$ = TRIM$(A$)5 PRN#(1,”>”,A$,”<”)6 PRN#(1,”>”,B$,”<”)7 PRN#(1,”>”,C$,”<”)8 PRN#(1,”>”,D$,”<”)

Leads to the following lines in the file with the logical number 1 opened forwrite access:> ABCDEF <>ABCDEF <> ABCDEF<>ABCDEF<

Page 489: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-113Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.14.8 Programming Examples

A STRING expression can be assigned to a STRING variable.

Example:Programming STRING variables (without prior dimensioning)1 A$=”ABCDE”2 B$=CHR$(10)

During read access, parts of the STRING variables can be accessed bymeans of the MID$ command: 1 A$=”ABCDEFGHIJKLMN”2 B$=MID$(A$,2,1)3 C$=MID$(A$,4,4)

The following lines of programming will lead to errors: 4 MID$(A$,1,4)=”ABCD”4 A$=MID$(A$,1,3) + MID$(A$,4,1)4 A$=B$ + A$

To continue processing a dimensioned character field, it is necessary tospecifically access one or more connected characters. Only then will itbe possible to assign a character field or a part of the character field to aSTRING variable or to another character field.

Read and write access to a part of a character field is performed with theMID$ command. If only the character field name is entered, the entirecharacter field will be addressed.

Reading a character fieldIf the <n>th character of the character field is to be accessed, proceedas follows (n is less than or equal to the length of the character field andthe number of characters in the field).Example: Reading a character field1 DIM VWX$(13)2 VWX$=”TEST TEST TES”3 A$ = MID$(VWX$,12,1)4 I%=125 A$=MID$(VWX$,I%,1)The 12th character (”E”) of the VWX$ character field is assigned to the A$STRING variable.

Writing a character fieldIf the content of a STRING variable is to be assigned to the characterfield or a part of the character field, the assignment must be converted.Example: Partial writing of the character field1 DIM XYZ$(15)2 B$=”ABCDE”3 MID$(XYZ$,1,5)=B$4 MID$(XYZ$,6,5)=B$The 1st through 10th characters of the XYZ$ character field are assignedthe content of the B$ STRING variable.

Page 490: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-114 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

The following programming would lead to the error message CHARAC-TER AREA NOT USED because the 1st to 5th characters of the charac-ter field are not yet assigned:1 DIM XYZ$(15)2 B$=”ABCDE”4 MID$(XYZ$,6,5)=B$

Example: Partial writing of the character field1 DIM XYZ$(100)2 B$= ”ABCDE”3 MID$(XYZ$,1,10)=B$Content of STRING variable B$: ”ABCDE”Content of field variable XYZ$: ”ABCDE”. The field variable has a length of5. The remaining 95 characters are not assigned.

If the length of the STRING variable is less than the character field, cha-racter field XYZ$ is written only in the length of the STRING variable.When allocating this character field to a STRING variable, it is not theentire character field (defined via DIM instruction) which is assigned, butonly the range which was written previously ( length of the characterfield).

Example:1 DIM XYZ$(100)3 MID$(XYZ$,1,10)=”ABCDE”4 MID$(XYZ$,6,3)=”T”

The content of the XYZ$ field variable after block 3 is: ”ABCDE”. The field variable has a length of 5. The remaining 95 characters are notassigned and are therefore not part of the length. The content of the XYZ$ field variable after block 4 is: ”ABCDET” . The field variable now has a length of 6. The remaining 94 charactersare not assigned and are therefore not part of the length.

Example: Overwriting a character field1 DIM XYZ$(100)3 MID$(XYZ$,1,10)=”1234567890”4 MID$(XYZ$,3,3)=”T”

The content of the XYZ$ field variable after block 3 is”1234567890” . The field variable has a length of 10.The content of the XYZ$ field variable after block 4 is ”12T4567890” . The field variable has a length of 10. The character ”3” is overwrittenby ”T”. The characters ”4” and ”5”are retained.

Example: Prohibited access to the character field1 DIM XYZ$(100)3 MID$(XYZ$,1,6)=”ABCDEF”5 MID$(XYZ$,9,5)=”TESTE”

Page 491: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-115Bosch Rexroth AGIndraMotion MTXR911314869 / 01

The XYZ$ field variable after block 3 contains ”ABCDEF”. The field variable has a length of 6.After block 5, an attempt is made to assign a constant to the 9th to 13thcomponents of the character field. This, however, results in the errormessage CHARACTER AREA NOT USED because the 7th and 8thcomponents are not assigned.If the whole character field is to be accessed, entering the variablename will suffice.

Page 492: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-116 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.14.9 Assigning a STRING Expression to a Character Field

If the STRING expression contains fewer characters than the selectedrange of the character field, the remaining range is regarded as not assi-gned. This remaining range is not included in the character field length.

Example:1 DIM XYZ$(16)2 XYZ$=” ”Content of character field XYZ$: ” ” Length of character field XYZ$: 1

If the length of the STRING expression exceeds the maximum length ofthe character field during assignment, the surplus characters will be re-jected.

Example:1 DIM XYZ$(3)2 XYZ$=”ABCDEF”Content of character field XYZ$: ”ABC”Length of character field XYZ$: 3 ---> maximum length

Example:1 DIM XYZ$(16)2 A$=”DAS ”3 B$=”IST EIN TEST”4 C$=”EIN EI”

5 MID$(XYZ$,1,4)=A$

CONTENT OF THE CHARACTER FIELD-----------------------------------------------------------------

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |16 |

-----------------------------------------------------------------

| | | | | | | | | | | | | | | | |

| D | A | S | | | | | | | | | | | | | |

| | | | | | | | | | | | | | | | |-----------------------------------------------------------------

| | |

Length = 4 Range is not assigned

6 MID$(XYZ$,5,6)=B$

CONTENT OF THE CHARACTER FIELD-----------------------------------------------------------------

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |16 |

-----------------------------------------------------------------

| | | | | | | | | | | | | | | | |

| D | A | S | | I | S | T | | E | I | | | | | | |

| | | | | | | | | | | | | | | | |-----------------------------------------------------------------

| | |

Length = 10 Range is not assigned

Page 493: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-117Bosch Rexroth AGIndraMotion MTXR911314869 / 01

7 MID$(XYZ$,5,12)=B$

CONTENT OF THE CHARACTER FIELD-----------------------------------------------------------------

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |16 |

-----------------------------------------------------------------

| | | | | | | | | | | | | | | | |

| D | A | S | | I | S | T | | E | I | N | | T | E | S | T |

| | | | | | | | | | | | | | | | |-----------------------------------------------------------------

| |

Length = 16; Range is fully assigned

8 MID$(XYZ$,9,8)=C$

CONTENT OF THE CHARACTER FIELD-----------------------------------------------------------------

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |16 |

-----------------------------------------------------------------

| | | | | | | | | | | | | | | | |

| D | A | S | | I | S | T | | E | I | N | | E | I | S | T |

| | | | | | | | | | | | | | | | |-----------------------------------------------------------------

| |

Length = 16; Range is fully assigned

9 XYZ$=MID$(XYZ$,1,4)

CONTENT OF THE CHARACTER FIELD-----------------------------------------------------------------

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |16 |

-----------------------------------------------------------------

| | | | | | | | | | | | | | | | |

| D | A | S | | | | | | | | | | | | | |

| | | | | | | | | | | | | | | | |-----------------------------------------------------------------

| | |

Length = 4 Range is not assigned

The character field was cut off.

Page 494: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-118 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.14.10 Comparisons of STRING Expressions

It is also possible to compare STRING expressions (STRING con-stants, STRING variables and character fields) with one another.Example:1 DIM A$(10)2 DIM B$(15)3 A$=”ANTON”4 B$= ”WILLY”5 C$=”ABCDE”6 D$=”VWXYZ”7 IF A$ < B$ THEN ... 8 IF MID$(A$,2,3) = MID$(B$,1,3) THEN ... 9 Z?=A$ <> ”TEST” 10 IF ”A” <= ”C” THEN ... 11 IF C$ > D$ THEN ... 12 IF A$ = C$ THEN ... 13 IF ”TE” < MID$(D$,2,2) THEN ...

The contents of the STRING expressions are checked for alphabeticalorder in accordance with the ASCII code of the individual characters.

5.14.11 Chaining STRING Expressions

Several STRING expressions can be chained with the use of the ”+”plus character. The result must be assigned to a character field. The ne-sting depth for the chaining of STRING expressions is 3. If this depth isexceeded, the following error message is returned: RUNTIME ERROR2153 - NESTING TOO DEEP

Example: Chaining also within CPL instructions1 DIM A$(3)2 DIM B$(3)3 A$ = ”ABC”4 B$ = ”DEF”5 C$ = ”GH”6 D$ = ”JKL”7 OPENW(1,”P2”,130,”CHAINING TEST”,10)8 PRN#(1,A$+B$)9 PRN#(1,A$+C$)10 PRN#(1,C$+D$)11 PRN#(1,A$+C$+”TEST”)12 PRN#(1,”UVW”+”XYZ”)13 CLOSE(1)

Content of P2 file: ABCDEF <LF>ABCGH <LF>GHJKL <LF>ABCGHTEST <LF>UVWXYZ <LF><ETX><LF>

Example: Chaining texts via STRING expressions

Page 495: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

Electric Drivesand Controls

5-119Bosch Rexroth AGIndraMotion MTXR911314869 / 01

10 DIM A$(100)20 DIM B$(100)30 DIM C$(10)40 DIM D$(20)51 DIM E$(30)52 DIM F$(30)53 DIM G$(30)54 DIM H$(30)55 DIM I$(30)60 A$=”DAS ”70 B$=”IST EIN TEST”80 MID$(C$,1,6)=A$ + B$90 MID$(D$,1,10)=MID$(A$,1,1) + MID$(B$,1,2)92 E$=A$ + MID$(B$,1)93 X$=”ABC”94 Y$=”DE”95 F$=X$ + Y$96 G$=X$ + A$97 H$=X$ + A$ + ”TEST”98 I$=”TES” + ”T1”

Content of A$: ”THIS ” Length 4Content of B$: ”IS A TEST” Length 9Content of C$: ”THIS I” Length 6Content of D$: ”TIS” Length 3Content of E$: ”THIS IS A TEST” Length14Content of F$: ”ABCDE” Length 5Content of G$: ”ABCTHIS ” Length 8Content of H$: ”ABCTHIS TEST” Length12Content of I$: ”TEST1” Length 5

The following lines of code will lead to faults:1 DIM A$(3):A$ = ”ABC”:B$ = ”CD”:C$ = ”EF”2 D$ = A$ + B$3 D$ = B$ + C$ Inadmissible assignment to a4 D$ = A$ + B$ + ”TEST”

Inadmissible assignment to anon-dimensioned STRING variable

5 D$ = ”TEST” + ”TEST1”non-dimensioned STRING variable

Example: STR$1 DIM A$(50) : DIM B$(21)2 A$ = STR$(”A$ = ##.###”,(37/3)) : B$ = STR$(2.5)

Content of character field A$:”A$ = 12.333” ; character field B$: ”2.500”

Example: VAL1 DIM FOLGE$(20) : FOLGE$=”X-WERT -0001.234 MM” 2 XR = VAL(MID$(FOLGE$,7)) : Z% = VAL(MID$(FOLGE$,7,6))3 Y%=VAL(MID$(FOLGE$,15,5)) : X% = VAL(MID$(FOLGE$,18)) Content of REAL variable XR: -1.234 Content of INTEGER variable Z%: -1Content of INTEGER-Variablen Y%: 34 Content of INTEGER-Variablen X%: NUL

Page 496: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Character String Processing

5-120 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example: LEN1 DIM Z$(10)2 Z$ = ”TEST”3 S$ = ”TEST”4 A% = LEN(”TEST”)5 B% = LEN(Z$)6 C% = LEN(S$)7 D% = LEN(”TEST”+Z$+S$)

Content of INTEGER variable A%: 4 Content of INTEGER variable B%: 4 Content of INTEGER variable C%: 4 Content of INTEGER variable D%: 12

Example: MID$ command with read access10 DIM A$(4)20 DIM B$(10)30 DIM C$(10)40 DIM D$(10)50 DIM E$(10)55 DIM F$(10)60 A$ = ”ABCD”

70 B$ = MID$(A$,2,2) --> B$ = ”BC” 80 C$ = MID$(A$,2,5) --> C$ = ”BCD” 95 E$ = MID$(A$,5,1) --> E$ = NUL 97 F$ = MID$(A$,2) --> F$ = ”BCD” 98 F$ = MID$(F$,1,1) --> F$ = ”B”

Example: MID$ command with write access10 DIM A$(4)20 DIM B$(10)30 DIM C$(10)40 DIM D$(10)60 A$ = ”ABCD”70 B$ = ”1234567890”80 C$ = ”EFGHIJKLMN”85 D$ = A$ --> D$ = ”ABCD” 90 MID$(D$,2,3) = B$ --> D$ = ”A123” 95 MID$(D$,5,1) = C$ --> D$ = ”A123E” 97 MID$(D$,4) = B$ --> D$ = ”A121234567”

Example:TRIM$1 DIM XYZ$(16)2 XYZ$ = ”XVALUE = 0.123 ”3 A$ = MID$(XYZ$,8)4 B$ = TRIM$(MID$(XYZ$,8))5 C$ = TRIM$(MID$(XYZ$,8),”L”)6 D$ = TRIM$(MID$(XYZ$,8),”R”)

Content of STRING variable A$: ” 0.123 ”Content of STRING variable B$: ”0.123”Content of STRING variable C$: ”0.123 ”Content of STRING variable D$: ” 0.123”

Page 497: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-121Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.15 File Processing

Files are containers for data. During the course of a CPL program, datacan be read from files or written to files.As a result, measured values can be first saved and then displayed oroutput on a printer.

Within the CNC, files are administered in the file system. They are orga-nized into a hierarchic structure. Individual files are accessed using di-rectory paths.

Files can be administered using various operating modes.

To provide read or write access to data, the corresponding file must al-ways be opened first (see OPENW, OPENR commands); as soon asaccess to the data is no longer necessary, the file is closed (see CLOSEcommand).

5.15.1 File Names

Pay attention to the following conventions for the file name:D Maximum length = 30 characters. There is no differentiation between

the name and any possible filename suffix. All letters, numbers andspecial characters ’.’ and ’_’ are permitted.File names of parts programs may not exceed 28 characters be-cause, during linking, the CNC generates a file whose name consistsof the original filename plus 2 additional characters.

. Use special character ’$’ only for internally generated files. Filena-mes generated externally (via the user interface or DNC) may notcontain a ’$’.

D A distinction is made between capital and lowercase letters.Examples: File nameP123456789.PRGP12_Data_DialP12_DATA_DIAL

D Filenames ’.’ and ’..’ are not permitted because they are already usedinternally.

D Filenames within a directory must be unique. However, files with the same name can exist in different directories.

Page 498: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-122 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.15.2 Sequential File Structure

A sequential file contains a sequence of components (records) thatcan have variable lengths. If a certain record is searched in a sequen-tial file, the search must be carried out from the beginning of the file. Di-rect access is not possible. When the length of a record in a sequentialfile is changed, all subsequent records must be shifted.

As opposed to random files, sequential files contain records with va-rying lengths (max. length = 1024 characters). The end of a record isindicated by a <LF>, which does not count in the length. An <ETX><LF>is inserted after the last record of a file, providing an EOF pointer. AnEOF pointer indicates the end of usable data (<ETX>) in a file.

5.15.3 Random File Structure

A random file contains components (records) with a fixed, definablelength. This permits random, direct access to any component in the file.Dividing the random file into records with a fixed length permits directaccess to a certain record. As for the sequential files, the data are storedas ASCII characters. This permits both the familiar access using theEditor as well as reading and evaluation of random files.

The advantage of the random file is that it can be used to access therequired data more quickly. In addition, the data of a record can be pro-cessed and/or modified without changing the structure of the rest of thefile. Records that are not completely filled with data are filled to the defi-ned length with blanks.

If an attempt is made to insert a STRING variable whose length is longerthan that of the record into a random file, the record is filled up to thedefined length with the first characters of the STRING variable and theremaining characters are ignored.

When the file is read, its end is marked by EOF.

The REWRITE and CLOSE instructions are used for sequential files.

Sequential access to a random file is also possible.

5.15.4 Opening a File

In order to be able to access a file by means of file management com-mands in a CPL program, this file must first be opened for the CPL pro-gram. This is accomplished with the following commands.

Page 499: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-123Bosch Rexroth AGIndraMotion MTXR911314869 / 01

OPENW, OPENRThe command used to open a file is dependent on the desired type ofaccess:D write access: OPENWD read access: OPENR

If the file to be opened does not yet exist, it is created during openingand the predetermined memory area is reserved.

Files which have already been opened can also be opened for read ac-cess by means of the OPENR command. An open file cannot, however,be opened again for writing to it.

To open a random file, an additional parameter is introduced which re-turns the length of the records in the file in bytes (1 byte = length of acharacter). In all other respects, the command structure corresponds tothat of the sequential file.After an OPENR command, the file pointer is positioned on the first filerecord, which can then be read.After an OPENW command, the file pointer is positioned on the EOFpointer, i.e. after the last record of the file.

Syntax:

OPENW(<n>,<PGM name>,<Length>[,<PGM remark>][,<Record length>])

OPENR(<n>,<PGM name>[,<Record length>])

<n>: Logical number under which the file can be addres-sed. Values from 1 to 9 can be selected. The logical num-ber must be programmed as an INTEGER expres-sion. A logical number may not be assigned forreading and writing a file simultaneously. Therefore, amaximum of nine different files may be opened at thesame time. If the range of values is not adhered to, the followingerror message appears: INVALID LOGICAL NUM-BER.

<PGM name>: Must be programmed as a STRING expression. The string must contain at least the filename (maxi-mum of 30 characters including the suffix).The specification of the filename, including the com-plete prefixed path, is permitted.

<Length>: Reserved length when creating the file in bytes. A minimum length of 130 bytes is necessary since wri-ting in a file causes at least 1 record (= 130 charac-ters) to be created and stored. The following errormessage appears if this is not observed: ILLEGALFILE SIZE.

<PGM remark>: Only one STRING expression is permitted for the pro-gramming of the program remark parameter.

Page 500: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-124 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

<Record length>: Number of bytes in a record; range of values:1-1024. If the range of values is not adhered to, thefollowing error message appears: INVALID COMPO-NENT LENGTH

Examples:50 OPENW(1,”P500”,1024,”This is my best ”

program”)

40 A$=”P500” : B1$=”This is my best program”50 OPENW(9,A$,1024,B1$)

50 OPENW(7,”PData_Mes.DAT”,1024,”Store measurementdata”)

When the file is opened for writing, a check is made to ensure that therandom structure has been maintained. If the structure has been damaged by the editor, the following messageappears: INVALID COMPONENT LENGTH.

Example:10 OPENW(2,”P200”,1024,10)20 FOR I% = 1 TO 330 PRN#(2,”TEST”)40 NEXT I%50 CLOSE(2)

Result: ”P2”TESTE <LF> TESTE <LF> TESTE <LF> <ETX><LF>

When the file is opened for reading, a check is made to ensure that therandom structure has been maintained. All components must have theidentical length specified in the OPENR command.

Example:1 OPENW(2,”P200”,130,”TEST”,10)2 PRN#(2,”ABC”)3 CLOSE(2)4 OPENR(1,”P2”,5)5 CLOSE(1)

A check is made whether the record length of file ”P2” is 5. However, therecord length of this file is 10.

Page 501: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-125Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:P1:N10 G1F10000X1000Y1000Z10001 A$=”01234567890123456789”2 B$=”TEST”N20 X0M30

P2:1 OPENW(1,”PMeas_PRG”,500,”RANDOM FILE”,10)2 OPENR(2,”P1”)3 DIM A$(30)4 FOR I% = 1 TO 55 INP#(2,A$)6 PRN#(1,A$)7 NEXT8 CLOSE(2)9 CLOSE(1)

RESULT: PMeas_PRG:N10 G1F100<LF>1 A$=”0123<LF>2 B$=”TEST<LF>N20 X0 <LF>M30 <LF><ETX><LF><LF>

If the structure was damaged by the editor, the following message ap-pears: INVALID COMPONENT LENGTH.

FILENOLogical file numbers are required to access files; these can have valuesbetween 1 and 9, i.e. a maximum of 9 files can be opened at the sametime using CPL. Command FILENO makes it possible to query the next valid logical filenumber. If the function returns a value of ”-1”, no free logical file numberis available. The function value’s type is integer.

Example:10 LOG_NR%= FILENO20 IF (LOG_NR% <> (-1)) THEN30 OPENW(LOG_NR%,”/user/usr/Test”,130)40 PRN#(LOG_NR%,”Date: ”,DATE)50 CLOSE(LOG_NR%)60 ELSE70 PRN#(0,”No free log. file number exists!”)80 ENDIFM30

Page 502: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-126 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

VERSINF$VERSINF$ makes it possible to query management data of the Indra-Motion MTX in the CPL program.The function supplies a value of type string.

Syntax:

VERSINF$(<Index1>[,<Index2>])

<Index1>: Integer constant type. Function mode:1: Read software version2: Read hardware version

<Index2>: Integer type.Auxiliary mode of the function, depending on the va-lue of parameter <Index1>.<Index1> = 1: No auxiliary mode exists<Index1> = 2: Auxiliary mode:

1: Hardware type (default)2: Vector group No.3: Index of vector group No.

Example:10 DIM SYS_INFO$(50)20 SYS_INFO$ = VERSINF$(1)30 PRN#(0,”Software version: ”, SYS_INFO$)M30

DIRINFDIRINF makes it possible to query management data of the IndraMo-tion MTX file system in the CPL program. The function supplies a valueof type Integer (for negative results, the real result is greater than themaximum integer value, i.e. > 2,147,483,647).

The syntax changes depending on the value of parameter <Index1>.Syntax for <Index1> = 1, 2 or 3:

DIRINF(<Index1>[,<Index2>])

Syntax for <Index1> = 4:

DIRINF(4,[<Index2>],<ResVar>[,<File number>])

<Index1>: Integer constant type. Function mode:1: free storage space2: occupied storage space3: number of files present in the directory4: filename in the directory

<Index2>: String type. Auxiliary mode:directory name (default: current directory)

Page 503: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-127Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<ResVar>: Dimensioned string variable type, only for functionmode 4.After the command is executed, this supplies thename of a file in the given directory.

<File number>: Integer type, only for function mode 4.In <File number> indicates the sequential number ofthe file in the directory whose name is to be suppliedin <ResVar>. If the sequential number is invalid, NUL is supplied in<ResVar>.

Return value:Function mode 1: free storage space (in bytes)Function mode 2: occupied storage space (in bytes)Function mode 3: number of files present in the directoryFunction mode 4: 0 (<ResVar> contains filename) or

1 (<ResVar> is NUL)

Example:; Show all the file names in the ”/database” directoryin; the MSG window10 DIM FILENAME$(30)20 LJUST30 DIR$= ”/database”40 ANZ_FILES%= DIRINF(3,DIR$)50 FOR LNR%= 1 TO ANZ_FILES%60 ERG%= DIRINF(4,DIR$,FILENAME$,LNR%)70 PRN#(0,LNR%,”: ”,FILENAME$)80 NEXT LNR%M30

DIRCRDIRCR makes it possible to create a new directory in the CPL program.The function supplies a value of type integer.

Syntax:

DIRCR(<Directory>)

<Directory>: Directory name with complete path as a string expres-sion.If the path is not provided, the current directory is posi-tioned in front of the string expression.

Return value:0: Directory has been created1: It is not possible to create a directory

Page 504: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-128 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:10 I% = DIRCR(”/usr/user/test”)M30

DIRDELDIRDEL makes it possible to delete an empty directory in the CPL pro-gram. The function supplies a value of type integer.

Syntax:

DIRDEL(<Directory>)

<Directory>: Directory name with complete path as a string expres-sion.

Return value:0: Directory has been deleted1: Directory could not be deleted

Example:10 I% = DIRDEL(”/usr/user/test”)M30

Page 505: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-129Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.15.5 Describing a File

LJUST, NJUSTWith LJUST (= Left JUSTify), a change-over to left-justified data outputis carried out. It is effective up to the end of the program run for all dataoutputs. NJUST (No JUSTify) makes it possible to return prematurely tothe formatted output.

A maximum of 7 places (4 pre-decimal and three post-decimal places)are available for the REAL data type and a maximum of 9 places areavailable for the INTEGER data type when data are output to files. Lea-ding and trailing zeros are suppressed. This also applies to left-justifiedoutput.

Since blanks between the NC address and the value are suppressed,LJUST makes it possible to use CPL to directly create NC programswhich can be executed under the AUTOMATIC mode.

PRN#Syntax:

PRN#(<n>,[<Expression>][,<Expression>][,<Expression>][,...][;])

<n>: 1 to 9: Logical number of the file to be written.0: Issuance is diverted to monitor (as in the case of mes-sage programming by MSG command).

<Expression>: Any alphanumeric characters (text in inverted com-mas), format strings or variables, the content of which isto be saved/displayed.

; Suppresses the automatic addition of a <CR><LF>.If a record is overwritten via the PRN# command, the fol-lowing applies:PRN# command with semicolon:If the length of the new data to be written is shorter thanthe length of the old data, the new data are inserted andthe rest of the old data is retained.PRN# command without semicolon:If the length of the new data to be written is shorter thanthe length of the old data, the new data are inserted andthe rest of the old data is overwritten with blanks.

The type of variable is freely selectable. Indexed variables and charac-ter fields can also be used. Double-precision REAL expressions canalso be programmed as any definable CPL expressions.

Page 506: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-130 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

If the result of an expression is to be output providing a format, at leastone of the expressions must be of the STRING type. The format can bespecified by using ”#” and ”.” in this format string. The results are ent-ered at the place of the format instruction specified with ”#”. The first for-mat instruction contained in a STRING expression refers to the firstsubsequent expression which may be output with a format entry. Boo-lean expressions cannot be formatted. The number of all programmedformat entries must be less than or equal to the number of expressionsto be output. If this condition is not fulfilled, the surplus ”#” symbols aredisplayed. An expression is output in standard format if a format entry isnot made.

If the output of an expression exceeds 1024 characters, the followingerror message appears: BLOCK EXCEEDS 1024 BYTES.If the result cannot be output in the specified format, the warning PRNFORMAT INCORRECT is returned, and ”*” (asterisk) characters areoutput instead of the faulty format.

If # characters are to be created in the file itself, no formattable expres-sion may follow after the string within the PRN# instruction.The output of the # character can also be performed with CHR$(35).

A line feed can be initiated during output with CHR$(13), i.e. the furtheroutput of the PRN# command is continued in the next line (i.e. in thenext record).Other control characters can be transferred with the CHR$() function,e.g. when outputting via a serial interface.

Example: PRN# command with semicolon1 OPENW(2,”PProg123.PRG”,200,35)2 PRN#(2,”TEST1 FOR PRN COMMAND WITH SEMICOLON”) 3 PRN#(2,”TEST2 FOR PRN COMMAND WITH SEMICOLON”) 4 PRN#(2,”TEST3 FOR PRN COMMAND WITH SEMICOLON”) 6 SEEK(2,1)7 PRN#(2,”OVERWRITE”;)8 CLOSE(2)

RESULT in PProg123.PRG: OVERWRITE PRN COMMAND WITH SEMICOLON<LF>TEST2 FOR PRN COMMAND WITH SEMICOLON<LF>TEST3 FOR PRN COMMAND WITH SEMICOLON<LF><ETX><LF>

Page 507: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-131Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example: PRN# command without semicolon1 OPENW(2,”P2”,1000,36)1 REWRITE(2)2 PRN#(2,”TEST1 FOR PRN COMMAND W/O SEMICOLON”) 3 PRN#(2,”TEST2 FOR PRN COMMAND W/O SEMICOLON”) 4 PRN#(2,”TEST3 FOR PRN COMMAND W/O SEMICOLON”) 6 SEEK(2,1)7 PRN#(2,”OVERWRITE”)8 CLOSE(2)

RESULT in P2:OVERWRITE <LF>TEST2 FOR PRN COMMAND W/O SEMICOLON<LF>TEST3 FOR PRN COMMAND W/O SEMICOLON<LF><ETX><LF>

An <ETX><LF> is inserted after the last block of the file.

The following error message appears if the length of the block exceeds1024 characters: BLOCK EXCEEDS 1024 BYTES.

If a sequential file is written and the end of the file is reached, the file iscopied automatically and the reserved range increased by the occupiedlength insofar as sufficient memory is available in the parts program me-mory. Since this very quickly takes up a great deal of memory, it is advisable toreserve a sufficiently large file length when creating the file withOPENW.

Example:1 OPENW(1,”P2”,300,”TEST PRN COMMAND”)2 A$=”TEST”3 B$=”FOR”4 C$=”PRN COMMAND” 5 PRN#(1,A$)6 PRN#(1,B$)7 PRN#(1,C$)8 PRN#(1,A$;)9 PRN#(1,B$;)10 PRN#(1,C$;)11 CLOSE(1)

Result: P2: TEST<LF> FOR<LF>PRN COMMAND<LF>TESTFORPRNCOMMAND<LF><ETX><LF>

Page 508: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-132 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example:10 DIM E$(50)20 OPENW(1,”P2”,300,”TEST2”)30 A% = 500040 R = 1.23150 B! = 4/3 60 D$ = ”ABCDE”70 E$ = ”CDEFGHI”80 PRN#(1,”10”;)90 PRN#(1,”#####”,”###.###”,”#.#####”,A%,R,B!,D$,E$)95 CLOSE(1)

P2: 10 5000 1.2311.33333ABCDECDEFGHI<LF>

A% R B! D$ E$

REWRITE If data are already present in the opened file, the new data are normallyappended to the existing data when writing. An existing file can, howe-ver, be overwritten by means of REWRITE without especially having todelete the contents that are no longer required. When overwriting, therange reserved in the OPENW command remains available in the partsprogram memory.

Syntax:

REWRITE(<n>)

<n>: Logical file number (range of values 1 - 9)

To overwrite a file, it must be open.

Page 509: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-133Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.15.6 Reading a File

INP#With the INP# instruction, the ASCII data in an open file may be read inrecord form and assigned to one or more variables. This command onlyhas an effect on files that were opened with ”OPENR(...)”.

INP#(<n>,<Variable>[,<Variable>][,...][;])

<n>: 1 to 9: Logical file number to be read from.<Variable>:Variable under which the read data is stored.; If a semicolon is programmed, the file pointer remains in the

record until the end of the record is reached. After that, thenext record is opened. Reading does not, however, auto-matically take place there. If no semicolon is programmed, the next record is openedautomatically.

The type of variable is freely selectable. Indexed variables and charac-ter fields can also be used. If a value other than TRUE or FALSE is assi-gned to a logical variable, this variable is valued at NUL.

The characters ”0” to ”9”, leading signs ’-’, ’+’, leading zeros or spacesare converted to INTEGER or REAL values if the variable type is INTE-GER or REAL (simple and double precision). If another character is as-signed to an INTEGER or REAL variable, the variable is assigned NUL.If a variable is assigned NUL, the position within the file does notchange.

If the value assigned to an INTEGER or a REAL variable is too high, acorresponding error message appears:INVALID INTEGER VALUE INVALID FLOAT VALUE

Example: INP# instructionP2: ABC 123456789 ABC

P3: 1 OPENR(2,”P2”)2 DIM C$(3)3 DIM D$(3)4 INP#(2,I%,J,L?,C$,K%,D$)5 CLOSE(2)

RESULT: I% = NULJ = NULL? = NULC$ = ”ABC”K% = 123456789D$ = ”ABC”

Page 510: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-134 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example: Reading a record from a file1 OPENW(1,”P2”,200,”TEST”,22)2 PRN#(1,”-12TEST1.23V12ABCD2.4A”)3 PRN#(1,”-12TEST1.23V12ABCD2.4A”)4 PRN#(1,”-12TEST1.23V12ABCD2.4A”)5 CLOSE(1)6 DIM A$(3)7 DIM C$(5)8 DIM D$(4)9 DIM E$(4)10 DIM G$(25)11 DIM H$(7)12 DIM I$(7)13 DIM J$(25)14 DIM R(1,2)15 OPENR(2,”P2”,22)16 INP#(2,B%,D$,R(1,1),MID$(E$,1,1),R(1,2),A$,C$)17 INP#(2,G$)18 INP#(2,H$;)19 INP#(2,I$;)20 INP#(2,J$)21 CLOSE(2)

Result: B% = -12D$ = ”TEST” ,since max. length of character field = 4 R(1.1) = 1.230E$ = ”V”R(1,2) = 12.000A$ = ”ABC” ,since max. length of character field = 3C$ = ”D2.4A”G$ = ”-12TEST1.23V12ABCD2.4A”H$ = ”-12TEST” ,since max. length of character field = 7I$ = ”1.23V12” ,since max. length of character field = 7J$ = ”ABCD2.4A”

Page 511: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-135Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.15.7 End-of-File Recognition

EOF The EOF function allows a query to be made as to whether the end offile (EOF) has been reached. The EOF function returns the logical value TRUE if the end of the file isreached during reading. Otherwise FALSE is returned.

Example::9 DIM A$(10)10 OPENR(1,”P”,444) : I%=011 WHILE NOT (EOF(1))DO12 INP#(1,A$)13 I%=I%+114 END15 CLOSE(1)M30

5.15.8 Closing a File

CLOSECloses a file.A maximum of 9 files can be open at the same time. If, when 9 files areopen, access to a further file is necessary, you must first close a file. Open files should therefore as a rule be closed immediately upon com-pletion of read or write operations.Syntax:

CLOSE(<n>)

<n>: 1 to 9: Logical number of the filethat is to be closed.

Example::90 DIM A$(35)100 XPOS = MCS(1)110 YPOS = MCS(2)120 OPENW(1,”P5”,500,”ACHSPOS”)130 REWRITE(1)140 PRN#(1,”X-axis”,XPOS,YPOS,”Y-axis”,YPOS)150 CLOSE(1)160 OPENR(1,”P5”)170 INP#(1,A$)180 CLOSE(1):

Page 512: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-136 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

In the above example, the current positions of the X and Y axis aretransferred to variables (lines 90 to 110). File 1 is then opened and sto-red as parts program P5 (line 120). The file is subsequently written or overwritten and then closed (lines140 to 150). The file is then opened for reading and assigned the con-tents of the A$ variable. It is closed again after read access (lines 160 to180).

5.15.9 Reading File Pointer Position

FILEPOS The FILEPOS() function returns the number of the current record of arandom file. This record can be accessed afterwards. It is also possibleto determine the record offset within the current record of a random fileor the offset from the current byte that can be accessed for a sequentialfile. The file can therefore be a sequential or a random file.

Offset refers to the number of bytes from the top of the file up to the cur-rent byte in a file. The record offset specifies the byte at which positio-ning takes place within a record. The record offset begins with the value1 (= 1st byte in a record) and can have the maximum value of the recordlength + 1 (last byte in this record is <LF>). The value 1 is returned if youare on the EOF pointer.

Syntax:

FILEPOS(<n>[,<Mode>])

<n>: 1 to 9: Logical number of the file in which the position ofthe file pointer is to be read.If the range of values is not adhered to, the following errormessage appears: INVALID FILE NUMBER

<Mode>: With random files: Range of values = 1 to 3

<Mode> = 1:Supplies the offset to the current byte which can be read orwritten.<Mode> = 2:Supplies the record number of the current record which canbe read or written. The result is as follows if you are on theEOF pointer: Number of records + 1.<Mode> = 3:This command supplies the record offset within the currentrecord which can be read or written. The record offset be-gins with the value 1 (. 1st byte in this record) and can havethe maximum value of the record length + 1 (. last byte inthis record is <LF>). The value 1 is returned if you are on the EOF pointer andreading from the file is not permitted.

Page 513: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-137Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<Mode> not programmed:Supplies the record number of the current record which canbe read or written. The result is as follows if you are on theEOF pointer: Number of records + 1.

With sequential files: Range of values = 1

<Mode> = 1 or not programmed:Supplies the offset to the current byte which can be read orwritten.

. If the range of values of <Mode> is not adhered to, the following er-ror message appears: INVALID PARAMETER.

Example: FILEPOS and sequential file1 OPENW(1,”P2”,200,”TEST”)2 FOR I% = 1 TO 103 PRN#(1,”TEST FOR FILEPOS”)4 NEXT5 CLOSE(1)6 OPENR(1,”P2”)7 SEEK(1.3)8 POS% = FILEPOS(1)9 POS1% = FILEPOS(1.1)11 SEEK(1.0) : REM POSITIONED ON END OF FILE12 POS2% = FILEPOS(1)13 POS3% = FILEPOS(1.1)14 CLOSE(1)

Result:POS% = 3 -> byte numberPOS1% = 3 -> byte numberPOS2% = 171 -> byte numberPOS3% = 171 -> byte number

Page 514: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-138 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Example: FILEPOS and random file1 OPENW(1,”P2”,200,”TEST”,1024)2 FOR I% = 1 TO 103 PRN#(1,”TEST FOR FILEPOS”)4 NEXT5 SEEK(1,3,2)6 POS% = FILEPOS(1)7 POS1% = FILEPOS(1.1)8 POS2% = FILEPOS(1.2)9 POS3% = FILEPOS(1.3)10 PRN#(1,”Overwriting of 3rd record from byte 2”) with this text”) 11 SEEK(1,0) : REM Positioned on end of file6 POS% = FILEPOS(1)7 POS1% = FILEPOS(1.1)8 POS2% = FILEPOS(1.2)9 POS3% = FILEPOS(1.3)11 CLOSE(1)

Result: POS% = 3 −> number of record of current positionPOS1% = 258 −> byte numberPOS2% = 3 −> number of record of current positionPOS3% = 2 −> position within 3rd recordPOS% = 11 −> number of record of current positionPOS1% = 1281 −> byte numberPOS2% = 11 −> number of record of current positionPOS3% = 1 −> position within 3rd record

5.15.10 Setting File Pointer

SEEK Positions the file pointer at a certain position of an open file. The file maybe a sequential or a random file.With sequential files, the file must be opened with the command”OPENR(..)”. For random files, the command ”OPENW(..)” is also per-missible.

Syntax:

SEEK(<n>,<k>[,<o>])

<n>: Logical number of the file in which the file pointer is to bepositioned.Range of values: 1 to 9If the range of values is not adhered to, the following errormessage appears: INVALID FILE NUMBER

Page 515: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-139Bosch Rexroth AGIndraMotion MTXR911314869 / 01

<k>: Record number of a random file or byte number of a se-quential file. The file pointer is positioned on <k>.Range of values:0 to last existing record or

0 to last existing byte.The record with the EOF pointer is taken to be the last exi-sting record. At 0, positioning is on the EOF pointer. The INVALID COMPONENT error message appears if therange of values is not adhered to or if the specified recorddoes not exist.

<o>: Record offset. Specifies at which byte within a record posi-tioning should take place. Range of values:1 - record length + 1.If the record offset is not programmed for random files, posi-tioning of the file pointer is at the 1st byte of record <k> .If the range of values is not adhered to, the INVALID PARA-METER error message appears.This parameter is permitted only for random files. The INVA-LID PARAMETER error message appears if this parameteris programmed although it is a sequential file (which hasbeen opened for reading).

Example: SEEK and sequential file1DIM A$(1):LJUST:OPENW(1,”P271”,130,”TEST”):FOR I%=1 TO10: 10: PRN#(1,”!/-!/-!/-!/-!/-!/-!/-!/-!/-!/-”):NEXT: CLOSE(1):OPENR(2,”P271”):FOR I%=1 TO FILESIZE(2,2)-28: IF NOT (EOF(2)) THEN SEEK(2,I%):INP#(2,A$) ENDIF: IF (EOF(2)) THEN PRN#(0,”###”,I%,”. BYTE: <EOF>”): ELSE PRN#(0,”###”,I%,”. BYTE: <”,A$,”>”) ENDIF: NEXT I%:CLOSE(2)M30

Example: SEEK and random file1 OPENW(1,27272,200,”TEST”,1024):LJUST2 FOR I% = 1 TO 103 PRN#(1,I%,”. Record”)4 NEXT5 SEEK(1,3,4) : REM Positioned on the 4th byte in the 3rd record6 PRN#(1,”Overwriting of 3rd record from byte 4 with this text”) 7 SEEK(1,11):PRN#(1,”11th record”)8 SEEK(1,11,5):PRN#(1,”@@”)9 SEEK(1,0):PRN#(1,”<EOF>”)10 SEEK(1,0,1):PRN#(1,”new <EOF>”)11 CLOSE(1)

Page 516: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-140 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.15.11 Determining File Size

FILESIZE Supplies the size of a file, or the limit up to which a file has already beenwritten. The file can be a sequential or a random file. This commandonly has an effect on files that were opened with ”OPENR(...)”.

Syntax:

FILESIZE(<n>[,<k>])

<n>: 1 to 9Logical number of the file of which the size is to be determi-ned. If the range of values is not adhered to, the followingerror message appears: INVALID FILE NUMBER

<k>: With random files: Range of values = 1 to 4With sequential files: Range of values = 1 to 2<k> = 1:Total memory area size (in bytes) used by a file.<k> = 2: Memory area size (in bytes) used from the start of the datarange up to the EOF pointer (excluding the size of the EOFpointer).<k> = 3: Maximum number of records in a file. This result dependson the record length with which the file was opened.<k> = 4: Number of records from the start of the file up to the EOFpointer. This result depends on the record length with whichthe file was opened.<k> not programmed:Like <k> = 1.If the range of values for <k> is not adhered to, the followingerror message appears: INVALID PARAMETER.

Example: FILESIZE and sequential file1 OPENW(1,2,1000)2 FOR I% = 1 TO 203 PRN#(1,”TEST FILESIZE”)4 NEXT5 CLOSE(1)6 OPENR(2,2)7 A%=FILESIZE(2)9 B%=FILESIZE(2,1)10 C%=FILESIZE(2,2)11 CLOSE(2)

INTEGER variable A% has the value: 302 INTEGER variable B% has the value: 302 INTEGER variable C% has the value: 300

Page 517: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-141Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example: FILESIZE and random file1 OPENW(1,”P2”,1000,10)2 FOR I% = 1 TO 203 PRN#(1,”TEST FILESIZE”)4 NEXT5 CLOSE(1)6 OPENR(2,2,10)7 A%=FILESIZE(2)9 B%=FILESIZE(2,1)10 C%=FILESIZE(2,2)10 D=FILESIZE(2,3)10 E%=FILESIZE(2,4)11 CLOSE(2)

INTEGER variable A% has the value: 222INTEGER variable B% has the value: 222 INTEGER variable C% has the value: 220 INTEGER variable D% has the value: 20 INTEGER variable E% has the value: 20

Page 518: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-142 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.15.12 Erasing a File

ERASEErases files in the current directory.

Syntax:

ERASE(<PGM identifier>)

<PGM identifier> STRING expression; max. 30 characters.Otherwise the INVALID FILE NAME error messageappears.

The following values can be returned if the ERASE function is assignedto an INTEGER variable or if it is used in loops or queries (WHILE, IFetc.):0: File erased.1: File not erased because it does not exist. 2: File not erased because this file is erase-protected. 3: File not erased because this file is active.

If a file cannot be erased, a warning to this effect is issued and executionof the program continues.

Examples:10 IF ERASE(”P1”) <> 0 THEN ...

10 I% = ERASE(”P1”)

10 WHILE ERASE(”P1”) <> 0 DO ...

Example:10 OPENW(1,”P2”,200)11 OPENW(2,”P3”,200)20 PRN#(1,”TEST1 FOR ERASE”)21 PRN#(2,”TEST2 FOR ERASE”)31 CLOSE(1)32 CLOSE(2)40 ERASE(”P2”)43 A$=”P3”44 ERASE(A$)

Page 519: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-143Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.15.13 Determine File Access Rights

FILEACCESSWith FILEACCESS of the CPL program, it is possible to tell whether afile exists and which access rights (privileges) it has.

Syntax:

FILEACCESS(<File name>)

<File name> File name with a complete path as a string expres-sion.If the file name contains no path, the file is searched inthe current directory. The CPL function supplies thereturn value as an integer value:-1 : file does not exist0: : file without access rightsotherwise: binary-coded access rights:

Bit1: execution possible (X)Bit2: writing allowed (W)Bit3: reading allowed (R)Bit4: file is a directory (D)Bit5: file is an active program (A)

An active program is a file that undergoes the following in a channel:D executed as a programD executed as a subroutine of a programD opened by a CPL command.

If the access rights of a zero offset or tool compensation table which isbeing used in a running part program are queried by the CPL FILEAC-CESS, Bit5 is not set.

Example:10 I% = FILEACCESS (”/usrfep/test.cnc”)

Page 520: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

5-144 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.15.14 Determine File Date

FILEDATEIn the CPL program, the date of a file can be determined with FILE-DATE. An access error does not generate a parts program error; instead, thefunction supplies an empty string.

Syntax:

FILEDATE(<File name>[,<Mode>])

where:<File name> File name with a complete path as a string expres-

sion.If the file name contains no path, the file is searched inthe current directory. The CPL function supplies astring expression as a return value.

<Mode> Integer variable for the function mode(default = 1):1 = Date of the file, format: dd.mm.yy2 = Time of the file, format: hh.mm.ss

Example:10 DIM DATE$(10)20 DATE$ = FILEDATE(”/usr/user/Test.txt”,1)30 IF LEN(DATE$)>0 THEN40 PRN#(0,”File date: ”,DATE$)50 ENDIF

Page 521: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

File Processing

Electric Drivesand Controls

5-145Bosch Rexroth AGIndraMotion MTXR911314869 / 01

5.15.15 Copying Files

FILECOPYFILECOPY is used to copy a file in the CPL program.

Syntax:

FILECOPY(<Source file>,<Target file>)

where:<Source file> File name with the complete path of the source file as

a string expression. If the file name contains no path,the file is searched in the current directory.

<Target file> File name with the complete path of the target file as astring expression. If the file name contains no path,the file is created in the current directory.

ERRNO CPL variable that can be programmed in any position.When ERRNO is programmed, no runtime error is is-sued; the return values are:

0: Access OK-8: name of source file, including path, is too long-9: access to source file impossible

-10: name of target file, including path, is too long-11: file name (source or target) invalid-12: copying impossible.

Example:10 FILECOPY(”/usr/user/Test.txt”, ”/usr/user/Test.bak”, ERRNO)20 IF ERNO = 0 THEN30 PRN#(0,”Copying procedure OK”)40 ENDIF

Page 522: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Communication

5-146 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

5.16 Communication

MMCSends information regarding the program running time from a subrou-tine to a client and waits for the result from this client.This is carried out with the aid of CPL variables, which can send valuesfrom the parts program as well as return values to the parts program.The parts program is stopped during runtime at the point where theMMC command is received.

The following processing possibilities are possible:D If no client has reported that it is able to process the MMC command,

then the corresponding return value (=1) is assigned and the proces-sing of the parts program continues.

D If a suitable client for processing the data of the MMC command isavailable, then an assignment between the parts program and theclient occurs. After the client has sent a reply, the corresponding re-turn value is set and the execution of the parts program continues.

The MMC command can have a maximum of 20 CPL variables as para-meters. The name and the values of these variables are transmitted tothe client.

Syntax:

MMC(<CPL Var1>[,<Cpl Var2>....[,<Cpl VarN>]....])

<CPL Var1>...<CPL VarN>

CPL variables, N=max. 20The client can write new values to the CPL varia-bles stated in the MMC command. The CPL varia-bles stated in the MMC command can be used inthe parts program.

The MMC command supplies the following return values as a result:0: o.k.1: no client present2: error in client9: client terminated.

Page 523: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Communication

Electric Drivesand Controls

5-147Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Example:10 DIM PROGNAME$ (50)20 PROGNAME$=”WinProg”30 INTPAR%=140 REALPAR=1.150 I%=MMC(PROGNAME$, INTPAR%,REALPAR)

CPL variables PROGNAME$, INT-PAR% and REALPAR are made avai-lable, with their values, to the client.

60 IF I%=0 THEN The block preparation of the parts70 IF INTPAR%=2 THEN program is not continued in line 6080 ... until a corresponding ’finished’ mes-90 ELSE sage has arrived.100 ...110 ENDIF120 ENDIF

Page 524: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Communication

5-148 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Notes:

Page 525: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-1Bosch Rexroth AGIndraMotion MTXR911314869 / 01

A Appendix

A.1 Abbreviations

Abbrevia-tion

Meaning

OM Operating mode

UI User interface

CSE Components sensitive to electrostaticdischarge

ESD Electrostatic dischargeAbbreviation for all designations thatare concerned with electrostatic di-scharge, e.g. ESD protection, ESD-sensitive.

Fx Function key with the number x

MP Main program

LSEC Lead screw error compensation

MDI Operating mode ”manual data input”

MP Machine parameter

MSD Machine status display

NC, CNC Numerical control

PE Protective earth

SK Softkey

PLC Programmable logic control

SR Subroutine

MTB Machine tool builder

T Tool

Page 526: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-2 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

A.2 Overview Tables of NC Functions

Arranged alphanumerically according to long form: page A-2 ff.Arranged alphanumerically according to group: page A-28 ff.

Arranged alphanumerically according to long form:

NC function nameLong form Shortform

Group(”-” means:

activeblockwise)

Designation / Explanation Page Function inPNC MTC

; - - Comment: skip the rest of the line 2-20

( ) - - Comment: skip the content within the paren-theses

2-20

(MSG - - output message text 2-22

/ - - Skip block 2-37

// - - Remark 2-20

ABS - CPL ABS(<input value>)

Outputs the input value as an absolute value.

2-61 ABS -

AC(...) - - Local absolute dimension programming, e.g.

X=AC(10)

3-69 AC(...) -

ACOS - CPL <function value> = ACOS(<input value>)

Application of the arc-cosine function on the<input value>.

2-62 ACOS -

ACS - CPL ACS(<axis>[,<selection type>[,<channel>]])Supplies the current command position of anaxis.

5-9

AND - CPL <Expression1> AND <Expression2>

Binary link between two BOOLEAN / INTEGERexpressions

2-63 AND -

APOS - CPL APOS(<axis selection>)

Outputs the current actual axis value, based onthe machine zero point.

5-11 APOS -

Area ARA - Area(<BNr>,<Sta>,<Mod>,<P1>,<P2>,<D1>,<D2>)

Defines, activates or deactivates up to 10 rec-tangular, two-dimensional dead or workingranges with axis-parallel boundaries.

4-2 - -

ASC - CPL ASC(<Character string>)

Outputs the ordinal number of the first charac-ter (ASCII code) of <character string> as anINTEGER value.

5-109 ASC -

ASIN - CPL <Function value> = ASIN(<Input value>)

Application of the arc-sine function on the <in-put value>.

2-62 ASIN -

Page 527: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-3Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

ASPCLR - - ASPCLR(<SR No>)Asynchronous subroutines: log off

4-5 - -

ASPDIS - - ASPDIS(<SR No>)Asynchronous subroutines: switch off

4-6 - -

ASPENA - - ASPENA(<SR No>)Asynchronous subroutines: switch on

4-6 - -

ASPRTP - - ASPRTP(<SR No>,<Point>)Asynchronous subroutines: define point of re-turn to path

4-7 - -

ASPSET - - ASPSET(<SR No>,<SR name>,<Flags>)Asynchronous subroutines: Log in

4-8 - -

ASPSTA - - ASPSTA(<SR No>,<Channel No>)Asynchronous subroutines: trigger

4-9 - -

AssLogName ALN - ALN(...)

Assign logical axis name

4-10 G515 -

ASTOPA - - ASTOPA[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as allthe conditions are fulfilled. The conditions referto the axis positions, e.g. ”Z” > 20

2-78 - -

ASTOPO - - ASTOPO[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as onecondition is fulfilled. The conditions refer to theaxis positions, e.g. ”Z” > 20

2-78 - -

ATAN - CPL <Function value> = ATAN(<Input value>)

Application of the arc-tan function on the <in-put value>.

2-62 ATAN -

ATBWD - - AtBwd(<AxKoord>,<Koord>)Calibration of axis kinematics: Backwardstransformation

4-11

ATCAL - - ATCAL(<File>,<OptData>,<mask>,<Info>,<AnzIt>)Calibration of axis kinematics: optimize param-eters.

4-12

ATFWD - - ATFWD(<Coord>,<AxCoord>,<ParData>)Calibration of axis kinematics: convert parame-ters

4-14

ATGET - - ATGET(<ParData>,<ATrafNr>)Calibration of axis kinematics: read parameterfrom NC

4-15

Page 528: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-4 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

ATPUT - - ATPUT(<ParData>,<ATrafNr>)Calibration of axis kinematics: write parameterto NC

4-17

ATrans ATR Program coor-dinate offset

ATR(X..., Y..., Z..., ...): Additive program coordi-nate offset ON

ATR( ): Additive program coordinate offset OFF

4-172

AUXFUNC - - execute active auxiliary functions of all groups 4-19

AxAcc AAC Axis accel. AAC(X..., Y..., Z..., ...): switch onAAC(1): switch on with saved settingAAC( ): switch off

Program axis acceleration

4-20 G6/G7 -

AxAccSave AAS - Save current axis acceleration. 4-20 - -

AxCouple AXC Axis coupling AXC(<Master>,<Slave1>(...),<Slave2>(...),...):Activate axis coupling

AXC( ) : Deactivate axis coupling

4-22 G580/G581

AxisToSpindle ATS - ATS(<axis name>)

Switch axis to spindle mode.

4-26

AXO - CPL AXO((<Axis selection>[,<Selection type>])

Transfers an active G92 offset for a coordinate.

5-15 AXO -

AXP - CPL AXP(axis number>,<path information>)

This function permits level-independent partsand measurement programs (program AXP inplace of the address values).

5-54 AXP -

AxVel AVE - AxVel(<Value>)Change the maximum axis velocity

4-27

AxVelSave AVS - Save max. axis velocity 4-27

BCD - CPL <BCD value> = BCD(<binary value>)

Convert BCD format to binary format.

2-64 BCD -

BcsCorr BCR Tool lengthcomp.

BCR(<XW-Offset>,<YW-Offset>,<ZW-Offset>,<Angle1> ,<Angle2>,<Angle3>) : switch onBCR( ): switch off

Placement: Tool position compensation.

4-29 G138/G139 -

BIN - CPL <Binary value> = BIN(<BCD value>)

Convert binary format to BCD format.

2-64 BIN -

BITIF - CPL BITIF(<Bit signal>[,<Index>[,<IF unit>]])

This function permits access to the digital inter-face between the NC and the PLC.

5-55 IC -

BlkNmb BNB - BlkNmb(<Disp>)

Limits the number of program blocks that areread in and viewed by block preparation.

2-71 PREPNUM -

Page 529: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-5Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

BSTOPA - - BSTOPA[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as allthe conditions are fulfilled. The conditions referto the basic workpiece positions, e.g. ”Z” > 20

2-80 - -

BSTOPO - - BSTOPO[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as onecondition is fulfilled. The conditions refer to thebasic workpiece positions, e.g. ”Z” > 20

2-80 - -

CALL - CPL CALL <Program number> [<Transfer parame-ter1>,...] [DIN]

Subroutine call from a CPL program

2-28 CALL -

CASE - CPL CASE <Integer expression> OFLABEL <Int. constant>[,<Additional int.constant>] [: <Instruction>]

<Instruction>LABEL ...OTHERWISE <Instruction>

<Instruction>ENDCASE

Conditional selection from several alternatives.

2-39 CASE -

ChLength CHL Cham./Round. CHL(<Chamfer length>): switch onCHL( ): switch off

Insert transitional chamfers with defined cham-fer length.

4-31 G234/G35 -

CHR$ - CPL CHR$(<Integer expression>)

Supplies a character whose ordinal number inthe ASCII table equals the value transferredusing parameter <INTEGER expression>.

5-109 CHR$ -

ChSection CHS Cham./Round. CHS(<Chamfer section>): switch onCHS( ): switch off

Insert transitional chamfers with defined cham-fer section.

4-31 G234/G35 -

CLOCK - CPL <Function value> = CLOCK

Query of the time counter in milliseconds.

5-57 CLOCK -

CLOSE - CPL CLOSE(<n>)

Closes an opened file after reading or writingoperations are complete.

5-135 CLOSE -

CLRWARN - CPL Delete all the warnings of a channel that weregenerated with SETWARN.

2-58 - -

COF - CPL COF(<Axis selection>[,<Selection type>])

Supplies the last-programmed contour shift ofa coordinate for the current channel.

5-16 COF -

Page 530: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-6 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

COFFS - - Contour shift for 3D radius correction 3-79 - -

Collision CLN Collision moni-tor

CLN(1): switch onCLN(CollErr..| LA... | DLA... | DEF) :

Switch on with parameter settingCLN( ): switch off

Collision monitor for 2D cutter path compensa-tion.

4-33

ConstFeed CFD V profile Constant velocity 4-76 G310 -

Coord CRD Axis transfor-mation

CRD(x): Switch axis transformation onCRD( ): Switch axis transformation off

e.g. end surface transformation

4-36 Coord G30ff.

COS - CPL <Function value> = COS(<Input value>)

Cosine function for the <input value>.

2-62 COS -

CoupleSpline-Tab

CST Axis coupling CST(STAB(...))

Generate a spline coupling table

4-38 G582

D D D-correction Dx: Activate D-correction (1-99 tools)D0: Cancel the D correction.

3-99 G147 -G847,G148

DATE - CPL <String variable> = DATE

Assigns the date in the form DD.MM to a<STRING variable>.

5-57 DATE -

DBMOVE - CPL DBMOVE(<DbTab>,<SrcKey1>,<SrcKey2>,<DestKey1>,<DestKey2>[,<Mode>])Translation of a data set within a databasetable.

5-33

DBLOAD - CPL DBLOAD(<DbTa-belle>,<Key1>,<Key2>>,<File-name>[,<Mode>])Can read in parts of a database table or acomplete database table from a file into thedatabase.

5-34

DBSAVE - CPL DBSAVE(<DbTab>,<Key1>,<Key2>,<File-Name>[,<Mode>])Via DBSAVE, parts of a database table or acomplete database table can be saved to a file.

5-35

DBSEA - CPL DBSEA(<DbTab>,<Key1>,<Key2>,<Search-Cond>,<SeachRes>[,<ResVar>])

Searches data blocks in a database table.

5-27

DBSEAX - CPL DBSEAX(<DbTa-belle>,<Key1>,<Key2>,<SearchCond>,<Er-gArr>, <ErgSize>)Searches data sets which correspond to thesearch criterium in a tool database table.

5-38

Page 531: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-7Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

DBTAB - CPL DBTAB(<DbTable>,<Key1>,<Key2>[,<Res-Var>])

Reads a complete data block or a substructureof a database table to a CPL variable or writesback from this variable.

5-26

DBTABX - CPL DBTABX(<DbTa-belle>,<Key1>,<Key2>[,<Mode>])This can read a complete data block or a sub-structure of a tool database table into a CPLvariable or write from the variable back to thedata block.

5-36

DBTABXL - CPL DBTABXL(<DbTa-belle>,<Key1>,<Key2>[,<Mode>])This can read a complete data block or a sub-structure of a tool database table into a CPLvariable or write from the variable back to thedata block.

5-37

DCT - CPL DCT(<Value selection>,<Datablock>[,[<Table>] [,<Unit>]])

Read/write access to any D-correction table orto external tool correction values.

5-25 TC -

DcTSel DCS - DCS(<Path><File name>)

Activation of a D-correction table.

4-39 G22 K -

DefAxis DAX - Create default axis configuration 4-40 G513 -

DefSpindle DSP - Reset channel spindles to MP 4-40

DefTangTrans DTT Transitionangle

DTT(<Transition angle>): ActivateDTT( ): Deactivate

Definition of tangential contour transition

4-41 G228 -

DiaProg DIA Diam./Rad. Diameter programming 4-42 DIA G16

DIM - CPL DIM <Variable name>(<Field size1>[,<Fieldsize2>])

Specification of the field size (dimensioning) ofARRAY variables with INTEGER constants.

2-52,5-105

DIM -

DIRCR - CPL DIRCR(<Directory>)

Creates a new directory.

5-127

DIRDEL - CPL DIRDEL(<Directory>)

Deletes an empty directory.

5-128

DIRINF - CPL DIRINF(4,[<Index2>],<ResVar>[,<File num-ber])

Calls administration data of the file system.

5-126

Page 532: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-8 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

DistCtrl DCR - DCR(1) Height regulation for digitization, ON acc. to machine param.DCR(<Fct>) ON with autonomous config.dataDCR( ) Height regulation OFF

4-44 DistCtrl -

DPC - CPL DPC(<Selection>[,<Selection type>])

Supplies the last-programmed parameter ofworkpiece position compensation BcsCorr of acoordinate (offset values and turning angle) forthe current channel.

5-17 DPC -

SD SD ED-correction ED x: Activation of external tool compensation (1-16 tools / tool edges)

ED0: Deactivation of external tool compensation

3-100 G145 -G845,G146

EndPosCouple EPC - EPC(<M-coord>,<S-coord>,<Factor>):End position coupling ON

EPC( ): End position coupling OFF

4-46 - -

EOF - CPL EOF(<n>)

Check for end of file.

5-135 EOF -

ERASE - CPL ERASE(<Program ID>)

Deletes files.

5-142 ERASE -

ERRNO - CPL Error return of various CPL functions. 2-55 - -

F F - F-address for G93, G94, G95 3-95 F

FA FA - Velocity for asynchronous axes. 3-96 FA

FALSE - CPL <Boolean variable> = FALSE

Truth value of a BOOLEAN variable

2-51 FALSE -

FeedAd FAD Feed advance FAD(1) : remove axis from feeddisplay

FAD( ): Axis contained in feed display

4-48 G594/G595

FeedForward FFW Feed forwardcontrol

FFW(X..., Y..., Z..., ...): switch onFFW( ): switch off

Activate servo control

4-49 G114/G115 G6/G7

FILEACCESS - CPL FILEACCESS(<File name>)

Determines whether a file exists and what ac-cess rights it has.

5-143 FILEAC-CESS

-

FILECOPY - CPL Copy files. 5-145 - -

FILEDATE - CPL FILEDATE(<File name>[,<Mode>])

Determines the date/time of a file.

5-144 FILEDATE -

FILENO - CPL Supplies the next valid logical file number. 5-125

Page 533: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-9Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

FILEPOS - CPL FILEPOS(<n>[,<mode>])

Supplies the record number of the current re-cord and the record offset of a random file.For sequential files, supplies the current byteposition of the file indicator.

5-136 FILEPOS -

FILESIZE - CPL FILESIZE(<n>[,<k>])

Supplies the size of a file or the limit to which afile has already been written.

5-140 FILESIZE -

FlyMeas FME Measurementon-the-fly

FME(MpiAxis< i>) X... Y... Z...

Movement with on-the-fly measurement

4-51 G275 -

FOR NEXT - CPL FOR <Count.var.>=<Start val> [STEP spac-ing>] TO <End val><Routine>NEXT [<Count.variable>]

Loop construction with automatically updatedcounter.

2-41 FOR NEXT -

FsMove FSM - Move to fixed stop(Fs = fixed stop)

4-55 G475 G75

FsProbe FSP - Measurement at fixed stop 4-53 G475 G75

FsReset FSR - Cancel fixed stop 4-55 G477 G76

FsTorque FST - Torque for fixed stop 4-55 G476 AXD

G - - User-defined local subroutines

G00 G0 Interpolation Linear interpolation (rapid travel) 3-3 G00/G10 G00

G00(..) G0(..) Interpolation Rapid travel with options

Optional parametersNIPS: without precise stopIPS1: Precise stop window 1IPS2: Precise stop window 2IPS3: Precise stop window 3 (only braking to

V=0)POL/POLAR: with polar coordinate program-ming, e.g. G0(POL) X50 A45 B10, with A, B =polar angle 1/2

3-3

G01 G1 Interpolation Linear interpolation (feed) 3-5 G01/G11 G01

G02 G2 Interpolation Circular interpolation, clockwise(incl. helical N)

3-7 G02/G12 G02

G02(POL) G2(..) Interpolation Circular interpolation, clockwise(incl. helical N) with polar coordinate program-ming

3-11 G02/G12 G02

G03 G3 Interpolation Circular interpolation, counterclockwise(incl. helical N)

3-7 G03/G13 G03

G03(POL) G3(..) Interpolation Circular interpolation, counterclockwise(incl. helical N) with polar coordinate program-ming

3-11 G02/G12 G02

Page 534: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-10 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G04 G4 - G4(F..) Dwell time in seconds

G4(S...) Dwell time in spindle rotations; refer-ence spindle is the main spindle (MainSp)

3-12 G04/G104 G04

G05 G5 Interpolation Tangential circle entry (incl. helical N) 3-13 G05 -

G06 G6 Interpolation Splines, nurbs 3-14 G99 -

G08 G8 Path slope Path slope ON with path SHAPE according tomachine parameters

3-21 G08 G08

G08(SHAPE...) - Path slope Path slope ON with programmed path SHAPE 3-23 G108 G08

G09 G9 Path slope Path slop OFF (without SHAPE) 3-21 G09 G09

G09(..) G9(..) Path slope G9(X..., Y..., ...) Path slope OFF with axis-wise programmedSHAPE arrangement

G9(ASHAPE)Path slope OFF with axis-wise SHAPE ar-rangement according to machine parameters

G9(SHAPE ...)Path slope OFF with programmed path SHAPE

G9(SIN ...)Path slope OFF with sin2-shaped SHAPE (pos-sible SHAPE arrangement: 5, 10, 15, 20, 40)

3-23 G408,G608

G140 - 3D radius corr. 3D radius correction OFF 3-79 G141

G141 - 3D radius corr. 3D radius correction to left of contour 3-79 G141

G142 - 3D radius corr. 3D radius correction to right of contour 3-79 G142

G152.1 G152 IP page 1 Placement: Inclined plane, programmable,page 1

3-83 G352

G152.2-G152.5 - IP page 2-5 Placement: Inclined plane, programmable,page 2-5

3-83 G452

G153 - SE Placement: Inclined plane, all OFF 3-83,3-83

-

G153.1-G153.5 - IP page 1-5 Placement: Inclined plane page 1-5 OFF 3-83,3-83

G353

G154.1 G154 IP page 1 Placement: 1. inclined plane, page 1 ON 3-83 G354

G154.2-G154.5 - IP page 2-5 Placement: 1. inclined plane, page 2-5 ON 3-83 G454/G554

G155.1 G155 IP page 1 Placement: 2. inclined plane, page 1 ON 3-83 G355

G155.2-G155.5 - IP page 2-5 Placement: 2. inclined plane, page 2-5 ON 3-83 G455/G555

G156.1 G156 IP page 1 Placement: 3. inclined plane, page 1 ON 3-83 G356

G156.2-G156.5 - IP page 2-5 Placement: 3. inclined plane, page 2-5 ON 3-83 G456/G556

G157.1 G157 IP page 1 Placement: 4. inclined plane, page 1 ON 3-83 G357

G157.2-G157.5 - IP page 2-5 Placement: 4. inclined plane, page 2-5 ON 3-83 G457/G557

Page 535: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-11Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G158.1 G158 IP page 1 Placement: 5. inclined plane, page 1 ON 3-83 G358

G158.2-G158.5 - IP page 2-5 Placement: 5. inclined plane, page 2-5 ON 3-83 G458/G558

G159.1 G159 IP page 1 Placement: 6. inclined plane, page 1 ON 3-83 G359

G159.2-G159.5 - IP page 2-5 Placement: 5. inclined plane, page 2-5 ON 3-83 G459/G559

G16 - Plane selec-tion

no plane 3-27 G16 -

G17 - Plane selec-tion

Plane selection XY 3-28 G17/G20 G17/G20

G17(...),G18(...),G19(...)

- Plane selec-tion

Expanded plane switching

G17/18/19( <Axis1>,<Axis2>,<Axis3>)The axes in parentheses open the WCS andreceive the meaning X, Y and Z. Then the programmed plane is selected.

G17/18/19( )Reset the workpiece coordinate system to thedefault setting and then select the programmedplane.

3-30 - -

G18 - Plane selec-tion

Plane selection ZX 3-28 G18/G20 G18/G21

G184 - Drilling cycle Drilling cycle: Rigid tapping 3-68 G184

G19 - Plane selec-tion

Plane selection YZ 3-28 G19/G20 G19/G22

G20 - Plane selec-tion

Free plane selection (WCS-independent)

The placements have an effect on the WCS;the plane is defined regardless of the WCS.

3-32 - -

G33 - Thread Thread cutting 3-33 G33 G33

G40 - Path compen-sation

Cutter path compensation OFF 3-39 G40 G40

G41 - Path compen-sation

Cutter path compensation to left of workpiece 3-39 G41 G41

G42 - Path compen-sation

Cutter path compensation to right of workpiece 3-39 G42 G42

G43 - Insertion stra-tegy

Insertion strategy, arc 3-41 G68 G43

G44 - Insertion stra-tegy

Insertion strategy, intersection 3-41 G69 G44

G45 - Velocity, mil-ling machine

Velocity, milling machine point of engagement 3-43 G64 G99

G46 - Velocity, mil-ling machine

Velocity, milling machine center 3-43 G65 G98

G47 - Tool correction Switch on tool length correction 3-44 G146/8 G47

Page 536: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-12 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G47(..) - Tool correction G47(<L1 coord>,<L2 coord>,<L3 coord>)G47(ActPlane)Tool length correction ON with switching ofcorrection assignment.

G47( ): Tool length correction ON with correc-tion assignment according to machine parame-ters.

3-44 G146/8 G47

G48 - Tool correction Tool length correction OFF 3-44 G145/7ff. G48/G49

G53 - ZO All zero offsets OFF 3-46 -

G53.1-G53.5 - ZO page 1-5 Zero offset page 1-5 OFF 3-46 G53-G253

G54.1 G54 ZO page 1 1. zero offset, page 1 ON 3-46 G54-G254

G54.2-G54.5 - ZO page 2-5 1. zero offset, page 2-5 ON 3-46 G54-G254

G55.1 G55 ZO page 1 2. zero offset, page 1 ON 3-46 G54-G254

G55.2-G55.5 - ZO page 2-5 2. zero offset, page 2-5 ON 3-46 G55-G255

G56.1 G56 ZO page 1 3. zero offset, page 1 ON 3-46 G54-G254

G56.2-G56.5 - ZO page 2-5 3. zero offset, page 2-5 ON 3-46 G56-G256

G57.1 G57 ZO page 1 4. zero offset, page 1 ON 3-46 G54-G254

G57.2-G57.5 - ZO page 2-5 4. zero offset, page 2-5 ON 3-46 G57-G257

G58.1 G58 ZO page 1 5. zero offset, page 1 ON 3-46 G54-G254

G58.2-G58.5 - ZO page 2-5 5. zero offset, page 2-5 ON 3-46 G58-G258

G59.1 G59 ZO page 1 6. zero offset, page 1 ON 3-46 G54-G254

G59.2-G59.5 - ZO page 2-5 6. zero offset, page 2-5 ON 3-46 G59-G259

G61 Precise stop Precise stop 3-49 G61/G161 G61

G61(IPS...) - Precise stop Precise stop with precise stop window IPS1,IPS2 or IPS3

3-49 G61/G161 G61

G62 - Precise stop Precise stop off 3-49 G62/G162 G62

G63 - Thread G63(M3/M4, S.../H...) F... Z... ...

Rigid tapping

3-51 G32 G63/G64

G70 - Inch/metric Inch programming,affects the programmed path and length units,feeds and acceleration.

3-53 G70 G70

G71 - Inch/metric Metric programming 3-54 G71 G71

G74 - - G74 X1 Y1 Z1 ...

Traverse to reference point coordinates

3-55 G74/G374 G74

G74(Home) - - G74(HOME) X1 Y1 Z1

Traverse to reference point (real referencing,also for asynchronous axes)

3-55 G74/G374 G74

G75 - Probe Traverse to probe (cancel movement) 3-57 G75 -

Page 537: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-13Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G76 - - Traverse to fixed machine position (machinecoordinates)

3-58 G76 -

G77 - - G77 <Coord 1><Mode> <Coord n><Mode> ... F<Wert>Alternative syntax: REPOSAsynchronous subroutines: Repositioning individual coordinates

3-59 - G77

G78 - - G78(-<Coordinate1>,-<Coordi-nate2>,-<Coordinate3>)Compensation switching ON

3-60

G79 - - Compensation switching OFF 3-60

G80 - Drilling cycle Switch off drilling cycle 3-62 G80 -

G81 - Drilling cycle Drilling cycle: Drilling with retraction in rapidtraverse

3-62 G81 DEFINE

G82 - Drilling cycle Drilling cycle: Drilling with retraction in feed 3-63 G82 DEFINE

G83 - Drilling cycle Drilling cycle: Deep hole drilling 3-64 G83 DEFINE

G84 - Drilling cycle Drilling cycle: Floating tapping 3-65 G84 DEFINE

G85 - Drilling cycle Drilling cycle: Drilling out with retraction inrapid traverse

3-66 G85 DEFINE

G86 - Drilling cycle Drilling cycle: Drilling out with retraction in feed 3-67 G86 DEFINE

G90 - Abs/Rel Absolute dimension programming 3-69 G90 G90

G91 - Abs/Rel Relative dimension programming 3-69 G91 G91

G93 - Feed prog. time programming 3-70 G93 G93

G94 - Feed prog. Feed programming (per min) 3-71 G94 G94

G94(...) - Feed prog. G94(DF <Value>, DS1 <Value>, DS2<Value>, ... )

Incremental velocity programming with accel-eration adaptation.

3-72 G94 G94

G95 - Feed prog. Feed programming (per rotation) 3-74 G95 G95

G96 - Spindle prog. G96(<Reference axis>,<Point of action>)Constant cutting speed

3-75 G96/G196 G96

G97 - Spindle prog. Direct speed programming 3-75 G97 G97

GCT(0) - - Straightness and angle error compensation:switch off

4-59

GCT(1) - - Straightness and angle error compensation:switch on

4-59

GetAxis GAX - GAX(...)

Get free axis in channel

4-58 G510

Page 538: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-14 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

GETERR - CPL GETERR(<Channel> [,<Category>],<Er-ror>No> [,<Number>])

Supplies the error No., channel No. and errorcategory for the current errors.

5-58 GETERR -

GetSpindle GSP - GetSpindle (<SysSpNr> | <SysSpName> ,<ChanSpNr> | <ChanSpName> , ...)Create channel spindles

4-60

GMSG - - GMSG(<Note text>)

Program notes in the user interface.

2-22 (GMSG

GoAhead GOA - Jump forward 2-32

GoBack GOB - Jump backward 2-33

GoCond GOC - Conditional jump 2-34

GOTO - CPL GOTO <Jump target>

Unconditional program jumps to line number,block number or label.

2-36 GOTO -

GoTo - - Unconditional jump 2-35

HsBlkSwitch HSB - HSB(HS<X>=<Y>)

Block transition on-the-fly using high-speedsignal

4-59 G575 -

HsBlkSwitch(..HSSTOP=..)

HSB - HSB(...,HSSTOP=..)

Block transition with cancellation using high-speed signal

4-64 G575 -

HWOC - - HWOC(CHAN<Channel No>,CRDNO<Coord.No>, STEP<Incr>)Online correction in workpiece coordinates ON

HWOCDIS(CHAN<Channel No>)Online correction OFF; save values

HWO( )Online correction OFF; delete values

4-66 HWOCON,HWOCOFF

-

IC(...) - - Local relative dimension programming, e.g.X=IC(5)

3-69 IC(...) -

IF ENDIF - CPL IF <Condition> THEN <Routine> [ELSE <Alter-native routine>] ENDIF

Conditional jump to a routine or alternative rou-tine.

2-38 IF ENDIF -

InitMeas IME - IME(MpiAxis i)

Initialize measurement on-the-fly.

4-51 G175 -

INP# - CPL INP#(<n>,<Variable>[,<Variable>] [,...] [;])

Read access for a file.

5-133 INP# -

INSDEP - - 3D radius correction immersion depth. 3-79 - -

Page 539: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-15Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

INSTR - CPL INSTR(<Character string>,<String expres-sion>[,<Starting point>])

Searches a <string expression>, starting at<starting point>, for a <character string> andoutputs its starting position as an INTEGERvalue.

5-108 INSTR -

INT - CPL <Integer number>=INT(<Real expression>)

Transforms the <real expression> to an <inte-ger number> by cutting off the numbers afterthe decimal point.

2-61 INT -

JogWCSSelect - - Selects the coordinates for jogging in work-piece coordinates (set-up mode).

4-69 JogWCS-Select

-

KvProg KVP CO progr. KVP(Y..., Y..., Z..., ...): CO programming ONKVP( ): CO programming OFF

4-70 G14/G15 AXD

LEN - CPL LEN(<String expression>)

Supplies the number of characters in aSTRING expression.

5-108 LEN -

LEN - - LEN=<Value>

Divides the traversing block into several partialpaths of equal length.

4-72 - -

LFConf LFC - LFC(LL(...))Set the laser performance control parameters

4-74 LFPON -

LFP LFP - LFP, LFP(1), LFP(LL(...))Laser performance control ON

LFP(0) Laser performance control OFF

4-74 LFPON,LFPOFF

-

LinDownFeed LND V profile Linear braking 4-77 G312 -

LinModZp LMZ - LMZ(LinModAxis i)

Set linear modulo axis to zero(Zp = zero point)

4-79 G105 -

LinUpFeed LNU V profile Linear acceleration 4-76 G311 -

LJUST - CPL Switch to left-justified data output; effectiveuntil the end of the program run.

5-129 LJUST -

M M - User-defined local subroutines

M0 M0 - Program halt 3-85 M0

M1 M1 - Conditional program halt 3-85 M1

M19, M119,M219

- - Orientate spindle. 3-90 M19-M219

M2 M2 - End of main program 3-86 M2

M3, M103,M203,M13, M113,M213

- - Spindle clockwise rotation,spindle clockwise rotation with coolant ON

3-87 M3 - M203,M13-M213

Page 540: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-16 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

M30 M30 - End of main program 3-86 M30

M4, M104,M204,M14, M114,M214

- - Spindle counterclockwise rotation,spindle counterclockwise rotation with coolantON

3-88 M4 - M204,M14-M214

M40, M140,M240

- - Automatic gear range selection 3-92 M40-M240

M41 - M44,M141 - M144,M241 - M244

- - Manual gear range selection 3-93 M41 - M44,M141-M144M241-M244

M48, M148,M248

- - Disengage gear range. 3-94 M48-M248

M5, M105,M205

- - Spindle stop 3-89 M5 - M205

MainSp MSP - Select main spindle, e.g. for G33 and G95 4-80 MAINSP SPF

MCA - CPL MCA(<Block>,<Index>[,<Channel>])Transfers the contents of a MACODA individ-ual parameter.

5-40

MCODS - CPL MCODS(<Type>,<Channel>,<Ver-sion>,<Buffer>,<Size>[,<P1>])

Calls Motion Control data services of the NCS.This allows the data and states to be read fromthe NC.

5-63 MCODS -

MCOPS - CPL MCOPS(<Fct>,<Channel>[[,[<P1>][,[<P2>],[<P3>]]],<P4>]))

Calls Motion Control process services of theNCS. This allows channels in the NC to becontrolled.

5-93 MCOPS -

MCS - CPL MCS(<Coordinate>[,<Selection type>[,<Chan-nel>]])Supplies the current machine position (MCS)for a machine coordinate without straightnessand angle error compensation.

5-8

MID$ - CPL MID$(<String expression>,<Starting point>[,<No. of characters>])Takes a part of the STRING expression andoutputs it as text. The result can be transferredto a STRING variable or to an appropriatelysized character field.

MID$(<Character field>,<Starting point>[,<No.of characters>])Overwrites portions of a character field.

5-106 MID$ -

Mirror MIR Mirror MIR(X1, Y1,Z1,...): Mirroring of coordinates ON

MIR( ): Mirroring of coordinates OFF

4-81 G38/G39

Page 541: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-17Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

MMC - CPL MMC(<CPL-Var1>[,<CPL-Var2>...[,<CPL-VarN>]...])

Sends information regarding the program run-ning time from a subroutine to a client andwaits for the result from this client.

5-146 MMC -

MSG - - MSG(<Note text>)

Program notes in the user interface.

2-22 (MSG

NCF - CPL NCF(<NC function>)

Transfers the syntax of the active NC functionwithin the NC modal group of <NC function>.

5-41 NCF -

Nibble NIB Punch NIB( NUM...): Nibble processing ONNIB( ): Nibble processing OFF

4-84 G662/G660 -

NJUST - CPL Premature reset from left-justified data outputto formatted output.

5-129 NJUST -

NOT - CPL NOT <Expression>

Negation of a BOOLEAN expression / bitwisenegation of an INTEGER expression.

2-63 NOT -

NUL - CPL <Variable> = NUL

Delete a variable.

2-60 NUL -

NUM - - NUM=<Value>

Divides the traversing block into a definednumber of partial paths of equal length.

4-86 - -

O O - O(...) Orientation movement for a tool 4-87 O(...) -

OFFSTOPA - - Channel synchronization command: deletesthe programmed ”AND stop conditions” in thecontrol channel (ASTOPA, BSTOPA,WSTOPA).

2-84

OFFSTOPO - - Channel synchronization command: deletesthe programmed ”OR stop conditions” in thecontrol channel (ASTOPO, BSTOPO,WSTOPO).

2-84

Omega - - Omega address 3-96

OPENR - CPL OPENR(<n>,<Prog.name>[,<Record length>])

Opens a file so that it can be read.

5-123 OPENR -

OPENW - CPL OPENW(<n>,<Prog.name>[.<Length>][,<Prog.comment>][,<Record length>])

Opens a file so that it can be written.

5-123 OPENW -

OR - CPL <Expression> OR <Expression>

Binary link between two BOOLEAN / INTEGERexpressions using the OR function.

2-63 OR -

OvrDis OVD Feed 100% Feed potentiometer OFF 4-98 G63 -

OvrEna OVE Feed 100% Feed potentiometer ON 4-98 G66 -

Page 542: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-18 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

P P - Subroutine call(also possible directly, without P)

2-25

PathAcc PAC Path accel. PAC(ACC... | UP..., DOWN ...) : switch onPAC( ): switch off

Path acceleration programming, either sepa-rately for acceleration and braking or com-bined.

4-99 G106/G107 ACC

PCS - CPL PCS(<Coordinate>[,<Selection type>])

Supplies the last-programmed absolute posi-tion of a coordinate.

5-6 CPOS -

PCSPROBE - CPL PCSPROBE(<Coordinate>[,<Selection type>])

Reads the measured value for a coordinate.

5-12 PCSPROBE

-

PDIM - CPL PDIM <Parameter name>(<Field size>)

This must be used if a subroutine

D is to be called using a string constant as atransfer parameter and

D the calling program is selected withoutlinks.

2-30 PDIM -

PMT - CPL PMT(<Coord.selec-tion>,<Pl.code>[,[<Pl.page>][,[<Table>][,<Unit>]]])

Read and write access to an XML placementtable.

5-30 -

PmTSel PMS - PMS(<Placement table name>)

Placement table selection

4-103 G22 ID -

PMV - CPL PMV(<Coord.selection>[,<Pl. page>])

Supplies the effective placement value for acoordinate.

5-29 -

PLC - CPL PLC(<Type>,<empty param.>,<Ad-dress>,<Size>)This function permits access to the operandsof the PLC.

5-56

PolarPol POP PolarPol POP(X...,Y...,Z...): Set polePOP( ): Pole at origin

Pole for polar coordinate programming.

4-104 -

PoleSet PLS Set pole PLS(X..., Y..., Z...): Set polePLS( ): Pole at origin

Pole for help in making mirroring/rotation en-tries.

4-109 G37/G39

PosDepHSOut PHS - PHS(<Mode>,<Distance>,<Duration>)Programmable position-dependent high-speedoutput

4-101 PDHSO -

Page 543: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-19Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

PosMode PMD Positioningtype

PMD(A..., B...) : switch positioning typePMD( ): Positioning type acc. to machine pa-rameters

Positioning type for endless axes

4-110 G151/G150 G36ff.

PPOS - CPL PPOS(<Axis selection>[,<Axis type>])

Queries the actual axis position for the switch-ing time of the probe.

5-14 PPOS -

PrecProg PRP Precisioncheck

PRP(DIST... | EPS...) : Precision check ONPRP( ): Precision check OFF

4-113 G328/G329 -

PRN# - CPL PRN#(<n>,[<Expression>][,<Expression][,<Ex-pression>][,...][;])

Write access for a file.

5-129 PRN# -

PROBE - CPL PROBE(<Axis selection>[,<Axis type>])

Queries the axis position for the switching timeof the probe, based on the axis zero pointcoordinates of the MCS.

5-13 PROBE -

PtBlkEnd PTE Punchingstroke

PTE(X..., Y..., Z..., ...)

Stroke trigger at end of block

4-115 G612 -

PtDefault PTD Punchingstroke

Stroke trigger according to parameters 4-117 G610 -

PtInpos PTI Punchingstroke

PTI(X..., Y..., Z..., ...)

Stroke trigger at Inpos (Pt = punch time)

4-118 G611 -

Punch PUN Punch PUN( NUM...): Punch processing ONPUN( ): Punch processing OFF

4-119 G661/G660 -

RadProg RAD Diam./Rad. Radius programming 4-42 RAD G15

RedTorque RDT - RDT(<Axis1>,<Axis2>, ...)

Specification of the torque for torque reduction

4-121 G177 -

REM - CPL REM <Comment text>

Program comments.

2-21 REM -

RemAxis RAX - RAX(...)

remove axis from channel

4-122 G512 FAX

RemLogName RLN - RLN(...)

Remove logical axis name

4-123 G516 -

RemSpindle RSP - RemSpindle (<SysSpNr> | <SysSpName> |<ChanSpName , ...)Remove channel spindles

4-124

REPEAT - CPL REPEAT <Routine> UNTIL <Condition>

Loop construction with query of the cancella-tion condition after the routine has been pro-cessed the first time.

2-42 REPEAT -

Page 544: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-20 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

REPOSTP - - REPOSTP(<Point>)Asynchronous subroutines: Define point of return to path in asynchronoussubroutine

4-125

REWRITE - CPL REWRITE(<n>)

Overwrite an existing file.

5-132 REWRITE -

Rotate ROT Rotate ROT(<Angle>): Coordinate rotation ONROT( ): Coordinate rotation OFF

4-126 G38/G39

ROTAX - - Define the rotary axis for vector orientation 4-87 ROTAX -

ROUND - CPL <Integer number>=ROUND(<Real expres-sion>)

Transform a REAL expression to an INTEGERnumber by rounding up or down.

2-62 Round -

RoundEps RNE Cham./Round. RNE<Value> Rounding ONRNE( ): Rounding OFF

Rounding with defined contour shift.

4-128 G34/G35 -

Rounding RND Cham./Round. RND(<Value>): Rounding ONRND( ): Rounding OFF

Rounding with defined rounding radius

4-129 G134/G35 -

S S - S<Number>=<Value>S<Value>Program spindle speed

3-97 S

Scale SCL Scaling SCL(X..., Y..., Z..., ...): Coordinate scaling ONSCL( ): Coordinate scaling OFF

4-130 G38/G39 G78/G79

SCL - CPL SCL(<SCL selection>[,<Selection>[,<Selectiontype>]])

Supplies the last-programmed parameter offunctions PLS and ROT (polar coordinates,scaling factors and turning angle) for the cur-rent channel.

5-39 SCL -

SCS - CPL SCS(<Axis index>,<ID type>,<ID No>[,<Res-Var>])

Read access to SERCOS drive parameters ofthe active parameter set.

5-42 SCS -

SCSL - CPL SCSL(<Axis index>,<ID type>,<ID No>,<Filename>[,<ResVar>])

Create a file for SERCOS parameter lists.

5-43 SCSL -

SD - CPL SD(<Group>[,<Index1>[,<Index2>[,<In-dex3>]]])

Read active system data of the NC control.

5-44 SD -

SDR - CPL SDR(<Group>[,<Index1>[,<Index2>]])

Read active system data of the NC control inREAL format.

5-51 SDR -

Page 545: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-21Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

SEEK - CPL SEEK(<n>,<k>[,<o>])

Positions the file indicator on the <k>-th recordof a random file or on the <k>-th byte of a se-quential file.

5-138 SEEK -

SelCrdCouple SCC - SCC(SC<Channel>, CL(Q1>,<Z1>,...)):Selective additive coordinate coupling ON

SCC( ): All coordinate couplings OFF

4-132 - -

SETERR - CPL Generate a runtime error after evaluatingERRNO.

2-57 - -

SetPos SPS - Set program position 4-133 G92 G52

SETWARN - CPL Generate a warning after evaluating ERRNO. 2-58 - -

Shift SHT - SHT(X..., Y ..., Z ..., ...) : Contour offset ONSHT( ): Contour offset OFF

4-134 G60/G67 -

SIN - CPL <Function value> = SIN(<Input value>)

Use the sine function for the input value.

2-62 SIN -

Sin2DownFeed S2D V profile Sin2-shaped braking 4-77 G316 -

Sin2UpFeed S2U V profile Sin2-shaped acceleration 4-76 G315 -

SinDownFeed SND V profile Sin-shaped braking 4-77 G314 -

SinUpFeed SNU V profile Sin-shaped acceleration 4-76 G313 -

Smax SMX - SMX(<Value>)

Maximum speed for the spindle.

4-135 G192 G92

Smin SMN - SMN(<VALUE>)

Minimum speed for the spindle.

4-135 G292 -

SpAdmin SPA - SPA(Si=0|1)

Conditionally release a reserved spindle ortransfer to another channel.

4-136 - -

SpCouple_Wait

SPC_WAIT

- SPC_WAIT(CP=1-4)

Wait for synchronous mode of the specifiedgroup of coupled spindles.

4-143 - -

SpCoupleConfig

SPCC - SPCC(CP=1-4, MA=<Master>, Si=1, Sj=1, ...)

Define group of coupled spindles,delete or add following spindles, cancel group of coupled spindles.

4-137 - -

SpCouplePosOffs

SPCP - SPCP(S1=<Displacement>, S2=<Displace-ment>, ...POSVEL<Speed>)

Define angle displacement for the active groupof coupled spindles.

4-140 - -

Page 546: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-22 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

SpCouplePosOffs_Wait

SPCP_WAIT

- SPCP_WAIT(CP=1-4)

Wait for angle displacement for the pro-grammed group of coupled spindles.

4-141 - -

SpCoupleDist SPCD - SPCD(S1=<Distance>, S2=<Distance>, ...

Define angle distance for groups of coupledspindles.

4-138 - -

SpCoupleErrWin

SPCE - SPCE(S1=<Window>, S2=<Window>, ...)

Define synchronization error window for groupsof coupled spindles.

4-139 - -

SpCouple-SyncWin

SPCS - SPCS(S1=<Window>, S2=<Window>, ...)

Define synchronization error window for groupsof coupled spindles.

4-142 - -

SPG - - SPG<Group>(<Numbers>)SPGALL(0)Define/cancel spindle groups

4-144

SpindleToAxis STA - STA(...)

Switch spindle to axis mode.

4-153

SplineCorne-ring

SCO - SplineCornering(E<Distance>)SplineCornering(L1=<L1>,L2=<L2>)Rounding of corners with splines

4-154

SplineDef SDF - Specify a spline variant. 4-155

Split SPLIT

- Split(<Mode>,<Part length>)

Divides movement blocks into several partialpaths if they exceed a certain length.

4-157

SpMode SPM - SPM(S1=0|1, S2=0|1, ...)

Manually switch spindle drive interface be-tween velocity mode and position mode

4-158

SPOS - CPL SPOS(<Axis selection>)

Transfers the current axis command value of aphysical axis.

5-10 SPOS -

SPV - - SPV [ <Perm.CPL-Var.> = <Simple CPL ex-pression> ]

Channel synchronization command: When theprogram is executed, the permanent CPL vari-able is written.

2-77

SPVE - - SPV E[ <Perm.CPL-Var.> = <CPL expression>]

Channel synchronization command: When theprogram is executed, the permanent CPL vari-able is written. The CPL expression can in-clude CPL commands, but is already triggeredduring the block preparation time.

2-77

Page 547: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-23Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

SQRT - CPL <Function value> = SQRT(<Input value>)

Use the square root function on the <inputvalue>.

2-62 SQRT -

SSpAdm - - SSpAdm(<SSpNr.> | <SSpName>, <Mode> ,<SSpNo.> | <SSpName>, <Mode> ...)Release/transfer reserved spindle

4-150

SSpAdmOff - - SSpAdmOff(<SSpNo.> | <SSpName>, <Chan-nelNo> , <ChananeNo> ...)SSpAdmOff(<SSpNo.> | <SSpName>)Switch of administration of spindle movementfor specified channels

4-151

SSPG - - SSPG<Group>=<Value>Speed specification for spindle group; also see”S<value>”

3-97 SSPG

SSpGear - - SSpGear(<SSpNo.> | <SSpName>, <Step> ,<SSpNo.> | <SSpName>, <Step> ...)Change gear range

4-149

SSpMax - - SSpMax(<SSpNo.> | <SSpName>, <Speed> ,<SSpNo.> | <SSpName>, <Speed> ...)Limit maximum speed

4-149

SSpMin - - SSpMin(<SSpNo.> | <SSpName>, <Speed> ,<SSpNor.> | <SSpName>, <Speed> ...)Limit minimum speed

4-148

SSpMode - - SSpMode(<SSpNo> | <SSpName>, <Mode> ,<SSpNo.> | <SSpName>, <Mode> ...)Switching of position/speed interface

4-152

SSpMove SSPM

- SSpMove(<SSpNo> | <SSpName>, <Job> ,<SSpNo.> | <SSpName>, <Job> ...)Programming of movements

4-147

SSpOri SSPO

- SSpOri(<SSpNo> | <SSpName>, <Angle> ,<SSpNo.> | <SSpName>, <Angle> ...)Spindle orientation

4-147

SSpSpeed SSPS

- SSpSpeed(<SSpNo> | <SSpName>,<Speed> , <SSpNo.> | <SSpName>,<Speed> ...)Spindle speed programming

4-146

StatToolOri STO - STO(PHI ..., THETA ..., PSI ...)

Static tool orientation

4-159

STR$ - CPL STR$([<Format string>,]<Value>)

Converts numeric expression <Value> into acharacter string that can be assigned to onlyone character field.<Format string> can be used to output thecharacter string in formatted form.

5-110 STR$ -

Page 548: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-24 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

TAN - CPL <Function value> = TAN(<Input value>)

Use the tangent function on the <input value>.

2-62 TAN -

TangTool TTL Tool orient. TTL(TAX..., SYM..., ANG..., IA..., PLC...): Tangential tool guidance ON

TTL( ): Tangential tool guidance OFF

4-161 G131/G130 -

TangToolOri TTO Tangential toolorient.

TTO(SYM..., ANG...): Tangential tool orienta-tion ONTTO( ): Tangential tool orientation OFF

4-164 G630/G631 -

TappSp TSP - TSP(CAXi, ..., GRPj, ...)

Spindle selection for rigid tapping.

4-166 G532 SPF

TCM( , , ) - - TCM(<xVal>,<yVal>,<zVal>)Traversing in the TCS

4-159

TcsDef TCS - Explicitly specify the position of the tool coordi-nate system (implicit tool length correctioncombined with corresponding axis transforma-tion).

4-167 TcsDef -

TCV - CPL TCV(<Value selection>[,<Correction selec-tion>])

Supplies the last-programmed tool correctionvalues.

5-24 TC -

ThreadSet TST Thread Thread cutting, auxiliary functions 4-170

TIME - CPL <String variable> = TIME

Assigns the time to a STRING variable in theform HH.MM.SS.

5-57 TIME -

Trans TRS Program coor-dinate offset

TRS( X ..., Y ..., Z ..., ...) : Program coordinateoffset ONTRS( ): Program coordinate offset OFF

4-172 G60/G67

TRIM$ - CPL TRIM$(<Character string>)TRIM$(<Character string>,”L”)TRIM$(<Character string>,”R”)

In the assignment of a character field range toa STRING variable or a character field, sup-plies a character string without a preceding(index ”L”) or following (index ”R”) space. Ifthere is no index, both preceding and followingspaces are hidden.

5-112 TRIM$ -

TRUE - CPL <Boolean variable> = TRUE

Truth value of a BOOLEAN variable

2-51 TRUE -

VAL - CPL VAL(<String expression>)

Returns the numeric value of the STRING ex-pression.

5-111 VAL -

VERSINF$ - CPL VERSINF$(<Index1>[,<Index2>])

Calls administration data, e.g. the software ver-sion.

5-126

Page 549: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-25Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

VirtAxisPos VAP - Sets the axis position of virtual synchronousaxes in the current channel.

4-174 - -

WAIT - - WAIT in NC block (like CPL WAIT) 2-68

WAIT - CPL WAIT(no parameter)Stops block preparation until all the blocks pro-grammed before WAIT have been processed.

WAIT(,<Waiting time>)Stops block processing until a specified periodhas elapsed.

WAIT(BITIF(...))Stops block processing until a certain statusoccurs on the PLC-NC bit interface.

2-68 WAIT -

WAITA - - WAITA[BITIF(<Parameter>)=<Status>,...,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until all queriedinterface signals exist or until the timeout haselapsed.

2-73 WAITA

WaitAxis WAX - WAX(...)

Wait until the axis is released and then incor-porate it into the channel.

4-175 G511 GAX ?

WAITO - - WAITO[BITIF(<Parameter>)=<Status>,...,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until one of thequeried interface signals exists or until thetimeout has elapsed.

2-73 WAITO

WCS - CPL WCS(<Coordinate>[,<Selection type>[,<Chan-nel>]])Supplies the current workpiece position, with-out online compensation values, for a coordi-nate.

5-7

WHILE - CPL WHILE <Condition> DO <Routine> END

Loop construction with query of the cancella-tion condition before the loop is processed thefirst time.

2-43 WHILE -

WPV - - WPV[<Perm.CPL-Var.><Compar.op.><Simp.CPL-Expr.>,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until the expres-sion is fulfilled or until the timeout has elapsed.

2-75

Page 550: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-26 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

WPVE - - WPVE[<Perm.CPL-Var.><Compar.op.><CPL-Expr.>,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until the expres-sion is fulfilled or until the timeout has elapsed.The CPL expression can include CPL com-mands, but is already triggered during theblock preparation time.

2-75

WriteId WID - WID(S-0-0104, X..., Y..., Z..., ...)

Writing SERCOS parameters

4-176 G900 AXD

WSTOPA - - WSTOPA[<Channel No.>,<Cond.1>,<Cond.2>...,<Bed.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as allthe conditions are fulfilled. The conditions referto the workpiece positions, e.g. ”Z” > 20.

2-82

WSTOPO - - WSTOPO[<Channel No.>,<Cond.1>,<Cond.2>...,<Bed.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as oneof the conditions is fulfilled. The conditions re-fer to the workpiece positions, e.g. ”Z” > 20.

2-82

XOR - CPL <Expression> XOR <Expression>

Binary link between two BOOLEAN / INTEGERexpressions using the EXCLUSIVE-OR func-tion.

2-63 XOR -

XTAB - CPL XTAB(<Table>,<Substructure>)

Read/write access to any XML table which canalso be user-defined.

5-32 TDA -

XTABCR - CPL XTABCR(<Table>,<Type>[,<Table layout>])Creates an XML table with no data within theMTX file system.

5-32

ZOCDEL - CPL ZOCDEL(<Table>,<Position>[,<Channel>])Deletes an axis in an XML zero offset table

5-22

ZOCINS - CPL ZOCINS(<Table>,<Position>,<Axis-Name>[,[<AxisType>][,[<AxisChannel>][,<Pos-Channel>]]])Inserts a new axis in front of an existing col-umn in an XML zero offset table.

5-21

ZOT - CPL ZOT(<Column selection>,<ZO code>[,[<ZOpage>][,[<Table>][,<Unit>]]])

Read/write access to any XML zero offsettable.

5-18 FXC -

Page 551: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-27Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

ZOTCR - CPL ZOTCR(<Table>,<Channel/Template>)Creates an XML zero offset table with nocorrection records within the MTX file system.

5-20

ZoTSel ZOS - ZOS(<ZO name>)

Selection of a zero offset table.

4-179 G22 V O

ZOV - CPL ZOV(<Axis selection>[.<ZO page>])

Supplies the effective ZO values for an axis /machine coordinate.

5-18 FXC -

Page 552: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-28 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Arranged alphanumerically according to group:

NC function nameLong form Shortform

Group(”-” means:

activeblockwise)

Designation / Explanation Page Function inPNC MTC

; - - Comment: skip the rest of the line 2-20

( ) - - Comment: skip the content within the paren-theses

2-20

(MSG - - output message text 2-22

/ - - Skip block 2-37

// - - Remark 2-20

AC(...) - - Local absolute dimension programming, e.g.

X=AC(10)

3-69 AC(...) -

Area ARA - Area(<BNr>,<Sta>,<Mod>,<P1>,<P2>,<D1>,<D2>)

Defines, activates or deactivates up to 10 rec-tangular, two-dimensional dead or workingranges with axis-parallel boundaries.

4-2 - -

ASPCLR - - ASPCLR(<SR No>)Asynchronous subroutines: log off

4-5 - -

ASPDIS - - ASPDIS(<SR No>)Asynchronous subroutines: switch off

4-6 - -

ASPENA - - ASPENA(<SR No>)Asynchronous subroutines: switch on

4-6 - -

ASPRTP - - ASPRTP(<SR No>,<Point>)Asynchronous subroutines: define point of re-turn to path

4-7 - -

ASPSET - - ASPSET(<SR No>,<SR name>,<Flags>)Asynchronous subroutines: Log in

4-8 - -

ASPSTA - - ASPSTA(<SR No>,<Channel No>)Asynchronous subroutines: trigger

4-9 - -

AssLogName ALN - ALN(...)

Assign logical axis name

4-10 G515 -

ASTOPA - - ASTOPA[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as allthe conditions are fulfilled. The conditions referto the axis positions, e.g. ”Z” > 20

2-78 - -

ASTOPO - - ASTOPO[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as onecondition is fulfilled. The conditions refer to theaxis positions, e.g. ”Z” > 20

2-78 - -

Page 553: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-29Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

ATBWD - - AtBwd(<AxCoord>,<Coord>)Calibration of axis kinematics: Backwardstransformation

4-11

ATCAL - - ATCAL(<File>,<OptData>,<mask>,<Info>,<AnzIt>)Calibration of axis kinematics: optimize param-eters.

4-12

ATFWD - - ATFWD(<Coord>,<AxCoord>,<ParData>)Calibration of axis kinematics: convert parame-ters

4-14

ATGET - - ATGET(<ParData>,<ATrafNr>)Calibration of axis kinematics: read parameterfrom NC

4-15

ATPUT - - ATPUT(<ParData>,<ATrafNr>)Calibration of axis kinematics: write parameterto NC

4-17

AUXFUNC - - execute active auxiliary functions of all groups 4-19

AxAccSave AAS - Save current axis acceleration. 4-20 - -

AxisToSpindle ATS - ATS(<axis name>)

Switch axis to spindle mode.

4-26

AxVel AVE - AxVel(<Werte>)Change the maximum axis velocity

4-27

AxVelSave AVS - Save max. axis velocity 4-27

BlkNmb BNB - BlkNmb(<Disp>)

Limits the number of program blocks that areread in and viewed by block preparation.

2-71 PREPNUM -

BSTOPA - - BSTOPA[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as allthe conditions are fulfilled. The conditions referto the basic workpiece positions, e.g. ”Z” > 20

2-80 - -

BSTOPO - - BSTOPO[<Channel No.>, <Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as onecondition is fulfilled. The conditions refer to thebasic workpiece positions, e.g. ”Z” > 20

2-80 - -

COFFS - - Contour shift for 3D radius correction 3-79 - -

DcTSel DCS - DCS(<Path><File name>)

Activation of a D-correction table.

4-39 G22 K -

DefAxis DAX - Create default axis configuration 4-40 G513 -

DefSpindle DSP - Reset channel spindles to MP 4-40

Page 554: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-30 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

DistCtrl DCR - DCR(1) Height regulation for digitization, ON acc. to machine param.DCR(<Fct>) ON with autonomous config.

dataDCR( ) Height regulation OFF

4-44 DistCtrl -

EndPosCouple EPC - EPC(<M-coord>,<S-coord>,<Factor>):End position coupling ON

EPC( ): End position coupling OFF

4-46 - -

F F - F-address for G93, G94, G95 3-95 F

FA FA - Velocity for asynchronous axes. 3-96 FA

FsMove FSM - Move to fixed stop(Fs = fixed stop)

4-55 G475 G75

FsProbe FSP - Measurement at fixed stop 4-53 G475 G75

FsReset FSR - Cancel fixed stop 4-55 G477 G76

FsTorque FST - Torque for fixed stop 4-55 G476 AXD

G - - User-defined local subroutines

G04 G4 - G4(F..) Dwell time in seconds

G4(S...) Dwell time in spindle rotations; refer-ence spindle is the main spindle (MainSp)

3-12 G04/G104 G04

G74 - - G74 X1 Y1 Z1 ...

Traverse to reference point coordinates

3-55 G74/G374 G74

G74(Home) - - G74(HOME) X1 Y1 Z1

Traverse to reference point (real referencing,also for asynchronous axes)

3-55 G74/G374 G74

G76 - - Traverse to fixed machine position (machinecoordinates)

3-58 G76 -

G77 - - G77 <Coord 1><Mode> <Coord n><Mode> ... F<Value>Alternative syntax: REPOSAsynchronous subroutines: Repositioning individual coordinates

3-59 - G77

G78 - - G78(-<Coordinate1>,-<Coordi-nate2>,-<Coordinate3>)Compensation switching ON

3-60

G79 - - Korrekturumschaltung AUS 3-60

GCT(0) - - Geradheits- und Winkelfehlerkompensation:switch off

4-59

GCT(1) - - Geradheits- und Winkelfehlerkompensation:switch on

4-59

GetAxis GAX - GAX(...)

Get free axis in channel

4-58 G510

Page 555: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-31Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

GetSpindle GSP - GetSpindle (<SysSpNo> | <SysSpName> ,<ChanSpNo> | <ChanSpName> , ...)Create channel spindles

4-60

GMSG - - GMSG(<Note text>)

Program notes in the user interface.

2-22 (GMSG

GoAhead GOA - Jump forward 2-32

GoBack GOB - Jump backward 2-33

GoCond GOC - Conditional jump 2-34

GoTo - - Unconditional jump 2-35

HsBlkSwitch HSB - HSB(HS<X>=<Y>)

Block transition on-the-fly using high-speedsignal

4-59 G575 -

HsBlkSwitch(..HSSTOP=..)

HSB - HSB(...,HSSTOP=..)

Block transition with cancellation using high-speed signal

4-64 G575 -

HWOC - - HWOC(CHAN<Channel No>,CRDNO<Coord.No>, STEP<Incr>)Online correction in workpiece coordinates ON

HWOCDIS(CHAN<Channel No>)Online correction OFF; save values

HWO( )Online correction OFF; delete values

4-66 HWOCON,HWOCOFF

-

IC(...) - - Local relative dimension programming, e.g.X=IC(5)

3-69 IC(...) -

InitMeas IME - IME(MpiAxis i)

Initialize measurement on-the-fly.

4-51 G175 -

INSDEP - - 3D radius correction immersion depth. 3-79 - -

JogWCSSelect - - Selects the coordinates for jogging in work-piece coordinates (set-up mode).

4-69 JogWCS-Select

-

LEN - - LEN=<Value>

Divides the traversing block into several partialpaths of equal length.

4-72 - -

LFConf LFC - LFC(LL(...))Set the laser performance control parameters

4-74 LFPON -

LFP LFP - LFP, LFP(1), LFP(LL(...))Laser performance control ON

LFP(0) Laser performance control OFF

4-74 LFPON,LFPOFF

-

LinModZp LMZ - LMZ(LinModAxis i)

Set linear modulo axis to zero(Zp = zero point)

4-79 G105 -

M M - User-defined local subroutines

Page 556: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-32 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

M0 M0 - Program halt 3-85 M0

M1 M1 - Conditional program halt 3-85 M1

M19, M119,M219

- - Orientate spindle. 3-90 M19-M219

M2 M2 - End of main program 3-86 M2

M3, M103,M203,M13, M113,M213

- - Spindle clockwise rotation,spindle clockwise rotation with coolant ON

3-87 M3 - M203,M13-M213

M30 M30 - End of main program 3-86 M30

M4, M104,M204,M14, M114,M214

- - Spindle counterclockwise rotation,spindle counterclockwise rotation with coolantON

3-88 M4 - M204,M14-M214

M40, M140,M240

- - Automatic gear range selection 3-92 M40-M240

M41 - M44,M141 - M144,M241 - M244

- - Manual gear range selection 3-93 M41 - M44,M141-M144M241-M244

M48, M148,M248

- - Disengage gear range. 3-94 M48-M248

M5, M105,M205

- - Spindle stop 3-89 M5 - M205

MainSp MSP - Select main spindle, e.g. for G33 and G95 4-80 MAINSP SPF

MSG - - MSG(<Note text>)

Program notes in the user interface.

2-22 (MSG

NUM - - NUM=<Value>

Divides the traversing block into a definednumber of partial paths of equal length.

4-86 - -

O O - O(...) Orientation movement for a tool 4-87 O(...) -

OFFSTOPA - - Channel synchronization command: deletesthe programmed ”AND stop conditions” in thecontrol channel (ASTOPA, BSTOPA,WSTOPA).

2-84

OFFSTOPO - - Channel synchronization command: deletesthe programmed ”OR stop conditions” in thecontrol channel (ASTOPO, BSTOPO,WSTOPO).

2-84

Omega - - Omega address 3-96

P P - Subroutine call(also possible directly, without P)

2-25

Page 557: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-33Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

PmTSel PMS - PMS(<Placement table name>)

Placement table selection

4-103 G22 ID -

PosDepHSOut PHS - PHS(<Mode>,<Distance>,<Duration>)Programmable position-dependent high-speedoutput

4-101 PDHSO -

RedTorque RDT - RDT(<Axis1>,<Axis2>, ...)

Specification of the torque for torque reduction

4-121 G177 -

RemAxis RAX - RAX(...)

remove axis from channel

4-122 G512 FAX

RemLogName RLN - RLN(...)

Remove logical axis name

4-123 G516 -

RemSpindle RSP - RemSpindle (<SysSpNo> | <SysSpName> |<ChanSpName , ...)Remove channel spindles

4-124

REPOSTP - - REPOSTP(<Point>)Asynchronous subroutines: Define point of return to path in asynchronoussubroutine

4-125

ROTAX - - Define the rotary axis for vector orientation 4-87 ROTAX -

S S - S<Number>=<Value>S<Value>Program spindle speed

3-97 S

SelCrdCouple SCC - SCC(SC<Channel>, CL(Q1>,<Z1>,...)):Selective additive coordinate coupling ON

SCC( ): All coordinate couplings OFF

4-132 - -

SetPos SPS - Set program position 4-133 G92 G52

Shift SHT - SHT(X..., Y ..., Z ..., ...) : Contour offset ONSHT( ): Contour offset OFF

4-134 G60/G67 -

Smax SMX - SMX(<Value>)

Maximum speed for the spindle.

4-135 G192 G92

Smin SMN - SMN(<VALUE>)

Minimum speed for the spindle.

4-135 G292 -

SpAdmin SPA - SPA(Si=0|1)

Conditionally release a reserved spindle ortransfer to another channel.

4-136 - -

SpCouple_Wait

SPC_WAIT

- SPC_WAIT(CP=1-4)

Wait for synchronous mode of the specifiedgroup of coupled spindles.

4-143 - -

Page 558: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-34 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

SpCoupleConfig

SPCC - SPCC(CP=1-4, MA=<Master>, Si=1, Sj=1, ...)

Define group of coupled spindles,delete or add following spindles, cancel group of coupled spindles.

4-137 - -

SpCouplePosOffs

SPCP - SPCP(S1=<Displacement>, S2=<Displace-ment>, ...POSVEL<Speed>)

Define angle displacement for the active groupof coupled spindles.

4-140 - -

SpCouplePosOffs_Wait

SPCP_WAIT

- SPCP_WAIT(CP=1-4)

Wait for angle displacement for the pro-grammed group of coupled spindles.

4-141 - -

SpCoupleDist SPCD - SPCD(S1=<Distance>, S2=<Distance>, ...

Define angle distance for groups of coupledspindles.

4-138 - -

SpCoupleErrWin

SPCE - SPCE(S1=<Window>, S2=<Window>, ...)

Define synchronization error window for groupsof coupled spindles.

4-139 - -

SpCouple-SyncWin

SPCS - SPCS(S1=<Window>, S2=<Window>, ...)

Define synchronization error window for groupsof coupled spindles.

4-142 - -

SPG - - SPG<Group>(<Numbers>)SPGALL(0)Define/cancel spindle groups

4-144

SpindleToAxis STA - STA(...)

Switch spindle to axis mode.

4-153

SplineCorne-ring

SCO - SplineCornering(E<Distance>)SplineCornering(L1=<L1>,L2=<L2>)Rounding of corners with splines

4-154

SplineDef SDF - Specify a spline variant. 4-155

Split SPLIT

- Split(<Mode>,<Part length>)

Divides movement blocks into several partialpaths if they exceed a certain length.

4-157

SpMode SPM - SPM(S1=0|1, S2=0|1, ...)

Manually switch spindle drive interface be-tween velocity mode and position mode

4-158

SPV - - SPV [ <Perm.CPL-Var.> = <Simple CPL ex-pression> ]

Channel synchronization command: When theprogram is executed, the permanent CPL vari-able is written.

2-77

Page 559: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-35Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

SPVE - - SPV E[ <Perm.CPL-Var.> = <CPL expression>]

Channel synchronization command: When theprogram is executed, the permanent CPL vari-able is written. The CPL expression can in-clude CPL commands, but is already triggeredduring the block preparation time.

2-77

SSpAdm - - SSpAdm(<SSpNo.> | <SSpName>, <Mode> ,<SSpNo.> | <SSpName>, <Mode> ...)Release/transfer reserved spindle

4-150

SSpAdmOff - - SSpAdmOff(<SSpNo.> | <SSpName>, <Chan-nelNo> , <ChananeNo> ...)SSpAdmOff(<SSpNo.> | <SSpName>)Switch of administration of spindle movementfor specified channels

4-151

SSPG - - SSPG<Group>=<Value>Speed specification for spindle group; also see”S<value>”

3-97 SSPG

SSpGear - - SSpGear(<SSpNo.> | <SSpName>, <Step> ,<SSpNo.> | <SSpName>, <Step> ...)Change gear range

4-149

SSpMax - - SSpMax(<SSpNo.> | <SSpName>, <Speed> ,<SSpNo.> | <SSpName>, <Speed> ...)Limit maximum speed

4-149

SSpMin - - SSpMin(<SSpNo.> | <SSpName>, <Speed> ,<SSpNo.> | <SSpName>, <Speed> ...)Limit minimum speed

4-148

SSpMode - - SSpMode(<SSpNo> | <SSpName>, <Mode> ,<SSpNo.> | <SSpName>, <Mode> ...)Switching of position/speed interface

4-152

SSpMove SSPM

- SSpMove(<SSpNo> | <SSpName>, <Job> ,<SSpNo.> | <SSpName>, <Job> ...)Programming of movements

4-147

SSpOri SSPO

- SSpOri(<SSpNo> | <SSpName>, <Angle> ,<SSpNo.> | <SSpName>, <Angle> ...)Spindle orientation

4-147

SSpSpeed SSPS

- SSpSpeed(<SSpNo> | <SSpName>,<Speed> , <SSpNo.> | <SSpName>,<Speed> ...)Spindle speed programming

4-146

StatToolOri STO - STO(PHI ..., THETA ..., PSI ...)

Static tool orientation

4-159

TappSp TSP - TSP(CAXi, ..., GRPj, ...)

Spindle selection for rigid tapping.

4-166 G532 SPF

TCM( , , ) - - TCM(<xVal>,<yVal>,<zVal>)Traversing in the TCS

4-159

Page 560: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-36 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

TcsDef TCS - Explicitly specify the position of the tool coordi-nate system (implicit tool length correctioncombined with corresponding axis transforma-tion).

4-167 TcsDef -

VirtAxisPos VAP - Sets the axis position of virtual synchronousaxes in the current channel.

4-174 - -

WAIT - - WAIT in NC block (like CPL WAIT) 2-68

WAITA - - WAITA[BITIF(<Parameter>)=<Status>,...,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until all queriedinterface signals exist or until the timeout haselapsed.

2-73 WAITA

WaitAxis WAX - WAX(...)

Wait until the axis is released and then incor-porate it into the channel.

4-175 G511 GAX ?

WAITO - - WAITO[BITIF(<Parameter>)=<Status>,...,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until one of thequeried interface signals exists or until thetimeout has elapsed.

2-73 WAITO

WPV - - WPV[<Perm.CPL-Var.><Compar.op.><Simp.CPL-Expr.>,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until the expres-sion is fulfilled or until the timeout has elapsed.

2-75

WPVE - - WPVE[<Perm.CPL-Var.><Compar.op.><CPL-Expr.>,<Timeout>]

Channel synchronization command: When theprogram is run, a wait occurs until the expres-sion is fulfilled or until the timeout has elapsed.The CPL expression can include CPL com-mands, but is already triggered during theblock preparation time.

2-75

WriteId WID - WID(S-0-0104, X..., Y..., Z..., ...)

Writing SERCOS parameters

4-176 G900 AXD

WSTOPA - - WSTOPA[<Channel No.>,<Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as allthe conditions are fulfilled. The conditions referto the workpiece positions, e.g. ”Z” > 20.

2-82

Page 561: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-37Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

WSTOPO - - WSTOPO[<Channel No.>,<Cond.1>,<Cond.2>...,<Cond.8>...]

Channel synchronization command: The chan-nel to be controlled is stopped as long as oneof the conditions is fulfilled. The conditions re-fer to the workpiece positions, e.g. ”Z” > 20.

2-82

ZoTSel ZOS - ZOS(<ZO name>)

Selection of a zero offset table.

4-179 G22 V O

G140 - 3D radius corr. 3D radius correction OFF 3-79 G141

G141 - 3D radius corr. 3D radius correction to left of contour 3-79 G141

G142 - 3D radius corr. 3D radius correction to right of contour 3-79 G142

G90 - Abs/Rel Absolute dimension programming 3-69 G90 G90

G91 - Abs/Rel Relative dimension programming 3-69 G91 G91

AxAcc AAC Axis accel. AAC(X..., Y..., Z..., ...): switch onAAC(1): switch on with saved settingAAC( ): switch off

Program axis acceleration

4-20 G6/G7 -

AxCouple AXC Axis coupling AXC(<Master>,<Slave1>(...),<Slave2>(...),...):Activate axis coupling

AXC( ) : Deactivate axis coupling

4-22 G590/G591

CoupleSpline-Tab

CST Axis coupling CST(STAB(...))

Generate a spline coupling table

4-38 G582

Coord CRD Axis transfor-mation

CRD(x): Switch axis transformation onCRD( ): Switch axis transformation off

e.g. end surface transformation

4-36 Coord G30ff.

PathAcc PAC Path accel. PAC(ACC... | UP..., DOWN ...) : switch onPAC( ): switch off

Path acceleration programming, either sepa-rately for acceleration and braking or com-bined.

4-99 G106/G107 ACC

G40 - Path compen-sation

Cutter path compensation OFF 3-39 G40 G40

G41 - Path compen-sation

Cutter path compensation to left of workpiece 3-39 G41 G41

G42 - Path compen-sation

Cutter path compensation to right of workpiece 3-39 G42 G42

G08 G8 Path slope Path slope ON with path SHAPE according tomachine parameters

3-21 G08 G08

G08(SHAPE...) - Path slope Path slope ON with programmed path SHAPE 3-23 G108 G08

G09 G9 Path slope Path slop OFF (without SHAPE) 3-21 G09 G09

Page 562: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-38 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G09(..) G9(..) Path slope G9(X..., Y..., ...) Path slope OFF with axis-wise programmedSHAPE arrangement

G9(ASHAPE)Path slope OFF with axis-wise SHAPE ar-rangement according to machine parameters

G9(SHAPE ...)Path slope OFF with programmed path SHAPE

G9(SIN ...)Path slope OFF with sin2-shaped SHAPE (pos-sible SHAPE arrangement: 5, 10, 15, 20, 40)

3-23 G408,G608

G184 - Drilling cycle Drilling cycle: Rigid tapping 3-68 G184

G80 - Drilling cycle Switch off drilling cycle 3-62 G80 -

G81 - Drilling cycle Drilling cycle: Drilling with retraction in rapidtraverse

3-62 G81 DEFINE

G82 - Drilling cycle Drilling cycle: Drilling with retraction in feed 3-63 G82 DEFINE

G83 - Drilling cycle Drilling cycle: Deep hole drilling 3-64 G83 DEFINE

G84 - Drilling cycle Drilling cycle: Floating tapping 3-65 G84 DEFINE

G85 - Drilling cycle Drilling cycle: Drilling out with retraction inrapid traverse

3-66 G85 DEFINE

G86 - Drilling cycle Drilling cycle: Drilling out with retraction in feed 3-67 G86 DEFINE

ABS - CPL ABS(<input value>)

Outputs the input value as an absolute value.

2-61 ABS -

ACOS - CPL <function value> = ACOS(<input value>)

Application of the arc-cosine function on the<input value>.

2-62 ACOS -

ACS - CPL ACS(<axis>[,<selection type>[,<channel>]])Supplies the current command position of anaxis.

5-9

AND - CPL <Expression1> AND <Expression2>

Binary link between two BOOLEAN / INTEGERexpressions

2-63 AND -

APOS - CPL APOS(<axis selection>)

Outputs the current actual axis value, based onthe machine zero point.

5-11 APOS -

ASC - CPL ASC(<Character string>)

Outputs the ordinal number of the first charac-ter (ASCII code) of <character string> as anINTEGER value.

5-109 ASC -

ASIN - CPL <Function value> = ASIN(<Input value>)

Application of the arc-sine function on the <in-put value>.

2-62 ASIN -

Page 563: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-39Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

ATAN - CPL <Function value> = ATAN(<Input value>)

Application of the arc-tan function on the <in-put value>.

2-62 ATAN -

AXO - CPL AXO((<Axis selection>[,<Selection type>])

Transfers an active G92 offset for a coordinate.

5-15 AXO -

AXP - CPL AXP(axis number>,<path information>)

This function permits level-independent partsand measurement programs (program AXP inplace of the address values).

5-54 AXP -

BCD - CPL <BCD value> = BCD(<binary value>)

Convert BCD format to binary format.

2-64 BCD -

BIN - CPL <Binary value> = BIN(<BCD value>)

Convert binary format to BCD format.

2-64 BIN -

BITIF - CPL BITIF(<Bit signal>[,<Index>[,<IF unit>]])

This function permits access to the digital inter-face between the NC and the PLC.

5-55 IC -

CALL - CPL CALL <Program number> [<Transfer parame-ter1>,...] [DIN]

Subroutine call from a CPL program

2-28 CALL -

CASE - CPL CASE <Integer expression> OFLABEL <Int. constant>[,<Additional int.constant>] [: <Instruction>]

<Instruction>LABEL ...OTHERWISE <Instruction>

<Instruction>ENDCASE

Conditional selection from several alternatives.

2-39 CASE -

CHR$ - CPL CHR$(<Integer expression>)

Supplies a character whose ordinal number inthe ASCII table equals the value transferredusing parameter <INTEGER expression>.

5-109 CHR$ -

CLOCK - CPL <Function value> = CLOCK

Query of the time counter in milliseconds.

5-57 CLOCK -

CLOSE - CPL CLOSE(<n>)

Closes an opened file after reading or writingoperations are complete.

5-135 CLOSE -

CLRWARN - CPL Delete all the warnings of a channel that weregenerated with SETWARN.

2-58 - -

COF - CPL COF(<Axis selection>[,<Selection type>])

Supplies the last-programmed contour shift ofa coordinate for the current channel.

5-16 COF -

Page 564: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-40 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

COS - CPL <Function value> = COS(<Input value>)

Cosine function for the <input value>.

2-62 COS -

DATE - CPL <String variable> = DATE

Assigns the date in the form DD.MM to a<STRING variable>.

5-57 DATE -

DBMOVE - CPL DBMOVE(<DbTab>,<SrcKey1>,<SrcKey2>,<DestKey1>,<DestKey2>[,<Mode>])Translation of a data set within a databasetable.

5-33

DBLOAD - CPL DBLOAD(<DbTable>,<Key1>,<Key2>>,<File-name>[,<Mode>])Can read in parts of a database table or acomplete database table from a file into thedatabase.

5-34

DBSAVE - CPL DBSAVE(<DbTab>,<Key1>,<Key2>,<File-Name>[,<Mode>])Via DBSAVE, parts of a database table or acomplete database table can be saved to a file.

5-35

DBSEA - CPL DBSEA(<DbTab>,<Key1>,<Key2>,<Search-Cond>,<SeachRes>[,<ResVar>])

Searches data blocks in a database table.

5-27

DBSEAX - CPL DBSEAX(<DbTable>,<Key1>,<Key2>,<Search-Cond>,<ErgArr>, <ErgSize>)Searches data sets which correspond to thesearch criterium in a tool database table.

5-38

DBTAB - CPL DBTAB(<DbTable>,<Key1>,<Key2>[,<Res-Var>])

Reads a complete data block or a substructureof a database table to a CPL variable or writesback from this variable.

5-26

DBTABX - CPL DBTABX(<DbTable>,<Key1>,<Key2>[,<Mode>])This can read a complete data block or a sub-structure of a tool database table into a CPLvariable or write from the variable back to thedata block.

5-36

DBTABXL - CPL DBTABXL(<DbTable>,<Key1>,<Key2>[,<Mode>])This can read a complete data block or a sub-structure of a tool database table into a CPLvariable or write from the variable back to thedata block.

5-37

DCT - CPL DCT(<Value selection>,<Datablock>[,[<Table>] [,<Unit>]])

Read/write access to any D-correction table orto external tool correction values.

5-25 TC -

Page 565: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-41Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

DIM - CPL DIM <Variable name>(<Field size1>[,<Fieldsize2>])

Specification of the field size (dimensioning) ofARRAY variables with INTEGER constants.

2-52,5-105

DIM -

DIRCR - CPL DIRCR(<Directory>)

Creates a new directory.

5-127

DIRDEL - CPL DIRDEL(<Directory>)

Deletes an empty directory.

5-128

DIRINF - CPL DIRINF(4,[<Index2>],<ResVar>[,<File num-ber])

Calls administration data of the file system.

5-126

DPC - CPL DPC(<Selection>[,<Selection type>])

Supplies the last-programmed parameter ofworkpiece position compensation BcsCorr of acoordinate (offset values and turning angle) forthe current channel.

5-17 DPC -

EOF - CPL EOF(<n>)

Check for end of file.

5-135 EOF -

ERASE - CPL ERASE(<Program ID>)

Deletes files.

5-142 ERASE -

ERRNO - CPL Error return of various CPL functions. 2-55 - -

FALSE - CPL <Boolean variable> = FALSE

Truth value of a BOOLEAN variable

2-51 FALSE -

FILEACCESS - CPL FILEACCESS(<File name>)

Determines whether a file exists and what ac-cess rights it has.

5-143 FILEAC-CESS

-

FILECOPY - CPL Copy files. 5-145 - -

FILEDATE - CPL FILEDATE(<File name>[,<Mode>])

Determines the date/time of a file.

5-144 FILEDATE -

FILENO - CPL Supplies the next valid logical file number. 5-125

FILEPOS - CPL FILEPOS(<n>[,<mode>])

Supplies the record number of the current re-cord and the record offset of a random file.For sequential files, supplies the current byteposition of the file indicator.

5-136 FILEPOS -

FILESIZE - CPL FILESIZE(<n>[,<k>])

Supplies the size of a file or the limit to which afile has already been written.

5-140 FILESIZE -

Page 566: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-42 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

FOR NEXT - CPL FOR <Count.var.>=<Start val> [STEP spac-ing>] TO <End val><Routine>NEXT [<Count.variable>]

Loop construction with automatically updatedcounter.

2-41 FOR NEXT -

GETERR - CPL GETERR(<Channel> [,<Category>],<Er-ror>No> [,<Number>])

Supplies the error No., channel No. and errorcategory for the current errors.

5-58 GETERR -

GOTO - CPL GOTO <Jump target>

Unconditional program jumps to line number,block number or label.

2-36 GOTO -

IF ENDIF - CPL IF <Condition> THEN <Routine> [ELSE <Alter-native routine>] ENDIF

Conditional jump to a routine or alternative rou-tine.

2-38 IF ENDIF -

INP# - CPL INP#(<n>,<Variable>[,<Variable>] [,...] [;])

Read access for a file.

5-133 INP# -

INSTR - CPL INSTR(<Character string>,<String expres-sion>[,<Starting point>])

Searches a <string expression>, starting at<starting point>, for a <character string> andoutputs its starting position as an INTEGERvalue.

5-108 INSTR -

INT - CPL <Integer number>=INT(<Real expression>)

Transforms the <real expression> to an <inte-ger number> by cutting off the numbers afterthe decimal point.

2-61 INT -

LEN - CPL LEN(<String expression>)

Supplies the number of characters in aSTRING expression.

5-108 LEN -

LJUST - CPL Switch to left-justified data output; effectiveuntil the end of the program run.

5-129 LJUST -

MCA - CPL MCA(<Block>,<Index>[,<Channel>])Transfers the contents of a MACODA individ-ual parameter.

5-40

MCODS - CPL MCODS(<Type>,<Channel>,<Ver-sion>,<Buffer>,<Size>[,<P1>])

Calls Motion Control data services of the NCS.This allows the data and states to be read fromthe NC.

5-63 MCODS -

Page 567: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-43Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

MCOPS - CPL MCOPS(<Fct>,<Channel>[[,[<P1>][,[<P2>],[<P3>]]],<P4>]))

Calls Motion Control process services of theNCS. This allows channels in the NC to becontrolled.

5-93 MCOPS -

MCS - CPL MCS(<Coordinate>[,<Selection type>[,<Chan-nel>]])Supplies the current machine position (MCS)for a machine coordinate without straightnessand angle error compensation.

5-8

MID$ - CPL MID$(<String expression>,<Starting point>[,<No. of characters>])Takes a part of the STRING expression andoutputs it as text. The result can be transferredto a STRING variable or to an appropriatelysized character field.

MID$(<Character field>,<Starting point>[,<No.of characters>])Overwrites portions of a character field.

5-106 MID$ -

MMC - CPL MMC(<CPL-Var1>[,<CPL-Var2>...[,<CPL-VarN>]...])

Sends information regarding the program run-ning time from a subroutine to a client andwaits for the result from this client.

5-146 MMC -

NCF - CPL NCF(<NC function>)

Transfers the syntax of the active NC functionwithin the NC modal group of <NC function>.

5-41 NCF -

NJUST - CPL Premature reset from left-justified data outputto formatted output.

5-129 NJUST -

NOT - CPL NOT <Expression>

Negation of a BOOLEAN expression / bitwisenegation of an INTEGER expression.

2-63 NOT -

NUL - CPL <Variable> = NUL

Delete a variable.

2-60 NUL -

OPENR - CPL OPENR(<n>,<Prog.name>[,<Record length>])

Opens a file so that it can be read.

5-123 OPENR -

OPENW - CPL OPENW(<n>,<Prog.name>[.<Length>][,<Prog.comment>][,<Record length>])

Opens a file so that it can be written.

5-123 OPENW -

OR - CPL <Expression> OR <Expression>

Binary link between two BOOLEAN / INTEGERexpressions using the OR function.

2-63 OR -

PCS - CPL PCS(<Coordinate>[,<Selection type>])

Supplies the last-programmed absolute posi-tion of a coordinate.

5-6 CPOS -

Page 568: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-44 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

PCSPROBE - CPL PCSPROBE(<Coordinate>[,<Selection type>])

Reads the measured value for a coordinate.

5-12 PCSPROBE

-

PDIM - CPL PDIM <Parameter name>(<Field size>)

This must be used if a subroutine

D is to be called using a string constant as atransfer parameter and

D the calling program is selected withoutlinks.

2-30 PDIM -

PLC - CPL PLC(<Type>,<empty param.>,<Ad-dress>,<Size>)This function permits access to the operandsof the PLC.

5-56

PMT - CPL PMT(<Coord.selec-tion>,<Pl.code>[,[<Pl.page>][,[<Table>][,<Unit>]]])

Read and write access to an XML placementtable.

5-30 -

PMV - CPL PMV(<Coord.selection>[,<Pl. page>])

Supplies the effective placement value for acoordinate.

5-29 -

PPOS - CPL PPOS(<Axis selection>[,<Axis type>])

Queries the actual axis position for the switch-ing time of the probe.

5-14 PPOS -

PRN# - CPL PRN#(<n>,[<Expression>][,<Expression][,<Ex-pression>][,...][;])

Write access for a file.

5-129 PRN# -

PROBE - CPL PROBE(<Axis selection>[,<Axis type>])

Queries the axis position for the switching timeof the probe, based on the axis zero pointcoordinates of the MCS.

5-13 PROBE -

REM - CPL REM <Comment text>

Program comments.

2-21 REM -

REPEAT - CPL REPEAT <Routine> UNTIL <Condition>

Loop construction with query of the cancella-tion condition after the routine has been pro-cessed the first time.

2-42 REPEAT -

REWRITE - CPL REWRITE(<n>)

Overwrite an existing file.

5-132 REWRITE -

ROUND - CPL <Integer number>=ROUND(<Real expres-sion>)

Transform a REAL expression to an INTEGERnumber by rounding up or down.

2-62 Round -

Page 569: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-45Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

SCL - CPL SCL(<SCL selection>[,<Selection>[,<Selectiontype>]])

Supplies the last-programmed parameter offunctions PLS and ROT (polar coordinates,scaling factors and turning angle) for the cur-rent channel.

5-39 SCL -

SCS - CPL SCS(<Axis index>,<ID type>,<ID No>[,<Res-Var>])

Read access to SERCOS drive parameters ofthe active parameter set.

5-42 SCS -

SCSL - CPL SCSL(<Axis index>,<ID type>,<ID No>,<Filename>[,<ResVar>])

Create a file for SERCOS parameter lists.

5-43 SCSL -

SD - CPL SD(<Group>[,<Index1>[,<Index2>[,<In-dex3>]]])

Read active system data of the NC control.

5-44 SD -

SDR - CPL SDR(<Group>[,<Index1>[,<Index2>]])

Read active system data of the NC control inREAL format.

5-51 SDR -

SEEK - CPL SEEK(<n>,<k>[,<o>])

Positions the file indicator on the <k>-th recordof a random file or on the <k>-th byte of a se-quential file.

5-138 SEEK -

SETERR - CPL Generate a runtime error after evaluatingERRNO.

2-57 - -

SETWARN - CPL Generate a warning after evaluating ERRNO. 2-58 - -

SIN - CPL <Function value> = SIN(<Input value>)

Use the sine function for the input value.

2-62 SIN -

SPOS - CPL SPOS(<Axis selection>)

Transfers the current axis command value of aphysical axis.

5-10 SPOS -

SQRT - CPL <Function value> = SQRT(<Input value>)

Use the square root function on the <inputvalue>.

2-62 SQRT -

STR$ - CPL STR$([<Format string>,]<Value>)

Converts numeric expression <Value> into acharacter string that can be assigned to onlyone character field.<Format string> can be used to output thecharacter string in formatted form.

5-110 STR$ -

TAN - CPL <Function value> = TAN(<Input value>)

Use the tangent function on the <input value>.

2-62 TAN -

Page 570: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-46 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

TCV - CPL TCV(<Value selection>[,<Correction selec-tion>])

Supplies the last-programmed tool correctionvalues.

5-24 TC -

TIME - CPL <String variable> = TIME

Assigns the time to a STRING variable in theform HH.MM.SS.

5-57 TIME -

TRIM$ - CPL TRIM$(<Character string>)TRIM$(<Character string>,”L”)TRIM$(<Character string>,”R”)

In the assignment of a character field range toa STRING variable or a character field, sup-plies a character string without a preceding(index ”L”) or following (index ”R”) space. Ifthere is no index, both preceding and followingspaces are hidden.

5-112 TRIM$ -

TRUE - CPL <Boolean variable> = TRUE

Truth value of a BOOLEAN variable

2-51 TRUE -

VAL - CPL VAL(<String expression>)

Returns the numeric value of the STRING ex-pression.

5-111 VAL -

VERSINF$ - CPL VERSINF$(<Index1>[,<Index2>])

Calls administration data, e.g. the software ver-sion.

5-126

WAIT - CPL WAIT(no parameter)Stops block preparation until all the blocks pro-grammed before WAIT have been processed.

WAIT(,<Waiting time>)Stops block processing until a specified periodhas elapsed.

WAIT(BITIF(...))Stops block processing until a certain statusoccurs on the PLC-NC bit interface.

2-68 WAIT -

WCS - CPL WCS(<Coordinate>[,<Selection type>[,<Chan-nel>]])Supplies the current workpiece position, with-out online compensation values, for a coordi-nate.

5-7

WHILE - CPL WHILE <Condition> DO <Routine> END

Loop construction with query of the cancella-tion condition before the loop is processed thefirst time.

2-43 WHILE -

XOR - CPL <Expression> XOR <Expression>

Binary link between two BOOLEAN / INTEGERexpressions using the EXCLUSIVE-OR func-tion.

2-63 XOR -

Page 571: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-47Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

XTAB - CPL XTAB(<Table>,<Substructure>)

Read/write access to any XML table which canalso be user-defined.

5-32 TDA -

XTABCR - CPL XTABCR(<Table>,<Type>[,<Table layout>])Creates an XML table with no data within theMTX file system.

5-32

ZOCDEL - CPL ZOCDEL(<Table>,<Position>[,<Channel>])Deletes an axis in an XML zero offset table

5-22

ZOCINS - CPL ZOCINS(<Table>,<Position>,<Axis-Name>[,[<AxisType>][,[<AxisChannel>][,<Pos-Channel>]]])Inserts a new axis in front of an existing col-umn in an XML zero offset table.

5-21

ZOT - CPL ZOT(<Column selection>,<ZO code>[,[<ZOpage>][,[<Table>][,<Unit>]]])

Read/write access to any XML zero offsettable.

5-18 FXC -

ZOTCR - CPL ZOTCR(<Table>,<Channel/Template>)Creates an XML zero offset table with nocorrection records within the MTX file system.

5-20

ZOV - CPL ZOV(<Axis selection>[.<ZO page>])

Supplies the effective ZO values for an axis /machine coordinate.

5-18 FXC -

D D D-correction Dx: Activate D-correction (1-99 tools)D0: Cancel the D correction.

3-99 G147 -G847,G148

DiaProg DIA Diam./Rad. Diameter programming 4-42 DIA G16

RadProg RAD Diam./Rad. Radius programming 4-42 RAD G15

G16 - Plane selec-tion

no plane 3-27 G16 -

G17 - Plane selec-tion

Plane selection XY 3-28 G17/G20 G17/G20

G17(...),G18(...),G19(...)

- Plane selec-tion

Expanded plane switching

G17/18/19( <Axis1>,<Axis2>,<Axis3>)The axes in parentheses open the WCS andreceive the meaning X, Y and Z. Then the programmed plane is selected.

G17/18/19( )Reset the workpiece coordinate system to thedefault setting and then select the programmedplane.

3-30 - -

G18 - Plane selec-tion

Plane selection ZX 3-28 G18/G20 G18/G21

G19 - Plane selec-tion

Plane selection YZ 3-28 G19/G20 G19/G22

Page 572: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-48 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G20 - Plane selec-tion

Free plane selection (WCS-independent)

The placements have an effect on the WCS;the plane is defined regardless of the WCS.

3-32 - -

SD SD ED-correction ED x: Activation of external tool compensation (1-16 tools / tool edges)

ED0: Deactivation of external tool compensation

3-100 G145 -G845,G146

G43 - Insertion stra-tegy

Insertion strategy, arc 3-41 G68 G43

G44 - Insertion stra-tegy

Insertion strategy, intersection 3-41 G69 G44

ChLength CHL Cham./Round. CHL(<Chamfer length>): switch onCHL( ): switch off

Insert transitional chamfers with defined cham-fer length.

4-31 G234/G35 -

ChSection CHS Cham./Round. CHS(<Chamfer section>): switch onCHS( ): switch off

Insert transitional chamfers with defined cham-fer section.

4-31 G234/G35 -

RoundEps RNE Cham./Round. RNE<Value> Rounding ONRNE( ): Rounding OFF

Rounding with defined contour shift.

4-128 G34/G35 -

Rounding RND Cham./Round. RND(<Value>): Rounding ONRND( ): Rounding OFF

Rounding with defined rounding radius

4-129 G134/G35 -

FlyMeas FME Measurementon-the-fly

FME(MpiAxis< i>) X... Y... Z...

Movement with on-the-fly measurement

4-51 G275 -

G61 Precise stop Precise stop 3-49 G61/G161 G61

G61(IPS...) - Precise stop Precise stop with precise stop window IPS1,IPS2 or IPS3

3-49 G61/G161 G61

G62 - Precise stop Precise stop off 3-49 G62/G162 G62

PrecProg PRP Precisioncheck

PRP(DIST... | EPS...) : Precision check ONPRP( ): Precision check OFF

4-113 G328/G329 -

G45 - Velocity, mil-ling machine

Velocity, milling machine point of engagement 3-43 G64 G99

G46 - Velocity, mil-ling machine

Velocity, milling machine center 3-43 G65 G98

G33 - Thread Thread cutting 3-33 G33 G33

G63 - Thread G63(M3/M4, S.../H...) F... Z... ...

Rigid tapping

3-51 G32 G63/G64

ThreadSet TST Thread Thread cutting, auxiliary functions 4-170

Page 573: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-49Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G70 - Inch/metric Inch programming,affects the programmed path and length units,feeds and acceleration.

3-53 G70 G70

G71 - Inch/metric Metric programming 3-54 G71 G71

G00 G0 Interpolation Linear interpolation (rapid travel) 3-3 G00/G10 G00

G00(..) G0(..) Interpolation Rapid travel with options

Optional parametersNIPS: without precise stopIPS1: Precise stop window 1IPS2: Precise stop window 2IPS3: Precise stop window 3 (only braking to

V=0)POL/POLAR: with polar coordinate program-ming, e.g. G0(POL) X50 A45 B10, with A, B =polar angle 1/2

3-3

G01 G1 Interpolation Linear interpolation (feed) 3-5 G01/G11 G01

G02 G2 Interpolation Circular interpolation, clockwise(incl. helical N)

3-7 G02/G12 G02

G02(POL) G2(..) Interpolation Circular interpolation, clockwise(incl. helical N) with polar coordinate program-ming

3-11 G02/G12 G02

G03 G3 Interpolation Circular interpolation, counterclockwise(incl. helical N)

3-7 G03/G13 G03

G03(POL) G3(..) Interpolation Circular interpolation, counterclockwise(incl. helical N) with polar coordinate program-ming

3-11 G02/G12 G02

G05 G5 Interpolation Tangential circle entry (incl. helical N) 3-13 G05 -

G06 G6 Interpolation Splines, nurbs 3-14 G99 -

Collision CLN Collision moni-tor

CLN(1): switch onCLN(CollErr..| LA... | DLA... | DEF) :

Switch on with parameter settingCLN( ): switch off

Collision monitor for 2D cutter path compensa-tion.

4-33

KvProg KVP CO progr. KVP(Y..., Y..., Z..., ...): CO programming ONKVP( ): CO programming OFF

4-70 G14/G15 AXD

G75 - Probe Traverse to probe (cancel movement) 3-57 G75 -

G53 - ZO All zero offsets OFF 3-46 -

G54.1 G54 ZO page 1 1. zero offset, page 1 ON 3-46 G54-G254

G55.1 G55 ZO page 1 2. zero offset, page 1 ON 3-46 G54-G254

G56.1 G56 ZO page 1 3. zero offset, page 1 ON 3-46 G54-G254

G57.1 G57 ZO page 1 4. zero offset, page 1 ON 3-46 G54-G254

Page 574: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-50 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G58.1 G58 ZO page 1 5. zero offset, page 1 ON 3-46 G54-G254

G59.1 G59 ZO page 1 6. zero offset, page 1 ON 3-46 G54-G254

G53.1-G53.5 - ZO page 1-5 Zero offset page 1-5 OFF 3-46 G53-G253

G54.2-G54.5 - ZO page 2-5 1. zero offset, page 2-5 ON 3-46 G54-G254

G55.2-G55.5 - ZO page 2-5 2. zero offset, page 2-5 ON 3-46 G55-G255

G56.2-G56.5 - ZO page 2-5 3. zero offset, page 2-5 ON 3-46 G56-G256

G57.2-G57.5 - ZO page 2-5 4. zero offset, page 2-5 ON 3-46 G57-G257

G58.2-G58.5 - ZO page 2-5 5. zero offset, page 2-5 ON 3-46 G58-G258

G59.2-G59.5 - ZO page 2-5 6. zero offset, page 2-5 ON 3-46 G59-G259

PoleSet PLS Set pole PLS(X..., Y..., Z...): Set polePLS( ): Pole at origin

Pole for help in making mirroring/rotation en-tries.

4-109 G37/G39

PolarPol POP PolarPol POP(X...,Y...,Z...): Set polePOP( ): Pole at origin

Pole for polar coordinate programming.

4-104 -

PosMode PMD Positioningtype

PMD(A..., B...) : switch positioning typePMD( ): Positioning type acc. to machine pa-rameters

Positioning type for endless axes

4-110 G151/G150 G36ff.

ATrans ATR Program coor-dinate offset

ATR(X..., Y..., Z..., ...): Additive program coordi-nate offset ON

ATR( ): Additive program coordinate offset OFF

4-172

Trans TRS Program coor-dinate offset

TRS( X ..., Y ..., Z ..., ...) : Program coordinateoffset ONTRS( ): Program coordinate offset OFF

4-172 G60/G67

G153 - SE Placement: Inclined plane, all OFF 3-83,3-83

-

G152.1 G152 IP page 1 Placement: Inclined plane, programmable,page 1

3-83 G352

G154.1 G154 IP page 1 Placement: 1. inclined plane, page 1 ON 3-83 G354

G155.1 G155 IP page 1 Placement: 2. inclined plane, page 1 ON 3-83 G355

G156.1 G156 IP page 1 Placement: 3. inclined plane, page 1 ON 3-83 G356

G157.1 G157 IP page 1 Placement: 4. inclined plane, page 1 ON 3-83 G357

G158.1 G158 IP page 1 Placement: 5. inclined plane, page 1 ON 3-83 G358

G159.1 G159 IP page 1 Placement: 6. inclined plane, page 1 ON 3-83 G359

G153.1-G153.5 - IP page 1-5 Placement: Inclined plane page 1-5 OFF 3-83,3-83

G353

Page 575: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-51Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

G152.2-G152.5 - IP page 2-5 Placement: Inclined plane, programmable,page 2-5

3-83 G452

G154.2-G154.5 - IP page 2-5 Placement: 1. inclined plane, page 2-5 ON 3-83 G454/G554

G155.2-G155.5 - IP page 2-5 Placement: 2. inclined plane, page 2-5 ON 3-83 G455/G555

G156.2-G156.5 - IP page 2-5 Placement: 3. inclined plane, page 2-5 ON 3-83 G456/G556

G157.2-G157.5 - IP page 2-5 Placement: 4. inclined plane, page 2-5 ON 3-83 G457/G557

G158.2-G158.5 - IP page 2-5 Placement: 5. inclined plane, page 2-5 ON 3-83 G458/G558

G159.2-G159.5 - IP page 2-5 Placement: 5. inclined plane, page 2-5 ON 3-83 G459/G559

Scale SCL Scaling SCL(X..., Y..., Z..., ...): Coordinate scaling ONSCL( ): Coordinate scaling OFF

4-130 G38/G39 G78/G79

Mirror MIR Mirror MIR(X1, Y1,Z1,...): Mirroring of coordinates ON

MIR( ): Mirroring of coordinates OFF

4-81 G38/G39

G96 - Spindle prog. G96(<Reference axis>,<Point of action>)Constant cutting speed

3-75 G96/G196 G96

G97 - Spindle prog. Direct speed programming 3-75 G97 G97

Nibble NIB Punch NIB( NUM...): Nibble processing ONNIB( ): Nibble processing OFF

4-84 G662/G660 -

Punch PUN Punch PUN( NUM...): Punch processing ONPUN( ): Punch processing OFF

4-119 G661/G660 -

PtBlkEnd PTE Punchingstroke

PTE(X..., Y..., Z..., ...)

Stroke trigger at end of block

4-115 G612 -

PtDefault PTD Punchingstroke

Stroke trigger according to parameters 4-117 G610 -

PtInpos PTI Punchingstroke

PTI(X..., Y..., Z..., ...)

Stroke trigger at Inpos (Pt = punch time)

4-118 G611 -

TangToolOri TTO Tangential toolorient.

TTO(SYM..., ANG...): Tangential tool orienta-tion ONTTO( ): Tangential tool orientation OFF

4-164 G630/G631 -

DefTangTrans DTT Transitionangle

DTT(<Transition angle>): ActivateDTT( ): Deactivate

Definition of tangential contour transition

4-41 G228 -

ConstFeed CFD V profile Constant velocity 4-76 G310 -

LinDownFeed LND V profile Linear braking 4-77 G312 -

LinUpFeed LNU V profile Linear acceleration 4-76 G311 -

Sin2DownFeed S2D V profile Sin2-shaped braking 4-77 G316 -

Sin2UpFeed S2U V profile Sin2-shaped acceleration 4-76 G315 -

SinDownFeed SND V profile Sin-shaped braking 4-77 G314 -

Page 576: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-52 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Function inPNC MTC

PageDesignation / ExplanationGroup(”-” means:

activeblockwise)

NC function nameLong form Shortform

SinUpFeed SNU V profile Sin-shaped acceleration 4-76 G313 -

Rotate RED Rotate ROT(<Angle>): Coordinate rotation ONROT( ): Coordinate rotation OFF

4-126 G38/G39

OvrDis OVD Feed 100% Feed potentiometer OFF 4-98 G63 -

OvrEna OVE Feed 100% Feed potentiometer ON 4-98 G66 -

FeedAd FAD Feed advance FAD(1) : remove axis from feeddisplay

FAD( ): Axis contained in feed display

4-48 G594/G595

G93 - Feed prog. time programming 3-70 G93 G93

G94 - Feed prog. Feed programming (per min) 3-71 G94 G94

G94(...) - Feed prog. G94(DF <Value>, DS1 <Value>, DS2<Value>, ... )

Incremental velocity programming with accel-eration adaptation.

3-72 G94 G94

G95 - Feed prog. Feed programming (per rotation) 3-74 G95 G95

FeedForward FFW Feed forwardcontrol

FFW(X..., Y..., Z..., ...): switch onFFW( ): switch off

Activate servo control

4-49 G114/G115 G6/G7

BcsCorr BCR Tool lengthcomp.

BCR(<XW-Offset>,<YW-Offset>,<ZW-Offset>,<Angle1> ,<Angle2>,<Angle3>) : switch onBCR( ): switch off

Placement: Tool position compensation.

4-29 G138/G139 -

G47 - Tool correction Switch on tool length correction 3-44 G146/8 G47

G47(..) - Tool correction G47(<L1 coord>,<L2 coord>,<L3 coord>)G47(ActPlane)Tool length correction ON with switching ofcorrection assignment.

G47( ): Tool length correction ON with correc-tion assignment according to machine parame-ters.

3-44 G146/8 G47

G48 - Tool correction Tool length correction OFF 3-44 G145/7ff. G48/G49

TangTool TTL Tool orient. TTL(TAX..., SYM..., ANG..., IA..., PLC...): Tangential tool guidance ON

TTL( ): Tangential tool guidance OFF

4-161 G131/G130 -

Page 577: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-53Bosch Rexroth AGIndraMotion MTXR911314869 / 01

A.3 ASCII Character Set

Dec. Hex ASCII

012345678910111213141516171819202122232425262728293031

000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F

NULSOHSTXETXEOTENQACKBELBSHTLFVTFFCRSOSIDLEDC1DC2DC3DC4NAKSYNETBCANEMSUBESCFSGSRSUS

3233343536373839404142434445464748495051525354555657585960616263

202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F

SP!"#$%&’()*+,_

./0123456789:;<=>?

6465666768697071727374757677787980818283848586878889909192939495

404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F

ABCDEFGHIJKLMNOPQRSTUVWXYZ

96979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127

606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F

‘abcd

fghijklmnopqrstuvwxyz

DEL

e

Dec. Hex ASCII Dec. Hex ASCII Dec. Hex ASCII

(!_!)(! )

:!!!Characters!that!are!skipped!by!default!when!they!are!read!in.

@

[

]\ I

~

A.4 Additional Key Codes

Key code (dec.) Meaning

134135136137

139

141142143144145146147148

CURSOR UPCURSOR DOWNCURSOR RIGHTCURSOR LEFT

PLANE RETURN

SOFTKEY1SOFTKEY2SOFTKEY3SOFTKEY4SOFTKEY5SOFTKEY6SOFTKEY7SOFTKEY8

Page 578: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-54 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

A.5 Index

Characters; (Start remark), 2-20( (Start remark), 2-20) (End remark), 2-20$ (channel designation), 2-19/ (Skip block), 2-37// (Start remark), 2-20| (separator for alternative parameters), 2-10, 3-2,

4-1\\ (End remark), 2-20

Numbers3D tool radius compensation, 3-79

AAAC, 4-20AAS, 4-20ABS, 2-61Absolute dimension programming, 3-69

local, 3-69AC (Local absolute dimension programming), 3-69Acceleration

axis, 4-20path, 4-99

Acceleration interpolators, 4-76Access privileges to files, 2-1ACOS, 2-62ACS, 5-9Activate D-correction tables, 4-39Activate tables, 4-39, 4-179

Placement tables, 4-103Activate zero offset tables, 4-179Additional conditions, 2-8ALN, 4-10AND, 2-63Angle brackets, 2-10Angular offset while coupling is active, 4-140Angular offset, wait for, 4-141APOS, 5-11ARA, 4-2Arc (contour transition), 3-41Area, 4-2area monitoring, 4-2ARRAY, 2-52ASC, 5-109ASIN, 2-62AssLogName, 4-10ASTOPA / ASTOPO, Channel synchronization by mo-

vement stop, 2-78Asynchronous axes, velocity, 3-96ATAN, 2-62

ATBWD, 4-11ATCAL, 4-12ATFWD, 4-14ATGET, 4-15ATPUT, 4-17ATrans, 4-173ATS, 4-26, 4-173Attributes, 2-14AxAcc, 4-20AxAccSave, 4-20AXC, 4-23AxCouple, 4-23Axis acceleration

change, 4-20save, 4-20

Axis addresses, 2-15variable, 5-54

Axis coupling, 4-22Axis designation, 2-15Axis distance control for digitizing, 4-44Axis name, 2-15Axis positions, reading, 5-4

Overview, 5-2Axis transfer

area monitoring, 4-3Assign logical axis name, 4-10Integrate axis, 4-58remove an axis from an axis group, 4-122Remove logical axis name., 4-123switch off C-axis mode, 4-26switch spindle to C-axis mode, 4-153Transfer axis, wait if necessary, 4-175Transfer default axis setting from MP, 4-40

AxisToSpindle, 4-26AXO, 5-15AXP, 5-54

BBackwards jump, 2-33Backwards transformation, 4-11BCD, 2-64BCR, 4-30BcsCorr, 4-30BIN, 2-64BITIF, 5-55Blank lines, 2-7, 2-20BlkNmb, 2-71Block duration, 3-70Block execution, DIN - CPL differences, 2-4

Page 579: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-55Bosch Rexroth AGIndraMotion MTXR911314869 / 01

Block numberBlock preparation limit, 2-71N instruction, 2-19

Block preparation limit: Block number, 2-71Block transition using high-speed signal

Block transition on-the-fly, 4-59, 4-61Block transition with cancellation, 4-64

Block Transition without Deceleration, 4-41BNB, 2-71BOOLEAN, 2-47, 2-51Brackets

angle, 2-10, 3-2, 4-1curly, 2-10, 3-2, 4-1square, 2-3

Braking interpolators, 4-77Branch instructions, 2-23, 2-37BSTOPA / BSTOPO, Channel synchronization by mo-

vement stop, 2-80

CCalibration of axis kinematics

Backwards transformation, 4-11Forwards transformation, 4-14optimize parameters, 4-12read parameter from NC, 4-15write parameter to NC, 4-17

CALL, 2-28CASE-LABEL...LABEL-OTHERWISE-ENDCASE,

2-39Center point programming, 3-10CFD, 4-77Chamfer length, 4-31Chamfer programming, 4-31Chamfer segment, 4-31Change the path acceleration, 4-99Channel designation, 2-19CHARACTER, 2-47, 2-53Character fields, dimensioning, 5-105Character string, 5-105

length, 5-108modifying, 5-107reading, 5-106searching, 5-108

Character string constant, 2-66Character strings and numbers, 5-109CHL, 4-32ChLength, 4-32CHR$, 5-109CHS, 4-32ChSection, 4-32Circle with tangential entry, 3-13Circular/helical interpolation, 3-7CLN, 4-34CLOCK, 5-57

CLOSE, 5-135CLRWARN, 2-58CO programming, 4-70Code characters, 2-66Coefficient programming, Spline, 3-15COF, 5-16COFFS, 3-80Collision, 4-33Collision monitor, 4-33Communication, 5-146Comparison operations, 2-64Compensation switching G78, G79, 3-60Components sensitive to electrostatic discharge, 1-7Conditional jump, 2-34Constant cutting speed, 3-75Constant speed interpolator, 4-76Constants, 2-65

double-precision, 2-65ConstFeed, 4-77Contour error, 4-113Contour offsets, 5-16Contour shift, programmed, 4-134Contour transitions for cutter path compensation,

3-41Conversion, numeric systems, 2-64Coolant ON, 3-87, 3-88Coord, 4-37Coordinate coupling, in same channel, 4-46Coordinate designator, 2-15Coordinate name, 2-15Coordinate positions, reading, 5-4

Overview, 5-2Correcting the tool length, 3-44COS, 2-62Coupled groups: defining, activating, canceling, deac-

tivating, 4-137CoupleSplineTab, 4-38coupling lag of following spindle, 4-138CPL instructions, 2-3, 2-60CPL jump, 2-36CPL programming, 2-2CRD, 4-37, 4-38Create channel spindles, 4-60CSE, 1-7Curly brackets, 2-10Cutter center point (feedrate compensation), 3-43Cutter contact point (feedrate compensation), 3-43Cutter path compensation, 3-39

contour transitions, 3-41feedrate compensation, 3-43

Cutting speed, constant, 3-75

DD-correction, 3-99

Page 580: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-56 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

DATE, 5-57DAX, 4-40, 4-41DBSEA, 5-27DBTAB, 5-26DCA, 4-44DcAxis, 4-44DCB, 4-45DcBreak, 4-45DCC, 4-45DcCont, 4-45DCF, 4-44DcFilter, 4-44DCL, 4-45DcLimit, 4-45DCM, 4-45DcMon, 4-45DCR, 4-44DCS, 4-39DCT, 5-25DcTSel, 4-39Deactivate plane, 3-27Decision instructions, 2-23, 2-37DefAxis, 4-40, 4-41Define mirroring point, 4-109Define rotation point, 4-109Definition of spline type, 4-155DIA, 4-42Diameter programming, 4-42Digitizing, axis distance control, 4-44DIM, 5-105DIRCR, 5-127DIRDEL, 5-128Direct speed programming, 3-75DIRINF, 5-126DistCtrl, 4-44Divide traversing block

general information, 4-157length of partial path, 4-72number of partial paths, 4-86

DN, 3-15DOUBLE, 2-47, 2-51DPC, 5-17Drives, virtual, 4-174Dwell time, 3-12

EEBC, 3-18ED-correction, 3-100EMC Directive, 1-1EMERGENCY STOP devices, 1-6End of main program, 3-86End of program, 2-16, 3-86End of subroutine, 2-16

End position coupling, 4-46Endless axes, switch positioning type, 4-110EndPosCouple, 4-46EOF, 5-135ERASE, 5-142ERRNO, 2-55Error return values, 5-61Errors and error categories, 5-58ESD

protection, 1-7workplace, 1-7

FF-address, 3-95F-word, 3-95F-word (feed)

per min., 3-71per rot., 3-74

F-word (time), 3-70FA address, 3-96FA word, 3-96FAD, 4-48Feed 100%, 4-98Feed forward control, 4-49Feed programming

incremental, 3-72per min, 3-71per rot., 3-74

FeedAd, 4-48FeedForward, 4-49Feedrate, 3-5, 3-96

F-address, 3-95synchronous axes, 3-95

Feedrate compensation for cutter path compensation,3-43

Feedrate computing, hide axes, 4-48FFW, 4-49Field variable, 2-52File

closing, 5-135copy, 5-145describing, 5-129determine access rights, 5-143determine date, 5-144determining size, 5-140erasing, 5-142name, 5-121pointer position, 5-136opening, 5-122reading, 5-133recognition of end, 5-135setting pointer, 5-138

File processing, 5-121

Page 581: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-57Bosch Rexroth AGIndraMotion MTXR911314869 / 01

File structurerandom, 5-122sequential, 5-122

File system and file protection, 2-1FILEACCESS, 5-143FILECOPY, 5-145FILEDATE, 5-144FILENO, 5-125FILEPOS, 5-136FILESIZE, 5-140Fixed stop

measuring at, 4-53move to, 4-55

FlyMeas, 4-51FME, 4-51Following distance, 3-3, 3-49Following error, 3-49Following spindle

changing the angular offset while coupling is ac-tive, 4-140

coupling lag, 4-138FOR - STEP - TO - NEXT, 2-41Forwards jump, 2-32Forwards transformation, 4-14Free plane selection, 3-32FSM, 4-56FsMove, 4-56FSP, 4-53FsProbe, 4-53FSR, 4-56FsReset, 4-56FST, 4-56FsTorque, 4-56Function overview, MCODS, 5-64Functions, for NCS coupling, 5-63

GG0, 3-3G1, 3-5G2, 3-9, 3-10G3, 3-9, 3-10G4, 3-12G140, 3-80G141, 3-80G142, 3-80G152, 3-83G153, 3-83, 3-84G154, 3-83G155, 3-83G156, 3-83G157, 3-83G158, 3-83G159, 3-84G16, 3-27

G17, 3-28G17(...), 3-30G18, 3-28G18(...), 3-30G184, 3-68G19, 3-28G19(...), 3-30G20, 3-32G33, 3-34G40, 3-39G41, 3-39G42, 3-39G43, 3-42G44, 3-42G45, 3-43G46, 3-43G47, 3-44G48, 3-44G5, 3-13G53 to G59.5, 3-47G53-G59, 3-46G6, 3-15G61, 3-49G62, 3-49G63, 3-51G70, 3-53G71, 3-54G74, 3-55G74(HOME), 3-56G75, 3-57G76, 3-58G8, 3-22G80, 3-62G81, 3-62G82, 3-63G83, 3-64G84, 3-65G85, 3-66G86, 3-67G9, 3-22G90, 3-69G91, 3-69G93, 3-70G94, 3-71G94(...), 3-72G95, 3-74G96, 3-77G97, 3-77GAX, 4-58GetAxis, 4-58GETERR, 5-58GOA, 2-32GoAhead, 2-32GOB, 2-33

Page 582: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-58 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

GoBack, 2-33GOC, 2-34GoCond, 2-34GOTO, 2-36GoTo, 2-35Grounding bracelet, 1-7Groups of variables, 2-45

HHelical interpolation, 3-7High-speed output, position-dependent, 4-101High-speed signal, block transition with cancellation,

4-64High-speed signal, on-the-fly block transition, 4-59,

4-61HSB, 4-61, 4-64HsBlkSwitch, 4-61HWOC, 4-66HWOCDEL, 4-66HWOCOFF, 4-66

IIC (Local relative dimension programming), 3-69IF - THEN - ELSE - ENDIF, 2-38IME, 4-68Inch programming, 3-53Inclined plane, 3-81, 5-29Incremental data input programming, 3-69Incremental programming, 3-69Incremental speed programming, 3-72InitMeas, 4-68INP#, 5-133INSDEP, 3-80INSTR, 5-108Instruction words, reserved, 2-59Instructions, 2-8Instructions (CPL), 2-60INT, 2-61INTEGER, 2-51, 2-65Integrate axis, 4-58Interpolation parameters, 3-29Interpolator

Acceleration, 4-76braking, 4-77constant speed, 4-76

Intersection (contour transition), 3-41IPS, 3-4, 3-5IPS1, 3-4, 3-5, 3-50IPS2, 3-4, 3-6, 3-50IPS3, 3-4, 3-6, 3-50

JJogging in workpiece coordinates, 4-69JogWCSSelect, 4-69

Jolt, 3-26Jolt-limited speed guidance, 3-23

for contour mode, 3-24for positioning mode, 3-24

Jumpbackwards, 2-33conditional, 2-34forwards, 2-32unconditional, 2-35unconditional with CPL, 2-36

Jump instructions, 2-23, 2-31

KKey terms, 2-59KVP, 4-71KvProg, 4-71

LLabel programming, 2-31Laser power control, 4-74LEN, 5-108LEN (for punching/nibbling), 4-72LFC, 4-74LFConf, 4-74LFP, 4-74Limitation of speed, 4-135LinDownFeed, 4-77Linear interpolation

feedrate (G01), 3-5rapid traverse (G00), 3-3

Link table, 2-5Linking, 2-5Links, logical, 2-63LinModZp, 4-79LinUpFeed, 4-77LJUST, 5-129LMZ, 4-79LND, 4-77LNU, 4-77Local, 2-18Local Inch programming, 3-53Logical links, 2-63Low-Voltage Directive, 1-1

MM00, 3-85M01, 3-85M02, 3-86M103, 3-87M104, 3-88M105, 3-89M113, 3-87M114, 3-88M13, 3-87

Page 583: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-59Bosch Rexroth AGIndraMotion MTXR911314869 / 01

M14, 3-88M2, 3-86M203, 3-87M204, 3-88M205, 3-89M213, 3-87M214, 3-88M3, 3-87M30, 3-86M4, 3-88M5, 3-89Machining time, time programming, 3-70MCODS, Motion Control data services, 5-63MCOPS, 5-93MCS, 5-8, A-16, A-43Measurement on-the-fly, 4-51

initialization, 4-68Measuring at fixed stop, 4-53Metric programming, 3-54MID$, 5-106, 5-107MIR, 4-81, 4-82Mirror, 4-81MMC, 5-146modal, 2-17Modulo axis zero-setting, 4-79Monitoring of certain area, 4-2Motion Control data services, MCODS, 5-63Motion Control process services, 5-93Move to fixed stop, 4-55

NN (block numbers), 2-19NC program, 2-1NC programming, 2-2NCF, 5-41NCS coupling, 5-61NCS coupling via MCODS, 5-63NIB, 4-84Nibble, 4-84Nibbling, 4-84NIPS, 3-4NJUST, 5-129No plane, 3-27Nonmodal, 2-18NOT, 2-63Not self-sustaining, 2-18Notations, 3-2, 4-1Notes regarding safety, 1-5NUL, 2-60NUM (for punching/nibbling), 4-86Numbers, 5-109NURBS, 3-19

OO(), 4-87Offsets and placements, reading, 5-15OFFSTOPA / OFFSTOPO, 2-84Omega, 3-96Omega address, 3-96Omega word, 3-96Omega word (feed), per min., 3-71On-the-fly measurement, 4-51

initialization, 4-68Online correction in workpiece coordinates, 4-66OPENR, 5-123OPENW, 5-123Operations

double-precision, 2-65mathematical, 2-61

OR, 2-63Orientation programming, 4-87OVD, 4-98OVE, 4-98OvrDis, 4-98OvrEna, 4-98

PP address, 2-25PAC, 4-99Parts program, 2-1Path compensation, 3-39Path functions, 2-8Path overtravel, 4-113Path slope, 3-21Path split, programmable, 4-157PathAcc, 4-99PCS, 5-6PCSPROBE, 5-12, A-18, A-44PDIM, 2-30phi, 4-87PHS, 4-101PL, 3-17, 3-19, 3-20Placement

Inclined plane, 3-81Workpiece position compensation, 4-29

Activate placement tables, 4-103Placements, 5-29Plane selection, free, 3-32Plane switching, 3-28, 3-30PLC, 5-56PLC interface, 5-55PLS, 4-109PMD, 4-110PMS, 4-103PMT, 5-30PmTSel, 4-103PMV, 5-29

Page 584: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-60 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

POLfor G0, 3-4for G1, 3-6for G2, G3, 3-11programming example, 4-107

Polar coordinate programming, 4-105define pole, 4-104

PolarPol, 4-104PoleSet, 4-109POP, 4-104PosDepHSOut, 4-101Position-dependent high-speed output, 4-101Positioning type for endless axes, 4-110PosMode, 4-110PPOS, 5-14Precise stop

ON/OFF (G61,G62), 3-49rapid traverse (G00), 3-3

Precision programming, 4-113PrecProg, 4-114PRN#, 5-129PROBE, 5-13Probe, 3-57

reading, 5-12Program

interrupt, 3-85interrupt conditionally, 3-85terminate, 3-86

Program blocks, 2-7Program design, 2-19Program execution, 2-23Program remarks, 2-20Program speed (spindle), 3-97Program stop, 3-85

conditional, 3-85Program words, 2-9

as parameter, 2-13from NC functions, 2-10

Programmable path split, 4-157Programmed contour shift, 4-134Programming attributes, 2-14Programming examples

character strings, 5-113NCS functions, 5-101

Programming notes, 2-22Proper use, 1-1Providing handling instructions, 2-22PRP, 4-114psi, 4-87PtBlkEnd, 4-115PTD, 4-117PtDefault, 4-117PTE, 4-115PTI, 4-118

PtInpos, 4-118PUN, 4-119Punch, 4-119PW, 3-20

QQualified personnel, 1-3

RRAD, 4-42Radius programming, 3-9, 4-42Ramp functions, 4-76Rapid traverse, 3-3RAX, 4-122RDT, 4-121REAL, 2-51, 2-65RED, 4-126RedTorque, 4-121Reduction of maximum torque, 4-121Relative dimension programming, 3-69

local, 3-69REM, 2-21Remarks, 2-20

nested, 2-20RemAxis, 4-122RemLogName, 4-123remove an axis from an axis group, 4-122Remove axis name (log.), 4-123Remove channel spindles, 4-124Rename axis (log. axis name), 4-10Repeat instructions, 2-23, 2-41REPEAT-UNTIL, 2-42REPOSTP, 4-125Reserved instruction words, 2-59REWRITE, 5-132Rigid tapping, 3-51

Spindle selection , 4-166RLN, 4-123RND, 4-129RNE, 4-128Rotate, 4-126Rotating a contour, 4-126ROTAX(), 4-87ROUND, 2-62RoundEps, 4-128Rounding, 4-129Rounding corners

with deviation information, 4-128with radius information, 4-129with splines, 4-154

SS-word, 3-97S2D, 4-77

Page 585: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-61Bosch Rexroth AGIndraMotion MTXR911314869 / 01

S2U, 4-77SBC, 3-18Scale, 4-130Scaling, 4-130, 5-39SCC, 4-132SCL, 4-130, 5-39SCS, 5-42SCSL, 5-43SD, 5-44SDF, 4-155SDR, 5-51SEEK, 5-138SelCrdCouple, 4-132Select axis transformation, 4-36Selective additive coordinate coupling, 4-132Self-sustaining, 2-17Separator, between partial words, 2-15SERCOS parameters, writing, 4-176Set actual value, 4-133Set parameters of static tool orientation, 4-159Set program position (G92), 4-133SETERR, 2-57SetPos, 4-133SETWARN, 2-58Shape. Siehe Jolt-limited speed guidanceShift, 4-134SHT, 4-134SIN, 2-62Sin2DownFeed, 4-77Sin2UpFeed, 4-77SinDownFeed, 4-77SinUpFeed, 4-77SMax, 4-135SMin, 4-135SMN, 4-135SMX, 4-135SND, 4-77SNU, 4-77Spaces, removing, 5-112Spanning compensator, 4-29Spare parts, 1-7SPC_WAIT, 4-143SPCC, 4-137SPCD, 4-138SPCE, 4-139SpCouple_Wait, 4-143SpCoupleConfig, 4-137SpCoupleDist, 4-138SpCoupleErrWin, 4-139SpCouplePosOffs, 4-140SpCouplePosOffs_Wait, 4-141SpCoupleSyncWin, 4-142SPCP, 4-140

SPCP_WAIT, 4-141SPCS, 4-142Speed limitation, 4-135Speed programming, direct, 3-75Spindle

align/position, 3-90cancel reservation, 3-89, 4-136clockwise rotation, 3-87counterclockwise rotation, 3-88stop, 3-89switching between position and speed modes,

4-158switching the main spindle, 4-80

Spindle couplingchanging the angular offset while coupling is ac-

tive, 4-140Coupled groups: defining, activating, canceling,

deactivating, 4-137coupling lag of following spindle, 4-138synchronization window, 4-142synchronous mode error window, 4-139wait for angular offset, 4-141wait for synchronous mode, 4-143

Spindle speed, 3-97SpindleToAxis, 4-153Spline

B splines (NURBS), 3-19C1 continuous cubic, 3-17C2 continuous cubic, 3-17Coefficient programming, 3-15

Spline programming, 3-14definition of spline type, 4-155

SplineDef, 4-155SPLIT, 4-157SPOS, 5-10SPS, 4-133SPV, SPVE, Writing of permanent CPL variables,

2-77SQRT, 2-62Square brackets, 2-3SSPG, 3-97STA, 4-153Standard programming, 2-2StatToolOri, 4-159STO, 4-159Stop processing, 3-85, 3-86STR$, 5-109STRING, 2-53String expressions

assigning, 5-116chaining, 5-118comparisons, 5-118

Page 586: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-62 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Stroke release timeInpos window, 4-118Interpolation end point, 4-115set to default, 4-117

Subroutine calls, 2-23with M address, 2-27

Subroutines, 2-24, 2-67call using CALL command (CPL), 2-28call with P address, 2-25call with parameter transfer, 2-29call without P address, 2-26call, self-defined modal, 2-27call, self-defined with G/M codes, 2-27local, 2-24modal, 2-24

Switch off C-axis mode for spindles, 4-26Switching the main spindle, 4-80Synchronization functions

for block execution time, 2-72of block preparation, 2-68

Synchronous mode, wait for (spindle coupling), 4-143System data

simple types, 5-40structured types, 5-52

TTAN, 2-62Tangential circle entry, 3-13Tangential tool guidance, 4-161Tangential tool orientation, 4-164TangTool, 4-162TangToolOri, 4-164Tapping, rigid, 3-51

Spindle selection , 4-166TappSp, 4-166TCS, 4-167TCS definition in program coordinates, 4-167TcsDef, 4-167TCV, 5-24terminate a program, 3-86Test activities, 1-6theta, 4-87Thread

chained, 3-36multiple, 3-37

Thread cutting, 3-33additional functions, 4-170

Thread pitch, 3-51ThreadSet, 4-170TIME, 5-57time programming, 3-70Time recording, 5-57Tool compensation, 5-24Tool database, 5-26

Tool guidance, tangential, 4-161Tool length compensation, 3-44Tool orientation, static, 4-159Tool radius compensation, 3D, 3-79Torque reduction, 4-121Trademarks, 1-8Trans, 4-172Transfer axis setting from MP, 4-40Transfer axis, wait if necessary, 4-175Transfer default axis setting from MP, 4-40Traverse to axis position, fixed machine, 3-58Traverse to fixed machine axis position, 3-58Traverse to reference point, 3-56Traverse to reference point coordinates, 3-55TRIM$, 5-112TRS, 4-172TSP, 4-166TST, 4-170TTL, 4-162TTO, 4-164

UUnconditional jump, 2-35Unconditional jump with CPL, 2-36Unit

inch, 3-53metric, 3-54

Units, supplied axis and coordinate positions, 5-2

VVAL, 5-110Variable programming , 2-44Variable types, 2-51Variables

CHARACTER, 2-53definable permanent, 2-46global, 2-45local, 2-45Overview, 2-53permanent, 2-46STRING, 2-53structured, 2-50

Velocity of asynchronous axes, FA address, 3-96Velocity profiles, definition of separate, 4-76VERSINF$, 5-126VirtAxisPos, 4-174Virtual drives, 4-174

WWAIT, 2-68WAITA, WAITO, States on the digital interface, 2-73WaitAxis, 4-175WAX, 4-175WCS, 5-7, A-25, A-46

Page 587: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

Electric Drivesand Controls

A-63Bosch Rexroth AGIndraMotion MTXR911314869 / 01

WHILE-DO-END, 2-43WID, 4-176, 4-177Workpiece coordinates

jogging, 4-69online correction, 4-66

Workpiece position compensation, 4-29, 5-17WPV, WPVE, Value of a permanent CPL variable,

2-75WriteId, 4-176, 4-177Writing SERCOS parameters, 4-176WSTOPA / WSTOPO, Channel synchronization by

movement stop, 2-82

XXML tables, general access, 5-32XOR, 2-63XTAB, 5-32

ZZero offsets, 3-46, 5-18Zero-setting of modulo axis, 4-79ZO, 3-46ZO groups, 3-46ZO pages, 3-46ZOS, 4-179ZOT, 5-18ZoTSel, 4-179ZOV, 5-18

Page 588: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Appendix

A-64 Electric Drivesand Controls

Bosch Rexroth AG IndraMotion MTX R911314869 / 01

Page 589: Rexroth IndraMotion MTX - Bosch Rexroth AG · Rexroth IndraMotion MTX Programming Manual R911314869 ... Further Training in Automation Technology ... Rexroth accepts no liability

Bosch Rexroth AGElectric Drives and ControlsP.O. Box 13 5797803 Lohr, GermanyBgm.-Dr.-Nebel-Str. 297816 Lohr, GermanyPhone +49 (0)93 52-40-50 60Fax +49 (0)93 52-40-49 [email protected]

Printed in GermanyDOK-MTX***-NC**PRO*V04-AW01-EN-PR911314869