0% found this document useful (0 votes)
53 views1,770 pages

FB1 0309 en en-US

This document provides an overview of functions for the SINUMERIK 840D sl control system. It describes 18 main functions in sections labeled A2 through Z1. These include axis monitoring, continuous-path mode, acceleration settings, diagnostic tools, travel to fixed stops, and NC/PLC interface signals. The document provides information for project engineers, technologists, startup engineers and programmers to understand and implement the control functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views1,770 pages

FB1 0309 en en-US

This document provides an overview of functions for the SINUMERIK 840D sl control system. It describes 18 main functions in sections labeled A2 through Z1. These include axis monitoring, continuous-path mode, acceleration settings, diagnostic tools, travel to fixed stops, and NC/PLC interface signals. The document provides information for project engineers, technologists, startup engineers and programmers to understand and implement the control functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1770

Preface

Various NC/PLC Interface


Signals and Functions (A2) 1
Axis Monitoring, Protection
Zones (A3) 2
Continuous-Path Mode,
Exact Stop, LookAhead (B1) 3
SINUMERIK
Acceleration (B2) 4
SINUMERIK 840D sl Diagnostic Tools (D1) 5
Basic Functions
Travel to Fixed Stop (F1) 6
Velocities, Setpoint/Actual
Value Systems, Closed-Loop 7
Function Manual Control (G2)
Auxiliary Function Outputs to
PLC (H2) 8
Mode Group, Channel,
Program Operation, Reset 9
Response (K1)
Axes, Coordinate Systems,
Frames (K2) 10
Emergency Stop (N2) 11
Transverse Axes (P1) 12
Basic PLC Program (P3) 13
Reference Point Approach
(R1) 14
Spindles (S1) 15
Feeds (V1) 16
Tool Offset (W1) 17
NC/PLC Interface Signals
Valid for
(Z1) 18
Control
SINUMERIK 840D sl/840DE sl Appendix A
Software Version
NCU system software for 840D sl/840DE sl 2.6

03/2009
6FC5397-0BP10-4BA0
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.

DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.

CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.

NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning and
operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes
in this documentation qualified persons are defined as persons who are authorized to commission, ground and
label devices, systems and circuits in accordance with established safety practices and standards.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be adhered to. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of the Siemens AG. The remaining trademarks in this
publication may be trademarks whose use by third parties for their own purposes could violate the rights of the
owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.

Siemens AG Order number: 6FC5397-0BP10-4BA0 Copyright © Siemens AG 2009.


Industry Sector Ⓟ 04/2009 Technical data subject to change
Postfach 48 48
90026 NÜRNBERG
GERMANY
Preface

SINUMERIK® Documentation
The SINUMERIK documentation is organized in three parts:
● General documentation
● User documentation
● Manufacturer/service documentation
Information on the following topics is available at
http://www.siemens.com/motioncontrol/docu:
● Ordering documentation
Here you can find an up-to-date overview of publications.
● Downloading documentation
Links to more information for downloading files from Service & Support.
● Researching documentation online
Information on DOConCD and direct access to the publications in DOConWEB.
● Compiling individual documentation on the basis of Siemens contents with the My
Documentation Manager (MDM), refer to http://www.siemens.com/mdm.
My Documentation Manager provides you with a range of features for generating your
own machine documentation.
● Training and FAQs
Information on our range of training courses and FAQs (frequently asked questions) is
available via the page navigation.

Target group
This publication is intended for:
● Project engineers
● Technologists (from machine manufacturers)
● System startup engineers (Systems/Machines)
● Programmers

Benefits
The function manual describes the functions so that the target group knows them and can
select them. It provides the target group with the information required to implement the
functions.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 3
Preface

Standard version
This documentation only describes the functionality of the standard version. Extensions or
changes made by the machine tool manufacturer are documented by the machine tool
manufacturer.
Other functions not described in this documentation might be executable in the control.
This does not, however, represent an obligation to supply such functions with a new control
or when servicing.
Further, for the sake of simplicity, this documentation does not contain all detailed
information about all types of the product and cannot cover every conceivable case of
installation, operation or maintenance.

Installation
Structure of this Function Manual:
● Inner title (page 3) with the title of the Function Manual, the SINUMERIK controls as well
as the software and the version for which this version of the Function Manual is
applicable and the overview of the individual functional descriptions.
● Description of the functions in alphabetical order (e.g. A2, A3, B1 etc.)
● Appendix with:
– List of abbreviations
– Fax template for feedback for documentation
– Overview
● Index of terms

Note
For detailed descriptions of data and alarm see:
• Machine and setting data:
Detailed description of machine data (only electronically on DOConCD or
DOConWEB)
• NC/PLC interface signals:
Function Manual Basic Functions; NC/PLC Interface Signals (Z1)
Function Manual Basic Functions; NC/PLC Interface Signals (Z2)
Function Manual Special Functions; NC/PLC Interface Signals (Z3)
• Alarms:
Diagnostics Manual

Basic Functions
4 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Preface

Notation of system data


The following notation is applicable for system data in this documentation:

Signal/Data Notation Example


NC/PLC interface ... NC/PLC interface signal: When the new gear step is engaged, the following NC/PLC
signals Signal data (signal name) interface signals are set by the PLC program:
DB31, ... DBX16.0-2 (actual gear stage A to C)
DB31, ... DBX16.3 (gear is changed)
Machine data ... machine data: Master spindle is the spindle stored in the machine data:
<Type><Number> <Complete MD20090 $MC_SPIND_DEF_MASTER_SPIND (Position of
Designator> (<Meaning>) deletion of the master spindle in the channel).
Setting Data ... Setting data: The logical master spindle is contained in the setting data:
<Type><Number> <Complete SD42800 $SC_SPIND_ASSIGN_TAB[0] (Spindle number
Designator> (<Meaning>) converter)

Data types
The following elementary data types are used in the control system:

Type Meaning Value range


INT Signed integers -2147483648 to +2147483647
REAL Figures with decimal point acc. to IEEE ±(2.2*10-308 to 1.8*10+308)
BOOL Truth values TRUE (1) and FALSE (0) 1, 0
CHAR ASCII characters Corresponding to code 0 to 255
STRING Character string, number of characters in [...] Maximum of 200 characters (no special
characters)
AXIS Axis names only All axis identifiers in the channel
FRAME Geometrical parameters for moving, rotating, scaling, and
mirroring
Arrays can only be formed from similar elementary data types. Up to 3-dimensional arrays are possible.

Quantity structure
Explanations concerning the NC/PLC interface are based on the absolute maximum number
of sequential components:
● Mode groups (DB11)
● Channels (DB21, etc.)
● Axes/spindles (DB31, etc.)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 5
Preface

Technical Support
If you have any questions, please contact our hotline:

Europe/Africa
Phone +49 180 5050 - 222
Fax +49 180 5050 - 223
€0.14/min. from German landlines, cell phone prices may differ
Internet http://www.siemens.de/automation/support-request

Americas
Phone +1 423 262 2522
Fax +1 423 262 2200
E-mail mailto:[email protected]

Asia/Pacific
Phone +86 1064 757575
Fax +86 1064 747474
E-mail mailto:[email protected]

Note
You will find telephone numbers for other countries for technical support on the Internet:
http://www.automation.siemens.com/partner

Questions about the manual


If you have any queries (suggestions, corrections) in relation to this documentation, please
send a fax or e-mail to the following address:

Fax: +49 9131- 98 2176


E-mail: mailto:[email protected]
A fax form is available in the appendix of this document.

SINUMERIK Internet address


http://www.siemens.com/sinumerik

Basic Functions
6 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

Preface ...................................................................................................................................................... 3
1 Various NC/PLC Interface Signals and Functions (A2) ............................................................................ 29
1.1 Brief description ...........................................................................................................................29
1.2 NC/PLC interface signals.............................................................................................................30
1.2.1 General ........................................................................................................................................30
1.2.2 Ready signal to PLC ....................................................................................................................32
1.2.3 Status signals to PLC...................................................................................................................33
1.2.4 SINUMERIK 840Di-specific interface signals ..............................................................................34
1.2.5 Signals to/from panel front ...........................................................................................................34
1.2.6 Signals to channel........................................................................................................................36
1.2.7 Signals to axis/spindle .................................................................................................................36
1.2.8 Signals from axis/spindle .............................................................................................................47
1.2.9 Signals to axis/spindle (digital drives)..........................................................................................48
1.2.10 Signals from axis/spindle (digital drives)......................................................................................50
1.3 Functions......................................................................................................................................53
1.3.1 Screen settings ............................................................................................................................53
1.3.2 Settings for involute interpolation.................................................................................................54
1.3.3 Activate DEFAULT memory.........................................................................................................57
1.3.4 Read/write PLC variable ..............................................................................................................58
1.3.5 Access protection via password and keyswitch...........................................................................61
1.3.5.1 Access protection via password and keyswitch...........................................................................61
1.3.5.2 Password .....................................................................................................................................63
1.3.5.3 Keyswitch settings (DB10, DBX56.4 to 7) ...................................................................................64
1.3.5.4 Parameterizable protection levels................................................................................................65
1.4 Examples .....................................................................................................................................66
1.5 Data lists ......................................................................................................................................68
1.5.1 Machine data................................................................................................................................68
1.5.1.1 Drive-specific machine data.........................................................................................................68
1.5.1.2 Memory-specific machine data ....................................................................................................68
1.5.1.3 NC-specific machine data ............................................................................................................71
1.5.1.4 Channel-specific machine data....................................................................................................71
1.5.1.5 Axis/spindle-specific machine data..............................................................................................71
1.5.2 System variables..........................................................................................................................72
1.5.3 Signals .........................................................................................................................................72
1.5.3.1 Signals to NC ...............................................................................................................................72
1.5.3.2 Signals from NC...........................................................................................................................72
1.5.3.3 Signals to operator panel front.....................................................................................................73
1.5.3.4 Signals from operator panel front ................................................................................................73
1.5.3.5 Signals to channel........................................................................................................................74
1.5.3.6 Signals from channel ...................................................................................................................74
1.5.3.7 Signals to axis/spindle .................................................................................................................74
1.5.3.8 Signals from axis/spindle .............................................................................................................75
2 Axis Monitoring, Protection Zones (A3).................................................................................................... 77
2.1 Brief description ...........................................................................................................................77
2.1.1 Axis monitoring functions .............................................................................................................77
2.1.2 Protection zones ..........................................................................................................................77

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 7
Table of Contents

2.2 Axis monitoring............................................................................................................................ 78


2.2.1 Contour monitoring...................................................................................................................... 78
2.2.1.1 Contour error............................................................................................................................... 78
2.2.1.2 Following error monitoring........................................................................................................... 79
2.2.2 Positioning, zero speed and clamping monitoring ...................................................................... 81
2.2.2.1 Correlation between positioning, zero-speed and clamping monitoring ..................................... 81
2.2.2.2 Positioning monitoring................................................................................................................. 82
2.2.2.3 Zero speed monitoring ................................................................................................................ 83
2.2.2.4 Exact stop and standstill tolerance dependent on the parameter set......................................... 84
2.2.2.5 Clamping monitoring ................................................................................................................... 84
2.2.3 Speed-setpoint monitoring .......................................................................................................... 92
2.2.4 Actual velocity monitoring ........................................................................................................... 93
2.2.5 Measuring-system monitoring (systems with SIMODRIVE 611D).............................................. 94
2.2.5.1 Encoder-limit-frequency monitoring ............................................................................................ 94
2.2.5.2 Zero mark monitoring .................................................................................................................. 95
2.2.5.3 Zero-mark monitoring for incremental encoders ......................................................................... 96
2.2.5.4 Zero-mark monitoring for absolute encoders .............................................................................. 97
2.2.5.5 Customized error reactions ......................................................................................................... 99
2.2.5.6 Monitoring of hardware faults.................................................................................................... 101
2.2.6 Measuring-system monitoring (systems with PROFIBUS drives)............................................. 102
2.2.7 Limit switches-monitoring.......................................................................................................... 103
2.2.7.1 Hardware limit switches ............................................................................................................ 103
2.2.7.2 Software limit switch.................................................................................................................. 104
2.2.8 Monitoring of the working area limitation .................................................................................. 106
2.2.8.1 General...................................................................................................................................... 106
2.2.8.2 Working area limitation in BKS.................................................................................................. 108
2.2.8.3 Working area limitation in WKS/ENS ........................................................................................ 110
2.3 Protection zones ....................................................................................................................... 114
2.3.1 General...................................................................................................................................... 114
2.3.2 Types of protection zone........................................................................................................... 115
2.3.3 Definition via part program instruction ...................................................................................... 118
2.3.4 Definition via system variable.................................................................................................... 121
2.3.5 Activation and deactivation of protection zones........................................................................ 123
2.3.6 Protection-zone violation and temporary enabling of individual protection zones .................... 127
2.3.7 Restrictions in protection zones ................................................................................................ 133
2.4 Supplementary conditions......................................................................................................... 134
2.4.1 Axis monitoring functions .......................................................................................................... 134
2.5 Examples................................................................................................................................... 135
2.5.1 Axis monitoring.......................................................................................................................... 135
2.5.1.1 Working area limitation in WKS/ENS ........................................................................................ 135
2.5.2 Protection zones ....................................................................................................................... 137
2.5.2.1 Definition and activation of protection zones ............................................................................ 137
2.6 Data lists.................................................................................................................................... 147
2.6.1 Machine data............................................................................................................................. 147
2.6.1.1 NC-specific machine data ......................................................................................................... 147
2.6.1.2 Channel-specific machine data................................................................................................. 147
2.6.1.3 Axis/spindle-specific machine data ........................................................................................... 148
2.6.2 Setting data ............................................................................................................................... 150
2.6.2.1 Axis/spindle-specific setting data .............................................................................................. 150
2.6.3 Signals....................................................................................................................................... 150
2.6.3.1 Signals to channel..................................................................................................................... 150
2.6.3.2 Signals from channel................................................................................................................. 151
2.6.3.3 Signals to axis/spindle............................................................................................................... 151

Basic Functions
8 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

3 Continuous-Path Mode, Exact Stop, LookAhead (B1) ........................................................................... 153


3.1 Brief description .........................................................................................................................153
3.2 Exact stop mode ........................................................................................................................157
3.3 Continuous-path mode...............................................................................................................162
3.3.1 General functionality ..................................................................................................................162
3.3.2 Velocity reduction according to overload factor .........................................................................163
3.3.3 Blending .....................................................................................................................................166
3.3.3.1 Rounding according to a path criterion (G641)..........................................................................169
3.3.3.2 Rounding in compliance with defined tolerances (G642/G643) ................................................171
3.3.3.3 Rounding with maximum possible axial dynamic response (G644) ..........................................175
3.3.3.4 Rounding of tangential block transitions (G645)........................................................................179
3.3.4 LookAhead .................................................................................................................................180
3.3.4.1 Standard functionality ................................................................................................................180
3.3.4.2 Free-form surface mode: Extension function.............................................................................186
3.4 Dynamic adaptations .................................................................................................................190
3.4.1 Smoothing the path velocity.......................................................................................................190
3.4.2 Adaptation of the dynamic path response .................................................................................194
3.4.3 Determination of the dynamic response limiting values ............................................................198
3.4.4 Interaction between the "smoothing of the path velocity" and "adaptation of the path
dynamic response" functions .....................................................................................................199
3.4.5 Dynamic response mode for path interpolation .........................................................................203
3.4.6 Free-form surface mode: Basic functions ..................................................................................206
3.5 Compressor functions ................................................................................................................210
3.5.1 NC block compression ...............................................................................................................210
3.5.2 Combine short spline blocks ......................................................................................................214
3.6 Contour/Orientation tolerance....................................................................................................216
3.7 RESET response .......................................................................................................................220
3.8 Supplementary conditions..........................................................................................................221
3.8.1 Block change and positioning axes ...........................................................................................221
3.8.2 Block change delay....................................................................................................................221
3.8.3 Rounding and repositioning (REPOS) .......................................................................................222
3.9 Data lists ....................................................................................................................................223
3.9.1 Machine data..............................................................................................................................223
3.9.1.1 General machine data................................................................................................................223
3.9.1.2 Channel-specific machine data..................................................................................................223
3.9.1.3 Axis/spindle-specific machine data............................................................................................224
3.9.2 Setting data ................................................................................................................................225
3.9.2.1 Channel-specific setting data.....................................................................................................225
3.9.3 Signals .......................................................................................................................................225
3.9.3.1 Signals from channel .................................................................................................................225
3.9.3.2 Signals to axis/spindle ...............................................................................................................225
4 Acceleration (B2) ................................................................................................................................... 227
4.1 Brief description .........................................................................................................................227
4.1.1 General ......................................................................................................................................227
4.1.2 Features .....................................................................................................................................227
4.2 Functions....................................................................................................................................229
4.2.1 Acceleration without jerk limitation (BRISK/BRISKA) (channel-/axis-specific) ..........................229
4.2.1.1 General information ...................................................................................................................229
4.2.1.2 Programmable maximum value (axis-specific) ..........................................................................230

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 9
Table of Contents

4.2.1.3 Parameterization ....................................................................................................................... 230


4.2.1.4 Programming............................................................................................................................. 231
4.2.2 Constant travel time (channel-specific)..................................................................................... 232
4.2.2.1 General information................................................................................................................... 232
4.2.2.2 Parameterization ....................................................................................................................... 233
4.2.3 Acceleration matching (ACC) (axis-specific)............................................................................. 234
4.2.3.1 General information................................................................................................................... 234
4.2.3.2 Programming............................................................................................................................. 234
4.2.4 Acceleration margin (channel-specific) ..................................................................................... 235
4.2.4.1 General information................................................................................................................... 235
4.2.4.2 Parameterization ....................................................................................................................... 235
4.2.5 Path-acceleration limitation (channel-specific).......................................................................... 235
4.2.5.1 General information................................................................................................................... 235
4.2.5.2 Parameterization ....................................................................................................................... 236
4.2.5.3 Programming............................................................................................................................. 236
4.2.6 Path acceleration for real-time events (channel-specific) ......................................................... 237
4.2.6.1 General information................................................................................................................... 237
4.2.6.2 Programming............................................................................................................................. 238
4.2.7 Acceleration with programmed rapid traverse (G00) (axis-specific) ......................................... 239
4.2.7.1 General information................................................................................................................... 239
4.2.7.2 Parameterization ....................................................................................................................... 239
4.2.8 Acceleration with active jerk limitation (SOFT/SOFTA) (axis-specific) ..................................... 240
4.2.8.1 General information................................................................................................................... 240
4.2.8.2 Parameterization ....................................................................................................................... 240
4.2.9 Excessive acceleration for non-tangential block transitions (axis-specific) .............................. 240
4.2.9.1 General information................................................................................................................... 240
4.2.9.2 Parameterization ....................................................................................................................... 241
4.2.10 Acceleration margin for radial acceleration (channel-specific) ................................................. 241
4.2.10.1 General information................................................................................................................... 241
4.2.10.2 Parameterization ....................................................................................................................... 243
4.2.11 Jerk limitation with path interpolation (SOFT) (channel-specific).............................................. 243
4.2.11.1 General information................................................................................................................... 243
4.2.11.2 Maximum jerk value (axis-specific) ........................................................................................... 245
4.2.11.3 Maximum jerk value (channel-specific)..................................................................................... 245
4.2.11.4 Parameterization ....................................................................................................................... 245
4.2.11.5 Programming............................................................................................................................. 246
4.2.12 Jerk limitation with single-axis interpolation (SOFTA) (axis-specific) ....................................... 246
4.2.12.1 General information................................................................................................................... 246
4.2.12.2 Parameterization ....................................................................................................................... 247
4.2.12.3 Programming............................................................................................................................. 247
4.2.13 Path-jerk limitation (channel-specific) ....................................................................................... 248
4.2.13.1 General information................................................................................................................... 248
4.2.13.2 Parameterization ....................................................................................................................... 248
4.2.13.3 Programming............................................................................................................................. 248
4.2.14 Path jerk for real-time events (channel-specific)....................................................................... 249
4.2.14.1 General information................................................................................................................... 249
4.2.14.2 Programming............................................................................................................................. 250
4.2.15 Jerk with programmed rapid traverse (G00) (axis-specific) ...................................................... 251
4.2.15.1 General information................................................................................................................... 251
4.2.15.2 Parameterization ....................................................................................................................... 251
4.2.16 Excessive jerk for block transitions without constant curvature (axis-specific)......................... 252
4.2.16.1 General information................................................................................................................... 252
4.2.16.2 Parameterization ....................................................................................................................... 252
4.2.17 Jerk filter (axis-specific)............................................................................................................. 252
4.2.17.1 General information................................................................................................................... 252

Basic Functions
10 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

4.2.17.2 Parameterization ........................................................................................................................256


4.2.18 Knee-shaped acceleration characteristic curve .........................................................................257
4.2.18.1 Adaptation to the motor characteristic curve .............................................................................257
4.2.18.2 Effects on path acceleration.......................................................................................................259
4.2.18.3 Substitute characteristic curve ...................................................................................................259
4.2.18.4 Parameterization ........................................................................................................................262
4.2.18.5 Programming..............................................................................................................................263
4.2.18.6 Boundary conditions ..................................................................................................................264
4.3 Examples ...................................................................................................................................265
4.3.1 Acceleration ...............................................................................................................................265
4.3.1.1 Path velocity characteristic ........................................................................................................265
4.3.2 Jerk ............................................................................................................................................267
4.3.2.1 Path velocity characteristic ........................................................................................................267
4.3.3 Acceleration and jerk .................................................................................................................268
4.3.4 Knee-shaped acceleration characteristic curve .........................................................................270
4.3.4.1 Activation....................................................................................................................................270
4.4 Data lists ....................................................................................................................................272
4.4.1 Machine data..............................................................................................................................272
4.4.1.1 Channel-specific machine data..................................................................................................272
4.4.1.2 Axis/spindle-specific machine data............................................................................................272
4.4.2 Setting data ................................................................................................................................273
4.4.2.1 Channel-specific setting data.....................................................................................................273
4.4.3 System variables........................................................................................................................273
5 Diagnostic Tools (D1) ............................................................................................................................ 275
5.1 Brief description .........................................................................................................................275
5.2 Description of diagnostic tools ...................................................................................................277
5.3 Service displays .........................................................................................................................280
5.4 Axis/spindle service display .......................................................................................................281
5.5 Drive service display (for digital drives only)..............................................................................291
5.6 Service display PROFIBUS DP 840Di.......................................................................................302
5.7 Communication log ....................................................................................................................306
5.8 PLC status..................................................................................................................................307
5.9 Other diagnostics tools ..............................................................................................................308
5.10 Identifying defective drive modules............................................................................................309
5.11 Data lists ....................................................................................................................................312
5.11.1 Machine data..............................................................................................................................312
5.11.1.1 Drive-specific machine data.......................................................................................................312
5.11.1.2 NC-specific machine data ..........................................................................................................312
5.11.1.3 Axis/spindle-specific machine data............................................................................................313
5.11.2 Setting data ................................................................................................................................313
5.11.2.1 Axis/spindle-specific setting data ...............................................................................................313
5.11.3 Signals .......................................................................................................................................313
5.11.3.1 Signals to axis/spindle ...............................................................................................................313
5.11.3.2 Signals from axis/spindle ...........................................................................................................314

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 11
Table of Contents

6 Travel to Fixed Stop (F1) ....................................................................................................................... 315


6.1 Brief description ........................................................................................................................ 315
6.2 General functionality ................................................................................................................. 316
6.2.1 Functional sequence, programming, parameterization............................................................. 316
6.2.2 Response to RESET and function abort ................................................................................... 324
6.2.3 Block search response.............................................................................................................. 325
6.2.4 Miscellaneous ........................................................................................................................... 330
6.2.5 Supplementary conditions for expansions ................................................................................ 333
6.2.6 Travel with limited moment/force FOC:..................................................................................... 336
6.3 Travel to fixed stop with analog drives...................................................................................... 339
6.3.1 SIMODRIVE 611 digital (VSA/HSA) ......................................................................................... 339
6.3.2 Travel to fixed stop with hydraulic drives SIMODRIVE 611 digital (HLA module) .................... 343
6.4 Travel to fixed stop with analog drives...................................................................................... 344
6.4.1 SIMODRIVE 611 analog (FDD) ................................................................................................ 344
6.4.2 SIMODRIVE 611 analog (FDD) ................................................................................................ 347
6.4.3 Diagrams for travel to fixed stop with analog drives ................................................................. 350
6.5 Examples................................................................................................................................... 353
6.6 Data lists.................................................................................................................................... 355
6.6.1 Machine data............................................................................................................................. 355
6.6.1.1 Axis/spindle-specific machine data ........................................................................................... 355
6.6.2 Setting data ............................................................................................................................... 355
6.6.2.1 Axis/spindle-specific setting data .............................................................................................. 355
6.6.3 Signals....................................................................................................................................... 356
6.6.3.1 Signals to axis/spindle............................................................................................................... 356
6.6.3.2 Signals from axis/spindle .......................................................................................................... 356
7 Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2) .................................................. 357
7.1 Brief description ........................................................................................................................ 357
7.2 Velocities, traversing ranges, accuracies.................................................................................. 358
7.2.1 Velocities ................................................................................................................................... 358
7.2.2 Traversing ranges ..................................................................................................................... 360
7.2.3 Positioning accuracy of the control system............................................................................... 361
7.2.4 Block diagram of resolutions and scaling values ...................................................................... 362
7.2.5 Input/display resolution, computational resolution .................................................................... 363
7.2.6 Scaling of physical quantities of machine and setting data ...................................................... 365
7.3 Metric/inch measuring system .................................................................................................. 369
7.3.1 General...................................................................................................................................... 369
7.3.2 Conversion of basic system by part program............................................................................ 370
7.3.3 Manual switchover of the basic system .................................................................................... 374
7.3.4 FGROUP and FGREF............................................................................................................... 379
7.4 Setpoint/actual-value system .................................................................................................... 382
7.4.1 General...................................................................................................................................... 382
7.4.2 Speed setpoint and actual-value routing................................................................................... 384
7.4.3 Configuration of drives .............................................................................................................. 389
7.4.4 Adapting the motor/load ratios .................................................................................................. 390
7.4.5 Speed setpoint output ............................................................................................................... 393
7.4.6 Actual-value processing ............................................................................................................ 396
7.4.7 Adjustments to actual-value resolution ..................................................................................... 399
7.5 Closed-loop control ................................................................................................................... 407

Basic Functions
12 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

7.5.1 General ......................................................................................................................................407


7.5.2 Parameter sets of the position controller ...................................................................................411
7.5.3 Extending the parameter set......................................................................................................412
7.6 Optimization of the control .........................................................................................................416
7.6.1 Position controller: injection of positional deviation ...................................................................416
7.6.2 Position controller position setpoint filter: New balancing filter..................................................417
7.6.3 Position controller position setpoint filter: new jerk filter ............................................................424
7.6.4 Position control with proportional-plus-integral-action controller ...............................................427
7.6.5 System variable for status of pulse enable ................................................................................429
7.6.6 Expansions for "deceleration axes" ...........................................................................................431
7.7 Data lists ....................................................................................................................................434
7.7.1 Machine data..............................................................................................................................434
7.7.1.1 Memory-specific machine data ..................................................................................................434
7.7.1.2 NC-specific machine data ..........................................................................................................434
7.7.1.3 Channel-specific machine data..................................................................................................435
7.7.1.4 Axis/spindle-specific machine data............................................................................................435
8 Auxiliary Function Outputs to PLC (H2) ................................................................................................. 437
8.1 Brief description .........................................................................................................................437
8.1.1 Function .....................................................................................................................................437
8.1.2 Definition of an auxiliary function ...............................................................................................438
8.1.3 Overview of auxiliary functions ..................................................................................................439
8.2 Predefined auxiliary functions ....................................................................................................445
8.2.1 Parameter assignment...............................................................................................................448
8.2.1.1 Group assignment......................................................................................................................448
8.2.1.2 Type, address extension and value ...........................................................................................448
8.2.1.3 Output behavior .........................................................................................................................450
8.3 User-defined auxiliary functions.................................................................................................457
8.3.1 Parameter assignment...............................................................................................................458
8.3.1.1 Maximum number of user-defined auxiliary functions ...............................................................458
8.3.1.2 Group assignment......................................................................................................................458
8.3.1.3 Type, address extension and value ...........................................................................................459
8.3.1.4 Output behavior .........................................................................................................................460
8.4 Associated auxiliary functions....................................................................................................461
8.5 Type-specific output behavior ....................................................................................................463
8.6 Priorities of the output behavior for which parameters have been assigned.............................465
8.7 Programming an auxiliary function.............................................................................................466
8.8 Programmable output duration ..................................................................................................468
8.9 Auxiliary function output to the PLC...........................................................................................470
8.10 Auxiliary functions without block change delay..........................................................................471
8.11 M function with an implicit preprocessing stop ..........................................................................472
8.12 Response to overstore...............................................................................................................473
8.13 Block-search response ..............................................................................................................474
8.13.1 Auxiliary function output during type 1, 2, and 4 block searches...............................................474
8.13.2 Assignment of an auxiliary function to a number of groups.......................................................476
8.13.3 Time stamp of the active M auxiliary function............................................................................477
8.13.4 Determining the output sequence ..............................................................................................478
8.13.5 Output suppression of spindle-specific auxiliary functions ........................................................479

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 13
Table of Contents

8.13.6 Auxiliary function output with a type 5 block search (SERUPRO) ............................................ 482
8.13.7 ASUB at the end of the SERUPRO .......................................................................................... 487
8.14 Implicitly output auxiliary functions............................................................................................ 493
8.15 Information options.................................................................................................................... 495
8.15.1 Group-specific modal M auxiliary function display .................................................................... 495
8.15.2 Querying system variables........................................................................................................ 496
8.16 Supplementary conditions......................................................................................................... 499
8.16.1 General constraints ................................................................................................................... 499
8.16.2 Output behavior......................................................................................................................... 500
8.17 Examples................................................................................................................................... 502
8.17.1 Extension of predefined auxiliary functions............................................................................... 502
8.17.2 Defining auxiliary functions ....................................................................................................... 503
8.18 Data lists.................................................................................................................................... 508
8.18.1 Machine data............................................................................................................................. 508
8.18.1.1 NC-specific machine data ......................................................................................................... 508
8.18.1.2 Channel-specific machine data................................................................................................. 508
8.18.2 Signals....................................................................................................................................... 509
8.18.2.1 Signals to channel..................................................................................................................... 509
8.18.2.2 Signals from channel................................................................................................................. 509
8.18.2.3 Signals to axis/spindle............................................................................................................... 511
8.18.2.4 Signals from axis/spindle .......................................................................................................... 511
9 Mode Group, Channel, Program Operation, Reset Response (K1) ....................................................... 513
9.1 Brief description ........................................................................................................................ 513
9.2 Mode group (MG)...................................................................................................................... 516
9.2.1 Mode group Stop....................................................................................................................... 519
9.2.2 Mode group RESET .................................................................................................................. 519
9.3 Mode types and mode type change.......................................................................................... 520
9.3.1 Monitoring functions and interlocks of the individual modes..................................................... 526
9.3.2 Mode change ............................................................................................................................ 526
9.4 Channel ..................................................................................................................................... 528
9.4.1 Global start disable for channel ................................................................................................ 531
9.5 Program test.............................................................................................................................. 533
9.5.1 Program execution without setpoint outputs ............................................................................. 533
9.5.2 Program execution in single-block mode .................................................................................. 535
9.5.3 Program execution with dry run feedrate .................................................................................. 537
9.5.4 Skip part-program blocks .......................................................................................................... 539
9.6 Block search.............................................................................................................................. 540
9.6.1 Sequence for block search of Type 1, 2 and 4 ......................................................................... 541
9.6.2 Block search in connection with other NCK functions .............................................................. 543
9.6.2.1 ASUB after and during block search......................................................................................... 543
9.6.2.2 PLC actions after block search ................................................................................................. 544
9.6.2.3 Spindle functions after block search ......................................................................................... 545
9.6.3 Automatic start of an ASUB after a block search...................................................................... 546
9.6.4 Cascaded block search............................................................................................................. 548
9.6.5 Examples of block search with calculation................................................................................ 550
9.7 Block search Type 5 SERUPRO............................................................................................... 554
9.7.1 REPOS...................................................................................................................................... 560
9.7.1.1 Continue machining after SERUPRO search target found ....................................................... 560

Basic Functions
14 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

9.7.1.2 Repositioning on contour with controlled REPOS .....................................................................569


9.7.2 Acceleration measures via MD ..................................................................................................572
9.7.3 SERUPRO ASUP ......................................................................................................................573
9.7.4 Self-acting SERUPRO ...............................................................................................................576
9.7.5 Inhibit specific part of the program in the part program for SERUPRO .....................................577
9.7.6 Special features in the part-program target block......................................................................582
9.7.6.1 STOPRE in the part-program target block.................................................................................582
9.7.6.2 SPOS in target block..................................................................................................................583
9.7.7 Behavior during POWER ON, mode change and RESET.........................................................583
9.7.8 Special features of functions supported during SERUPRO.......................................................584
9.7.8.1 Travel to fixed stop (FXS) ..........................................................................................................584
9.7.8.2 Force Control (FOC) ..................................................................................................................585
9.7.8.3 Synchronous spindle..................................................................................................................585
9.7.8.4 Couplings and master-slave ......................................................................................................586
9.7.8.5 Axis functions .............................................................................................................................589
9.7.8.6 Gear stage change ....................................................................................................................591
9.7.8.7 Superimposed motion ................................................................................................................591
9.7.8.8 REPOS offset in the interface ....................................................................................................592
9.7.8.9 Making the initial settings more flexible .....................................................................................592
9.7.9 System variables and variables for SERUPRO sequence ........................................................593
9.7.10 Restrictions ................................................................................................................................595
9.8 Program operation mode ...........................................................................................................596
9.8.1 Initial settings .............................................................................................................................596
9.8.2 Selection and start of part program or part-program block ........................................................600
9.8.3 Part-program interruption...........................................................................................................601
9.8.4 RESET command ......................................................................................................................603
9.8.5 Program status...........................................................................................................................604
9.8.6 Channel status ...........................................................................................................................605
9.8.7 Responses to operator or program actions ...............................................................................606
9.8.8 Part-Program Start.....................................................................................................................607
9.8.9 Example of timing diagram for a program run ...........................................................................608
9.8.10 Program jumps...........................................................................................................................609
9.8.10.1 Jump back to start of program ...................................................................................................609
9.8.11 Program section repetitions .......................................................................................................611
9.8.11.1 Overview ....................................................................................................................................611
9.8.11.2 Individual part program block.....................................................................................................612
9.8.11.3 A part program section after a start label...................................................................................613
9.8.11.4 A part program section between a start label and end label .....................................................614
9.8.11.5 A part program section between a Start label and the key word: ENDLABEL ..........................615
9.8.12 Event-driven program calls ........................................................................................................616
9.8.12.1 Function .....................................................................................................................................616
9.8.12.2 Parameter assignment...............................................................................................................621
9.8.12.3 Programming..............................................................................................................................626
9.8.12.4 Boundary conditions ..................................................................................................................627
9.8.12.5 Examples ...................................................................................................................................627
9.8.13 Influencing the Stop events through Stop delay area................................................................629
9.9 Asynchronous subroutines (ASUBs), interrupt routines ............................................................632
9.9.1 Function .....................................................................................................................................632
9.9.1.1 General functionality ..................................................................................................................632
9.9.1.2 Sequence of an interrupt routine in program operation .............................................................635
9.9.1.3 Interrupt routine with REPOSA ..................................................................................................637
9.9.1.4 NC response ..............................................................................................................................637
9.9.2 Parameter assignment...............................................................................................................638
9.9.3 Programming..............................................................................................................................643

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 15
Table of Contents

9.9.4 Restrictions ............................................................................................................................... 646


9.9.5 Examples................................................................................................................................... 646
9.10 User-specific ASUB for RET and REPOS ................................................................................ 647
9.10.1 Function..................................................................................................................................... 647
9.10.2 Parameter assignment .............................................................................................................. 647
9.10.3 Programming............................................................................................................................. 649
9.11 Single block............................................................................................................................... 651
9.11.1 Decoding single block SBL2 with implicit preprocessing stop .................................................. 652
9.11.2 Single block stop: Suppression using SBLOF .......................................................................... 652
9.11.3 Single block stop: inhibit according to situation ........................................................................ 655
9.11.4 Single-block behavior in mode group with type A/B ................................................................. 656
9.12 Program control......................................................................................................................... 658
9.12.1 Function selection (via operator panel front or PLC) ................................................................ 658
9.12.2 Activation of skip levels ............................................................................................................. 659
9.12.3 Adapting the size of the interpolation buffer.............................................................................. 660
9.12.4 Program display modes via an additional basic block display .................................................. 662
9.12.5 Basic block display for ShopMill/ShopTurn............................................................................... 663
9.12.6 Structure for a DIN block........................................................................................................... 665
9.12.7 Execution from external ............................................................................................................ 669
9.12.8 Execution from external subroutines......................................................................................... 670
9.13 System settings for power-up, RESET/part-program end and part-program start ................... 674
9.13.1 Tool withdrawal after POWER OFF with orientation transformation......................................... 681
9.14 Replacement of NC functions by subprograms ........................................................................ 683
9.14.1 General...................................................................................................................................... 683
9.14.2 Replacement of M functions...................................................................................................... 684
9.14.3 Replacement of T and D/DL functions ...................................................................................... 686
9.14.3.1 General...................................................................................................................................... 686
9.14.3.2 Replacement of the M function for the tool change .................................................................. 689
9.14.3.3 Function replacement with parameter transfer ......................................................................... 690
9.14.3.4 Example of M/T function replacement for tool change ............................................................. 694
9.14.3.5 Conflict resolution in case of multiple replacements................................................................. 697
9.14.4 Replacement of spindle-related functions................................................................................. 698
9.14.4.1 General...................................................................................................................................... 698
9.14.4.2 Function replacement during gear-stage change ..................................................................... 699
9.14.4.3 Function replacement during spindle positioning...................................................................... 703
9.14.4.4 Sequence .................................................................................................................................. 707
9.14.5 Properties of replacement subroutines ..................................................................................... 709
9.14.6 Restrictions ............................................................................................................................... 711
9.15 Program runtime/part counter ................................................................................................... 712
9.15.1 Program runtime ....................................................................................................................... 712
9.15.2 Workpiece counter .................................................................................................................... 718
9.16 Data lists.................................................................................................................................... 722
9.16.1 Machine data............................................................................................................................. 722
9.16.1.1 General machine data............................................................................................................... 722
9.16.1.2 Channel-specific machine data................................................................................................. 723
9.16.1.3 Axis/spindle-specific machine data ........................................................................................... 726
9.16.2 Setting data ............................................................................................................................... 727
9.16.2.1 Channel-specific setting data .................................................................................................... 727
9.16.3 Signals....................................................................................................................................... 727
9.16.3.1 Signals to NC ............................................................................................................................ 727
9.16.3.2 Signals to mode group .............................................................................................................. 727
9.16.3.3 Signals from mode group .......................................................................................................... 728

Basic Functions
16 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

9.16.3.4 Signals to channel .....................................................................................................................728


9.16.3.5 Signals from channel .................................................................................................................729
9.16.3.6 Signals to axis/spindle ...............................................................................................................730
9.16.3.7 Signals from axis/spindle ...........................................................................................................730
10 Axes, Coordinate Systems, Frames (K2)............................................................................................... 731
10.1 Brief description .........................................................................................................................731
10.1.1 Axes ...........................................................................................................................................731
10.1.2 Coordinate systems ...................................................................................................................733
10.1.3 Frames ......................................................................................................................................735
10.2 Axes ...........................................................................................................................................739
10.2.1 Overview ....................................................................................................................................739
10.2.2 Machine axes .............................................................................................................................740
10.2.3 Channel axes .............................................................................................................................741
10.2.4 Geometry axes...........................................................................................................................741
10.2.5 Replaceable geometry axes ......................................................................................................741
10.2.6 Special axes...............................................................................................................................746
10.2.7 Path axes ...................................................................................................................................747
10.2.8 Positioning axes .........................................................................................................................747
10.2.9 Main axes...................................................................................................................................748
10.2.10 Synchronized axes.....................................................................................................................749
10.2.11 Axis configuration.......................................................................................................................751
10.2.12 Link axes ....................................................................................................................................754
10.3 Zeros and reference points ........................................................................................................758
10.3.1 Reference points in working space............................................................................................758
10.3.2 Position of coordinate systems and reference points ................................................................760
10.4 Coordinate systems ...................................................................................................................761
10.4.1 Overview ....................................................................................................................................761
10.4.2 Machine coordinate system (MCS)............................................................................................764
10.4.3 Basic coordinate system (BCS) .................................................................................................765
10.4.4 Additive offsets...........................................................................................................................767
10.4.5 Basic zero system (BZS) ...........................................................................................................770
10.4.6 Settable zero system (SZS) .......................................................................................................772
10.4.7 Workpiece coordinate system (WCS)........................................................................................774
10.5 Frames .....................................................................................................................................775
10.5.1 Overview ....................................................................................................................................775
10.5.2 Frame components ....................................................................................................................776
10.5.2.1 Translation .................................................................................................................................776
10.5.2.2 Fine offset ..................................................................................................................................776
10.5.2.3 Rotations for geometry axes ......................................................................................................777
10.5.2.4 Scaling .......................................................................................................................................782
10.5.2.5 Mirroring .....................................................................................................................................782
10.5.2.6 Chain operator ...........................................................................................................................783
10.5.2.7 Programmable axis identifiers....................................................................................................783
10.5.2.8 Coordinate transformation .........................................................................................................784
10.5.3 Frames in data management and active frames .......................................................................785
10.5.3.1 Overview ....................................................................................................................................785
10.5.3.2 Activating data management frames .........................................................................................787
10.5.3.3 NCU global frames.....................................................................................................................788
10.5.4 Frame chain and coordinate systems........................................................................................789
10.5.4.1 Overview ....................................................................................................................................789
10.5.4.2 Relative coordinate systems ......................................................................................................790
10.5.4.3 Configurable SZS.......................................................................................................................792

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 17
Table of Contents

10.5.4.4 Manual traverse in the SZS coordinate system ........................................................................ 794


10.5.4.5 Suppression of frames .............................................................................................................. 795
10.5.5 Frame chain frames .................................................................................................................. 797
10.5.5.1 Overview ................................................................................................................................... 797
10.5.5.2 Settable frames $P_UIFR[n] ..................................................................................................... 797
10.5.5.3 Channel basic frames $P_CHBFR[n]........................................................................................ 798
10.5.5.4 NCU global basic frames $P_NCBFR[n]................................................................................... 799
10.5.5.5 Complete basic frame $P_ACTBFRAME.................................................................................. 801
10.5.5.6 Programmable frame $P_PFRAME .......................................................................................... 802
10.5.5.7 Channel-specific system frames ............................................................................................... 804
10.5.6 Implicit frame changes .............................................................................................................. 808
10.5.6.1 Frames and switchover of geometry axes ................................................................................ 808
10.5.6.2 Frame for selection and deselection of transformations ........................................................... 811
10.5.6.3 Adapting active frames.............................................................................................................. 830
10.5.7 Predefined frame functions ....................................................................................................... 831
10.5.7.1 Inverse frame ............................................................................................................................ 831
10.5.7.2 Additive frame in frame chain.................................................................................................... 834
10.5.8 Functions................................................................................................................................... 835
10.5.8.1 Setting zeros, workpiece measuring and tool measuring ......................................................... 835
10.5.8.2 Zero offset external via system frames ..................................................................................... 836
10.5.8.3 Toolholder ................................................................................................................................. 837
10.5.9 Subprograms with SAVE attribute (SAVE) ............................................................................... 848
10.5.10 Data backup .............................................................................................................................. 849
10.5.11 Positions in the coordinate system ........................................................................................... 849
10.5.12 Control system response .......................................................................................................... 850
10.5.12.1 POWER ON .............................................................................................................................. 850
10.5.12.2 Mode change ............................................................................................................................ 851
10.5.12.3 RESET, end of part program .................................................................................................... 851
10.5.12.4 Part program start ..................................................................................................................... 854
10.5.12.5 Block search.............................................................................................................................. 855
10.5.12.6 REPOS...................................................................................................................................... 855
10.6 Workpiece-related actual-value system .................................................................................... 856
10.6.1 Overview ................................................................................................................................... 856
10.6.2 Use of workpiece-related actual-value system ......................................................................... 856
10.6.3 Special reactions....................................................................................................................... 858
10.7 Restrictions ............................................................................................................................... 860
10.8 Examples................................................................................................................................... 861
10.8.1 Axes .......................................................................................................................................... 861
10.8.2 Coordinate systems .................................................................................................................. 864
10.8.3 Frames .................................................................................................................................... 865
10.9 Data lists.................................................................................................................................... 868
10.9.1 Machine data............................................................................................................................. 868
10.9.1.1 Memory-specific machine data ................................................................................................. 868
10.9.1.2 NC-specific machine data ......................................................................................................... 869
10.9.1.3 Channel-specific machine data................................................................................................. 869
10.9.1.4 Axis/spindle-specific machine data ........................................................................................... 870
10.9.2 Setting data ............................................................................................................................... 870
10.9.2.1 Channel-specific setting data .................................................................................................... 870
10.9.3 System variables....................................................................................................................... 871
10.9.4 Signals....................................................................................................................................... 872
10.9.4.1 Signals from channel................................................................................................................. 872
10.9.4.2 Signals to axis/spindle............................................................................................................... 872
10.9.4.3 Signals from axis/spindle .......................................................................................................... 872

Basic Functions
18 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

11 Emergency Stop (N2) ............................................................................................................................ 873


11.1 Brief description .........................................................................................................................873
11.2 Relevant standards ....................................................................................................................874
11.3 Emergency stop control elements .............................................................................................875
11.4 Emergency stop sequence ........................................................................................................876
11.5 Emergency stop acknowledgement...........................................................................................878
11.6 Data lists ....................................................................................................................................880
11.6.1 Machine data..............................................................................................................................880
11.6.1.1 Drive-specific machine data.......................................................................................................880
11.6.1.2 Axis/spindle-specific machine data............................................................................................880
11.6.2 Signals .......................................................................................................................................880
11.6.2.1 Signals to NC .............................................................................................................................880
11.6.2.2 Signals from NC.........................................................................................................................880
11.6.2.3 Signals to mode group ...............................................................................................................880
12 Transverse Axes (P1) ............................................................................................................................ 881
12.1 Brief description .........................................................................................................................881
12.2 Defining a geometry axis as transverse axis .............................................................................883
12.3 Dimensional information for transverse axes.............................................................................885
12.4 Data lists ....................................................................................................................................891
12.4.1 Machine data..............................................................................................................................891
12.4.1.1 Channel-specific machine data..................................................................................................891
12.4.1.2 Axis/spindle-specific machine data............................................................................................891
13 Basic PLC Program (P3) ....................................................................................................................... 893
13.1 Brief description .........................................................................................................................893
13.2 Key data of the PLC-CPUs for 840D sl and 840Di sl.................................................................895
13.3 Reserve resources (timers, counters, FC, FB, DB, I/O) ............................................................901
13.4 Startup hardware configuration of the PLC-CPUs .....................................................................902
13.5 Starting up the PLC program .....................................................................................................907
13.5.1 Installing the basic program for 840D ........................................................................................907
13.5.2 Application of basic program......................................................................................................907
13.5.3 Version codes ............................................................................................................................908
13.5.4 Machine program .......................................................................................................................908
13.5.5 Data backup ...............................................................................................................................909
13.5.6 PLC-series startup, PLC archive................................................................................................909
13.5.7 Software upgrade.......................................................................................................................912
13.5.8 I/O modules (FM, CP modules) .................................................................................................913
13.5.9 Troubleshooting .........................................................................................................................914
13.6 Linking PLC CPUs to 840D........................................................................................................915
13.6.1 General ......................................................................................................................................915
13.6.2 Features of PLC CPUs ..............................................................................................................915
13.6.3 Interface on 840D with integrated PLC......................................................................................915
13.6.4 Diagnostic buffer on PLC ...........................................................................................................917
13.7 Interface structure ......................................................................................................................918
13.7.1 PLC/NCK interface.....................................................................................................................918
13.7.2 Interface PLC/HMI .....................................................................................................................924

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 19
Table of Contents

13.7.3 PLC/MCP/HHU interface........................................................................................................... 929


13.8 Structure and functions of the basic program ........................................................................... 932
13.8.1 Start-up and synchronization of NCK PLC................................................................................ 934
13.8.2 Cyclical mode (OB 1) ................................................................................................................ 934
13.8.3 Time-interrupt processing (OB 35)............................................................................................ 936
13.8.4 Process interrupt processing (OB 40)....................................................................................... 937
13.8.5 Diagnostic interrupt, module failure processing (OB 82, OB 86) .............................................. 937
13.8.6 Response to NCK failure........................................................................................................... 938
13.8.7 Functions of the basic program called from the user program ................................................. 939
13.8.8 Symbolic programming of user program with interface DB ...................................................... 943
13.8.9 M decoding according to list...................................................................................................... 945
13.8.10 PLC machine data..................................................................................................................... 949
13.8.11 Configuration machine control panel, handheld unit, direct keys ............................................. 952
13.8.12 Switchover of handheld device ................................................................................................. 960
13.9 SPL for Safety Integrated.......................................................................................................... 962
13.10 Assignment overview ................................................................................................................ 963
13.10.1 Assignment: NCK/PLC interface............................................................................................... 963
13.10.2 Assignment: FB/FC ................................................................................................................... 963
13.10.3 Assignment: DB ........................................................................................................................ 964
13.10.4 Assignment: Timers .................................................................................................................. 965
13.11 Memory requirements of basic PLC program for SINUMERIK 840D ....................................... 966
13.12 Basic conditions and NC VAR selector..................................................................................... 969
13.12.1 Supplementary conditions......................................................................................................... 969
13.12.1.1 Programming and parameterizing tools .................................................................................... 969
13.12.1.2 SIMATIC documentation required............................................................................................. 971
13.12.1.3 Relevant SINUMERIK documents ............................................................................................ 971
13.12.2 NC VAR selector ....................................................................................................................... 972
13.12.2.1 Overview ................................................................................................................................... 972
13.12.2.2 Description of functions............................................................................................................. 974
13.12.2.3 Start-up, installation .................................................................................................................. 983
13.13 Block descriptions ..................................................................................................................... 984
13.13.1 FB 1: RUN_UP Basic program, start-up section ....................................................................... 984
13.13.2 FB 2: Read GET NC variable.................................................................................................... 992
13.13.3 FB 3: PUT write NC variables ................................................................................................... 999
13.13.4 FB 4: PI_SERV PI services ..................................................................................................... 1006
13.13.4.1 Overview of available PI services ........................................................................................... 1009
13.13.4.2 General PI services................................................................................................................. 1010
13.13.4.3 PI services of tool management.............................................................................................. 1014
13.13.5 FB 5: GETGUD read GUD variable ........................................................................................ 1028
13.13.6 FB 7: PI_SERV2 PI-services................................................................................................... 1035
13.13.7 FB 9: MtoN Control unit switchover ........................................................................................ 1039
13.13.8 FB 10: Safety relay (SI relay) .................................................................................................. 1044
13.13.9 FB 11: Brake test .................................................................................................................... 1047
13.13.10 FB 29: Signal recorder and data trigger diagnostics............................................................... 1052
13.13.11 FC 2: GP_HP Basic program, cyclic section........................................................................... 1056
13.13.12 FC 3: GP_PRAL Basic program, interrupt-driven section....................................................... 1057
13.13.13 FC 5: GP_DIAG Basic program, diagnostic alarm, and module failure .................................. 1060
13.13.14 FC 7: TM_REV Transfer block for tool change with revolver.................................................. 1061
13.13.15 FC 8: TM_TRANS transfer block for tool management .......................................................... 1065
13.13.16 FC 9: ASUB startup of asynchronous subprograms............................................................... 1072
13.13.17 FC 10: AL_MSG error and operating messages..................................................................... 1074
13.13.18 FC 12: AUXFU call interface for user with auxiliary functions ................................................ 1076

Basic Functions
20 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

13.13.19 FC 13: BHGDisp Display control for handheld unit..................................................................1077


13.13.20 FC 17: YDelta star/delta changeover.......................................................................................1082
13.13.21 FC 18: SpinCtrl spindle control ................................................................................................1085
13.13.22 FC 19: MCP_IFM transmission of MCP signals to interface....................................................1096
13.13.23 FC 21: transfer PLC NCK data exchange................................................................................1103
13.13.24 FC 22: TM_DIR Direction selection for tool management .......................................................1111
13.13.25 FC 24: MCP_IFM2 transmission of MCP signals to interface..................................................1113
13.13.26 FC 25: MCP_IFT transfer of MCP/OP signals to interface ......................................................1117
13.13.27 FC 26: HPU_MCP transmission of HT8 signals to interface ...................................................1120
13.13.27.1 Overview of the NC/PLC interface signals of HT 8 ...............................................................1125
13.13.27.2 Overview of the NC/PLC interface signals of HT 8 ...............................................................1126
13.13.28 FC 19, FC 24, FC 25, FC 26 source code description.............................................................1127
13.14 Signal/data descriptions...........................................................................................................1130
13.14.1 Interface signals NCK/PLC, HMI/PLC, MCP/PLC ...................................................................1130
13.14.2 Decoded M signals ..................................................................................................................1130
13.14.3 G Functions..............................................................................................................................1131
13.14.4 Message signals in DB 2 .........................................................................................................1133
13.15 Programming tips with STEP 7 ................................................................................................1134
13.15.1 Copying data ............................................................................................................................1134
13.15.2 ANY and POINTER..................................................................................................................1135
13.15.2.1 Use of POINTER and ANY in FC.............................................................................................1135
13.15.2.2 Use of POINTER and ANY in FB.............................................................................................1136
13.15.2.3 POINTER or ANY variable for transfer to FC or FB.................................................................1138
13.15.3 Multi-instance DB.....................................................................................................................1140
13.15.4 Strings ......................................................................................................................................1141
13.15.5 Determining offset addresses for data block structures ..........................................................1142
13.15.6 FB calls ....................................................................................................................................1143
13.16 Data lists ..................................................................................................................................1145
13.16.1 Machine data............................................................................................................................1145
13.16.1.1 NC-specific machine data ........................................................................................................1145
13.16.1.2 Channel-specific machine data................................................................................................1145
14 Reference Point Approach (R1)........................................................................................................... 1147
14.1 Brief description .......................................................................................................................1147
14.2 Axis-specific referencing ..........................................................................................................1149
14.3 Channel-specific referencing ...................................................................................................1152
14.4 Reference point appraoch from part program (G74) ...............................................................1154
14.5 Referencing with incremental measurement systems .............................................................1155
14.5.1 Zero mark selection with BERO...............................................................................................1155
14.5.2 Chronological sequence ..........................................................................................................1156
14.5.3 Phase 1: Traversing to the reference cam...............................................................................1157
14.5.4 Phase 2: Synchronization with the zero mark..........................................................................1159
14.5.5 Phase 3: Traversing to the reference point..............................................................................1165
14.5.6 Restoration of position after POWER OFF ..............................................................................1168
14.5.6.1 Buffered actual value ...............................................................................................................1168
14.5.6.2 Position restoration with POWER ON......................................................................................1170
14.6 Referencing with distance-coded reference marks..................................................................1172
14.6.1 General overview .....................................................................................................................1172
14.6.2 Basic parameter assignment ...................................................................................................1173
14.6.3 Chronological sequence ..........................................................................................................1175
14.6.4 Phase 1: Travel across the reference marks with synchronization .........................................1176

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 21
Table of Contents

14.6.5 Phase 2: Travel to fixed stop................................................................................................... 1178


14.7 Referencing by means of actual value adjustment ................................................................. 1181
14.7.1 Actual value adjustment to the referencing measurement system ......................................... 1181
14.7.2 Actual value adjustment to the referenced measurement system .......................................... 1181
14.7.3 Actual value adjustment for measuring systems with distance-coded reference marks ........ 1182
14.8 Referencing in follow-up mode ............................................................................................... 1184
14.9 Referencing with absolute value encoders ............................................................................. 1188
14.9.1 Information about calibration................................................................................................... 1188
14.9.2 Calibration by entering a reference point offset ...................................................................... 1190
14.9.3 Adjustment by entering a reference point value ..................................................................... 1191
14.9.4 Automatic calibration with probe ............................................................................................. 1193
14.9.5 Calibration with BERO ............................................................................................................ 1195
14.9.6 Reference point approach with absolute encoders................................................................. 1196
14.9.7 Reference point approach in rotary absolute encoders with external zero mark.................... 1197
14.9.8 Automatic encoder replacement detection.............................................................................. 1199
14.9.9 Enabling the measurement system......................................................................................... 1200
14.9.10 Referencing variants that are not supported........................................................................... 1202
14.10 Supplementary conditions....................................................................................................... 1203
14.10.1 Large traverse range............................................................................................................... 1203
14.11 Data lists.................................................................................................................................. 1205
14.11.1 Machine data........................................................................................................................... 1205
14.11.1.1 NC-specific machine data ....................................................................................................... 1205
14.11.1.2 Channel-specific machine data............................................................................................... 1205
14.11.1.3 Axis/spindle-specific machine data ......................................................................................... 1205
14.11.2 Signals..................................................................................................................................... 1206
14.11.2.1 Signals to mode group ............................................................................................................ 1206
14.11.2.2 Signals from mode group ........................................................................................................ 1207
14.11.2.3 Signals to channel................................................................................................................... 1207
14.11.2.4 Signals from channel............................................................................................................... 1207
14.11.2.5 Signals to axis/spindle............................................................................................................. 1207
14.11.2.6 Signals from axis/spindle ........................................................................................................ 1207
15 Spindles (S1) ....................................................................................................................................... 1209
15.1 Brief description ...................................................................................................................... 1209
15.2 Operating modes..................................................................................................................... 1210
15.2.1 Overview ................................................................................................................................. 1210
15.2.2 Mode change .......................................................................................................................... 1211
15.2.3 Control mode........................................................................................................................... 1212
15.2.4 Oscillation mode...................................................................................................................... 1215
15.2.5 Positioning mode..................................................................................................................... 1216
15.2.5.1 General functionality ............................................................................................................... 1216
15.2.5.2 Positioning from rotation ......................................................................................................... 1223
15.2.5.3 Positioning from standstill ....................................................................................................... 1227
15.2.6 Axis mode................................................................................................................................ 1230
15.2.6.1 General functionality ............................................................................................................... 1230
15.2.6.2 Implicit transition to axis mode................................................................................................ 1234
15.2.7 Initial spindle state................................................................................................................... 1237
15.3 Reference/synchronize ........................................................................................................... 1238
15.4 Configurable gear adaptation.................................................................................................. 1242
15.4.1 Gear steps for spindles and gear step change ....................................................................... 1242
15.4.2 Parameter set selection during gear step change .................................................................. 1253

Basic Functions
22 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

15.4.3 Intermediate gear.....................................................................................................................1256


15.4.4 Non-acknowledged gear step change .....................................................................................1257
15.4.5 Gear step change with oscillation mode ..................................................................................1258
15.4.6 Gear step change at fixed position ..........................................................................................1264
15.4.7 Configurable gear step in M70.................................................................................................1270
15.5 Selectable spindles ..................................................................................................................1272
15.6 Programming............................................................................................................................1276
15.6.1 Programming from the part program .......................................................................................1276
15.6.2 Programming via synchronized actions ...................................................................................1280
15.6.3 Programming spindle controls via the PLC with FC18 ............................................................1280
15.6.4 Gear step change with DryRun, program testing and SERUPRO...........................................1281
15.6.5 External programming (PLC, HMI)...........................................................................................1283
15.7 Spindle monitoring ...................................................................................................................1285
15.7.1 Speed ranges...........................................................................................................................1285
15.7.2 Axis/spindle stationary (n < n min)...........................................................................................1286
15.7.3 Spindle in setpoint range .........................................................................................................1286
15.7.4 Diagnosis of spindle speed limitation.......................................................................................1288
15.7.5 Minimum/maximum speed of gear step...................................................................................1289
15.7.6 Maximum encoder limit frequency ...........................................................................................1290
15.7.7 End point monitoring ................................................................................................................1292
15.8 Examples .................................................................................................................................1294
15.8.1 Automatic gear step selection (M40) .......................................................................................1294
15.9 Data lists ..................................................................................................................................1295
15.9.1 Machine data............................................................................................................................1295
15.9.1.1 NC-specific machine data ........................................................................................................1295
15.9.1.2 Channel-specific machine data................................................................................................1295
15.9.1.3 Axis/spindle-specific machine data..........................................................................................1295
15.9.2 Setting data ..............................................................................................................................1297
15.9.2.1 Channel-specific setting data...................................................................................................1297
15.9.2.2 Axis/spindle-specific setting data .............................................................................................1297
15.9.3 Signals .....................................................................................................................................1298
15.9.3.1 Signals to axis/spindle .............................................................................................................1298
15.9.3.2 Signals from axis/spindle .........................................................................................................1299
16 Feeds (V1)........................................................................................................................................... 1301
16.1 Brief description .......................................................................................................................1301
16.2 Path feedrate F ........................................................................................................................1304
16.2.1 General ....................................................................................................................................1304
16.2.2 Type of feedrate G93, G94, G95 .............................................................................................1306
16.2.3 Type of feedrate G96, G961, G962, G97, G971......................................................................1308
16.2.4 Feedrate with G33, G34, G35 (thread cutting) ........................................................................1313
16.2.4.1 General ....................................................................................................................................1313
16.2.4.2 Programmable run-in and run-out path for G33, G34 and G35...............................................1314
16.2.4.3 Linear progressive/degressive thread-lead change with G34 and G35...................................1317
16.2.4.4 Stop for thread cutting..............................................................................................................1320
16.2.5 Feedrate for G331/G332, rigid tapping ....................................................................................1324
16.2.6 Feedrate for G63, tapping with compensation chuck ..............................................................1325
16.3 Feedrate FA for positioning axes .............................................................................................1326
16.4 Feedrate control .......................................................................................................................1328
16.4.1 General ....................................................................................................................................1328
16.4.2 Feedrate disable and feedrate/spindle stop.............................................................................1329

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 23
Table of Contents

16.4.3 Feedrate override on machine control panel .......................................................................... 1330


16.4.4 Programmable feedrate override ............................................................................................ 1335
16.4.5 Dry run feedrate ...................................................................................................................... 1336
16.4.6 Multiple feedrate values in one block...................................................................................... 1338
16.4.7 Fixed feedrate values.............................................................................................................. 1343
16.4.8 Feedrate for chamfer/rounding FRC, FRCM........................................................................... 1345
16.4.9 Non-modal feedrate FB........................................................................................................... 1346
16.4.10 Programmable single-axis dynamic response ........................................................................ 1347
16.5 Supplementary conditions....................................................................................................... 1354
16.5.1 General boundary conditions .................................................................................................. 1354
16.5.2 Supplementary conditions for feedrate programming............................................................. 1354
16.6 Examples................................................................................................................................. 1356
16.6.1 Feedrate programming for chamfer/rounding FRC, FRCM .................................................... 1356
16.7 Data lists.................................................................................................................................. 1358
16.7.1 Machine data........................................................................................................................... 1358
16.7.1.1 NC-specific machine data ....................................................................................................... 1358
16.7.1.2 Channel-specific machine data............................................................................................... 1358
16.7.1.3 Axis/Spindle-specific machine data ........................................................................................ 1359
16.7.2 Setting data ............................................................................................................................. 1359
16.7.2.1 Channel-specific setting data .................................................................................................. 1359
16.7.2.2 Axis/spindle-specific setting data ............................................................................................ 1360
16.7.3 Signals..................................................................................................................................... 1360
16.7.3.1 Signals to channel................................................................................................................... 1360
16.7.3.2 Signals from channel............................................................................................................... 1361
16.7.3.3 Signals to axis/spindle............................................................................................................. 1361
17 Tool Offset (W1) .................................................................................................................................. 1363
17.1 Brief description ...................................................................................................................... 1363
17.2 Tool ......................................................................................................................................... 1366
17.2.1 General.................................................................................................................................... 1366
17.2.2 Compensation memory structure............................................................................................ 1368
17.2.3 Calculating the tool compensation .......................................................................................... 1370
17.2.4 Address extension for NC addresses T and M ....................................................................... 1370
17.2.5 Free assignment of D numbers............................................................................................... 1372
17.2.6 Compensation block in case of error during tool change........................................................ 1378
17.2.7 Definition of the effect of the tool parameters ......................................................................... 1381
17.3 Flat D number structure .......................................................................................................... 1383
17.3.1 General.................................................................................................................................... 1383
17.3.2 Creating a new D number (compensation block).................................................................... 1383
17.3.3 D number programming .......................................................................................................... 1384
17.3.4 Programming the T number .................................................................................................... 1387
17.3.5 Programming M6..................................................................................................................... 1387
17.3.6 Program test............................................................................................................................ 1388
17.3.7 Tool management or "Flat D numbers"................................................................................... 1388
17.4 Tool cutting edge..................................................................................................................... 1390
17.4.1 General.................................................................................................................................... 1390
17.4.2 Tool parameter 1: Tool type .................................................................................................... 1392
17.4.3 Tool parameter 2: Cutting edge position................................................................................. 1396
17.4.4 Tool parameters 3 - 5: Geometry - tool lengths ...................................................................... 1398
17.4.5 Tool parameters 6 - 11: Geometry - tool shape ...................................................................... 1399
17.4.6 Tool parameters 12 - 14: Wear - tool lengths ......................................................................... 1401
17.4.7 Tool parameters 15 - 20: Wear - tool shape ........................................................................... 1401

Basic Functions
24 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

17.4.8 Tool parameters 21 - 23: Tool base dimension/adapter dimension ........................................1402


17.4.9 Tool parameter 24: Undercut angle .........................................................................................1403
17.4.10 Tools with a relevant tool point direction..................................................................................1405
17.5 Tool radius compensation 2D (TRC) .......................................................................................1405
17.5.1 General ....................................................................................................................................1405
17.5.2 Selecting the TRC (G41/G42)..................................................................................................1406
17.5.3 Approach and retraction behavior (NORM/KONT/KONTC/KONTT) .......................................1407
17.5.4 Smooth approach and retraction..............................................................................................1413
17.5.4.1 Function ...................................................................................................................................1413
17.5.4.2 Parameters...............................................................................................................................1413
17.5.4.3 Velocities..................................................................................................................................1421
17.5.4.4 System variables......................................................................................................................1423
17.5.4.5 Supplementary conditions........................................................................................................1423
17.5.4.6 Examples .................................................................................................................................1424
17.5.5 Deselecting the TRC (G40)......................................................................................................1427
17.5.6 Compensation at outside corners ............................................................................................1428
17.5.7 Compensation at inside corners ..............................................................................................1432
17.5.8 Collision detection and bottleneck detection............................................................................1434
17.5.9 Blocks with variable compensation value ................................................................................1437
17.5.10 Keep tool radius compensation constant.................................................................................1439
17.5.11 Alarm behavior .........................................................................................................................1442
17.5.12 Intersection procedure for polynomials....................................................................................1443
17.5.13 G461/G462 Approach/retract strategy expansion ...................................................................1443
17.6 Toolholder with orientation capability.......................................................................................1448
17.6.1 General ....................................................................................................................................1448
17.6.2 Kinematic interaction and machine design ..............................................................................1455
17.6.3 Oblique machining with 3 + 2 axes ..........................................................................................1462
17.6.4 Machine with rotary work table ................................................................................................1463
17.6.5 Procedure when using toolholders with orientation capability .................................................1467
17.6.6 Programming............................................................................................................................1472
17.6.7 Supplementary conditions and control system response for orientation .................................1473
17.7 Cutting data modification for tools that can be rotated ............................................................1476
17.7.1 Function ...................................................................................................................................1476
17.7.2 Determination of angle of rotation............................................................................................1476
17.7.3 Cutting edge position, cut direction and angle for rotary tools.................................................1477
17.7.4 Modifications during the rotation of turning tools .....................................................................1480
17.7.5 Cutting edge position for milling and tapping tools ..................................................................1482
17.7.6 Modifications during rotation of milling and tapping tools ........................................................1483
17.7.7 Parameter assignment.............................................................................................................1484
17.7.8 Programming............................................................................................................................1485
17.7.9 Example ...................................................................................................................................1488
17.8 Incrementally programmed compensation values ...................................................................1490
17.8.1 G91 extension ..........................................................................................................................1490
17.8.2 Machining in direction of tool orientation .................................................................................1491
17.9 Basic tool orientation................................................................................................................1493
17.10 Special handling of tool compensations ..................................................................................1498
17.10.1 Relevant setting data ...............................................................................................................1498
17.10.2 Mirror tool lengths (SD42900 $SC_MIRROR_TOOL_LENGTH) .............................................1499
17.10.3 Mirror wear lengths (SD42920 $SC_WEAR_SIGN_CUTPOS) ...............................................1500
17.10.4 Tool length and plane change (SD42940 $SC_TOOL_LENGTH_CONST) ............................1502
17.10.5 Tool type (SD42950 $SC_TOOL_LENGTH_TYPE) ................................................................1503
17.10.6 Temperature offsets in tool direction (SD42960 $SC_TOOL_TEMP_COMP).........................1504

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 25
Table of Contents

17.10.7 Tool lengths in the WCS, allowing for the orientation ............................................................. 1504
17.10.8 Tool length offsets in tool direction ......................................................................................... 1505
17.11 Sum offsets and setup offsets................................................................................................. 1510
17.11.1 General.................................................................................................................................... 1510
17.11.2 Description of function............................................................................................................. 1511
17.11.3 Activation................................................................................................................................. 1514
17.11.4 Examples................................................................................................................................. 1520
17.11.5 Upgrades for tool length determination................................................................................... 1521
17.11.5.1 Taking the compensation values into account location-specifically and workpiece-
specifically ............................................................................................................................... 1521
17.11.5.2 Functionality of the individual wear values.............................................................................. 1526
17.12 Working with tool environments .............................................................................................. 1530
17.12.1 General.................................................................................................................................... 1530
17.12.2 Saving with TOOLENV............................................................................................................ 1530
17.12.3 Delete tool environment .......................................................................................................... 1533
17.12.4 How many environments and which ones are saved? ........................................................... 1534
17.12.5 Read T, D, DL from a tool environment .................................................................................. 1535
17.12.6 Read tool lengths, tool length components............................................................................. 1536
17.13 Tool lengths L1, L2, L3 assignment: LENTOAX ..................................................................... 1542
17.14 Supplementary conditions....................................................................................................... 1546
17.14.1 Flat D number structure .......................................................................................................... 1546
17.14.2 SD42935 expansions .............................................................................................................. 1546
17.15 Examples................................................................................................................................. 1547
17.15.1 Toolholder with orientation capability...................................................................................... 1547
17.15.1.1 Example: Toolholder with orientation capability...................................................................... 1547
17.15.1.2 Example of toolholder with orientation capability with rotary table ......................................... 1548
17.15.1.3 Basic tool orientation example ................................................................................................ 1551
17.15.1.4 Calculation of compensation values on a location-specific and workpiece-specific basis ..... 1551
17.15.2 Examples 3-6: SETTCOR function for tool environments ...................................................... 1554
17.16 Data lists.................................................................................................................................. 1561
17.16.1 Machine data........................................................................................................................... 1561
17.16.1.1 NC-specific machine data ....................................................................................................... 1561
17.16.1.2 Channel-specific machine data............................................................................................... 1561
17.16.1.3 Axis/spindle-specific machine data ......................................................................................... 1563
17.16.2 Setting data ............................................................................................................................. 1563
17.16.2.1 Channel-specific setting data .................................................................................................. 1563
17.16.3 Signals..................................................................................................................................... 1564
17.16.3.1 Signals from channel............................................................................................................... 1564
18 NC/PLC Interface Signals (Z1) ............................................................................................................ 1565
18.1 Brief description ...................................................................................................................... 1565
18.2 Various interface signals and functions (A2)........................................................................... 1566
18.2.1 Signals from PLC to NC (DB10) ............................................................................................. 1566
18.2.2 Selection/Status signals from HMI to PLC (DB10) ................................................................. 1567
18.2.3 Signals from the NC to the PLC (DB10) ................................................................................. 1568
18.2.4 Signals to operator panel front (DB19) ................................................................................... 1572
18.2.5 Signals from operator panel front (DB19) ............................................................................... 1581
18.2.6 Signals to channel (DB21, ...) ................................................................................................. 1588
18.2.7 Signals from channel (DB21, ...) ............................................................................................. 1589
18.2.8 Signals to axis/spindle (DB31, ...) ........................................................................................... 1590
18.2.9 Signals from axis/spindle (DB31, ...)....................................................................................... 1605

Basic Functions
26 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Table of Contents

18.3 Axis monitoring, protection zones (A3) ....................................................................................1627


18.3.1 Signals to channel (DB21, ...) ..................................................................................................1627
18.3.2 Signals from channel (DB21, ...) ..............................................................................................1628
18.3.3 Signals to axis/spindle (DB31, ...) ............................................................................................1629
18.3.4 Signals from axis/spindle (DB31, ...)........................................................................................1631
18.4 Continuous-path mode, exact stop and LookAhead (B1)........................................................1632
18.4.1 Signals from channel (DB21, ...) ..............................................................................................1632
18.4.2 Signals from axis/spindle (DB31, ...)........................................................................................1632
18.5 Travel to fixed stop (F1) ...........................................................................................................1634
18.5.1 Signals to axis/spindle (DB31, ...) ............................................................................................1634
18.5.2 Signals from axis/spindle (DB31, ...)........................................................................................1635
18.6 Help function output to PLC (H2) .............................................................................................1637
18.6.1 Signals to channel (DB21, ...) ..................................................................................................1637
18.6.2 Signals from channel (DB21, ...) ..............................................................................................1637
18.6.3 Signals from axis/spindle (DB31, ...)........................................................................................1642
18.7 Mode group, channel, program operation, reset response (K1)..............................................1643
18.7.1 Signals to mode group (DB11).................................................................................................1643
18.7.2 Signals from the mode group (DB11) ......................................................................................1648
18.7.3 Signals to channel (DB21, ...) ..................................................................................................1652
18.7.4 Signals from channel (DB21, ...) ..............................................................................................1658
18.7.5 Signals to axis/spindle (DB31, ...) ............................................................................................1672
18.7.6 Signals from axis/spindle (DB31, ...)........................................................................................1673
18.8 Axis types, coordinate systems, frames (K2)...........................................................................1675
18.8.1 Signals to axis/spindle (DB31, ...) ............................................................................................1675
18.9 Emergency Stop (N2) ..............................................................................................................1676
18.9.1 Signals to NC (DB10)...............................................................................................................1676
18.9.2 Signals from NC (DB10) ..........................................................................................................1677
18.10 PLC basic program (P3) ..........................................................................................................1678
18.11 Reference point approach (R1)................................................................................................1679
18.11.1 Signals to channel (DB21, ...) ..................................................................................................1679
18.11.2 Signals from channel (DB21, ...) ..............................................................................................1680
18.11.3 Signals to axis/spindle (DB31, ...) ............................................................................................1680
18.11.4 Signals from axis/spindle (DB31, ...)........................................................................................1681
18.12 Spindles (S1)............................................................................................................................1684
18.12.1 Signals to axis/spindle (DB31, ...) ............................................................................................1684
18.12.2 Signals from axis/spindle (DB31, ...)........................................................................................1690
18.13 Feeds (V1) ...............................................................................................................................1697
18.13.1 Signals to channel (DB21, ...) ..................................................................................................1697
18.13.2 Signals to axis/spindle (DB31, ...) ............................................................................................1704
18.13.3 Signals from axis/spindle (DB31, ...)........................................................................................1710
A Appendix.............................................................................................................................................. 1711
A.1 List of abbreviations .................................................................................................................1711
A.2 Feedback on the documentation..............................................................................................1719
A.3 Overview ..................................................................................................................................1721
Glossary .............................................................................................................................................. 1723
Index.................................................................................................................................................... 1745

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 27
Table of Contents

Basic Functions
28 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
1
Various NC/PLC Interface Signals and Functions
(A2)

1.1 Brief description

Content
The PLC/NCK interface comprises a data interface on one side and a function interface on
the other. The data interface contains status and control signals, auxiliary functions and
G functions, while the function interface is used to transfer jobs from the PLC to the NCK.
This Description describes the functionality of interface signals, which are of general
relevance but are not included in the Descriptions of Functions.
● Asynchronous events
● Status signals
● PLC variable (read and write)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 29
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

1.2 NC/PLC interface signals

1.2.1 General

NC/PLC interface
The NC/PLC interface comprises the following parts:
● Data interface
● Function interface

Data interface
The data interface is used for component coordination:
● PLC user program
● NC
● HMI (operator components)
● MCP (Machine Control Panel)
Data exchange is organized by the basic PLC program.

Cyclic signal exchange


The following interface signals are transferred cyclically, i.e. in the clock grid of the OB1, by
the basic PLC program:
● NC and operator-panel-front-specific signals
● Mode group-specific signals
● Channel-specific signals
● Axis/spindle-specific signals

NC and operator-panel-front-specific signals (DB10)


PLC to NC:
● Signals for influencing the CNC inputs and outputs
● Keyswitch signals (and password)
NC to PLC:
● Actual values of CNC inputs
● Setpoints of CNC outputs
● Ready signals from NC and HMI
● NC status signals (alarm signals)

Basic Functions
30 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

Channel-specific signals (DB21, ...)


PLC to NC:
● Control signal "Delete distance-to-go"
NC to PLC:
● NC status signals (NCK alarm active)

Axis/spindle-specific signals (DB31, etc.)


PLC to NC:
● Control signals to axis/spindle (e.g. follow-up mode, servo enable, etc.)
● Control signals to drive (bytes 20, 21)
NC to PLC:
● Status signals from axis/spindle (e.g. position controller active, current controller active,
etc.)
● Control signals from drive (bytes 93, 94)

Function interface
The function interface is generated by function blocks (FB) and function calls (FC). Function
requests, e.g. to traverse axes, are sent from the PLC to the NC via the function interface.

References
For detailed information about the following subject areas, please refer to:
● Description of the basic PLC program:
→ Function Manual, Basic Functions, Basic PLC Program (P3)
● Description of the event-driven signal exchange (Auxiliary and G functions):
→ Function Manual Basic Functions; Auxiliary Function Output to PLC (H2)
● Overview of all interface signals, functional and data components:
→ Parameter Manual

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 31
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

1.2.2 Ready signal to PLC

DB10 DBX104.7 (NC-CPU-Ready)


The NC CPU is ready and registers itself cyclically with the PLC.

DB10 DBX108.1 (HMI-CPU2-Ready)


HMI CPU2 is ready and registers itself cyclically to NC.
References:
/FB2/ Function Manual, Expansion Functions; Several Control Panels on Multiple NCUs,
Decentralized Systems (B3)

DB10 DBX108.2 (HMI-CPU1-Ready, HMI an MPI)


The HMI CPU1 is ready and registers itself cyclically with the NC. Operator unit connection
via MPI interface.

DB10 DBX108.3 (HMI-CPU1-Ready, HMI at BTSS)


The HMI CPU1 is ready and registers itself cyclically with the NC. Operator unit connection
via OPI interface.

DB10 DBX108.6 (611D-Ready)


Group signal: All available SIMODRIVE 611D drives ready.
Condition: Readiness of all machine axes:
DB31, ... DBX93.5 (Drive Ready) = 1
611D Ready is only output in conjunction with SIMODRIVE 611D drives.

DB10 DBX108.7 (NC-Ready)


The NC is ready.

Basic Functions
32 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

1.2.3 Status signals to PLC

DB10 DBX103.0 (remote diagnosis active)


The HMI component reports to the PLC that the remote diagnostics (option) is active i.e. the
control is done via an external PC.

DB10 DBX109.6 (ambient temperature alarm)


The ambient temperature or fan monitoring function has responded.

DB10 DBX109.7 (NCK battery alarm)


The battery voltage has dropped below the lower limit value. The control can still be
operated. A control system shutdown or failure of the supply voltage will lead to loss of data.

DB10 DBX109.0 (NCK alarm pending)


The NC signals that at least one NC alarm is pending. The channel-specific interface can be
scanned to see which channels are involved and whether this will cause a processing stop.

DB21, ... DBX36.6 (channel-specific NCK alarm pending)


The NC sends this signal to the PLC to indicate that at least one NC alarm is pending for the
affected channel. See also:
DB21, ... DBX36.7 (NCK alarm with processing stop present)

DB21, ... DBX36.7 (NCK alarm with processing stop present)


The NC sends this signal to the PLC to indicate that at least one NCK alarm, which has
interrupted or aborted the current program run (processing stop), is pending for the affected
channel.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 33
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

1.2.4 SINUMERIK 840Di-specific interface signals


For a detailed description of the SINUMERIK 840Di-specific interface signals, please refer to:
Reference
/HBI/ SINUMERIK 840Di Manual

1.2.5 Signals to/from panel front

DB19 DBX0.0 (screen bright)


The screen blanking is disabled.

DB19 DBX0.1 (darken screen)


The operator panel screen is darkened.
If the interface signal is used to actively darken the screen:
● It is no longer possible to switch the screen bright again on the keyboard (see below).
● The first keystroke on the operator panel already triggers an operator action.

Note
In order to prevent accidental operator actions when the screen is darkened via the
interface signal, we recommend disabling the keyboard at the same time.
DB19 DBX0.1 = 1 AND DB19 DBX0.2 = 1 (key disable)

Screen darkening via keyboard/automatic screen saver


If no buttons are pressed on the operator panel front within the assigned time (default = 3
minutes):
MD9006 $MM_DISPLAY_BLACK_TIME
(time for screen darkening), the screen is automatically darkened.
The screen lights up again the first time a button is pressed following darkening. Pressing a
button to lighten the screen will not generate an operator action.
Parameterization:
DB19 DBX0.1 = 0
MD9006 $MM_DISPLAY_BLACK_TIME > 0

DB19 DBX0.2 (key disable)


All inputs via the connected keyboard are inhibited.

Basic Functions
34 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB19 DBX 0.3/0.4 (Delete cancel alarms/Delete recall alarms)


Request to delete all currently pending alarms with Cancel or Recall delete criterion. Deletion
of the alarms is acknowledged via the following interface signals.
● DB19 DBX20.3 (Cancel alarm deleted)
● DB19 DBX20.4 (recall alarm deleted)

DB19 DBX0.7 (Actual value in WCS, 0=MCS)


Switching over of actual-value display between machine and workpiece coordinate system:
● DB19 DBX0.7 = 0: Machine coordinate system (MCS)
● DB19 DBX0.7 = 1: Workpiece coordinate system (WCS)

DB19 DBB12 (control of V24 interface) (HMI Embedded only)


Job interface to control RS-232C. The jobs relate to the user control files in the interface
signals:
DB19 DBB14 (control of the V24 interface)
DB19 DBB15 (control of the V24 interface)

DB19 DBB13 (control of the file transfer via hard disk) (HMI advanced only)
Job byte to control file transfer via hard disk. The jobs relate to the user control file in the
interface signals:
DB19 DBB16 (part program handling: Number of the control file for user file names)
DB19 DBB17 (part program handling: Index of the file to be transmitted from the user list)

DB19 DBB14 (control of V24 interface) (HMI Embedded only)


Description byte to specify the PLC index of the axis, channel or TO number for the standard
control file. The standard control file is processed in accordance with the job in the interface
signal:
DB19 DBB12

DB19 DBB15 (control of the V24 interface) (HMI embedded only)


Description byte to specify the line in the standard/user control file in which the file to be
transferred is stored.

DB19 DBB16 (control of file transfer via hard disk) (HMI Advanced only)
Control byte for file transfer via hard disk to define the index for the control file (job list). This
file is handled according to the job in the interface signal:
DB19 DBB13

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 35
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB19 DBB17 (control of file transfer via hard disk) (HMI Advanced only)
Control byte for file transfer via hard disk to indicate the line in the user control file in which
the control file to be transferred is stored

DB19 DBB24 (control of V24 interface) (HMI Embedded only)


Status byte for current status of data transfer for "RS-232 ON", "RS-232 OFF", "RS-232
EXTERNAL", "RS-232 STOP", etc., or if an error occurred during data transfer.

DB19 DBB25 (control of V24 interface) (HMI Embedded only)


Output byte for RS-232 data transmission error values.

DB19 DBB26 (control of the file transfer via hard disk) (HMI advanced only)
Status byte for current status of data transfer for "select", "load" or "unload", or if an error
occurred during data transmission.

DB19 DBB27 (control of the file transfer via hard disk) (HMI advanced only)
Output byte for error values for data transfer via hard disk.

1.2.6 Signals to channel

DB21, ... DBX6.2 (delete distance-to-go)


The rising edge on the interface signal generates a stop on the programmed path in the
corresponding NC channel with the currently active path acceleration. The path distance-to-
go is then deleted and the block change to the next part-program block is enabled.

1.2.7 Signals to axis/spindle

DB31, ... DBX1.0 (drive-test travel enable)


If machine axes are traversed by special test functions such as "function generator", an
explicit drive-test-specific enable is requested for the movement:
DB31, ... DBX61.0 = 1 (drive test travel request)
The movement is carried out once the movement is enabled:
DB31, ... DBX1.0 == 1 (drive-test travel enable)

Basic Functions
36 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

NOTICE
It is the sole responsibility of the machine manufacturer/system startup engineer to take
suitable action/carry out appropriate tests to ensure that the machine axis can be traversed
during the drive test without putting personnel or machinery at risk.

DB31, ... DBX1.3 (axis/spindle disable)


Axis disable when machine axis is at rest
No traversing request (manual or automatic) is carried out for a machine axis at rest and
NC/PLC interface signal:
DB31, ... DBX1.3 == 1 (axis/spindle disable)
The traversing request is maintained. If the axis disable is cancelled when a traversing
request is pending DB31, ... DBX1.3 = 0 the movement is carried out.
Axis disable when machine axis in motion
When machine axis is in motion and NC/PLC interface signal DB31, ... DBX1.3 == 1 the
movement of the machine axis is decelerated to a standstill via the axis-specific brake
characteristics currently active or, if it is part of an interpolated path movement or coupling, it
is decelerated on a path or coupling-specific basis.
The movement is continued if the axis disable is canceled by another pending traversing
request: DB31, ... DBX1.3 = 0.
Spindle disable
The response is determined by the current spindle mode:
● Control mode: Speed setpoint = 0
● Positioning mode: See above "Axis disable".

DB31, ... DBX1.4 (follow-up mode)


"Follow-up mode" is only effective in conjunction with the NC/PLC interface signal:
DB31, ... DBX2.1 (servo enable)

DB31, ... DBX2.1 DB31, ... DBX1.4 Function


1 Ineffective Normal operation (machine axis in closed-loop control mode)
0 1 Follow-up
0 0 Hold
Function: Follow-up
During follow-up, the setpoint position of the machine axis is continuously corrected to the
actual position (setpoint position = actual position).
The following interface signals have to be set for the follow-up function:
DB31, ... DBX2.1 = 0 (servo enable)
DB31, ... DBX1.4 == 1 (tracking mode)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 37
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

Feedback:
DB31, ... DBX61.3 = 1 (follow-up mode active)

Note
When the servo enable is set from follow-up mode, if the part program is active, the last
programmed position is approached again internally in the NC (REPOSA: Approach along line
on all axes). In all other cases, all subsequent movements start at the current actual position.

During "follow-up", clamping or zero-speed monitoring are not active.


Function: Hold
The hold function does not correct the setpoint position of the machine axis to the actual
position. If the machine axis moves away from the setpoint position, a following error
(difference between setpoint and actual position) is generated. This error is corrected
"suddenly" when the servo enable is set by the position controller, without observing the
axial acceleration characteristic.
The following interface signals have to be set for the hold function:
DB31, ... DBX2.1 = 0 (servo enable)
DB31, ... DBX1.4 == 0 (follow-up mode)
Feedback:
DB31, ... DBX61.3 = 0 (follow-up mode active)
During "hold", clamping or zero-speed monitoring are active.

NOTICE
With the "hold" function, once the servo enable has been set, the setpoint/actual-value
difference is corrected: directly by the position controller, i.e. without following the axial
acceleration characteristic.

Application example
Positioning response of machine axis Y following clamping when "servo enable" set.
Clamping pushed the machine axis from the actual position Y1 to the clamping position Yk.

Basic Functions
38 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

3RVLWLRQVHWSRLQW
IURP,32

3RVLWLRQ
B FRQWUROOHU
 &RQWUROOHU
HQDEOHFDQFHOHG

)ROORZXSVHWSRLQW

3RVLWLRQDFWXDOYDOXH

Figure 1-1 Effect of servo enable and follow-up mode

< ,6)ROORZXSPRGH 
5HPRYH,66HUYRHQDEOH
6HTXHQFH 7HUPLQDOV
'LVFRQQHFWWHUPLQDOV
6HW,66HUYRHQDEOH

<. 1
 < 
 5HWXUQ XVLQJSRVLWLRQFRQWUROOHU WR
1 <. SUHFODPSLQJSRVLWLRQ < ZKHQ
  VHWWLQJVHUYRHQDEOH
3RVLWLRQVKLIWUHVXOWLQJIURP 
FODPSLQJ
<

;

Figure 1-2 Trajectory for clamping and "hold"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 39
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

,6)ROORZXSPRGH 
< 5HPRYH,66HUYRHQDEOH
6HTXHQFH 7HUPLQDOV
'LVFRQQHFWWHUPLQDOV
6HW,66HUYRHQDEOH

3DWKIROORZHGLIQRSDUWSURJUDPLVDFWLYH

7UDMHFWRU\LILQ1RQO\;LV
SURJUDPPHGDQGWKHSDUWSURJUDPLV
<. DFWLYH 
< 1 5HWXUQXVLQJ5(326$LISDUW
SURJUDPLVDFWLYHLQ$8720$7,&
1 <. PRGH

$[LVPRYHPHQWJHQHUDWHGIURP
3RVLWLRQVKLIWUHVXOWLQJIURP SURJUDPPHGSRVLWLRQ <
FODPSLQJ <

;

Figure 1-3 Trajectory for clamping and "follow-up"

Drives with analog setpoint interface


A drive with an analog setpoint interface is capable of traversing the machine axis with an
external setpoint. If "follow-up mode" is set for the machine axis, the actual position
continues to be acquired. Once follow-up mode has been cancelled, homing is not required.
The following procedure is recommended:
1. Activate follow-up mode:
DB31, ... DBX2.1 = 0 (servo enable)
DB31, ... DBX1.4 = 1 (follow-up mode) (in the same or preceding OB1 cycle)
→ The axis/spindle is operating in follow-up mode
2. Deactivate external servo enable and external speed setpoint
→ Axis/spindle moves with external setpoint
→ NC continues to detect the actual position and corrects the setpoint position to the
actual position

Basic Functions
40 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

3. Deactivate external servo enable and cancel external speed setpoint


→ Axis/spindle stops
4. Canceling follow-up mode
DB31, ... DBX2.1 = 1 (servo enable)
DB31, ... DBX1.4 == 0 (follow-up mode)
→ NC synchronizes to current actual position. The next traversing movement begins at
this position.

Note
"Follow-up mode" does not have to be canceled because it only has an effect in
combination with "servo enable".

Canceling follow-up mode


Once follow-up mode has been canceled, the machine axis does not have to be homed
again if the maximum permissible encoder limit frequency of the active measuring system
was not exceeded during follow-up mode. If the encoder limit frequency is exceeded, the
controller will detect this:
● DB31, ... DBX60.4/60.5 = 0 (homed/synchronized 1/2)
● Alarm: "21610 Encoder frequency exceeded"

Note
If "follow-up mode" is deactivated for a machine axis, which is part of an active
transformation (e.g. TRANSMIT), this can generate movements as part of repositioning
(REPOS) other machine axes involved in the transformation.

Monitoring
If a machine axis is in follow-up mode, the following monitoring mechanisms will not act:
● Zero-speed monitoring
● Clamping monitoring
● Positioning monitoring
Effects on other interface signals:
● DB31, ... DBX60.7 = 0 (position reached with exact stop fine)
● DB31, ... DBX60.6 = 0 (position reached with exact stop coarse)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 41
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB31, ... DBX1.5/1.6 (position measuring system 1/2)


2 measuring systems can be connected to one machine axis, e.g.
● Indirect motor measuring system
● Direct measuring system on load
Only one measuring system can be active at any one time. All closed-loop control,
positioning operations, etc. involving the machine axis always relate to the active measuring
system.

3RVLWLRQUHIHUHFHYDOXH LVHW
IURPLQWHUSRODWRU
3RVLWLRQ 6SHHG 3RZHU (QFRG (QFRG
B FRQWUROOHU B FRQWUROOHU 0RWRU
FRQWUROOHU  
LDFW
QDFW

   30

30

30
30
3DUNLQJD[LV

Figure 1-4 Position measuring system 1 and 2

The table below shows the functionality of the interface signals in conjunction with the "servo
enable".

DB31, ... DBX1.5 DB31, ... DBX1.6 DB31, ... DBX2.1 Function
1 0 (or 1) 1 Position measuring system 1 active
0 1 1 Position measuring system 2 active
0 0 0 "Parking" active
0 0 1 Spindle without position measuring system (speed-
controlled)
1 -> 0 0 -> 1 1 Switchover: Position measuring system 1 → 2
0 -> 1 1 -> 0 1 Switchover: Position measuring system 2 → 1

Basic Functions
42 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB31, ... DBX2.1 (servo enable)


Setting the servo enable closes the machine axis position control loop. The machine axis is
in position control mode.
DB31, ... DBX2.1 == 1
Canceling the servo enable opens the machine axis position control loop and, subject to a
delay, the machine axis speed control loop:
DB31, ... DBX2.1 == 0
Activation methods
The closed-loop servo enable for a machine axis is influenced by:
● PLC user program by means of the following NC/PLC interface signals:
– DB31, ... DBX2.1 (servo enable)
– DB31, ... DBX21.7 (pulse enable)
– DB31, ... DBX93.5 (drive ready)
– DB10, DBX56.1 (EMERGENCY STOP)
● NCK-internal
Alarms that trigger cancellation of the servo enable on the machine axes. Alarms, which
cancel the servo enable, are described in:
References:
/DA/Diagnostics Manual
Canceling the servo enable when the machine axis is at standstill:
● The machine axis position control loop opens
● DB31, ... DBX61.5 = 0 (position controller active)
Canceling the servo enable when the machine axis is in motion:
If a machine axis is part of an interpolatory path movement or coupling and the servo enable
for this is canceled, all axes involved are stopped with a fast stop (speed setpoint = 0) and
an alarm is displayed:
Alarm: "21612 Servo enable reset during movement"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 43
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

● The machine axis is decelerated taking into account the parameterized temporal duration
of the brake ramp for error states with a fast stop (speed setpoint = 0):
MD36610 $MA_AX_EMERGENCY_STOP_TIME (max. time duration of the braking ramp
in event of errors)
An alarm is displayed:
Alarm: "21612 Servo enable reset during movement"

Note
The servo enable is canceled at the latest when the cutout time expires:
MD36610 $MA_AX_EMERGENCY_STOP_TIME

● The machine axis position control loop opens. Interface signal:


DB31, ... DBX61.5 = 0 (position controller active).
The time for the parameterized cut-off delay of the servo enable is started by the machine
data:
MD36620 $MA_SERVO_DISABLE_DELAY_TIME (switch-off delay servo enable)
● As soon as the actual speed has reached the zero speed range, the drive servo enable is
canceled. Interface signal:
DB31, ... DBX61.6 = 0 (speed controller active)
● The position actual value of the machine axis continues to be acquired by the control.
● At the end of the braking operation, the machine axis is switched to follow-up mode,
regardless of the corresponding NC/PLC interface signal. Zero-speed and clamping
monitoring are not effective. See the description above for the interface signal:
DB31, ... DBX1.4 (follow-up mode).
Synchronizing the actual value (homing)
Once the servo enable has been set, the actual position of the machine axis does not need
to be synchronized again (homing) if the maximum permissible limit frequency of the
measuring system was not exceeded during the time in which the machine axis was not in
position-control mode.

Basic Functions
44 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

3RVLWLRQFRQWUROOHURSHQHGLPPHGLDWHO\

)3 )3
DFW
$[LVLVPRYLQJ
5DSLGVWRS
ZLWKRSHQFLUFXLWSRVLWLRQFRQWUROORRS

0'67$1'67,//B9(/2B72/ )3
VHW
W

0'$;B(0(5*(1&<B6723B7,0(

,66HUYRHQDEOH 0'6(592B',6$%/(B'(/$<B7,0(


 W

,63RVLWLRQFRQWUROOHUDFWLYH


 W

 6HUYRHQDEOHWRGULYH
,66SHHGFRQWUROOHUDFWLYH
 W

Figure 1-5 Canceling the servo enable when the machine axis is in motion

DB31, ... DBX2.2 (Delete distance-to-go/Spindle reset (axis-/spindle-specific))


"Delete distance-to-go" is effective in AUTOMATIC and MDA modes only in conjunction with
positioning axes. The positioning axis is decelerated to standstill following the current brake
characteristic. The distance-to-go of the axis is deleted.
Spindle reset
A detailed description of the spindle reset can be found in:
References:
/FB1/ Function Manual Basic Functions; Spindles (S1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 45
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB31, ... DBX9.0/9.1/9.2 (controller parameter set selection)


The PLC user program sends a binary code request via the "controller parameter set
selection" to activate the corresponding parameter set of the NC.

DBX9.2 DBX9.1 DBX9.0 Parameter-set number


0 0 0 1
0 0 1 2
0 1 0 3
0 1 1 4
1 0 0 5
1 0 1 6
1 1 0 6
1 1 1 6
Parameter-set changeover must be enabled via the machine data (not required for spindles):
MD35590 $MA_PARAMSET_CHANGE_ENABLE = 1 or 2
More information about parameter set changeover can be found in:
References:
/FB1/ Function Manual, Basic Functions; Spindles (S1);
Chapter: Configurable gear adjustments > parameter set selection during gear stage change
Parameter set changeover when machine axis is in motion
The response to a parameter-set changeover depends on the consequential change in the
closed-loop control circuit gain factor Kv:
MD32200 $MA_POSCTRL_GAIN (KV-Factor) (KV-Factor)
● "Identical servo gain factors" or "position control not active":
The NC responds immediately to the parameter-set changeover. The parameter set is
also changed during the movement.
● "Non-identical servo gain factors" or "position control active":
In order to effect a changeover as smoothly as possible, changeover is not activated until
the axis "is stationary", i.e. once the parameterized zero speed has been reached or
undershot:
DB31, ... DBX61.4 = 1 (axis/spindle stationary)
MD36060 $MA_STANDSTILL_VELO_TOL (threshold velocity/speed 'axis/spindle
stationary')

Basic Functions
46 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

Parameter set changeover from the part program


For parameter-set changeover from the part program, the user (machine manufacturer) must
define corresponding user-specific auxiliary functions and evaluate them in the PLC user
program. The PLC user program will then set the changeover request on the corresponding
parameter set.
More information about auxiliary function output can be found in:
References:
/FB1/ Function Manual, Basic Functions; Auxiliary function output (H2)

DB31, ... DBX9.3 (disable parameter-set default setting by NC)


Parameter-set changeover request will be ignored.

1.2.8 Signals from axis/spindle

DB31, ... DBX61.0 (drive test travel request)


If machine axes are traversed by special test functions such as "function generator", an
explicit drive-test-specific enable is requested for the movement:
DB31, ... DBX61.0 == 1 (drive test travel request)
The movement is carried out once the movement is enabled:
DB31, ... DBX1.0 == 1 (drive-test travel enable)

DB31, ... DBX61.3 (follow-up mode active)


The machine axis is in follow-up mode.

DB31, ... DBX61.4 (axis/spindle stationary)


"Axis/spindle stationary" is set by the NC if:
● No new setpoints are to be output AND
● The actual speed of the machine axis is lower than the parameterized zero speed:
MD36060 $MA_STANDSTILL_VELO_TOL (threshold velocity axis stationary)

DB31, ... DBX61.5 (position controller active)


The machine axis position control loop is closed and position control is active.

DB31, ... DBX61.6 (speed controller active)


The machine axis speed control loop is closed and speed control is active.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 47
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB31, ... DBX61.7 (current controller active)


The machine axis current control loop is closed and current control is active.

DB31, ...DBX69.0/69.1/69.2 (controller parameter set)


Active parameter set Coding accordingly:
DB31, ... DBX9.0/9.1/9.2 (controller parameter set selection)

DB31, ... DBX76.0 (lubrication pulse)


Following a control POWER ON/RESET, the signal status is 0 (FALSE).
The "lubrication pulse" is inverted (edge change), as soon as the machine axis has covered
the parameterized traversing distance for lubrication:
MD33050 $MA_LUBRICATION_DIST (distance for lubrication by PLC)

1.2.9 Signals to axis/spindle (digital drives)

DB31, ... DBX20.1 (ramp-function generator fast stop)


A "fast stop" is requested for the drive. The drive is then stopped without a ramp function
(speed setpoint 0). Servo enable is maintained.

DB31, ... DBX20.2 (torque limit 2)


Request for torque limit 2. The limit value is specified in the drive parameters.

DB31, ... DBX20.3 (speed setpoint smoothing)


Request to smooth the speed setpoint.

DB31, ... DBX21.0/21.1/21.2 (drive parameter set selection A, B, C)


Request to change over drive parameter set:

DBX 21.2 DBX 21.1 DBX21.0 Parameter-set number


0 0 0 1
0 0 1 2
0 1 0 3
0 1 1 4
1 0 0 5
1 0 1 6
1 1 0 7
1 1 1 8
The feedback signal is sent via the interface signals:
DB31, ... DBX93.0,1/93.2 (active drive parameter set)

Basic Functions
48 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB31, ... DBX21.3/21.4 (Motor selection A, B)


Selection of motor/operating mode.

DBX 21.4 DBX 21.3 Motor number Operating mode


0 0 1 1
0 1 2 2
1 0 3 3 1)
1 1 4 4 1)

1) Can only be used on SIMODRIVE 611D Performance2 control module and SIMODRIVE 611U
Only operating modes 1 and 2 are valid on main spindle drive:
● Operating modes 1: Star
● Operating modes 2: Delta

DB31, ... DBX21.5 (Motor selection done)


The PLC user program sends this signal to the drive to indicate successful motor selection.
For example, in the case of star/delta switchover on the SIMODRIVE 611D or 611U, a
message or signal must be provided when the motor contactor has switched. The pulses are
then enabled by the drive.

DB31, ... DBX21.6 (integrator disable, n-controller)


The PLC user program inhibits the integrator of the speed controller for the drive. The speed
controller is thus switched from PI to P controller.
Note
If the speed controller integrator disable is activated, compensations might take place in
certain applications (e.g. if the integrator was already holding a load while stationary).
Feedback via the interface signal:
DB31, ... DBX93.6 = 1 (integrator n-controller disabled)

DB31, ... DBX21.7 (pulse enable)


The pulse enable for the drive module is only requested if all enable signals (hardware and
software) are pending:
● Trigger equipment enable
● Servo and pulse enable (terminal 63)
● Pulse enable (safe operational stop) (terminal 663)
● Stored hardware input

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 49
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

● Setpoint enable (terminal 64)


● "Status ready for traverse" (terminal 72/73)
– No 611D drive alarm (DClink1 error)
– DC link connected
– Ramp-up completed
See also:
DB31, ... DBX93.7 (pulses enabled)

1.2.10 Signals from axis/spindle (digital drives)

DB31, ... DBX92.0 (setup mode active)


On the drive, "setup mode" is active.

DB31, ... DBX92.1 (ramp-function generator fast stop active)


The drive signals back to the PLC that ramp-function-generator fast stop is active. The drive
is thus brought to a standstill without the ramp function (with speed setpoint 0).

DB31, ... DBX92.2 (torque limit 2 active)


The drive signals back to the PLC that torque limit 2 is active for the axis/spindle. The torque
limit value is defined with the drive parameters.

DB31, ... DBX92.3 (speed setpoint smoothing active)


The PLC user program requests speed-setpoint smoothing filter for the axis/spindle. The
smoothing is activated in the drive module only under certain conditions.

DB31, ... DBX93.0, 1, 2 (active drive parameter set A, B, C)


The drive module sends this checkback to the PLC to indicate which drive parameter set is
currently active. With bit combination A, B, C, eight different drive parameter sets can be
selected by the PLC for the SIMODRIVE 611D.

DB31, ... DBX93.3, 4 (active motor A, B)


The drive module (MSD) sends this checkback to the PLC to indicate which of the 4 motor
types or motor operating modes is active.
The following selections can be made on the main spindle drive:
● Star mode (A=0, B=0)
● Delta mode (A=1, B=0)
On the 611D with Performance2 controller module and 611U, combinations A = 0, B = 1 and
A = 1, B = 1 may also be selected.

Basic Functions
50 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB31, ... DBX93.5 (DRIVE ready)


Checkback signal indicating that the drive is ready. The conditions required for traversing the
axis/spindle are fulfilled.

DB31, ... DBX93.6 (integrator n-controller disabled)


The speed-controller integrator is disabled. The speed controller has thus been switched
from PI to P controller.

DB31, ... DBX93.7 (pulses enabled)


The pulse enable for the drive module is available. The axis/spindle can now be traversed.

DB31, ... DBX94.0 (motor temperature prewarning)


The motor temperature has exceeded the warning threshold. If the motor temperature
remains at this level, the drive will be stopped after a defined time (drive MD) and the pulse
enable removed.

DB31, ... DBX94.1 (heat-sink temperature prewarning)


The heat-sink temperature has exceeded the warning threshold. The pulse enable will be
removed for the drive module in question after 20 seconds.

DB31, ... DBX94.2 (ramp-up function completed)


This signal indicates that the actual speed value has reached the new setpoint allowing for
the tolerance band set in drive machine data:
MD1426 $MD_SPEED_DES_EQ_ACT_TOL (indicate tolerance band for 'nsoll=nist')
The acceleration procedure is thus completed. Any subsequent speed fluctuations due to
load changes will not affect the interface signal.

DB31, ... DBX94.3 (|Md| < Mdx)


This signal indicates that the current torque |Md| is lower than the parameterized threshold
torque Mdx:
MD1428 $MD_TORQUE_THRESHOLD_X (threshold torque)
The threshold torque is entered as a percentage of the current speed-dependent torque
limitation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 51
Various NC/PLC Interface Signals and Functions (A2)
NC/PLC interface signals

DB31, ... DBX94.4 (|nact| < nmin)


This signal indicates that the actual speed |nact| is lower than the set minimum speed nmin:
MD1418 $MD_SPEED_THRESHOLD_MIN (nmin for 'nist<nmin' message)

DB31, ... DBX94.5 (|nact| < nix)


This signal indicates that the actual speed |nact| is lower than the set threshold speed nx:
MD1417 $MD_SPEED_THRESHOLD_X (nx for 'nist<nx'message)

DB31, ... DBX94.6 (nact = nsetp)


An indication on the the PLC states that the actual speed nact has reached the new setpoint
allowing for the tolerance band set in drive machine data:
MD1426 $MD_SPEED_DES_EQ_ACT_TOL (tolerance band for 'nsoll=nist' message)
and that it is within the tolerance band.

DB31, ... DBX94.7 (variable signaling function)


Using the variable signaling function, it is possible to monitor digitally for any axis any
variable from SIMODRIVE 611 to check if it violates a certain threshold and to signal as an
interface signal to the PLC.
The variable to be monitored is specified with 611D machine data.

DB31, ... DBX95.0 (DC link voltage < warning level)


The drive signals to the PLC that the DC link voltage UDC link has fallen below the DC link
undervoltage warning threshold:
MD1604 $MD_LINK_VOLTAGE_WARN_LIMIT (ZK link undervoltage warning threshold)

DB31, ... DBX95.7 (i2t-monitoring)


The variable signaling function can be used to protect the power section of the SIMODRIVE
611 universal and SIMODRIVE 611 digital drives against continuous overload. The PLC is
signaled for each axis indicating whether the i2t monitoring has been initiated.
The variable to be monitored is specified with 611D machine data.

Basic Functions
52 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Functions

1.3 Functions

1.3.1 Screen settings


Contrast, monitor type, foreground language, and display resolution to take effect after
system startup can be set in the operator panel machine data.

Contrast
MD9000 $MM_LCD_CONTRAST (contrast)
For slimline operator panels with a monochrome LCD, the contrast to be applied following
system startup can be set.
There are 16 different contrast settings (0: dark, 15: light).

Monitor type
MD9001 $MM_DISPLAY_TYPE (monitor type)
Indicate the relevant monitor type for optimum color matching.

Foreground language
MD9003 $MM_FIRST_LANGUAGE (foreground language)
In case of SINUMERIK 840D/840Di 2 languages are available simultaneously.
The foreground language can be used to set the language to be displayed following control
ramp-up.
The language can be changed in the DIAGNOSTICS operating area on the HMI user
interface. Once the control has ramped up, the foreground language will be restored.

Display resolution
MD9004 $MM_DISPLAY_RESOLUTION (display resolution)
The number of places after the decimal point for the position display of the axes is defined in
the display resolution. The position display consists of max. 12 characters including sign and
decimal point. The number of digits after the decimal point can be set to between 0 and 5.
The default setting for the number of digits after the decimal point is 3, corresponding to a
display resolution of 10–3 [mm] or [degrees].

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 53
Various NC/PLC Interface Signals and Functions (A2)
Functions

REFRESH suppression
MD10131 $MN_SUPPRESS_SCREEN_REFRESH (screen refresh in case of overload)
Default setting for screen-refresh strategy with high NC utilization:
● Value 0: Refresh of current values is suppressed in all channels.
● Value 1: Refresh of current values is suppressed in time-critical channels.
● Value 2: Refresh of current values is never suppressed.

1.3.2 Settings for involute interpolation

Introduction
The involute of the circle is a curve traced out from the end point on a "piece of string"
unwinding from the curve. Involute interpolation allows trajectories along an involute.

<

%DVHFLUFOHFHQWHU ; <
;<  
6WDUWSRLQW
5
) ;
) 

%DVHFLUFOH

(QGSRLQW

Figure 1-6 Involute (unwound from base circle)

Basic Functions
54 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Functions

Programming
A general description of how to program involute interpolation can be found in:
References:
/PG/ Programming Manual Fundamentals
In addition to the programmed parameters, machine data are relevant in two instances of
involute interpolation; these data may need to be set by the machine manufacturer/end user.

Accuracy
If the programmed end point does not lie exactly on the involute defined by the starting point,
interpolation takes place between the two involutes defined by the starting and end points
(see illustration below).
The maximum deviation of the end point is determined by the machine data:
MD21015 $MC_INVOLUTE_RADIUS_DELTA(end point monitoring for involute)

6WDUWSRLQW
5

(QGSRLQW
%DVHFLUFOH

0D[GHYLDWLRQ

Figure 1-7 MD21015 specifies the max. permissible deviation

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 55
Various NC/PLC Interface Signals and Functions (A2)
Functions

Limit angle
If AR is used to program an involute leading to the base circle with an angle of rotation that is
greater than the maximum possible value, an alarm is output and program execution
aborted.

$5PD[

$5

6WDUWSRLQW

Figure 1-8 Limited angle of rotation towards base circle

The alarm display can be suppressed using the following parameter settings:
MD21016 $MC_INVOLUTE_AUTO_ANGLE_LIMIT = TRUE (automatic angle limitation for
involute interpolation)
The programmed angle of rotation is then also limited automatically and the interpolated path
ends at the point at which the involute meets the base circle. This, for example, makes it
easier to program an involute, which starts at a point outside the base circle and ends
directly on it.

Tool radius compensation


2 1/2 D tool-radius compensation is the only tool-radius compensation function permitted for
involutes. If 3D tool-radius compensation is active (both circumferential and face milling),
when an involute is programmed, machining is interrupted with alarm 10782.
With 2 1/2 D tool-radius compensation, the plane of the involute must lie in the compensation
plane. or else alarm 10781 will be generated. It is however permissible to program an
additional helical component for an involute in the compensation plane.

Basic Functions
56 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Functions

Dynamic response
Involutes that begin or end on the base circle have an infinite curvature at this point.
To ensure that the velocity is adequately limited at this point when tool-radius compensation
is active, without reducing it too far at other points, the "Velocity limitation profile" function
must be activated:
MD28530 $MC_MM_PATH_VELO_SEGMENTS > 1 (number of memory elements for
limiting the path velocity)
A setting of 5 is recommended. This setting need not be made if only involute sections are
used, which have radii of curvature that change over a relatively small area.

1.3.3 Activate DEFAULT memory

GUD start values


The DEF.../REDEF... NC commands can be used to assign default settings to global user
data (GUD). These default settings must be permanently stored in the system if they are to
be available after certain system states (e.g. RESET).
The memory space for this is taken from the memory area that was assigned via the
machine data:
MD18150 $MM_GUD_VALUES_MEM (number of additional parameters according to
MD18170)
The setting for activating the stored default values is made in machine data:
MD11270 $MN_DEFAULT_VALUES_MEM_MASK (activation default values for NC
language elements)
References:
/FB1/ Function Manual Basic functions; S7: "Memory Configuration"
/PGA/ Programming Manual Advanced

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 57
Various NC/PLC Interface Signals and Functions (A2)
Functions

1.3.4 Read/write PLC variable

High-speed data channel


For high-speed exchange of information between the PLC and NC, a memory area is
reserved in the communications buffer on these modules (dual-port RAM). Variables of any
type (I/O, DB, DW, flags) may be exchanged within this memory area.
The PLC accesses this memory using 'Function Calls' (FC) while the NCK uses '$ variables'.

Organization of memory area


The user's programming engineer (NCK and PLC) is responsible for organizing (structuring)
this memory area.
Every storage position in the memory can be addressed provided that the limit is selected
according to the appropriate data format (i.e. a DWORD for a 4-byte limit, a WORD for a 2-
byte limit, etc.).
The memory is accessed via the data type and the position offset within the memory area.

Access from NC
To allow the NC to access PLC variables (from a part program) quickly, $ variables are
provided in the NCK. The PLC uses a function call (FC) to read and write $ variables. Data
are transferred to and from the NCK immediately.
$ variables can be accessed (by the NCK) during preprocessing and in synchronized
actions.
Data type information is determined by the $ variable data type, the position index is
specified as an array index (in bytes).
The following $ variables are available:

$A_DBB Data byte (8 bits)


$A_DBW Data word (16 bits)
$A_DBD Data double word (32 bits)
$A_DBR Real data (32 bits)

Ranges of values

$A_DBB(n) <= x <= 255


$A_DBW(n) -32768 <= x <= 3276
$A_DBD(n) -2147483648 <= x <= 2147483647

Basic Functions
58 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Functions

Access from PLC


The PLC uses function calls (FC) to access the memory. These FCs ensure that data are
read and written in the DPR immediately, i.e. not just at the beginning of the PLC cycle.
FCs receive data type information and the position offset as parameters.

1& 3/&


3/&'$7$ $B'%'>@ &$//)&

'DWDW\SH'ZRUG E\WHV
3RVLWLRQRIIVHW [



Figure 1-9 Communications buffer (DPR) for NC/PLC communication

Supplementary conditions
● The user's programming engineer (NCK and PLC) is responsible for organizing the DPR
memory area. No checks are made for inconsistencies in the configuration.
● A total of 1024 bytes are available in the input and output directions.
● Single-bit operations are not supported and must be linked back to byte operations by the
user (programming engineer).
● Since the contents of variables are manipulated directly in the communications buffer, the
user must remember that intermediate changes in values occur as a result of multiple
access operations where a variable is evaluated several times or when variables are
linked (i.e. it may be necessary to store values temporarily in local variables or R
parameters or to set up a semaphore).
● The user's programming engineer is responsible for coordinating access operations to the
communications buffer from different channels.
● Data consistency can be guaranteed only for access operations up to 16 bits (byte and
word). The user's programming engineer is responsible for ensuring consistent
transmission of 32-bit variables (double and real). A simple semaphore mechanism is
provided in the PLC for this purpose.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 59
Various NC/PLC Interface Signals and Functions (A2)
Functions

● The PLC stores data in 'Little Endian' format in the DPR.


● Values transferred with $A_DBR are subject to data conversion and hence to loss of
accuracy. The data format for floating-point numbers is DOUBLE (64 bits) on the NCK,
but only FLOAT (32 bits) on the PLC. The format used for storage in the dual-port RAM is
FLOAT. Conversion takes place respectively before/after storage in the dual-port RAM.
If a read/write access is made from the NCK to a variable in the dual-port RAM, the
conversion is performed twice. It is impossible to prevent differences between read and
written values because the data are stored in both formats.
Example:
Bypassing the problem by means of comparison on "EPSILON" (minor deviation)

Block Program code


number
N10 DEF REAL DBR
N12 DEF REAL EPSILON = 0.00001
N20 $A_DBR[0]=145.145
N30 G4 F2
N40 STOPRE
N50 DBR=$A_DBR[0]
N60 IF ( ABS(DBR/145.145-1.0) < EPSILON ) GOTOF ENDE
N70 MSG ( "error" )
N80 M0
N90 END:
N99 M30

Activation
The maximum number of simultaneously writable output variables is adjustable via:
MD28150 $MC_MM_NUM_VDIVAR_ELEMENTS (number of elements for writing PLC
variables)

Example
A WORD is to be transferred from the PLC to the NC.
The position offset within the NCK input (PLC output area) should be the fourth byte. The
position offset must be a whole-number multiple of the data width.
● Writing from PLC:

Program code (extract) Comment


. . .
CALL FC21 (
Enable :=M10.0, ;if TRUE, then FC21 active
Funct :=B#16#4,
S7Var :=P#M 104.0 WORD1,
IVAR1 :=04,

Basic Functions
60 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Functions

Program code (extract) Comment


IVAR2 :=-1,
Error :=M10.1,
ErrCode :=MW12);
. . .
)

● Reading in part program

Program code (extract) Comment


. . .
PLCDATA = $A_DBW[4]; // Read a word
. . .

Behavior during POWER ON, block search


The DPR communications buffer is initialized during "POWER ON".
During a "block search", the PLC variable outputs are collected and transferred to the DPR
communications buffer with the approach block (analogous to writing of analog and digital
outputs).
Other status transitions have no effect in this respect.

1.3.5 Access protection via password and keyswitch

1.3.5.1 Access protection via password and keyswitch

Access authorization
Access to functions, programs and data is user-oriented and controlled via 8 hierarchical
protection levels. These are subdivided into:
● Password levels for Siemens, machine manufacturer and end user
● Keyswitch positions for end user

Multi-level security concept


A multi-level security concept to regulate access rights is available in the form of password
levels and keyswitch settings.

Protection level Type User Access to (examples)


0 Password Siemens All functions, programs and
data
1 Password Machine manufacturer: Defined functions, programs
Development and data;
for example: entering options

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 61
Various NC/PLC Interface Signals and Functions (A2)
Functions

Protection level Type User Access to (examples)


2 Password Machine manufacturer: Defined functions, programs
Startup engineer and data;
for example: Bulk of machine
data
3 Password End user: Service Assigned functions,
programs and data
4 Keyswitch position 3 End user: Programmer, less than the protection level
machine setter 0 to 3; established by the
machine manufacturer or
end user
5 Keyswitch position 2 End user: Skilled operator less than the protection level
without programming 0 to 3; established by the
knowledge end user
6 Keyswitch position 1 End user: Trained operator Example:
without programming Program selection only, tool
knowledge wear entry, and work offset
entry
7 Keyswitch position 0 End user: Semi-skilled Example:
operator no inputs and program
selection possible,
only machine control panel
operable

Access features
● Protection level 0 provides the greatest number of access rights, protection level 7 the
least.
● If certain access rights are granted to a protection level, these protection rights
automatically apply to any higher protection levels.
● Conversely, protection rights for a certain protection level can only be altered from a
higher protection level.
● Access rights for protection levels 0 to 3 are permanently assigned by Siemens and
cannot be altered (default).
● Access rights can be set by querying the current keyswitch positions and comparing the
passwords entered. When a password is entered it overwrites the access rights of the
keyswitch position.
● Options can be protected on each protection level. However, option data can only be
entered in protection levels 0 and 1.
● Access rights for protection levels 4 to 7 are only suggestions and can be altered by the
machine tool manufacturer or end user.

Basic Functions
62 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Functions

1.3.5.2 Password

Set password
The password for a protection level (0 – 3) is entered via the HMI user interface.
Example: HMI Advanced
DIAGNOSTIC operating area, softkey: SET PASSWORD
References:
/BAD/ Operating Manual HMI Advanced

Delete password
Access rights assigned by means of setting a password remain effective until they are
explicitly revoked by deleting the password.
Example: HMI Advanced
DIAGNOSTIC operating area, softkey: DELETE PASSWORD
References:
/BAD/ Operating Manual HMI Advanced
Note
Access rights and password status (set/deleted) are not affected by POWER OFF/ON!

Maximum number of characters


A password may contain up to eight characters. We recommend that you confine yourself to
the characters available on the operator panel when defining the password. Where a
password consists of less than eight characters, the additional characters are interpreted as
blanks.

Defaults
The following default passwords are defined for protection levels 1 to 3:
● Protection level 1: SUNRISE
● Protection level 2: EVENING
● Protection level 3: CUSTOMER

Note
Following NC-CPU ramp-up in commissioning mode (NCK commissioning switch:
position 1) the passwords for protection levels 1 – 3 are reset to the default settings. For
reasons of data protection, we strongly recommend that you change the default settings.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 63
Various NC/PLC Interface Signals and Functions (A2)
Functions

1.3.5.3 Keyswitch settings (DB10, DBX56.4 to 7)

Key switch
The keyswitch has four positions, to which protection levels 4 to 7 are assigned. The
keyswitch comprises a number of keys in a variety of colors, which can be set to different
switch positions.

6ZLWFKSRVLWLRQ 5HWUDFWLRQSRV '%'%% 3URWHFWLRQOHYHO

3RVLWLRQ  %LW


RU
3RVLWLRQ EODFNNH\ %LW 

RURU
3RVLWLRQ JUHHQNH\ %LW 

RURU
3RVLWLRQ RU %LW 
UHGNH\

Figure 1-10 Switch positions 0 to 3

Switch positions
Switch position 0 has the most restricted access rights. Switch position 3 has the least
restricted access rights.
DB10, DBX56.4/.5/.6/.7 (switch positions 0/1/2/3)
Machine-specific enables for access to programs, data and functions can be assigned to the
switch positions. For detailed information, please refer to:
References:
/IAM/ Startup CNC Part 2 (HMI); Access Protection

Default settings via the PLC user program


The keyswitch switch positions are transferred to the NC/PLC interface via the basic PLC
program. The corresponding interface signals can be modified via the PLC user program. In
this context, from the point of view of the NC, only one switch position should ever be active,
i.e,. the corresponding interface signal set to 1. If, from the point of view of the NC, a number
of switch positions are active at the same time, switch position 3, i.e. the keyswitch position
with the least restricted access rights, will be activated internally by the NC.

Basic Functions
64 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Functions

1.3.5.4 Parameterizable protection levels

Parameterizable protection level


The parameter level can be freely parameterized for a variety of functions and data areas.
The protection level is set via operator-panel machine data, designated as follows:
$MM_USER_CLASS_<Function_DataArea>
Examples:

$MM_USER_CLASS_READ_TOA Read tool offsets


$MM_USER_CLASS_WRITE_TOA Write tool offsets
$MM_USER_CLASS_READ_PROGRAM Read part programs
$MM_USER_CLASS_WRITE_PROGRAM Write/edit part programs

Default values
On delivery or following standard commissioning, with very few exceptions, the default value
for the protection level will be set to 7, i.e. the lowest protection level.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 65
Various NC/PLC Interface Signals and Functions (A2)
Examples

1.4 Examples

Parameter set changeover


A parameter-set changeover is performed to change the position-control gain (servo gain
factor) for machine axis X1 from v = 4.0 to Kv = 0.5.

Prerequisites
The parameter set changeover must be enabled by the machine data:
MD35590 $MA_PARAMSET_CHANGE_ENABLE [AX1] = 1 or 2 (parameter set change
possible)
The 1st parameter set for machine axis X1 is set, in accordance with machine data with
index "0" NC/PLC interface:
DB31, … DBX9.0 - DBX9.2 = 0 (controller parameter set)

Parameter-set-dependent machine data


Parameter-set-dependent machine data are set as follows:

Machine data Remarks


MD32200 $MA_POSCTRL_GAIN [0, AX1] = 4.0 Servo gain setting for parameter set 1
MD32200 $MA_POSCTRL_GAIN [1, AX1] = 2.0 Servo gain setting for parameter set 2
MD32200 $MA_POSCTRL_GAIN [2, AX1] = 1.0 Servo gain setting for parameter set 3
MD32200 $MA_POSCTRL_GAIN [3, AX1] = 0.5 Servo gain setting for parameter set 4
MD32200 $MA_POSCTRL_GAIN [4, AX1] = 0.25 Servo gain setting for parameter set 5
MD32200 $MA_POSCTRL_GAIN [5, AX1] = 0.125 Servo gain setting for parameter set 6
MD31050 $MA_DRIVE_AX_RATIO_DENOM [0, AX1] = 3 Denominator load gearbox for parameter set 1
MD31050 $MA_DRIVE_AX_RATIO_DENOM [1, AX1] = 3 Denominator load gearbox for parameter set 2
MD31050 $MA_DRIVE_AX_RATIO_DENOM [2, AX1] = 3 Denominator load gearbox for parameter set 3
MD31050 $MA_DRIVE_AX_RATIO_DENOM [3, AX1] = 3 Denominator load gearbox for parameter set 4
MD31050 $MA_DRIVE_AX_RATIO_DENOM [4, AX1] = 3 Denominator load gearbox for parameter set 5
MD31050 $MA_DRIVE_AX_RATIO_DENOM [5, AX1] = 3 Denominator load gearbox for parameter set 6
MD31060 $MA_DRIVE_AX_RATIO_NUMERA [0, AX1] = 5 Counter load gearbox for parameter set 1
MD31060 $MA_DRIVE_AX_RATIO_NUMERA [1, AX1] = 5 Counter load gearbox for parameter set 2
MD31060 $MA_DRIVE_AX_RATIO_NUMERA [2, AX1] = 5 Counter load gearbox for parameter set 3
MD31060 $MA_DRIVE_AX_RATIO_NUMERA [3, AX1] = 5 Counter load gearbox for parameter set 4
MD31060 $MA_DRIVE_AX_RATIO_NUMERA [4, AX1] = 5 Counter load gearbox for parameter set 5
MD31060 $MA_DRIVE_AX_RATIO_NUMERA [5, AX1] = 5 Counter load gearbox for parameter set 6
MD35130 $MA_AX_VELO_LIMIT [0...5, AX1] Setting for each parameter set*)
MD32800 $MA_EQUIV_CURRCTRL_TIME [0..5, AX1] Setting for each parameter set*)
MD32810 $MA_EQUIV_SPEEDCTRL_TIME [0..5, AX1] Setting for each parameter set*)
MD32910 $MA_DYN_MATCH_TIME [0...5, AX1] Setting for each parameter set*)
*) The appropriate line must be specified separately for each parameter set according to the applicable syntax rules.

Basic Functions
66 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Examples

Changeover
In order to switch over the position-control gain, the PLC user program selects the 4th
parameter set for machine axis X1.
● Request by PLC user program:
DB31, ... DBX9.0 – DBB9.2 = 3 (controller parameter set)
– A request to change over to the 4th parameter set is sent for machine axis AX1.
– The parameter set is changed over once a delay has elapsed.
– Parameter set 4 is now active, in accordance with machine data with index "3"
● Feedback by NC:
DB31, … DBX69.0 – DBX69.2 = 3 (controller parameter set)
– The NC confirms/acknowledges the parameter-set changeover.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 67
Various NC/PLC Interface Signals and Functions (A2)
Data lists

1.5 Data lists

1.5.1 Machine data

1.5.1.1 Drive-specific machine data

Number Identifier: $MD_ Description


1403 PULSE_SUPPRESSION_SPEED Shut-off speed for pulse suppression
1404 PULSE_SUPPRESSION_DELAY Time for pulse suppression
1417 SPEED_THRESHOLD_X nx for nact < nsetp signal
1418 SPEED_THRESHOLD_MIN nmin for nact < nsetp signal
1426 SPEED_DES_EQ_ACT_TOL Tolerance band for nset = nact signal
1427 SPEED_DES_EQ_ACT_DELAY Delay time nset = nact signal
1428 TORQUE_THRESHOLD_X Threshold torque
1429 TORQUE_THRESHOLD_X_DELAY Delay time nd < ndx signal
1602 MOTOR_TEMP_WARN_LIMIT Maximum motor temperature
1603 MOTOR_TEMP_ALARM_TIME Time for motor temperature alarm
1604 LINK_VOLTAGE_WARN_LIMIT DC link under voltage warning threshold

1.5.1.2 Memory-specific machine data

Number Identifier: $MM_ Description


HMI HMI
Advanced Embedded
9000 9000 LCD_CONTRAST Contrast
9001 9001 DISPLAY_TYPE Monitor type
9002 DISPLAY_MODE external monitor (1: black and white, 2: color)
9003 FIRST_LANGUAGE Foreground language
9004 9004 DISPLAY_RESOLUTION Display resolution
9005 PRG_DEFAULT_DIR Basic setting Program directory
9006 DISPLAY_BLACK_TIME Time setting for screen saver
9007 TABULATOR_SIZE Tabulator length
9008 9008 KEYBOARD_TYPE Keyboard type (0: OP, 1: MFII/QWERTY)
9009 9009 KEYBOARD_STATE Shift behavior of keyboard during booting
9010 SPIND_DISPLAY_RESOLUTION Display resolution for spindle values
9011 9011 DISPLAY_RESOLUTION_INCH Display resolution for INCH_system of units
9012 9012 ACTION_LOG_MODE Set action mode for action log
9013 SYS_CLOCK_SYNC_TIME System clock synchronizing time
9020 9020 TECHNOLOGY Basic configuration for simulation and free
contour programming

Basic Functions
68 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Data lists

Number Identifier: $MM_ Description


9030 EXPONENT_LIMIT Number of places to be displayed without
exponent
9031 EXPONENT_SCIENCE Technical exponent representation in three
steps
9180 USER_CLASS_READ_TCARR Protection level read tool carrier offsets
general
9181 USER_CLASS_WRITE_TCARR Protection level write tool carrier offsets
general
9200 9200 USER_CLASS_READ_TOA Protection level read tool offsets general
9201 9201 USER_CLASS_WRITE_TOA_GEO Protection level write tool geometry
9202 9202 USER_CLASS_WRITE_TOA_WEAR Protection level write tool wear data
9203 9203 USER_CLASS_WRITE_FINE Protection level write fine
9204 USER_CLASS_WRITE_TOA_SC Protection level change total tool offsets
9205 USER_CLASS_WRITE_TOA_EC Protection level change tool setup offsets
9206 USER_CLASS_WRITE_TOA_SUPVIS Protection level change tool-monitoring limit
values
9207 USER_CLASS_WRITE_TOA_ASSDNO Change D No. assigned to a tool edge
9208 USER_CLASS_WRITE_MAG_WGROUP change wear group magazine location/mag.
9209 9209 USER_CLASS_WRITE_TOA_ADAPT Protection level write tool adapter data
9210 9210 USER_CLASS_WRITE_ZOA Protection level write settable zero offset
9211 9211 USER_CLASS_READ_GUD_LUD Protection level read user variables
9212 9212 USER_CLASS_WRITE_GUD_LUD Protection level write user variables
9213 9213 USER_CLASS_OVERSTORE_HIGH Protection level extended overstore
9214 9214 USER_CLASS_WRITE_PRG_CONDIT Protection level program control
9215 9215 USER_CLASS_WRITE_SEA Protection level write setting data
9216 USER_CLASS_READ_PROGRAM Protection level read part program
9217 USER_CLASS_WRITE_PROGRAM Protection level enter part program
9218 9218 USER_CLASS_SELECT_PROGRAM Protection level part program selection
9219 9219 USER_CLASS_TEACH_IN Protection level TEACH IN
9220 9220 USER_CLASS_PRESET Protection level PRESET
9221 9221 USER_CLASS_CLEAR_RPA Protection level delete R parameters
9222 9222 USER_CLASS_WRITE_RPA Protection level write R parameters
9223 USER_CLASS_SET_V24 Protection level for RS-232C interface
parameterization
9224 USER_CLASS_READ_IN Protection level for import data
9225 USER_CLASS_READ_CST Protection level standard cycles
9226 USER_CLASS_READ_CUS Protection level user cycles
9227 USER_CLASS_SHOW_SBL2 Skip single block2 (SBL2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 69
Various NC/PLC Interface Signals and Functions (A2)
Data lists

Number Identifier: $MM_ Description


9228 USER_CLASS_READ_SYF Access level select directory SYF
9229 USER_CLASS_READ_DEF Access level select directory DEF
9230 USER_CLASS_READ_BD Access level select directory BD
9231 USER_CLASS_WRITE_RPA_1 Write protection for first RPA area
9232 USER_BEGIN_WRITE_RPA_1 Start of the first RPA area
9233 USER_END_WRITE_RPA_1 End of the first RPA area
9234 USER_CLASS_WRITE_RPA_2 Write protection for second RPA area
9235 USER_BEGIN_WRITE_RPA_2 Start of the second RPA area
9236 USER_END_WRITE_RPA_2 End of the second RPA area
9237 USER_CLASS_WRITE_RPA_3 Write protection for third RPA area
9238 USER_BEGIN_WRITE_RPA_3 Start of the third RPA area
9239 USER_END_WRITE_RPA_3 End of the third RPA area
9240 USER_CLASS_WRITE_TOA_NAME Change tool designation and duplo
9241 USER_CLASS_WRITE_TOA_Type Change tool type
9460 PROGRAMM_SETTINGS Reset-proof data storage for settings in the
PROGRAM operating area
9461 CONTOUR_END_TEXT String to be added to end of contour on
completion of input
9478 TO_OPTION_MASK Variants of tool offsets
9500 NC_PROPERTIES NC_properties: Bit 0: Digital drives, bit 1:
Software start-up switch
9510 USER_CLASS_DIRECTORY1_P Protection level for network drive 1 for
PROGRAM operating area
9511 USER_CLASS_DIRECTORY2_P Protection level for network drive 2 for
PROGRAM operating area
9512 USER_CLASS_DIRECTORY3_P Protection level for network drive 3 for
PROGRAM operating area
9513 USER_CLASS_DIRECTORY4_P Protection level for network drive 4 for
PROGRAM operating area
9516 USER_CLASS_DIRECTORY1_M Protection level for network drive 1 for
MACHINE operating area
9517 USER_CLASS_DIRECTORY2_M Protection level for network drive 2 for
MACHINE operating area
9518 USER_CLASS_DIRECTORY3_M Protection level for network drive 3 for
MACHINE operating area
9519 USER_CLASS_DIRECTORY4_M Protection level for network drive 4 for
MACHINE operating area

Basic Functions
70 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Data lists

1.5.1.3 NC-specific machine data

Number Identifier: $MN_ Description


10350 FASTIO_DIG_NUM_INPUTS Number of active digital NCK input bytes
10360 FASTIO_DIG_NUM_OUTPUTS Number of active digital NCK output bytes
10361 FASTIO_DIG_SHORT_CIRCUIT Short-circuit digital inputs and outputs
11120 LUD_EXTENDED_SCOPE Activate program-global variables (PUD)
11270 DEFAULT_VALUES_MEM_MSK Active.
Function: Save DEFAULT values of GUD.
18150 MM_GUD_VALUES_MEM Reserve memory space for GUD

1.5.1.4 Channel-specific machine data

Number Identifier: $MC_ Description


21015 INVOLUTE_RADIUS_DELTA NC start disable without reference point
21016 INVOLUTE_AUTO_ANGLE_LIMIT Automatic angle limitation for involute interpolation
27800 TECHNOLOGY_MODE Technology in channel
28150 MM_NUM_VDIVAR_ELEMENTS Number of write elements for PLC variables
28530 MM_PATH_VELO_SEGMENTS Number of storage elements for limiting path velocity
in block

1.5.1.5 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


30350 SIMU_AX_VDI_OUTPUT Output of axis signals for simulation axes
33050 LUBRICATION_DIST Lubrication pulse distance
35590 PARAMSET_CHANGE_ENABLE Parameter set definition possible from PLC
36060 STANDSTILL_VELO_TOL Maximum velocity/speed when axis/spindle stationary
36610 AX_EMERGENCY_STOP_TIME Length of the braking ramp for error states
36620 SERVO_DISABLE_DELAY_TIME Cutout delay servo enable

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 71
Various NC/PLC Interface Signals and Functions (A2)
Data lists

1.5.2 System variables

Names Description
$P_FUMB Unassigned part program memory (Free User Memory Buffer)
$A_DBB[n] Data on PLC (data type BYTE)
$A_DBW[n] Data on PLC (WORD type data)
$A_DBD[n] Data on PLC (DWORD type data)
$A_DBR[n] Data on PLC (REAL type data)

1.5.3 Signals

1.5.3.1 Signals to NC

DB number Byte.Bit Description


10 56.7 Keyswitch setting 0 to 3

1.5.3.2 Signals from NC

DB number Byte.Bit Description


10 103.0 Remote diagnostics active (HMI alarm is pending)
10 103.5 AT box ready
10 103.6 PCU temperature limit
10 103.7 Operator unit battery alarm
10 104.7 NCK CPU Ready
10 108.1 HMI CPU2 Ready (HMI to OPI or MPI)
10 108.2 HMI CPU1 Ready (HMI to MPI)
10 108.3 HMI CPU1 Ready (HMI to OPI, standard connection)
10 108.6 Drive Ready
10 108.7 NC Ready
10 109.0 NCK alarm is active
10 109.5 NCU573 heat-sink temperature alarm
10 109.6 Air temperature alarm
10 109.7 NCK battery alarm

Basic Functions
72 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Data lists

1.5.3.3 Signals to operator panel front

DB number Byte.Bit Description


19 0.0 Screen bright
19 0.1 Darken screen
19 0.2 Key disable
19 0.3 Delete Cancel alarms (HMI Advanced only)
19 0.4 Delete Recall alarms (HMI Advanced only)
19 0.7 Actual value in WCS
19 10.0 Programming area selection
19 10.1 Alarm area selection
19 10.2 Tool offset selection
19 10.7 ShopMill control signal
19 12.2 COM2 active (job byte of PLC)
19 12.3 COM1 active (job byte of PLC)
19 12.4 RS-232 stop (job byte of PLC)
19 12.5 RS-232 external (job byte of PLC)
19 12.6 RS-232 OFF (job byte of PLC)
19 12.7 RS-232 ON (job byte of PLC)
19 13.5 Unload part program
19 13.6 Load part program
19 13.7 Part program selection
19 14.7 File system active/passive (for HMI Embedded, always active)
19 16.7 File system active/passive (for HMI Advanced, always passive)
19 44.0 Mode change disable

1.5.3.4 Signals from operator panel front

DB number Byte.Bit Description


19 20.1 Screen is dark
19 20.7 Switch over MCS/WCS
19 24.0 Error (Acknowledgment byte for current RS-232 status)
19 24.1 O.K. (Acknowledgment byte for current RS-232 status)
19 24.2 COM2 active (Acknowledgment byte for current RS-232 status)
19 24.3 COM1 active (Acknowledgment byte for current RS-232 status)
19 24.4 RS-232 stop (Acknowledgment byte for current RS-232 status)
19 24.5 RS-232 External (Acknowledgment byte for current RS-232-C status)
19 24.6 RS-232 OFF (Acknowledgment byte for current RS-232 status)
19 24.7 RS-232 ON (Acknowledgment byte for current RS-232 status)
19 26.0 Error (Part program handling status)
19 26.1 O.K. (Part program handling status)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 73
Various NC/PLC Interface Signals and Functions (A2)
Data lists

DB number Byte.Bit Description


19 26.3 Active (Part program handling status)
19 26.5 Unload (Part program handling status)
19 26.6 Load (Part program handling status)
19 26.7 Select (Part program handling status)
19 42.0 FC9: Measure in JOG mode
19 45.0 FC9 Out: Active
19 45.1 FC9 Out: Done
19 45.2 FC9 Out: Error
19 45.3 FC9 Out: StartErr

1.5.3.5 Signals to channel

DB number Byte.Bit Description


21, ... 6.2 Delete distance-to-go (channel-specific)

1.5.3.6 Signals from channel

DB number Byte.Bit Description


21, ... 36.6 Channel-specific NCK alarm is active
21, ... 36.7 NCK alarm with processing stop present
21, ... 318.7 Overstore active

1.5.3.7 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 1.3 Axis/spindle disable
31, ... 1.4 Follow-up mode
31, ... 1.5 Position measuring system 1
31, ... 1.6 Position measuring system 2
31, ... 2.1 Servo enable
31, ... 2.2 Delete distance-to-go (axis-specific)/Spindle reset
31, ... 1, 2 Parameter set switchover (request)
31, ... 20.0 Ramp-up times
31, ... 20.1 Ramp-function-generator fast stop
31, ... 20.2 Torque limit 2
31, ... 20.3 Speed setpoint smoothing
31, ... 21.2 Drive parameter set selection A, B, C
31, ... 21.4 Motor selection A, B
31, ... 21.5 Motor selection to follow

Basic Functions
74 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Various NC/PLC Interface Signals and Functions (A2)
Data lists

DB number Byte.Bit Description


31, ... 21.6 Speed controller integrator disable
31, ... 21.7 Pulse enable

1.5.3.8 Signals from axis/spindle

DB number Byte.Bit Description


31, ... 60.4/60.5 Referenced, synchronized 1/Referenced, synchronized 2
31, ... 61.3 Follow-up mode active
31, ... 64.6/64.7 Traverse command minus/plus
31, ... 61.3 Follow-up mode active
31, ... 61.4 Axis/spindle stops
31, ... 61.5 Position controller active
31, ... 61.6 Speed control loop active
31, ... 61.7 Current controller active
31, ... 1, 2 Parameter set switchover (feedback)
31, ... 76.0 Lubrication pulse
31, ... 92.0 Setup mode active
31, ... 92.1 Ramp-function-generator fast stop active
31, ... 92.2 Torque limit 2 active
31, ... 92.3 Speed setpoint smoothing active
31, ... 93.2 Active drive parameter set A, B, C
31, ... 93.4 Active motor A, B
31, ... 93.5 Drive Ready
31, ... 93.6 Speed controller integrator disabled
31, ... 93.7 Pulses enabled
31, ... 94.0 Motor temperature prewarning
31, ... 94.1 Heat-sink temperature prewarning
31, ... 94.2 Ramp-up function completed
31, ... 94.3 |Md| < Mdx
31, ... 94.4 |nact| < nmin
31, ... 94.5 |nact| < nx
31, ... 94.6 nact = nset
31, ... 94.7 Variable signaling function
31, ... 95.0 UDC link<warning threshold

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 75
Various NC/PLC Interface Signals and Functions (A2)
Data lists

Basic Functions
76 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3) 2
2.1 Brief description

2.1.1 Axis monitoring functions

Function
Comprehensive monitoring functions are present in the control for protection of people and
machines:
● Contour monitoring
● Position monitoring
● Zero-speed monitoring
● Clamping monitoring
● Speed-setpoint monitoring
● Actual-velocity monitoring
● Measuring System monitoring
● Limit-switches monitoring
● Monitoring of the working area limitation

2.1.2 Protection zones

Function
With the help of protection zones, elements of the machine (e.g. spindle chuck, tool changer,
tool holder, tailstock, movable probe, etc.) and the workpiece can be protected against
collisions.
During automatic execution of part programs in the AUTOMATIC or MDI mode, the NC
checks at the start of every part-program block whether a collision between protection zones
can occur upon moving along the programmed path.
After manual deactivation of an active protection zone, the zone can be entered. After
leaving the protection zone, the protection zone automatically becomes active again.
The definition, activation and deactivation of protection zones takes place via part program
instructions.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 77
Axis Monitoring, Protection Zones (A3)
Axis monitoring

2.2 Axis monitoring

2.2.1 Contour monitoring

2.2.1.1 Contour error


Contour errors are caused by signal distortions in the position control loop.
Signal distortions can be linear or nonlinear.

Linear signal distortions


Linear signal distortions are caused by:
● Speed and position controller not being set optimally
● Different servo gain factors of the feed axes involved in creating the path
With the same servo gain factor for two linear-interpolated axes, the actual position
follows the set position along the same path but with a time delay. With different servo
gain factors, a parallel offset arises between the set and actual path.
● Unequal dynamic response of the feed drives
Unequal drive dynamic responses lead to path deviations especially on contour changes.
Circles are distorted into ellipses by unequal dynamic responses of the two feed drives.

Nonlinear signal distortions


Nonlinear signal distortions are caused by:
● Activation of the current limitation within the machining area
● Activation of the limitation of the set speed
● Backlash within and/or outside the position control loop
When traversing a circular path, contour errors occur primarily due to the reversal error
and friction.
During movement along straight lines, a contour error arises due to a reversal error
outside the position control loop, e.g. due to a tilting milling spindle. This causes a parallel
offset between the actual and the set contour. The shallower the gradient of the straight
line, the larger the offset.
● Nonlinear friction behavior of slide guides

Basic Functions
78 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

2.2.1.2 Following error monitoring

Function
In control engineering terms, traversing along a machine axis always produces a certain
following error, i.e. a difference between the set and actual position.
The following error that arises depends on:
● Position control loop gain
MD32200 $MA_POSCTRL_GAIN (servo gain factor)
● Maximum acceleration
MD32300 $MA_MAX_AX_ACCEL (Maximum axis acceleration)
● Maximum velocity
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
● With activated feedforward control: Precision of the path model and the parameters:
MD32610 $MA_VELO_FFW_WEIGHT (factor for the velocity feedforward control)
MD32800 $MA_EQUIV_CURRCTRL_TIME (Equivalent time constant current control loop
for feedforward control)
MD32810 $MA_EQUIV_SPEEDCTRL_TIME (equivalent time constant speed control loop
for feedforward control)
In the acceleration phase, the following error initially increases when traversing along a
machine axis. After a time depending on the parameterization of the position control loop,
the following error then remains constant in the ideal case. Due to external influences, more
or less large fluctuations in the following error always arise during a machining process. To
prevent these fluctuations in the following error from triggering an alarm, a tolerance range
within which the following error may change must be defined for the following-error
monitoring:
MD36400 $MA_CONTOUR_TOL (Contour monitoring tolerance range)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 79
Axis Monitoring, Protection Zones (A3)
Axis monitoring

)ROORZLQJHUURU
7ROHUDQFHEDQG
GV )LUVWFXW

0HDVXUHG
IROORZLQJHUURU 0'0$B&217285B72/

&DOFXODWHGIROORZLQJHUURU
PRGHO

%HJLQ
PDFKLQLQJ


W

Figure 2-1 Following-error monitoring

Effectivity
The following-error monitoring only operates with active position control and the following
axis types:
● Linear axes with and without feedforward control
● Rotary axes with and without feedforward control
● Position-controlled spindles

Fault
If the configured tolerance limit is exceeded, the following alarm appears:
25050 "Axis <Axis identifier> Contour monitoring"
The affected axis/spindle is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)

Basic Functions
80 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

2.2.2 Positioning, zero speed and clamping monitoring

2.2.2.1 Correlation between positioning, zero-speed and clamping monitoring

Overview
The following overview shows the correlation between the positioning, zero speed and
clamping monitoring functions:

9RUV
(IIHFWLYHWROHUDQFH
IRU]HURVSHHGDQG
FODPSLQJPRQLWRULQJ

$FWXDO
YDOXH
'%'%; FODPSLQJLQSURJUHVV

0'0$B&/$03B326B72/

6HWSRLQW

0'0$B67$1'67,//B326B72/

0'0$B6723B/,0,7B&2$56(

0'0$B6723B/,0,7B),1(

0' ([DFWVWRSILQHVLJQDO W
0$B67$1'67,//
B'(/$<B7,0( ([DFWVWRSFRDUVHVLJQDO

0'0$B326,7,21,1*B7,0(

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 81
Axis Monitoring, Protection Zones (A3)
Axis monitoring

2.2.2.2 Positioning monitoring

Function
At the end of a positioning operation:
● Set velocity = 0 AND
● DB31, ... DBX64.6/64.7 (motion command minus/plus) = 0
checks the position monitoring to ensure that the following error of every participating
machine axis is smaller than the exact-stop fine tolerance during the delay time.
MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)
MD36020 $MA_POSITIONING_TIME (delay time exact stop fine)
After reaching "Exact stop fine", the position monitoring is deactivated.

Note
The smaller the exact stop fine tolerance is, the longer the positioning operation takes and
the longer the time until block change.

Rules for MD setting

MD36010 $MA_STOP_LIMIT_FINE MD36020 $MA_POSITIONING_TIME


large can be selected relatively short
small must be selected relatively long

MD32200 $MA_POSCTRL_GAIN MD36020 $MA_POSITIONING_TIME


(servo gain factor)
small must be selected relatively long
large can be selected relatively short

Effectivity
The position monitoring only operates with active position control and the following axis
types:
● Linear axes
● Rotary axes
● Position-controlled spindles

Fault
If the configured position-monitoring time is exceeded, the following alarm appears:
25080 "Axis <Axis identifier> Position monitoring"

Basic Functions
82 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)

2.2.2.3 Zero speed monitoring

Function
At the end of a positioning operation:
● Set velocity = 0 AND
● DB31, ... DBX64.6/64.7 (motion command minus/plus) = 0
checks the zero-speed monitoring to ensure that the following error of every participating
machine axis is smaller than the standstill tolerance during the delay time.
MD36040 $MA_STANDSTILL_DELAY_TIME (Zero-speed monitoring delay time)
MD36030 $MA_STANDSTILL_POS_TOL (standstill tolerance)
After reaching the required exact-stop state, the positioning operation is completed:
DB31, ... DBX60.6/60.7 (position reached with exact stop coarse/fine) = 1
The position-monitoring function is deactivated and is replaced by the zero-speed
monitoring.
Zero-speed monitoring monitors the adherence to the standstill tolerance. If no new travel
request is received, the machine axis must not depart from the standstill tolerance.

Effectivity
The zero-speed monitoring only operates with active position control and the following axis
types:
● Linear axes
● Rotary axes
● Position-controlled spindles

Fault
If the delay time and/or the standstill tolerance is exceeded, the following alarm appears:
25040 "Axis <Axis identifier> Zero-speed monitoring"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 83
Axis Monitoring, Protection Zones (A3)
Axis monitoring

2.2.2.4 Exact stop and standstill tolerance dependent on the parameter set

Common factor for position tolerances


For adaptation to different machining situations and/or axis dynamics, e.g.:
● Operating state A: High precision, long machining time
● Operating state B: Lower precision, shorter machining time
● Changing of the mass relationships after gear change
the positioning tolerances:
● MD36000 $MA_STOP_LIMIT_COARSE (exact stop coarse)
● MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)
● MD36030 $MA_STANDSTILL_POS_TOL (standstill tolerance)
can be weighted with a common factor depending on the parameter set:
MD36012 $MA_STOP_LIMIT_FACTOR (exact stop coarse/fine and standstill factor)
Because the factor applies in common for all three position tolerances, the relationship
between the values remains constant.

2.2.2.5 Clamping monitoring

Clamping monitoring
For machine axes that are mechanically clamped upon completion of a positioning operation,
larger motions can result from the clamping process (> standstill tolerance). As a result,
zero-speed monitoring is replaced by clamping monitoring during the clamping process.
Clamping monitoring monitors the adherence to the configured clamping tolerance:
MD36050 $MA_CLAMP_POS_TOL (Clamping tolerance)

Activation
The clamping monitoring is activated by the following interface signal:
DB31, ... DBX2.3 (clamping in progress)

Note
The clamping monitoring is not active in "follow-up mode" (DB31, ... DBX1.4 = 1).

Basic Functions
84 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Fault
If the clamping tolerance is exceeded, the following alarm appears:
26000 "Clamping monitoring"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)

Automatic stopping for removal of the clamp


If a clamped axis must be traversed again in continuous-path mode, the NC stops the path
motion for Look Ahead at the start of the motion block of the clamped axis until the clamped
axis can once again be traversed. If the clamping is released before stopping, the path
motion is not stopped.
Parameterization:
MD36052 $MA_STOP_ON_CLAMPING = 'H01' (Special function for clamped axis)

Note
The NC detects whether an axis is clamped based on the "servo enable" state of the axis:
DB31, ... DBX2.2 = 0: no servo enable ⇒ axis is clamped
DB31, ... DBX2.2 = 1: servo enable ⇒ axis is not clamped

Prerequisites for the PLC user program


● The axis is always removed from the clamp when a travel command is pending.
● The following is always valid for the axis:
DB31, ... DBX2.2 (servo enable) = 0: Axis is clamped.
DB31, ... DBX2.2 (servo enable) = 1: Axis is not clamped.
The following image shows an example of the interface signals and states upon releasing of
the axis clamp:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 85
Axis Monitoring, Protection Zones (A3)
Axis monitoring

5HOHDVHD[LVFODPSLI
0'0$B6723B21B&/$03,1*>@ ಬ+ಬ

0RWLRQFRPPDQG

&ODPSD[LV

$[LVFODPSLQJSUHVVXUH

)HHGVWRS

6HUYRHQDEOH

3DWKYHORFLW\

1 1
*= *$7XUQURWDU\WDEOHGHJUHHV

W>PV@

Figure 2-2 Release axis clamp if MD36052 $MA_STOP_ON_CLAMPING = 'H01'

The part-program blocks N310 and N410 refer to the following programming example:

N100 G0 X0 Y0 Z0 A0 G90 G54 F500


N101 G641 ADIS=.1 ADISPOS=5
N210 G1 X10 ; Edit
N220 G1 X5 Y20
N310 G0 Z50 ; Retraction
N410 G0 A90 ; Turn rotary table
N510 G0 X100 ; Approach
N520 G0 Z2
N610 G1 Z-4 ; Edit
N620 G1 X0 Y-20

Basic Functions
86 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Optimized releasing of the axis clamp via travel command


If a clamped axis is to be traversed in continuous-path mode, a travel command is issued for
the clamped axis in the rapid traverse blocks (G0) immediately before the traversing block of
the clamped axis. This way, the PLC user program can release the axis clamp again in time.
(The travel command is set a maximum of two rapid travers blocks prior (including
intermediate blocks) to retain the reference to the initiating part program block).
Parameter assignment:
MD36052 $MA_STOP_ON_CLAMPING = 'H03' (Special function for clamped axis)
Prerequisites regarding the PLC Application programs
● The axis is removed from the clamp as soon as a travel command is pending.
● The axis may be removed from the clamp even if only during positioning (G0).
The following image shows an example of the interface signals and states upon releasing of
the axis clamp:

5HOHDVHD[LVFODPSLI
0'0$B6723B21B&/$03,1*>@ ಬ+ಬ

0RWLRQFRPPDQG

&ODPSD[LV

$[LVFODPSLQJSUHVVXUH

)HHGVWRS

6HUYRHQDEOH

3DWKYHORFLW\

1 1 1


*; *=5HWUDFW *$7XUQURWDU\WDEOH

W>PV@

Figure 2-3 Release axis clamp if MD36052 $MA_STOP_ON_CLAMPING = 'H03'

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 87
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Automatic stopping for setting of the clamp


If an axis is to be clamped in continuous-path mode, the NC stops the path motion before the
next "Non-rapid traverse block" if the axis has not been clamped by then, i.e. the PLC has
set the feedrate override value to zero.
Parameter assignment:
MD36052 $MA_STOP_ON_CLAMPING = 'H04' (Special function for clamped axis)
Prerequisites regarding the PLC Application programs
● The axis is always clamped when no travel command is pending.
● The axis does not have to be clamped during positioning of the other axes.
It can be seen whether the axes are being positioned depending on whether rapid
traverse (G0) is programmed.
The stop command is therefore not set immediately at the beginning of the block
containing the axis, but at the beginning of the next machining block (traversing block,
that is not traversed with rapid traverse).
● The axis is clamped if the feed rate override of a machining block is not equal to 0.
If the axis is clamped before the next machining block, i.e. the feedrate override is other
than 0 again, no stop is generated.
The following image shows an example of the interface signals and states upon setting of
the axis clamp. The part program blocks N410, N510, N520 and N610 refer to the schematic
example under certain boundary conditions.

Basic Functions
88 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

6HWD[LVFODPSLI
0'0$B6723B21B&/$03,1*>@  +

0RWLRQFRPPDQG

&ODPSD[LV

$[LVFODPSLQJSUHVVXUH

)HHGVWRS

6HUYRHQDEOH

)HHGRYHUULGH


3DWKYHORFLW\


1 1 1 1


*$ 7XUQ *;$SSURDFK *=$SSURDFK *=0DFKLQH
URWDU\
WDEOH

W>PV@

Figure 2-4 Set axis clamp if MD36052 $MA_STOP_ON_CLAMPING = 'H04'

Constraints
Continuous-path mode
For the above-mentioned functions:
● Automatic stopping for releasing the clamps
● Optimized release of the axis clamp through traverse command
● Automatic stopping for setting the clamps
the "Look Ahead" function must be active.
Part-program blocks without path motion (e.g. M82/M83) interrupt continuous-path mode and
thus also the "Look Ahead" function.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 89
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Example:
The part-program blocks N320 and N420 are inserted in the programming example used.

N100 G0 X0 Y0 Z0 A0 G90 G54 F500


N101 G641 ADIS=.1 ADISPOS=5
N210 G1 X10 ; Edit
N220 G1 X5 Y20
N310 G0 Z50 ; Retract
N320 M82 ; no path motion
N410 G0 A90 ; Turn rotary table
N420 M83 ; no path motion
N510 G0 X100 ; Approach
N520 G0 Z2
N610 G1 Z-4 ; Edit
N620 G1 X0 Y-20

The function behaves as follows:


● MD36052 $MA_STOP_ON_CLAMPING = 'H03'
No longer has an effect.
The travel command is set in Look Ahead mode only for blocks with active continuous-
path mode. M82 generates a stop and thus interrupts the continuous-path mode. The
Look Ahead stopping on N410 would not be necessary because stopping occurs anyway.
● MD36052 $MA_STOP_ON_CLAMPING = 'H04'
Generates a stop irrespective of M83, which is executed as a function of "feedrate
override 0%". The axis is thus stopped before the first machining block.

Note
MD36052 $MA_STOP_ON_CLAMPING = 'H01' or 'H04'
Both functions can be used irrespective of the clamping of axes:
• MD36052 $MA_STOP_ON_CLAMPING = 'H01'
Generates a Look Ahead stop for the path motion if no servo enable signal is active
for the relevant axis.
• MD36052 $MA_STOP_ON_CLAMPING = 'H04'
Generates a Look Ahead stop for the path motion if the feed rate overrate = 0% at the
transition from the part-program blocks with rapid traverse to part-program blocks
without rapid traverse.
Both functions ensure that the path motion in continuous-path mode is already stopped
before the start of the relevant part-program block and not just within the part-program
block.

Basic Functions
90 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Block-change criterion: Clamping tolerance


After activation of clamp monitoring:(DB31, ... DBX2.3 = 1) the block-change criterion for
traversing blocks, in which the axis stops at the end of the block, no longer acts as the
corresponding exact-stop condition but the configured clamping tolerance:
MD36050 $MA_CLAMP_POS_TOL (clamping tolerance with interface signal "Clamping
active")

Behavior upon releasing of the clamp


If the axis was moved by the clamping process, it is returned by the NC to the position
setpoint after releasing of the clamp and setting of the servo enable state. Repositioning
depends on whether "Follow-up mode" was activated for the axis:

Without follow-up mode: Repositioning by position controller


With follow-up mode: Repositioning by interpolator

See also interface signal:


DB31, ... DBX1.4 (follow-up mode)

Note
The following interface signals can be evaluated by the PLC user program as the criterion for
activation of the "Follow-up mode":
DB31, ... DBX60.6/60.7 (position reached with exact stop coarse/fine)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 91
Axis Monitoring, Protection Zones (A3)
Axis monitoring

2.2.3 Speed-setpoint monitoring

Function
The speed setpoint comprises:
● Speed setpoint of the position controller
● Speed setpoint portion of the feedforward control (with active feedforward control only)
● Dift compensation (only for drives with analog setpoint interface)

'ULIWYDOXH
)HHGIRUZDUGFRQWUROYDOXH DSSOLHVRQO\WRDQDORJGULYHV

  7RVSHHG
.9 FRQWUROOHU
)ROORZLQJ
HUURU 6SHHG
VHWSRLQW
3RVLWLRQFRQWUROOHU PRQLWRULQJ

Figure 2-5 Speed setpoint calculation

The speed-setpoint monitoring ensures by limiting the control or output signal (10V for
analog setpoint interface or rated speed for digital drives) that the physical limitations of the
drives are not exceeded:
MD36210 $MA_CTRLOUT_LIMIT (Maximum speed setpoint)

6SHHGVHWSRLQW>@

0'0$B&75/287B/,0,7>Q@


0'0$B&75/287B/,0,7>Q@
(J
 IRUWHVWPRGH

Figure 2-6 Speed setpoint limitation

Basic Functions
92 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Speed-setpoint monitoring delay


To prevent an error reaction from occurring in every speed-limitation instance, a delay time
can be configured:
MD36220 $MA_CTRLOUT_LIMIT_TIME (Speed-setpoint monitoring delay)
Only if the speed limitation is required for longer than the configured time does the
corresponding error reaction occur.

Effectivity
The speed-setpoint monitoring is only active for closed-loop position-controlled axes and
cannot be deactivated.

Fault
If the configured delay time is exceeded, the following alarm appears:
25060 "Axis <Axis identifier> Speed-setpoint monitoring"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)

Note
Upon reaching the speed-setpoint monitoring, the position feedback loop of the axis
becomes non-linear due to the limitation. Contour errors result if the axis is involved in
generating the contour.

2.2.4 Actual velocity monitoring

Function
The actual-velocity monitoring checks that the current actual velocity of a machine
axis/spindle does not exceed the configured threshold:
MD36200 $MA_AX_VELO_LIMIT (velocity-monitoring threshold)
The threshold should be 10-15% above the configured maximum velocity.
● For axes:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
● For spindles:
MD35110 $MA_GEAR_STEP_MAX_VELO_LIMIT[n] (maximum speed of gear stage)
If you use this setting the speed will not normally exceed the velocity-monitoring threshold
(exception: drive error).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 93
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Activation
The actual-velocity monitoring is activated as soon as the active measuring system returns
valid actual values (encoder limit frequency not exceeded):
DB31, ... DBX1.5/1.6 (position measuring system 1/2)

Effectivity
The actual-velocity monitoring only operates with active position control and the following
axis types:
● Linear axes
● Rotary axes
● Open loop controlled and position controlled spindles.

Fault
If the threshold is exceeded, the following alarm appears:
25030 "Axis <Axis identifier> Actual-velocity alarm limit"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)

2.2.5 Measuring-system monitoring (systems with SIMODRIVE 611D)

2.2.5.1 Encoder-limit-frequency monitoring

Function
The encoder-limit-frequency monitoring checks that the encoder frequency does not exceed
the configured encoder limit frequency.
MD36300 $MA_ENC_FREQ_LIMIT (encoder limit frequency)
Encoder-limit-frequency monitoring always refers to the active measuring system selected in
the NC/PLC interface:
DB31, ... DBX1.5/1.6 (position measuring system 1/2)

Effectivity
The encoder limit frequency is operative for:
● Linear axes
● Rotary axes
● Open loop controlled and position controlled spindles.

Basic Functions
94 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Fault
Upon exceeding of the encoder limit frequency, the following occurs:
● Message to the PLC:
DB31, ... DBX60.2 or 60.3 = 1 (encoder limit frequency exceeded 1 or 2)
● Spindles
Spindles are not stopped but continue to turn with speed control.
If the spindle speed is reduced so much that the encoder frequency passes below the
encoder limit frequency, the actual value system of the spindle is automatically
resynchronized.
● Axes
The following alarm is displayed:
21610 "Channel <Channel number> Axis <Axis identifier> Encoder <Encoder number >
Frequency exceeded"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)

Note
If the encoder limit frequency is exceeded, the position-controlled machine axis must be
re-referenced.
References:
/FB1/ Function Manual, Basic Functions; Reference Point Approach (R1)

2.2.5.2 Zero mark monitoring

Function
Zero-mark monitoring serves as a plausibility check for the actual values of the relevant
machine axis.

Note
The zero-mark monitoring is only active beneath the configured encoder limit frequency:
MD36302 $MA_ENC_FREQ_LIMIT_LOW (encoder limit frequency for encoder
resynchronization)

The type of zero-mark monitoring depends on the type of encoder used:


MD30240 $MA_ENC_TYPE (encoder type of actual-value acquisition)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 95
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Encoder Meaning
type
0 Simulation
1 Raw signal generator (high resolution)
4 General absolute encoder (e.g. with EnDat interface)

Activation/Deactivation
The function is activated/deactivated with machine data:
MD36310 $MA_ENC_ZERO_MONITORING (Zero-mark monitoring)

MD36310 Meaning
0 No zero-mark monitoring.
>0 Zero-mark monitoring active.
100 No zero-mark monitoring and all encoder alarms concealed.

2.2.5.3 Zero-mark monitoring for incremental encoders

Function
Incremental encoders with one or more zero marks use the zero-mark signals to check the
plausibility of the actual values.
Monitoring starts with the first zero-mark signal once the encoder has been switched on
(fault counter = 0). The function checks whether the number of incremental signals is
plausible after each zero mark (if equidistant zero marks) or after every second zero mark (if
distance-coded zero marks). This is the case, for example, if the number of incremental
signals from straight-line axis motions matches the value required for the distance between
two relevant zero marks. In the event of a non-plausible deviation, the fault counter
increases by 1. The zero-mark monitoring is tripped (alarm) if several non-plausible
deviations occur in direct sequence and the fault counter exceeds the configured permissible
number of deviations:
MD36310 $MA_ENC_ZERO_MONITORING (Zero-mark monitoring)
If a plausible value is recorded before this threshold is reached, the fault counter is reset to
0. This ensures that the non-plausible deviations only trigger an alarm if they occur in direct
sequence and in a non-tolerable number.

Note
If using external zero marks (BERO) instead of encoder zero marks, you must deactivate
zero-mark monitoring:
MD36310 $MA_ENC_ZERO_MONITORING = 0

Basic Functions
96 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Fault
Alarm 25020
If zero-mark monitoring is tripped in the active measuring system, alarm 25020 appears:
"Axis <Axis identifier> Zero-mark monitoring of active encoder"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)
Alarm 25021
If zero-mark monitoring is tripped in the passive measuring system alarm 25021 appears:
"Axis <Axis identifier> Zero-mark monitoring of passive encoder"
There is no further alarm response.

2.2.5.4 Zero-mark monitoring for absolute encoders

Function
Absolute encoders use the absolute values supplied by the measuring system to check the
plausibility of the actual value.
During the check, the NC compares the cyclic position value held in the position control cycle
clock based on the incremental information from the encoder with a new position value
generated directly from the absolute and incremental information and checks that the
calculated position difference does not exceed the configured permissible deviation.
MD36310 $MA_ENC_ZERO_MONITORING (Zero-mark monitoring)
The permissible deviation is indicated in 1/2 rough lines.

Note
The "zero-mark monitoring" of absolute encoders specifically detects all deviations caused
by dirt on the absolute track or by faults when transferring the absolute value. However,
small errors in the incremental track (burst interference, impulse errors) are not detected. In
such instances the zero-mark monitoring only responds to deviations in the millimeter range.
This form of monitoring should therefore serve as additional monitoring to assist the
diagnosis of absolute-position faults.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 97
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Procedure for commissioning


1. Deactivate zero-mark monitoring:
MD36310 $MA_ENC_ZERO_MONITORING = 0
2. Activate zero-mark diagnostics:
MD36312 $MA_ENC_ABS_ZEROMON_WARNING = 1
3. Move axis and monitor system variable $VA_ENC_ZERO_MON_ERR_CNT (zero-mark
monitoring error counter).
4. If $VA_ENC_ZERO_MON_ERR_CNT ≠ 0:
Increase MD36312 value and repeat step 3.
5. If $VA_ENC_ZERO_MON_ERR_CNT = 0 (over a longer period of time!):
The correct value for MD36310 is located! Apply the value from MD36312 to MD36310
and then set MD36312 to "0".

Note
In addition to $VA_ENC_ZERO_MON_ERR_CNT, the following system variables are
helpful for zero-mark diagnostics:
• $VA_ABSOLUTE_ENC_ERR_CNT (error counter in the absolute encoder)
• $VA_ABSOLUTE_ENC_STATE (absolute-encoder interface state)
• $VA_ENC_ZERO_MON_ACT (current internal values for zero-mark monitoring)
• $VA_ABSOLUTE_ENC_ZERO_MON_MAX (maximum for
$VA_ENC_ZERO_MON_ACT)
In the case of problems with settings, these system variables should also be logged
permanently via a synchronized action.

Note
Depending on the rigidity of the machine is (minimal load masses/moments of inertia are
optimum) and the controller settings, the control play "oscillates" with varying degrees of
intensity. Account must be taken of this by entering machine-specific limit values in
MD36310.

NOTICE
Upgrading the NCK software
If zero-mark monitoring is activated in absolute encoders (MD36310 > 0), the existing
MD36310 settings must be checked and, if necessary, increased during an upgrade of
the NCK software.

Fault
Alarm 25020
If zero-mark monitoring is tripped in the active measuring system, alarm 25020 appears:
"Axis <Axis identifier> Zero-mark monitoring of active encoder"
The affected axis is stopped via the configured braking ramp in follow-up mode:

Basic Functions
98 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)
Alarm 25021
If zero-mark monitoring is tripped in the passive measuring system alarm 25021 appears:
"Axis <Axis identifier> Zero-mark monitoring of passive encoder"
There is no further alarm response.
Alarm 25022
If the absolute value transfer is interrupted, alarm 25022 appears:
"Axis <Axis identifier> Encoder <Encoder number> Warning <Error fine identification>
There is no further alarm response.

Note
In the event of a fault, the adjustment of the absolute encoder is lost and the axis is no
longer referenced. The absolute encoder must be readjusted.
References:
Function Manual, Basic Functions; Reference Point Approach (R1);
chapter: Referencing with absolute encoders

NOTICE
Errors in the incremental track that cannot be detected with amplitude monitoring can cause
position deviations in the millimeter range. The deviation depends on the lattice pitch/line
count and the traversing velocity of the axis when the error occurs.
Complete position monitoring is only possible through redundancy, i.e. through comparison
with an independent second measuring system.

2.2.5.5 Customized error reactions

Customized zero-mark monitoring


You can customize the default alarm and reaction behavior of zero-mark monitoring using
system variables. This allows you to perform your own monitoring using a synchronized
action or OEM application and to use all of the reaction options available in this application,
e.g.:
● Transmit alarm
● Use cycles (e.g. approach tool-change position)
● ...

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 99
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Example:
Users can adjust the alarm and reaction behavior so that when machining an expensive
workpiece, which could be damaged if the axis is stopped as a result of an alarm, machining
stops before the machining quality of the workpiece is assessed using appropriate
synchronized action commands.

Effectivity
Customized monitoring can be activated in parallel to or as an alternative to standard zero-
mark monitoring, depending on the setting in machine data:
MD36310 $MA_ENC_ZERO_MONITORING (Zero-mark monitoring)

MD36310 Meaning
0 Customized monitoring is active, standard zero-mark monitoring is deactivated.
>0 Customized monitoring and standard zero-mark monitoring operate in parallel.
100 All encoder monitoring functions are deactivated.

If both monitoring functions are active (MD36310 > 0), you can perform cascaded
monitoring.
Example:
If a value falls below the threshold specified in MD36310, customized monitoring triggers a
prewarning; standard zero-marking monitoring will only detect a fault if the threshold is
exceeded and will then deactivate automatically.

System variables
You can implement customized error reactions using the following system variables:
Measuring systems with incremental encoders

System variable Meaning


$VA_ENC_ZERO_MON_ERR_CNT[n,ax] Contains the current number of detected zero-mark
errors.
Power on and the selection/deselection of parking
positions triggers a zero reset; reset does not reset
the counter.

n: Encoder number
ax: Machine axis

Basic Functions
100 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Measuring systems with absolute encoders

System variable Meaning


$VA_ENC_ZERO_MON_ERR_CNT[n,ax] Contains the current position difference between the
cyclic position value held in the position control cycle
clock based on the incremental information from the
encoder and a new position value generated from the
encoder's absolute and incremental information.
Power on and the selection/deselection of parking
positions triggers a zero reset; reset does not reset
the counter.
$VA_ABSOLUTE_ENC_ERR_CNT[n,ax] Contains the current number of errors detected when
transferring the absolute values. Monitors the
reliability of the absolute value transfer process.
Power on and the selection/deselection of parking
positions triggers a zero reset; reset does not reset
the counter.
$VA_ABSOLUTE_ENC_STATE[n,ax] Determines the last error status of the absolute-
encoder interface.

n: Encoder number
ax: Machine axis

2.2.5.6 Monitoring of hardware faults

Function
This monitoring function monitors the measuring systems of a machine axis for hardware
faults (e.g. measuring system failure, open circuit).

Fault
Alarm 25000
If a hardware fault is detected in the active measuring system, alarm 25000 appears:
"Axis <Axis identifier> Hardware fault active encoder"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(Maximum time for braking ramp when an error occurs)
Alarm 25001
If a hardware fault is detected in the passive measuring system, alarm 25001 appears:
"Axis <Axis identifier> Hardware fault passive encoder"
There is no further alarm response.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 101
Axis Monitoring, Protection Zones (A3)
Axis monitoring

NOTICE
For hardware faults, the referencing status of the machine axis is reset:
DB31, ... DBX60.4/60.5 = 0 (referenced/synchronized 1/2)

2.2.6 Measuring-system monitoring (systems with PROFIBUS drives)


The NC has no direct access to the measuring-system hardware for systems with
PROFIBUS drives and therefore measuring-system monitoring is mainly performed by the
drive software.
References:
Drive Functions SINAMICS S120
/FBU/SIMODRIVE 611 universal Function Manual

Encoder-limit-frequency monitoring
In the case of systems with PROFIBUS drives, encoder-limit-frequency monitoring is also
performed in the NCK.

Zero-mark monitoring
PROFIBUS drives with incremental encoders
Zero-mark monitoring is performed by the drive software.
PROFIBUS drives with absolute encoders
The drive software performs the monitoring function, while the plausibility check is carried
out in the NCK (as for SIMODRIVE 611D systems).

Basic Functions
102 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

2.2.7 Limit switches-monitoring


Overview of the end stops and possible limit switch monitoring:

QGVRIWZDUH VWVRIWZDUH +DUGZDUHOLPLW (0(5*(1&< 0HFKDQLFDO


OLPLWVZLWFK OLPLWVZLWFK VZLWFK 6723 WUDYHUVLQJOLPLW
DFWLYDEOHYLD
3/&

2.2.7.1 Hardware limit switches

Function
A hardware limit switch is normally installed at the end of the traversing range of a machine
axis. It serves to protect against accidental overtravelling of the maximum traversing range of
the machine axis while the machine axis is not yet referenced.
If the hardware limit switch is triggered, the PLC user program created by the machine
manufacturer sets the corresponding interface signal:
DB 31, ... DBX12.0/12.1 = 1 (Hardware limit switch minus/plus)

Parameterization
The braking behavior of the machine axis upon reaching the hardware limit switch is
configurable via the machine data:
MD36600 $MA_BRAKE_MODE_CHOICE (Braking behavior on hardware limit switch)

Value Significance
0 Braking with the configured axial acceleration
1 Rapid stop (set velocity = 0)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 103
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Effectivity
The hardware limit-switch monitoring is active after the control has ramped up in all modes.

Effect
Upon reaching the hardware limit switch, the following occurs:
● Alarm 21614 "Channel <Channel number> Axis <Axis identifier> Hardware limit switch
<Direction>"
● The machine axis is braked according to the configured braking behavior.
● If the axis/spindle is involved in interpolation with other axes/spindles, these are also
braked according to their configured braking behavior.
● The traversing keys of the affected machine axis are blocked based on the direction.

2.2.7.2 Software limit switch

Function
Software limit switches serve to limit the traversing range of a machine axis. Per machine
axis and per traversing direction, two (1st and 2nd) software limit switches are available:
MD36100 POS_LIMIT_MINUS (1st software limit switch minus)
MD36110 POS_LIMIT_PLUS (1st software limit switch plus)
MD36120 POS_LIMIT_MINUS2 (2nd software limit switch minus)
MD36130 POS_LIMIT_PLUS2 (2nd software limit switch plus)
By default, the 1st software limit switch is active. The 2nd software limit switch can be
activated for a specific direction with the PLC user program:
DB31, ... DBX12.2/12.3 (2nd software limit switch minus/plus)

Effectivity
The software limit switches are active:
● immediately after the successful referencing of machine axis.
● in all operating modes.

Constraints
● The software limit switches refer to the machine coordinate system.
● The software limit switches must be inside the range of the hardware limit switches.
● The machine axis can be moved to the position of the active software limit switch.

Basic Functions
104 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

● PRESET
After use of the function PRESET, the software limit-switch monitoring is no longer active.
The machine must first be re-referenced.
● Endlessly rotating rotary axes
No software limit-switch monitoring takes place for endlessly rotating rotary axes:
MD30310 $MA_ROT_IS_MODULO == 1 (Modulo conversion for rotary axis and spindle)
Exception: Setup-rotary axes

Effects
Automatic operating modes (AUTOMATIC, MDI)
● Without transformation, without overlaid movement, unchanged software limit switch:
A part program block with a programmed traversing motion that would lead to
overrunning of the software limit switch is not started.
● With transformation:
Different reactions occur depending on the transformation type:
– Behavior as above.
or
– The part program block with a programmed traversing motion that would lead to
overrunning of the software limit switch is started. The affected machine axis stops at
the active software limit switch. The other machine axes participating in the traversing
motion are braked. The programmed contour is left during this process.
● With overlaid motion
The part program block with a programmed traversing motion that would lead to
overrunning of the software limit switch is started. Machine axes that are traveling with
overlaid motion or have traveled with overlaid motion stop at the active software limit
switch in question. The other machine axes participating in the traversing motion are
braked. The programmed contour is left during this process.
Manual operating modes
● JOG without transformation
The machine axis stops at the software limit switch position.
● JOG with transformation
The machine axis stops at the software limit switch position. Other machine axes
participating in the traversing motion are braked. The preset path is left during this
process.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 105
Axis Monitoring, Protection Zones (A3)
Axis monitoring

General
● Changing of the software limit switch (1st ↔ 2nd software limit switch)
If the actual position of the machine axis after changing lies behind the software limit
switch, it is stopped with the maximum permissible acceleration.
● Overrunning the software limit switch in JOG mode
If the position of the software limit switch is reached and renewed pressing of the
traversing button should cause further travel in this direction, an alarm is displayed and
the axis is not traversed farther:
Alarm 10621 "Channel <Channel number> Axis <Axis identifier> is at the software limit
switch <Direction>"

2.2.8 Monitoring of the working area limitation

2.2.8.1 General

Function
The "working area limitation" function can be used to limit the traversing range of a channel's
geometry and special axes to a permissible operating range. The function monitors
compliance with working area limits both in AUTOMATIC mode and in JOG mode.
The following versions are available:
● Working area limitation in the Basic Coordinate System (BCS)
The traversing range limits are specified relative to the Basic Coordinate System.
● Working area limitation in the workpiece coordinate system (WCS) or adjustable zero
system (AZS)
The traversing range limits are specified relative to the workpiece coordinate system or to
the adjustable zero system.
The two types of monitoring are independent of each other. If they are both active at the
same time, the traversing range limit which most restricts the access will take effect,
depending on the direction of travel.

Basic Functions
106 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Reference point at the tool


Taking into account the tool data (tool length and tool radius) and therefore the reference
point at the tool when monitoring the working area limitation depends on the status of the
transformation in the channel:
● Transformation inactive
Without transformations during traversing motion with an active tool the position of the
tool tip P is monitored, i.e. during the monitoring the tool length is considered
automatically.
Consideration of the tool radius must be activated separately:
MD21020 $MC_WORKAREA_WITH_TOOL_RADIUS (Consideration of the tool radius in
the working area limitation)
● Transformation active
In the case of certain transformations the monitoring of the working area limitation may
differ from the behavior without transformation:
– The tool length is a component of the transformation
($MC_TRAFO_INCLUDES_TOOL_X = TRUE):
In this case the tool length is not considered, i.e. the monitoring refers to the tool
carrier reference point.
– Transformation with change in orientation:
In the case of transformations with changes in orientation, monitoring is always based
on the tool center point. MD21020 has no influence.

Note
The machine data $MC_TRAFO_INCLUDES_TOOL_... is analyzed only in certain
transformations. Condition for a possible evaluation is that the orientation of the tool
with respect to the base coordinate system cannot be changed by the transformation.
With standard transformations, the condition is only fulfilled for the "inclined axis" type
of transformation.

Response
Automatic operating modes
● With/without transformation
The part program block with a programmed traversing motion that would lead to
overrunning of the working area limits is not executed.
● With superimposed motion
The axis, which would violate the working area limitation due to a superimposed motion,
is braked with maximum acceleration and without jerk limits (BRISK), and will come to a
stop in the position of the working area limitation. Other axes involved in the movement
are braked according to current acceleration behavior (e.g. SOFT). The path correlation
may be lost due to different braking accelerations (contour violation).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 107
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Manual operating modes


● JOG with/without transformation
The axis is positioned at the working area limitation and then stopped.

Power-up response
If an axis moves outside the permissible working area when activating the working area
limits, it will be stopped promptly with the maximum permissible acceleration.

Overrunning of the working area limitation in JOG mode


In JOG mode, an axis is moved to no further than its working area limit by the control
system. When the traverse button is pressed again, an alarm is displayed and the axis does
not traverse any further.

Geo-axis replacement
Through the following machine data it is adjustable, whether during geometry axis change
the active working area limitation is retained or deactivated:
MD10604 $MN_WALIM_GEOAX_CHANGE_MODE = <value>
Value = 0: The working area limitation is deactivated during the geometry axis change.
Value = 1: The working area limitation remains activated during the geometry axis change.

2.2.8.2 Working area limitation in BKS

Application
Using the "working area limitation in BKS", the working area of a machine tool is limited so
that the surrounding devices (e.g. tool revolver, measuring stations) are protected against
damage.

Working area limits


The lower and upper working area limits of each axes are adjusted through setting data or
programmed through part program instructions:
Working area limitation through setting data
The adjustments are done through the immediately effective axis-specific setting data:
SD43420 $SA_WORKAREA_LIMIT_PLUS (Working area limitation plus)
SD43430 $SA_WORKAREA_LIMIT_MINUS (Working area limitation minus)
Programmed working area limitation
The programming is done using the G commands:

G25 X… Y… Z… lower working area limitation


G26 X… Y… Z… upper working area limitation

Basic Functions
108 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

3URJUDPPDEOHZRUNLQJ
;
DUHDOLPLWDWLRQ
*
; PD[

=
:
*
; PLQ * *
= PLQ = PD[

Figure 2-7 Programmed working area limitation

The programmed working area limitation has priority and overwrites the values entered in
SD43420 and SD43430.

Activation/Deactivation
Working area limitation through setting data
The activation/deactivation of the working area limitation for each axis takes place in a
direction-specific manner via the immediately effective setting data:
SD43400 $SA_WORKAREA_PLUS_ENABLE (Working area limitation active in the positive
direction)
SD43410 $SA_WORKAREA_MINUS_ENABLE (Working area limitation active in the
negative direction)

Value Significance
0 The working area limitation in positive or negative direction is switched off.
1 The working area limitation in positive or negative direction is active.

Programmed working area limitation


Activation or deactivation of the overall "working area limitation in the BCS" is arranged via
part program instructions:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 109
Axis Monitoring, Protection Zones (A3)
Axis monitoring

WALIMON Working area limitation ON


or
WALIMOF Working area limitation OFF

Changing the working area limitation


Working area limitation through setting data
HMI user interface: Operating area "Parameter"
● Automatic modes:
– Changes: possible only in the RESET state
– Effective: immediately
● Manual operating modes:
– Changes: always possible
– Effective: at the start of the next traversing motion
Programmed working area limitation
The working area limitation can be changed in the part program via: G25 or G26 <axis
identifier> <value>.
The change takes effect immediately.
New working area limitation values are retained after NC RESET and power on if the back-
up process has been activated in the NCK's retentive data storage for SD43420 and
SD43430:
MD10710 $MN_PROG_SD_RESET_SAVE_TAB[0] = 43420
MD10710 $MN_PROG_SD_RESET_SAVE_TAB[1] = 43430

Reset position
The reset position for the working area limitation (WALIMON or WALIMOF) is configurable via:
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)

2.2.8.3 Working area limitation in WKS/ENS

Application
The working area limitation in the workpiece coordinate system (WCS) or adjustable zero
system (AZS) is mainly intended for defining working area limits in conventional lathes.
This allows "stops" to be defined for the channel axes, thereby enabling workpiece-specific
limits to be defined for the working area.

Basic Functions
110 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Working area limitation group


There are working area limitation groups available containing all the data which is of
relevance to the working area limitation. As such, there is no need to write the working area
limitations afresh every time while switching the transformation or the active frame, for
example.
A working area limitation group comprises the following data:
● Working area limits for all channel axes
● A reference system, i.e. the coordinate system on which the working area limitations are
based
The number of the working area limitation groups used is set in the machine data:
MD28600 $MC_MM_NUM_WORKAREA_CS_GROUPS

Working area limits


Both the activation of the working area limitation and the working area limits for the individual
channel axes are defined by the following channel-specific system variables:

$AC_WORKAREA_CS_PLUS_ENABLE[<GN>, <AN>] Activation of working area limitation in a positive traversing


direction for axis <AN> in group <GN>
$AC_WORKAREA_CS_LIMIT_PLUS[<GN>, <AN>] Limit value in a positive traversing direction for axis <AN> in
group <GN>
Only effective if:
..._PLUS_ENABLE[<GN>, <AN>] = TRUE
$AC_WORKAREA_CS_MINUS_ENABLE[<GN>, <AN>] Activation of working area limitation in a negative traversing
direction for axis <AN> in group <GN>
$AC_WORKAREA_CS_LIMIT_MINUS[<GN>, <AN>] Limit value in a negative traversing direction for axis <AN> in
group <GN>
Only effective if:
..._MINUS_ENABLE = TRUE

Parameters
<GN> Number of the working area limitation group
<AN> Channel axis number
The definition is given by writing the system variables through the user interface or in the
part program.

Selection of the reference system


The reference system for the group's working area limitations is selected by means of the
channel-specific system variable:
$AC_WORKAREA_CS_COORD_SYSTEM [WALimNo]

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 111
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Value Significance
1 Working area limitation based on the WCS
3 Working area limitation based on the AZS

Activation
The working area limitations for a working area limitation group are activated by means of
the NC program command WALCSn, where n is the number of the working area limitation
group:

WALCS1 Activating working area limitation group No. 1


WALCS2 Activating working area limitation group No. 2
...

Deactivation
Working area limitations are deactivated by the NC program command:

WALCS Deactivation of the working area limitations

Changing the working area limitation


● Working area limits
$AC_WORKAREA_CS_PLUS_ENABLE[<GN>, <AN>]
$AC_WORKAREA_CS_LIMIT_PLUS[<GN>, <AN>]
$AC_WORKAREA_CS_MINUS_ENABLE[<GN>, <AN>]
$AC_WORKAREA_CS_LIMIT_MINUS[<GN>, <AN>]
– Changes
The system variables can be changed at any time through the user interface and the
part program.
– Effectivity
The changes take effect the next time the corresponding working area limitation group
is selected.
● Working area limitation groups
– Changes
The working area limitation group can be changed at any time in the part program via
the program commands WALCS1 ... WALCS10.
– Effectiveness
Changes are immediately effective.

Basic Functions
112 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Axis monitoring

Data storage and security


Data storage
The values of the system variables for the definition of the "working area limitations in
WKS/ENS" are stored in the static NC memory.

Note
For the storage of the limiting values for the linear axes, the default setting is considered for
the system of units (MD10240 $MN_SCALING_SYSTEM_IS_METRIC).

Data backup
The values of the system variables can be saved in specific backup files:

Backup file For the backup of:


_N_CHx_WAL Values of the system variables for the channel x.
_N_COMPLETE_WAL Values of the system variables for all channels.

Note
The values of the system variables for the definition of the "working area limitations in
WKS/ENS" are also component of the file "_N_INITIAL_INI".

Effects
JOG mode
If in the JOG-mode several geometry axes are traversed simultaneously (e.g. using several
handwheels) and a rotating frame is active between the base coordinate system and the
reference coordinate system of the working area limitation (WCS or AZS), then a response
of the monitoring leads to the fact that the movements of the involved geometry axes are
continued in a straight line and stopped at the working area limits.

Reset response
The reset behavior or reset position of the working area limitation in the WCS/AZS can be
set via the following machine data:
MD20150 $MC_GCODE_RESET_VALUE[59] (reset position of G groups)
MD20152 $MC_GCODE_RESET_MODE[59] (reset behavior of G groups)
● Certain working area limitation group as a reset position
MD20152 $MC_GCODE_RESET_MODE[59] = 0
MD20150 $MC_GCODE_RESET_VALUE[59] = n
A reset causes the activation of working area limitation group n in accordance with
WALCSn.
● Last working area limitation group active in the part program as a reset position
MD20152 $MC_GCODE_RESET_MODE[59] = 1

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 113
Axis Monitoring, Protection Zones (A3)
Protection zones

2.3 Protection zones

2.3.1 General

Function
Protection zones are static or moveable in 2- or 3-dimensional ranges within a machine to
protect machine elements against collisions.
The following elements can be protected:
● Permanent parts of the machine and attachments (e.g. tool-holding magazine, swiveling
probe). Only the elements that can be reached by possible axis constellations are
relevant.
● Moving parts belonging to the tool (e.g. tool, toolholder)
● Moving parts belonging to the workpiece (e.g. parts of the workpiece, clamping table,
clamping shoe, spindle chuck, tailstock).
Protection zones are defined via part program instructions or system variables so that they
completely surround the element to be protected. The activation and deactivation of
protection zones also takes place via part program instructions.
Protection-zone monitoring by the NC is channel-specific, i.e. all the active protection zones
of a channel monitor one another for collisions.

Definition of a protection zone


It is possible to define 2-dimensional or 3-dimensional protection zones as polygons with a
maximum of ten corner points. The protection zones can also contain arc contour elements.
Polygons are defined in a previously defined plane.
Expansion in the third dimension can be limited between - ∞ to + ∞.
The following four cases are possible:
● Dimension of the protection zone from -1 to +1
● Dimension of the protection zone from -1 to upper limit
● Dimension of the protection zone from lower limit to +1
● Dimension of protection zone from lower limit to upper limit.

Coordinate system
The definition of a protection zone takes place with reference to the geometric axis of a
channel in the basic coordinate system.

Basic Functions
114 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

Referenc
● Tool-related protection zones
Coordinates for tool-related protection zones must be given as absolute values referred
to the tool carrier reference point F.
● Workpiece-related protection zones
Coordinates for workpiece-related protection zones must be given as absolute values
referred to the zero point of the basic coordinate system.

Note
If no tool-related protection zone is active, the tool path is checked against the workpiece-
related protection zones.
If no workpiece-oriented protection zone is active, protection-zone monitoring does not
take place.

Orientation
The orientation of the protection zones is determined by the plane definition
(abscissa/ordinate), in which the contour is described, and the axis perpendicular to the
contour (vertical axis).
The orientation of the protection zones must be the same for the tool and workpiece-related
protection zones.

2.3.2 Types of protection zone

Machine-defined and channel-defined protection zones


● Machine-defined protection zone
Data for machine-related protection zones are defined once in the control. These
protection zones can be activated by all channels.
● Channel-defined protection zones
Data for channel-related protection zones are defined in a channel. These protection
zones can be activated only by this channel.

Example: Double-slide turning machine


● The tool-related protection zones are assigned to channel 1 or 2.
● The workpiece-related protection zones are assigned to the machine.
● The coordinate system must be identical for both channels.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 115
Axis Monitoring, Protection Zones (A3)
Protection zones

Maximum number of protection areas


The maximum definable number of machine- and channel-related protection zones is set via:
MD18190 $MN_MM_NUM_PROTECT_AREA_NCK (Number of files for machine-related
protection zones)
MD28200 $MC_MM_NUM_PROTECT_AREA_CHAN (Number of files for channel-specific
protection zones)

Coordinates
The coordinates of a protection zone must always be programmed as absolute values with
respect to the reference point of the protection zone. When the protection zone is activated
via the part program it is possible to apply a relative offset to the reference point of the
protection zone.

Examples
In the following figures some examples for protection zones have been presented:

:RUNSLHFHUHODWHG
; SURWHFWLRQ]RQHIRU 7RROKROGHU
VSLQGOHFKXFN
:RUNSLHFHUHODWHG
SURWHFWLRQ]RQHIRU
WRROKROGHU

'ULOO

0 3

=
:

;

Figure 2-8 Example of application on turning machine

Basic Functions
116 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

< 7RROUHODWHG
SURWHFWLRQ]RQH
7RROUHODWHG
SURWHFWLRQ]RQH

:RUNSLHFHUHODWHG
; SURWHFWLRQ]RQH

=

Figure 2-9 Example of a milling machine

:RUNSLHFHUHODWHG
SURWHFWLRQ]RQHIRU
3 WDLOVWRFN

: =

Figure 2-10 Example of a turning machine with relative protection zone for tailstock

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 117
Axis Monitoring, Protection Zones (A3)
Protection zones

2.3.3 Definition via part program instruction

General
A protection-zone definition must contain the following information:
● Protection zone type (workpiece- or tool-related)
● Orientation of the protection zone
● Type of limitation in the third dimension
● Upper and lower limits of the protection zone in the third dimension
● Activation type ("Protection zone immediately active": only possible via system variable)
● Contour elements

Definition of protection zones


The following systematics must be maintained in the definition of protection zones:
● Definition of the working plane: G17, G18 or G19
● Definition beginning
– Channel-specific protection zones: CPROTDEF(...)
– Machine or NC-specific protection zone: NPROTDEF(...)
● Contour description for protection zone
● End of definition: EXECUTE(...)

Definition of the working plane


The desired working plane to which the contour description of the protection zone refers
must be selected with G17, G18, G19 before start of the definition. It may not be changed
before the end of the definition. Programming of the applicate is not permitted between start
and end of the definition.

Definition beginning
The definition start is defined by the corresponding subroutine:
● CPROTDEF(n, t, applim, appplus, appminus)
● NPROTDEF(n, t, applim, appplus, appminus)

Parameters Type Description


n INT Number of defined protection zone
t BOOL Protection zone type
TRUE Tool-oriented protection zone
FALSE Workpiece-related protection zone
applim INT Type of limitation in the third dimension
0 No limitation

Basic Functions
118 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

Parameters Type Description


1 Limit in plus direction
2 Limit in minus direction
3 Limit in positive and negative direction
appminus REAL Value of the limit in the negative direction in the 3rd dimension 1)
appplus REAL Value of the limit in the positive direction in the 3rd dimension 1)
1) The following must be true: appplus > appminus

Contour description for protection zone


The contour of a protection zone is described with traversing motions. These are not
executed and have no connection to previous or subsequent geometry descriptions. They
only define the protection zone.
The contour of a protection zones is specified with up to eleven traversing movements in the
selected working plane. The first traversing movement is the movement to the contour. The
last point in the contour description must always coincide with the first point of the contour
description. In the case of rotation-symmetrical contours (e.g. spindle chuck), the whole
contour must be described (not merely the contour to the turning center).
The valid protection zone is the zone left of the contour:
● Internal protection zone
The contour of an internal protection zone must described in the counter-clockwise
direction.
● External protection zones (permitted only for workpiece-related protection zones)
The contour of an external protection zone must be described in the clockwise direction.

([WHUQDOSURWHFWLRQ]RQH
;

,QWHUQDOSURWHFWLRQ]RQH
3

: =

,QWHUQDOSURWHFWLRQ]RQH

;

Figure 2-11 Examples: External and internal protection zone

Tool-related protection zones must be convex. If a concave protection zone is required, the
protection zone must be divided up into several convex protection zones.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 119
Axis Monitoring, Protection Zones (A3)
Protection zones

&RQYH[SURWHFWLRQ]RQHV

&RQFDYHSURWHFWLRQ]RQHV QRWSHUPLVVLEOH

Figure 2-12 Examples: convex and concave tool-related protection zones

Contour elements
The following contour elements are permissible:
● G0, G1 for straight contour elements
● G2 for circle segments in the clockwise direction
Permissible only for workpiece-related protection zones.
Not permissible for tool-related protection zones because they must be convex.
● G3 for circular segments in the counter-clockwise direction
A protection zone cannot be described by a complete circle. A complete circle must be
divided into two half circles.
The sequence G2, G3 or G3, G2 is not permitted. A short G1 block must be inserted
between the two circular blocks.

Constraints
During the definition of a protection zone, the following functions must not be active or used:
● Tool radius compensation (cutter radius compensation, tool nose radius compensation)
● Transformation
● Reference point approach (G74)
● Fixed point approach (G75)
● Dwell time (G4)
● Block search stop (STOPRE)
● End of program (M17, M30)
● M functions: M0, M1, M2
Programmable frames (TRANS, ROT, SCALE, MIRROR) and configurable frames (G54 to G57)
are ineffective.

Basic Functions
120 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

Inch/metric switchovers with G70/G71 or G700/G710 are effective.

End of definition
The end of definition is defined by the following subroutine:
EXECUTE(NOT_USED)

Parameters Type Description


NOT_USED INT Error variable has no effect in protection zones with EXECUTE.
The definition of a machine-specific or channel-specific protection zone is completed with the
subroutine EXECUTE(n).

2.3.4 Definition via system variable

General
If the protection zones are defined with part program instructions (see Chapter: Definition for
each part program instructions), the protection zone data are stored in system variables.
The system variables can also be written directly so that the definition of protection areas
can also be performed directly in the system variables.
The same supplementary conditions apply for the definition of the contour of a protection
zone as for a protection-zone definition via part program instructions.

System variables
The protection zone definitions cover following system variables:

System variable Type Significance


$SN_PA_ACTIV_IMMED[n] BOOL Activation type
$SC_PA_ACTIV_IMMED[n] The protection zone is active/not active immediately after
the power up of the control and the referencing of the axes.
FALSE not immediately active
TRUE immediately active
$SN_PA_T_W[n] INT Protection zone type
$SC_PA_T_W[n] 0 Workpiece-related protection zone
1 reserved
2 reserved
3 Tool-related protection zone
$SN_PA_ORI[n] INT Orientation of the protection zone, i.e. polygon definition in
$SC_PA_ORI[n] the plane of:
0 1st and 2nd geometry axis
1 3rd and 1st geometry axis
2 2nd and 3rd geometry axis
$SN_PA_LIM_3DIM[n] INT Type of limitation in the third dimension

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 121
Axis Monitoring, Protection Zones (A3)
Protection zones

System variable Type Significance


$SC_PA_LIM_3DIM[n] 0 No limitation
1 Limit in plus direction
2 Limit in minus direction
3 Limit in positive and negative direction
$SN_PA_PLUS_LIM[n] REAL Value of the limit in the positive direction in the 3rd
$SC_PA_PLUS_LIM[n] dimension
$SN_PA_MINUS_LIM[n] REAL Value of the limit in the negative direction in the 3rd
$SC_PA_MINUS_LIM[n] dimension
$SN_PA_CONT_NUM[n] INT Number of valid contour elements
$SC_PA_CONT_NUM[n]
$SN_PA_CONT_TYP[n, i] INT Contour type[i], contour type (G1, G2, G3) of the nth contour
$SC_PA_CONT_TYP[n, i] element
$SN_PA_CONT_ABS[n, i] REAL End point of the contour[i], abscissa value
$SC_PA_CONT_ABS[n, i]
$SN_PA_CONT_ORD[n, i] REAL End point of the contour[i], ordinate value
$SC_PA_CONT_ORD[n, i]
$SN_PA_CENT_ABS[n, i] REAL Center point of the circular contour[i], absolute abscissa
$SC_PA_CENT_ABS[n, i] value
$SN_PA_CENT_ORD[n, i] REAL Center point of the circular contour[i], absolute ordinate
$SC_PA_CENT_ORD[n, i] value
$SN_... are system variables for NC and machine-specific protection zones.
$SC_... are system variables for channel-specific protection zones.
The index "n" corresponds to the number of the protection zone: 0 = 1st protection zone
The index "i" corresponds to the number of the contour element: 0 = 1st contour element
The contour elements must be defined in ascending order.

Note
The system variables of the protection-zone definitions are not restored with REORG.

Data of the protection-zone definitions


Data storage
The protection-zone definitions are stored in the following files:

File Blocks
_N_NCK_PRO Data block for NC-specific protection zones
_N_CHAN1_PRO Data block for channel-specific protection zones in channel 1
_N_CHAN2_PRO Data block for channel-specific protection zones in channel 2

Basic Functions
122 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

Data backup
The protection-zone definitions are saved in the following files:

File Blocks
_N_INITIAL_INI All data blocks of the protection zones
_N_COMPLETE_PRO All data blocks of the protection zones
_N_CHAN_PRO All data blocks of the channel-specific protection zones

2.3.5 Activation and deactivation of protection zones

General information
The activation status of a protection zone is:
● Preactivated
● Preactivated with conditional stop
● Enabled
● Deactivated
A protection zone is monitored for violation only when it is activated.
Activation
The activation of a protection zone can take place through:
● Part program instruction
● Automatically after the control powers up
● PLC user program
For activation through the PLC user program, the protection zone must be first
preactivated via a part program.
The preactivation, deactivation and activation of all protection zones always takes place
channel-specifically. A protection zone can also be active in multiple channels
simultaneously (application example: Double-slide single-spindle machine with one quill and
two machining slides.
Protection zones are activated immediately after the runup of the control, if the
corresponding system variable $SN_PA_ACTIV_IMMED[n] or. $SC_PA_ACTIV_IMMED[n]
has been set.

Note
Machine-related protection zones are activated after the runup of the control in all channels.

An activated protection zone is only taken into account after the successful referencing of all
participating geometry axes.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 123
Axis Monitoring, Protection Zones (A3)
Protection zones

Preactivation
Only preactivated protection zones can be activated from the PLC user program.

; 3UHDFWLYDWHGSURWHFWLRQ]RQH

: =

Figure 2-13 Example: Turning machine with preactivated protection zone for a sensor.

Preactivation with conditional stop


In the case of preactivation with condition stop, the system does not always stop in front of a
preactivated protection zone which has been violated. The stop only occurs if the protection
zone has been activated. This facilitates uninterrupted processing if the protection zones
have only been activated in special cases. N.B. The system may move into the protection
zone as a result of the braking ramp if the protection zone is only activated immediately prior
to positioning.
Deactivation
A protection zone can be deactivated from a part program. Additionally an active,
preactivated protection zone can be set again in the preactivated (= ineffective) state through
the PLC user program.
RESET response
The activation status of a protection zone is retained even after NC-RESET and program end.

Memory requirements
The memory requirement of the persistent memory is determined with following machine
data:
MD18190 $MN_MM_NUM_PROTECT_AREA_NCK (Number of available machine-defined
protection zones)
MD28200 $MC_MM_NUM_PROTECT_AREA_CHAN (Number of available channel-defined
protection zones)
The memory requirement in the dynamic part with regard to the protection zones is
established with following machine data:
MD28210 $MC_MM_NUM_PROTECT_AREA_ACTIVE (Maximum number of protection
zones that can be activated simultaneously in the channel)
MD28212 $MC_MM_NUM_PROTECT_AREA_CONTUR (Maximum number of definable
contour elements per protection zone)

Basic Functions
124 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

Deactivation, preactivation, activation via part program


The activation status of a channel- or machine-specific protection zone is defined by the
corresponding subroutine:
● Channel-specific protection zone:
CPROT (n, state, xMov, yMov, zMov)
● Machine or NC-specific protection zone:
NPROT (n, state, xMov, yMov, zMov)

Parameters Type Description


n INT Number of protection zone
state INT Activation status
0 deactivated
1 preactivated
2 activated
3 preactivated with conditional stop
xMov, REAL Offset values of the previously defined protection zone in the geometry axes
yMov,
zMov

Offsets
During preactivation or activation of the protection zone, an offset can be entered in 0 to 3
dimensions. The offset refers to:
● Workpiece-related protection zones: Machine zero
● Tool-related protection zones: Tool holder reference point F

Note
A protection zone cannot be activated in a single channel with different offsets
simultaneously.

Activation via PLC user program


A protection zone preactivated in the part program can be activated in the PLC user
program.
Preactivated protection zones
The NC indicates the preactivated protection zones:
DB21, ... DBX272.0 to 273.1 (machine-related protection zone 1 - 10 preactivated)
DB21, ... DBX274.0 to 275.1 (channel-specific protection zone 1 - 10 preactivated)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 125
Axis Monitoring, Protection Zones (A3)
Protection zones

Protection-zone violation
Activated and preactivated protection zones that are or would be violated by the
programmed traversing motions of the current part-program block if the PLC user program
would activate the preactivated protection zone:
DB21, ... DBX276.0 to DBX277.1 (machine-related protection zone 1 - 10 violated).
DB21, ... DBX278.0 to DBX279.1 (channel-specific protection zone 1 - 10 violated).
Activate
The preactivated protection zones can be activated from the PLC user program:
DB21, ... DBX8.0 to DBX9.1 (Activate machine-related protection zone 1 - 10)
DB21, ... DBX10.0 to DBX11.1 (Activate channel-specific protection zone 1 - 10)
Deactivation
Protection zones activated from the part program cannot be deactivated by the PLC user
program.

Note
It follows from the rules listed above that protection zones that should be activated via the
PLC user program are intended specially for this. Preactivation in the part program is only
useful for these protection zones.
For protection zones that are known only in the part program and not in the PLC user
program, only activation in the part program makes sense.

Automatic activation after the control powers up


The configuration for automatic activation of a protection zone after the control powers up is
performed via the following system variable:
● Channel-specific protection zone:
$SC_PA_ACTIV_IMMED[ n ]
● Machine or NC-specific protection zone:
$SN_PA_ACTIV_IMMED[ n ]
With automatic activation, no relative offset of the protection zone is possible.

Block search with calculation


For block search with calculation, the last programmed activation state of a protection zone
is always taken into account.

Program test
In automatic modes, activated and preactivated protection zones are monitored even during
program control: PROGRAM TEST.

Basic Functions
126 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

2.3.6 Protection-zone violation and temporary enabling of individual protection zones

Function
Workpiece and tool-related protection zones that are activated or deactivated are monitored
for collision. If a protection-zone violation is detected, behavior in the individual operating
modes is as follows.
Terminating temporary enabling
Temporary enabling of a protection zone is terminated after the following events:
● after NC RESET
● Operating modes AUTOMATIC or MDA End of block is outside the protection zone
● Manual operating modes: End of movement is outside the protection zone
● Activating a protection zone
On NC RESET all the enabled protection zones become active again. If the part program or
jog mode is started again, the protection zones must be re-enabled. If the current position
lies within a protection zone that becomes active again after NC RESET, this protection zone
must be enabled again on the first path movement.
Preactivated protection zones
Protection zones can be preactivated with part programs. To make them fully operative, they
must also be set to the "operative" state by the PLC.
In contrast to AUTOMATIC mode, a change in the NC/PLC interface signals "Make
preactivated protection zones operative" only has an effect on stationary axes in the
geometry system. This means: If an inoperative protection zone is made "operative" once a
motion has been started, it is not evaluated until the axes have stopped, possibly resulting in
the output of an alarm.
If a preactivated protection zone is made "operative" during traversing, the alarm 10704
"Protection-zone monitoring is not guaranteed" and the PLC interface signal are set:
DB31, ... DBX39.0 (protection-zone monitoring not guaranteed).
Deactivation of tool-related protection zones
Tool-related protection zones can be deactivated only in the part program or, if they have
been preactivated, by being rendered "inoperative" by the PLC.
Geometry axis change and transformation change
Through the following machine data it is adjustable, whether active protection zones are
retained or deactivated during the geometry axis change or transformation change:
MD10618 $MN_PROTAREA_GEOAX_CHANGE_MODE

Bit Value Significance


0 0 Protection zones are deactivated during the transformation change.
1 Active protection zones remain active after a transformation is changed.
1 0 Protection zones are deactivated during the geometry axis change.
1 Active protection zones remain active after a geometry axis change.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 127
Axis Monitoring, Protection Zones (A3)
Protection zones

Monitoring of overlaid motion


Axes that have been assigned to another channel are not taken into account. The last
position to be approached is taken to be the end position. It is not taken into account whether
the axis has traversed after changing channels.

Behavior in the AUTOMATIC and MDI operating modes


Protection zones are not overrun in Automatic modes:
● If the movement in a block is from outside into the protection zone (N30), deceleration is
executed toward the end of the previous block (N20) and the movement is stopped.
– If the protection zone is preactivated but not activated by the PLC, machining is
continued (case 1).
– If the protection zone is activated or preactivated and activated by the PLC, machining
is stopped (case 2).
● If the starting point of the block is inside the protection zone, the movement is not started.
In case of violation of protection zone for the workpiece-related protection zone, the alarm:
10700 "NCK-protection zone in v or MDI violated" or 10701 "channel-specific protection zone
in AUTOMATIC or MDI violated" is given.

1 1 3URWHFWLRQ]RQH


1
1

)RUSUHDFWLYDWHGSURWHFWLRQ]RQHDFWLYDWHGE\3/&
Y )RUSUHDFWLYDWHGSURWHFWLRQ]RQHGHU RUIRUDFWLYDWHGSURWHFWLRQ]RQHDIWHUUHOHDVHRI
QRWDFWLYDWHGE\3/& FDVH SURWHFWLRQ]RQH FDVH

W
1 1 1 1 1 1

Figure 2-14 Behavior of the path velocity when entering a protection zone

Overlaying several axis motions


Overlaid motions of external ZO (zero offsets) or DRF are taken into account if they are
executed at a sufficiently early point in time.
If an overlaid motion occurs while a protection zone is active or operative, an alarm is output
as a warning. This alarm has no effect on the machining operation and resets itself if the
transferred motion has been fully taken into account. The PLC interface signal is set at the
same time as alarm 10704:
DB31, ... DBX39.0 (protection-zone monitoring not guaranteed).

Basic Functions
128 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

Enabling of workpiece-related protection zones


When a workpiece-related protection zone has been violated, the operator can enable it
temporarily with NC start in the AUTOMATIC and JOG modes so that it can be traversed.
This clears the alarm and travels into the protection zone in the AUTOMATIC and MDI
operating modes.
Only workpiece-related protection zones can be enabled temporarily with NC start and
traversed by all tool-related protection zones including the programmed path.
If on NC-START the preactivated tool or workpiece-related protection zone is deactivated by
the PLC after the alarm, machining is continued without the protection zone being enabled
temporarily.
If a fully operative, preactivated protection zone causes a machining interruption and the
output of an alarm owing to protection-zone violation, machining can be resumed on NC start
if the PLC makes the zone inoperative again.
If enabling of a protection zone is to be safeguarded better than with a simple NC start, NC
start must be disabled or made dependent on other conditions in the PLC user program
when this alarm is triggered.
If the user does not want to permit overrunning the protection zone, he can terminate the
traversing movement with NC RESET.
If several protection zones are violated at the same time by the movement, acknowledgment
is required for each of these protection zones. With NC start the individual protection zones
can then be enabled one after the other.
Application for temporary enabling:
Drilling a turned part: The drill is allowed to enter the protection zone of the spindle chuck.
Monitoring of overlaid motion
On preparation of the NC blocks, part of the offsets of geometry axes resulting from the
overlaid motions are taken into account.
If further offsets occur that could not be taken into account on preparation of the blocks, the
channel-specific PLC interface signal is set.
DB31, ... DBX39.0 (protection-zone monitoring not guaranteed).
This signal is set while offsets are active that cannot be taken into account. The signal can
be set and reset within a block.
Simultaneously with the PLC interface signal, a self-canceling alarm 10704 "Protection-zone
monitoring is not guaranteed" is output.
The following overlaid motions of geometry axes are taken into account in the preparation of
blocks:
1. DRF offsets
2. Work offsets external
3. Fine tool offsets
4. Rapid retraction
5. Offsets generated by compile cycles
6. Oscillation

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 129
Axis Monitoring, Protection Zones (A3)
Protection zones

7. Concurrent positioning axes


8. Positioning axes
The alarm is canceled or the PLC interface signal reset when the offsets from the overlaid
motions are taken into account again or when the offsets are reduced to zero again.

Note
The end position for positioning axes is taken to be a position in the whole block. This means
that the alarm 10704 "Protection zones not guaranteed" is output when the positioning axis
starts to move. The overlaid motions themselves are not limited, nor is there any intervention
in processing of the program.

Behavior in JOG mode


Overlaying several axis motions
In JOG mode traversing can be performed simultaneously in several geometry axes even
when protection zones are active. However, safe monitoring of protection zones can then no
longer be guaranteed. This is indicated as follows:
● Alarm: " 10704 Protection-zone monitoring is not guaranteed"
● DB31, ... DBX39.0 = 1 (protection-zone monitoring not guaranteed)
The traversing range of the geometry axes is limited in all directions by the protection zones
with the same effect as they had at the start point.

(QGSRLQWRIWKHPRWLRQZLWK
FRQWLQXRXV-2*

0D[D[LDOSDWKZLWK
-2*ZLWKDVLQJOH
D[LV

6WDUWSRLQW

Figure 2-15 Motion boundaries of axes

When the geometry axes have completed their movements (end of interpolation), the alarm
is automatically reset and the final position checked to see whether it is within one or several
protection zones.

Basic Functions
130 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

There are three possible situations in this case:


1. If the position is outside all active protection zones, the next traversing motion can be
started normally. The appropriate PLC interface signals "Machine-specific or channel-
specific protection zone violated" are set for the protection zones that are enabled or just
preactivated, but not yet operative.
2. If the position is within an active protection zone, the alarm "Protection zone violated in
JOG" is generated, thereby disabling any traversing motions. The appropriate PLC
interface signals "Machine-specific or channel-specific protection zone violated" are also
set.
The alarm is reset by:
– Temporary enabling of the affected protection zones
– Deactivation of the relevant protection zones if they are preactivated
– Deactivation of the protection zone in MDI
3. If the position is on the protection zone limitation (position is still valid), no alarm is
generated.

Note
While any one axis in the geometry system is still oscillating, the status "Motions of axes
in geometry system completed" cannot be reached.
The warning remains active, the other axes in the geometry system can continue to
traverse.
The alarm "Protection zone reached in JOG" is not output if the motion of the first axis to
be started is terminated by the limitation determined prior to the motion.

Monitoring (pre)activated protection zones


(Pre)activated protection zones are also monitored in manual modes (JOG, INC,
handwheel).
Limitation of traversing motion of an axis
Axis motions are limited in JOG mode by means of software limit switches or the working
area limitation. The protection zones are an additional limiting element on the traversing
motion of the geometry axes.
If the traversing motion of an axis is limited because it has reached a protection zone, then a
self-resetting alarm "Protection zone reached in JOG" is generated. The alarm text specifies
the violated protection zone and the relevant axis. It is assured that no protection zone will
be violated when one axis is traversing in JOG. (This response is analogous to approaching
software limit switches or a working area limitation).
The alarm is reset:
● when an axis is traversed along a path that does not lead into the protection zone
● when the protection zone is enabled
● on NC RESET.
If an axis starts to move towards a protection zone when it is at a protection zone limit, then
a self-resetting alarm "Protection zone reached in JOG" is output and the motion is not
started.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 131
Axis Monitoring, Protection Zones (A3)
Protection zones

Enabling of workpiece-related protection zones


When a workpiece-related protection zone has been violated, the operator can also enable it
temporarily in JOG mode so that it can be traversed. This resets the alarm and the motion is
started in the manual operating modes after a new travel command.
Temporary enabling of protection zones
Protection zones can be enabled in JOG mode when:
1. the current position is within a protection zone (alarm active)
2. a motion is to be started on the protection zone limit (alarm active)
A protection zone is enabled when:
● a positive signal edge arrives at the PLC interface "Temporary enabling of protection
zones" (this enable resets the active alarm).
● if the axis then starts to move again into the same protection zone.
Start of the motion causes:
● the protection zone to be enabled
● the appropriate PLC interface signals "Machine-specific or channel-specific protection
zone violated" to be set.
● the axis to start moving.
The enabling signal is canceled if a motion is started that does not lead into the enabled
protection zone.
If the current position is located in other active protection zones or the limit for other
protection zones must be crossed with the motion that has been started, then alarms 10702,
10703 or 10706, 10707 are output. The PLC interface signal "Temporary enabling of
protection zones" can be set again to enable the protection zone for which an alarm is
output.
The enabling signals for the individual protection zones are still valid on switchover to
operating modes AUTOMATIC or MDA, and vice versa, the enabling signals of protection
zones that were output in AUTOMATIC and MDA remain valid.
If the end position is located outside the relevant protection zone the next time the axes in
the geometry system stop:
● the enabling signals of the individual protection zones are canceled
● the appropriate PLC interface signal "Machine-specific or channel-specific protection
zone violated" is reset.

Basic Functions
132 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Protection zones

2.3.7 Restrictions in protection zones

Restrictions in protection-zone monitoring


No protection-zone monitoring is possible under the following conditions:
● Orientation axes
● Protection-zone monitoring for fixed machine-related protection zones with transmit or
peripheral surface transformation.
Exception: Protection zones defined with rotation symmetry around the spindle axis.
Here, no DRF offset must be active.
● Mutual monitoring of tool-related protection zones

Positioning axes
For positioning axes, only the programmed block end point is monitored.
An alarm is displayed during the traversing motion of the positioning axes:
Alarm: "10704 Protection-zone monitoring is not guaranteed".

Axis exchange
If an axis is not active in a channel because of an axis replacement, the position of the axis
last approached in the channel is taken as the current position. If this axis has not yet been
traversed in the channel, zero is taken as the position.

Machine-related protection zones


A machine-related protection zone or its contour is defined using the geometry axis, i.e. with
reference to the basic coordinate system (BCS) of a channel. In order that correct protection-
zone monitoring can take place in all channels in which the machine-related protection zone
is active, the basic coordinate system (BCS) of all affected channels must be identical
(position of the coordinate point of origin with respect to the machine zero point and
orientation of the coordinate axes).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 133
Axis Monitoring, Protection Zones (A3)
Supplementary conditions

2.4 Supplementary conditions

2.4.1 Axis monitoring functions

Settings
For correct operation of the monitoring, the following settings must be made or checked, in
addition to the machine data mentioned:
General
● MD31030 $MA_LEADSCREW_PITCH (Leadscrew pitch)
● MD31050 $MA_DRIVE_AX_RATIO_DENOM (Denominator load gearbox)
● MD31060 $MA_DRIVE_AX_RATIO_NUMERA (Numerator load gearbox)
● MD31070 $MA_DRIVE_ENC_RATIO_DENOM (Denominator measuring gearbox)
● MD31080 $MA_DRIVE_ENC_RATIO_NUMERA (Numerator measuring gearbox)
● MD32810 $MA_EQUIV_SPEEDCTRL_TIME (equivalent time constant speed control loop
for feedforward control)
● Encoder resolution
The corresponding machine data is described in:
References:
/FB1/ Function Manual, Basic Functions; Velocities, Setpoint/Actual Value Systems,
Closed-Loop Control (G2)
Only drives with analog speed setpoint interface
● MD32260 $MA_RATED_VELO (Nominal motor speed)
● MD32250 $MA_RATED_OUTVAL (Nominal output voltage)

Basic Functions
134 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Examples

2.5 Examples

2.5.1 Axis monitoring

2.5.1.1 Working area limitation in WKS/ENS

Available channel axes


4 axes are defined in the channel: X, Y, Z and A
The A-axis is a rotary axis (not modulo).

Parameterize number of working area limitation groups


Three working area limitation groups will be provided:
MD28600 $MC_MM_NUM_WORKAREA_CS_GROUP = 3

Define working area limitation groups


Additionally 2 working area limitation groups will be defined:
Working area limitation group 1
In the first working area limitation group the axes in the ENS coordinate system will be
limited:
● X axis in the plus direction: 10 mm
● X axis in the minus direction: No limitation
● Y axis in the plus direction: No limitation
● Y axis in the minus direction: 25 mm
● Z axis in the plus direction: No limitation
● Z axis in the minus direction: No limitation
● A axis in the plus direction: 10 degrees
● A axis in the minus direction: -40 degrees

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 135
Axis Monitoring, Protection Zones (A3)
Examples

The system variables are assigned as follows:

N1 $AC_WORKAREA_CS_COORD_SYSTEM[1] = 3 ; The working area limitation


of the working area
limitation group 1 applies
in the ENS.
N10 $AC_WORKAREA_CS_PLUS_ENABLE[1,X] = TRUE
N11 $AC_WORKAREA_CS_LIMIT_PLUS[1,X] = 10
N12 $AC_WORKAREA_CS_MINUS_ENABLE[1,X] = FALSE
N20 $AC_WORKAREA_CS_PLUS_ENABLE[1,Y] = FALSE
N22 $AC_WORKAREA_CS_MINUS_ENABLE[1,Y] = TRUE
N23 $AC_WORKAREA_CS_LIMIT_MINUS[1,Y] = 25
N30 $AC_WORKAREA_CS_PLUS_ENABLE[1,Z] = FALSE
N32 $AC_WORKAREA_CS_MINUS_ENABLE[1,Z] = FALSE
N40 $AC_WORKAREA_CS_PLUS_ENABLE[1,A] = TRUE
N41 $AC_WORKAREA_CS_LIMIT_PLUS[1,A] = 10
N42 $AC_WORKAREA_CS_MINUS_ENABLE[1,A] = TRUE
N43 $AC_WORKAREA_CS_LIMIT_MINUS[1,A] = -40

Working area limitation group 2


In the second working area limitation group the axes in the WKS coordinate system can be
limited:
● X axis in the plus direction: 10 mm
● X axis in the minus direction: No limitation
● Y axis in the plus direction: 34 mm
● Y axis in the minus direction: -25 mm
● Z axis in the plus direction: No limitation
● Z axis in the minus direction: -600 mm
● A axis in the plus direction: No limitation
● A axis in the minus direction: No limitation

Basic Functions
136 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Examples

The system variables are assigned as follows:

N51 $AC_WORKAREA_CS_COORD_SYSTEM[2] = 1 ; The working area limitation


of working area limitation
group 2 applies in the WCS.
N60 $AC_WORKAREA_CS_PLUS_ENABLE[2,X] = TRUE
N61 $AC_WORKAREA_CS_LIMIT_PLUS[2,X] = 10
N62 $AC_WORKAREA_CS_MINUS_ENABLE[2,X] = FALSE
N70 $AC_WORKAREA_CS_PLUS_ENABLE[2,Y] = TRUE
N73 $AC_WORKAREA_CS_LIMIT_PLUS[2,Y] = 34
N72 $AC_WORKAREA_CS_MINUS_ENABLE[2,Y] = TRUE
N73 $AC_WORKAREA_CS_LIMIT_MINUS[2,Y] = –25
N80 $AC_WORKAREA_CS_PLUS_ENABLE[2,Z] = FALSE
N82 $AC_WORKAREA_CS_MINUS_ENABLE[2,Z] = TRUE
N83 $AC_WORKAREA_CS_LIMIT_PLUS[2,Z] = –600
N90 $AC_WORKAREA_CS_PLUS_ENABLE[2,A] = FALSE
N92 $AC_WORKAREA_CS_MINUS_ENABLE[2,A] = FALSE

Activate working area limitation group 2


In order to activate the working area limitation group 2, following instruction must exist in the
part program:

...
N100 WALCS2 ...
...

2.5.2 Protection zones

2.5.2.1 Definition and activation of protection zones

Requirement
The following internal protection zones are to be defined for a turning machine:
● One machine- and workpiece-related protection zone for the spindle chuck, without
limitation in the third dimension
● One channel-specific protection zone for the workpiece, without limitation in the third
dimension
● One channel-specific, tool-related protection zone for the toolholder, without limitation in
the third dimension

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 137
Axis Monitoring, Protection Zones (A3)
Examples

The workpiece zero is placed on the machine zero to define the protection zone for the
workpiece.
When activated, the protection zone is then offset by 100mm in the Z axis in the positive
direction.


6WDUWSRLQW 
)

3URWHFWLRQ]RQH 7RROKROGHU
;
IRUVSLQGOHFKXFN

 6WDUWSRLQW


6WDUWSRLQW 
'ULOO

0 3

: 5 =



3URWHFWLRQ]RQH
 IRUWRROKROGHU
 3URWHFWLRQ]RQH
IRUZRUNSLHFH
; 

Figure 2-16 Example of protection zones on a turning machine

Protection-zone definition in the part program

Table 2- 1 Part program excerpt for protection-zone definition:

DEF INT AB
G18 ; Definition of the working plane
NPROTDEF(1,FALSE,0,0,0) ; Definition beginning: Protection zone for
spindle chuck
G01 X100 Z0 ; Contour description: 1st contour element
G01 X-100 Z0 ; Contour description: 2nd contour element
G01 X-100 Z110 ; Contour description: 3rd contour element
G01 X100 Z110 ; Contour description: 4th contour element
G01 X100 Z0 ; Contour description: 5th contour element
EXECUTE(AB) ; End of definition: Protection zone for
spindle chuck
CPROTDEF(1,FALSE,0,0,0) ; Definition beginning: Protection zone for
workpiece
G01 X80 Z0 ; Contour description: 1st contour element

Basic Functions
138 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Examples

G01 X-80 Z0 ; Contour description: 2nd contour element


G01 X-80 Z40 ; Contour description: 3rd contour element
G01 X80 Z40 ; Contour description: 4th contour element
G01 X80 Z0 ; Contour description: 5th contour element
EXECUTE(AB) ; End of definition: Protection zone for
workpiece
CPROTDEF(2,TRUE,0,0,0) ; Definition beginning: Protection zone for
tool holder
G01 X0 Z-50 ; Contour description: 1st contour element
G01 X-190 Z-50 ; Contour description: 2nd contour element
G03 X-210 Z-30 I-20 ; Contour description: 3rd contour element
G01 X-210 Z20 ; Contour description: 4th contour element
G01 X0 Z50 ; Contour description: 5th contour element
G01 X0 Z-50 ; Contour description: 6th contour element
EXECUTE(AB) ; End of definition: Protection zone for tool
holder

Protection-zone definition with system variables

Table 2- 2 Protection zone: Spindle chuck

System variable Value Comment


$SN_PA_ACTIV_IMMED[0] 0 ; Protection zone for spindle chuck not immediately active
$SN_PA_T_W[0] "" ; Machine-related protection zone for spindle chuck
$SN_PA_ORI[0] 1 ; Orientation of the protection zone: 1= 3rd and 1st geometry
axis
$SN_PA_LIM_3DIM[0] 0 ; Type of limitation in the third dimension: 0 = No limit
$SN_PA_PLUS_LIM[0] 0 ; Value of the limit in the positive direction in the 3rd
dimension
$SN_PA_MINUS_LIM[0] 0 ; Value of the limitation in the negative direction in the 3rd
dimension
$SN_PA_CONT_NUM[0] 4 ; Number of valid contour elements
$SN_PA_CONT_TYP[0,0] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for spindle chuck, contour element 0
$SN_PA_CONT_TYP[0,1] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for spindle chuck, contour element 1
$SN_PA_CONT_TYP[0,2] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for spindle chuck, contour element 2
$SN_PA_CONT_TYP[0,3] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for spindle chuck, contour element 3
$SN_PA_CONT_TYP[0,4] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for spindle chuck, contour element 4
$SN_PA_CONT_TYP[0,5] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for spindle chuck, contour element 5
$SN_PA_CONT_TYP[0,6] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for spindle chuck, contour element 6
$SN_PA_CONT_TYP[0,7] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for spindle chuck, contour element 7

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 139
Axis Monitoring, Protection Zones (A3)
Examples

$SN_PA_CONT_TYP[0,8] 0 ; Contour type[i] : 0 = not defined,


; Protection zone for spindle chuck, contour element 8
$SN_PA_CONT_TYP[0,9] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for spindle chuck, contour element 9
$SN_PA_CONT_ORD[0,0] -100 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 0
$SN_PA_CONT_ORD[0,1] -100 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 1
$SN_PA_CONT_ORD[0,2] 100 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 2
$SN_PA_CONT_ORD[0,3] 100 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 3
$SN_PA_CONT_ORD[0,4] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 4
$SN_PA_CONT_ORD[0,5] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 5
$SN_PA_CONT_ORD[0,6] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 6
$SN_PA_CONT_ORD[0,7] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 7
$SN_PA_CONT_ORD[0,8] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 8
$SN_PA_CONT_ORD[0,9] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 9
$SN_PA_CONT_ABS[0,0] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 0
$SN_PA_CONT_ABS[0,1] 110 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 1
$SN_PA_CONT_ABS[0,2] 110 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 2
$SN_PA_CONT_ABS[0,3] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 3
$SN_PA_CONT_ABS[0,4] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 4
$SN_PA_CONT_ABS[0,5] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 5
$SN_PA_CONT_ABS[0,6] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 6
$SN_PA_CONT_ABS[0,7] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 7
$SN_PA_CONT_ABS[0,8] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 8
$SN_PA_CONT_ABS[0,9] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 9
$SN_PA_CENT_ORD[0,0] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 0
$SN_PA_CENT_ORD[0.1] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 1

Basic Functions
140 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Examples

$SN_PA_CENT_ORD[0,2] 0 ; Midpoint of contour[i], ordinate value


; Protection zone for spindle chuck, contour element 2
$SN_PA_CENT_ORD[0,3] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 3
$SN_PA_CENT_ORD[0,4] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 4
$SN_PA_CENT_ORD[0,5] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 5
$SN_PA_CENT_ORD[0,6] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 6
$SN_PA_CENT_ORD[0,7] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 7
$SN_PA_CENT_ORD[0,8] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 8
$SN_PA_CENT_ORD[0,9] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for spindle chuck, contour element 9
$SN_PA_CENT_ABS[0,0] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 0
$SN_PA_CENT_ABS[0.1] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 1
$SN_PA_CENT_ABS[0,2] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 2
$SN_PA_CENT_ABS[0,3] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 3
$SN_PA_CENT_ABS[0,4] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 4
$SN_PA_CENT_ABS[0,5] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 5
$SN_PA_CENT_ABS[0,6] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 6
$SN_PA_CENT_ABS[0,7] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 7
$SN_PA_CENT_ABS[0,8] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 8
$SN_PA_CENT_ABS[0,9] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for spindle chuck, contour element 9

Table 2- 3 Protection zone: Workpiece and tool holder

System variable Value Comment


$SN_PA_ACTIV_IMMED[0] 0 ; Protection zone for workpiece not immediately active
$SN_PA_ACTIV_IMMED[1] 0 ; Protection zone for tool holder not immediately active
$SC_PA_TW[0] "" ; Protection zone for workpiece, channel-specific
$SC_PA_TW[1] 'H01' ; Protection zone for toolholder, channel-specific
$SC_PA_ORI[0] 1 ; Orientation of the protection zone: 1= 3rd and first geometry
axis
; Protection zone for workpiece

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 141
Axis Monitoring, Protection Zones (A3)
Examples

$SC_PA_ORI[1] 1 ; Orientation of the protection zone: 1= 3rd and first geometry


axis
; Protection zone for tool holder
$SC_PA_LIM_3DIM[0] 0 ; Type of limitation in the third dimension: 0 = no limitation
; Protection zone for workpiece tool holder 0
$SC_PA_LIM_3DIM[1] 0 ; Type of limitation in the third dimension: 0 = no limitation
; Protection zone for tool holder
$SC_PA_PLUS_LIM[0] 0 ; Value of limitation in positive direction in the third dimension
; Protection zone for workpiece
$SC_PA_PLUS_LIM[1] 0 ; Value of limitation in positive direction in the third dimension
; Protection zone for tool holder
$SC_PA_MINUS_LIM[0] 0 ; Value of limitation in negative direction in the third dimension
; Protection zone for workpiece
$SC_PA_MINUS_LIM[1] 0 ; Value of limitation in negative direction in the third dimension
; Protection zone for tool holder
$SC_PA_CONT_NUM[0] 4 ; Number of valid contour elements,
; Protection zone for workpiece
$SC_PA_CONT_NUM[1] 5 ; Number of valid contour elements,
; Protection zone for tool holder 1
$SN_PA_CONT_TYP[0,0] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for workpiece, contour element 0
$SN_PA_CONT_TYP[0,1] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for workpiece, contour element 1
$SN_PA_CONT_TYP[0,2] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for workpiece, contour element 2
$SN_PA_CONT_TYP[0,3] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for workpiece, contour element 3
$SN_PA_CONT_TYP[0,4] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for workpiece, contour element 4
$SN_PA_CONT_TYP[0,5] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for workpiece, contour element 5
$SN_PA_CONT_TYP[0,6] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for workpiece, contour element 6
$SN_PA_CONT_TYP[0,7] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for workpiece, contour element 7
$SN_PA_CONT_TYP[0,8] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for workpiece, contour element 8
$SN_PA_CONT_TYP[0,9] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for workpiece, contour element 9
$SN_PA_CONT_TYP[1,0] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for tool holder, contour element 0
$SN_PA_CONT_TYP[1,1] 3 ; Contour type[i] : 3 = G3 f. Circuit element, counter-clockwise,
; Protection zone for tool holder, contour element 1
$SN_PA_CONT_TYP[1,2] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for tool holder, contour element 2
$SN_PA_CONT_TYP[1,3] 1 ; Contour type[i] : 1 = G1 for even,
; Protection zone for tool holder, contour element 3

Basic Functions
142 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Examples

$SN_PA_CONT_TYP[1,4] 1 ; Contour type[i] : 1 = G1 for even,


; Protection zone for tool holder, contour element 4
$SN_PA_CONT_TYP[1,5] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for tool holder, contour element 5
$SN_PA_CONT_TYP[1,6] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for tool holder, contour element 6
$SN_PA_CONT_TYP[1,7] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for tool holder, contour element 7
$SN_PA_CONT_TYP[1,8] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for tool holder, contour element 8
$SN_PA_CONT_TYP[1,9] 0 ; Contour type[i] : 0 = not defined,
; Protection zone for tool holder, contour element 9
$SN_PA_CONT_ORD[0,0] -80 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 0
$SN_PA_CONT_ORD[0,1] -80 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 1
$SN_PA_CONT_ORD[0,2] 80 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 2
$SN_PA_CONT_ORD[0,3] 80 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 3
$SN_PA_CONT_ORD[0,4] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 4
$SN_PA_CONT_ORD[0,5] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 5
$SN_PA_CONT_ORD[0,6] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 6
$SN_PA_CONT_ORD[0,7] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 7
$SN_PA_CONT_ORD[0,8] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 8
$SN_PA_CONT_ORD[0,9] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 9
$SN_PA_CONT_ORD[1,0] -190 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 0
$SN_PA_CONT_ORD[1,1] -210 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 1
$SN_PA_CONT_ORD[1,2] -210 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 2
$SN_PA_CONT_ORD[1,3] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 3
$SN_PA_CONT_ORD[1,4] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 4
$SN_PA_CONT_ORD[1,5] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 5
$SN_PA_CONT_ORD[1,6] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 6
$SN_PA_CONT_ORD[1,7] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 7

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 143
Axis Monitoring, Protection Zones (A3)
Examples

$SN_PA_CONT_ORD[1,8] 0 ; Endpoint of contour[i], ordinate value


; Protection zone for tool holder, contour element 8
$SN_PA_CONT_ORD[1,9] 0 ; Endpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 9
$SN_PA_CONT_ABS[0,0] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 0
$SN_PA_CONT_ABS[0,1] 40 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 1
$SN_PA_CONT_ABS[0,2] 40 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 2
$SN_PA_CONT_ABS[0,3] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 3
$SN_PA_CONT_ABS[0,4] -50 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 4
$SN_PA_CONT_ABS[0,5] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 5
$SN_PA_CONT_ABS[0,6] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 6
$SN_PA_CONT_ABS[0,7] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 7
$SN_PA_CONT_ABS[0,8] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 8
$SN_PA_CONT_ABS[0,9] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 9
$SN_PA_CONT_ABS[1,0] -50 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 0
$SN_PA_CONT_ABS[1,1] -30 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 1
$SN_PA_CONT_ABS[1,2] 20 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 2
$SN_PA_CONT_ABS[1,3] 50 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 3
$SN_PA_CONT_ABS[1,4] -50 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 4
$SN_PA_CONT_ABS[1,5] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 5
$SN_PA_CONT_ABS[1,6] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 6
$SN_PA_CONT_ABS[1,7] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 7
$SN_PA_CONT_ABS[1,8] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 8
$SN_PA_CONT_ABS[1,9] 0 ; Endpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 9
$SN_PA_CENT_ORD[0,0] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 0
$SN_PA_CENT_ORD[0.1] -190 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 1

Basic Functions
144 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Examples

$SN_PA_CENT_ORD[0,2] 0 ; Midpoint of contour[i], ordinate value


; Protection zone for workpiece, contour element 2
$SN_PA_CENT_ORD[0,3] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 3
$SN_PA_CENT_ORD[0,4] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 4
$SN_PA_CENT_ORD[0,5] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 5
$SN_PA_CENT_ORD[0,6] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 6
$SN_PA_CENT_ORD[0,7] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 7
$SN_PA_CENT_ORD[0,8] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for workpiece, contour element 8
$SN_PA_CENT_ORD[0,9] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 9
$SN_PA_CENT_ORD[1.0] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 0
$SN_PA_CENT_ORD[1.1] -190 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 1
$SN_PA_CENT_ORD[1.2] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 2
$SN_PA_CENT_ORD[1.3] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 3
$SN_PA_CENT_ORD[1.4] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 4
$SN_PA_CENT_ORD[1.5] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 5
$SN_PA_CENT_ORD[1.6] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 6
$SN_PA_CENT_ORD[1.7] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 7
$SN_PA_CENT_ORD[1.8] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 8
$SN_PA_CENT_ORD[1.9] 0 ; Midpoint of contour[i], ordinate value
; Protection zone for tool holder, contour element 9
$SN_PA_CENT_ABS[0,0] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 0
$SN_PA_CENT_ABS[0.1] -30 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 1
$SN_PA_CENT_ABS[0,2] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 2
$SN_PA_CENT_ABS[0,3] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 3
$SN_PA_CENT_ABS[0,4] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 4
$SN_PA_CENT_ABS[0,5] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 5

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 145
Axis Monitoring, Protection Zones (A3)
Examples

$SN_PA_CENT_ABS[0,6] 0 ; Midpoint of contour[i], abscissa value


; Protection zone for workpiece, contour element 6
$SN_PA_CENT_ABS[0,7] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 7
$SN_PA_CENT_ABS[0,8] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 8
$SN_PA_CENT_ABS[0,9] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for workpiece, contour element 9
$SN_PA_CENT_ABS[1.0] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 0
$SN_PA_CENT_ABS[1.1] -30 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 1
$SN_PA_CENT_ABS[1.2] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 2
$SN_PA_CENT_ABS[1.3] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 3
$SN_PA_CENT_ABS[1.4] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 4
$SN_PA_CENT_ABS[1.5] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 5
$SN_PA_CENT_ABS[1.6] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 6
$SN_PA_CENT_ABS[1.7] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 7
$SN_PA_CENT_ABS[1.8] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 8
$SN_PA_CENT_ABS[1.9] 0 ; Midpoint of contour[i], abscissa value
; Protection zone for tool holder, contour element 9

Activation

Table 2- 4 Part program excerpt for activating the three protection zones for spindle chuck,
workpiece, and toolholder:

NPROT(1, 2, 0, 0, 0) ; Protection zone: Spindle chuck


CPROT(1, 2, 0, 0, 100) ; Protection zone: Workpiece with 100mm offset in the
Z axis.
CPROT(2, 2, 0, 0, 0) ; Protection zone: Toolholder

Basic Functions
146 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Data lists

2.6 Data lists

2.6.1 Machine data

2.6.1.1 NC-specific machine data

Axis monitoring

Number Identifier: $MN_ Description


10604 WALIM_GEOAX_CHANGE_MODE Working area limitation during switchover of geometry
axes
10710 PROG_SD_RESET_SAVE_TAB Setting data to be updated

Protection zones

Number Identifier: $MN_ Description


10618 PROTAREA_GEOAX_CHANGE_MODE Protection zone for switchover of geo axes
18190 MM_NUM_PROTECT_AREA_NCK Number of files for machine-related protection zones

2.6.1.2 Channel-specific machine data

Axis monitoring

Number Identifier: $MC_ Description


20150 GCODE_RESET_VALUES[n] Reset G groups
21020 WORKAREA_WITH_TOOL_RADIUS Allowance for tool radius with working area limitation
24130 TRAFO_INCLUDES_TOOL_1 Tool handling with active transformation 1.
24230 TRAFO_INCLUDES_TOOL_2 Tool handling with active transformation 2.
24330 TRAFO_INCLUDES_TOOL_3 Tool handling with active transformation 3.
24426 TRAFO_INCLUDES_TOOL_4 Tool handling with active transformation 4.
24436 TRAFO_INCLUDES_TOOL_5 Tool handling with active transformation 5.
24446 TRAFO_INCLUDES_TOOL_6 Tool handling with active transformation 6.
24456 TRAFO_INCLUDES_TOOL_7 Tool handling with active transformation 7.
24466 TRAFO_INCLUDES_TOOL_8 Tool handling with active transformation 8.
24476 TRAFO_INCLUDES_TOOL_9 Tool handling with active transformation 9.
24486 TRAFO_INCLUDES_TOOL_10 Tool handling with active transformation 10.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 147
Axis Monitoring, Protection Zones (A3)
Data lists

Number Identifier: $MC_ Description


25106 TRAFO_INCLUDES_TOOL_11 Tool handling with active transformation 11.
25116 TRAFO_INCLUDES_TOOL_12 Tool handling with active transformation 12.
25126 TRAFO_INCLUDES_TOOL_13 Tool handling with active transformation 13.
25136 TRAFO_INCLUDES_TOOL_14 Tool handling with active transformation 14.
25146 TRAFO_INCLUDES_TOOL_15 Tool handling with active transformation 15.
25156 TRAFO_INCLUDES_TOOL_16 Tool handling with active transformation 16.
25166 TRAFO_INCLUDES_TOOL_17 Tool handling with active transformation 17.
25176 TRAFO_INCLUDES_TOOL_18 Tool handling with active transformation 18.
25186 TRAFO_INCLUDES_TOOL_19 Tool handling with active transformation 19.
25196 TRAFO_INCLUDES_TOOL_20 Tool handling with active transformation 20.
28600 MM_NUM_WORKAREA_CS_GROUPS Number of coordinate system-specific working area
limitations

Protection zones

Number Identifier: $MC_ Description


28200 MM_NUM_PROTECT_AREA_CHAN Number of files for channel-specific protection zones
28210 MM_NUM_PROTECT_AREA_ACTIVE Number of simultaneously active protection zones in
one channel
28212 MM_NUM_PROTECT_AREA_CONTUR Elements for active protection zones (DRAM)

2.6.1.3 Axis/spindle-specific machine data

Axis monitoring

Number Identifier: $MA_ Description


30310 ROT_IS_MODULO Modulo conversion for rotary axis and spindle
30800 WORK_AREA_CHECK_TYPE Type of checking of working area limits
32200 POSCTRL_GAIN [n] Servo gain factor
32250 RATED_OUTVAL Rated output voltage
32260 RATED_VELO Rated motor speed
32300 MAX_AX_ACCEL Axis acceleration
32800 EQUIV_CURRCTRL_TIME Equivalent time constant current control loop for feedforward control
32810 EQUIV_SPEEDCTRL_TIME Equivalent time constant speed control loop for feedforward control
32910 DYN_MATCH_TIME [n] Time constant for dynamic matching
35160 SPIND_EXTERN_VELO_LIMIT Spindle speed limitation via PLCC
36000 STOP_LIMIT_COARSE Exact stop coarse
36010 STOP_LIMIT_FINE Exact stop fine
36020 POSITIONING_TIME Time delay exact stop fine

Basic Functions
148 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Data lists

Number Identifier: $MA_ Description


36030 STANDSTILL_POS_TOL Zero speed tolerance
36040 STANDSTILL_DELAY_TIME Delay time zero-speed monitoring
36050 CLAMP_POS_TOL Clamping tolerance with IS "Clamping active"
36052 STOP_ON_CLAMPING Special functions for clamped axis
36060 STANDSTILL_VELO_TOL Maximum velocity/speed "Axis/spindle stationary"
36100 POS_LIMIT_MINUS Software limit switch minus
36110 POS_LIMIT_PLUS Software limit switch plus
36120 POS_LIMIT_MINUS2 Software limit switch minus
36130 POS_LIMIT_PLUS2 Software limit switch plus
36610 AX_EMERGENCY_STOP_TIME Length of the braking ramp for error states
36200 AX_VELO_LIMIT Threshold value for velocity monitoring
36210 CTRLOUT_LIMIT Maximum speed setpoint
36220 CTRLOUT_LIMIT_TIME Delay time for speed-setpoint monitoring
36300 ENC_FREQ_LIMIT Encoder limit frequency
36302 ENC_FREQ_LIMIT_LOW Encoder limit frequency re-synchronization
36310 ENC_ZERO_MONITORING Zero mark monitoring
36400 CONTOUR_TOL Tolerance band contour monitoring
36500 ENC_CHANGE_TOL Maximum tolerance for position actual value switchover
36510 ENC_DIFF_TOL Measuring system synchronism tolerance
36600 BRAKE_MODE_CHOICE Deceleration behavior on hardware limit switch
36620 SERVO_DISABLE_DELAY_TIME Cutout delay servo enable

Protection zones
None

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 149
Axis Monitoring, Protection Zones (A3)
Data lists

2.6.2 Setting data

2.6.2.1 Axis/spindle-specific setting data

Axis monitoring functions

Number Identifier: $SA_ Description


43400 WORKAREA_PLUS_ENABLE Working-area limitation active in positive direction
43410 WORKAREA_MINUS_ENABLE Working-area limitation active in negative direction
43420 WORKAREA_LIMIT_PLUS Working-area limitation plus
43430 WORKAREA_LIMIT_MINUS Working-area limitation minus

Protection zones
None

2.6.3 Signals

2.6.3.1 Signals to channel

Axis monitoring
None

Protection zones

DB number Byte.Bit Description


21, ... 1.1 Enable protection zones
21, ... 4.7 Feedrate override
21, ... 6.0 Feed disable
21, ... 8.0 Activate machine-related protection zone 1
: :
21, ... 8.7 Activate machine-related protection zone 8
21, ... 9.0 Activate machine-related protection zone 9
21, ... 9.1 Activate machine-related protection zone 10
21, ... 10.0 Activate channel-specific protection zone 1
: :
21, ... 10.7 Activate channel-specific protection zone 8
21, ... 11.0 Activate channel-specific protection zone 9
21, ... 11.1 Activate channel-specific protection zone 10

Basic Functions
150 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axis Monitoring, Protection Zones (A3)
Data lists

2.6.3.2 Signals from channel

Axis monitoring functions


None

Protection zones

DB number Byte.Bit Description


21, ... 272.0 Machine-related protection zone 1 preactivated
: :
21, ... 272.7 Machine-related protection zone 8 preactivated
21, ... 273.0 Machine-related protection zone 9 preactivated
21, ... 273.1 Machine-related protection zone 10 preactivated
21, ... 274.0 Channel-specific protection zone 1 preactivated
: :
21, ... 274.7 Channel-specific protection zone 8 preactivated
21, ... 275.0 Channel-specific protection zone 9 preactivated
21, ... 275.1 Channel-specific protection zone 10 preactivated
21, ... 276.0 Machine-related protection zone 1 violated
: :
21, ... 276.7 Machine-related protection zone 8 violated
21, ... 277.0 Machine-related protection zone 9 violated
21, ... 277.1 Machine-related protection zone 10 violated
21, ... 278.0 Channel-specific protection zone 1 violated
: :
21, ... 278.7 Channel-specific protection zone 8 violated
21, ... 279.0 Channel-specific protection zone 9 violated
21, ... 279.1 Channel-specific protection zone 10 violated

2.6.3.3 Signals to axis/spindle

Axis monitoring functions

DB number Byte.Bit Description


31, ... 1.4 Follow up operation
31, ... 1.5/1.6 Position measuring system 1/2
31, ... 2.1 Servo enable
31, ... 2.3 Clamping in progress
31, ... 3.6 Velocity/spindle speed limitation
31, ... 4.3 Feed stop

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 151
Axis Monitoring, Protection Zones (A3)
Data lists

DB number Byte.Bit Description


31, ... 12.0/12.1 Hardware limit switch minus/Hardware limit switch plus
31, ... 12.2/12.3 Software limit switch minus/2nd software limit switch plus
31, ... 60.2/60.3 Encoder limit frequency exceeded 1/2
31, ... 60.4/60.5 Referenced/synchronized 1/2
31, ... 64.6/64.7 Traverse command minus/plus

Protection zones
None

Basic Functions
152 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1) 3
3.1 Brief description

Exact stop or exact stop mode


In exact stop traversing mode, all axes involved in the traversing motion (except axes of
modal traversing modes) are decelerated at the end of each block until they come to a
standstill. The transition to the next block occurs only when all axes involved in the traversing
motion have reached their programmed target position with subject to the selected exact
stop criterion.

Continuous-path mode
In continuous-path mode, the NC attempts to keep the programmed path velocity as
constant as possible. In particular, deceleration of the path axes at the block limits of the part
program is to be avoided.

LookAhead
LookAhead is a function for optimizing the continuous path mode.
Smooth machining of workpieces is necessary to ensure a high-quality surface finish. For
this reason, path velocity variations should be avoided during machining whenever possible.
Without LookAhead, the NC only takes the traversing block immediately following the current
traversing block into consideration when determining the possible path velocity. If the
following block contains only a short path, the NC must reduce the path velocity (decelerate
in the current block) to be able to stop in time at the end of the next block, if necessary.
When the NC "looks ahead" over a configurable number of traversing blocks following the
current traversing block, a much higher path velocity can be attained under certain
circumstances because the NC now has considerably more traversing blocks and more path
available for calculation.
This results in the following advantages:
● Machining with higher path velocities on average
● Improved surface quality by avoiding deceleration and acceleration processes

Smoothing the path velocity


"Smoothing the path velocity" is a function especially for applications (such as high speed
milling in mold and die production) that require an extremely steady path velocity.
Deceleration and acceleration processes that would cause high-frequency excitations of
machine resonances are avoided with the "Smoothing the path velocity" function.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 153
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Brief description

This results in the following advantages:


● Improved surface quality and machining time by avoiding excitation of machine
resonances.
● Constant profile of path velocity and cutting rates by avoiding "unnecessary" acceleration
processes, i.e. acceleration processes that do not greatly improve the program run time.

Adaptation of the dynamic path response


In addition to "smoothing the path velocity", "dynamic path response adaptation" is another
function for avoiding high-frequency excitations of machine resonances while optimizing the
dynamic path response at the same time. To this end, highly frequent changes in path
velocity are automatically executed with lower jerk or acceleration values than the dynamic
response limit value parameters assigned in the machine data.
Thus, with low-frequency changes in path velocity, the full dynamic response limit values
apply, whereas with high-frequency changes, only the reduced dynamic response limit
values act due to the automatic dynamic response adaptation.

Dynamic response mode for path interpolation


Optimizing the path dynamic response also includes the technology-specific dynamic
response settings which are preset for different processing technologies (including tapping,
roughing, smoothing) and can be activated in the part program by calling the respective
dynamic response mode.

Free-form surface mode


Any fluctuation in curvature or torsion leads to a change in path velocity. This generally
results in unnecessary decelerating and accelerating during the processing of free-form
surface workpieces, which may adversely affect the quality of the surfaces of the
workpieces.
The following functions are available for processing free-form surfaces.
● "Free-form surface mode: Basic functions"
This makes the definition of the path velocity profile "less sensitive" to fluctuations in
curvature and torsion.
● "Free-form surface mode: Extension function"
This extension in standard LookAhead functionality is used to calculate the path velocity
profile during the processing of free-form surfaces.
The advantages of free-form surface mode lie in a more homogeneous workpiece surface
and lower machine load.

Basic Functions
154 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Brief description

NC block compression
When a workpiece design is completed with a CAD/CAM system, the CAD/CAM system
generally also compiles the corresponding part program to create the workpiece surface. To
do so, most CAD/CAM systems use linear blocks to describe even curved sections of the
workpiece surface. Many interpolation points are generally necessary to maintain the
required contour accuracy. This results in many linear blocks, typically with very short paths.
The "NC block compressor" function uses polynomial blocks to perform a subsequent
approximation of the contour specified by the linear blocks. During this process, an
assignable number of linear blocks is replaced by a polynomial block. Furthermore, the
number of linear blocks that can be replaced by a polynomial block also depends on the
specified maximum permissible contour deviation and the contour profile.
Use of polynomial blocks provides the following advantages:
● Reduction of the number of required part program blocks for describing the workpiece
contour
● Higher maximum path velocities

Combine short spline blocks


A spline defines a curve which is formed from 2nd or 3rd degree polynomials. With spline
interpolation, the controller can generate a smooth curve characteristic from only a few
specified interpolation points of a set contour.
References:
Programming Manual, Advanced, Special motion commands,
chapter: Spline interpolation
The advantages of the spline interpolation as compared to the linear interpolation are:
● Reduction of the number of required part program blocks for describing a curved contour.
● Soft, mechanical system-limiting curve characteristic also during transition between the
part program blocks.
The disadvantages of the spline interpolation as compared to the linear interpolation are:
● For a spline curve no exact curve characteristic, but only a tolerance band can be
specified, within which the spline curve should lie.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 155
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Brief description

As with linear interpolation, the processing of splines can produce such short blocks that the
path velocity must be reduced to enable interpolation of the spline blocks. This is alao the
case, when the spline actually has a long, smooth curve. The "Combine short spline blocks"
function allows you to combine these spline blocks such that the resulting block length is
sufficient and does not reduce the path velocity.

Note
NC block compressor
The NC block compressor (COMPON, COMPCURV or COMPCAD) cannot be employed
while compressing spline blocks since it can only be used to compress linear blocks.

Basic Functions
156 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Exact stop mode

3.2 Exact stop mode

Exact stop or exact stop mode


In exact stop traversing mode, all path axes and special axes involved in the traversing
motion that are not traversed modally, are decelerated at the end of each block until they
come to a standstill. The transition to the next block occurs only when all axes involved in the
traversing motion have reached their programmed target position with subject to the selected
exact stop criterion.
This results in the following response:
● The program run time is considerably longer compared to continuous path mode due to
the deceleration of the axes and the wait time until "Exact stop" status is reached for all
machine axes involved.
● In exact stop mode, undercuts can occur on the workpiece surface during machining.

Status "Exact stop"


The state of the machine axis based on the position difference relative to its position setpoint
at the end of a traversing motion is also called an exact stop. The machine axis reaches the
"exact stop" state, as soon as its following error is less than the specified position difference
(exact stop criterion).

Application
Exact stop mode should always be used when the programmed contour must be executed
exactly.

Activation
Exact stop mode can be activated on a modal basis or in blocks in the part program:

G command Meaning
G60 Exact stop with modal effect
G9 Exact stop with block-by-block effect

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 157
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Exact stop mode

Exact stop criteria "Exact stop coarse" and "Exact stop fine"
The exact stop criteria "Exact stop coarse" and "Exact stop fine" are used to specify
tolerance windows for a machine axis reaching the "exact stop" state.

([DFWVWRSILQH 6(7326,7,21

$[LVGLUHFWLRQ $[LVGLUHFWLRQ
QHJDWLYH SRVLWLYH
([DFWVWRS
FRDUVH
$&78$/326,7,21

Figure 3-1 Tolerance windows of exact stop criteria

Parameters are assigned to the two exact stop criteria via the machine data:
MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)
MD36000 $MA_STOP_LIMIT_COARSE (exact stop coarse)

Note
The tolerance windows of the exact stop criteria "Exact stop coarse" and "Exact stop fine"
should be assigned in such a way that the following requirement is fulfilled:
"Exact stop coarse" > "Exact stop fine"

Exact stop criterion "Interpolator End"


In the case of the exact stop criterion "interpolator end" the block change to the next
traversing block takes place, as soon as all path axes and special axes involved in the
traversing motion, which do not traverse extending up to block, have reached their position
according to set point programmed in the block. That is, the interpolator has executed the
block.
The actual position and the following error of the relevant machine axes are not taken into
consideration for exact stop criterion "Interpolator end". Thus, depending on the dynamic
response of the machine axes, this can result in a relatively large smoothing of the contour at
the block changes in comparison to the exact stop criteria "Exact stop coarse" and "Exact
stop fine".

Basic Functions
158 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Exact stop mode

Activation of an exact stop criterion


An exact stop criterion is activated in the part program by programming the appropriate G
command:

G command Exact-stop criterion


G601 Exact stop fine
G602 Exact stop coarse
G603 Interpolator end

Block change depending on exact-stop criteria


The figure below illustrates the block change timing in terms of the selected exact stop
criterion.

Y %ORFNFKDQJH
:LWK*
$FWXDOYDOXH :LWK*
:LWK*

6HWSRLQW

Figure 3-2 Block change accordance to selected exact stop criterion

Evaluation factor for exact stop criteria


A parameter set-dependent evaluation of the exact stop criteria can be specified via the
following axis-specific machine data:
MD36012 $MA_STOP_LIMIT_FACTOR (exact stop coarse/fine and standstill factor)
Applications:
● Adaptation of the positioning response to different mass ratios, such as after a gearshift
● Reduction in positioning time, depending on various machining states, such as roughing
and finishing

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 159
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Exact stop mode

Assignable specification of the active exact stop criterion


The active exact stop criterion can be permanently specified for the part program commands
of the first G function group irrespective of the exact stop criterion programmed in the part
program. This specification can be made independently for each of the following part
program commands:
● Rapid traverse: G0
● Machining commands: G1, G2, G3, CIP, ASPLINE, BSPLINE, CSPLINE, POLY, G33, G34,
G35, G331, G332, OEMIPO01, OEMIPO02, CT
The setting is done in a channel-specific manner via the following machine data:
MD20550 $MC_EXACT_POS_MODE (exact stop conditions for G0 and G1)
Coding
Each exact stop criterion is location-coded:
MD20550 $MC_EXACT_POS_MODE = <ZE>
● Ones position E: Rapid traverse
● Tens position Z: all other part program commands in the first G function group

Z or E Active exact stop criterion


0 Programmed exact stop criterion
1 G601 (Exact stop window fine)
2 G602 (Exact stop window coarse)
3 G603 (Interpolator end)
Example:
MD20550 $MC_EXACT_POS_MODE = 02
Ones position = 2:
With rapid traverse, exact stop criterion G602 (Exact stop window coarse) is always active,
irrespective of any programming in the part program.
Tens digit = 0:
For traversing with all other part program commands of the first G function group, the exact
stop criterion programmed in the part program is active.

Basic Functions
160 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Exact stop mode

Assignable exact stop criterion for rapid traverse transitions in continuous path mode
The behavior at the block transition of part program blocks before and after rapid traverse
blocks can be parameterized as follows:
MD20552 $MC_EXACT_POS_MODE_G0_TO_G1 = <value>

Value Meaning
0 No additional stop at the block transition.
1 Stop at block transition: Same behavior as in the case of G601 (Exact stop window fine)
2 Stop at block transition: Same behavior as G602 (Exact stop window coarse).
3 Stop at block transition: Same behavior as G603 (Interpolator end).
4 Like 0, in addition, the override of the next non-G0 block is taken into account with
LookAhead in the G0 block during the transition from G0 to non-G0.
5 Like 0; in addition, the override of the next block is taken into account with LookAhead during
the transition from G0 to non-G0 and from non-G0 to G0.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 161
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

3.3 Continuous-path mode

3.3.1 General functionality

Continuous-path mode
In the continuous-path mode the path velocity is not decelerated for the block change in
order to permit the fulfillment of an exact stop criterion. The objective of this mode is to avoid
rapid deceleration of the path axes at the block-change point so that the axis velocity
remains as constant as possible when the program moves to the next block. To achieve this
objective, the "LookAhead" function is also activated when the continuous path mode is
selected.
Continuous-path mode causes the smoothing and tangential shaping of angular block
transitions by local changes in the programmed contour. The extent of the change relative to
the programmed contour can be limited by specifying the overload factor or rounding criteria.
Continuous-path operation causes:
● Contour rounding
● Shorter machining times through elimination of braking and acceleration processes that
are required to comply with the exact-stop criterion
● Improved cutting conditions because of the more constant velocity
Continuous-path mode is suitable if:
● A contour must be traversed as quickly as possible (e.g. with rapid traverse).
● The exact contour may deviate from the programmed contour within a specific tolerance
for the purpose of obtaining a continuous contour.
Continuous-path mode is suitable if:
● A contour is to be traversed precisely.
● An absolutely constant velocity is required.

Implicit exact stop


In some cases, an exact stop needs to be generated in continuous-path mode to allow the
execution of subsequent actions. In such situations, the path velocity is reduced to zero.
● If auxiliary functions are output before the traverse motion, the previous block is only
terminated when the selected exact-stop criterion is fulfilled.
● If auxiliary functions are to be output after the traverse motion, they are output after the
interpolator end of the block.
● If an executable block (e.g. starting a positioning axis) contains no travel information for
the path axes, the previous block is terminated on reaching the selected exact-stop
criterion.

Basic Functions
162 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

● If a positioning axis is declared to be the geometry axis, the previous block is terminated
at the interpolator end when the geometry axis is programmed.
● If a synchronized axis is programmed that was last programmed as a positioning axis or
spindle (initial setting of the special axis is positioning axis), the previous block is ended
at the interpolator end.
● If the transformation is changed, the block previously processed is terminated with the
active exact-stop criterion.
● A block is terminated on interpolator end if the following block contains the changeover of
the acceleration profile BRISK/SOFT.
References:
For more information about BRISK and SOFT, refer to the chapter "Acceleration (B2)".
● If the "empty buffer" function is programmed, the previous block is terminated when the
selected exact-stop criterion is reached.

Velocity = 0 in continuous-path mode


Regardless of the implicit exact stop response, the path motion is braked down to zero
velocity at the end of the block in cases where:
● Positioning axes are programmed with the instruction POS, and their traversing time
exceeds that of the path axes. The block change occurs when the "exact stop fine" of the
positioning axes is reached.
● The time taken to position a spindle programmed with the instruction SPOS is longer than
the traversing time of the path axes. The block change is carried out when the "exact stop
fine" of the positioning spindle is reached.
● The current block contains traversing commands for geometry axes and the following
block traversing commands for synchronized axes or, alternatively, the current block
contains traversing commands for synchronized axes and the subsequent block
traversing commands for geometry axes.
● Synchronization is required

3.3.2 Velocity reduction according to overload factor

Function
The function lowers the path velocity in continuous-path mode until the non-tangential block
transition can be traversed in one interpolation cycle while respecting the deceleration limit
and taking and overload factor into account.
With the reduced velocity, axial jumps in velocity are produced with a non-tangential contour
at the block transition. These jumps in velocity are also performed by the coupled motion
synchronized axes. The jump in velocity prevents the path velocity dropping to zero. This
jump is performed if the axial velocity was reduced with the axial acceleration to a velocity
from which the new setpoint can be reached with the jump. The magnitude of the setpoint
jump can be limited using an overload factor. Because the magnitude of the jump is axial,
the minimum jump of the path axes which are active during the block change is considered
during block transition.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 163
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

<D[LV

%ORFNFKDQJH
;D[LV

3DWKYHORFLW\

%ORFNFKDQJH W

9HORFLW\RI /HDGD[
WKH;D[LV

$[LDO /HDGI[ D[


YHORFLW\MXPS
I[!

,32 W
F\FOH

9HORFLW\RI
WKH<D[LV /HDGD\
/HDGI\ D\
D[LDO
I\!I[! YHORFLW\MXPS
,32 W
I2YHUORDGIDFWRU F\FOH

Figure 3-3 Axial velocity change on block transition

With a practically tangential block transition, the path velocity is not reduced if the
permissible axial accelerations are not exceeded. This means that very small bends in the
contour (e.g. 0.5 degrees) are overtraveled directly.

Overload factor
The overload factor restricts step changes in the machine axis velocity at block ends. To
ensure that the velocity jump does not exceed the maximum load on the axis, the jump is
derived from the acceleration of the axis.
The overload factor indicates the extent by which the acceleration of the machine axis
(MD32300 $MA_MAX_AX_ACCEL) may be exceeded for an IPO-cycle.
The velocity jump results as follows:
Velocity jump = axis acceleration * (overload factor-1) * interpolator cycle.
The overload factor is saved in the machine data:
MD32310 $MA_MAX_ACCEL_OVL_FACTOR (overload factor for axial velocity jumps)

Basic Functions
164 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Factor 1.0 means that only tangential transitions with finite velocity can be traversed. For all
other transitions, the velocity is reduced to zero by changing the setpoint. This behavior is
equivalent to the function "Exact stop with interpolator end". This is undesirable for
continuous-path mode, so the factor must be set to greater than 1.0.

Note
For startup and installation, please note that the factor must be reduced if the machine is
likely to be subject to vibrations during angular block transitions and rounding is not to be
used.

By setting the following machine data, the block transitions are rounded independent of the
set overload factor with G641/G642:
MD20490 $MC_IGNORE_OVL_FACTOR_FOR_ADIS

Activation/Deactivation
Continuous-path mode with a reduction in speed according to the overload factor can be
activated in any NC part program block by the modal command G64.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode G64 can be deactivated by selecting:
● Modal exact stop G60
● Rounding G641, G642, G643, G644 or G645

Implicit continuous-path mode


If it is not possible to insert rounding blocks in continuous-path mode with rounding G641
due to the very short block path lengths (e.g. zero-clocked blocks), the mode is switched
over to continuous-path mode G64.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 165
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

3.3.3 Blending

Function
Rounding means that an angular block transition is changed to a tangential block transition
by a local change to the programmed contour. This gives the area in the vicinity of the
original angular block transition (including transitions between intermediate blocks inserted
by the CNC) a continuous contour.
During rounding, it is not only the geometry axes that are taken into account, but all machine
axes which traverse synchronously. The rounding function therefore smoothes the traversing
path of orientation axes as well as general velocity step changes in synchronized axes.

Note
Rounding cannot and should not replace the functions for defined smoothing, i.e. RND,
RNDM, ASPLINE, BSPLINE, CSPLINE.
If a rounding movement initiated by G641, G642, G643, G644 or G645 is interrupted, the
corner point of the original contour will be used for subsequent repositioning, rather than the
interruption point.

Synchronization
Rounding involves shortening discontinuously adjoining blocks and inserting one or two
intermediate blocks at this point. The original block boundary is removed and can no longer
be used for synchronization conditions (e.g. auxiliary function output parallel to motion, stop
at end of block).
With rounding, all synchronization conditions are best referred to the end of the shortened
first block and not to the end of the intermediate rounding block. The following block is thus
not started and with a stop at end of block, the contour of the following block can still be
changed.

Design
Rounding is only performed if the block transition is to be traveled with finite velocity. The
maximum path speed is influenced by the curvature. The maximum acceleration values of
the axes are not exceeded. A block without traverse information for the path axes requires
velocity "zero" and therefore no rounding.
Rounding is also used if the traversal of the block transition requires a velocity that lies below
the permissible velocity at the end of the block according to G64 (see overload factor).

Basic Functions
166 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

No intermediate rounding blocks


An intermediate rounding block is not inserted in the following cases:
● The axis stops between the two blocks.
This occurs when:
– The following block contains an auxiliary function output before the movement.
– The following block does not contain a path movement.
– An axis is traversed for the first time as a path axis for the following block when it was
previously a positioning axis.
– An axis is traversed for the first time as a positioning axis for the following block when
it was previously a path axis.
– The previous block traverses geometry axes and the following block does not.
– The following block traverses geometry axes and the previous block does not.
– Before tapping, the following block uses G33 as preparatory function and the previous
block does not.
– A change is made between BRISK and SOFT.
– Axes involved in the transformation are not completely assigned to the path motion
(e.g. for oscillation, positioning axes).
● The rounding block would slow down the part program execution.
This occurs:
– between two very short blocks.
Since each block requires at least one interpolation cycle, the added intermediate
block would double the machining time.
– If a block transition with G64 (continuous-path mode without rounding) can be
traversed without a reduction in velocity.
Corner rounding would increase the machining time. This means that the value of the
permitted overload factor (MD32310 $MA_MAX_ACCEL_OVL_FACTOR) affects
whether a block transition is rounded or not. The overload factor is only taken into
account for rounding with G641/G642. The overload factor has no effect in the case of
rounding with G643 (this behavior can also be set for G641 and G642 by setting
MD20490 $MC_IGNORE_OVL_FACTOR_FOR_ADIS = TRUE).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 167
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

● Rounding is not parameterized.


This occurs when:
– in the case of G641 ADISPOS= 0 in G0 blocks (default!).
– In the case of G641 ADIS = 0 in non-G0 blocks (default!).
– For transition from G0 to non-G0 or non-G0 to G0, the smaller of the values for
ADISPOS and ADIS will apply in the case of G641.
– For G642/G643, all axis-specific tolerances are zero.
● The block does not contain traversing motion (zero block).
This occurs when:
– Synchronized actions are active.
Normally, the interpreter eliminates zero blocks. However, if synchronous actions are
active, this zero block is included and also executed. In so doing, an exact stop is
initiated corresponding to the active programming. This allows the synchronous action
to also switch.
– Zero blocks are generated by program jumps.

Synchronized axes
If a number of paths need to be synchronized (e.g. contour, special axis), then every path
must always have its own rounding area.
There are no practical means of achieving this exactly. Therefore, on the basis of the specific
meaning of the contour (geometry axis), the following procedure is applied:

Rounding behavior with synchronized paths


Original path for: Rounding path outcome:
Geometry axes Orientation/
synchronized axis
Smooth Smooth Defined path is traversed exactly
Smooth Angular Intermediate blocks, the geometry axes follow the
path exactly, all orientation/synchronized axis paths
are smoothed.
Angular Smooth Intermediate block, the geometry axes perform
rounding, all orientation/synchronized axis paths are
smoothed.
Angular Angular Intermediate block, the geometry axes perform
rounding, all orientation/synchronized axis paths are
smoothed.

Basic Functions
168 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

3.3.3.1 Rounding according to a path criterion (G641)

Function
In continuous-path mode with rounding according to a path criterion, the size of the rounding
area is influenced by the path criteria ADIS and ADISPOS.
The path criteria ADIS and ADISPOS describe the maximum distances which a rounding
block can occupy before and after a block.

SURJUDPPHG
3DWKFULWHULRQ EORFNLQWHUPHGLDWHSRLQW
$',6
$',6326
5RXQGLQJFRQWRXU

SURJUDPPHG
LQSXWEORFN SURJUDPPHG
RXWSXWEORFN

Note
Acute angles produce rounding curves with a large degree of curvature and therefore cause
a corresponding reduction in velocity.

Note
ADISPOS is programmed in the same way as ADIS, but must be used specifically for
movements in rapid traverse mode G00.

Scope of the path criterion


● ADIS or ADISPOS must be programmed. If the default is "zero", G641 behaves like G64.
● If only one of the blocks involved is rapid traverse G0, the smaller rounding distance
applies.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 169
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

● If a very small value is used for ADIS, the control must make sure that every interpolated
block, even an intermediate rounding block, contains at least one interpolation point. The
maximum path velocity is thereby limited to ADIS/interpolation cycle.
● Irrespective of ADIS and ADISPOS, the rounding area is limited by the block length.
In blocks with short distances (distance < 4* ADIS and < 4 * ADISPOS respectively), the
rounding distance is reduced so that a traversable part of the original block is retained.
The remaining length depends on the axis path and is approximately 60% of the distance
still to be traversed in the block. ADIS or ADISPOS is therefore reduced to the remaining
40% of the distance to be traversed. This algorithm prevents a rounding block being
inserted for a very small change in contour. In this case, switchover to continuous-path
mode G64 is automatic until rounding blocks can be inserted again.

1RFRUQHUURXQGLQJ
1
YE UHPDLQLQJSDWK

1
1
$',6

YESDWK1

1

$',6 $',6
YESDWK1 YESDWK1
%HJLQQLQJRI
EORFN1 $',6

Figure 3-4 Path with limitation of ADIS

Activation/Deactivation
Continuous-path mode with rounding based on a path criterion can be activated in any NC
part program block by the modal command G641. Before or on selection, the path criteria
ADIS/ADISPOS must be specified.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode with rounding based on a path criterion (G641) can be deactivated by
selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G641, G642, G644 or G645

Basic Functions
170 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Programming example

Program code Comment


N1 G641 Y50 F10 ADIS=0.5 ; Continuous-path mode with rounding based on a
path criterion (rounding clearance: 0.5 mm)
N2 X50
N3 X50.7
N4 Y50.7
N5 Y51.4
N6 Y51.0
N7 X52.1

3.3.3.2 Rounding in compliance with defined tolerances (G642/G643)

Function
In continuous-path mode involving rounding in compliance with defined tolerances, the
rounding normally takes place while adhering to the maximum permissible path deviation.
Instead of these axis-specific tolerances, the maintenance of the maximum contour deviation
(contour tolerance) or the maximum angular deviation of the tool orientation (orientation
tolerance) can be configured.

Note
Expansion to include contour and orientation tolerance is only supported on systems
featuring the "Polynomial interpolation" option. When rounding in compliance with the
orientation tolerance, the additional option of "orientation transformation" is also necessary.

Activation
Continuous-path mode with rounding in compliance with defined tolerances can be activated
in any NC part program block by the modal command G642 or G643.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode with rounding in compliance with defined tolerances (G642/G643)
can be deactivated by selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G641, G644 or G645

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 171
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Differences between G642 - G643


With regard to their rounding behavior, commands G642 and G643 differ as follows:

G642 G643
With G642, the rounding path is determined on In the case of G643, each axis may have a
the basis of the shortest distance for rounding all different rounding path. The rounding travels are
axes. This value is taken into account when taken into account axis-specifically and block-
generating a rounding block. internally (⇒ no separate rounding block).
With G642, the rounding area results from the Very different specifications for the contour
smallest tolerance setting. tolerance and the tolerance of the tool orientation
can only have effect with G643.

Parameter assignment
Maximum path deviation
The maximum path deviation permitted with G642/G643 is set for each axis in the machine
data:
MD33100 $MA_COMPRESS_POS_TOL
Contour tolerance and orientation tolerance
The contour tolerance and orientation tolerance are set in the channel-specific setting data:
SD42475 $SC_SMOOTH_CONTUR_TOL (maximum contour deviation)
SD42466 $SC_SMOOTH_ORI_TOL (maximum angular deviation of the tool orientation)
The settings data can be programmed in the NC program and can in this way be specified
differently for each block transition.

Note
The setting data SD42466 $SC_SMOOTH_ORI_TOL is effective only in active orientation
transformation.

Rounding behavior
Rounding behavior with G642 and G643 is configured via the machine data:
MD20480 $MC_SMOOTHING_MODE (rounding behavior with G64x)
The units positions (E) define the behavior for G643, the tens positions (Z) the behavior for
G642:

Basic Functions
172 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Value E or Z Description
0 All Axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
1 Geometry axes:
Rounding by maintaining the contour tolerance:
SD42465 $SC_SMOOTH_CONTUR_TOL
Remaining axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
2 Geometry axes:
Rounding by maintaining the orientation tolerance:
SD42466 $SC_SMOOTH_ORI_TOL
Remaining axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
3 Geometry axes:
Rounding by maintaining the contour tolerance and the orientation tolerance:
SD42465 $SC_SMOOTH_CONTUR_TOL
SD42466 $SC_SMOOTH_ORI_TOL
Remaining axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
4 All Axes:
The rounding length programmed with ADIS or with ADISPOS is used (as in case of
G641).
Any axis-specific tolerance or contour and orientation tolerance specifications are
ignored.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 173
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Profile for limit velocity


The use of a velocity profile for rounding in compliance with defined tolerances is controlled
via the hundreds position in MD20480:

Value Description
< 100: A profile of the limit velocity is calculated within the rounding area, based on the defined
maximum values for acceleration and jerk on the participating axes or path.
This can lead to an increase in the path velocity in the rounding area and therefore to
the acceleration of the participating axes.
≥100: A profile of the limit velocity is not calculated for rounding blocks with G641/G642.
A constant velocity limit is specified instead.
This prevents the participating axes being accelerated into the rounding area during
rounding with G641/G642. However, in certain cases, this setting can cause the
rounding blocks to be traversed too slowly, especially in large rounding areas.
1xx: No velocity profile for G641
2xx: No velocity profile for G642

Note
MD28530 $MC_MM_PATH_VELO_SEGMENTS (number of memory elements for limiting
the path velocity)

Constraints
Restriction for protection zones with active radius compensation and tool orientation:
Although tool radius compensation is applied for a tool orientation, which is not perpendicular
to one of the three datum planes of the basic coordinate system, the protection zones are
not rotated onto the corresponding plane.
For G643 the following must apply:
MD28530 $MC_MM_PATH_VELO_SEGMENTS > 0 (number of memory elements for
limiting the path velocity)
If this condition is met, then it must be applicable for all axes:
MD35240 $MC_ACCEL_TYPE_DRIVE = FALSE (acceleration characteristic line DRIVE for
axes on/off)

Basic Functions
174 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

3.3.3.3 Rounding with maximum possible axial dynamic response (G644)

Function
Maximizing the dynamic response of the axes is key to this type of continuous-path mode
with rounding.

Note
Rounding with G644 is only possible if:
• all the axes involved contain only a linear motion in both the observed blocks.
• no kinematic transformation is active
In case an involved axis contains a polynomial (polynomial programmed, spline active,
compressor active) or a kinematic transformation is active, the block transition is rounded
with G642.

Activation
Continuous-path mode with rounding with the maximum possible axial dynamic response
can be activated in any NC part program block by the modal command G644.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode with rounding with the maximum possible axial dynamic response
(G644) can be deactivated by selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G641, G642, G643 or G645

Parameter assignment
Rounding behavior with G644 is configured via the thousands and tens of thousands places
in the machine data:
MD20480 $MC_SMOOTHING_MODE (rounding behavior with G64x)

Value Description

Thousand's place:
0xxx: When rounding with G644, the maximum deviations for each axis specified by the
following machine data are respected:
MD33100 $MA_COMPRESS_POS_TOL
If the dynamics of the axis permit, then any specified tolerance is not utilized.
1xxx: Input the maximum rounding path by programming ADIS=... or ADISPOS=... (as for
G641).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 175
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Value Description
2xxx: Input the maximum possible frequencies of each axis in the rounding area using the
machine data:
MD32440 $MA_LOOKAH_FREQUENCY (smoothing frequency for Look Ahead)
The rounding area is defined so that no frequencies in excess of the specified maximum
can occur while the rounding motion is in progress.
3xxx: Any axis that has a velocity jump at a corner traverses around the corner with the
maximum possible dynamic response (maximum acceleration and maximum jerk).
SOFT:
If SOFT is active, the maximum acceleration and the maximum jerk of each axis is
maintained.
BRISK:
If BRISK is active, only the maximum acceleration and not the maximum jerk of each axis
is maintained.
With this setting, neither the maximum deviations nor the rounding distance are checked.
The resulting deviations or rounding distances are determined exclusively by the dynamic
limits of the respective axis and the current path velocity.
4xxx: As in case of 0xxx, the maximum deviations of each axis specified with the following
machine data are used:
MD33100 $MA_COMPRESS_POS_TOL
Contrary to 0xxx, the specified tolerance is also utilized, if possible. Therefore, the axis
does not attain its maximum possible dynamics.
5xxx: As in case of 1xxx, the maximum possible rounding path is specified through
programming of ADIS=... or ADISPOS= respectively.
Contrary to 1xxx, the specified rounding path is also utilized, if possible. Therefore, the
axes involved do not attain their maximum possible dynamics.

Ten thousands digit


0xxxx The velocity profiles of the axes in the rounding area are determined without jerk limiting
for BRISK and with jerk limiting for SOFT.
1xxxx The velocity profiles of the axes in the rounding area are always determined with jerk
limiting, regardless of whether BRISK or SOFT is active.
When specifying the maximum axial deviations (MD33100 $MA_COMPRESS_POS_TOL) or
the maximum rounding distance (ADIS/ADISPOS) the available rounding path is normally
not used, if permitted by the dynamics of the axes involved. Through this, the length of the
rounding path depends on the active path feedrate. In case of lower path speeds, one gets
lower deviations from the programmed contours. However, it can be set that in these cases
the specified maximum axial deviation or the specified rounding distance is utilized, if
possible. In this case the deviations depend on the programmed contour independent of the
programmed path feedrate.

Note
Apart from the ones mentioned, the following limitation can also become active additionally:
The rounding distance cannot exceed half the length of the original participating blocks.

Basic Functions
176 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Jerk limitation
The smoothing of the velocity jump on each axis and thus the shape of the rounding path
depends on whether an interpolation is performed with or without jerk limitation.
Without jerk limitation the acceleration of each axis reaches its maximum value in the entire
rounding area.

9HORFLW\

3RVLWLRQ

7LPH

With jerk limitation, the jerk of each axis is limited to its maximum value within the rounding
area. The rounding motion thus generally consists of 3 phases:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 177
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

● Phase 1
During phase 1, each axis builds up its maximum acceleration. The jerk is constant and
equal to the maximum possible jerk on the respective axis.
● Phase 2
During phase 2, the maximum permissible acceleration is applied.
● Phase 3
During phase 3, which is the last phase, the acceleration of each axis is reduced back to
zero with the maximum permissible jerk.

9HORFLW\

3RVLWLRQ

7LPH

VWSKDVH QGSKDVH UGSKDVH

Basic Functions
178 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

3.3.3.4 Rounding of tangential block transitions (G645)

Function
In continuous-path mode with rounding, rounding blocks are also only generated on
tangential block transitions if the curvature of the original contour exhibits a jump in at least
one axis.
The rounding movement is defined here so that the acceleration of all axes involved remains
smooth (no jumps) and the parameterized maximum deviations from the original contour
(MD33120 $MA_PATH_TRANS_POS_TOL) are not exceeded.
In the case of angular, non-tangential block transitions, the rounding behavior is the same as
with G642 (see "Rounding in compliance with defined tolerances (G642/G643) (Page 171)").

Activation/Deactivation
Continuous-path mode with rounding of tangential block transitions can be activated in any
NC part program block by the modal command G645.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode with rounding of tangential block transitions (G645) can be
deactivated by selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G641, G642, G644 or G645

Comparison between G642 and G645


When rounding with G642, the only block transitions rounded are those which form a corner,
i.e. the velocity of at least one axis jumps. However, if a block transition is tangential, but
there is a jump in the curvature, no rounding block is inserted with G642. If this block
transition is traversed with finite velocity, the axes experience some degree of jump in
acceleration which (with the jerk limit activated!) may not exceed the parameterized limit
(MD32432 $MA_PATH_TRANS_JERK_LIM). Depending on the level of the limit, the path
velocity at the block transition may be greatly reduced as a result. This constraint is avoided
by using G645 because the rounding movement is defined here in such a way that no jumps
occur in acceleration.

Parameter assignment
The following machine data indicates the maximum permissible path deviation for each axis
during rounding with G645:
MD33120 $MA_PATH_TRANS_POS_TOL
This value is only of relevance to tangential block transitions with variable acceleration.
When angular, non-tangential block transitions are rounded, (as with G642) the tolerance
from MD33100 $MA_COMPRESS_POS_TOL becomes effective.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 179
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

See also
Free-form surface mode: Basic functions (Page 206)

3.3.4 LookAhead

3.3.4.1 Standard functionality

Function
LookAhead is a function which is active in continuous-path mode (G64, G64x) and
determines a foreseeable velocity control for multiple NC part program blocks over and
beyond the current block.

Note
LookAhead is only available for path axes, not for spindles and positioning axes.

If a part program contains consecutive blocks with very small paths, only one velocity is
reached per block without LookAhead, enabling deceleration of the axes at the end of the
block while maintaining acceleration limits. This means that the programmed velocity is not
reached at all. With LookAhead, however, it is possible to implement the acceleration and
deceleration phase over multiple blocks with approximately tangential block transitions,
thereby achieving a higher feedrate with shorter distances.

)HHG

SURJUDPPHG
)

*/RRN$KHDGYHORFLW\FRQWURO

*&RQVWDQWYHORFLW\SKDVHFDQQRWEHDFKLHYHG

1 1 1 1 1 1 1 1 1 1 1 1


%ORFNSDWK

Figure 3-5 Velocity control with short distances and exact stop G60 or continuous-path mode G64
with LookAhead

Deceleration to velocity limits is possible with LookAhead such that violation of the
acceleration and velocity limit is prevented.
LookAhead takes plannable velocity limits into consideration such as:

Basic Functions
180 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

● Exact stop at block end


● Velocity limit in the block
● Acceleration limit in the block
● Velocity limit on block transition
● Synchronization with block change at block transition.

Principle
LookAhead carries out a block-specific analysis of velocity limits and specifies the required
brake ramp profile based on this information. LookAhead is adapted automatically to block
length, braking capacity and permissible path velocity.
For safety reasons, the velocity at the end of the last prepared block must initially be
assumed to be zero because the next block might be very small or be an exact-stop block,
and the axes must have been stopped by the end of the block.
With a series of blocks with high set velocity and very short paths, the speed can be
increased in each block depending on the velocity value currently calculated by the
LookAhead function in order to achieve the required set velocity. After this it can be reduced
so that the velocity at the end of the last block considered by the LookAhead function can be
zero. This results in a serrated velocity profile (see the following fig.) which can be avoided
by reducing the set velocity or increasing the number of blocks considered by the
LookAhead function.

YVHW

Y Y DFW

1 1 1 1 1 1 W

Figure 3-6 Example for modal velocity control (number of blocks considered by the LookAhead
function = 2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 181
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Activation/Deactivation
LookAhead is activated by selecting continuous-path mode G64, G641, G642, G643, G644
or G645.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
LookAhead is deactivated by selecting the modal exact stop (G60).

Parameter assignment
Number of blocks
To achieve reliable axis traversal in continuous-path mode, the feedrate must be adapted
over several blocks. The number of blocks considered by the LookAhead function is
calculated automatically and can, if required, be limited by a machine data. The default
setting is "1", which means that LookAhead only considers the following block for velocity
control.
Because LookAhead is especially important for short blocks (relative to the deceleration
path), the number of blocks required is of interest for LookAhead braking. It is enough to
consider the path length to be equal to the deceleration path that is required to brake from
maximum velocity to standstill.
For a machine with a low axial acceleration of a = 1 m/s2 and a high feedrate of
vpath = 10 m/min, the following number of nLookAhead blocks are allocated to the control where it
has has an attainable block cycle time of TB = 10 ms:
nLookAhead = Deceleration path/Block length = ( vpath2 / (2a)) / (vpath * TB) = 9
Considering these conditions, it is advisable to adapt the feedrate over 10 blocks. The
number of blocks entered for the LookAhead function forecast does not change the
LookAhead algorithm and memory requirement.
Since the machining velocity is very often set to a lower value than the maximum velocity in
a program, more blocks than are required would be predicted, overloading the processor
unnecessarily. For this reason, the required number of blocks is derived from the velocity
which is calculated from the following multiplication:
● Programmed velocity * MD12100 $MN_OVR_FACTOR_LIMIT_BIN
(when using a binary-coded feed-rate override switch)
● Programmed velocity * MD12030 $MN_OVR_FACTOR_FEEDRATE[30]
(when using a gray-coded feed-rate override switch)
The value for MD12100 or the 31st override value for MD12030 defines the dynamic
response reserves which the velocity control provides for when the path feed is overshot.

Note
The 31st override value for MD12030 should correspond to the highest override factor which
is actually used.

Note
The number of blocks considered by the LookAhead function is limited by the possible
number of NC blocks in the IPO buffer.

Basic Functions
182 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Velocity profiles
In addition to the fixed, plannable velocity limitations, LookAhead can also take account of
the programmed velocity. This makes it possible to achieve a lower velocity by applying
LookAhead beyond the current block.
● Determination of the following block velocity
One possible velocity profile contains the determination of the following block velocity.
Using information from the current and the following NC block, a velocity profile is
calculated from which, in turn, the required velocity reduction for the current override is
derived.
The calculated maximum value of the velocity profile is limited by the maximum path
velocity.
With this function it is possible to initiate a speed reduction in the current block taking
override into account such that the lower velocity of the following block can be achieved.
If the reduction in velocity takes longer than the travel time of the current block, the
velocity is further reduced in the following block. Velocity control is only ever considered
for the following block.
The function is activated via the machine data:
MD20400 $MC_LOOKAH_USE_VELO_NEXT_BLOCK

Value Meaning
TRUE Function active
FALSE Function not active

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 183
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

● Definition of override points


If the velocity profile of the following block velocity is not sufficient because, for example,
very high override values (e.g. 200 %) are used or a constant cutting rate G96/G961 is
active, with the result that the velocity must be further reduced in the following block,
LookAhead provides a way of reducing the programmed velocity over several NC blocks.
By defining override points, LookAhead calculates a limiting velocity profile for each
value. The required velocity reductions for the current override are derived from these
profiles.
The calculated maximum value of the velocity profile is limited by the maximum path
velocity.
The upper point should cover the velocity range that will be reached by the maximum
value set in the machine data:
MD12030 $MN_OVR_FACTOR_FEEDRATE [n] (evaluation of the path feed rate override
switch)
It can also be reached via the value of the machine data:
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary coded override switch)
In this way, a reduction of the velocity continuing into the block in which it is programmed
can be avoided.
If velocity reductions across block boundaries are required at a 100 % override, a point
should be set in the lower override range as well.
The number of override points used per channel is specified in the machine data:
MD20430 $MC_LOOKAH_NUM_OVR_POINTS (number of override switch points for
LookAhead)
The associated points are stored in the machine data:
MD20440 $MC_LOOKAH_OVR_POINTS (prepared override velocity characteristics with
LookAhead)
Example:
Limiting velocity characteristics, whereby:
– Override = 50 %, 100 % or 150 %
– Number of LookAhead blocks = 4
– MD20430 $MC_LOOKAH_NUM_OVR_POINTS = 2
– MD20440 $MC_LOOKAH_OVR_POINTS = 1.5, 0.5
– MD20400 $MC_LOOKAH_USE_VELO_NEXT_BLOCK = 1

Basic Functions
184 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Y 9HORFLW\SURJUHVVLRQZLWKDQGRYHUULGH

Y PD[
3URJUDPPHG
VHWSRLQW



9HORFLW\SURILOHDQG





1 1 1 1 1 V

A combination of both procedures (determination of following block velocity and


determination of override points) can be used to calculate the velocity profiles and is
generally advisable because the preset machine data for these functions already takes the
widest range of override-dependent velocity limits into account.

Note
If neither of the procedures has been activated, the setpoint velocity is always applied in the
current block.

Note
Plannable velocity limits restrict override-specific velocity limits.

Relief factor with block cycle problems


Block cycle problems are encountered in cases where the traversing distances of the NC
blocks to be processed are so short that the LookAhead function has to reduce the machine
velocity to provide enough time for block processing. In this situation, constant braking and
acceleration of path motion may occur.
Velocity fluctuations of this type can be dampened by specifying a relief factor:
MD20450 $MC_LOOKAH_RELIEVE_BLOCK_CYCLE (relieving factor for the block cycle
time)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 185
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Limit conditions
Axis-specific feed stop/axis disable
Axis-specific feed stop and axis-specific axis disable are ignored by LookAhead.
If an axis is to be interpolated that should on the other hand be made stationary by axis-
specific feed stop or axis disable, LookAhead does not stop path movement before the block
in question but decelerates in the block itself.
If this response is not wanted, an axis-specific feed stop can be transferred to a channel via
the PLC to stop the path immediately (see also "Clamping monitoring (Page 84)").

3.3.4.2 Free-form surface mode: Extension function

Function
The "Free-form surface mode: Extension function" is an extension of the LookAhead
standard functionality and is used to calculate the path velocity profile during free-form
surface processing (see also "Free-form surface mode: Basic functions (Page 206)").
Its use optimizes the continuous-path mode as follows:
● Symmetry between the acceleration and deceleration profiles
● Uniform acceleration process, even with changing jerk or acceleration limits
● Uniform acceleration process of target velocity profiles, irrespective of the degree to
which they can or cannot be started with the specified dynamic response limit
● LookAhead braking to lower setpoint velocities
Uniformity and compliance with the dynamic response limit guarantee that the setpoint
velocity profiles are smoothed to a homogeneous velocity profile on the part. This serves to
minimize the effect of following errors on the quality of the surface.
Therefore, the function offers the following advantages:
● Greater uniformity in the surface of the workpiece
● Lower machine load

Applications
The "Free-form surface mode: Extension function" is used to process workpieces which
primarily comprise free-form surfaces.

Note
As better results are not achieved for standard processing applications, standard LookAhead
functionality should be used in these cases.

Basic Functions
186 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Requirements
● The function is only effective:
– in AUTOMATIC mode
– in acceleration mode: acceleration with jerk limit (SOFT)
● Activation is only possible if the requisite memory is configured:
MD28533 $MC_MM_LOOKAH_FFORM_UNITS = <value>
Sensible value assignment depends upon the part program, the block lengths, the axial
dynamic response, as well as upon an active kinematic transformation.
The following setting applies as a guideline for processing free-form surfaces: 18

Note
Due to the additional storage requirements, MD28533 should only be set for the channels
in which free-form surfaces are being processed.

Activation/Deactivation
The function can be switched on or off independently for every dynamic response mode (see
"Dynamic response mode for path interpolation (Page 203)"):
MD20443 $MC_LOOKAH_FFORM[<n>]= <value>

Index <n> Dynamic response mode <value> Free-form surface mode: Extension
function
0 Standard dynamic response 0 off
settings (DYNNORM) 1 on
1 Positioning mode, tapping 0 off
(DYNPOS) 1 on
2 Roughing (DYNROUGH) 0 off
1 on
3 Finishing (DYNSEMIFIN) 0 off
1 on
4 Smooth-finishing (DYNFINISH) 0 off
1 on
The "Free-form surface mode: Extension function" is typically only active if the "Free-form
surface mode: Basic functions" are also active. Therefore, the settings in
MD20443 $MC_LOOKAH_FFORM[<n>] should correspond to the settings in
MD20606 $MC_PREPDYN_SMOOTHING_ON[<n>].
The standard LookAhead functionality is active in the dynamic response modes in which the
"Free-form surface mode: Extension function" is switched off.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 187
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Programming
Generally speaking, the "Free-form surface mode: Extension function" becomes effective as
a result of a change in the dynamic response mode in the part program.

Example
The following parameters are assumed:
MD20443 $MC_LOOKAH_FFORM[0] = 0
MD20443 $MC_LOOKAH_FFORM[1] = 0
MD20443 $MC_LOOKAH_FFORM[2] = 1
MD20443 $MC_LOOKAH_FFORM[3] = 1
MD20443 $MC_LOOKAH_FFORM[4] = 1

Program code Comment


N10 DYNPOS ; Switch on the DYNPOS dynamic
response mode. Standard LookAhead
functionality is active in the
DYNPOS dynamic response mode.
...
N100 G17 G54 F10000
N101 DYNFINISH ; Switch on the DYNFINISH dynamic
response mode. The "Free-form
surface mode: Extension functions"
are active in the DYNFINISH dynamic
response mode.
N102 SOFT G642
N103 X-0.274 Y149.679 Z100.000 G0
N104 COMPCAD
...
N1009 Z4.994 G01
N10010 X.520 Y149.679 Z5.000
N10011 X10.841 Y149.679 Z5.000
N10012 X11.635 Y149.679 Z5.010
N10013 X12.032 Y149.679 Z5.031
M30

Note
When switching between the standard LookAhead functionality and the "Free-form surface
mode: Extension function" or vice versa, continuous-path mode is interrupted by an
interpolator stop.

Basic Functions
188 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Continuous-path mode

Limit conditions
Automatic function switchover
Applying the following functions when the "Free-form surface mode: Extension function"
leads to an automatic switchover to standard LookAhead functionality:
● Feed profile (FLIN, FCUB, FPO)
● Deceleration at corners (G62, G621)
● Thread cutting/tapping (G33, G34, G35, G331, G332, G63)
● Path master-value coupling
● Punching, nibbling
● Acceleration of the path axes with jerk limit (SOFT)
● Cartesian PTP travel
The "Free-form surface mode: Extension function" is then switched on again automatically.
Using the commands of G function group 15 (feed types)
It is not advisable to use the following feed types when the "Free-form surface mode:
Extension function" is active:
● Feedrate per revolution (G95, G96, G97, etc.)
● Inverse-time feedrate (G93)
Time response during feedrate overrides
$ Feedrate overrides (via a machine control panel, $AC_OVR, ...) can extend the traverse
time over standard LookAhead functionality considerably.
Rapid traverse movements (G0)
G0 blocks which are interspersed during free-form surface processing do not switch the
LookAhead functionality over (from the "Free-form surface mode: Extension function" to
standard LookAhead functionality or vice versa).
This means that even though the standard dynamic response setting (DYNNORM) is
effective with G0, the standard LookAhead functionality which is preset for DYNNORM
(→ MD20443 $MC_LOOKAH_FFORM[0]) does not automatically become effective as well as
a result.
By retaining the LookAhead functionality which is currently active, a more homogeneous
velocity profile is achieved, particularly since G0 and polynomial blocks are usually
smoothed and connected by rounding.
Number of NC blocks in the IPO buffer
It is generally advisable to significantly increase the configured number of NC blocks in the
interpolation buffer when using the "Free-form surface mode: Extension function":
MD28060 $MC_MM_IPO_BUFFER_SIZE > 100
If the block memory capacity is too low, this may diminish the uniformity of the path-velocity
profile.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 189
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

3.4 Dynamic adaptations

3.4.1 Smoothing the path velocity

Introduction
The velocity control function utilizes the specified axial dynamic response. If the programmed
feedrate cannot be achieved, the path velocity is brought to the parameterized axial limit
values and the limit values of the path (velocity, acceleration, jerk). This can lead to repeated
braking and acceleration on the path.
If a short acceleration takes place during a machining function with high path velocity, and is
thus followed almost immediately by braking, the reduction in the machining time is only
minimal. Acceleration of this kind can, however, have undesirable effects if, for example, it
results in machine resonance.
In some applications in mold making, especially in the case of high speed cutting, it is
desirable to achieve a constant path velocity. In these cases, it can therefore be reasonable
to sacrifice transient acceleration processes in favor of a smoother tool path velocity.

Function
If the "smoothing the path velocity" function is active, a smoothing factor, which determines
the maximum permissible productivity loss, takes effect with a view to achieving smoother
path velocity control: Acceleration processes which contribute less than this factor to a
shorter program runtime are not performed. Account is only taken of acceleration processes
whose frequencies lie above the configurable limit frequencies of of the axes involved.
Benefits:
● Avoidance of excitations of possible machine resonance due to continuous, transient
braking and acceleration processes (in the area of less IPO cycles).
● Avoiding of constantly varying cutting rates due to acceleration which brings no significant
shortening of the program running time.

Note
The smoothing of the path velocity does not lead to contour errors.
Variations in axis velocity due to curvatures in the contour at constant path velocity may
continue to occur and are not reduced with this function.
Variations in path velocity due to the input of a new feedrate are not changed either. This
remains the responsibility of the programmer of the subprogram.

Basic Functions
190 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Requirements
● The smoothing of the path velocity is only effective in continuous-path mode with
LookAhead over multiple blocks with SOFT and BRISK. Smoothing is not effective with
G0.
● The controller's cycle times must be configured in such a way that preprocessing can
prepare sufficient blocks to enable an acceleration process to be analyzed.

Activation/Deactivation
The "smoothing of the path velocity" function is activated/deactivated with the machine data:
MD20460 $MC_LOOKAH_SMOOTH_FACTOR (smoothing factor for LookAhead)

Value Meaning
0.0 Smoothing of the path velocity not active (default)
>0 Smoothing of the path velocity active
A change in the MD setting is only made effective through NEW CONF.

Parameter assignment
Smoothing factor
The smoothing factor is set via the channel-specific machine data:
MD20460 $MC_LOOKAH_SMOOTH_FACTOR (smoothing factor for LookAhead)
The percentage value defines how much longer a processing step without
accelerations/decelerations may be than the corresponding step with
accelerations/decelerations.
This would be a "worst-case" value, if all accelerations within the part program, except the
initial approach motion, were smoothed. The actual extension will always be smaller, and
may even be 0, if the criterion is not met by any of the accelerations. Values between 50 and
100% may also be entered without significantly increasing the machining time.
Consideration of the programmed feed
The path velocity can be smoothed with or without taking the programmed feedrate into
consideration. The selection is made via the machine data:
MD20462 $MC_LOOKAH_SMOOTH_WITH_FEED (path smoothing with programmed
feedrate)

Value Description
0 Programmed feedrate is not taken into consideration.
1 Programmed feedrate is considered (default setting).
When considering the programmed feedrate, the specified smoothing factor (see MD20460)
is maintained better when the override is 100%.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 191
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Axis-specific limit frequencies


The axis-specific limit frequencies are defined via the machine data:
MD32440 $MA_LOOKAH_FREQUENCY (smoothing frequency for LookAhead)
Acceleration and deceleration processes, which run with a high frequency, are smoothed
depending upon the parameterization of the following machine data or else are reduced in
dynamics:
MD20460 $MC_LOOKAH_SMOOTH_FACTOR (smoothing factor for LookAhead)
MD20465 $MC_ADAPT_PATH_DYNAMIC (adaptation of the dynamic path response)
(Refer to "Adaptation of the dynamic path response (Page 194)" for further information about
MD20465)

Note
If vibrations are generated in the mechanical system of an axis and if the corresponding
frequency is known, MD32440 should be set to a value smaller than this frequency.
The needed resonance frequencies can be calculated using the built-in measuring functions.

Principle
The minimum value for MD32440 is calculated as fpath on the basis of the axes involved in
the path. For the smoothing only those acceleration processes are taken into consideration,
in which the start and the end velocity of this motion are reached within the time given below:
t = t2 - t1 = 2 / fpath
These acceleration processes are dispensed with if the resulting extension in the processing
time does not exceed the limit specified in excess of the smoothing factor (MD20460).

Example
The following parameters are assumed:
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 10 %
MD32440 $MA_LOOKAH_FREQUENCY[AX1] = 20 Hz
MD32440 $MA_LOOKAH_FREQUENCY[AX2] = 20 Hz
MD32440 $MA_LOOKAH_FREQUENCY[AX3] = 10 Hz
The path involves the 3 axes X = AX1, Y = AX2, Z = AX3.
The minimum value of MD32440 for these 3 axes is thus 10 Hz. This means that any
acceleration, which is completed within a period of t2 - t1 = 2/10 Hz = 200 ms, is examined.
The time t2 is the time it takes to reach velocity v1 again following an acceleration process
starting from velocity v1. The extending of the execution time is also only considered within
this range.
If the time t2 - t1 is greater than 200 ms or if the additional program execution time t3 - t2 is
more than 10% (= MD20460) of t2 - t1, the following time characteristic applies:

Basic Functions
192 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Y
Y

W W W

Figure 3-7 Characteristic of time-optimum path velocity (without smoothing)

If, however, the time t2 - t1 is less than 200 ms or if the additional program execution time t3 -
t2 is no more than 10% of t2 - t1, the following time characteristic applies:

Y
Y

W

W W W

Figure 3-8 Characteristic of the smoothed path velocity

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 193
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

3.4.2 Adaptation of the dynamic path response

Function
Highly dynamic acceleration and deceleration processes during machining can cause
excitation of mechanical vibrations of machine elements and consequently a reduction of the
surface quality of the workpiece.
The dynamic response of the acceleration and deceleration processes can be adapted to the
machine conditions using the "adaptation of the dynamic path response" function.

Note
The "adaptation of the dynamic path response" function only concerns the resulting path and
not the deceleration and acceleration processes of the individual axes involved in the path.
For this reason, critical deceleration and acceleration processes of the axes with respect to
the excitation of mechanical vibrations can occur due to discontinuous contour profiles or
kinematic transformations, even with a constant path velocity profile.

Activation
The "adaptation of the dynamic path response" function is only effective during path
movements:
● Continuous-path mode (G64, G64x)
In continuous-path mode, the optimal effect of the dynamic response adaptation is
attained with an active 100% override. Considerable deviations from this value or
functions that cause the path axes to decelerate (e.g. auxiliary function outputs to the
PLC) greatly reduce the desired action.
● Exact stop (G60)
In addition, the "adaptation of the dynamic path response" function is not active during path
movements:
● Programmed rapid traverse (G0)
● Changes in the override value
● Stop requests during motion (e.g. NC-STOP, NC-RESET)
● "Velocity-dependent path acceleration" function (DRIVE) is active

Activation/Deactivation
The function is activated/deactivated with the machine data:
MD20465 $MC_ADAPT_PATH_DYNAMIC (adaptation of the dynamic path response)

Value Meaning
= 1.0 Dynamic adaptation not active (default setting)
> 1.0 Dynamic adaptation active
When activation takes place, the "smoothing the path velocity" function is always activated
internally in continuous-path mode as well (see "Smoothing the path velocity (Page 190)").

Basic Functions
194 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

If the smoothing factor (MD20460 $MC_LOOKAH_SMOOTH_FACTOR) is set to 0%


(= function deactivated; default!), a smoothing factor of 100% is used as a substitute. For a
smoothing factor other than 0%, the set value takes effect.

Parameter assignment
Adaptation factor of the dynamic path response
Via the adaptation factor of the dynamic path response, temporary changes in the path
velocity are executed with smaller dynamic response limit values.
The adaptation factor is to be set on a channel-specific basis:
● For traversing motions with acceleration without jerk limiting (BRISK) via:
MD20465 $MC_ADAPT_PATH_DYNAMIC[ 0 ]
→ The adaptation factor acts on the acceleration.
● For traversing motions with acceleration with jerk limiting (SOFT) via:
MD20465 $MC_ADAPT_PATH_DYNAMIC[ 1 ]
→ The adaptation factor acts on the jerk.
Axis-specific limit frequencies
The dynamic response limiting should only be active during deceleration and acceleration
processes that trigger mechanical vibrations larger than a specific limiting frequency, thus
causing excitation of machine resonances.
This limit frequency from which the dynamic response limiting activates, is specified on an
axis-specific basis via the machine data:
MD32440 $MA_LOOKAH_FREQUENCY (smoothing frequency for LookAhead)
(See also "Smoothing the path velocity (Page 190)".)

Principle
During processing and via all the axes involved in the path, the controller cyclically
establishes the minimum of all the limit frequencies to be the limit frequency (f) for the
adaptation of the dynamic response and calculates the relevant time window (tadapt) from this:
tadapt = 1 / f
The size of the relevant time window tadapt determines the further behavior:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 195
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

1. The time needed to change the velocity is less than tadapt:


The acceleration rates are reduced by a factor > 1 and ≤ the value written in machine
data:
MD20465 ADAPT_PATH_DYNAMIC (adaptation of the path dynamics)
The reduction in acceleration rate increases the time taken to change the velocity.
The following cases are different:
– The acceleration rate is reduced with a value less than MD20465 so that the process
lasts for tadapt [s]. The permitted reduction does not need to be fully utilized.
– The acceleration time is reduced with the value written in MD20465. The process lasts
less than tadapt despite the reduced acceleration. The permitted reduction was fully
utilized.
2. The time needed to change the velocity is greater than tadapt:
No dynamic response adaptation is required.

Example
The following example is intended to show the effect of the "adaptation of the dynamic path
response" function on traversing motions with acceleration and without jerk limiting (BRISK).
The following parameters are assumed:

MD20465 $MC_ADAPT_PATH_DYNAMIC[0] = 1.5


MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 1.0
MD32440 $MA_LOOKAH_FREQUENCY[AX1] = 20 Hz TAX1 = 1/20 Hz = 50 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX2] = 10 Hz TAX2 = 1/10 Hz = 100 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX3] = 20 Hz TAX3 = 1/20 Hz = 50 ms

Note
To illustrate the effect of dynamic response adaptation, the value for the smoothing factor
(MD20460) is set to "1", whereby the "smoothing of the path velocity" function is practically
deactivated.

The path involves the 3 axes X = AX1, Y = AX2, Z = AX3.


For path motions in which axis AX2 is involved, all deceleration and acceleration processes
that would last less than TAX2 are adapted.
If only axes AX1 and/or AX3 are involved in path motions, all deceleration and acceleration
processes that would last less than TAX1 = TAX3 are adapted.
The relevant time window is marked tadapt... in the figures below.

Basic Functions
196 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Y
%
WDGDSW

Y WDGDSW
WDGDSW WDGDSW

W W W W W W W W W

Figure 3-9 Path velocity profile optimized for time without smoothing or dynamic adaptation
response

Y
%

WDGDSW

WDGDSW
WDGDSW
Y

W
W W W W W W W W

Figure 3-10 Path velocity profile with adaptation of dynamic path response

Intervals t0 - t1 and t2 - t3: The acceleration process between t0 - t1 and the


deceleration process between t2 - t3 are extended in terms
of time to tadapt01 or tadapt23 as a result of the acceleration
being adapted.
Interval t4 - t5: The acceleration process between t4 - t5 is executed with an
acceleration reduced by the maximum adaptation factor of
1.5. However, the acceleration process is completed before
time tadapt45.
Interval t6 - t7: The deceleration process between t6 - t7 remains
unchanged as it lasts longer than tadapt67.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 197
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

3.4.3 Determination of the dynamic response limiting values


In addition to determining the natural frequency of the path axes for assigning parameters to
the axis-specific limit frequencies (MD32440 $MA_LOOKAH_FREQUENCY), the
implementation of the "adaptation of the dynamic path response" function also requires
dynamic response limits to be determined for velocity, acceleration and jerk.

Procedure
The determination of the dynamic response limits for the traversing of path axes by means of
acceleration with jerk limiting (SOFT) is described below. This procedure can be applied by
analogy to the case of acceleration without jerk limiting (BRISK).
1. Deactivate the "adaptation of the dynamic path response" function:
MD20465 $MC_ADAPT_PATH_DYNAMIC[1] = 1
2. Observe the positioning behavior of each path axis at different traversing velocities.
When doing so, set the jerk such that the desired positioning tolerance is maintained.

Note
The higher the traversing velocity from which the positioning process is started, the
higher in general the jerk can be set.

3. Use the maximum permissible jerk determined for the least critical traversing velocity:
MD32431 $MA_MAX_AX_JERK (maximum jerk)
4. Determine the FAPD factor for all of the path axes using:
FAPD = (largest determined jerk)/(smallest determined jerk)

Note
The smallest determined jerk is the value for the jerk during the most critical traversing
velocity.

5. Enter the largest FAPD factor that was determined via all the path axes as the value for the
adaptation factor for the path dynamic response:
MD20465 $MC_ADAPT_PATH_DYNAMIC[ 1 ] = FAPD

Basic Functions
198 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

3.4.4 Interaction between the "smoothing of the path velocity" and "adaptation of the
path dynamic response" functions
The following examples serve to illustrate the interaction between the "smoothing of the path
velocity" and "adaptation of the path dynamic response" functions in continuous-path mode.

Example 1
Acceleration mode: BRISK
The path involves the 3 axes X = AX1, Y = AX2, Z = AX3.
The following parameters are assumed:

MD20465 $MC_ADAPT_PATH_DYNAMIC[0] = 3
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 80.0
MD32440 $MA_LOOKAH_FREQUENCY[AX1] = 20 TAX1 = 1/20 Hz = 50 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX2] = 20 TAX2 = 1/20 Hz = 50 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX3] = 20 TAX3 = 1/20 Hz = 50 ms

Y
%

Y

Y

W W W W W W

Figure 3-11 Path velocity profile optimized for time without smoothing or dynamic adaptation
response

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 199
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Y
%

Y

W
W W W W W

Figure 3-12 Path velocity profile with smoothing of the path velocity and adaptation of dynamic path
response

Effects of smoothing on path velocity:

Interval t1 - t2: The acceleration and deceleration process between t1 and t2 does not
take place because the lengthening of the machining time without the
acceleration process to v12 is less than the resulting time if a
smoothing factor of 80 % is applied.
Interval t3 - t5: The acceleration and braking profile between t3 and t5 does not fulfill
this condition or takes longer than the parameterized smoothing time
TAxn = 2/20 Hz = 100 ms.
Effects of the dynamic response adaptation:

Interval t3 - t4: The acceleration process between t3 and t4 is shorter than


MIN(TAXn) = 1/20 Hz = 50 ms and is, therefore, executed with an
acceleration reduced by an adaptation factor of 3.
Interval up to t1: The acceleration up to t1 left over after path smoothing is stretched to
the time period up to t1' by the dynamic response adaptation.

Note
The example shows that those acceleration or deceleration processes that are not
eliminated by the smoothing of the path velocity can be subsequently optimized by adapting
the dynamic path response. For this reason, both functions should always be activated, if
possible.

Example 2
Acceleration mode: SOFT
The path involves the 3 axes X = AX1, Y = AX2, Z = AX3.
The following parameters are assumed:

Basic Functions
200 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

MD20465 $MC_ADAPT_PATH_DYNAMIC[1] = 1
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 0.0
MD32440 $MA_LOOKAH_FREQUENCY[AX1] = 10 TAX1 = 1/20 Hz = 100 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX2] = 10 TAX2 = 1/20 Hz = 100 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX3] = 20 TAX3 = 1/20 Hz = 50 ms
This leads to a path velocity profile which is optimized in terms of time without smoothing the
path velocity or adapting the dynamic path response:

/LPLWLQJRISDWKYHORFLW\BEDVHGRQ
G\QDPLFD[LVUHVSRQVHBRUSURJUDPPHG
IHHG

3DWKYHORFLW\FKDUDFWHULVWLF

7LPHLQLQWHUSRODWLRQF\FOHV
%ORFNFKDQJHPDUNHUV

The parameter assignment is changed as follows:

MD20465 $MC_ADAPT_PATH_DYNAMIC[1] = 4
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 1.0
This results in a path velocity profile with adaptation of the dynamic path response and with
minimum, and thus virtually deactivated, smoothing of the path velocity:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 201
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

6PRRWKHUSDWKYHORFLW\GXHWRORZHUSDWKMHUN

7LPHLQLQWHUSRODWLRQF\FOHV

The smoothing factor is set to 0% instead of 1% (in accordance with the default!):

MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 0.0


A smoothing factor of 100% comes into effect with this parameter assignment.
This gives rise to a path velocity profile with smoothing of the path velocity and adaptation of
dynamic path response:

Basic Functions
202 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

1RDFFHOHUDWLRQRUEUDNLQJBHIIHFWRISDWKVPRRWK
6PRRWKHUSDWKYHORFLW\BGXHWR LQJ
UHGXFHGSDWKMHUN

7LPHLQLQWHUSRODWLRQ
F\FOHV

3.4.5 Dynamic response mode for path interpolation

Function
Technology-specific, dynamic response settings can be saved in machine data and can be
activated in the part program via the commands from G function group 59 (dynamic
response mode for path interpolation).

Command Activates the dynamic response settings for:


DYNNORM Standard dynamic response settings
DYNPOS Positioning mode, tapping
DYNROUGH Roughing
DYNSEMIFIN Finishing
DYNFINISH Smooth finishing

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 203
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Note
The dynamic response of the path axes alone is determined by the commands from G
function group 59 (dynamic response mode for path interpolation). They have no effect on:
• Positioning axes
• PLC axes
• Command axes
• Movements based on axis coupling
• Overlaid movements with handwheel
• JOG movements
• Reference point approach (G74)
• Fixed point travel (G75)
• Rapid traverse movements (G0)
The standard dynamic response setting (DYNNORM) always takes effect for these axis
movements.

Application
By switching the dynamic response settings, roughing a workpiece can be optimized in terms
of time and smoothing it can be optimized in terms of the surface, for example.

Parameter assignment
Parameters are assigned to the specific dynamic response settings:
● For the axis in question via the machine data:
– MD32300 $MA_ MAX_AX_ACCEL[<n>] (axis acceleration)
– MD32431 $MA_MAX_AX_JERK[<n>] (maximum axial jerk for path motion)
– MD32432 $MA_PATH_TRANS_JERK_LIM[<n>] (max. axial jerk at the block transition
in continuous-path mode)
– MD32310 $MA_MAX_ACCEL_OVL_FACTOR[<n>] (overload factor for axial jumps in
velocity)
– MD32433 $MA_SOFT_ACCEL_FACTOR[<n>] (scaling of the acceleration limitation
with SOFT)
● For the axis via the machine data:
– MD20600 $MA_MAX_PATH_JERK[<n>] (path-related maximum jerk)
– MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL[<n>] (influence of path curvature
on dynamic path response)
– MD20603 $MC_CURV_EFFECT_ON_PATH_JERK[<n>] (influence of path curvature
on path jerk)

Basic Functions
204 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Value range for index n:

Index <n> Meaning


0 Value for DYNNORM
1 Value for DYNPOS
2 Value for DYNROUGH
3 Value for DYNSEMIFIN
4 Value for DYNFINISH

NOTICE
Writing the machine data without an index places the same value in all field elements of the
machine data in question.
Reading the machine data without an index always supplies the value of the field with index
0.

Suppressing G commands
G commands from G function group 59 (dynamic response mode for path interpolation)
which are not intended for use should be suppressed by the machine manufacturer via the
following machine data:
MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[<n>] (list of reconfigured NC
commands)
The programming of a suppressed G command leads to an alarm signal. This prevents
machine data which has not been configured with the G command taking effect.
Example:
The G commands DYNPOS and DYNSEMIFIN can be suppressed with the following settings:
MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[0]="DYNPOS"
MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[1]=" "
MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[2]="DYNSEMIFIN"
MD10712 $MN_ NC_USER_CODE_CONF_NAME_TAB[3]=" "

References
You can find further information about programming the G commands from G function group
59 (dynamic response mode for path interpolation) in:
References:
Programming Manual, Fundamentals; chapter: "Path traversing behavior"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 205
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

3.4.6 Free-form surface mode: Basic functions

Introduction
In applications in tool and mold making, it is important that the surfaces on the workpiece are
as uniform as possible. This requirement is generally more important than the precision of
the surface of the workpiece.
Workpiece surfaces which lack uniformity can be attributable to the following causes, for
example:
● The part program for manufacturing the workpiece contains a non-uniform geometry.
This, most notably, affects the profile of the curvature and torsion.

Note
The curvature k of a contour is the inverse of radius r of the nestling circle in a contour
point (k = 1/r). The torsion is the change in curvature (first derivative).

As a result of the lack of uniformity in geometry, the machine's dynamic response limits
are reached during processing of the part program, and needless deceleration and
acceleration processes occur. Depending on the extent of the effective over-travel of the
axes, this leads to different deviations in contours.
● Needless deceleration and acceleration processes can trigger machine vibrations which
result in unwelcome marks on the workpiece.
There are various options available for eliminating these causes:
● The part programs generated by the CAD/CAM system contain a very uniform curvature
and torsion profile, preventing needless reductions in path velocity.
● The maximum path velocity is determined in such a way that unwanted geometric
fluctuations in the curvature and torsion profile have no effect.

Function
"Free-form surface mode: Basic functions" can be used to make the definition of path
velocity limits insensitive to small geometric fluctuations in curvature and torsion without
exceeding the machine's dynamic limits in terms of the acceleration and jerk of the axes.
This results in the following advantages:
● Greater uniformity in the profile of the path velocity
● Greater uniformity in the surface of the workpiece
● Reduction in the processing time (if the dynamic response of the machine permits it)

Basic Functions
206 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Applications
The function is used to process workpieces which primarily comprise free-form surfaces.

Requirements
The function can only be activated if the requisite memory capacity is reserved during
memory configuration:
MD28610 $MC_MM_PREPDYN_BLOCKS = 10
The value entered prescribes the number of blocks which have to be taken into
consideration in the determination of the path velocity (velocity preparation).
A sensible value is "10".
If MD28610 has a value of "0", only the movements of the axes in a particular block are
taken into consideration when determining the maximum velocity of the path for that block. If
the geometry of neighboring blocks is also taken into consideration when determining the
velocity of the path (value > 0), a more uniform profile in path velocity is achieved.

Activation/Deactivation
The function can be switched on or off independently for every dynamic response mode (see
"Dynamic response mode for path interpolation (Page 203)"):
MD20606 $MC_PREPDYN_SMOOTHING_ON[<n>] = <value>

Index <n> Dynamic response mode <value> Free-form surface mode: Basic functions
0 Standard dynamic response 0 off
settings (DYNNORM) 1 on
1 Positioning mode, tapping 0 off
(DYNPOS) 1 on
2 Roughing (DYNROUGH) 0 off
1 on
3 Finishing (DYNSEMIFIN) 0 off
1 on
4 Smooth-finishing (DYNFINISH) 0 off
1 on

Note
Due to the additional storage requirements, the function should only be activated in the
relevant processing channels.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 207
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Parameter assignment
Change in the contour sampling factor
The secant error which occurs during the interpolation of curved contours is dependent on
the following factors:
● Curvature
● Interpolation cycle (display in the MD10071 $MN_IPO_CYCLE_TIME)
● Velocity with which the relevant contour is traversed
The max. possible secant error is defined for each axis in the machine data:
MD33100 $MA_COMPRESS_POS_TOL (maximum tolerance with compression)
If the set interpolation cycle is not sufficiently small, the max. path velocity may be reduced in
the case of contours with greater curvature. This is necessary for ensuring that the surface of
the workpiece is also produced with an adequate degree of precision in this case.
By changing the contour sampling factor, the time interval with which a curved contour is
sampled in the interpolator (contour sampling time) can be set at variance with the
interpolation cycle. A contour sampling time which is shorter than the interpolation cycle can
prevent a reduction in path velocity in the case of contours with greater curvature.
The contour sampling factor is set with the machine data:
MD10682 $MN_CONTOUR_SAMPLING_FACTOR
The effective contour sampling time is calculated as follows:
Ts = f * T 1

where: Ts = effective contour sampling time


T1 = Interpolation cycle time
f = Contour sampling factor (value from MD10682)
The default contour sampling factor is "1", i.e. the contour sampling time equals the
interpolation cycle.
The contour sampling factor can be both greater or less than "1".
If a value less than "1" is set, monitoring of contour sampling precision is disabled.
The set sampling time may not be below the configured minimum contour sampling time:
MD10680 $MN_MIN_CONTOUR_SAMPLING_TIME

Note
MD10680 is specifically set for every controller model and cannot be changed.

Basic Functions
208 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Dynamic adaptations

Programming
Depending on the setting in machine data MD20606 $MC_PREPDYN_SMOOTHING_ON,
"Free-form surface mode: Basic functions" can be switched on and off in the part program by
changing the active dynamic response mode.
Example:
By assigning the parameters MD20606 $MC_PREPDYN_SMOOTHING_ON[2-4] = 1 and
MD20606 $MC_PREPDYN_SMOOTHING_ON[0-1] = 0, the function can be switched on via
the commands DYNROUGH, DYNSEMIFIN, and DYNFINISH and switched off via the
commands DYNNORM and DYNPOS.

See also
Rounding of tangential block transitions (G645) (Page 179)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 209
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Compressor functions

3.5 Compressor functions

3.5.1 NC block compression

Function
COMPON, COMPCURV
The compression function COMPON or COMPCURV collects a series of linear blocks during
linear interpolation (the number is limited to 10) and approximates them within a tolerance
specified in machine data via a 3rd order (COMPON) or 5th order (COMPCURV) polynomial.
One traversing block is processed by the NC instead of a large number of small blocks.
COMPCAD
The compressor function COMPCAD generates mutually overlapping polynomial blocks with
constant acceleration. With adjacent paths, deviations head in the same direction.
The accuracy of the interpolation can be specified through machine data. The number of
blocks to be compressed is not limited to 10.
The aim of COMPCAD is an optimization regarding the surface finish and speed.
Since COMPCAD makes intensive use of computing time and memory area, it should only
be used if measures to improve the surface cannot be taken by the CAD/CAM program in
advance.

Rated conditions
● The NC block compression can only be executed for linear blocks (G1).
● Only blocks that comply with a simple syntax are compressed:
N... G1 X... Y... Z... F...
All other blocks are executed unchanged (no compression).
● Motion blocks with extended addresses such as C=100 or A=AC(100) can also be
compressed.
● The position values do not have to be programmed directly, but can also be indirectly
specified using parameter assignments, e.g. X=R1*(R2+R3).
● If the option "orientation transformation" is available, then NC blocks in which the tool
orientation (and where relevant, also the tool rotation) is programmed using direction
vectors can also be compressed.
References:
Function Manual Special Functions; 3 to 5-Axis Transformation (F2),
Chapter: "Compression of the orientation"
● It is interrupted by any other type of NC instruction, e.g. an auxiliary function output.

Basic Functions
210 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Compressor functions

Parameter assignment
Maximum path length
The maximum path length for the compression is set with the machine data:
MD20170 $MC_COMPRESS_BLOCK_PATH_LIMIT
Longer blocks are not compressed.
Recommended setting: 20 [mm]
Maximum deviation of the path feedrate FLIN and FCUB
The maximum permissible deviation of the path feedrate for active compressor function
COMPON or COMPCURV can be specified in the machine data together with FLIN and
FCUB:
MD20172 $MC_COMPRESS_VELO_TOL
Recommended setting: 100 [mm/min]
Axis accuracy
A tolerance can be specified for each axis. This value specifies the maximum deviation of
the generated spline curve from the programmed end points.
The setting is done via the following machine data:
MD33100 $MA_COMPRESS_POS_TOL
The higher the values, the more blocks can be compressed.

Note
Experience has shown that a value of 0.01 is suitable for most applications: If not, the value
can be increased to 0.02.

Contour accuracy
The maximum deviation of the contour is specified via the following setting data:
SD42475 $SC_COMPRESS_CONTUR_TOL (maximum contour deviation for compressor)
Compression mode
The manner in which the tolerances from MD33100 and SD42475 are to be considered is
set via the units position in the machine data:
MD20482 $MC_COMPRESSOR_MODE (mode of compression)

Value The tolerance for geometry axes is determined by:


xx0/xx2 MD33100
xx1/xx3 SD42475
The tens position in MD20482 is used to set whether or not blocks with value assignments
(e.g. X=100 ...) should be compressed:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 211
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Compressor functions

Value Meaning
x0x/x2x Blocks with value assignments are compressed (default setting).
Notice: This behavior is incompatible with older releases of the software (< SW 6.3)!
x1x/x3x Blocks with value assignments are not compressed.
This behavior is compatible with older releases of the software (< SW 6.3).
The hundreds place in MD20482 is used to set whether or not circular blocks are linearized
and compressed when using COMPCAD:

Value Meaning
0xx Circular blocks are not compressed.
1xx Circular blocks are linearized and compressed by COMPCAD.
Advantage:
The compressor function works with greater precision and generally creates better
surfaces as a result.
Disadvantage:
The compressor function becomes more sensitive to defects in the NC programs. For
reasons of compatibility, it may therefore be necessary to retain setting 0xx.
A more detailed description of MD20482 can be found in:
References:
Function Manual Special Functions; 3 to 5-Axis Transformation (F2),
Chapter: "Compression of the orientation"
Corner limit angle for COMPCAD
A threshold angle can be defined for the compressor function COMPCAD via the following
setting data, starting from which a block transition is interpreted as angle:
SD42470 $SC_CRIT_SPLINE_ANGLE
Values between 10 and 40 degrees are useful. The recommended setting is 36.

Note
The angle serves only as an approximate measure for the corner identification. Owing to
plausibility considerations, the compressor can also classify flatter block transitions as
corners and also eliminate larger angles as outliers.

Corresponding machine data


The following machine data influence the compressor function. They should contain the
following values:

Machine data Recommended value


MD18360 $MN_MM_EXT_PROG_BUFFER_SIZE 100
(FIFO buffer size for processing from external)
MD28520 $MC_MM_MAX_AXISPOLY_PER_BLOCK 3
(maximum number of axis polynomials per block)
MD28530 $MC_MM_PATH_VELO_SEGMENTS 5
(Number of memory elements for limiting the path velocity)

Basic Functions
212 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Compressor functions

Machine data Recommended value


MD28540 $MC_MM_ARCLENGTH_SEGMENTS 10
(number of memory elements for displaying the arc length
function)
MD28070 $MC_MM_NUM_BLOCKS_IN_PREP 60
(number of blocks for block preparation)
MD28060 $MC_MM_IPO_BUFFER_SIZE 100
(number of NC blocks for block preparation)
MD32310 $MA_MAX_ACCEL_OVL_FACTOR[AX1] <Value for G64 operation>
(overload factor for axial jumps in velocity)
MD32310 $MA_MAX_ACCEL_OVL_FACTOR[AX2] <Value for G64 operation>
MD32310 $MA_MAX_ACCEL_OVL_FACTOR[AX3] <Value for G64 operation>
MD20490 $MC_IGNORE_OVL_FACTOR_FOR_ADIS 1
(G641/G642 irrespective of the overload factor).
The new settings are activated with NEW CONF.

Programming
Compressor functions are activated using the modal G commands COMPON, COMPCURV or
COMPCAD.
The rounding function G642 and jerk limitation SOFT can be used to achieve improvements
in surface quality. These commands must be entered at the start of the program:
COMPCAD SOFT G642
The G command COMPOF terminates the compressor function.

References
The programming of the compressor functions is described in:
Programming Manual Work Preparation
The use of the compressor function with active orientation transformation is described in:
Function Manual Special Functions; 3 to 5 axis transformation (F2),
Chapter: "Compression of the orientation"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 213
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Compressor functions

3.5.2 Combine short spline blocks

Function
During the processing of splines short blocks can so occur, that the path velocity for the
interpolation of these spline blocks must be reduced. This is alao the case, when the spline
actually has a long, smooth curve.
The "Combine short spline blocks" function allows you to combine these spline blocks such
that the resulting block length is sufficient and does not reduce the path velocity.

Note
NC block compressor
The NC block compressor (COMPON, COMPCURV or COMPCAD) cannot be employed
while compressing spline blocks since it can only be used to compress linear blocks.

Activation
The function "overview of short spline blocks" can be activated for following cases
independent of each other:
● BSPLINE active
● BSPLINE/ORICURVE active
● CSPLINE active
The activation is done using machine data:
MD20488 $MC_SPLINE_MODE (setting for spline interpolation).

Bit Value Meaning


Function "Combining shorter spline blocks":
0 0 for BSPLINE not active
1 for BSPLINE active
1 0 for BSPLINE/ORICURVE not active
1 for BSPLINE/ORICURVE active
2 0 for CSPLINE not active
1 for CSPLINE active

Basic Functions
214 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Compressor functions

Boundary conditions
● NC-blocks can be combined only if no other details have been programmed except the
axial motions and the feed rate. If, for example, auxiliary functions are programmed,
which must be given to the PLC, then this block cannot be omitted, since it must be active
in the interpolator. This is analogous to the possible compression of G1 blocks with the
compressors COMPON, COMPCURV and COMPCAD.
● The maximum number of blocks, which can be combined into a program part one after
the other, depends on the size of the available memory for blocks in the block processing.
This memory is established by the machine data:
MD28070 $MC_MM_NUM_BLOCKS_IN_PREP (number of blocks for block preparation)

Example
In order to attain a higher path velocity when processing the following program, the"combine
short spline blocks" function is activated for BSPLINE interpolation via MD20488:
MD20488 $MC_SPLINE_MODE, bit 0 = 1

Program code Comment


N10 G1 G64 X0 Y0 Z0 F10000
N20 G91 BSPLINE ; BSPLINE-interpolation with a combination of
short spline blocks is effective from here.
N30 X0.001 Y0.001 Z0.001
N40 X0.001 Y0.001 Z0.001
N50 X0.001 Y0.001 Z0.001
N60 X0.001 Y0.001 Z0.001
N70 X0.001 Y0.001 Z0.001
N80 X0.001 Y0.001 Z0.001
...
N1000 M30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 215
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Contour/Orientation tolerance

3.6 Contour/Orientation tolerance

Parameter assignment for the contour/orientation tolerance


The maximum permissible contour deviation (contour tolerance) and the maximum
permissible angular deviation for the tool orientation (orientation tolerance) are defined in the
machine data for every axis:
MD33100 $MA_COMPRESS_POS_TOL (maximum tolerance with compression)
The value set is valid both for the compressor functions and for the rounding functions with
the exception of G641 (in this case, the distance to the block transition programmed with
ADIS/ADISPOS applies).
Tolerance values from the following setting data may also be effective instead of MD33100:
SD42475 $SC_SMOOTH_CONTUR_TOL (maximum contour deviation)
SD42466 $SC_SMOOTH_ORI_TOL (maximum angular deviation of the tool orientation)
The manner in which the tolerance values from MD33100 and from the SD42645 and
SD42466 setting data are to be taken into consideration is set as follows:
● For the rounding functions - via the decimal places in the machine data:
MD20480 $MC_SMOOTHING_MODE (rounding behavior with G64x)
● For the compressor functions - via the ones position in the machine data:
MD20482 $MC_COMPRESSOR_MODE (mode of compression)
Further machine and setting data which are of relevance in contour and orientation tolerance
settings are:
● MD33120 $MA_PATH_TRANS_POS_TOL (max. deviation when rounding with G645)
The value from MD33120 is effective when rounding block transitions with uniform
tangents and non-uniform curvature (e.g. circle/straight line transition) with G645.
● SD42676 $SC_ORI_SMOOTH_TOL
This setting data determines the tolerance when rounding the surface with OST.
● SD42678 $SC_ORISON_TOL
This setting data determines the tolerance when smoothing the orientation with ORISON.

Basic Functions
216 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Contour/Orientation tolerance

Programming the contour/orientation tolerance


The machine and setting data described here take effect when the program is started and
determine the tolerances for all compressor functions, the rounding functions G642, G643,
G645, OST, and the ORISON orientation smoothing.
However, the NC program can overwrite these configured tolerances. The NC programmer
has the following commands at his/her disposal for this purpose:

Command Syntax Meaning


CTOL CTOL=<value> Contour tolerance
OTOL OTOL=<value> Orientation tolerance
ATOL[<axis>] ATOL[<axis>]=<value> Axis-specific tolerance
CTOL and OTOL have priority over ATOL.
Programming does not trigger a preprocessing stop. If possible, it does not interrupt NC
block compression either.
The programmed values are valid until they are reprogrammed or deleted by being written
with a negative value. They are also deleted at the end of a program, in the event of a
channel reset, a mode group reset, an NCK reset (warm restart), and POWER ON (cold
restart). On deletion of these values, the values from the machine and setting data are
restored.
New values can be programmed and become effective in any block.

Note
The programmed tolerance also acts upon functions which are only implicitly dependent
upon the tolerance. These are currently:
• Limiting the chord error in the setpoint value calculation
• The basic functions of the free-form surface mode

Note
The following rounding functions are not affected by the programming of CTOL, OTOL, and
ATOL:
• rounding orientation with OSD
Reason: OSD does not use a tolerance, it uses a distance from the block transition.
• Rounding with G644
Reason: G644 is not used for processing, it is used for optimizing tool changes and other
movements in air.
• Rounding block transitions with uniform tangents and non-uniform curvature with G645
G645 virtually always behaves like G642 and, thus, uses the programmed tolerances.
The tolerance value from machine data MD33120 $MA_PATH_TRANS_POS_TOL is only
used in uniformly tangential block transitions with a jump in curvature, e.g. a tangential
circle/straight line transition. The rounding path at these points may also be located
outside the programmed contour, where many applications are less tolerant.
Furthermore, it generally takes a small, fixed tolerance to compensate for the sort of
changes in curvature which need not concern the NC programmer.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 217
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Contour/Orientation tolerance

Read tolerance values


For more advanced applications or for diagnostics, the currently valid tolerances for the
compressor functions (COMPON, COMPCURV, COMPCAD), the smoothing types G642,
G643, G645, OST, and the orientation smoothing ORISON can be read via system variables
irrespective of how they might have come about.
● For the display in the user interface, in synchronized actions or with a preprocessing stop
in the part program via the system variables:

$AC_CTOL Contour tolerance effective when the current main


run record was preprocessed.
If no contour tolerance is effective, $AC_CTOL will
return the root from the sum of the squares of the
tolerances of the geometry axes.
$AC_OTOL Orientation tolerance effective when the current main
run record was preprocessed.
If no orientation tolerance is effective, $AC_OTOL
will return the root from the sum of the squares of the
tolerances of the orientation axes during active
orientation transformation. Otherwise, it will return
the value "-1".
$AA_ATOL[<axis>] Axis tolerance effective when the current main run
record was preprocessed.
If no contour tolerance is active,
$AA_ATOL[<geometry axis>] returns the contour
tolerance divided by the root of the number of
geometry axes.
If an orientation tolerance and an orientation
transformation are active $AA_ATOL[<orientation
axis>] will return the orientation tolerance divided by
the root of the number of orientation axes.

Note
If no tolerance values have been programmed, the $A variables will not be differentiated
sufficiently to distinguish potential differences in the tolerances of the individual functions,
since they can only declare one value.
Circumstances like this can occur if the machine data and the setting data set different
tolerances for compressor functions, smoothing and orientation smoothing. The variables
then return the greatest value prevailing with regard to the currently active functions.
if, for example, a compressor function is active with an orientation tolerance of 0.1° and
ORISON orientation smoothing with 1°, the $AC_OTOL variable will return the value "1". If
orientation smoothing is deactivated, only the value "0.1" will remain to be read.

Basic Functions
218 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Contour/Orientation tolerance

● Without preprocessing stop in the part program via system variables:

$P_CTOL Programmed contour tolerance


$P_OTOL Programmed orientation tolerance
$PA_ATOL Programmed axis tolerance

Note
If no tolerance values have been programmed, the $P variables return the value "-1".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 219
Continuous-Path Mode, Exact Stop, LookAhead (B1)
RESET response

3.7 RESET response

MD20150
The channel-specific initial state is activated via a RESET for G function groups:
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)
The following G function groups are of relevance to "continuous-path mode, exact stop,
LookAhead":
● Group 10: Exact stop - continuous-path mode
● Group 12: Block-change criterion for exact stop
● Group 21: Acceleration profile
● Group 30: NC block compression
● Group 59: Dynamic response mode for path interpolation

References
For detailed information about setting initial states, see the section titled "Mode Group,
Channel, Program Operation, Reset Behavior (K1)."

Basic Functions
220 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Supplementary conditions

3.8 Supplementary conditions

3.8.1 Block change and positioning axes


If path axes are traversed in continuous path mode in a part program, traversing positioning
axes can also simultaneously affect both the response of the path axes and the block
change.
A detailed description of the positioning axes can be found in:
References:
Function Manual, Extended Functions; Positioning axes (P2)

3.8.2 Block change delay


Even if all path axes and special axes traversing in the part program block have satisfied
their specific block transition criteria, the block change can still be delayed due to other
unsatisfied conditions and/or active functions:
Examples:
● Missing auxiliary function acknowledgement by the PLC
● Non-existent following blocks
● Active function "Empty buffer"
Effects
If a block change cannot be executed in continuous path mode, all axes programmed in this
part program block (except cross-block traversing special axes) are stopped. In this case,
contour errors do not occur.
The stopping of path axes during machining can cause undercuts on the workpiece surface.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 221
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Supplementary conditions

3.8.3 Rounding and repositioning (REPOS)

Repositioning within the rounding area


If the traversing motion of the path axes within the rounding area is interrupted for traversing
blocks with programmed rounding (part program command G641, G642, G643, G644 or
G645), repositioning occurs as follows in the event of a subsequent REPOS operation,
depending on the current REPOS mode:

REPOS mode REPOS end point


RMB Block start of interrupted traversing block
RMI Block end of interrupted traversing block
RME Block end of interrupted traversing block
RMN Block end of interrupted traversing block

Example
Two traversing blocks N10 and N20 with programmed rounding G641. In the rounding area,
the traversing motion is interrupted and the axes are subsequently traversed, e.g. manually
to the REPOS starting point. Repositioning on the contour takes place differently, depending
on the active REPOS mode.

5(326VWDUWLQJSRLQW

5(326PRGH50% 5(326PRGH
50,50(501
,QWHUUXSWLRQSRLQW

1

<
3URJUDPPHGWUDYHUVLQJ
GLUHFWLRQ
%OHQGLQJDUHD
1

Figure 3-13 Example of rounding and repositioning

Basic Functions
222 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Data lists

3.9 Data lists

3.9.1 Machine data

3.9.1.1 General machine data

Number Identifier: $MN_ Description


10110 PLC_CYCLE_TIME_AVERAGE Maximum PLC acknowledgment time
10680 MIN_CONTOUR_SAMPLING_TIME Minimum contour sampling time
10682 CONTOUR_SAMPLING_FACTOR Contour sampling factor
10712 NC_USER_CODE_CONF_NAME_TAB List of reconfigured NC commands
12030 OVR_FACTOR_FEEDRATE[30] Dynamic response reserve for overshooting the path
feed (in the case of a gray-coded feed-override
switch)
12100 OVR_FACTOR_LIMIT_BIN Dynamic response reserve for overshooting the path
feed (in the case of a binary-coded feed-override
switch)
18360 MM_EXT_PROG_BUFFER_SIZE FIFO buffer size for processing from external

3.9.1.2 Channel-specific machine data

Number Identifier: $MC_ Description


20150 GCODE_RESET_VALUES Reset position for the G function groups
20170 COMPRESS_BLOCK_PATH_LIMIT Maximum traversing length of NC block for
compression
20172 COMPRESS_VELO_TOL Maximum permissible deviation from path feed for
compression
20400 LOOKAH_USE_VELO_NEXT_BLOCK LookAhead to following block velocity
20430 LOOKAH_NUM_OVR_POINTS Number of override switch points for LookAhead
20440 LOOKAH_OVR_POINTS Override switch points for LookAhead
20443 LOOKAH_FFORM Activation of the "Free-form surface mode: Extension
function"
20450 LOOKAH_RELIEVE_BLOCK_CYCLE Relief factor for the block cycle time
20460 LOOKAH_SMOOTH_FACTOR Smoothing factor for LookAhead
20462 LOOKAH_SMOOTH_WITH_FEED Smoothing takes feedrate into account
20465 ADAPT_PATH_DYNAMIC Adaptation of path dynamic response
20480 SMOOTHING_MODE Rounding behavior with G64x
20488 SPLINE_MODE Setting for spline interpolation
20490 IGNORE_OVL_FACTOR_FOR_ADIS G641/G642 independent of the overload factor
20550 EXACT_POS_MODE Exact-stop conditions with G0/G1

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 223
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Data lists

Number Identifier: $MC_ Description


20600 MAX_PATH_JERK Path-dependent maximum jerk
20602 CURV_EFFECT_ON_PATH_ACCEL Influence of path curvature on path dynamic response
20603 CURV_EFFECT_ON_PATH_JERK Influence of path curvature on path jerk
20606 PREPDYN_SMOOTHING_ON Activation of the "Free-form surface mode: Basic
functions"
28060 MM_IPO_BUFFER_SIZE Number of NC blocks in IPO buffer (DRAM)
28070 MM_NUM_BLOCKS_IN_PREP Number of NC blocks for block preparation (DRAM)
28520 MM_MAX_AXISPOLY_PER_BLOCK Maximum number of axis polynomials per block
28530 MM_PATH_VELO_SEGMENTS Number of storage elements for limiting path velocity
in block
28533 MM_LOOKAH_FFORM_UNITS Memory for the "Free-form surface mode: Extension
function"
28540 MM_ARCLENGTH_SEGMENTS Number of storage elements for arc length function
representation per block
28610 MM_PREPDYN_BLOCKS Number of blocks for velocity preparation

3.9.1.3 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


32310 MAX_ACCEL_OVL_FACTOR Overload factor for axial velocity jumps
32431 MAX_AX_JERK Maximum axial jerk when traversing along the path
32432 PATH_TRANS_JERK_LIM Maximum axial jerk at the block transition in
continuous-path mode
32433 SOFT_ACCEL_FACTOR Scaling of acceleration limitation for SOFT
32434 G00_ACCEL_FACTOR Scaling of acceleration limitation for G0
32435 G00_JERK_FACTOR Scaling of axial jerk limiting for G0
32440 LOOKAH_FREQUENCY Smoothing limit frequency for LookAhead
33100 COMPRESS_POS_TOL Maximum deviation with compensation
33120 PATH_TRANS_POS_TOL Maximum deviation when rounding with G645
35240 ACCEL_TYPE_DRIVE DRIVE acceleration characteristic for axes on/off
36000 STOP_LIMIT_COARSE Exact stop coarse
36010 STOP_LIMIT_FINE Exact stop fine
36012 STOP_LIMIT_FACTOR Exact stop coarse/fine factor and zero speed
monitoring
36020 POSITIONING_TIME Delay time exact stop fine

Basic Functions
224 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Data lists

3.9.2 Setting data

3.9.2.1 Channel-specific setting data

Number Identifier: $SC_ Description


42465 SMOOTH_CONTUR_TOL Max. contour deviation during rounding
42466 SMOOTH_ORI_TOL Max. deviation of the tool orientation during rounding
42470 CRIT_SPLINE_ANGLE Limit angle for spline and polynomial interpolation and
compressor
42475 COMPRESS_CONTUR_TOL Maximum contour deviation in the compressor

3.9.3 Signals

3.9.3.1 Signals from channel

DB number Byte.Bit Description


21, ... 36.3 All axes stationary

3.9.3.2 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 60.6 Position reached with exact stop coarse
31, ... 60.7 Position reached with exact stop fine

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 225
Continuous-Path Mode, Exact Stop, LookAhead (B1)
Data lists

Basic Functions
226 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2) 4
4.1 Brief description

4.1.1 General

Scope of functions
The Description of Functions covers the following sub-functions:
● Acceleration
● Jerk
● Knee-shaped acceleration characteristic
Acceleration and jerk
The effective acceleration and jerk can be optimally matched to the machine and machining
situation concerned using axis- and channel-specific programmable maximum values,
programmable acceleration profiles in part programs and synchronized actions, and dynamic
adaptations and limitations.
Knee-shaped acceleration characteristic
The knee-shaped acceleration characteristic means that, in the case of machine axes
featuring a motor (in particular stepper motors) with a torque characteristic that is highly
dependent upon speed, acceleration can be set at the level required to ensure optimum
utilization of the motor whilst at the same time protecting it against overload.

4.1.2 Features

Acceleration
Axis-specific functions:
● Programmable maximum acceleration value
● Acceleration profile that can be selected via part-program instruction:
Acceleration without jerk limitation (BRISKA)
● Setting of maximum value using part-program instruction (ACC)
● Specific maximum value for programmed rapid traverse (G00).
● Specific maximum value for traverse with active jerk limitation
● Excessive acceleration for non-tangential block transitions

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 227
Acceleration (B2)
Brief description

Channel-specific functions:
● Acceleration profile that can be selected via part-program instruction:
Acceleration without jerk limitation (BRISK)
● Programmable constant travel time for the purpose of avoiding extreme sudden
acceleration
● Programmable acceleration margin for overlaid traversing
● Adjustable acceleration limitation
● Adjustable acceleration for specific real-time events
● Programmable acceleration margin for radial acceleration

Jerk
Axis-specific functions:
● Acceleration profile that can be selected via part-program instruction:
Acceleration with jerk limitation (SOFTA)
● Programmable maximum jerk value for single-axis interpolation
● Programmable maximum jerk value for path interpolation
Channel-specific functions:
● Acceleration profile that can be selected via part-program instruction:
Acceleration with jerk limitation (SOFT)
● Adjustable jerk limitation
● Adjustable path jerk for specific real-time events
● Specific maximum value for programmed rapid traverse (G00)
● Excessive jerk for block transitions without constant curvature

Knee-shaped acceleration characteristic


A knee-shaped acceleration characteristic is parameterized using the following characteristic
data:
● Maximum velocity vmax
● Maximum acceleration amax
● Creep velocity vred
● Creep acceleration ared
● Nature of the acceleration reduction (constant, hyperbolic, linear)

Basic Functions
228 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2 Functions

4.2.1 Acceleration without jerk limitation (BRISK/BRISKA) (channel-/axis-specific)

4.2.1.1 General information

General information
In the case of acceleration without jerk limitation (jerk = infinite) the maximum value is
applied for acceleration immediately. As regards acceleration with jerk limitation, it differs in
the following respects:
● Advantages
Shorter processing times with the same maximum values for velocity and acceleration.
● Disadvantages
Increased load on the machine's mechanical components and risk of inducing high-
frequency and difficult-to-control mechanical vibrations.

Acceleration profile

D
DPD[

DPD[

YPD[

W W W W

amax: Maximum acceleration value


vmax: Maximum velocity value
t: Time
Figure 4-1 Velocity and acceleration schematic for stepped acceleration profile

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 229
Acceleration (B2)
Functions

The following features of the acceleration profile can be identified from the figure above:
● Time: t0
Sudden acceleration from 0 to +amax
● Interval: t0 - t1
Constant acceleration with +amax; linear increase in velocity
● Time: t1
Sudden acceleration from 2 * amax with immediate switchover from acceleration to braking

Note
The sudden acceleration can normally be avoided by specifying a constant velocity time
(see Section: "Sudden acceleration with constant velocity phase").

● Interval: t1 - t2
Constant acceleration with -amax; linear decrease in velocity

4.2.1.2 Programmable maximum value (axis-specific)

Function
The maximum acceleration value can be set for each specific machine axis:
MD32300 $MA_MAX_AX_ACCEL (maximum axis acceleration)
The path parameters are calculated by the path planning component during preprocessing
so that the programmed maximum values of the machine axes that are of relevance for the
path are not exceeded.

Exceeding of maximum value


It is possible for the maximum value to be exceeded in connection with specific machining
situations (see Section: Acceleration matching (ACC) and System variable
($AC_PATHACC)).

4.2.1.3 Parameterization

Programming
The maximum values are parameterized for specific axes using machine data:
MD32300 $MA_MAX_AX_ACCEL (maximum axis acceleration)

Basic Functions
230 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2.1.4 Programming

Path acceleration without jerk limitation (BRISK)

Syntax
BRISK

Functionality
The BRISK part-program instruction is used to select the "without jerk limitation" acceleration
profile for the purpose of path acceleration.
G group: 21
Effective: Modal

Reset response
The channel-specific initial setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]

Supplementary conditions
If the acceleration profile is changed in a part program during machining (BRISK/SOFT) an
exact stop is performed at the end of the block.

Single-axis acceleration without jerk limitation (BRISKA)

Syntax
BRISKA (axis{,axis})

Function
The BRISKA part-program instruction is used to select the "without jerk limitation"
acceleration profile for single-axis movements (JOG, JOG/INC, positioning axis,
reciprocating axis, etc.).
G group: -
Effective: Modal
Axis:
● Value range: Axis identifier for channel axes

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 231
Acceleration (B2)
Functions

Axis-specific initial setting


Acceleration without jerk limitation can be set as the axis-specific initial setting for single-axis
movements:
MD32420 $MA_JOG_AND_POS_JERK_ENABLE = FALSE

Reset response
The axis-specific initial setting is activated via a reset:
MD32420 $MA_JOG_AND_POS_ENABLE

4.2.2 Constant travel time (channel-specific)

4.2.2.1 General information

Overview
In the case of acceleration without jerk limitation, sudden acceleration of 2 * amax occurs on
switchover between acceleration and braking. In order to avoid this sudden acceleration, a
channel-specific constant travel time can be programmed. The constant travel time defines
the time taken to traverse between the acceleration and braking phases at constant velocity:
MD20500 $MC_CONST_VELO_MIN_TIME (minimum time with constant velocity)

Note
The constant travel time is ineffective:
• Active function: Look Ahead
• In traversing blocks with a travel time that is less or equal to the interpolation cycle time.

Basic Functions
232 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

D

DPD[


DPD[

Y
YPD[

W W W W W W W

1: Characteristic with constant travel time


2: Characteristic without constant travel time
amax: Maximum acceleration value
vmax: Maximum velocity value
t: Time
Figure 4-2 Schematic for abrupt acceleration

The effect of the constant travel time can be seen from the figure above:
● Time: t1
End of acceleration phase with sudden acceleration 1 * amax
● Interval: t1 - t2
Acceleration 0; constant velocity using the parameterized constant travel time
● Time: t2
Start of braking phase with sudden acceleration 1 * amax
The times t0, t1' and t2' indicate the characteristic that would have been produced had no
constant travel time been defined.

4.2.2.2 Parameterization

Function
The constant travel time is parameterized for specific channels using machine data:
MD20500 $MC_CONST_VELO_MIN_TIME
(minimum time with constant velocity)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 233
Acceleration (B2)
Functions

4.2.3 Acceleration matching (ACC) (axis-specific)

4.2.3.1 General information

Function
A part-program instruction (ACC) can be used to match the acceleration of specific axes to
the current machining situation. The range used for this purpose is anywhere between
greater than 0% and less than or equal to 200% of the maximum value programmed in the
machine data.

Effective

Effective Acceleration matching is effective for all types of interpolation in AUTOMATIC and
MDA operating modes as well as with dry-run feed.
Ineffective Acceleration matching is ineffective in JOG and JOG/REF (reference point
approach) operating modes.
Acceleration matching is also ineffective if the machine axes have been brought to a
standstill via a quick stop due to the detection of a fault (setpoint = 0).

4.2.3.2 Programming

Syntax
ACC[axis] = adjustment factor

Functionality
The ACC part-program instruction is used to adjust the maximum acceleration value of a
machine axis.
Axis:
● Value range: Axis identifier for the channel's machine axes
Adjustment factor:
● Value range: 0 < adjustment factor ≤ 200
● Unit: Per cent
Deactivate: ACC[axis] = 100
Effective: Modal

Reset response
The behavior during channel RESET or M30 can be controlled via MD32320
$MA_DYN_LIMIT_RESET_MASK:
Bit 0: 0 The programmed ACC value is reduced to 100 % with channel RESET/M30.
Bit 0: 1 The programmed ACC value is retained beyond channel RESET/M30.

Basic Functions
234 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2.4 Acceleration margin (channel-specific)

4.2.4.1 General information

General information
Under normal circumstances, preprocessing makes maximum use of the parameterized
maximum values of the machine axes for the purpose of path acceleration. In order that an
acceleration margin may be set aside for overlaid movements, e.g. within the context of the
"Rapid lift away from the contour" function, path acceleration can be reduced by a
programmable factor. When, for example, a factor of 0.2 is applied, preprocessing will only
use 80% of the maximum possible path acceleration. 20% is set aside as an acceleration
margin for overlaid movements.

4.2.4.2 Parameterization

Parameterization
Parameters for the acceleration margin are assigned for each channel by means of machine
datum:
MD20610 $MC_ADD_MOVE_ACCEL_RESERVE
(acceleration margin for overlaid motions)

4.2.5 Path-acceleration limitation (channel-specific)

4.2.5.1 General information

General information
To enable a flexible response to the machining situations concerned, setting data can be
used to limit the path acceleration calculated during preprocessing for specific channels:
SD42500 $SC_SD_MAX_PATH_ACCEL (maximum path acceleration)
The value specified in the setting data is only taken into account if it is smaller than the path
acceleration calculated during preprocessing.
The limitation must be activated for specific channels using setting data:
SD42502 $SC_IS_SD_MAX_PATH_ACCEL = TRUE

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 235
Acceleration (B2)
Functions

4.2.5.2 Parameterization

Parameterization
Parameterization is carried out for specific channels using setting data:
SD42500 $SC_SD_MAX_PATH_ACCEL (maximum path acceleration)
SD42502 $SC_IS_SD_MAX_PATH_ACCEL (activation of path-acceleration limitation)

4.2.5.3 Programming

Limit value

Syntax
$SC_SD_MAX_PATH_ACCEL = limit value

Functionality
The path-acceleration limitation can be adjusted for the situation by programming the setting
data.
Limit value:
● Value range: ≥ 0
● Unit: m/s2
Application:
● Part program
● Static synchronized action

Switch ON/OFF

Syntax
$SC_IS_SD_MAX_PATH_ACCEL = value

Basic Functions
236 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

Functionality
The path-acceleration limitation can be activated/deactivated by programming the setting
data.
Parameter: Value
● Value range: TRUE, FALSE
Application:
● Part program
● Static synchronized action

4.2.6 Path acceleration for real-time events (channel-specific)

4.2.6.1 General information

General information
So that no compromise has to be made between machining-optimized acceleration on the
one hand and time-optimized acceleration in connection with the following real-time events
on the other:
● NC-STOP/NC-START
● Feedrate override modifications
● Modification of the velocity default for "safely reduced velocity" within the context of the
"Safely Integrated" function
the path acceleration can be set for the real-time events specified above using a channel-
specific system variable:
$AC_PATHACC = path acceleration
Real-time event acceleration will only be active for the duration of the change in velocity in
respect of one of the real-time events specified above.

Limitation
If the specified path acceleration exceeds the capabilities of the machine axes that are of
relevance for the path, a limit will be imposed on the path acceleration within the control so
that the resulting axial acceleration (ares) is restricted to less than 2x the parameterized
maximum axial value (amax).
ares = 2 * amax, with amax = MD32300 $MA_MAX_AX_ACCEL

Note
Real-time-event path acceleration is enabled, irrespective of the radial acceleration.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 237
Acceleration (B2)
Functions

Effective

Effective Real-time event acceleration is only enabled in AUTOMATIC and MDA operating
modes in conjunction with the following real-time events:
• NC-STOP/NC-START
• Override modifications
• Modification of the velocity default for "safely reduced velocity" within the context
of the "Safely Integrated" function
Ineffective Path acceleration for real-time events is ineffective for changes in path velocity that
are attributable to path planning during preprocessing for the channel, such as
contour curvatures, corners, kinematic transformation limitations, etc.
Real-time-event path acceleration is ineffective if the programmed value is smaller
than the path acceleration calculated during preprocessing for the path section
concerned.

Programming
For information about programming system variables in the part program or synchronized
actions, see Chapter: Programming.

4.2.6.2 Programming

Syntax
$AC_PATHACC = path acceleration

Functionality
Real-time-event path acceleration is set via the channel-specific system variables.
Parameter: Path acceleration
● Value range: Path acceleration ≥ 0
● Unit: m/s2
Deactivation: $AC_PATHACC = 0
Application:
● Part program
● Static synchronized action

Reset response
Real-time-event path acceleration is deactivated on reset.

Supplementary conditions
Programming $AC_PATHACC in the part program automatically triggers a preprocessing
stop with REORG (STOPRE).

Basic Functions
238 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2.7 Acceleration with programmed rapid traverse (G00) (axis-specific)

4.2.7.1 General information

Frequently, the acceleration for the machine axes involved in the machining process must be
set lower than the machine's performance capability officially allows because of the
supplementary conditions associated with the specific process concerned.
For time-optimized traversing of the machine axes with programmed rapid traverse (part-
program instruction G00), a specific maximum value can be programmed for the axis-specific
acceleration.

JOG setup mode


This function does not affect acceleration in respect of a rapid traverse override in JOG
setup mode.

4.2.7.2 Parameterization

The maximum value for axis-specific acceleration with programmed rapid traverse is
parameterized (G00) using the axis-specific machine data:
MD32434 $MA_G00_ACCEL_FACTOR
(scaling of the acceleration limitation with G00)
This is used to generate the maximum value for axis-specific acceleration with programmed
rapid traverse (G00) that is taken into account by the path planning component during
preprocessing:

Acceleration[axis] =
MD32300 $MA_MAX_AX_ACCEL * MD32434 $MA_G00_ACCEL_FACTOR

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 239
Acceleration (B2)
Functions

4.2.8 Acceleration with active jerk limitation (SOFT/SOFTA) (axis-specific)

4.2.8.1 General information

Function
Compared with acceleration without jerk limitation, acceleration with jerk limitation results in
a certain degree of time loss, even when the same maximum acceleration value is used. To
compensate for this time loss, a specific maximum value can be programmed for the axis-
specific acceleration as far as traversing of the machine axes with active jerk limitation
(SOFT/SOFTA) is concerned.
The maximum value for acceleration with active jerk limitation is parameterized using a
factor calculated in relation to the axis-specific maximum value. This is used to generate the
maximum value for axis-specific acceleration with active jerk limitation that is taken into
account by the path planning component during preprocessing:

Acceleration[axis] =
MD32300 $MA_MAX_AX_ACCEL * MD32433 $MA_SOFT_ACCEL_FACTOR

4.2.8.2 Parameterization

Function
The maximum value for acceleration with active jerk limitation (SOFT/SOFTA) is
parameterized using the axis-specific machine data:
MD32434 $MA_SOFT_ACCEL_FACTOR
(scaling of the acceleration limitation with SOFT)

4.2.9 Excessive acceleration for non-tangential block transitions (axis-specific)

4.2.9.1 General information

Function
In the case of non-tangential block transitions (corners), the programmable controller may
have to decelerate the geometry axes significantly in order to ensure compliance with the
parameterized axis dynamics. For the purpose of reducing/avoiding deceleration in
connection with non-tangential block transitions, a higher level of axis-specific acceleration
can be enabled.
Excessive acceleration is parameterized using a factor calculated in relation to the axis-
specific maximum value. This is used to generate the maximum value for axis-specific
acceleration with non-tangential block transitions that is taken into account by the path
planning component during preprocessing:

Basic Functions
240 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

Acceleration[axis] =
MD32300 $MA_MAX_AX_ACCEL * MD32310 $MA_MAX_ACCEL_OVL_FACTOR

4.2.9.2 Parameterization

Function
Excessive acceleration for non-tangential block transitions is parameterized using the axis-
specific machine data:
MD32310 $MA_MAX_ACCEL_OVL_FACTOR
(overload factor for velocity jumps)

4.2.10 Acceleration margin for radial acceleration (channel-specific)

4.2.10.1 General information

Overview
In addition to the path acceleration (tangential acceleration), radial acceleration also has an
effect on curved contours. If this is not taken into account during parameterization of the path
parameters, the effective axial acceleration during acceleration and deceleration on the
curved contour can, for a short time, reach 2x the maximum value.

Effective axial acceleration =


Path acceleration + radial acceleration =
2 * ( MD32300 $MA_MAX_AX_ACCEL )

1
1

DSDWK

DUDGLDO

1

Figure 4-3 Radial and path acceleration on curved contours

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 241
Acceleration (B2)
Functions

The channel-specific machine data:


MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL
(influence of path curvature on dynamic path response)
can be used to set the proportion of the axis-specific acceleration that is to be taken into
account for radial acceleration.
When, for example, a value of 0.75 is applied, 75% of the axis-specific acceleration will be
made available for radial acceleration and 25% for path acceleration.
The corresponding maximum values are generally calculated as follows:

Radial acceleration =
MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL * MD32300 $MA_MAX_AX_ACCEL

Path acceleration =
(1 - MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL) * MD32300
$MA_MAX_AX_ACCEL

Example
The following machine parameters apply:
● MD32300 $MA_MAX_AX_ACCEL for all geometry axes: 3 m/s
● Maximum path velocity with a path radius of 10 mm due to mechanical constraints of the
machine: 5 m/min.
The radial acceleration is calculated as follows:

Y SDWK >PPLQ@ 
D UDGLDO  PV
U>PP@ >PV @  

The acceleration margin is set as follows:

0'0&B&859B())(&7B21B3$7+B$&&(/ 

D UDGLDO >PV @ 


ป 
0'0$B0$;B$;B$&&(/ >PV  @ 

Linear motions
The acceleration margin referred to above is ineffective in the case of linear motions (linear
interpolation) without active kinematic transformation.

Basic Functions
242 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2.10.2 Parameterization

Function
The proportion of maximum available axis acceleration to be taken into account as an
acceleration margin for radial acceleration on curved contours is parameterized using the
channel-specific machine data:
MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL
(influence of path curvature on dynamic path response)

4.2.11 Jerk limitation with path interpolation (SOFT) (channel-specific)

4.2.11.1 General information

Overview
As far as the functionality described in the rest of this document is concerned, constant
acceleration, i.e. acceleration with jerk limitation (jerk = infinite value), is the assumed
acceleration profile. In the case of acceleration with jerk limitation, linear interpolation is
applied in respect of acceleration from 0 to the maximum value.

Advantages
Minimal load on the machine's mechanical components and low risk of high-frequency and
difficult-to-control mechanical vibrations thanks to constant excessive acceleration.

Disadvantages
Longer machining times compared with stepped acceleration profile when the same
maximum velocity and acceleration values are used.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 243
Acceleration (B2)
Functions

Acceleration profile

U
UPD[

UPD[

D
DPD[

DPD[
Y
YPD[

W W W W W W W W

rmax: Maximum jerk value


amax: Maximum acceleration value
vmax: Maximum velocity value
t: Time
Figure 4-4 Jerk, acceleration and velocity schematic with jerk limitation acceleration profile

The following features of the acceleration profile can be identified from the figure above:
● Interval: t0 - t1
Constant jerk with +rmax; linear increase in acceleration; quadratic increase in velocity
● Interval: t1 - t2
Constant acceleration with +amax; linear increase in velocity
● Interval: t2 - t3
Constant jerk with -rmax; linear decrease in acceleration; quadratic decrease in excessive
velocity until maximum value +vmax is reached
● Interval: t3 - t4
Constant jerk with +rmax; linear increase in braking acceleration; quadratic decrease in
velocity

Basic Functions
244 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

● Interval: t4 - t5
Constant braking acceleration with -amax; linear decrease in velocity
● Interval: t5 - t6
Constant jerk with -rmax; linear decrease in braking acceleration; quadratic decrease in
velocity reduction until zero velocity is reached v = 0

4.2.11.2 Maximum jerk value (axis-specific)

Function
The maximum jerk value can be set for each specific machine axis using the following
machine data:
MD32431 $MA_MAX_AX_JERK (maximum axis jerk)
The path parameters are calculated by the path planning component during preprocessing
so that the programmed maximum values of the machine axes that are of relevance for the
path are not exceeded.

Exceeding of maximum value


It is possible for the maximum value to be exceeded in connection with specific machining
situations (see following Section: System variable ($AC_PATHJERK)).

4.2.11.3 Maximum jerk value (channel-specific)

Function
As well as it being possible to set the maximum jerk value for specific axes, it can also be
assigned as a channel-specific path parameter using the following machine data:
MD20600 $MC_MAX_PATH_JERK (path-related maximum jerk)
To prevent the axis and channel-specific maximum jerk values interfering with one another,
the channel-specific value must be set to a value greater then the maximum axial values.

4.2.11.4 Parameterization

Function
The axis- and channel-specific maximum values are parameterized using the following
machine data:
MD32431 $MA_MAX_AX_JERK (maximum axis jerk)
MD20600 $MC_MAX_PATH_JERK (path-related maximum jerk)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 245
Acceleration (B2)
Functions

4.2.11.5 Programming

Syntax
SOFT

Functionality
The SOFT part-program instruction is used to select the acceleration profile with jerk
limitation for the traversing operations of geometry axes in the channel.
G group: 21
Effective: Modal

Reset response
The channel-specific initial setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]

Supplementary conditions
If the acceleration mode is changed in a part program during machining (BRISK ↔ SOFT), a
block change is performed at the point of transition with an exact stop at the end of the block,
even in continuous-path mode.

4.2.12 Jerk limitation with single-axis interpolation (SOFTA) (axis-specific)

4.2.12.1 General information

Overview
The maximum jerk value can be set for each specific machine axis for single-axis
movements (setup modes e.g. JOG, JOG/INC, positioning axis, reciprocating axis, etc.):
MD32430 $MA_JOG_AND_POS_MAX_JERK (maximum axis jerk)

Initial setting
Acceleration with jerk limitation can be set as the axial initial setting:
MD32420 $MA_JOG_AND_POS_JERK_ENABLE
(initial setting of axial jerk limitation)

Basic Functions
246 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2.12.2 Parameterization

Function
The function's initial setting and the maximum values are parameterized for specific axes
using machine data:
MD32420 $MA_JOG_AND_POS_JERK_ENABLE
(initial setting of axial jerk limitation)
MD32430 $MA_JOG_AND_POS_MAX_JERK (maximum axis jerk)

4.2.12.3 Programming

Syntax
SOFTA (Axis {Axis})

Functionality
The SOFTA part-program instruction is used to select acceleration with jerk limitation for
single-axis movements (positioning axis, reciprocating axis, etc.)
G group: -
Effective: modal
Axis:
● Value range: Axis identifier for channel axes

Axis-specific initial setting


Acceleration with jerk limitation can be set as the axis-specific initial setting for single-axis
movements:
MD32420 $MA_JOG_AND_POS_JERK_ENABLE = TRUE

Reset response
The axis-specific initial setting is activated via a reset:
MD32420 $MA_JOG_AND_POS_ENABLE

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 247
Acceleration (B2)
Functions

4.2.13 Path-jerk limitation (channel-specific)

4.2.13.1 General information

Overview
To enable a flexible response to the machining situations concerned, setting data can be
used to limit the path jerk calculated during preprocessing for specific channels:
SD42510 $SC_SD_MAX_PATH_JERK (maximum path jerk)
The value specified in the setting data is only taken into account in the channel if it is smaller
than the path jerk calculated during preprocessing.
The limitation must be activated for specific channels using setting data:
SD42512 $SC_IS_SD_MAX_PATH_JERK = TRUE

4.2.13.2 Parameterization

Function
Parameterization is carried out for specific channels using setting data:
SD42510 $SC_SD_MAX_PATH_JERK (maximum path jerk)
SD42512 $SC_IS_SD_MAX_PATH_JERK
(activation of path-jerk limitation)

4.2.13.3 Programming

Maximum path jerk

Syntax
$SC_SD_MAX_PATH_JERK = jerk value

Functionality
The path-jerk limitation can be adjusted for the situation by programming the setting data.
Jerk value:
● Value range: ≥ 0
● Unit: m/s3
Application:
● Part program
● Static synchronized action

Basic Functions
248 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

Switch ON/OFF

Syntax
$SC_IS_SD_MAX_PATH_JERK = value

Functionality
The path-jerk limitation can be activated/deactivated by programming the setting data.
Parameter: Value
● Value range: TRUE, FALSE
Application:
● Part program
● Static synchronized action

4.2.14 Path jerk for real-time events (channel-specific)

4.2.14.1 General information

Overview
So that no compromise has to be made between machining-optimized jerk on the one hand
and time-optimized jerk in connection with the following real-time events on the other:
● NC-STOP/NC-START
● Feedrate override modifications
● Modification of the velocity default for "safely reduced velocity" within the context of the
"Safely Integrated" function
the path jerk can be set for the real-time events specified above using a channel-specific
system variable:
$AC_PATHJERK = path jerk
Path jerk for real-time events will only be active for the duration of the change in velocity in
respect of one of the real-time events specified above.

Limitation
As the jerk is not a physical variable of any relevance to the drive, no limit is imposed on the
jerk set.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 249
Acceleration (B2)
Functions

Effective

Effective Path jerk for real-time events is only enabled in AUTOMATIC and MDA operating
modes in conjunction with the following real-time events:
• NC-STOP/NC-START
• Override modifications
• Modification of the velocity default for "safely reduced velocity" within the context
of the "Safely Integrated" function
Ineffective Path jerk for real-time events is ineffective for changes in the path velocity that are
attributable to path planning during preprocessing for the channel, such as contour
curvatures, corners, kinematic transformation limitations, etc.
Path jerk for real-time events is ineffective if the programmed value is smaller than
the path jerk calculated during preprocessing for the path section concerned.

Programming
For the purpose of setting the jerk for real-time events in accordance with the acceleration,
the system variables can be set as follows:
$AC_PATHJERK = $AC_PATHACC/smoothing time
● $AC_PATHACC: Path acceleration [m/s2]
Smoothing time: Freely selectable, e.g. 0.02 s
For information about programming system variables in the part program or synchronized
actions, see Chapter: Programming.

4.2.14.2 Programming

Syntax
$AC_PATHJERK = path jerk

Functionality
The path jerk for real-time events is set via the channel-specific system variables.
Jerk value:
● Value range: Path jerk ≥ 0
● Unit: m/s3
Application:
● Part program
● Static synchronized action

Basic Functions
250 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

Reset response
The function is deactivated on reset.

Supplementary conditions
Programming $AC_PATHJERK in the part program automatically triggers a preprocessing
stop with REORG (STOPRE).

4.2.15 Jerk with programmed rapid traverse (G00) (axis-specific)

4.2.15.1 General information

Overview
Frequently, the maximum jerk for the machine axes involved in the machining process must
be set lower than the machine's performance capability officially allows because of the
supplementary conditions associated with the specific process concerned.
For time-optimized traversing of the machine axes with programmed rapid traverse (part-
program instruction G00), a specific maximum value can be programmed for the axis-
specific jerk.

JOG setup mode


This function does not affect jerk in respect of a rapid traverse override in JOG setup mode.

4.2.15.2 Parameterization

Function
The maximum value for axis-specific jerk with programmed rapid traverse is parameterized
(G00) using the axis-specific machine data:
MD32434 $MA_G00_ACCEL_FACTOR
(scaling of the acceleration limitation with G00)
This is used to generate the maximum value for axis-specific jerk with programmed rapid
traverse (G00) that is taken into account by the path planning component during
preprocessing:
Jerk[axis] =
MD32431 $MA_MAX_AX_JERK * MD32435 $MA_G00_JERK_FACTOR

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 251
Acceleration (B2)
Functions

4.2.16 Excessive jerk for block transitions without constant curvature (axis-specific)

4.2.16.1 General information

Overview
In the case of block transitions without constant curvature (e.g. straight line > circle), the
programmable controller has to decelerate movement of the geometry axes significantly in
order to ensure compliance with the parameterized axis dynamics. For the purpose of
reducing/avoiding deceleration in connection with block transitions without constant
curvature, a higher level of axis-specific jerk can be enabled.
The excessive jerk is parameterized using a dedicated axis-specific maximum value.

4.2.16.2 Parameterization

Function
The excessive jerk for block transitions without constant curvature is parameterized using
the axis-specific machine data:
MD32432 $MA_PATH_TRANS_JERK_LIM
(excessive jerk for block transitions without constant curvature)

4.2.17 Jerk filter (axis-specific)

4.2.17.1 General information

Overview
In certain application scenarios, e.g. when milling free-form surfaces, it may be beneficial to
smooth the position setpoint characteristics of the machine axes. This enables surface
quality to be improved by reducing the mechanical vibrations generated in the machine.
For the purpose of smoothing the position setpoint characteristic of a machine axis, a jerk
filter can be activated at position controller level, independently of the channel- and axis-
specific jerk limitations taken into account at interpolator level.
The effect of the jerk filter must be as strong as possible without having an unacceptable
impact on contour accuracy. The filter should also have as "balanced" a smoothing effect as
possible, i.e. if the same contour is traversed forwards and backwards, the contour
smoothed by the filter should be as similar as possible in both directions.

Basic Functions
252 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

To enable the jerk filter to be optimally matched to the machine conditions, various filter
modes are available:
● 2nd-order filter (PT2)
● Sliding mean value generation
● Bandstop filter

Mode: 2nd-order filter


Owing to the fact that it is a simple low-pass filter, "2nd-order filter" mode can only meet the
requirements specified above where relatively small filter time constants (around 10 ms) are
concerned. When used in conjunction with larger time constants, impermissible contour
deviations are soon manifest. The effect of the filter is relatively limited.
This filter mode offers advantages if very large filter time constants are needed and contour
accuracy is only of secondary importance (e.g. positioning axes).
For historical reasons, this filter mode is set as the default.

Mode: Sliding mean value generation


Where minimal contour deviations are required, filter time constants within the range of 20-
40 ms can be set using the "sliding mean value generation" filter mode. The smoothing effect
is largely symmetrical.
The display of the calculated servo gain factor (KV factor), e.g. in the HMI Advanced "Axis"
service screen, shows smaller values than would normally be expected for the filter. The
contour accuracy is in fact higher than the displayed KV filter appears to suggest.
When changing from "2nd-order filter" to "sliding mean value generation" filter mode, the
displayed KV factor may, therefore, drop (with identical filter time constant), even though
there is an improvement in contour accuracy.

Mode: Bandstop filter


The bandstop filter is a 2nd-order filter in terms of numerator and denominator:

V  V ' =

 ˭ I=   ˭ I= 
+V
V  V ' 1

 ˭ I1   ˭ I1

where:
fZ: Numerator natural freq.
fN: Denominator natural freq.
DZ: Numerator damping
DN: Denominator damping

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 253
Acceleration (B2)
Functions

Since a vibration-capable filter setting is not expected to yield useful results in any case, as
with the jerk filter's "2nd-order filter" (PT2) low-pass filter (PT2) mode there is no setting option
for the denominator damping DN. The denominator damping DN is permanently set to 1.
The bandstop filter can be parameterized in 2 different ways:
● Real bandstop filter
● Bandstop filter with additional amplitude response increase/decrease at high frequencies
Real bandstop filter
The real bandstop filter is applied when identical numerator and denominator natural
frequencies are selected:
● fZ = fN = fblock (blocking frequency)
If numerator damping setting = 0 is selected, the blocking frequency is equivalent to
complete attenuation. In this case the 3 dB bandwidth is calculated as follows:
● f3 dB bandwidth = 2 * fblock
If instead of complete attenuation, a reduction by a factor of k is all that is required, then
numerator damping should be selected in accordance with k. In this case the above formula
for calculating the 3 dB bandwidth no longer applies.
Bandstop filter with additional amplitude response increase/decrease at high frequencies
In this case, the numerator and denominator natural frequencies are set to different values.
The numerator natural frequency determines the blocking frequency.
By selecting a lower/higher denominator natural frequency than the numerator natural
frequency, you can increase/decrease the amplitude response at high frequencies. An
amplitude response increase at high frequencies can be justified in most cases, as the
controlled system generally possesses a low-pass characteristic itself, i.e. the amplitude
response drops at high frequencies anyway.
Supplementary conditions
If too high a numerator natural frequency is selected, the filter is disabled. In this case the
limiting frequency fZmax depends on the position-control cycle:

 
I =PD[  6KDQQRQ7KHRUHP
 ˭ 7
=PLQ  ˭ 7
3RVLWLRQFRQWUROF\FOH

The limitation is enabled for specific axes using machine data:


MD32400 $MA_AX_JERK_ENABLE (axial jerk limitation)

and set with time specifications for the smoothing filter using machine data:
MD32410 $MA_AX_JERK_TIME (time constants for the axial return filter).

Basic Functions
254 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

With SW 5.1 and higher, it is also possible to control the jerk limitation in the position
controller with a new filter based on a smoothing method that incurs few contour errors:

MD32402 AX_JERK_MODE = 1 ; 2nd-order filter (default)


corresponds to SW 1 to SW 4.4
MD32402 AX_JERK_MODE = 2 ; Sliding mean value generation
(New jerk filter with SW 5.1 and higher).
MD32402 AX_JERK_MODE = 3 ; Bandstop filter with SW 6.3 and higher

Mode 2 requires a bit more computation time, but with the same smoothing effect, it results
in lower contour errors or, with the same accuracy, in a smoother contour with smoother
movements. Mode 2 is recommended. Mode 1 is the default mode in SW 1 to SW 4.4 for
compatibility reasons.
For more information about how the jerk filter available with SW 5.1 and higher works
(balancing filter for improving the position setpoints of the position controller), please refer to:
References:
/FB1/ Manual of Functions, Basic Functions; Velocities, Setpoint/Actual-Value Systems,
Regulatory Control (G2), Chapter: "Control Optimization"
Mode 3
There are 2 parameterization options for the bandstop filter:
● "Real bandstop filter":
When identical numerator and denominator natural frequencies are selected (=blocking
frequency). If you select (numerator) damping setting zero, the blocking frequency is
equivalent to complete attenuation.
In this case the 3 dB bandwidth is determined on the following basis:
fbandwidth = 2 * fblock.
If instead of complete attenuation, a reduction by a factor of k is all that is required, then
the numerator damping should be selected in accordance with k.
● "Bandstop filter with additional amplitude response increase/decrease at high
frequencies":
In this case, the numerator and denominator natural frequencies are set to different
values. The numerator natural frequency determines the blocking frequency. By selecting
a lower (higher) denominator natural frequency than the numerator natural frequency,
you can increase (decrease) the amplitude response at high frequencies. An amplitude
response increase at high frequencies can be justified in most cases, as the controlled
system generally possesses a low-pass characteristic itself, i.e. the amplitude response
drops at high frequencies anyway.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 255
Acceleration (B2)
Functions

4.2.17.2 Parameterization

Activation
The jerk filter is activated using the machine data:
MD32400 $MA_AX_JERK_ENABLE = TRUE
The jerk filter is active in all operating modes and with all types of interpolation.

Filter mode
The mode is selected using the machine data:
MD32402 $MA_AX_JERK_MODE = mode

Mode = 1 (2nd-order filter)


Mode = 2 (Sliding mean value generation)
Mode = 3 (Bandstop filter)

Basic Functions
256 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2.18 Knee-shaped acceleration characteristic curve

4.2.18.1 Adaptation to the motor characteristic curve

Function
Various types of motor, particularly stepper motors, have a torque characteristic that is highly
dependent upon speed and shows a steep decrease in torque in the upper speed range. To
ensure optimum utilization of the motor characteristic curve, it is necessary to reduce the
acceleration once a certain speed is reached.

0>1P@

0PD[


0UHG

       Q>@
QUHG QPD[

1: Torque decrease zone


nred: Speed above which reduced torque has to be assumed
nmax: Maximum speed
Mmax: Max. torque
Mred: Torque at nmax (corresponds to creep acceleration)
Figure 4-5 Torque characteristic curve of a motor with torque characteristic that is highly dependent
upon speed

Simulation of torque characteristic


For the purpose of simulating the torque characteristic of the motor characteristic curve, the
machine data:
MD35242 $MA_ACCEL_REDUCTION_TYPE = characteristic
can be used to select various types of characteristic curve:

0 = Constant characteristic
1 = Hyperbolic characteristic
2 = Linear characteristic

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 257
Acceleration (B2)
Functions

The following figures show typical velocity and acceleration characteristic curves for the
respective types of characteristic:
Constant characteristic

D Y
YPD[
DPD[

DUHG YUHG

YUHG YPD[ Y W

Figure 4-6 Acceleration and velocity characteristic with acceleration reduction: 0 = constant

Hyperbolic characteristic

D Y
YPD[
DPD[

YUHG
DUHG

YUHG YPD[ Y W

Figure 4-7 Acceleration and velocity characteristic with acceleration reduction: 1 = hyperbolic

Linear characteristic

D Y

YPD[
DPD[

YUHG
DUHG

YUHG YPD[ Y W

Figure 4-8 Acceleration and velocity characteristic with acceleration reduction: 2 = linear

Basic Functions
258 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

The key data for the characteristic curves equate to:

vmax = $MA_MAX_AX_VELO
vred = $MA_ACCEL_REDUCTION_SPEED_POINT * $MA_MAX_AX_VELO
amax = $MA_MAX_AX_ACCEL
ared = (1 - $MA_ACCEL_REDUCTION_FACTOR) * $MA_MAX_AX_ACCEL

4.2.18.2 Effects on path acceleration

Function
The path acceleration characteristic curve is generated on the basis of the types of
characteristic for the axes that are of relevance for the path. If axes with different types of
characteristic curve are interpolated together, the acceleration profile for the path
acceleration will be determined on the basis of the reduction type that is most restrictive.
The following order of priorities applies, whereby 1 = top priority:
1. Acceleration reduction: 0 = constant characteristic
2. Acceleration reduction: 1 = hyperbolic characteristic
3. Acceleration reduction: 2 = linear characteristic
4. No acceleration reduction effective
A situation, whereby no acceleration reduction is active, arises for example when:
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT = 1
and/or
MD35230 $MA_ACCEL_REDUCTION_FACTOR = 0

Note
Machine axes featuring stepper motor and DC drive can be interpolated together.

4.2.18.3 Substitute characteristic curve

Function
If the programmed path cannot be traversed using the parameterized acceleration
characteristic curve (e.g. active kinematic transformation), a substitute characteristic curve is
generated by reducing the dynamic limit values. The dynamic limit values are calculated to
ensure that the substitute characteristic curve provides the best possible compromise
between maximum velocity and constant acceleration.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 259
Acceleration (B2)
Functions

Substitute characteristic curve with linear path sections


Limitation to this value is applied if the programmed path velocity is greater than that at
which 15 % of the maximum acceleration capacity is still available (v15%a). Consequently, 15
% of the maximum acceleration capacity/motor torque always remains available, whatever
the machining situation.

D
DPD[

DHUV

D

/RFNHG]RQH
DUHG

YUHG YSURJ YD YPD[ Y

aers: Substitute characteristic curve constant acceleration


a15%: Minimal constant acceleration
a15% = 0.15 * (amax - ared) + ared
vers: Substitute characteristic curve velocity
vprog: Programmed velocity
v15%a: Velocity at a15%
Figure 4-9 Substitute path characteristic curve: Linear path

Basic Functions
260 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

Substitute characteristic curve with curved path sections


In the case of curved path sections, normal and tangential acceleration are considered
together. The path velocity is reduced so that only up to 25 % of the speed-dependent
acceleration capacity of the axes is required for normal acceleration. The remaining 75 % of
the acceleration capacity is set aside for the tangential acceleration, i.e.
deceleration/acceleration on the path.

D
DPD[

Y
D1
U

DHUV
$[LDOFKDUDFWHULVWLFD Y

DUHG

YUHG YHUV YPD[ Y

aN: Normal acceleration


aers: Substitute characteristic curve constant acceleration
vers: Substitute characteristic curve velocity
r: Path radius
Figure 4-10 Substitute path characteristic curve: Curved path

Block transitions with continuous-path mode


If continuous-path mode is active, non-tangential block transitions result in axial velocity
jumps when the programmed path velocity is used for traversing.
As a result, the path velocity is controlled in such a way that prevents any axial velocity
proportion from exceeding the creep velocity vred at the time of the block transition.

Deceleration ramp with continuous-path mode and LookAhead


In the case of consecutive part program blocks with short paths, an acceleration or
deceleration operation may be spread over several part program blocks.
In such a situation LookAhead also takes into account the parameterized speed-dependent
acceleration characteristic.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 261
Acceleration (B2)
Functions

Y   
YPD[

YUHG

1 1 1 1 1 1 W

1: Brake application point


2: Torque decrease zone
3: Maximum torque zone
vred: Creep velocity
vmax: Maximum velocity
Nxy: Part program block with block number Nxy
Figure 4-11 Deceleration with LookAhead

4.2.18.4 Parameterization

Activating
The knee-shaped acceleration characteristics can be activated specific to the machine axis
via the machine data:
MD35240 $MA_ACCEL_TYPE_DRIVE = TRUE

Function
The knee-shaped acceleration characteristic curve is parameterized for specific axes using
the following machine data:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT
(speed for reduced acceleration)
MD35230 $MA_ACCEL_REDUCTION_FACTOR (reduced acceleration)
MD32300 $MA_MAX_AX_ACCEL (Maximum axis acceleration)
MD35242 $MA_ACCEL_REDUCTION_TYPE
(type of acceleration reduction: 0 = constant, 1 = hyperbolic, 2 = linear)

Basic Functions
262 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Functions

4.2.18.5 Programming

Channel-specific activation (DRIVE)

Syntax
DRIVE

Functionality
The knee-shaped characteristic curve is activated for path acceleration using the DRIVE
part-program instruction.
G group: 21
Effective: Modal

Reset response
The channel-specific default setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]

Dependencies
If the knee-shaped acceleration characteristic curve is parameterized for a machine axis,
then this becomes the default acceleration profile for all traversing operations.
If the effective acceleration profile is changed for a specific path section using the SOFT or
BRISK part-program instructions, then an appropriate substitute characteristic curve with
lower dynamic limit values is used in place of the knee-shaped acceleration characteristic
curve.
The knee-shaped acceleration characteristic curve can be reactivated by reprogramming
DRIVE.

Axis-specific activation (DRIVEA)

Syntax
DRIVEA (Axis {Axis})

Functionality
The knee-shaped characteristic curve is activated for all single-axis interpolations
(positioning axis, reciprocating axis, etc.) for specific axes using the part-program instruction.
G group: -
Effective: modal
Axis:
● Value range: Axis identifier for channel axes

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 263
Acceleration (B2)
Functions

Reset response
The channel-specific default setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]

Dependencies
If the knee-shaped acceleration characteristic curve is parameterized for a machine axis,
then this becomes the default acceleration profile for all traversing operations.
If the effective acceleration profile is changed for a specific axis using the SOFTA or BRISKA
part-program instructions, then an appropriate substitute characteristic curve is used in place
of the knee-shaped acceleration characteristic curve.
It is possible to switch back to the knee-shaped acceleration characteristic curve for a
specific axis by programming DRIVEA.

4.2.18.6 Boundary conditions

Single axis interpolation


After activating the knee-shaped acceleration characteristics in case of single-axis
interpolations (positioning axis, oscillating axis, manual motion, etc.), the machine axis is
traversed exclusively in the mode DRIVEA.
It is not possible to switch over the acceleration profile via the following part program
instructions:
● Abrupt acceleration changes (BRISKA)
● Acceleration with jerk limitation (SOFTA)

Path interpolation
If for a machine axis involved in a programmed path the knee-shaped acceleration
characteristic parameterized without the part program instruction DRIVE is active, then a
substitute characteristic curve with reduced dynamic limiting values is determined for the
path.

Kinematic transformation
The knee-shaped acceleration characteristic is not considered in an active kinematic
transformation. With internal control, a switchover is done to acceleration without jerk
limitation (BRISK) and a substitute characteristic curve becomes active for the path
acceleration.

Basic Functions
264 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Examples

4.3 Examples

4.3.1 Acceleration

4.3.1.1 Path velocity characteristic

Key statement
An excerpt from a part program is provided below, together with the associated acceleration
characteristic, by way of an example. These are used to illustrate how the path velocity can
be adapted to take account of various events and the resulting change in acceleration.

Part program (excerpt, schematic)

; Acceleration selection in accordance with fast input 1 ($A_IN[1]):


N53 ID=1 WHEN $A_IN[1] == 1 DO $AC_PATHACC = 2.*$MA_MAX_AX_ACCEL[X]

; Test override profile (simulates external intervention):


N54 ID=2 WHENEVER ($AC_TIMEC > 16) DO $AC_OVR=10
N55 ID=3 WHENEVER ($AC_TIMEC > 30) DO $AC_OVR=100

;Approach
N1000 G0 X0 Y0 BRISK
N1100 TRANS Y=-50
N1200 AROT Z=30 G642

; Contour
N2100 X0 Y0
N2200 X = 70 G1 F10000 RNDM=10 ACC[X]=30 ACC[Y]=30
N2300 Y = 70
N2400 X0
N2500 Y0
M30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 265
Acceleration (B2)
Examples

Y>PV@        

$&B295 

$&B295 

W>PV@

1 1


Acceleration profile: BRISK


1: Accelerate to 100% of path velocity (F10000) in accordance with acceleration default: ACC (N2200...)
2: Brake to 10% of path velocity as a result of override modification ($AC_OVR) in accordance with real-time
acceleration $AC_PATHACC (N53/N54...)
3: Accelerate to 100% of path velocity as a result of override modification ($AC_OVR) in accordance with real-time
acceleration $AC_PATHACC (N53/N55...)
4: Brake to block end velocity for intermediate smoothing block in accordance with acceleration default: ACC
(N2200...)
5: Speed limitation as a result of smoothing (see 9)
6: Accelerate to 100% of path velocity ($AC_OVR) in accordance with acceleration default: ACC (N2300...)
7: Decelerate as a result of override modification at a rate of acceleration that is in accordance with real-time
acceleration $AC_PATHACC (N53/N54...)
8: Accelerate to 100% of path velocity as a result of override modification ($AC_OVR) in accordance with real-time
acceleration $AC_PATHACC (N53/N55...)
9: Intermediate block inserted within the control as a result of the programmed smoothing (RNDM) (N2200...)
Figure 4-12 Switching between path acceleration specified during preprocessing and real-time acceleration

Basic Functions
266 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Examples

4.3.2 Jerk

4.3.2.1 Path velocity characteristic

Key statement
An excerpt from a part program is provided below, together with the associated acceleration
characteristic, by way of an example. These are used to illustrate how the path velocity can
be adapted to take account of various events and the resulting change in jerk.

Part program (excerpt, schematic)

; Setting of path acceleration and path jerk in the event of external intervention:
N0100 $AC_PATHACC = 0.
N0200 $AC_PATHJERK = 4. * ($MA_MAX_AX_JERK[X] + $MA_MAX_AX_JERK[Y]) / 2.

; Synchronized actions for the purpose of varying the override (simulates external
intervention):
N53 ID=1 WHENEVER ($AC_TIMEC > 16) DO $AC_OVR=10
N54 ID=2 WHENEVER ($AC_TIMEC > 30) DO $AC_OVR=100

;Approach
N1000 G0 X0 Y0 SOFT
N1100 TRANS Y=-50
N1200 AROT Z=30 G642

; Contour
N2100 X0 Y0
N2200 X = 70 G1 F10000 RNDM=10
N2300 Y = 70
N2400 X0
N2500 Y0
M30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 267
Acceleration (B2)
Examples

Y>PV@     

295 

295  295 

W>PV@
1 1

51'0  51'0

Acceleration profile: SOFT


1: Jerk according to $MA_MAX_AX_JERK[..]
2: Jerk according to $AC_PATHJERK
3: Jerk according to $MA_MAX_AX_JERK[..] (approach block end velocity)
4: Velocity limit due to arc
5: Jerk according to $AC_PATHJERK
Figure 4-13 Switching between path jerk specified during preprocessing and $AC_PATHJERK

4.3.3 Acceleration and jerk

Key statement
In the following example a short part program is used to illustrate the velocity and
acceleration characteristic for the X-axis. It also shows the connection between specific
velocity and acceleration-related machine data and the contour sections they influence.

Part program

N90 F5000 SOFT G64 ; Continuous-path mode, acceleration with jerk


limitation
N100 G0 X0 Y0 Z0 ; Rapid traverse
N110 G1 X10 ;Straight line
N120 G3 CR=5 X15 Y5 ; Circular arc, radius 5 mm, block transition:
tangential
N130 G3 CR=10 X5 Y15 ; Circular arc, radius 10 mm, block transition:
tangential
N140 G1 X-5 Y17.679 ; straight, 15o bend
N200 M30

Basic Functions
268 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Examples

1



 1


1
1

    [

Figure 4-14 Part program contour

0$;B$;B$&&(/>;@ 62)7B$&&(/B)$&725>;@

0'0$;B$&&(/B29/B)$&725>;@

0'0$;B$;B-(5.>;@

1 1 1 1

$[LVDFFHOHUDWLRQ

$[LVYHORFLW\ 0'3$7+B75$16B-(5.B/,0>;@

Figure 4-15 X axis: Velocity and acceleration characteristic

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 269
Acceleration (B2)
Examples

4.3.4 Knee-shaped acceleration characteristic curve

4.3.4.1 Activation

Key statement
The example given illustrates how the knee-shaped acceleration characteristic curve is
activated on the basis of:
● Machine data
● Part program instruction

Machine data
● Parameterizing the characteristic curve (example only)

X axis
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT[X] = 0.4
MD35230 $MA_ACCEL_REDUCTION_FACTOR[X] = 0.85
MD35242 $MA_ACCEL_REDUCTION_TYPE[X] = 2
MD35240 $MA_ACCEL_TYPE_DRIVE[X] = TRUE

Y axis
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT[Y] = 0.0
MD35230 $MA_ACCEL_REDUCTION_FACTOR[Y] = 0.6
MD35242 $MA_ACCEL_REDUCTION_TYPE[Y] = 1
MD35240 $MA_ACCEL_TYPE_DRIVE[Y] = TRUE

Z axis
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT[Z] = 0.6
MD35230 $MA_ACCEL_REDUCTION_FACTOR[Z] = 0.4
MD35242 $MA_ACCEL_REDUCTION_TYPE[Z] = 0
MD35240 $MA_ACCEL_TYPE_DRIVE[Z] = FALSE

● Activation by setting as the channel-specific default setting


MC_GCODE_RESET_VALUE[20] = 3 (DRIVE)

Basic Functions
270 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Examples

Part program (excerpt)

N10 G1 X100 Y50 Z50 F700 Path motion (X,Y, Z) with DRIVE
N15 Z20 Path motion (Z) with DRIVE
N20 BRISK Switchover to BRISK
N25 G1 X120 Y70 Path motion (Y, Z) with substitute
characteristic curve
N30 Z100 Path motion (Z) with BRISK
N35 POS[X] = 200 FA[X] = 500 Positioning motion (X) with DRIVEA
N40 BRISKA(Z) Activate BRISKA for Z
N40 POS[Z] = 50 FA[Z] = 200 Positioning motion (Z) with BRISKA
N45 DRIVEA(Z) Activate DRIVEA for Z
N50 POS[Z] = 100 Positioning motion (Z) with DRIVE
N55 BRISKA(X) results in error message
...

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 271
Acceleration (B2)
Data lists

4.4 Data lists

4.4.1 Machine data

4.4.1.1 Channel-specific machine data

Number Identifier: $MC_ Description


20150 GCODE_RESET_VALUES Initial setting of G groups
20500 CONST_VELO_MIN_TIME Minimum time with constant velocity
20600 MAX_PATH_JERK Path-related maximum jerk
20602 CURV_EFFECT_ON_PATH_ACCEL Influence of path curvature on dynamic path response
20610 ADD_MOVE_ACCEL_RESERVE Acceleration reserve for overlaid movements

4.4.1.2 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


32000 MAX_AX_VELO Maximum axis velocity
32300 MAX_AX_ACCEL Maximum axis acceleration
32310 MAX_ACCEL_OVL_FACTOR Overload factor for velocity jump
32320 DYN_LIMIT_RESET_MASK Reset behavior of dynamic limits
32400 AX_JERK_ENABLE Axial jerk limitation
32402 AX_JERK_MODE Filter type for axial jerk limitation
32410 AX_JERK_TIME Time constant for axial jerk filter
32420 JOG_AND_POS_JERK_ENABLE Enabling axial jerk limitation
32430 JOG_AND_POS_MAX_JERK Max. axial jerk for JOG and POS
32431 MAX_AX_JERK Maximum axis jerk for path motion
32432 PATH_TRANS_JERK_LIM Max. axial jerk of a geometry axis at block boundary
32433 SOFT_ACCEL_FACTOR Scaling of acceleration limitation for SOFT
32434 G00_ACCEL_FACTOR Scaling of acceleration limitation for G00
32435 G00_JERK_FACTOR Scaling of axial jerk limitation for G00
35220 ACCEL_REDUCTION_SPEED_POINT Speed for reduced acceleration
35230 ACCEL_REDUCTION_FACTOR Acceleration reduction factor
35240 ACCEL_TYPE_DRIVE "DRIVE" acceleration characteristic curve: ON/OFF
35242 ACCEL_REDUCTION_TYPE Type of acceleration reduction

Basic Functions
272 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Acceleration (B2)
Data lists

4.4.2 Setting data

4.4.2.1 Channel-specific setting data

Number Identifier: $SC_ Description


42500 SD_MAX_PATH_ACCEL Max. path acceleration
42502 IS_SD_MAX_PATH_ACCEL Analysis of SD42500: ON/OFF
42510 SD_MAX_PATH_JERK Max. path-related jerk
42512 IS_SD_MAX_PATH_JERK Analysis of SD42510: ON/OFF

4.4.3 System variables

Identifier Description
$AC_PATHACC Path acceleration for real-time events
$AC_PATHJERK Path jerk for real-time events

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 273
Acceleration (B2)
Data lists

Basic Functions
274 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1) 5
5.1 Brief description

Diagnostic tools
Integrated and external diagnostic tools are available for operating the SINUMERIK control.
In addition, the NC assists with error delimitation for drive problems by providing the option
of simulating the drive interface of machine axes.

Integrated diagnostic tools


The following information is displayed via the HMI user interface:
● Display of alarms and messages from the control system or drives in plaintext
● Status displays for:
– Interface signals from NC, HMI, PLC and I/O modules
– Data blocks
– PLC flags, timers and counters
– Inputs and outputs of the PLC.
● Service displays
– Nominal values, actual values and status data for axes/spindles
– Communication error log for NC, PLC and HMI
– Logbook
– Display showing version of system software installed

External diagnostic tools


The 611D commissioning software (to be installed on an external computer) is used to
configure and set parameters for SIMODRIVE 611-D drives.
The 611D commissioning software provides the following functions:
● First commissioning through direct input of drive parameters
● Commissioning by transferring standard data records that are derived from motor/power
section combinations
● Automatic controller setting (self-optimization)
● Measurement functions for evaluating speed and position control loops and regulating
torque in the time and frequency range without external measurement equipment.
● Fast Fourier Transformation (FFT) for analysis of the control loop setting and machine
kinematics

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 275
Diagnostic Tools (D1)
Brief description

● Circularity test
● Archiving drive and control data
By means of the DAC configuration, the 611D drive modules enable the output of all
important control loop variables of the position, speed and torque levels to external
measurement devices (e.g. oscilloscope, signal plotter) via measuring sockets.

References
A detailed description of the 611D commissioning software can be found in:
/FBA/ Function Manual, Drive Functions, Speed Control Loop (DD2)
A detailed description of the circularity test can be found in:
/FB2/ Function Manual, Extended Functions, Compensations (K3)

Basic Functions
276 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Description of diagnostic tools

5.2 Description of diagnostic tools

Scope
The Function Manual deals with displays of the user interface, system functions, procedures
for determining system statuses and, if necessary, measures for avoiding undesirable
conditions for the NC control, PLC and drives.

General

Alarm and signal status displays


The currently active or not yet acknowledged alarms and messages are displayed in the
Diagnostics operating area.

Alarm log
The alarm log contains the alarms that have occurred and the time. Detailed information on
the individual alarms can be found in:
References:
/DA/ Diagnostics Manual or in the case of systems with HMI Advanced see Online Help.

Note
The corresponding explanations for alarms and messages which the machine tool
manufacturer issues (range of values ......),
can be found in the machine tool manufacturer's documentation.

Alarm handler

Application
The alarm handler provides an infrastructure for activating and managing alarms on the
NCK.

Functions
● Buffering of a maximum of 16 alarms that have been activated since system power-up
and which have not yet been reset.
● Alarm reactions can be programmed as channel-specific, mode-group-specific or NCK-
specific reactions.
● The "NoReady" alarm reaction can also be programmed as a channel-specific reaction.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 277
Diagnostic Tools (D1)
Description of diagnostic tools

Activation
The alarm handler is activated when an error status is detected in the NCK, causing an
alarm to be output.
It is possible to trigger an alarm in a part program using the SETAL command.
References: /PGA/ Programming Manual Advanced

Note
The currently active alarms in the NCK are read via the operator panel interface.
It is not possible to set alarms externally in the NCK.

Alarms with an alarm ID in the 60000 to 60999 range can be activated in a part program.

Data backup
On Power ON , the alarm-handler data are reinitialized completely, since they are not
stored in the buffered SRAM.

Compatibility
As of SW 4
As of SW 4.1 and later, it is possible to set the channel-specific signal
CHANNEL_NOREADY in the VDI interface in response to alarms.
Up to SW 3.x
Machine data:
MD11412 $MN_ALARM_REACTION_CHAN_NOREADY
controls whether the channel-specific signal CHANNEL_NOREADY function is used. This
ensures that earlier PLC versions remain compatible.
Default setting: CHANNEL_NOREADY signal is not used.
Alarms that have specified a channel-specific NOREADY signal are reconfigured to the
mode-group-specific NOREADY signal.

Clearing criterion
For each alarm, you must specify how the alarm can be cleared again. The following clearing
criteria are possible:
● POWERONCLEAR
The alarm is cleared by switching the control off and then on again.
● RESETCLEAR
When the Reset key is pressed, the alarm is cleared in the channel in which it occurred.
● CANCELCLEAR
The alarm is cleared in any channel when the Cancel key is pressed. The alarm can also
be cleared by means of an NC start or Reset.

Basic Functions
278 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Description of diagnostic tools

● NCSTARTCLEAR
The alarm is cleared in the channel in which the alarm occurred by starting a program.
The alarm can also be cleared by means of a Reset.
● CLEARHIMSELF
The alarm is not cleared by an operator input or action, but explicitly by a "clearAlarm"
programmed in the NCK source code.
● BAGRESETCLEAR
The alarm is cleared by a "BAGRESETCLEAR" command or by executing a Reset in
every channel of this mode group.
● NCKRESETCLEAR
The alarm is cleared by an "NCKRESETCLEAR" command or by executing a Reset in
every channel.

Alarm display control


The scope of the alarm outputs can be modified using machine data.
● MD11410 $MN_SUPPRESS_ALARM_MASK (mask for suppressing special alarm
outputs)
● MD11411 $MN_ENABLE_ALARM_MASK (mask for enabling special alarm outputs)
For details of this machine data, please refer to chapter 4.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 279
Diagnostic Tools (D1)
Service displays

5.3 Service displays

Conditions of use
Conditions for the use of service displays are specified. Service displays are differentiated
between in terms of axis/spindle, drive and profibus DP

Operation
For how to operate the service displays see:
References:
/BAD/ "HMI Advanced Operating Manual"
/BEM/ "HMI Embedded Operating Manual"

Note
On HMI Advanced, it is possible to switch between the displays using the vertical soft key for
Part view/Overall view. The data in the partial view are updated at significantly shorter
intervals.

General
In principle, the following service displays are available:
● Axis/spindle service displays
● Drive service displays
● Profibus-DP service displays

Note
System dependencies
The availability of individual service displays depends on the particular system, e.g.:
• Drive service displays: for digital drives only
• Profibus-DP service displays: for SINUMERIK 840Di only

Basic Functions
280 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Axis/spindle service display

5.4 Axis/spindle service display

Values and statuses


Displays showing values and statuses on the control's user interface allow the operating
status of the axes and spindles to be evaluated.

Accessing the diagnostic options

For the purposes of commissioning and diagnosing


● axes and
● spindles,
the information shown in the following figure can be called up for each axis/spindle in the
"Diagnostics" operating area via the operator panel.
This information is used for
● checking the setpoint branch
(e.g. position setpoint, speed setpoint, spindle speed setpoint prog.)
● checking the actual value branch
(e.g. actual position value measuring system 1/2, actual speed value)
● optimizing the position control loop
(e.g. following error, control deviation, servo gain factor)
● checking the whole control loop of the axis
(e.g. by comparing the position setpoint and the actual position value, speed setpoint and
the actual speed value)
● checking hardware errors
(e.g. by checking the encoder: If the axis is physically moved, a change in the actual
position value must result)
● setting and checking axis monitoring functions.
Descriptions on how to select and operate the "Diagnostics" area can be found in:
References:
/BAD/ "HMI Advanced User Manual"
/BEM/ "HMI Embedded User Manual"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 281
Diagnostic Tools (D1)
Axis/spindle service display

Figure 5-1 Example for service axis/spindle HMI Advanced

Following error
The difference between the position setpoint and the actual position value of active
measuring system 1 or 2.
Unit: mm, inch or degrees

Error signal
The difference between the position setpoint at the position controller input and the actual
position value of active measuring system 1 or 2.
Unit: mm, inch or degrees

Contour deviation
The current contour deviation is displayed with this value (variations of the following error
caused by settling operations on the speed controller due to load changes).
The contour deviation results from the difference between an actual position pre-calculated
from the position setpoint and the actual position value of active measuring system 1 or 2.
Unit: mm, inch or degrees

Basic Functions
282 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Axis/spindle service display

Servo gain factor (calculated)


The servo gain factor in the display is calculated by the NC according to the following
equation:

6SHHGVHWSRLQW
6HUYRJDLQIDFWRU 
)ROORZLQJHUURU

>PPLQ@
8QLW ZLWKVWDQGDUGVHWWLQJ  
>PP@

Velocity setpoint = setpoint currently being output to the axis/spindle.


References:
/FB1/ Function Manual Basic Functions; Velocities, Setpoint/Actual Value Systems, Closed-
Loop Control (G2)

Active measuring system


This line indicates whether measuring system 1 or 2 is active.

Position actual value measuring system 1/2


The actual position of the axis as measured via measuring system 1/2. The position is
displayed in the machine coordinate system (no work offsets or tool offsets included).
Unit: mm, inch or degrees

Position reference value


Specified position transferred from the interpolator to the position control.
Unit: mm, inch or degrees

Compensation value meas. system 1 or 2


Display of absolute compensation value for measuring system 1 or 2.
The compensation value consists of the sum of backlash and leadscrew error compensation
for the actual axis position
Unit: mm, inch or degrees

Sag and temperature compensation


Display of the compensation value calculated for the current axis position based on the total
of the sag and temperature compensations.
Unit: mm, inch or degrees

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 283
Diagnostic Tools (D1)
Axis/spindle service display

Velocity actual value of active encoder (only 840Di)


Display of velocity actual value of the currently active encoder.

Velocity setpoint of drive (only 840Di)


Display of velocity setpoint of drive.

Speed actual value


The pulses supplied by the encoder are evaluated by the NC and displayed.
Unit: %
100% means maximum speed (corresponds to 10 V for analog interface; maximum speed
for SIMODRIVE 611 digital, specified by machine data:
MD1401 $MD_MOTOR_MAX_SPEED (speed for maximum useful motor speed).

Speed setpoint
Speed setpoint transferred to the drive (= speed setpoint from position controller and feed
forward control).
Unit: %
100% corresponds to the maximum speed setpoint (10 V for an analog interface, maximum
speed for SIMODRIVE 611 digital).

Spindle speed setpoint prog.


Speed setpoint programmed by the user.
Unit: rpm
e.g.: Input: S1000; display: 1000 rpm
Display applies to spindles only.

Spindle speed setpoint current


Current active speed setpoint with correct sign, including calculated compensation value and
any operative speed limitation (programmed by means of setting or machine data).
Unit: rpm
Display applies to spindles only.

Override
The effective correction factor of the feed or spindle correction switch is displayed.
Unit: %

Basic Functions
284 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Axis/spindle service display

Position offset for master axis/spindle actual value


The currently applicable position offset value is displayed here (relative to the actual value) if
such a position offset (angular offset between master and slave axes) has been programmed
for the "Synchronous spindle" function.
Unit: mm, inches, degrees
References:
/FB2/ Function Manual Extension Functions, Synchronous Spindle (S3)

Position offset for master axis/spindle setpoint value


The currently applicable position offset value is displayed here (relative to the setpoint) if
such a position offset (angular offset between master and slave axes) has been programmed
for the "Synchronous spindle" function.
Unit: mm, inches, degrees
References:
/FB2/ Function Manual Extension Functions, Synchronous Spindle (S3)

Current gear stage


The current actual gear stage is displayed here.
With axes, this is only displayed if a spindle is assigned to the axis. This display corresponds
to IS DB31, ... DBX16.0 to 16.2 ("Actual gear stage").
References:
/FB1/ Function Manual Basic Functions; Spindles (S1)
Displays which of the 6 parameter sets of the position controller is active. A parameter set
changeover takes place, for example, with a gear shift.
References:
/FB1/ Function Manual Basic Functions; Velocities, Setpoint/Actual-Value Systems, Closed-
Loop Control (G2)

Controller mode
Displays the current controller modes.

0: Position Control
1: Speed Control
2: Stopping
3: Parking
4: Follow-up
5: Braking
For a more detailed description of controller modes, refer to:
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 285
Diagnostic Tools (D1)
Axis/spindle service display

"Referenced" status display


Status display for reference point approach (axis).

Bit0=Status 0: The machine axis is not cross-referenced using position measurement


system 1 or 2.
Bit0=Status 1: The machine axis has reached the reference point (incremental
measuring system) and/or target point (length measuring system with
distance coded reference marks) during reference point approach.
Bit1=Status 0: No obligation to cross-reference (NC start possible without cross-
referencing this axis)
Bit1=Status 1: There is no obligation to cross-reference for the NC start.
Depending on machine data:
MD34110 $MA_REFP_CYCLE_NR
and
MD20700 $MC_REFP_NC_START_LOCK
Display corresponds to
IS DB31, ... DBX60.4 and 60.5 ("Referenced/synchronized 1 or 2").
References:
/FB1/ Function Manual Basic Functions; Reference Point Approach (R1)

QEC learning active


Indicates whether or not the learning process for quadrant error compensation for the axis is
active.

Fixed stop reached


Indicates whether or not the axis has fulfilled the conditions for "Fixed stop reached" when
the "Travel to fixed stop" function is active (IS DB31..., DBX62.5).
References:
/FB1/ Function Manual Basic Functions; Travel to Fixed Stop (F1)

Torque limitation value


Indicates the value programmed by means of
FXST[x] or
SD43510 $SA_FIXED_STOP_TORQUE
or the value defined with machine datum:
MD37010 $MA_FIXED_STOP_TORQUE_DEF
for the clamping torque for "Travel to fixed stop".
Unit: % of maximum torque
References:
/FB1/ Function Manual Basic Functions; Travel to Fixed Stop (F1)

Basic Functions
286 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Axis/spindle service display

Safe actual position of the axis


Displays the current actual axis position that has been measured via the NC. This actual
position should correspond in value to "Safe actual position of drive".
References:
/FBSI/ Function Manual Safety Integrated

Safe actual position of drive


Displays the current actual axis position that has been measured via the drive. This actual
position should correspond in value to "Safe actual position of axis".
References:
/FBSI/ Function Manual Safety Integrated

Safe input signals of the axis


Displays the safe input signals of the PLC defined for the "Safety Integrated" function. The
status of these input signals should correspond to the "Safe input signals of drive" status.
References:
/FBSI/ Function Manual Safety Integrated

Safe input signals of the drive


Displays the safe input signals of the drive (DMP on drive bus) defined for the "Safety
Integrated" function. The status of these input signals should correspond to the "Safe input
signals of axis" status.
References:
/FBSI/ Function Manual Safety Integrated

Safe output signals of the axis


Displays the safe output signals of the PLC defined for the "Safety Integrated" function. The
status of these output signals should correspond to the "Safe output signals of drive" status.
References:
/FBSI/ Function Manual Safety Integrated

Safe output signals of the drive


Displays the safe output signals of the drive (DMP on drive bus) defined for the "Safety
Integrated" function. The status of these output signals should correspond to the "Safe
output signals of axis" status.
References:
/FBSI/ Function Manual Safety Integrated
The following description contains more information on problems and questions that may
arise.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 287
Diagnostic Tools (D1)
Axis/spindle service display

Control technology concept


The figure below shows at which points in the control-loop the axis and spindle information is
read off.

6SLQGOH 6SLQGOHVSHHGVHWSRLQW
VSHHG FXUUHQW )HHG
IRUZDUG
VHWSRLQW FRQWURO
SURJ 3RVLWLRQVHWSRLQW
VSHHGVHWSRLQW 6SHHGVHWSRLQW>@

(UURUVLJQDO
-HUNOLPLWDWLRQ 
,QWHUSRODWRU )LQH 3RVLWLRQ 6SHHG
,32 '\QDPLF FRQW &XUUHQW 3RZHU 0
LQWHUSRODWRU UHVSRQVH  FRQWURO FRQWURO VHFWLRQ
OHU  UROOHU
DGDSWDWLRQ OHU

&RQWURO $FWXDOVSHHGYDOXH>@
&RQWURO SDUDPHWHUVHW
ORRS
PRGHO
$FWXDOVSHHG
YDOXH
&RQWRXU VSHFLILFDWLRQ
)ROORZLQJHUURU GHYLDWLRQ  &RPSHQVDWLRQ
%DFNODVK/(&

$EVFRPSHQVDWLRQYDOXH
$FWLYH 0HDVXULQJV\VWHP
PHDVXULQJ
V\VWHP
$FWXDOSRVLWLRQYDOXHRIPHDVXULQJV\VWHP  $FWXDOYDOXH
SURFHVVLQJ *

$FWXDOSRVLWLRQYDOXHRIPHDVXULQJV\VWHP $FWXDOYDOXH HJIURP


SURFHVVLQJ * GLUHFW

PHDVXULQJ
V\VWHP
6SHHGVHWSRLQW
6HUYRJDLQIDFWRU FDOFXODWHG  $EVFRPSHQVDWLRQYDOXH
)ROORZLQJHUURU 0HDVXULQJV\VWHP
&RPSHQVDWLRQ
%DFNODVK/(&

,WDOLFIRQW ฬ 9DOXHLVGLVSOD\HGLQXVHULQWHUIDFH

Figure 5-2 Overview diagram of axis and spindle information

Checks

Check of the position controller setting


The position controller settings can be easily managed via the service axis display.
The number 1 (corresponds to servo gain = 1) should be entered in machine data:
MD32200 $MA_POSCTRL_GAIN [n] (servo gain factor).
The change takes effect immediately.

Basic Functions
288 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Axis/spindle service display

Because the servo gain factor is defined as

6SHHGVHWSRLQW >PPLQ@
6HUYRJDLQIDFWRU   'HIDXOW
)ROORZLQJHUURU >PP@

a following error of 1 mm must be measured (with KV = 1 and constant velocity) at a


feedrate of 1 m/min.
If the desired servo gain (KV) factor does not correspond to the actual factor, the possible
causes and remedial optimization options are as follows.
● Speed or torque feedforward control is activated. A higher servo gain factor is displayed
than was set with machine data:
MD32200 $MA_POSCTRL_GAIN [n] (servo gain factor).
● Filter for jerk limitation or dynamic response adaptation is activated. A lower servo gain
factor is displayed than was set with machine data:
MD32200 $MA_POSCTRL_GAIN [n] (servo gain factor).

Diagnostics for alarms


This information is also provided as a diagnostic tool for diagnosing the causes of alarms
such as:
● "Standstill monitoring"
⇒ following error >
MD36030 $MA_STANDSTILL_POS_TOL (standstill tolerance)
● "Contour monitoring"
⇒ contour deviation >
MD36400 $MA_CONTOUR_TOL (tolerance band for contour monitoring)
● "Speed setpoint limiting"
⇒ Speed setpoint >
MD36210 $MA_CTRLOUT_LIMIT
(maximum speed setpoint)
● "Positioning monitoring"
⇒ following error >
MD36010 $MA_STOP_LIMIT_FINE
(exact stop fine)
● "Measuring system changeover not available
⇒ difference between actual position value measuring system 1 and 2 >
MD36500 $MA_ENC_CHANGE_TOL
(maximum tolerance for actual position value measurement)
● "Clamping monitoring"
⇒ following error >
MD36050 $MA_CLAMP_POS_TOL
(clamping tolerance for "Clamping active" interface signal)
For details on the behavior of the NC control in response to individual alarms, and remedial
action, please refer to:
References:
/DA/ Diagnostics Manual

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 289
Diagnostic Tools (D1)
Axis/spindle service display

Diagnostics of operational state errors


The following information is also provided to assist in the analysis of operational state errors
such as:
● Despite an active motion command, the axis does not move.
⇒ Check whether controller is enabled. In controller mode position control or speed
control (with spindle control) must be activated.
● Occurrence of feed fluctuations.
⇒ Detection via following error or actual speed value.
● Incorrect positioning.
⇒ Compare position setpoint with actual position value of measuring system 1/2 and
absolute compensation value of measuring system 1 or 2.
● The cam is not detected by the PLC during referencing.
⇒ Check status display "referenced"
● An incorrect reference point value was displayed.
⇒ The wrong measuring system may have been used for referencing.
● Large fluctuations in the actual speed value are occurring in the main spindle drive.
⇒ The selected actual speed range for encoders is too high or the machine datum:
MD36300 $MA_ENC_FREQ_LIMIT [n] (encoder limiting frequency)
is set higher than specified in the encoder data sheet.
Incorrect spindle positioning occurs.
⇒ The wrong measuring system may be selected or synchronization may have been
performed with the wrong zero mark.

Basic Functions
290 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Drive service display (for digital drives only)

5.5 Drive service display (for digital drives only)

Displays
Displays on the control's user interface that show values and statuses allow for evaluation of
the operating statuses of the digital drives.

Access
For the purposes of commissioning and diagnosing
● feed drives (FDD) and
● main spindle drives (MSD)
"Diagnostic" information are displayed for each axis/spindle via the operator panel front in
the operating area.

Note
The parameters in the "Drive" service display are not necessary for connecting drives via the
PROFIBUS-DP. For SINUMERIK 840Di, the drives are defined as PROFIBUS nodes. The
appropriate service data is displayed in 840Di-Start-up in the menu Diagnostics -->
PROFIBUS.

Application
The diagnostic options are used for:
● checking the status of enabling and control signals
(e.g. pulse enable, drive enable, motor selection, setpoint parameter set)
● checking the status of FDD/MSD operating modes
(e.g. setup mode, parking axis)
● displaying temperature warnings
● checking the current setpoint/actual value display
(e.g. actual position value measuring system 1/2, speed setpoint, actual speed value)
● checking the drive status (drive ready)
● displaying the current ramp-up phase
● displaying the group error message (message status class 1)
● displaying the drive status messages
(e.g. threshold torque not reached, minimum speed not reached, actual speed = set
speed)

Service HMI Advanced Drive


Selection and operation of the "Diagnosis" operating area is described in
References:
/BAD/, "Operating Manual HMI Advanced"
/BEM/, "Operating Manual HMI Embedded"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 291
Diagnostic Tools (D1)
Drive service display (for digital drives only)

Explanations/Terms
The individual status displays, warnings, messages, etc., are explained in the following
sections. For HMI SW 6 and higher, the status is shown in plain text as "yes" or "no" instead
of "0" and "1".
For additional information, see:
References:
/IAD/ Installation and Startup Guide

Drive enable (terminal 64/63)


The display corresponds to the status of terminal 64/63 on the SIMODRIVE611 digital
infeed/regenerative feedback unit.
State 1: Central drive enable
State 0: Central drive disable
Display corresponds to machine datum:
MD1700 $MD_TERMINAL_STATE
(status of binary inputs).

Pulse enable (terminal 63/48)


The display corresponds to the status of terminal 63/48 on the SIMODRIVE611 digital
infeed/regenerative feedback unit.
State 1: Central pulse enable
State 0: Central pulse disable
Display corresponds to machine data:
MD1700 $MD_TERMINAL_STATE
(Status of binary inputs).

Pulse enable (terminal 663)


The display corresponds to the status of terminal 663 (relay: safe operational stop) on the
drive module.
State 1: Module-specific pulse enable
State 0: module-specific pulse disable
Display corresponds to machine datum:
MD1700 $MD_TERMINAL_STATE
(status of binary inputs).

Basic Functions
292 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Drive service display (for digital drives only)

Setup mode (terminal 112) HMI SW 6.3 and later


The display corresponds to the status of terminal 112 on the SIMODRIVE 611 digital
infeed/regenerative feedback unit.
State 1: Central drive disable for setup mode
State 0: Central drive enable, no setup mode
Display corresponds to machine datum:
MD1700 $MD_TERMINAL_STATE
(status of binary inputs).

PLC pulse enable


Indicates whether the pulse enable from the PLC is available for the drive.
State 1: The pulses for the drive module have been disabled by the PLC.
State 0: Pulse enable for this drive is activated by the PLC.
Display corresponds to IS DB31, ... DBX21.7 ("Pulse enable")
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Speed controller enable NC


This display indicates whether the speed controller for the drive has been enabled by the
NC.
State 1: Speed controller enable = OFF
State 0: Speed controller enable = ON

Ramp-up function generator quick stop


Status display for ramp-up function generator quick stop.

State 1: Ramp-up function generator quick stop is not active for the drive.
State 0: Ramp-up function generator quick stop is active. The drive is stopped without
a ramp function with speed setpoint = 0 and without pulse suppression.
Display corresponds to IS DB31, ... DBX92.1 ("Ramp-function generator rapid stop").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

DC link state (on/off)


The display contains the following drive warning:
State 0: DC link voltage = ON
State 1: DC link voltage is below warning threshold.
The warning threshold corresponds to machine datum:
MD1604 $MD_LINK_VOLTAGE_WARN_LIMIT (DC link undervoltage warning threshold).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 293
Diagnostic Tools (D1)
Drive service display (for digital drives only)

Enable pulses
Message indicating whether the drive pulses have been enabled.

State 0: The drive module pulses are suppressed. The axis/spindle can therefore not
be traversed.
State 1: The drive module pulses are enabled. The axis/spindle can now be traversed.
Display corresponds to IS DB31, ... DBX93.7 ("Enable pulses").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2).

Drive ready
Display of the current status of the selected drive.
State 0: The drive is not ready.
State 1: The drive is ready.
Display corresponds to IS DB31, ... DBX93.5 ("Drive Ready").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)
Display indicating the current ramp-up phase of the selected drive.
Meaning:

CRC error
Display of communications errors detected in hardware between NC and drive.

Note
If the display shows a value other than "0", please contact your SIEMENS Regional Office!

ZK1 Messages
Display indicates whether messages of status class 1 are active.
State 0: There is no pending ZK1 message.
State 1: One or several status class 1 messages are active.
Status class 1 messages are alarms with the following characteristics:
● They lead to internal responses (e.g. regenerative braking, immediate pulse suppression)
● They are modal.

Basic Functions
294 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Drive service display (for digital drives only)

DC link voltage
indicates the current DC link voltage level within the drive grouping.
Unit: Volts

Speed setpoint
The displayed speed setpoint represents the unfiltered total setpoint value. It consists of the
position controller output component and the speed feedforward branch.
Unit: rpm
Display corresponds to machine data:
MD1706 $MD_DESIRED_SPEED (speed setpoint value).

Speed actual value


The displayed real value represents the unfiltered actual speed value.
Unit: rpm
Display corresponds to machine data:
MD1707 $MD_ACTUAL_SPEED (actual speed value).

Smoothed actual current value


Display of the smoothed actual current value. The torque-generating actual current value is
smoothed by a PT1 element with parameterizable time constants.
Unit: %
100 % corresponds to the maximum current of the power section.
Display corresponds to machine data:
MD1708 $MD_ACTUAL_CURRENT (smoothed actual current value).

Motor temperature
Display of motor temperature measured via temperature sensors.
Unit: Degrees Celsius
Display corresponds to machine datum:
MD1702 $MD_MOTOR_TEMPERATURE (motor temperature).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 295
Diagnostic Tools (D1)
Drive service display (for digital drives only)

Speed setpoint filter 1


Status display of speed setpoint smoothing function.

State 0: No speed setpoint smoothing is active.


State 1: Smoothing of the speed setpoint as requested by the PLC using IS DB31, ...
DBX20.3
("Speed setpoint smoothing") takes effect because speed setpoint filter 1 is
configured as the low pass.
Display corresponds to IS DB31, ... DBX92.3 ("Speed setpoint smoothing active") and is
shown in an updated form as of software version 6.3 and later.
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

2nd torque limit


Display of active torque limit
State 0: Torque limit 1 is active.
State 1: Torque limit 2 is active.
Display corresponds to IS DB31, ... DBX92.2
("Torque limit 2 active").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Integrator disabling
This display indicates whether the speed controller integrator is active.

State 0: The integrator of the speed controller is enabled. The speed controller
functions as a PI controller.
State 1: Deactivation of the speed-controller integrator as requested by the PLC using
IS DB 31, ... DBX 21.6
("Integrator disable speed controller") is active for the drive module. The
speed controller has therefore switched from a PI to a P controller.
Display corresponds to IS DB31, ... DBX93.6 ("Speed-controller integrator disabled").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Setup mode
Mode display of the SIMODRIVE 611 digital.
State 0: Normal operation is active for the drive.
State 1: Setup mode is active for the drive.
Display corresponds to NST DB31, ... DBX92.0 ("Setup mode active").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Basic Functions
296 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Drive service display (for digital drives only)

Parking axis
Mode display of the SIMODRIVE 611 digital.

State 0: Axis/spindle in normal mode


State 1: Axis/spindle in parking position, i.e. all encoder-specific monitoring and
evaluating functions are disabled. This allows the encoder to be withdrawn
without initiating an alarm.

Setpoint parameter set (drive)


Indicates which of the 8 drive parameter sets of the SIMODRIVE 611 digital are to be
activated by the PLC.
Display corresponds to IS DB31, ... DBX21.0 to 21. ("Parameter set selection A,B,C").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Actual parameter set (drive)


Display indicating which of the 8 drive parameter sets of the SIMODRIVE 611 digital is
currently active.
Display corresponds to IS DB31, ... DBX93.0 to 93.2
("Active parameter set A,B,C").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals

Operating mode
Display indicating whether the motor is operating as a feed drive or main spindle drive.

Motor selection (star/delta)


Display indicating which motor data set is to be activated by the PLC. At the moment the
motor data record is used for the star/delta switchover on main spindle drives.
The following assignment applies:

Motor selection Application Coding


Motor 1 MSD: Star 0 0
Motor 2 MSD: Delta mode 0 1
Motor 3 reserved 1 0
Motor 4 reserved 1 1

The display applies only to main spindle drives.


Display corresponds to NST DB31, ... DBX21.3 to 21.4
("Motor selection A,B").

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 297
Diagnostic Tools (D1)
Drive service display (for digital drives only)

References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Actual motor (star/delta)


Display indicating which of the motor data sets is currently active. At the moment the motor
data record is used for the star/delta switchover on main spindle drives.
The following assignment applies:

Motor selection Application Coding


Motor 1 MSD: Star 0 0
Motor 2 MSD: Delta mode 0 1
Motor 3 reserved 1 0
Motor 4 reserved 1 1

Display is valid only for main spindle drives.


Display corresponds to NST DB31, ... DBX93.3 to 93.4
("active motor A,B").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Position actual value measuring system 1/2


The actual position of the axis as measured via measuring system 1/2. The position is
displayed in the machine coordinate system (no work offsets or tool offsets included).
Unit: mm, inch or degrees

Power section in i²t limitation HMI SW 6.3 and later


Limitation for protecting the power section against continuous overloading of the
SIMODRIVE 611 drives.
State 1: i2t-power section limitation has responded
State 0: i2t power section limitation has not responded
Display is valid for SIMODRIVE universal and SIMODRIVE digital.
Display corresponds to NST DB31, ... DBX95.7
("i2t-monitoring").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Basic Functions
298 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Drive service display (for digital drives only)

Heatsink temperature warning


Warning signal output by drive:
State 0: The heat sink temperature monitoring has not responded.
State 1: The heatsink temperature monitoring has responded.
Display corresponds to IS DB31, ... DBX94.1
("Heatsink temperature prewarning").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Motor temperature warning


Warning signal output by drive:
State 0: The motor temperature is below the warning threshold.
State 1: The motor temperature has exceeded the defined warning threshold.
The warning threshold corresponds to the machine data:
MD1602 $MD_MOTOR_TEMP_WARN_LIMIT (maximum motor temperature).
Display corresponds to NST DB31, ... DBX94.0 ("Motor temperature prewarning").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Ramp-up function completed


Status display of drive.

State 0: The ramp-up function has not yet been completed after a new speed setpoint
was defined.
State 1: The actual speed value has reached the speed tolerance band after a new
speed setpoint was defined.
The speed tolerance band corresponds to machine datum:
MD1426 $MD_SPEED_DES_EQ_ACT_TOL (tolerance band for 'nset-nactual' message).
Display corresponds to NST DB31, ... DBX94.2 ("Ramp-up function completed").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Torque lower than threshold setting


Status display of drive.

State 0: In the stationary condition (i.e. ramp-up procedure completed), the torque
setpoint is greater than the threshold torque.
State 1: In the stationary condition, the torque setpoint has not reached the threshold
torque.
The threshold torque corresponds to the machine data:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 299
Diagnostic Tools (D1)
Drive service display (for digital drives only)

MD1428 $MD_TORQUE_THRESHOLD_X (threshold torque).


Display corresponds to IS DB31, ... DBX94.3 ("Md< Mdx").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Speed lower than minimum setting


Status display of drive.
State 0: The speed actual value is higher than the minimum speed.
State 1: The actual speed value is smaller than the minimum speed.
The minimum speed corresponds to the machine data:
MD1418 $MD_SPEED_THRESHOLD_MIN (nmin for 'nis < nmin' message).
Display corresponds to IS DB31, ... DBX94.4
"|nactual|< nmin").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Speed lower than threshold setting


Status display of drive.
State 0: The actual speed value is greater than the threshold speed.
Status 1: The actual speed value is smaller than the threshold speed.
The threshold speed corresponds to machine datum:
MD1417 $MD_SPEED_THRESHOLD_X
(nx for 'nactual < nx' message).
Display corresponds to NST DB31, ... DBX94.5 ("|nactual|< nx").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Actual speed = set speed


Status display of drive.

State 0: The actual speed value is outside the speed tolerance band after a
new speed setpoint was defined.
State 1: The actual speed value has reached the speed tolerance band after a new
speed setpoint was defined.

The speed tolerance band corresponds to machine datum:


MD1426 $MD_SPEED_DES_EQ_ACT_TOL (tolerance band for 'nset-nactual' message).
Display corresponds to NST DB31, ... DBX94.6 ("|nactual|= nset").
References:
/FB1/ Function Manual Basic Functions; Various Interface Signals (A2)

Basic Functions
300 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Drive service display (for digital drives only)

Variable signal 1
Status display of 611D variable signaling function.
With the variable signaling function, any memory location can be monitored to see whether a
definable threshold is exceeded. In addition to the threshold, a tolerance band can be
defined which is also taken into account when scanning for violation of the threshold value.
The signal can be combined with an ON delay or OFF delay time.
State 0: Threshold value not reached
State 1: Threshold value exceeded
Parameters for the variable signal function are set using the following 611D machine data:

MD1620 $MD_PROG_SIGNAL_FLAGS (Bits variable signal function)


MD1621 $MD_PROG_SIGNAL_NR (Signal number variable signal function)
MD1622 $MD_PROG_SIGNAL_ADDRESS (Address variable signal function)
MD1623 $MD_PROG_SIGNAL_THRESHOLD (Threshold variable signal function)
MD1624 $MD_PROG_SIGNAL_HYSTERESIS (Hysteresis variable signal function)
MD1625 $MD_PROG_SIGNAL_ON_DELAY (ON Delay variable signal function)
MD1626 $MD_PROG_SIGNAL_OFF_DELAY (OFF Delay variable signal function)

Diagnostics for alarms


This information is also provided as a diagnostic tool for diagnosing the causes of alarms
such as:
● "Ramp-up error"
⇒ Check the ramp-up phase to see which ramp-up phase the drive has reached.
● "Drive malfunction"
⇒ Message ZK1 is set.
⇒ check specified parameter set, motor selection, DC link status.
Check following alarms 300500 to 300515.
● "Zero speed monitoring",
25050 "Contour monitoring",
25060 "Speed setpoint limitation"
25080 "Positioning monitoring"
⇒ The enabling for the drive may have been omitted (e.g. pulse enable, drive enable,
pulse enable for PLC not available); this leads to display pulses enabled = off.
● "Motor temperature exceeded"
⇒ Check the current motor temperature.

For details on the behavior of the NC control in response to individual alarms, and remedial
action, please refer to:
References:
/DA/ Diagnostic Manual

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 301
Diagnostic Tools (D1)
Service display PROFIBUS DP 840Di

5.6 Service display PROFIBUS DP 840Di


The user interface 840Di Start-Up provides diagnostic screen forms for PROFIBUS-DP and
its nodes. . These diagnostic screens are only intended for information. You cannot modify
them.
The following detailed information is displayed:
● PROFIBUS configuration
● Information on the slaves regarding their assignment to PLC/NC
● Detailed information on the slaves and the corresponding slots
● Information on the axes.
To obtain a quick overview, the current states of certain functions are represented by colored
lamps. The following general conventions are used for the meaning of the individual colors:
● Green: Function is OK.
● Red: Failure or no communication at the moment
● Gray: Function is not available for the present communication.

Diagnostic screen PROFIBUS-DP Configuration


The diagnostic screen PROFIBUS-Configuration provides general information about the
PROFIBUS-DP.
The following parameters are displayed:

Table 5- 1 Diagnostic screen Profibus-Configuration

Function/Part function Explanation/Meaning


Bus-configuration
Baudrate in MBd Transmission rate
Cycle time in msec Configured bus-cycle time; also defines the position controller cycle at the same time
Synchronous part (TDX) configured time span for the cyclic data exchange within a PROFIBUS-DP cycle
in msec
Status
Configuration ok Status of the configuration.
• Green lamp: DP-Master is powered up.
• Red lamp: Error function/no communication
Bus status Current bus status is shown in this field. Each bus status is explained briefly in the screen.
Possible states are:
• POWER_ON
• OFFLINE
• CLEAR
• OPERATE
• ERROR

Basic Functions
302 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Service display PROFIBUS DP 840Di

Diagnostics screen of the DP slaves


This diagnostic screen provides an overview of the configuredd slaves and the slaves
identified on the bus.
The following information is offered:

Table 5- 2 Diagnostic screen Information about slaves

Function/Part function Explanation/Meaning


Slave no. (DP address) Configured DP address of the DP slave
Assignment It is shown, whether the DP slave is assigned to the NC or to the PLC.
• NC: e.g. one or more drives controlled by the NC.
• PLC: e.g. I/O peripherals or an axis controlled by the PLC.
active on the bus Shows, whether the DP slave has been identified on the bus.
• Green lamp: DP slave was identified at the PROFIBUS-DP and the data exchange is
working with the assigned component (NC or PLC)
• Red lamp: Error function/no communication
Synchr. with NC It is shown, whether the DP slave is running synchronously to NC on the bus.
• Green lamp: DP slave runs synchronously to NC at PROFIBUS-DP i.e. the equidistant data
exchange takes place.
• Gray lamp: DP slave is not assigned to NC but instead to PLC.
• Red lamp: Error function/no communication
Number of slots Number of configured slots within the DP slave
Details By pressing the button another diagnostic screen is opened, which contains the detailed
information for the respective DP slave.
Detailed information of the slots within a slave
Via the button Details the diagnostic screen of detailed information for the slave is opened.
This screen shows you detailed information about the slots assigned to the DP slave.
The field Slave shows you the most important information for the currently selected DP
slave.
The following information is offered for the slots:

Table 5- 3 Diagnostic screen Detailed information for slave

Function/Part function Explanation/Meaning


Slave
Slave no. (DP address) Configured DP address of the DP slave
Assignment It is shown, whether the DP slave is assigned to the NC or to the PLC.
• NC: e.g. one or more drives controlled by the NC.
• PLC: e.g. I/O peripherals or an axis controlled by the PLC.
Active on the bus Shows, whether the DP slave has been identified on the bus.
• Green lamp: DP slave was identified at the PROFIBUS-DP and the data exchange is
working with the assigned component (NC or PLC)
• Red lamp: Error function/no communication

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 303
Diagnostic Tools (D1)
Service display PROFIBUS DP 840Di

Function/Part function Explanation/Meaning


Synchronous It is shown, whether the DP slave is running synchronously to NC on the bus.
• Green lamp: DP slave runs synchronously to NC at PROFIBUS-DP i.e. the equidistant data
exchange takes place.
• Gray lamp: DP slave is not assigned to NC but instead to PLC.
• Red lamp: Error function/no communication
Slots
No. Slot number within the DP slave
I/O address I/O address in the I/O address area of the PLC assigned to this slot. For NC axes, the set and
the actual value must always be configured on the same I/O address.
logical drive no. Drive number specified in the NC machine date for the axis.
Length [byte] Length of the I/O area reserved for the slot in step 7 I/O address area
Type Specification, whether the slot is input, output or diagnostic slot. If the slot is assigned to an NC
axis, then the output is always denoted as setpoint value and the input always as actual value.
Machine axis Display of the name defined in the machine data for this slot. If the slot is not assigned to any
NC axis, <No NC-axis> is shown.
Telegram type The telegram type of the NC axis configured in the NC machine data. If the slot is not assigned
to any NC axis, the telegram type is not filled (-).
State Current state of slot. Displayed only for NC axes.
• Green: Slot used by NC, communication active
• Gray: No NC axis
• Red: Slot used by NC, communication currently not active

Basic Functions
304 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Service display PROFIBUS DP 840Di

Diagnostic screen for the axes


The diagnostic screen AxisInfo shows the axis-specific detailed infformation The diagnostic
screen enables an NC-oriented view of the axis information.
The following information is offered for the slots:

Table 5- 4 Diagnostic screen Axis Info

Function/Part function Explanation/Meaning


Machine axis Name of the axis defined in the NC-machine data
Output
Slave/Slot Configured routing
State Current state of slot.
Green lamp: Cyclic communication
Red lamp: (still) no cyclic communication
Telegram failures It is shown, how many telegram failures have occured since the NC-power up. This
value is an indication of the quality (susceptibility to faults) of the PROFIBUS-DP
strand.
Encoder 1
Slave/Slot Configurable routing
State Current state of slot.
Green lamp: Cyclic communication
Red lamp: (still) no cyclic communication
Telegram failures It is shown, how many telegram failures have occured since the NC-power up. This
value is an indication of the quality (susceptibility to faults) of the PROFIBUS-DP
strand.
Type Display of the encoder type configured in the NC-machine data.
ABS: Absolute encoder
INC: Incremental value encoder
Encoder 2 (If configured, the same display as for encoder 1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 305
Diagnostic Tools (D1)
Communication log

5.7 Communication log

Log assistance
In event of a fault and when developing OEM applications, control logs may assist with the
analysis.

Logs and version

Communication log
The communication errors which have occurred between the HMI and NC are displayed in
chronological order via the soft key Comm. log in the "Diagnostics" operating area This error
list assists developers of OEM applications in localizing sporadic errors. The list has no
relevance for normal operation.

Logbook
The logbook display selected by means of soft key Logbook in the "Diagnostics" operating
area automatically lists details of all alterations to the control that are relevant for the system
(e.g. changes in access level).
For SINUMERIK 840Di, the logbook is displayed in 840Di Start-Up.

Version
in case of service, the integrated HMI or NC software version can be read (Operating area
"Diagnosis" under the Version) softkey.
The software version of each software module is recorded additionally in a list.

Basic Functions
306 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
PLC status

5.8 PLC status


PLC status signals can be checked and altered via the operator panel in the "Diagnostics"
operating area.

Application
The end customer or service personnel can use this function on site without a programming
device to do the following:
● Check the input and output signals of the PLC I/Os.
● Carry out limited troubleshooting
● Check the interface signals for diagnostic purposes.

Operation
For information about status display operation and changing PLC signals, refer to the
Operating Manual for the relevant HMI software.

Status display
The status of the following data can be displayed on the operator panel.
● Interface signals from the machine control panel
● Interface signals to the machine control panel
● Interface signals between the NCK and PLC
● Interface signals between the HMI and PLC
● Data blocks (DB 0-127)
● Flags (FB 0-255)
● Timers (T 0-127)
● Counters (C 0-63)
● Inputs (IB 0-127)
● Outputs (QB 0-127)
For a breakdown of the interface signals (DBx, DBBy), refer to:
References:
/LIS2/ Lists (Volume 2)

Change in status
The status of the above signals can be changed for test purposes. Signal combinations are
also possible. A maximum of ten operands can be altered at any one time.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 307
Diagnostic Tools (D1)
Other diagnostics tools

5.9 Other diagnostics tools

611D commissioning tool


Using the 611D commissioning tool and archiving software, the control can be evaluated and
the control status can be saved.

611D commissioning tool


One of the functions of this program is to provide a tool
● for evaluating the most important values for the position, speed and current control
● for archiving drive and control data, and
● for analyzing the stated physical properties.
For handling and complete range of functions see:
References:
/IAD/ Installation Guide

Archiving of data
The PCIN software package can be used to archive machine data, setting data, part
programs, etc.
A description of how to use this can be found in the associated documentation:
References:
/PI/ PCIN 4.3

840Di Start-Up
For diagnosing the SINUMERIK 840Di, the WINDOWS program 840Di Start-Up can be
used. This provides information, e.g. on the current operating mode and the nodes of
PROFIBUS-DP.

Basic Functions
308 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Identifying defective drive modules

5.10 Identifying defective drive modules

Deactivate drives
Drives can be removed from the NC configuration using a piece of machine data.
Troubleshooting may involve a situation where a drive module (SIMODRIVE 611 digital)
displayed in an alarm text needs to be removed from the bus in order to determine whether
this module has caused the displayed error.
With machine datum:
MD13030 $MN_DRIVE_MODULE_TYPE,
individual modules can be removed from the NC-side drive bus configuration (the affected
axes are switched to simulation).

Note
You must remove the desired module from the drive bus configuration (SIMODRIVE 611
digital) before you activate the function. To do this, connect the drive so as to exclude the
module.
Since this internal modification to the machine configuration can result in damage to the
machine if implemented incorrectly, the axes are prevented from moving.
If Safety Integrated has been activated for the modules concerned, you must disable it
manually (safety, logged, EMERGENCY STOP scheme).

Remove drive module at NC end


A drive module (SIMODRIVE 611 digital) specified in an alarm text must be removed from
the bus:
1. Remove the module from the drive bus network
2. Set entries of the drive module in machine datum:
MD13030 $MN_DRIVE_MODULE_TYPE
to zero (zero-axis module).
3. Perform an NC RESET.
The axes which were controlled by the removed drive modules are now replaced by
simulated axes. The 611D bus with its drive modules is now in a state in which it could
normally move axes, but axis traversal has been disabled internally.
Alarm 300020 "Drive %1 removed for diagnostics" displays this status to the operator.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 309
Diagnostic Tools (D1)
Identifying defective drive modules

Restoring the initial configuration


After completing the diagnostics, the initial configuration on the drive bus must be restored:
1. Replace or re-install the removed drive module.
2. Change entries of the drive module in machine datum:
MD13030 $MN_DRIVE_MODULE_TYPE
back to the original values.
3. Perform an NC RESET.

Example
The 2-axis module with drive numbers "1" and "2" must be removed from a drive grouping.

Note
Before activating the function, the module in question must be removed from the drive bus
configuration
(SIMODRIVE 611 digital). To do this, connect the drive bus so as to exclude the module.
If Safety Integrated has been activated for the modules concerned, you must disable it
manually (safety, logged, EMERGENCY STOP scheme).

Table 5- 5 Bus configuration example

Module Drive no. Active Type Module type Power section code
1 10 1 ARM/MSD Axis 6
Left 1 1 SRM/FDD Axis 14
Right 2 1 SRM/FDD Axis 14
Left 4 1 HLA Axis
Right 5 1 ANA Axis
4 12 1 SLM Axis 11
5 11 1 PER DMP-C
Module "2" must now be removed:
● Machine datum:
MD13030 $MN_DRIVE_MODULE_TYPE
is to be selected on the "General MD" MD screen.
● DRIVE_MODULE_TYPE[0] = 1
DRIVE_MODULE_TYPE[1] = 2 <- set this entry to zero
DRIVE_MODULE_TYPE[2] = 2 <- set this entry to zero
DRIVE_MODULE_TYPE[3] = 2
DRIVE_MODULE_TYPE[4] = 2
DRIVE_MODULE_TYPE[5] = 1
DRIVE_MODULE_TYPE[6] = 9

Basic Functions
310 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Identifying defective drive modules

● After the changes, the table looks like this:


DRIVE_MODULE_TYPE[0] = 1
DRIVE_MODULE_TYPE[1] = 0
DRIVE_MODULE_TYPE[2] = 0
DRIVE_MODULE_TYPE[3] = 2
DRIVE_MODULE_TYPE[4] = 2
DRIVE_MODULE_TYPE[5] = 1
DRIVE_MODULE_TYPE[6] = 9
● Alarms 300020 "Drive 1 removed for diagnostics" and 300020 "Drive 2 removed for
diagnostics" are displayed.
Internally simulated drives are used for all axes which had settings on the removed drive
numbers. If the controller is engaged for the drives that are still installed, these drives
operate in the normal way. Interpolative traversal of all axes is disabled.

Note
If alarm 300003 "Axis xx drive yy incorrect module type zz" appears, then you have removed
only one part of a 2-axis module. In this case, you should check the module type in the drive
configuration display. "NO" axis type is shown for removed modules.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 311
Diagnostic Tools (D1)
Data lists

5.11 Data lists

5.11.1 Machine data

5.11.1.1 Drive-specific machine data

Number Identifier: $MD_ Description


1401 MOTOR_MAX_SPEED Speed for max. useful motor speed
1417 SPEED_THRESHOLD_X nx for 'nact < nx' signal
1418 SPEED_THRESHOLD_MIN nmin for 'nact < nmin' signal
1426 SPEED_DES_EQ_ACT_TOL Tolerance band for 'nset-nact' signal
1428 TORQUE_THRESHOLD_X Threshold torque
1602 MOTOR_TEMP_WARN_LIMIT Maximum motor temperature
1604 LINK_VOLTAGE_WARN_LIMIT DC link under voltage warning threshold
1620 PROG_SIGNAL_FLAGS Bits variable signal function
1621 PROG_SIGNAL_NR Signal number variable signal function
1622 PROG_SIGNAL_ADDRESS Address variable signal function
1623 PROG_SIGNAL_THRESHOLD Threshold variable signal function
1624 PROG_SIGNAL_HYSTERESIS Hysteresis variable signal function
1625 PROG_SIGNAL_ON_DELAY ON Delay variable signal function
1626 PROG_SIGNAL_OFF_DELAY OFF Delay variable signal function
1700 TERMINAL_STATE Status of binary inputs
1702 MOTOR_TEMPERATURE Motor temperature
1706 DESIRED_SPEED Speed setpoint
1707 ACTUAL_SPEED Speed actual value
1708 ACTUAL_CURRENT Smoothed current actual value

5.11.1.2 NC-specific machine data

Number Identifier: $MN_ Description


11410 SUPPRESS_ALARM_MASK Mask for suppressing special alarms
11411 ENABLE_ALARM_MASK Activation of special alarms
11412 ALARM_REACTION_CHAN_NOREADY Alarm reaction CHAN_NOREADY permitted
11413 ALARM_PAR_DISPLAY_TEXT Texts as alarm parameters (Siemens Rights)
11420 LEN_PROTOCOL_FILEX File size for protocol files (KB)
13030 DRIVE_MODULE_TYPE Module identifier (SIMODRIVE 611 digital)

Basic Functions
312 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Diagnostic Tools (D1)
Data lists

5.11.1.3 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


32200 POSCTRL_GAIN [n] Servo gain factor
32250 RATED_OUTVAL Rated output voltage
32260 RATED_VELO Rated motor speed
36010 STOP_LIMIT_FINE Exact stop fine
36030 STANDSTILL_POS_TOL Zero speed tolerance
36050 CLAMP_POS_TOL Clamping tolerance
36210 CTRLOUT_LIMIT Maximum speed setpoint
36300 ENC_FREQ_LIMIT[n] Encoder limit frequency
36400 CONTOUR_TOL Tolerance band contour monitoring
36500 ENC_CHANGE_TOL Max. tolerance for actual position value acquisition
37010 FIXED_STOP_TORQUE_DEF Clamping torque
43510 FIXED_STOP_TORQUE Fixed stop clamping torque

5.11.2 Setting data

5.11.2.1 Axis/spindle-specific setting data

Number Identifier: $SA_ Description


43510 FIXED_STOP_TORQUE Fixed stop clamping torque

5.11.3 Signals

5.11.3.1 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 16.0 - 16.2 Actual gear stages A, B, C
31, ... 21.0 - 21.2 Parameter set selection A, B, C
31, ... 21.3 - 21.4 Motor selection A, B
31, ... 21.7 Pulse enable

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 313
Diagnostic Tools (D1)
Data lists

5.11.3.2 Signals from axis/spindle

DB number Byte.Bit Description


31, ... 60.4 Referenced/synchronized 1
31, ... 60.5 Referenced/synchronized 2
31, ... 62.5 Fixed stop reached
31, ... 92.0 Setup mode active
31, ... 92.1 Ramp-up function generator quick stop
31, ... 92.2 Torque limit 2 active
31, ... 92.3 Speed setpoint smoothing active
31, ... 93.0 - 93.2 Active parameter set A, B, C
31, ... 93.3 - 93.4 Active motor A, B
31, ... 93.5 Drive Ready
31, ... 93.6 Speed controller integrator disabled
31, ... 93.7 Pulses enabled
31, ... 94.0 Motor temperature prewarning
31, ... 94.1 Heat-sink temperature prewarning
31, ... 94.2 Ramp-up function completed
31, ... 94.3 _'Md_'< Mdx
31, ... 94.4 _'nact_'< nmin
31, ... 94.5 _'nact_'< nx
31, ... 94.6 _'nact_'= nset

Basic Functions
314 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1) 6
6.1 Brief description

Customer benefit
The "Travel to fixed stop" function can be used for operations such as traversing tailstocks or
sleeves to an end limit position in order to clamp workpieces.

Features
● The clamping torque and a fixed stop monitoring window can be programmed in the part
program and can also be altered via setting data once the fixed stop has been reached.
● The "travel to fixed stop" function can be implemented for axes as well as for spindles
with axis-traversing capability.
● The function can be implemented for several axes simultaneously and parallel to the
motion of other axes.
● Torques or the power can be adjusted to a specific setting.
● Travel with limited torque/power (Force Control, FOC) can be activated.
● The "travel to fixed stop" functions can be enabled from synchronized actions.
● Block search with calculation, multi-channel (SERUPRO).
Move axes with FXS and FOC in simulation mode.
● Vertical axes can also be moved with FXS to a fixed stop.
● With SW 6.4 and higher, VDI signals can be used to set a REPOS offset for each axis and
display the FXS status currently active on the machine after the search target has been
located.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 315
Travel to Fixed Stop (F1)
General functionality

6.2 General functionality

6.2.1 Functional sequence, programming, parameterization

Programming
Travel to fixed stop is selected or deselected with the following commands:
FXS[Machine axis identifier]=1 (selected)
FXS[Machine axis identifier]=0 (deselected)
The commands are modal.
The clamping torque is set with command:
FXST[Machine axis identifier] = <Torque>
adjusted.
It is in % of the static torque for VSA of the drive:
(MD1118 MOTOR_STANDSTILL_CURRENT)
or in % of the engine torque for HSA drives:
(MD1130 MOTOR_NOMINAL_POWER)
entered.
The command is used for setting the width of the fixed stop monitoring window.
FXSW[machine axis identifier] = monitoring window
The unit is dependent on the default setting: mm, inch or degrees.

Channel axis identifier


Instead of the machine axis identifiers, it is also possible to use channel axis identifiers if the
channel axis identifiers are assigned exactly to one machine axis.
Restrictions:
Channel identifiers may not be used (option disabled) for machine axes which have an active
transformation or frame.
If the machine axis is a coupled axis (e.g. following axis), programming is prevented and
alarm 14092 "Incorrect axis type" is displayed.
The movement to the destination point can be described as a path or positioning axis
movement. With positioning axes, the function FXS can be performed across block
boundaries. The function may also be selected for several machine axes simultaneously.
The FXST and FXSW commands are optional.
The travel path and the command which activates that function must be programmed in one
block (exception: Synchronized actions).

Basic Functions
316 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Examples

With machine axis identifiers

X250 Y100 F100 FXS[X1]=1


X250 Y100 F100 FXS[X1]=1 FXST[X1]=12.3
X250 Y100 F100 FXS[X1]=1 FXST[X1]=12.3 FXSW[X1]=2 ; mm
X250 Y100 F100 FXS[X1]=1 FXSW[X1]=2 ; mm

References:
/PG/, "Programming Manual: Fundamentals"

Channel axis identifier with unambiguous machine axis assignment


For the purpose of illustrating the differences in programming, chanel axis X is programmed
as the image of machine axis AX1 [or X1 (Name in machine parameter:
MD10000 $MN_AXCONF_MACHAX_NAME_TAB)].

Programming with machine axis identifiers


FXS[X1] = 1 ; Selecting X1
FXST[X1] = 10 ; New torque for X1
FXSW[X1] = 5 ; New window for X1

Programming with channel axis identifiers


FXS[X] = 1 ; Selecting X ->X1
FXST[X] = 10 ; New torque X ->X1
FXSW[X] = 5 ; New window for X -> X1

All four of the following programming lines have the same effect when the channel axis X is
imaged on the machine axis AX1, X1:

Z250 F100 FXS[AX1]=1 FXST[AX1]=12.3 FXSW[AX1]=2000


Z250 F100 FXS[X1]=1 FXST[X1]=12.3 FXSW[X1]=2000
Z250 F100 FXS[X]=1 FXST[X]=12.3 FXSW[X]=2000
Z250 F100 FXS[X]=1 FXST[X1]=12.3 FXSW[AX1]=2000

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 317
Travel to Fixed Stop (F1)
General functionality

Functional sequence
The function is explained by the example below (sleeve is pressed onto workpiece).

$FWXDOSRVLWLRQDIWHUBWUDYHO
WRIL[HGVWRS

)L[HGVWRS 6WDUWSRVLWLRQ
3URJU(QG PRQLWRULQJZLQGRZ
SRVLWLRQ

Figure 6-1 Example of travel to fixed stop

Selection
The NC detects that the function "travel to fixed stop" is selected via the command
FXS[x]=1 and signals the PLC via the NST DB31, ... DBX62.4 ("Activate travel to fixed
stop") that the function has been selected.
If the machine data:
MD37060 FIXED_STOP_ACKN_MASK
(Monitoring of PLC acknowledgments for travel to fixed stop)
is set correspondingly, the acknowledgement of the PLC via the NST DB31 is, ... DBX3.1
("Enable travel to fixed stop") is waited for.
The programmed target position is then approached from the start position at the
programmed velocity. The fixed stop must be located between the start and target positions
of the axis/spindle. A programmed torque limit is effective from the start of the block, i.e. the
fixed stop is also approached with reduced torque. Allowance for this limitation is made in
the NC through an automatic reduction in the acceleration rate.
If no torque has been programmed in the block or since the start of the program, then the
value is valid in the axis-specific machine data:
MD37010 $MA_FIXED_STOP_TORQUE_DEF
(Default setting for clamping torque)

Basic Functions
318 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Fixed stop reached


As soon as the axis comes into contact with the mechanical fixed stop (workpiece), the
closed-loop control in the drive raises the torque so that the axis can move on. The torque
rises up to the programmed limit value and then remains constant.
The "Fixed point reached" status can be calculated as follows depending on the machine
data:
MD37040 $MA_FIXED_STOP_BY_SENSOR (fixed stop recognition by sensor):
● FIXED_STOP_BY_SENSOR = 0
The "Fixed stop reached" status is achieved when the axial contour deviation (=
difference between actual and expected following error) has exceeded the value set in
machine data:
MD37030 $MA_FIXED_STOP_THRESHOLD (Threshold for fixed stop detection)
has exceeded.
● FIXED_STOP_BY_SENSOR = 1
External sensor signals the NC via the PLC, with the NST DB31, ... DBX1.2 ("Sensor
fixed stop"), the state "Fixed stop reached".
● FIXED_STOP_BY_SENSOR = 2
The "Fixed stop reached" status is active either when the status has been detected by the
contour monitoring function or when the external sensor signals this status by a signal
change from 0 " 1 to (DB31,...DBX 1.2).
The axis contour deviation is explained in:
References:
/FB1/ Function Manual Basic Function; Diagnostics tool (D1)

Internal processes
Once the NC has detected the "Fixed stop reached" status, it deletes the distance-to-go and
the position setpoint is made to follow. The controller enabling command remains active.
Subsequently the PLC is through the NST DB31, ... DBX62.5 ("Fixed stop reached")
informed.
If the machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK
is set correspondingly, the acknowledgement of the PLC via the NST DB31 is, ... DBX1.1
("Acknowledge fixed stop reached") is waited for.
The NC then executes a block change or considers the positioning motion to be completed,
but still leaves a setpoint applied to the drive actuator to allow the clamping torque to take
effect.
The fixed stop monitoring function is activated as soon as the stop position is reached.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 319
Travel to Fixed Stop (F1)
General functionality

Monitoring window
If no fixed stop monitoring window was programmed in the block or from program start, then
the value set in the machine data:
MD37020 $MA_FIXED_STOP_WINDOW_DEF
(Default for fixed stop-monitoring window)
is valid.
If the axis leaves the position it was in when the fixed stop was detected, then alarm 20093
"Fixed stop monitoring has responded" is displayed and the "Travel to fixed stop" function
deselected.
The window must be selected by the user such that the alarm is activated only when the axis
leaves the fixed stop position.

Enabling the fixed stop alarms


With the machine data:
MD37050 $MA_FIXED_STOP_ALARM_MASK
enabling the fixed stop alarms can be established as follows:

MD37050 = 0 Fixed stop not reached (suppress Alarm 20091)


MD37050 = 2 Fixed stop not reached (suppress alarm 20091) and fixed stop aborted
(suppress alarm 20094)
MD37050 = 3 Fixed stop aborted (suppress alarm 20094)
All other permissible values of 7 or less do not suppress any alarms.
Using the part program command NEWCONF a new setting can be activated.

Fixed stop is not reached


If the programmed end position is reached, without detecting the state "fixed stop reached",
then depending on the state of the machine data:
MD37050 $MA_FIXED_STOP_ALARM_MASK (Release of fixed stop alarms)
the alarm 20091 "Fixed stop not reached" is output.

Function abort
If the "Travel to fixed stop" function is aborted owing to a pulse cancellation command,
cancelation of PLC acknowledgments or a Reset in the approach block, the display or
suppression of alarm 20094 can be controlled via machine data:
MD37050m $MA_FIXED_STOP_ALARM_MASK

Basic Functions
320 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Abort without alarm


The travel to fixed stop can be aborted by the PLC in the approach block without triggering
an alarm (for example, when the operator actuates a key), if in the machine data:
MD37050 $MA_FIXED_STOP_ALARM_MASK
the alarm 20094 is suppressed.
The Travel to fixed stop function is deselected in response to both "Fixed stop not reached"
and "Fixed stop aborted".

Interrupts
If the fixed stop position is not reached when the function is active, alarm 20091 "Fixed stop
not reached" is output and a block change executed.
If a travel request (e.g. from the part program, the PLC, from compile cycles or from the
operator panel) is provided for an axis after the fixed stop has been reached, the alarm
20092 "Travel to fixed stop still active" is output and the axis is not moved.
If an axis has reached the fixed stop and is then moved out of this position by more than the
value specified in
SD FIXED_STOP_WINDOW (Fixed stop monitoring window)
from the position, then the alarm 20093 "Standstill monitoring has triggered at the stop" is
given, the function "Travel to fixed stop" for this axis is deselected and the system variable is
set $AA_FXS[x]=2.

No termination during alarm


"Travel to fixed stop" remains active from now on for alarms,
if the bit values in the machine data:
MD37052 $MA_FIXED_STOP_ALARM_REACTION
were set.
IS "Mode group ready" (DB11, ... DBX6.3) remains active.

Alarm suppression after new programming


Travel to fixed stop can be used for simple measuring processes.
For example, it is possible to carry out a check for tool breakage by measuring the tool
length by traversing onto a defined obstacle. To do so, the fixed stop alarm must be
suppressed. When the function for clamping workpieces is then used "normally," the alarm
can be activated using part program commands.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 321
Travel to Fixed Stop (F1)
General functionality

Sequence in case of a fault or abnormal termination


The NST DB31, ... DBX62.4 ("Activate travel to fixed stop") is reset.
Depending on the machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
DB 31, ... DBX3.1 ("Enable travel to fixed stop") is waited for.
The torque limitation is then canceled and a block change executed.

Deselection
The NC recognizes the function deselection via programming of the command FXS[x]=0.
Then an advance stop (STOPRE) is internally released, since it can't be forseen where the
axis will be after deselection.
The torque limitation and monitoring of the fixed stop monitoring window are canceled.
The NST DB31, ... DBX62.4 ("Activate travel to fixed stop") and DB31, ... DBX62.5 ("Fixed
stop reached") are reset.
Depending on the machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
DB 31, ... DBX3.1 ("Enable travel to fixed stop").and/or
DB 31, ... DBX1.1 ("Acknowledge fixed stop reached") is waited for.
The axis will then change to position control. The follow-up mode of the position setpoints is
ended and a synchronization to the new actual position is carried out.
A programmed traverse motion can then be executed. This motion must lead away from the
fixed stop or else the stop or even the machine may sustain damage.
A block change is executed after the target position has been reached.

Multiple selection
A selection may only be carried out once. If the function is called once more due to faulty
programming (FXS[Axis]=1) the alarm 20092 "Travel to fixed stop still active" is initiated.

Basic Functions
322 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Block-related synchronized actions


By programming a block-related synchronized action, travel to fixed stop can be connected
during an approach motion.
Programming example:

N10 G0 G90 X0 Y0
N20 WHEN $AA_IW[X]>17 DO FXS[X]=1 ; If X reaches a position greater
N30 G1 F200 X100 Y110 ; 17mm FXS is activated

Changing the clamping torque and fixed stop monitoring window


The clamping torque and the monitoring window can be changed with the commands
FXST[x] and FXSW[x]. The changes take effect before traversing movements in the same
block.
Programming of a new fixed stop monitoring window causes a change not only in the
window width but also in the reference point for the center of the window if the axis has
moved prior to reprogramming. The actual position of the machine axis when the window is
changed is the new window center point.

Terminal 663 with MD37002 controllable


With the machine data:
MD37002 $MA_FIXED_STOP_CONTROL
the response in the case of pulse inhibit at the stop is controlled.
Deleting the pulses by terminal 663 or the "Pulse enable" IS DBX31, ...DBX21.7 will not
abort the function. As a result, the drive will press against the fixed stop again without any
further operating action when the machine is restarted.
The rise time of the torque corresponds to the time needed by the current controller of the
drive to reach the limitation again.
If the pulses are deleted when a deselection is active (waiting for PLC acknowledgments),
the torque limit will be reduced to zero. If the pulses are reactivated during this phase, torque
is no longer built up. Once the deselection has been completed, you can continue traversing
as normally.

FXS commands programmable in synchronized actions


The part program commands FXS, FXST and FXSW can be programmed in synchronized
actions/technology cycles.
The function FXS[x]=1 can also be activated without movement; the torque is limited
immediately. As soon as the axis is moved via a setpoint, the limit stop monitor is activated.
In static and blockrelated synchronized actions, the same commands FXS, FXST, FXSW can
be used as in the normal part program run. The values assigned can result from a
calculation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 323
Travel to Fixed Stop (F1)
General functionality

Ramp for torque limitation with MD37012


A ramp has been implemented so that the setting of a torque limit is not to jerky.
For this in the machine data:
MD37012 $MA_FIXED_STOP_TORQUE_RAMP_TIME
defining the length of the ramp until the new torque limit is reached.

6.2.2 Response to RESET and function abort

Response to RESET
During selection (fixed stop not yet reached) the function FXS can be aborted with RESET.
The termination is carried out such that an "almost achieved" fixed stop (setpoint already
beyond the fixed stop, but still within the threshold for the fixed stop detection) will not result
in damage.
This is achieved by synchronizing the position setpoint to the new actual position. As soon
as the fixed stop is reached, the function remains operative even after RESET.

Function abort
A function abort can be triggered by the following events:
● EMERGENCY STOP:
– With an 840D control, the NC and drive are disconnected from the supply after
EMERGENCY STOP, i.e. the PLC must react.
– With an 840Di control, the NC and drive are disconnected from the supply after
EMERGENCY STOP, i.e. the PLC must react.

CAUTION
Make sure that after canceling the function
"travel to fixed stop" by "EMERGENCY STOP," no dangerous machine situation
(MD37002 $MA_FIXED_STOP_CONTROL e.g. canceling pulse disable) can arise.

● The fixed stop monitoring function responds in the case of:


– Exit from fixed stop position by axis
– Tool breakage
– Pulse disable

Basic Functions
324 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

6.2.3 Block search response

Block search with calculation


The response is as follows:
● If the target block is located in a program section in which the axis must stop at a fixed
limit, then the fixed stop is approached if it has not yet been reached.
● If the target block is located in the program section in which the axis must not stop at a
fixed limit, then the axis leaves the fixed stop if it is still positioned there.
● If the desired fixed stop status is reached, alarm message 10208 "press NC Start to
continue the program" is output. The program can be continued after pressing NC Start to
acknowledge.
● At the start of the target block, FXST[x] and FXSW[x] are set to the same value as they
would have during normal program processing.

Block search without calculation


The commands FXS, FXST and FXSW are ignored.

FOC
FOCON/FOCOF is activated modally. It is already active in the approach block.

SERUPRO

Block search with calculation, multi-channel


The block search in program test mode is designated SERUPRO and is derived from the
"Search-Run by Program test." This search mode allows the user a multi-channel block
search with calculation of all required status data from the previous history.
The PLC interface is updated in this block search and matching processes, which cover the
interaction of several channels executed within the framework of this block search correctly.

Search process with FXS and FOC


The user selects FXS or FOC in a program area of the searched target block in order to
acquire all states and functions of this machining last valid. The NC will start the selected
program in Program test mode automatically. After the target block has been found, the NC
stops at the beginning of the target block, deselects Program test internally again and
displays the Stop condition "Search target found" in its block display.
If FXS "travel to fixed stop" is located between the beginning of the program and the search
target, the instruction is not really executed by the NC. The motion is only simulated up to
the programmed end point.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 325
Travel to Fixed Stop (F1)
General functionality

CAUTION
SERUPRO approach does not really take the statementFXS into account. The approach to
the programmed end position of the FXS block is only simulated without torque limitation.

The user can log the turning on and turning off of FXS in the part program. If necessary, the
user can start an ASUB in order to activate or deactivate FXS in this SERUPRO-ASUP.

$AA_FXS and $VA_FXS


In SW 6.2 and higher, the meaning of system variable $AA_FXS is redefined for SERUPRO
only and completely replaced by variable $VA_FXS. Variables $AA_FXS and $VA_FXS have
the same values continuously outside the SERUPRO function.

Description NCK Variables


Axis not at fixed stop $AA_FXS = 0 and $VA_FXS = 0
Fixed stop successfully approached $AA_FXS = 1 and $VA_FXS = 1
Approach to fixed stop failed $AA_FXS = 2 and $VA_FXS = 2
Travel to fixed stop selection active $AA_FXS = 3 and $VA_FXS = 3
Fixed stop detected $AA_FXS = 4 and $VA_FXS = 4
Travel to fixed stop deselection active $AA_FXS = 5 and $VA_FXS = 5

Basic Functions
326 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Course of values
Course of values of system variables $VA_FXS[ ] with values 1 to 5

'HVHOHFWEORFNZLWK);6>[@ 

,6$FWLYDWHWUDYHOWRIL[HGHQGVWRS

7HUPLQDOFODPSDFWLYH

,6(QDEOHWUDYHOWRIL[HGVWRS

,6)L[HGVWRSUHDFKHG

7HUPLQDOFODPSDFWLYH

,6$FNQRZOHGJHIL[HGVWRSUHDFKHG

6HWYHORFLW\
7DUJHWSRVLWLRQGHVHOHFWHGUHFRUG

5HFRUGFKDQJH

DFFHOHUDWLRQDFFRUGLQJWR0'0$;B$;B$&&(/
7HUPLQDOFODPSLVVWLOODFWLYHZLWKRXWFKDQJHRYHURIWHUPLQDOFODPS

Figure 6-2 Diagram for FXS with a digital drive (611 digital)

$AA_FXS Simulate axis traversal


System variable $AA_FXS displays the current status of program simulation "program-
sensitive system variable."

Example
If in the SERUPRO process axis Y traversal is simulated with FXS[Y]=1, then $AA_FXS has
a value of 3.
If in the SERUPRO process axis Y traversal is simulated with FXS[Y]=0, then $AA_FXS has
a value of 0.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 327
Travel to Fixed Stop (F1)
General functionality

During simulation with SERUPRO, $AA_FXS cannot have the values 1, 2, 4, 5, since the
actual status of $VA_FXS "travel to fixed stop" can never be detected.

Note
The state $AA_FXS = 1 is never reached during the SERUPRO operation. This means that
other program branches can be processed which will produce different results due to the
simulation.

If after the SERUPRO process axis Y is traversed again, then variables $AA_FXS and
$VA_FXS are assigned the same values again.

$VA_FXS Real machine status


Variable $VA_FXS always describes the real machine status.
In this way, the actual existing machine status of the corresponding axis with $VA_FXS is
displayed.

Setpoint/actual status comparison


The two system variables $AA_FXS and $VA_FXS can be used to compare the setpoint and
actual states in the part program. The SERUPRO ASUB routine is then as follows:
SERUPRO ASUP
Asup fxsSeruproAsup.mpf
The setpoint and actual states are compared for the
;REPOSA block FXS to correspondingly activate or deactivate.

N1000 WHEN ($AA_FXS[X]==3) AND ($VA_FXS[X]==0) DO FXS[X]=1


N2000 WHEN ($AA_FXS[X]==0) AND ($VA_FXS[X]==1) DO FXS[X]=0
N1020 REPOSA

REPOS display Offset


Once the search target has been found, for each axis of the FXS-state prevailing on the
machine through the axis VDI-signals:
NST DB31, ... DBX62.4 ("Activate travel to fixed stop").
and
NST DB31, ... DBX62.5 ("Fixed stop reached")
is displayed.

Basic Functions
328 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Example
If the machine is at the fixed stop, and the block search has reached a block after
deselection of FXS , the new target position is displayed via NST DB31, ... DBX62.5 ("Fixed
stop reached") as REPOS offset.

FXS fully automatically in REPOS


With REPOS the functionality of FXS is repeated automatically and designated FXS-REPOS
below. This sequence is comparable to the program "fxsSeruproAsup.mpf." Every axis is
taken into account and the torque last programmed before the search target is applied.
The user can treat FXS separately in a SERUPRO-ASUP.
The following then applies:
Every FXS action executed in SERUPRO-ASUP automatically takes care of
$AA_FXS[X] == $VA_FXS[X].
This deactivates FXS-REPOS for axis X.

Deactivate FXS REPOS


FXS-REPOS is deactivated by:
● an FXS synchronous action which refers to REPOSA
Or
● $AA_FXS[X] == $VA_FXS[X] in SERUPRO_ASUP.

Note
A SERUPRO-ASUP without FXS handling or no SERUPRO-ASUP results in fully
automatic FXS-REPOS.

CAUTION
FXS-REPOS moves all path axes in a path grouping to the target position. Axes with and
without FXS treatment thus traverse together with the G code and feedrate valid at the
time the target block is processed. As a result, the fixed stop may be approached in
rapid traverse(G0) or higher velocity.

FOC fully automatically in REPOS


The FOC-REPOS function behaves analogously to the FXS-REPOS function.

Note
A continuously changing torque characteristic cannot be implemented with FOC-REPOS.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 329
Travel to Fixed Stop (F1)
General functionality

Example
A program moves axis X from 0 to 100 and activates FOC every 20 millimeters for 10
millimeters at a time. This torque characteristic is generated with nonmodal FOC and
therefore cannot be traced by FOC-REPOS. FOC-REPOS will traverse axis X from 0 to 100
with or without FOC.
For programming examples of FXS "travel to fixed stop," please see:
References:
/FB1/ Function Manual Basic Functions; Mode Group, Channel, Program Operation (K1);
Section: Program test

6.2.4 Miscellaneous

Setting data
The following axis-specific setting data are provided for the "Travel to fixed stop" function:
SD43500 $SA_FIXED_STOP_SWITCH (selection of travel to fixed stop)
SD43510 $SA_FIXED_STOP_TORQUE (clamping torque for travel to fixed stop)
SD43520 $SA_FIXED_STOP_WINDOW (fixed stop monitoring window)
The setting data are effective only when the axis has reached the fixed stop.
The status of the setting data is displayed via the operator panel in the "Parameters" area.
The commands FXS[x], FXST[x] and FXSW[x] effect a blocksynchronous change in
these setting data.
If FXST[x] and FXSW[x] are not programmed, then, if "Travel to fixed stop" is activated, the
defaults from the following machine data is copied to the corresponding setting data:
MD37010 $MA_FIXED_STOP_TORQUE_DEF (default for fixed stop clamping torque)
MD37020 $MA_FIXED_STOP_WINDOW_DEF (default for fixed stop monitoring window)
The setting data for clamping torque and fixed stop monitoring window can be changed by
the operator and via the PLC. It is thus possible to specify a higher or lower clamping torque
or a modified fixed stop monitoring window after the fixed stop has been reached.

Changing the clamping torque using the ramp and values greater than 100%
A clamping torque change is transferred to the drive step-like. It is possible to specify a ramp
to always ensure that a modified torque limit is reached: The setting is done via the following
machine data:
MD37012 $MA_FIXED_STOP_TORQUE_RAMP_TIME

Basic Functions
330 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Clamping torque greater than 100%


Values greater than 100% are only practical for a short time for SD43510
$SA_FIXED_STOP_TORQUE.
Irrespectively, the maximum torque is limited by the drive.
The drive machine dates have a limiting effect:
MD1103 Motor current
MD1104 maximum motor current
MD1105 Reduction in max. motor current
MD1230/1231 torque limiting value 1/2
For further information, please refer to the Configuration Manual SIMODRIVE Three-Phase
Motors for Feed and Main Spindle Drives and to the appropriate document regarding the
hydraulic module /FBHLA/.
References:
Function Manual, HLA Module

Status query in the part program


System variable $AA_FXS[x] indicates the status of the "travel to fixed stop" function.
It has the following coding:

$AA_FXS=0 Axis not at fixed stop.


$AA_FXS=1 Fixed stop has been approached successfully
(axis is within fixed stop monitoring window).
$AA_FXS=2 Approach to fixed stop has failed
(axis is not at fixed stop).
$AA_FXS=3 Travel to fixed stop activated.
$AA_FXS=4 Fixed stop detected.
$AA_FXS=5 Travel to fixed stop is deselected.
The deselection is not yet completed.
Query of the system variables in the part programs initiates a preprocessing stop.
As a result of the status query in the part program, it is possible, for example, to react to an
erroneous operational sequence of the "Travel to fixed stop" function.
Example:
MD37050 $MA_FIXED_STOP_ALARM_MASK = 0
⇒ No alarm is generated in response to an error. A block change therefore takes place and
the error scenario can be evaluated via the system variable

Program code
X300 Y500 F200 FXS[X1]=1 FXST[X1]=25 FXSW[X1]=5
IF $AA_FXS[X1]=2 GOTOF FXS_ERROR
G01 X400 Y200

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 331
Travel to Fixed Stop (F1)
General functionality

Inoperative IS signals
The following NC/PLC interface signals (PLC → NCK) have no effect for axes at end stop
until deselected (incl. traversing motion):
● DB31, ... DBX1.3 (axis/spindle disable)
● DB31, ... DBX2.1 (controller enable)

Actual position at fixed stop


System variable $AA_IM[x] can determine the actual position of the machine axis, e.g. for
test purposes after successful "Travel to fixed stop."

Combination with other functions


"Measure with deletion of distance to go" (command MEAS) and "travel to fixed stop" cannot
be programmed at the same time in one block.
Exception:
One function is acting on a path axis while the other is acting on a positioning axis or both
functions are acting on positioning axes.

Contour monitoring
The axis contour monitoring function is inoperative while "Travel to fixed stop" is active.

Positioning axes
When "Travel to fixed stop" is applied toPOSA axes, block changes are made independently
of the fixed stop motion.

Vertical axes
The "Travel to fixed stop" function can be used for vertical axes even when alarms are
active.
Should the traversal of vertical axes be aborted as a result of an FXS alarm when "Travel to
fixed stop" is active, the relevant drives are not disconnected from the supply via the VDI
interface.
This functionality has the same effect on vertical axes as an electronic weight compensation
and can be configured via machine data:
MD37052 $MA_FIXED_STOP_ALARM_REACTION

MD37052
With the machine data MD37052 $MA_FIXED_STOP_ALARM_REACTION, the drive is not
disconnected from the power supply by setting the bits, even when an alarm is generated, as
the NC/PLC interface signal DB11 DBX6.3 (mode group ready) remains active.
Bit value=0:
The alarms have an effect on FXS (drive becomes disconnected as previously).

Basic Functions
332 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

NST DB11 DBX6.3 (mode group ready) is deleted.


Bit value=1:
The alarms have no effect on FXS.
NST DB11 DBX6.3 (mode group ready) remains active.

Bit Alarm Meaning


0 20090 Travel to fixed stop cannot be programmed
1 20091 Fixed stop is not reached.
2 20092 Travel to a fixed stop active.
3 20093 Standstill monitoring on fixed stop is triggered.
4 20094 Travel to fixed stop aborted.

6.2.5 Supplementary conditions for expansions

Response to pulse blocking


The cancellation of pulse enable either through terminal 663 or through NST DB31, ...
DBX21.7 ("Pulse enable") is denoted below as pulse inhibit.
The machine data:
MD37002 $MA_FIXED_STOP_CONTROL
can be used to influence the interaction of travel to fixed stop and pulse blocking.
Bit 0: Response in case of pulse blocking at stop as follows:

Bit 0 = 0 Travel to fixed stop aborted.


Bit 0 = 1 Travel to fixed stop is interrupted,
i.e. the drive becomes powerless.
Once the pulse blocking is canceled again, the drive will press at the limited torque again.
The torque is actuated step-like.
At the fixed stop, the drive can be controlled either via:
● NST DB31, ... DBX21.7 ("Pulse enable")
or
● Drive monitor 663 pulse enable
The NC evaluates the NST DB31, ... DBX21.7 ("Pulse enable") by itself.
Depending on the drive machine data:
MD1012 $MD_FUNC_SWITCH
In the case of FXS the NC responds to a change of state of the terminal 663 as follows:

Bit 2 = 0 The NC does not receive the status of terminal 663.


Bit 2 = 1 The NC does not receive the status of terminal 663.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 333
Travel to Fixed Stop (F1)
General functionality

Terminal 663
When pulse enabling is canceled by terminal 663, the drive is de-energized and coasts to a
standstill immediately.
In the case of:
MD1012 $MD_FUNC_SWITCH, Bit 2 = 0
this is not signalled to the NC.
The status can be checked in the line "Pulse enable" (terminal 663) in service display service
drive.

Note
Travel to fixed stop can be aborted by blocking the pulse of NST " DB31, ...DBX21.7 ("Pulse
enable") or the terminal 663 only, if:
MD37002 $MA_FIXED_STOP_CONTROL, Bit 0 = 0
and
MD1012 $MD_FUNC_SWITCH, Bit 2 = 1
is met.
If on the one hand FXS should be interrupted, and on the other hand, "Travel to fixed stop",
the following settings are required:
MD37002 $MA_FIXED_STOP_CONTROL, Bit 0 = 0
and
MD1012 $MD_FUNC_SWITCH, Bit 2 = 0.

Programming FXS in synchronized actions


The function is not available for analog axes (PLC acknowledgment cannot be awaited).
Select FXS[ ]=1:
The following signal interfaces are set:
Message to PLC:
NST DB31, ... DBX62.4 ("Activate travel to fixed stop").
The FXS selection command can only be used in systems with digital drives (VSA, HSA,
HLA).
Following condition must be observed:
MD37060 $MA_FIXED_STOP_ACKN_MASK, Bit 0 = 0
Bit 0 = 1 (waiting for PLC acknowledgement) must not be set, otherwise, an interpolator
stop would be required to acknowledge the signal, interrupting the movement.

Basic Functions
334 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Deselect FXS[ ]=0:


The following signal interfaces are reset:
Message to PLC:
NST DB31, ... DBX62.4 ("Activate travel to fixed stop").
The machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK
must contain the value zero for signal deselection without motion stop.

Without ramp
The torque limit is changed without taking into account the ramp if:
● FXS is activated with (FXS[]=1), to make sure that the reduction is activated
immediately (especially for synchronized actions).
● The drive needs to be de-energized as quickly as possible in the event of a fault.

Selection of FXS with G64


In the machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK
Bit 0 must be = 0 (Do not wait for PLC-input signal "Enable travel to fixed stop"), since the
selection of FXS may not initiate a motion stop.

Modify the torque FXST


The clamping torque can already be modified when approaching the stop.
The torque limit FXST acts in addition to the acceleration limitation with ACC.
The new torque taking into account the ramp
(MD37012 $MA_FIXED_STOP_TORQUE_RAMP_TIME)
becomes active one interpolation cycle after the change in the drive.
A change of the effective torque can be checked by reading the synchronized action variable
$VA_TORQUE[axis].

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 335
Travel to Fixed Stop (F1)
General functionality

6.2.6 Travel with limited moment/force FOC:

Function
For applications in which torque or force are to be changed dynamically depending on the
travel or on the time or on other parameters (e.g. pressing), the following functionalityFOC
(Force Control) is provided.
Force/travel or force/time profiles are thus possible using the "Interpolation cycle" resolution.
The function allows torque/force to be modified at any time using synchronized actions.
The function can be activated modally or block-related.

Modal activation (FOCON/FOCOF)


The activation of the function after POWER_ON and RESET is determined by the machine
data:
MD37080 $MA_FOC_ACTIVATION_MODE

Table 6- 1 Controlling the initial setting of the modal limitation of torque/force

After Value Effect


Bit 0 Power On 0 FOCOF
1 FOCON
Bit 1 RESET 0 FOCOF
1 FOCON

FOCON: Activation of the modally effective torque/force limitation


FOCOF: Disable torque/force limitation
The modal activation acts beyond the program end.
If already programmed, it is effective with FXST set torque/force.
FXST can be programmed irrespectively of FOCON; it comes into effect, however, only after
the function has been activated.

Programming
The programming of the axis is carried out in square brackets.
The following are permissible:
● Geometry axis identifiers
● Channel axis identifiers
● Machine axis identifiers

Basic Functions
336 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
General functionality

Example:

N10 FOCON[X] ; Modal activation of the torque limit


N20 X100 Y200 FXST[X]=15 ; X travels with reduced torque (15%)
N30 FXST[X]=75 X20 ; Changing the torque to 75%.
; X travels with this reduced torque.
N40 FOCOF[X] ; Disable torque limit

Block-related limit (FOC)


The part program command FOC activates the torque limit for a block.
An activation from a synchronized action takes effect up to the end of the current part
program block.

Priority FXS/FOC
An activation of FXS with FOC active has priority, i.e. FXS is executed.
A deselection of FXS will cancel the clamping.
A modal torque/force limitation remains active.
After PowerOn the activation takes effect with the machine data:
MD37010 $MA_FIXED_STOP_TORQUE_DEF.
This torque can be modified at any time by programmingFXST.

Synchronized actions
The language commands FOC, FOCON, FOCOF can also be programmed in synchronized
actions as the commands for "travel to fixed stop."

Determine FOC status


The activation status can be read at any time via the status variable $AA_FOC.
If FXS is also activated, the status is not changed.

0: FOC not active


1: FOC modal active
2: FOC block-related active

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 337
Travel to Fixed Stop (F1)
General functionality

Determine torque limit status


The system variables $VA_TORQUE_AT_LIMIT can be used at any time to read in systems
with digital drives (FDD, MSD, HLA) whether the currently active torque corresponds to the
given torque limit.

0: Effective torque less than torque limit value


1: Effective torque has reached the torque limit value

Restrictions
The function FOC is subject to the following restrictions:
● The change of the torque/force limitation representing itself as an acceleration limitation
is only taken into account in the traversing movement at block limits (see command ACC).
● Only FOC:
No monitoring is possible from the VDI interface to check that the active torque limit has
been reached.
● If the acceleration limitation is not adapted accordingly, an increase of the drag distance
during the traversing motion occurs.
● If the acceleration limitation is not adapted accordingly, the end-of-block position is
possibly reached later than specified in:
MD36040 $MA_STANDSTILL_DELAY_TIME.
The machine data:
MD36042 $MA_FOC_STANDSTILL_DELAY_TIME
is introduced for this and monitored in this status.

Possible application link and container axes


All axes that can be traversed in a channel, i.e. also link axes and container axes, can be
traversed to fixed stop.
References:
/FB2/ Function Manual Extension Functions; Several Control Panels on Multiple NCUs,
Distributed Systems (B3)
The status of the machine axis is kept in the case of a container switch, i.e. a clamped
machine axis remains at the stop.
If a modal torque limitation has been activated with FOCON, this is kept for the machine axis
even after a container switch.

Basic Functions
338 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

6.3 Travel to fixed stop with analog drives

6.3.1 SIMODRIVE 611 digital (VSA/HSA)

Selection
The NC detects that the function "travel to fixed stop" is selected via the command
FXS[x]=1 and signals the PLC via the interface signal DB31, ... DBX62.4 ("Activate travel to
fixed stop") that the function has been selected.
If the machine data:
MD37050 FIXED_STOP_ACKN_MASK
is set correspondingly, the acknowledgement of the PLC via the NST
DB 31, ... DBX3.1 ("Enable travel to fixed stop") is awaited.
and after that the function is started.
This acknowledgment is not required by the NC for digital drives.
The axis now traverses to the target position at the programmed velocity. At the same time,
the clamping torque (specified via FXST[x]) is transferred to the drive via the digital
interface, and this limits its effective torque. In addition, the acceleration is reduced
accordingly in the NC automatically acc. to FXST[x]).

Fixed stop reached


As soon as the axis reaches the fixed stop, the axial contour deviation increases.
If the threshold entered in the machine data
MD37030 FIXED_STOP_THRESHOLD
is exceeded or the NST signal DB31, ... DBX1.2 ("Sensor fixed stop") is set, the control
system detects that the fixed stop has been reached.
The NC will then delete the distance to go and will synchronize the position setpoint to the
current actual position value. The controller enabling command remains active.
Subsequently the NC triggers the NST DB31, ... DBX62.5 ("Fixed stop reached") on the
PLC.
If the machine data:
MD37060 FIXED_STOP_ACKN_MASK
is set correspondingly, the acknowledgement of the PLC via the NST DB31 is, ... DBX1.1
("Acknowledge fixed stop reached") is waited for.
This acknowledgment is not required by the NC for digital drives.
Then a block change is executed. The clamping torque continues to be applied.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 339
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

Fixed stop is not reached


If the programmed end position is reached, without the state "Fixed stop reached" being
recognized, then the torque limitation in the drive is cancelled through the digital interface
and the NST DB31, ... DBX62.4 ("Activate travel to fixed stop") is reset.
Depending on the machine data:
MD37060 FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
DB 31, ... DBX3.1 ("Enable travel to fixed stop") is awaited.
and then a block change is executed.

Deselection
The NC recognizes the function deselection via programming of the command FXS[x]=0.
Then an advance stop (STOPRE) is internally released, since it can't be forseen where the
axis will be after deselection.
The torque limitation and monitoring of the fixed stop monitoring window are canceled.
The NST DB31, ... DBX62.4 ("Activate travel to fixed stop") and DB31, ... DBX62.5 ("Fixed
stop reached") are reset.
Depending on the machine data:
MD37060 FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
DB 31, ... DBX3.1 ("Enable travel to fixed stop").and/or
("Acknowledge fixed stop reached") is waited for. DB 31, ... DBX1.1
The axis will then change to position control. The follow-up mode of the position setpoints is
ended and a synchronization to the new actual position is carried out.
A programmed traverse motion can then be executed. This motion must lead away from the
fixed stop or else the stop or even the machine may sustain damage.
A block change is executed after the target position has been reached.

Enabling the fixed stop alarms


With the machine data:
MD37050 FIXED_STOP_ALARM_MASK
enabling the fixed stop alarms can be established as follows:

MD37050 = 0 Fixed stop not reached (suppress Alarm 20091)


MD37050 = 2 Fixed stop not reached ( suppress alarm 20091) and fixed stop aborted
(suppress alarm 20094)
MD37050 = 3 Fixed stop aborted (suppress alarm 20094)
All other permissible values of 7 or less do not suppress any alarms.
Using the part program command NEWCONF a new setting can be activated.

Basic Functions
340 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

Terminal 663 with MD37002 controllable


With the machine data:
MD37002 FIXED_STOP_CONTROL
the response in the case of pulse inhibit at the stop is controlled.
Deleting the pulses by terminal 663 or the "Pulse enable" IS DBX31, ...DBX21.7 will not
abort the function. As a result, the drive will press against the fixed stop again without any
further operating action when the machine is restarted.
The rise time of the torque corresponds to the time needed by the current controller of the
drive to reach the limitation again.
If the pulses are deleted when a deselection is active (waiting for PLC acknowledgments),
the torque limit will be reduced to zero. If the pulses are reactivated during this phase, torque
is no longer built up. Once the deselection has been completed, you can continue traversing
as normally.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 341
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

Diagram
In the following diagram the progress of motor current, following error and NST signals for
DB31, ... DBX62.4 ("Activate travel to fixed stop") and DB31, ... DBX62.5 ("Fixed stop
reached") have been presented for digital drive (SIMODRIVE 611 digital).

6HOHFWUHFRUGZLWK);6>[@ 

,6$FWLYDWHWUDYHOWRIL[HGHQGVWRS

7HUPLQDOFODPSDFWLYH FXUUHQWOLPLWDWLRQ

,6(QDEOHWUDYHOWRIL[HGVWRS

6HWYHORFLW\
W &KDQJHRYHU
*

7UDFNLQJHUURU
0'),;('B6723B7+5(6+2/'

,6)L[HGVWRSUHDFKHG

7HUPLQDOFODPSDFWLYH

W &KDQJHRYHU ,6)L[HGVWRSUHDFKHG
DFNQRZOHGJH
5HFRUGFKDQJH

* acceleration appropriate
0'0$;B$;B$&&(/ 0'),;('B6723B$1$B72548(
7HUPLQDOFODPSLVVWLOODFWLYHZLWKRXWVKLIWLQJRIWHUPLQDOFODPS
t Changeover > 10 ms with 611-A (VSA)
!PVZLWK$ +6$

Figure 6-3 Diagram for FXS with a digital drive (611 digital)

Basic Functions
342 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

6.3.2 Travel to fixed stop with hydraulic drives SIMODRIVE 611 digital (HLA module)

Velocity/force control
If the function FXS (FXS[x]=1) is activated for the hydraulic module 611 digital (HLA
module), only a change from velocity control to force control takes place. Positioning from
the NC is no longer possible in this case.

NC
When traveling to fixed stop, the NC evaluates a torque/force limit acting in addition to the
limits set on the drive:
● Current
● Force/torque,
● Power, pull-out power
● Setup mode

Note
For relevant explanations on velocity control and force control as well as details about
adaptations for SIMODRIVE 611 digital or digital (HLA module), please see:
References:
/FBHLA/ Function Manual HLA module; drive functions firmware
/FB2/ Function Manual Extended Functions, Compensations (K3); Section: Electronic
weight compensation

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 343
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

6.4 Travel to fixed stop with analog drives

6.4.1 SIMODRIVE 611 analog (FDD)

Current/torque control
The torque control and limit mentioned in the following text is realized with
611 analog (VSA) as current control and -limit.

Fixed clamping torque


A fixed current limitation is preset in the drive actuator by means of a resistor circuit (or via
R12). This current limitation is activated by the control via a PLC output (which acts on
terminal 96 of the actuator), thus ensuring that a fixed clamping torque is available on the
axis.
Setpoints can be injected via terminals 56/14 or 24/20.

Programmable clamping torque


In this case, the PLC switches the drive actuator from speed-controlled into current-
controlled operation as soon as the fixed stop is reached.
Activation of terminal 22 causes the voltage level applied to terminals 20/24 to take effect as
a current setpoint rather than a speed setpoint.
The NC is thus able to specify a variable clamping torque.
Setpoints must be injected via terminals 24/20.
References:
/IAA/ Installation and Start-up Guide SIMODRIVE 611 Analog System

Selection
The NC detects that the function "travel to fixed stop" is selected via the command
FXS[x]=1 and signals the PLC via the IS "Activate travel to fixed stop" (DB31, ... DBX62.4)
that the function has been selected.
The PLC must then activate the current limitation on the actuator (terminal 96).
If the machine data:
MD37060 FIXED_STOP_ACKN_MASK
is set correspondingly, the acknowledgement of the PLC via the NST
"Enable travel to fixed stop" (DB31, ... DBX3.1) awaited
and after that the function is started.

Basic Functions
344 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

Note
(This acknowledgment should always be programmed for analog drives for safety reasons,
i.e. so that the motion is not started before the torque has been limited).

Subsequently the NC internally sets the torque limit on the value specified via the machine
data:
MD37070 FIXED_STOP_ANA_TORQUE
(Torque limit while approaching the fixed stop for analog drives).
This must correspond to the torque limit value activated via terminal 96.
In addition, the acceleration is automatically reduced in the NC according to the value in the
machine data:
MD37070 FIXED_STOP_ANA_TORQUE
The axis now traverses to the target position at the programmed velocity.

Fixed stop reached


As soon as the axis reaches the fixed stop, the axial contour deviation increases.
If the recorded threshold in the machine data:
MD37030 FIXED_STOP_THRESHOLD
is exceeded or the NST signal "sensor fixed stop" (DB31, ..DBX1.2) is set, the controller
recognizes that the fixed stop has been reached.
The position controller then responds by outputting a speed setpoint, corresponding to the
value set in the machine data:
MD37070 FIXED_STOP_ANA_TORQUE
The speed controller's output is limited by terminal 96, forcing the drive to the current limit by
means of this continuously applied setpoint.
The NC then deletes the remaining distance-to-go and forces the position setpoint to follow.
The controller enabling command remains active.
The NC then outputs IS "Fixed stop reached" (DB31 , ... DBX62.5) to the PLC.
If a programmable clamping torque input (via FXST[x] or setting data), is required from the
NC, then the PLC must switch the drive over from speed controlled to current controlled
operation.
To do so, it activates terminal 22 and switches off the current limitation (terminal 96) after a
period of 10 ms.
The torque set in the machine data:
MD37070 FIXED_STOP_ANA_TORQUE acts on the drive.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 345
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

If the machine data:


MD37060 FIXED_STOP_ACKN_MASK
is set correspondingly, the acknowledgement of the PLC via the NST
("Acknowledge fixed stop reached") (DB31, ... DBX1.1) is awaited and then the requested
clamping torque is transferred from the select block to the drive steplike.
Then a block change is executed. The clamping torque continues to be applied.

Fixed stop is not reached


If the programmed end position is reached, without the "fixed stop reached" status being
detected, then the internal torque limitation set in the machine data:
MD37070 FIXED_STOP_ANA_TORQUE
is cancelled and the NST signal "Activate travel to fixed stop".
(DB31, ... DBX62.4) is reset.
The PLC must then deactivate the current limitation (terminal 96).
Depending on the machine data:
MD37060 FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
"Enable travel to fixed stop" (DB31, ... DBX3.1) awaited
and then a block change is executed.

Deselection
The NC detects that the function has been deselected on the basis of commandFXS[x]=0
and specifies a speed or current setpoint of "0," i.e. zero clamping torque.
Then the NC resets IS "Activate travel to fixed stop" (DB31, ... DBX62.4) and "Fixed stop
reached" (DB31, ... DBX62.5).
If current-controlled operation is activated, the PLC must first switch on the current limitation
(terminal 96) and switch the drive over to speed-controlled operation (terminal 22) (a speed
setpoint of "0" is applied by NC).
Then current limitation must then be deactivated (terminal 96).
Depending on the machine data:
MD37060 FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
"Enable travel to fixed stop" (DB31, ... DBX3.1) and/or
("Acknowledge fixed stop reached") (DB31, ... DBX1.1) is awaited.
The axis then switches over to position control mode (follow-up mode is terminated) and
synchronization with the new actual position takes place.
The programmed travel motion is then executed.
A block change is executed after the target position has been reached.

Basic Functions
346 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

6.4.2 SIMODRIVE 611 analog (FDD)

Fixed clamping torque


A fixed clamping torque is implemented by entering a fixed torque limitation in a free gear
stage in the drive actuator (setting parameter 039). When the "Travel to fixed stop function"
is selected, the PLC switches over to the unassigned gear stage of the drive actuator, thus
activating the torque limitation.
Setpoints must be injected via terminals 56/14.

Programmable clamping torque


In this case, the PLC switches the drive actuator from speed-controlled into torque-controlled
operation after the fixed stop is reached. The NC can therefore input a variable clamping
torque.
Setpoints must be injected via terminals 56/14.
References:
/IAA/ Commissioning Manual SIMODRIVE 611 analog system

C-axis operation
The control system has to switch the spindle into C-axis mode before the "Travel to fixed
stop" function is selected. The PLC does this by activating one of the programmable
terminals E1-D9 (e.g. terminal E1) of the drive actuator.

Selection
The NC detects that the function "travel to fixed stop" is selected via the command
FXS[x]=1 and signals the PLC via the IS "Activate travel to fixed stop" (DB31, ... DBX62.4)
that the function has been selected.
As a result, the PLC activates the unassigned gear stage, in which the torque limitation is
effective, by means of programmable terminals E1 - E9 of the drive actuator. It then switches
the speed controller monitor off (one terminal (E1-E9) to deactivate error F11 of drive
actuator).
If the machine data:
MD37060 FIXED_STOP_ACKN_MASK
is set correspondingly, the acknowledgement of the PLC via the NST
"Enable travel to fixed stop" (DB31, ... DBX3.1) is awaited and after that the function is
started.

Note
(This acknowledgment should always be programmed for analog drives for safety reasons,
i.e. so that the motion is not started before the torque has been limited).

Subsequently the controller internally sets the torque limit to the value specified through the
machine data: MD37070 FIXED_STOP_ANA_TORQUE (Torque limit while approaching the
fixed stop for analog drives).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 347
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

This must correspond to the torque limit value set in the actuator.
In addition, the acceleration is automatically reduced in the NC according to the value in the
machine data:
MD37070 FIXED_STOP_ANA_TORQUE is reduced.
The rotary axis now traverses to the target position at the programmed velocity.

Fixed stop reached


As soon as the C-axis reaches the fixed stop, the axial contour deviation increases.
If in the machine data:
MD37030 FIXED_STOP_THRESHOLD
entered threshold is exceeded or the NST signal
"sensor fixed stop" (DB31, ... DBX1.2) is set,
the control system detects that the fixed stop has been reached.
The position controller then responds by outputting a speed setpoint, corresponding to the
value set in the machine data:
MD37070 FIXED_STOP_ANA_TORQUE
The speed controller forces the drive to the torque limit by means of this continuously applied
setpoint.
The NC then deletes the remaining distance-to-go and forces the position setpoint to follow.
The controller enabling command remains active.
The NC then outputs IS "Fixed stop reached" (DB31 , ... DBX62.5) to the PLC.
If a programmable clamping torque input (via FXST[x] or setting parameter) is required
from the NC, then the PLC must switch the drive over from speed controlled to current
controlled operation. To do so, it activates one of the programmable terminals E1 - E9 (e.g.
terminal E5) and switches off the torque limitation after a period of > 80 ms by selecting the
previous gear stage.
The torque set in machine data:
MD37070 FIXED_STOP_ANA_TORQUE
acts on the drive.
If the machine data:
MD37060 FIXED_STOP_ACKN_ASK
is set correspondingly, the acknowledgement of the PLC via the NST
("Acknowledge fixed stop reached") (DB31, ... DBX1.1) is awaited and then the requested
clamping torque is transferred from the select block to the drive steplike.
Then a block change is executed. The clamping torque continues to be applied.

Basic Functions
348 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

Fixed stop is not reached


If the programmed end position is reached,
without detecting the state "fixed stop reached",
then the internal torque limitation in the machine data:
MD37070 FIXED_STOP_ANA_TORQUE
is cancelled and the NST signal "Activate travel to fixed stop".
(DB31, ... DBX62.4) is reset.
The PLC then activates the preceding gear stage, thus deactivating the torque limitation. It
also switches on the speed control monitoring function again.
Depending on the machine data:
MD37060 FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
"Enable travel to fixed stop" (DB31, ... DBX3.1) awaited
and then a block change is executed.

Deselection
The NC detects that the function has been deselected on the basis of command FXS[x]=0
and specifies a speed or torque setpoint of "0," i.e. zero clamping torque.
Then the NC resets the NST "Activate travel to fixed stop"
(DB31, ... DBX62.4) and "Fixed stop reached" (DB31, ... DBX62.5)
If torque-controlled operation is activated, the PLC must first select the unassigned gear
stage in which the torque limitation is effective and switch the drive over to speed-controlled
operation (a speed setpoint of "0" is applied by NC). The PLC must also deactivate the
speed controller monitoring function.
The PLC then activates the preceding gear stage, thus deactivating the torque limitation. It
also switches on the speed control monitoring function again.
Depending on the machine data:
MD37060 FIXED_STOP_ACKN_MASK
the acknowledgement of the PLC is awaited through resetting of the NST
"Enable travel to fixed stop" (DB31, ... DBX3.1) and/or
("Acknowledge fixed stop reached") (DB31, ... DBX1.1) is awaited.
The C-axis then switches over to position control mode (follow-up mode is terminated) and
synchronization with the new actual position takes place.
The programmed travel motion is then executed.
A block change is executed after the target position has been reached.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 349
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

6.4.3 Diagrams for travel to fixed stop with analog drives

FXS selection (fixed stop is reached)


The following diagram shows the sequence of the following error and interface signals for
"FXS selection" (fixed stop is reached) on analog drives.

6HOHFWUHFRUGZLWK);6>[@ 

,6$FWLYDWHWUDYHOWRIL[HGHQGVWRS

7HUPLQDOFODPSDFWLYH FXUUHQWOLPLWDWLRQ

,6(QDEOHWUDYHOWRIL[HGVWRS

6HWYHORFLW\
W &KDQJHRYHU

7UDFNLQJHUURU 7DUJHWSRVLWLRQ

5HFRUGFKDQJH

DFFHOHUDWLRQDFFRUGLQJWRB 0'0$;B$;B$&&(/ 0'


),;('B6723B$1$B72548( 
W &KDQJHRYHU !PVZLWK$ 96$
!PVZLWK$ +6$

Figure 6-4 Diagram for FXS selection (fixed stop is reached) with analog drive

Basic Functions
350 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

FXS selection (fixed stop is not reached)


The following diagram shows the sequence of the following error and interface signals for
"FXS selection" (fixed stop is not reached) on analog drives.

)L[HGVWRSFRUUHFWO\DSSURDFKHG
5HFRUGZLWK);6>[@ 
167$FWLYDWH);6
9$B);6  9$B);6 
7UDFNLQJHUURU )L[HGVWRSGHWHFWHG
0'),;('B6723B7+5(6+2/'


9$B);6  9$B);6 
3UHYLRXVKLVWRU\ :DLWIRUGHOHWHGLVWDQFHWRJR

)L[HGVWRSQRWFRUUHFWO\DSSURDFKHG
5HFRUGZLWK);6>[@ 
,6$FWLYDWH);6
9$B);6  9$B);6 
7UDFNLQJHUURU $[LVQRWDWIL[HGVWRS


9$B);6 
$FWLYDWHSRVLWLRQFRQWUROOHU

Figure 6-5 Diagram for FXS selection (fixed stop is not reached) with analog drive

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 351
Travel to Fixed Stop (F1)
Travel to fixed stop with analog drives

FXS deselection
The following diagram shows the sequence of the following error and interface signals for
"FXS Deselection" on analog drives.

);67>[@RU0'),;('B6723B72548(B'()

0RWRUFXUUHQW


7UDFNLQJHUURU 0'),;('B6723B7+5(6+2/'

5HFRUGZLWK);6>[@ 
,6$FWLYDWH);6
,6);6UHDFKHG

5HFRUGFKDQJH

Figure 6-6 Diagram for FXS deselection with analog drive

Basic Functions
352 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Examples

6.5 Examples

Static synchronized actions


Travel to fixed stop (FXS), initiated by a synchronized action.

N10 IDS=1 WHENEVER ; Activate static synchronized action:


(($R1==1) AND ; By the setting of $R1=1
($AA_FXS[Y]==0)) DO ; for
$R1=0 FXS[Y]=1 ; the axis Y FXS is activated
FXST[Y]=10 ; the active torque is reduced to 10%
FA[Y]=200 ; and a travel motion to
POS[Y]=150 ; direction of the stop started

N11 IDS=2 WHENEVER ; once the stop has been recognized


($AA_FXS[Y]==4) DO ; ($AA_FXS[Y]==4), the torque is
FXST[Y]=30 ; increased to 30%

N12 IDS=3 WHENEVER ; after reaching the stop


($AA_FXS[Y]==1) DO ; the torque becomes dependent
FXST[Y]=$R0 ; on R0 controlled

N13 IDS=4 WHENEVER ; deselection in dependence


(($R3==1) AND ; on R3 and
($AA_FXS[Y]==1)) DO ; reverse
FXS[Y]=0
FA[Y]=1000 POS[Y]=0

N20 FXS[Y]= 0 ; normal program run:


G0 G90 X0 Y0

N30 RELEASE(Y) ; axis Y for the movement to


; activate synchronized action

N40 G1 F1000 X100 ; Movement of another axis


N50 ......

N60 GET(Y) ; Include axis Y again in the


; pathgroup

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 353
Travel to Fixed Stop (F1)
Examples

Multiple selection
A selection may only be carried out once. If the function is called once more due to faulty
programming (FXS[Axis]=1) the alarm 20092 "Travel to fixed stop still active" is initiated.
Programming code that scans $AA_FXS[] or a separate flag (here R1) in the condition will
ensure that the function is not activated more than once.

Programming example (part program fragment)

N10 R1=0
N20 IDS=1 WHENEVER ($R1 == 0 AND $AA_IW[AX3]>7) DO R1=1 FXS[AX1]=1
FXST[AX1] = 12

Block-related synchronized actions


By programming a block-related synchronized action, travel to fixed stop can be connected
during an approach motion.
Programming example:

N10 G0 G90 X0 Y0
N20 WHEN $AA_IW[X]>17 DO FXS[X]=1 ; If X reaches a position greater
N30 G1 F200 X100 Y110 ; 17mm FXS is activated

Basic Functions
354 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Travel to Fixed Stop (F1)
Data lists

6.6 Data lists

6.6.1 Machine data

6.6.1.1 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


36042 FOC_STANDSTILL_DELAY_TIME Delay time 0 monitoring with FOC and FXS
37000 FIXED_STOP_MODE Travel to fixed stop mode
37002 FIXED_STOP_CONTROL Special function when traveling to fixed stop
37010 FIXED_STOP_TORQUE_DEF Default setting for clamping torque
37012 FIXED_STOP_TORQUE_RAMP_TIME Virtual time until reaching the new clamping torque
when traveling to fixed stop
37020 FIXED_STOP_WINDOW_DEF Default for fixed stop monitoring window
37030 FIXED_STOP_THRESHOLD Threshold for fixed stop detection
37040 FIXED_STOP_BY_SENSOR Fixed stop detection via sensor
37050 FIXED_STOP_ALARM_MASK Enabling the fixed stop alarms
37052 FIXED_STOP_ALARM_REACTION Reaction to fixed stop alarms
37060 FIXED_STOP_ACKN_MASK Monitoring of PLC acknowledgments for travel to fixed
stop
37070 FIXED_STOP_ANA_TORQUE Torque limit on fixed stop approach for analog drives
37080 FOC_ACTIVATION_MODE. Status of activation of the modal function FOC

6.6.2 Setting data

6.6.2.1 Axis/spindle-specific setting data

Number Identifier: $SA_ Description


43500 FIXED_STOP_SWITCH Selection of travel to fixed stop
43510 FIXED_STOP_WINDOW Clamping torque when traveling to fixed stop
extended to a torque greater than 100%
43520 FIXED_STOP_TORQUE Fixed stop monitoring window

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 355
Travel to Fixed Stop (F1)
Data lists

6.6.3 Signals

6.6.3.1 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 1.1 Acknowledge fixed stop reached
31, ... 1.2 Sensor for fixed stop
31, ... 1.3 Axis/spindle disable
31, ... 2.1 Controller enable
31, ... 3.1 Enable travel to fixed stop

6.6.3.2 Signals from axis/spindle

DB number Byte.Bit Description


31, ... 62.4 Activate travel to fixed stop
31, ... 62.5 Fixed stop reached

Basic Functions
356 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
7
Velocities, Setpoint/Actual Value Systems, Closed-
Loop Control (G2)

7.1 Brief description


The description of functions explains how to parameterize a machine axis in relation to:
● Actual-value/measuring systems
● Setpoint system
● Operating accuracy
● Travel ranges
● Axis velocities
● Control parameters

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 357
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

7.2 Velocities, traversing ranges, accuracies

7.2.1 Velocities

Maximum path and axis velocities and spindle speed


The maximum path and axis velocities and spindle speed are influenced by the machine
design, the dynamic response of the drive and the limit frequency of the actual-value
acquisition (encoder limit frequency).
The maximum axis velocity is defined in machine data:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity).

The maximum permissible spindle speed is defined via machine data:


MD35100 $MA_SPIND_VELO_LIMIT (maximum spindle speed).

For more information, see:


References:
/FB1/ Function Manual, Basic Functions; Spindles (S1)
As well as limiting using MD32000, the control limits the maximum path velocity in relation to
the situation and according to the following formula:

,QWHUQDOLQFUHPHQWVPP 
(QFRGHULQFUHPHQWVPP (1&B5(62/>Q@ LQWHUQDOPXOWLSOLFDWLRQ

'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@

'5,9(B$;B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B180(5$>Q@

/($'6&5(:B3,7&+

,17B,1&5B3(5B00

For setting the interpolation cycle, see:


References:
/FB3/ Function Manual, Special Functions; Cycle Times (G3)
With a high feedrate (resulting from programmed feedrates and feedrate override), the
maximum path velocity is limited to Vmax.
This automatic feedrate limiting can lead to a drop in velocity over several blocks with
programs generated by CAD systems with extremely short blocks.

Basic Functions
358 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

Example
Interpolation cycle = 12 ms
N10 G0 X0 Y0; [mm]
N20 G0 X100 Y100; [mm]
⇒ Path length programmed in block = 141.42 mm
⇒ Vmax = (141.42 mm/12 ms) * 0.9 = 10606.6 mm/s = 636.39 m/min
The following restriction applies to the minimum path or axis velocity:

 ಥ
9PLQ ,QFU
&RPSXWDWLRQDOUHVROXWLRQ> PPRUGHJUHHV
@ LQWHUSRODWLRQF\FOH>V@

The computational resolution is defined via machine data:


MD10200 $MN_INT_INCR_PER_MM (computational resolution for linear positions)
or
MD10210 $MN_INT_INCR_PER_DEG (computational resolution for angular positions):

If Vmin is not reached, no traversing is carried out.

,QWHUQDOLQFUHPHQWVPP 
(QFRGHULQFUHPHQWVPP (1&B5(62/>Q@ LQWHUQDOPXOWLSOLFDWLRQ

'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@

'5,9(B$;B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B180(5$>Q@

/($'6&5(:B3,7&+

,17B,1&5B3(5B00

Example
MD10200 $MN_INT_INCR_PER_MM = 1000 [incr. /mm];
Interpolation cycle = 12 ms;
⇒ Vmin = 10 -3/(1000 incr/mm x 12 ms) = 0.005 mm/min;
The value range of the feed rates depends on the selected computational resolution
When the machine data:
MD10200 $MN_INT_INCR_PER_MM
(computational resolution for linear positions) (1000 incr./mm)
or
MD10210 $MN_INT_INCR_PER_DEG
(computational resolution for angular positions) (1000 incr./degree)
is assigned its default values, the following range of values can be programmed with the
specified resolution:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 359
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

Range of values for path feedrate F and geometry axes:


Metric system: Inch system:
0.001 ≤ F ≤ 999,999.999 0.001 ≤ F ≤ 399,999.999 [inch/min, inch/rev]
[mm/min, mm/rev, degrees/min, degrees/rev]

Range of values for feedrate for positioning axes:


Metric system: Inch system:
0.001 ≤ FA ≤ 999,999.999 0.001 ≤ FA ≤ 399,999.999
[mm/min, mm/rev, degrees/min, degrees/rev] [inch/min, inch/rev]

Range of values for spindle speed S:


0.001 ≤ S ≤ 999,999.999 [rpm]
If the computational resolution is increased/decreased by a factor of 10, the ranges of values
change accordingly.

7.2.2 Traversing ranges

Range of values of the traversing ranges


The range of values of the traversing range depends on the computational resolution
selected.
If machine data:
MD10200 $MN_INT_INCR_PER_MM
(computational resolution for linear positions) (1000 incr./mm)
or
MD10210 $MN_INT_INCR_PER_DEG
(computational resolution for angular positions) (1000 incr./degree)
are assigned their default values, the following range of values can be programmed with the
input resolution:

Table 7- 1 Traversing ranges of axes

G71 [mm, degrees] G70 [inch, degrees]


Range Range
Linear axes X, Y, Z, etc. ∓ 999,999.999 ∓ 399,999.999
Rotary axes A, B, C, etc. ∓ 999,999.999 ∓ 999,999.999
Interpolation parameters I, J, K ∓ 999,999.999 ∓ 399.999.999
The unit of measurement of rotary axes is always degrees.

Basic Functions
360 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

If the computational resolution is increased/decreased by a factor of 10, the ranges of values


change accordingly.
The traversing range can be limited by software limit switches and working areas.
References:
/FB1/ Function Manual, Basic Functions; Axis Monitoring, Protection Zones (A3)
The traversing range for rotary axes can be limited via machine data.
References:
/FB2/ Function Manual, Extended Functions; Rotary Axes (R2)
For special features of linear and rotary axes with a large traversing range, see:
References:
/FB1/ Function Manual, Basic Functions; Reference Point Approach (R1)

7.2.3 Positioning accuracy of the control system

Actual-value resolution and computational resolution


The positioning accuracy of the control depends on the actual-value resolution (=encoder
increments/(mm or degrees)) and the computational resolution (=internal increments/(mm or
degrees)).
The coarse resolution of these two values determines the positioning accuracy of the control.
The input resolution, interpolator and position-control cycle selections have no effect on this
accuracy.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 361
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

7.2.4 Block diagram of resolutions and scaling values

Block diagram of units and resolutions

,QSXWGLVSOD\UHVROXWLRQ 6FDOLQJH[DPSOH
HQWHUHGYLDWKHRSHUDWRU 0DFKLQHGDWDLQSXWDQGGLVSOD\LQ
SDQHOXVHG FP ZLWKPHWULFEDVLFV\VWHP
,QSXWRXWSXWXQLW (JIRU0'326B/,07B3/86
VWVRIWZDUHOLPLWVZLWFKSOXV
FP


<HV 0' 1R
6&$/,1*B6<67(0
B,6B0(75,& 
0'
 6&$/,1*B6<67(0B,6B0(75,& 
0' 0'
6&$/,1*B)$&7256B86(5B'() 6&$/,1*B)$&7256B86(5B'()>Q@
VHOHFWHGZLWK VHOHFWHGZLWK
0' 0' 0'
6&$/,1*B86(5B'()B0$6. 6&$/,1*B86(5B'()B0$6. 6&$/,1*B)$&7256B86(5B'()>@
RQO\HIIHFWLYHRQPDFKLQHDQG RQO\HIIHFWLYHRQPDFKLQHDQG  
VHWWLQJGDWD VHWWLQJGDWD 0'
6&$/,1*B86(5B'()B0$6. +
ELWQRDVKH[YDOXH

0'6&$/,1*B9$/8(B,1&+

,QWHUQDOXQLW
>PPRUGHJUHHV@

PP

0',17B,1&5B3(5B00 
RU
0',17B,1&5B3(5B'(*
FRPSXWDWLRQDOUHVROXWLRQ 0'17B,1&5B3(5B00 

,QWHUQDOLQFUHPHQWV PPRUGHJUHHV
SODFHVDIWHUGHFLPDOSRLQWORVW


$FWXDOYDOXHUHVROXWLRQ
6SHHGVHWSRLQW HQFRGHULQFUHPHQWV
UHVROXWLRQ PPRUGHJUHHV

7ULJJHUGHYLFH
 IRUWKH'
 IRUWKH'

0RWRU (QFRGHU
PXOWLSOLFDWLRQ

This diagram shows how input values are converted into internal units.

Basic Functions
362 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

It also shows the following conversion to internal increments/(mm or degrees), which can
cause loss of decimal places if the computational resolution was selected to be coarser than
the input resolution.
In addition, it provides an overview of the following topics:
● Selection of measuring system (metric/inch)
● Scaling of physical quantities of machine and setting data
● Conversion of basic system
● Setting of computational resolution
An example is given showing how a physical quantity
(MD36110 $MA_POS_LIMIT_PLUS)
as a function of machine data parameterization
(MD10230 $MN_SCALING_FACTORS_USER_DEF,
MD10220 $MN_SCALING_USER_DEF_MASK).

7.2.5 Input/display resolution, computational resolution

Resolutions: Differences
Resolutions, e.g. resolutions of linear and angular positions, velocities, accelerations and
jerk, must be differentiated as follows:
● Input resolution
Data is input via the control panel or part programs.
● Display resolution
Data is displayed via the control panel.
● Computational resolution
Data input via the control panel or part program is displayed internally.
The input and display resolution is defined via the control panel being used, whereby the
display resolution of position values can be changed with machine data:
MD9004 $MM_DISPLAY_RESOLUTION.
Machine data:
MD9011 $MM_DISPLAY_RESOLUTION_INCH
can be used to configure the display resolution of position values using the inch system.
This allows you to display up to six decimal places with the inch setting.
For the programming of part programs, the input resolutions listed in the Programming
Manual apply.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 363
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

The desired computational resolution is defined via machine data:


MD10200 $MN_INT_INCR_PER_MM (computational resolution for linear positions)
or
MD10210 $MN_INT_INCR_PER_DEG (computational resolution for angular positions).

It is independent of the input/display resolution but should have at least the same resolution.
The maximum number of places after the decimal point for position values, velocities, etc., in
the part program and the number of places after the decimal point for tool offsets, zero
offsets, etc. (and therefore also for the maximum possible accuracy). is defined by the
computational resolution.
The accuracy of angle and linear positions is limited to the computational resolution by
rounding the product of the programmed value with the computational resolution to an
integer number.
To make the rounding clear, powers of 10 should be used for the computational resolution.

Example of rounding
Computational resolution: 1000 increments/mm
Programmed path: 97.3786 mm
Effective value = 97.379 mm

Example of programming in the 1/10 μm range


All the linear axes of a machine are to be programmed and traversed within the range of
values 0.1 to 1000 μm.
⇒ In order to position accurately to 0.1 μm, the computational resolution must be set
to ≥ 104 incr./mm.
⇒ MD10200 $MN_INT_INCR_PER_MM = 10000 [incr./mm]:
⇒ Example of related part program:

N20 G0 X 1.0000 Y 1.0000 ; Traverse axes to position


X=1.0000 mm, Y=1.0000 mm
N25 G0 X 5.0002 Y 2.0003 ; Traverse axes to position
X=5.0002 mm, Y=2.0003 mm

Basic Functions
364 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

7.2.6 Scaling of physical quantities of machine and setting data

Input/output units
Machine and setting data that possess a physical quantity are interpreted in the input/output
units below depending on whether the metric or inch system is selected:

Physical quantity: Input/output units for standard basic system:


Metric Inch
Linear position 1 mm 1 inch
Angular position 1 degree 1 degree
Linear velocity 1 mm/min 1 inch/min
Angular velocity 1 rpm 1 rpm
Linear acceleration 1 m/s2 1 inch/s2
Angular acceleration 1 rev./s2 1 rev./s2
Linear jerk 1 m/s3 1 inch/s3
Angular jerk 1 rev./s3 1 rev./s3
Time 1s 1s
Position controller servo gain 1/s 1/s
Rev. feedrate 1 mm/rev 1 inch/rev
Compensation value linear 1 mm 1 inch
position
Compensation value angular 1 degree 1 degree
position
The units listed below are used for storage. The control always uses these units internally
irrespective of the basic system selected.

Physical quantity: Internal unit:


Linear position 1 mm
Angular position 1 degree
Linear velocity 1 mm/s
Angular velocity 1 deg./s
Linear acceleration 1 mm/s2
Angular acceleration 1 degree/s2
Linear jerk 1 mm/s3
Angular jerk 1 degree/s3
Time 1s
Position controller servo gain 1/s
Rev. feedrate 1 mm/degree
Compensation value linear position 1 mm
Compensation value angular position 1 degree
The user can define different input/output units for machine and setting data.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 365
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

For this, the machine data:


MD10220 $MN_SCALING_USER_DEF_MASK
(activation of scaling factors)
and
MD10230 $MN_SCALING_FACTORS_USER_DEF[n]
(Scaling factors of physical quantities)
allow you to set the adaptation between the newly selected input/output units and the
internal units.

,QSXWRXWSXWXQLWVIRUPDFKLQH
DQGVHWWLQJGDWD

'RWKH
LQSXWRXWSXWXQLWVFRUUHV
SRQGWRWKHVWDQGDUGEDVLF 1R
V\VWHP"
LQFKRUPHWULF

8VHUGHILQHG
<HV 0'6&$/,1*B)$&7256B86(5B'()>Q@
0'6&$/,1*B)$&7256B86(5B'()B0$6.

&RQYHUVLRQRILQWHUQDOXQLWV

,QWHUQDOXQLWV

The following applies:


Selected input/output unit = MD10230 * internal unit
In the machine data:
MD10230 $MN_SCALING_FACTORS_USER_DEF[n]
the selected input/output unit printed in each case in the internal units 1mm, 1 degree and
1 s must be input.

Basic Functions
366 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

Example 1
Machine data input/output of the linear velocities is to be in m/min instead of mm/min (initial
state).
(The internal unit is mm/s)

⇒ The scaling factor for the linear velocities is to differ from the standard setting. For
this in the machine data:
MD10220 $MN_SCALING_USER_DEF_MASK
the bit number 2 must be set.
⇒ MD10220 $MN_SCALING_USER_DEF_MASK = 'H4'; (bit no. 2 as hex value)

⇒ The scaling factor for the linear velocities is to differ from the standard setting. For
this in the machine data:
MD10220 $MN_SCALING_USER_DEF_MASK
the bit number 2 must be set.
⇒ MD10220 $MN_SCALING_USER_DEF_MASK = 'H4'; (bit no. 2 as hex value)

⇒ The scaling factor is calculated using the following formula:

,QSXWRXWSXWXQLWVHOHFWHG
0'6&$/,1*B)$&7256B86(5B'()>Q@
,QWHUQDOXQLW

P PP
 PLQ ‘V
0'6&$/,1*B)$&7256B86(5B'()>Q@ 
PP PP 
 V  V 

෎ 0'6&$/,1*B)$&7256B86(5B'()>Q@ 

Index 2 defines the "linear velocity" in the "Scaling factors of physical quantities" list.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 367
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Velocities, traversing ranges, accuracies

Example 2
In addition to the change in Example 1, the machine data input/output of linear accelerations
must be in ft/s2 instead of m/s2 (initial state).
(The internal unit is mm/s2.)

ය 0'6&$/,1*B86(5B'()B0$6. + ELWQRDQGELWQRIURPH[DPSOH


DVKH[YDOXH
IW PP
 V   V 
ය 0'6&$/,1*B)$&7256B86(5B'()>Q@ 
PP PP
 V  V

ය 0'6&$/,1*B)$&7256B86(5B'()>@ 

Index 4 defines the "linear acceleration" in the "Scaling factors of physical quantities" list.

Basic Functions
368 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

7.3 Metric/inch measuring system

7.3.1 General

Basic system
The control system can operate with the metric or inch measuring system. The initial state of
the measuring system, i.e. the basic system, is defined via the following machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC (metric basic system).
Depending on the basic system, all length-related data is interpreted either as metric or inch
measurements.

Converting the measuring system on a control system


When converting the measuring system on a control system, all length-related data must be
converted consistently and fully into the other measuring system. The setting
MD10260 $MN_CONVERT_SCALING_SYSTEM=TRUE
simplifies converting the measuring system significantly.
● HMI user interface: Softkey in the "Machine" operating area for changing the measuring
system.
● Automatic conversion of length-related data
● Data backup with INCH/METRIC measuring system identifiers
● The measuring system for sag compensation is configured in machine data element:
MD32711 $MA_CEC_SCALING_SYSTEM_METRIC
References:
/FB2/ Function Manual Extended Functions; Compensations (K3)
● The measuring system for positional data of the indexing axis tables and switching points
for software cams is configured in machine data element:
MD10270 $MN_POS_TAB_SCALING_SYSTEM.
References:
/FB2/ Function Manual, Extended Functions; Software Cams, Limit Switching Signals
(N3)/Indexing Axes (T1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 369
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

7.3.2 Conversion of basic system by part program

Programmable switchover in the measuring system


The basic system can be switched over within a part program via the G functions
G70/G71/G700/G710 (G group 13). The programmed measuring system
(G70/G71/G700/G710) and the basic system may be identical or different at any time. When
the measuring system is switched over within a particular section of the part program, this
would enable an inch thread to be processed on a workpiece within a metric basic system,
for example.
The following section of the part program is executed in "metric" in the basic system:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC = 1

Program code Comment


N100 G71 ; Switchover to metric processing
; The conversion factor does not come into effect because the
; programmed
measuring system does not differ from the basic system.
.... ; Metric processing
N200 G70 ; Switchover to processing in inches
; The conversion factor comes into effect.
... ; Machining in inches
N300 ; Switchover to metric processing
... ; Metric processing

Initial state of the G functions


The initial state for the G functions can be set via the following machine data on a channel-
specific basis:
MD20150 $MC_GCODE_RESET_VALUES[12] (reset position for G group 13)
When changing the measuring system via the HMI user interface, the reset position is
automatically preconfigured for compatibility with the new measuring system via G700 or
G710.

Displaying length-related data on the HMI


Length-related data is displayed on the HMI in the configured basic system
MD10240 $MN_SCALING_SYSTEM_IS_METRIC (metric basic system).
The following length-related data is displayed in the configured basic system:
● Machine data
● Data in the machine coordinate system
● Tool data
● Work offsets
The following length-related data is displayed in the programmed measuring system:
● Data in the workpiece coordinate system

Basic Functions
370 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Reading in part programs from external sources


If part programs, including data sets (work offsets, tool offsets, etc.), programmed in a
different measuring system from the basic system are read in from an external source, the
initial state must first be changed via machine data MD10240.

NC/PLC interface signals


In the case of NC/PLC interface signals containing dimension information, e.g. feedrate for
path and positioning axes, data exchange is carried out with the PLC in the configured basic
system.

G functions G700/G710
The G functions G700/G710 extend the functionality of G70/G71 as follows:
1. The feedrate is interpreted in the programmed measuring system:
– G700: length parameters [inch]; feedrates [inch/min]
– G710: length parameters [mm]; feedrates [mm/min]
The programmed feedrate is modal and therefore remains active after subsequent
G70/G71/G700/G710 commands. If the feedrate is to apply in the new
G70/G71/G700/G710 context, it must be re-programmed.
2. System variables and machine data specifying lengths in the part program are read and
written in the programmed measuring system.

Differences during the reading and writing of machine data and system variables
The following differences exist between G70/G71 and G700/G710 in terms of reading and
writing machine data and system variables in the part program:
● G70/G71: Reading and writing takes place in the configured basic system.
● G700/G710: Reading and writing takes place in the configured measuring system.
Example
The following part program is executed with an initial metric state:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC = 1

Program code Comment


N100 R1=0 R2=0 ;
N120 G01 G70 X1 F1000 ; Prog. meas. system: inch
N130 $MA_LUBRICATION_DIST[X]=10 ; MD = 10 [mm] (basic system)
N150 IF ($AA_IW[X]>$MA_LUBRICATION_DIST[X]) ; SYS [mm] > MD [mm] (both basic system)
N160 R1=1 ;
N170 ENDIF ;
N180 IF ($AA_IW[X]>10) ; SYS [mm] (basic system) > 10 [inch]
; (prog. meas. system)
N190 R2=1 ;

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 371
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Program code Comment


N200 ENDIF ;
N210 IF ( (R1+R2) = 1 ) ; Alarm if only one of the two
; conditions (N150, N180) is TRUE
N220 SETAL(61000) ;
N230 ENDIF ;
N240 M30 ;

N120: if G70 is replaced by G700, alarm 61000 (N220) does not occur.

Synchronized actions
To ensure in the case of synchronized actions that the current part program context does not
determine the measuring system used in the condition and/or action part, the measuring
system must be defined within the synchronized action (condition and/or action parts). This
is the only way of achieving defined, reproducible behavior in the use of length-related data
within a synchronized action.
Example 1
The measuring system is not specified within the synchronized action. Therefore, the
traversing motion of the X axis takes place in the measuring system of the configured initial
state:

Program code Comment


N100 R1=0 ;
N110 G0 X0 Z0 ;
N120 WAITP(X) ;
N130 ID=1 WHENEVER $R1==1 DO POS[X]=10 ; X = 10 inch or mm, depending on the
; rest of the part program
N140 R1=1 ;
N150 G71 Z10 F10 ; Z = 10 mm X = 10 mm
N160 G70 Z10 F10 ; Z = 10 inch X = 10 inch
N170 G71 Z10 F10 ; Z = 10 mm X = 10 mm
N180 M30 ;

Example 2
The "metric" measuring system is explicitly programmed with G71 within the synchronized
action. This means the traversing motion of the X axis takes place in the metric measuring
system:

Program code Comment


N100 R1=0 ;
N110 G0 X0 Z0 ;
N120 WAITP(X) ;
N130 ID=1 WHENEVER $R1==1 DO G71 POS[X]=10 ; X = 10 mm, independent of the
; rest of the part program
N140 R1=1 ;
N150 G71 Z10 F10 ; Z = 10 mm X = 10 mm
N160 G70 Z10 F10 ; Z = 10 inch X = 10 mm

Basic Functions
372 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Program code Comment


N170 G71 Z10 F10 ; Z = 10 mm X = 10 mm
N180 M30 ;

Reading and writing of data in the case of G70/G71 and G700/G710 in the part program

Data area G70/G71 G700/G710


Read Write Read Write
Display, decimal places (WCS) P P P P
Display, decimal places (MCS) G G G G
Feedrates G G P P
Positional data X, Y, Z P P P P
Interpolation parameters I, J, K P P P P
Circle radius (CR) P P P P
Polar radius (RP) P P P P
Pitch P P P P
Programmable FRAME P P P P
Settable FRAMES G G P P
Basic frames G G P P
Work offsets external G G P P
Axial preset offset G G P P
Operating range limit (G25/G26) G G P P
Protection zones P P P P
Tool offsets G G P P
Length-related machine data G G P P
Length-related setting data G G P P
Length-related system variables G G P P
GUD G G G G
LUD G G G G
PUD G G G G
R parameters G G G G
Siemens cycles P P P P
Jog/handwheel increment factor G G G G
P: Data is read/written in the programmed measuring system
G: Writing/reading takes place in the configured basic system.

NOTICE
Read position data in synchronized actions
If a measuring system has not been explicitly programmed in the synchronized action
(condition component and/or action component) length-related position data in the
synchronized action are always read in the parameterized basic system.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 373
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

References:
/PG/ Programming Manual, Fundamentals; List of Addresses

NC-specific conversion factor


The default conversion factor in the machine data is:
MD10250 $MN_SCALING_VALUE_INCH (conversion factor for switchover to inch system)
set to 25.4 for converting from the metric to the inch measuring system. By changing the
conversion factor, the control system can also be adapted to customer-specific measuring
systems.

Axis-specific conversion factor


The default conversion factor in the axis-specific machine data is:
MD31200 $MA_SCALING_FACTOR_G70_G71 (conversion factor when G70/G71 is active)
set to 25.4 for converting from the metric to the inch measuring system. By changing the
conversion factor, the control system can also be adapted to customer-specific measuring
systems on an axis-specific basis.

7.3.3 Manual switchover of the basic system

General
The relevant softkey on the HMI in the "Machine" operating area is used to change the
measuring system of the controller.
The change in the measuring system occurs only under the following boundary conditions:
● MD10260 $MN_CONVERT_SCALING_SYSTEM=1
● Bit 0 of MD20110 $MC_RESET_MODE_MASK is set in every channel.
● All channels are in the Reset state.
● Axes doe not traverse with JOG, DRF or PLC.
● Constant grinding wheel peripheral speed (GWPS) is not active.
Actions such as part program start or mode change are disabled for the duration of the
measuring system changeover.
If the measuring system cannot be changed, this is indicated by a message to that effect on
the user interface. These measures ensure that a consistent set of data is always used for a
running program with reference to the measuring system.
The actual change in the measuring system is made by writing all the necessary machine
data and subsequently activating them with a RESET.

Basic Functions
374 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC
and the corresponding G70/G71/G700/G710 settings in machine data:
MD20150 $MN_GCODE_RESET_VALUES
are switched automatically and consistently for all configured channels.
The value of machine data:
MD20150 $MC_GCODE_RESET_VALUES[12]
changes between G700 and G710.
This process takes place independently of the protection level currently set.

Note
The availability of the soft key and, therefore, its functionality, can be configured using the
compatibility machine data:
MD10260 $MN_CONVERT_SCALING_SYSTEM.
If several NCUs are linked by NCU-link, the switchover has the same effect on all linked
NCUs. If the prerequisites for a switchover are not fulfilled on one of the NCUs linked, no
switchover will take place on none of the NCUs. It is assumed that interpolations between
several NCUs will take place on the existing NCUs, whereby the interpolations can provide
correct results only if the same unit systems are used.
References:
/FB2/ Function Manual, Extended Functions; Several Control Panels on Multiple NCUs,
Decentralized Systems (B3)

System data
When changing over the measuring system, from the view of the user, all length-related
specifications are converted to the new measuring system automatically.
This includes:
● Positions
● Feedrates
● Acceleration rates
● Jerk
● Tool offsets
● Programmable, settable and work offsets external and DRF offsets
● Compensation values
● Protection zones

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 375
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

● Machine data
● Jog and handwheel factors
After the changeover, all of the above data is available in physical quantities.
Data, for which no unique physical units are defined, is not converted automatically.
This includes:
● R parameters
● GUDs (Global User Data)
● LUDs (Local User Data)
● PUD (Program global User Data)
● Analog inputs/outputs
● Data exchange via FC21
The user is prompted to take the current valid measuring system:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC
into account.
The current measuring system setting can be read at the PLC interface via the "inch
measuring system" signal:
DB10 DBX107.7.
Signal:
DB10 DBB71 (inch/metric measuring system modification counter)
can be used for reading the "measuring system modification counter".

User tool data


Additional machine data sets are introduced for user-defined tool data:
MD18094 $MN_MM_NUM_CC_TDA_PARAM
and cutting edge data:
MD18096 $MN_MM_NUM_CC_TOA_PARAM:

MD10290 $MN_CC_TDA_PARAM_UNIT [MM_NUM_CC_TDA_PARAM]


MD10292 $MN_CC_TOA_PARAM_UNIT [MM_NUM_CC_TOA_PARAM]
A physical unit can be configured using these machine data. All length-related user-defined
tool data are automatically converted to the new measuring system according to the input on
switchover.

Reference point
The reference point is retained. It is not necessary to repeat referencing.

Basic Functions
376 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Input resolution and computational resolution


The input/computational resolution is set in the control via machine data:
MD10200 $MN_INT_INCR_PER_MM.
Default settings:

Metric system Inch system


1000 (0.001 mm) 0.0001
Example:
1 inch = 25.4 mm ⇒ 0.0001 inch = 0.00254 mm = 2.54 μm
To be able to program and display the last 40 mm, MD10200 must be assigned a value of
100000.
Only with this identical setting for both measuring systems is it possible to change the
measuring system without a significant loss of accuracy. Once MD10200 has been set to this
value, it will not need to be changed each time the measuring system is switched over.

JOG and handwheel factor


Machine data:
MD31090 $MA_JOG_INCR_WEIGHT
consists of two values, which contain the axial increment factors for both measuring
systems.
Depending on the current setting in machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC,
the control selects the correct value automatically.
The user defines the two increment factors, e.g. for the first axis, during the installation and
startup phase:
● Metric:
MD31090 $MA_JOG_INCR_WEIGHT[0;AX1]=0.001 mm
● Inch:
MD31090 $MA_JOG_INCR_WEIGHT[1;AX1]=0.00254 mm ≙ 0.0001 inch
In this way, MD31090 does not have to be written on every inch/metric switchover.
Remaining distances are not accumulated during incremental traversing with JOG when the
measuring system is changed, since all internal positions always refer to mm.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 377
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Data backup
Data sets, which can be read separately from the control and have access to data relevant to
the measuring system, receive an INCH or METRIC identifier during the read action,
depending on machine data:
MD10260 $MN_CONVERT_SCALING_SYSTEM.
The identifier corresponds to machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC.

This records the measuring system, in which the data were originally read out.
This information is intended to prevent data sets from being read into the control system with
a measuring system, which is different from the active system. In this case, alarm 15030 is
triggered and the write process is interrupted.
Since the language instruction is also evaluated in part programs, these can also be
"protected" against operator errors as described above. You can, therefore, prevent part
programs containing only metric data, for example, from running on an inch measuring
system.
Archives and machine data sets are downward compatible if:
MD11220 $MN_INI_FILE_MODE = 2.

Note
The INCH/METRIC instruction is only generated if compatibility machine data:
MD10260 $MN_CONVERT_SCALING_SYSTEM
is set.

Rounding machine data


All length-related machine data are rounded to the nearest 1 pm when writing in the inch
measuring system (MD10240 $MN_SCALING_SYSTEM_IS_METRIC=0 and MD10260
$MN_CONVERT_SCALING_SYSTEM=1), in order to avoid rounding problems.
The disturbing loss of accuracy, which occurs as a result of conversion to ASCII when
reading out a data backup in the inch system of measurement, is corrected by this procedure
when the data is read back into the system.

Basic Functions
378 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

7.3.4 FGROUP and FGREF

Programming
It should be possible to program the effective machining feedrate in the usual way as a path
feedrate via the F value in processing procedures where the tool, the workpiece or both are
moved by a rotary axis (e.g. laser machining of rotating tubes).
In order to achieve this, it is necessary to specify an effective radius (reference radius) for
each of the rotary axes involved. You can do this by programming the modal NC address:
FGREF[<rotary axis>]=<reference radius>
The unit of the reference radius depends on the G70/G71/G700/G710 setting.
In order to include the axes in the calculation of the path feedrate, they must all be specified
in the FGROUP command.
In order to ensure compatibility with the behavior with no FGREF programming, the factor 1
degree = 1 mm is activated on system power-up and RESET.
This corresponds to a reference radius of:
FGREF = 360 mm/(2π) = 57.296 mm
This default is independent of the active basic system
(MD10240 $MN_SCALING_SYSTEM_IS_METRIC) and the currently active
G70/G71/G700/G710 setting.
Special features of the feedrate weighting for rotary axes in FGROUP:

Program code
N100 FGROUP(X,Y,Z,A)
N110 G1 G91 A10 F100
N120 G1 G91 A10 X0.0001 F100

The programmed F value in block N110 is evaluated as a rotary axis feedrate in


degrees/min, while the feedrate weighting in block N120 is either 100 inch/min or 100
mm/min, depending on the current inch/metric setting.
The time required to execute the two blocks can be differ greatly.

CAUTION
The FGREF factor also works if only rotary axes are programmed in the block. The normal F
value interpretation as degree/min applies in this case only if the radius reference
corresponds to the FGREF default:
• For G71/G710: FGREF[A]=57.296
• For G70/G700: FGREF[A]=57.296/25.4

Example:
The following example is intended to demonstrate the effect of FGROUP on the path and path
feedrate. The variable $AC_TIME contains the time of the block start in seconds. It can only
be used in synchronized actions.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 379
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Program code Comment


N100 G0 X0 A0
N110 FGROUP(X,A)
N120 G91 G1 G710 F100 ; Feedrate = 100mm/min or 100 degrees/min
N130 DO $R1=$AC_TIME
N140 X10 ; Feedrate = 100 mm/min, path = 10 mm, R1 = approx. 6 s
N150 DO $R2=$AC_TIME
N160 X10 A10 ; Feedrate = 100 mm/min, path = 14.14 mm, R2 = approx. 8 s
N170 DO $R3=$AC_TIME
N180 A10 ; Feedrate = 100 degrees/min, path = 10 degrees, R3
= approx. 6 s
N190 DO $R4=$AC_TIME
N200 X0.001 A10 ; Feedrate = 100 mm/min, path = 10 mm, R4 = approx. 6 s
N210 G700 F100 ; Feedrate = 2540 mm/min or 100 degrees/min
N220 DO $R5=$AC_TIME
N230 X10 ; Feedrate = 2540 mm/min, path = 254 mm, R5 = approx. 6 s
N240 DO $R6=$AC_TIME
N250 X10 A10 ; Feedrate = 2540 mm/min, path = 254.2 mm, R6 = approx. 6
s
N260 DO $R7=$AC_TIME
N270 A10 ; Feedrate = 100 degrees/min, path = 10 degrees, R7
= approx. 6 s
N280 DO $R8=$AC_TIME
N290 X0.001 A10 ; Feedrate = 2540 mm/min, path = 10 mm, R8 = approx.
0.288 s
N300 FGREF[A]=360/(2*$PI) ; Set 1 degree = 1 inch via the effective radius.
N310 DO $R9=$AC_TIME
N320 X0.001 A10 ; Feedrate = 2540 mm/min, path = 254 mm, R9 = approx. 6 s
N330 M30

Diagnostics
Read reference radius
The value of the reference radius of a rotary axis can be read using system variables:
● For the display in the user interface, in synchronized actions or with a preprocessing stop
in the part program via the system variables:

$AA_FGREF[<axis>] Current main run value


● Without preprocessing stop in the part program via system variable:

$PA_FGREF[<axis>] Programmed value


If no values are programmed, the default 360 mm/(2π) = 57.296 mm (corresponding to 1 mm
per degree) will be read in both variables.
For linear axes, the value in both variables is always 1 mm.

Basic Functions
380 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Metric/inch measuring system

Read path axes affecting velocity


The axes involved in path interpolation can be read using system variables:
● For the display in the user interface, in synchronized actions or with a preprocessing stop
in the part program via the system variables:

$AA_FGROUP[<axis>] Returns the value "1" if the specified axis affects the
path velocity in the current main run record by means of
the basic setting or through FGROUP programming.
Otherwise, the variable returns the value "0".
$AC_FGROUP_MASK Returns a bit key of the channel axes programmed with
FGROUP which are to affect the path velocity.
● Without preprocessing stop in the part program via system variables:

$PA_FGROUP[<axis>] Returns the value "1" if the specified axis affects the
path velocity by means of the basic setting or through
FGROUP programming. Otherwise, the variable returns
the value "0".
$P_FGROUP_MASK Returns a bit key of the channel axes programmed with
FGROUP which are to affect the path velocity.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 381
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

7.4 Setpoint/actual-value system

7.4.1 General

Control loop
A control loop with the following structure can be configured for every closed-loop controlled
axis/spindle:

&ORVHG 6SHHG 0RWRU


6SHHGVHWSRLQW
ORRS VHWSRLQW 0
RXWSXW
FRQWURO URXWLQJ

,)&SRVLWLRQ &75/287B7<3(  6,08/$7,21


PHDVXULQJ (1&B7<3(  6,08/$7,21
V\VWHP

$FWXDOYDOXH (QFRGHU
*
SURFHVVLQJ
$FWXDO
180B(1&6 YDOXH
URXWLQJ
$FWXDOYDOXH (QFRGHU
SURFHVVLQJ *

Figure 7-1 Block diagram of a control loop

Setpoint output
A setpoint can be output for each axis/spindle. The setpoint output to the sensor is done
digitally in SINUMERIK 840D.

Actual-value acquisition
A maximum of two measuring systems can be connected for each axis/spindle, e.g. a direct
measuring system for machining processes with high accuracy requirements and an indirect
measuring system for high-speed positioning tasks.
The number of encoders used is recorded in the machine data:
MD30200 $MA_NUM_ENCS (number of encoders)
In the case of two actual-value branches, the actual value is acquired for both branches.
The active measuring system is always used for position control, absolute value calculation
and display. If both measuring systems are activated at the same time by the PLC interface,
positioning measuring system 1 is chosen internally by the control.
Reference point approach is executed by the selected measuring system.

Basic Functions
382 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Each position measuring system must be referenced separately.


For an explanation of actual-value acquisition compensation functions, see:
References:
/FB2/ Function Manual, Extended Functions; Compensations (K3)
For an explanation of encoder monitoring, see:
References:
/FB1/ Function Manual, Basic Functions; Axis Monitoring, Protection Zones (A3)

Switching between measuring systems


One can switch between the two measuring systems through the following NC/PLC interface
signals:
DB31, ... DBX1.5 (position measuring system 1)
DB31, ... DBX1.6 (position measuring system 2)
References:
/FB1/ Function Manual, Basic Functions; Various Interface Signals (A2)
It is possible to switch over measuring systems at any time, the axes do not have to be
stationary to do this. Switchover only takes place if a permissible deviation between the
actual values and the two measuring systems has not been violated.
The associated tolerance is entered in the machine data:
MD36500 $MA_ENC_CHANGE_TOL (Max. tolerance on position actual value switchover)
On switchover, the current difference between position measuring system 1 and 2 is
traversed immediately.
The permissible deviation between the actual values of the two measuring systems is to be
entered in the machine data:
MD36510 $MA_ENC_DIFF_TOL
This tolerance setting must not be exceeded during cyclical comparison of the two
measuring systems or an error message will be generated.
If the axis is not referenced (at least in the current control measuring system) then the
related monitoring is not active if MD36510 = 0 or if neither of the two measuring systems in
the axis is active/available).

Types of actual-value acquisition


The used edcoder type must be defined through the following machine data:
MD30240 $MA_ENC_TYPE (type of actual-value acquisition (actual position value))

Simulation axes
The speed control loop of an axis can be simulated for test purposes.
The axis "traverses" with a following error, similar to a real axis.
A simulation axis is defined by setting the two following machine data to "0":
MD30130 $MA_CTRLOUT_TYPE[n] (output value of setpoint)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 383
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

MD30240 $MA_ENC_TYPE[n] (type of actual-value acquisition)


As soon as the standard machine data have been loaded, the axes become simulation axes.
The setpoint and actual value can be set to the reference point value with reference point
approach.
The machine data:
MD30350 $MA_SIMU_AX_VDI_OUTPUT (output of axis signals with simulation axes)
can be used to define whether the axis-specific interface signals are to be output on the PLC
during the simulation.

Actual-value correction
If actual-value corrections performed by the NC on the encoder selected for position control
do not influence the actual value of another encoder defined in the same axis, then this
encoder is to be declared as "independent" via the following machine data:
MD30242 $MA_ENC_IS_INDEPENDENT
Actual-value corrections include the following:
● Modulo treatment
● Reference point approach
● Measuring system comparison
● PRESET

7.4.2 Speed setpoint and actual-value routing

General
In order to carry out speed setpoint and actual-value routing, the following must be defined
for each axis/spindle:
● Assignment of 1st measuring circuit
● Assignment of 2nd measuring circuit (if present)
● Assignment of setpoint branch
Multiple assignment is also possible, e.g. using a measuring circuit for position actual-value
acquisition for the alternating control of several axes/spindles.

Note
When a SIMODRIVE 611 universal is operated via the PROFIBUS-DP, various machine
data that need to be parameterized for digital and analog drives are not assigned.

Basic Functions
384 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Prerequisite for routing


All NC-machine axes must be in machine data:
MD10000 $MN_AXCONF_MACHAX_NAME_TAB [n] (machine axis name)
defined uniquely.
This name must be unique throughout the system (all mode groups and channels).
References:
/FB1/ Function Manual, Basic Functions;
Axes, coordinate systems, frames (K2) /
Mode group, channel, program operation, reset response (K1)

Speed setpoint routing


For speed setpoint routing, the following setpoint assignments for parameterizing the
relevant machine data must be made:

Setpoint assignment Number


Drive type: of the bus segment
Drive/module number: of the module within a bus segment
Output on drive module/module: of the setpoint output
Output type of setpoint: Type of speed setpoint output
Setpoint output is unipolar Polarity of the output driver for speed setpoint
(only active in conjunction with PROFIBUS-DP) output

Index of MD for speed setpoint routing


The index [n] of the machine data for setpoint routing is coded with 0 for setpoint assignment
with default setting 1.

Speed setpoint routing


The following machine data need to be parameterized for each setpoint branch:

MD30100 $MA_CTRLOUT_SEGMENT_NR[n] (setpoint assignment of bus segment):


The number of the bus segment, via which the output is addressed, is entered here.
Depending upon the instance of the corresponding SINUMERIK, specific bus segments are
permanently assigned.
• Local bus =0
• 611D-Bus (1st DCM) =1
• Local P-bus =2
• 611D-Bus (2nd DCM) =3
• reserved for virtual buses =4
• PROFIBUS-DP (NCU 573.2 onward) =5
(PLC-side Profibus-strand for ProfiSafe)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 385
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

MD30100 $MA_CTRLOUT_SEGMENT_NR[n] (setpoint assignment of bus segment):


• PROFIBUS-DP Link module (NCU 573.2 onward) =6

MD30110 $MA_CTRLOUT_MODULE_NR[n]
(setpoint assignment: Drive number/module number):
The number of the module in the bus segment, via which the output is to be addressed, is entered
here.
The logial number of the axis module via the machine data:
MD13010 $MN_DRIVE_LOGIC_NR[n]
can be set for:
• SINUMERIK 840D as 611 digital drive number Range of values 0 - 31
• SINUMERIK 840D Profibus at link module Range of values 0 -125

MD30120 $MA_CTRLOUT_NR[n])
(setpoint assignment: Setpoint output on drive module/module):
The number of the output is to be entered here, through which the setpoint output is done
(SINUMERIK 840D always via output 1).

MD30130 $MA_CTRLOUT_TYPE[n] (setpoint output type):


The speed setpoint output type is entered here.
0: Simulation (HW not required)
1: Standard (differentiated via HW configuration)

MD30134 IS_UNIPOLAR_OUTPUT[n] (setpoint output is unipolar):


The unipolar speed setpoint output works only in conjunction with PROFIBUS-DP.

Actual-value routing
For actual-value routing, the following actual-value assignments for parameterizing the
associated machine data must be made:

Actual value assignment Number:


Drive type: of the bus segment
Drive/module number: of the module within a bus segment
Input on drive module/measuring circuit module: of the setpoint input
Type of actual-value acquisition (position actual The encoder type used
value):
Encoder set independently/dependently The encoder is independent
Actual-value corrections by the NC

Basic Functions
386 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Machine data actual-value routing


The following machine data must be parameterized for each actual-value branch:

MD30210 $MA_ENC_SEGMENT_NR[n] (actual-value assignment of bus segment):


The number of the bus segment, via which the encoder is addressed, is entered here.
Depending upon the instance of the corresponding SINUMERIK, specific bus segments are
permanently assigned.
• Local bus =0
• 611D-Bus (1st DCM) =1
• Local P-bus =2
• 611D-Bus (2nd DCM) =3
• reserved for virtual buses =4
• PROFIBUS-DP (NCU 573.2 onward) =5
(PLC-side Profibus-strand for ProfiSafe)
• PROFIBUS-DP Link module (NCU 573.2 onward) =6

MD30220 $MA_ENC_MODULE_NR[n])
(actual-value assignment: drive module number/measuring circuit number):
The number of the module in the bus segment, via which the encoder is addressed, is entered here.
The logial number of the axis module via the machine data:
MD13010 $MN_DRIVE_LOGIC_NR[n]
can be set for:
• SINUMERIK 840D as 611 digital drive number Range of values 0 - 31
• SINUMERIK 840D Profibus at link module Range of values 0 -125

MD30230 $MA_ENC_INPUT_NR[n])
(actual-value assignment: Input on drive module/measuring circuit module):
The number of the input, to which the position actual-value encoder is connected, is entered here.
• For SINUMERIK 840D: = 1 or 2 (counting down)

MD30240 $MA_ENC_TYPE[n] (type of actual-value acquisition):


Enter the encoder type used here.

MD30242 $MA_ENC_IS_INDEPENDENT[n]:
To prevent actual-value corrections influencing the actual value of an encoder defined in the same
axis, the latter must be declared independent.
0: Encoder is independent
1: Encoder is dependent

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 387
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

MD index for actual-value routing


The coding of the machine data index [n] for actual-value routing is:

[encoder no.]
0 For first encoder
1 For second encoder

Examples of setpoint/actual-value routing


SINUMERIK 840D with SIMODRIVE 611 digital
For machine axis "X1", the setpoint should be output digitally and actual values acquired on
drive module 4 (4th slot = index [3]).
The "logical drive number" of this module is 7.
Encoder number: 1, 2
Therefore, actual values are acquired via a direct and indirect measuring system.

$FWXDOYDOXHDVVLJQPHQWIRUD[LV; 0''5,9(B/2*,&B15

 0'(1&B02'8/(B15
1&&38
 6,02'5,9(      
',2%86
 /RFDOEXVIRU  ,QSXWDOVRXVHGE\
6,180)01& 6,02'5,9('

 $[LV;
0'(1&B,1387B15
0'(1&B6(*0(17B15

7DEOH

* 0 6SLQGOH

/LQHDUVFDOH

6HWSRLQWDVVLJQPHQWIRUD[LV;
0''5,9(B/2*,&B15

1&&38 
 6,02'5,9(      
',2%86
 /RFDOEXVIRU 0'&75/287B15
6,180)01&
0'&75/287B02'8/(B15
0'&75/287B6(*0(17B15

Figure 7-2 Example of setpoint/actual-value routing

Basic Functions
388 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Special features of SINUMERIK 840D with SIMODRIVE 611 digital:


● MD30110 $MA_CTRLOUT_MODULE_NR[n]and
MD30220 $MA_ENC_MODULE_NR[n]
of a machine axis always have the same logical axis number in case of indirect
measuring systems
or when the motor encoder has to be evaluated at the NC-side.
● If direct measuring systems are installed, you can also configure encoders that are
connected to other drives.

7.4.3 Configuration of drives

SINUMERIK 840D with SIMODRIVE 611 digital


SINUMERIK 840D with 611D-Drive bus
You can configure the drive in the "Diagnostics" operating area on the operator panel (HMI;
Human Machine Interface).
The following machine data are automatically parameterized for each real drive:
● MD13010 $MN_DRIVE_LOGIC_NR[n] (logical drive number)
● MD13000 $MN_DRIVE_IS_ACTIVE[n] (activate SIMODRIVE 611 digital drive)
● MD13030 $MN_DRIVE_MODULE_TYPE[n] (module identifier)
● MD13040 $MN_DRIVE_TYPE[n] (drive type identifier)
● MD13020 $MN_DRIVE_INVERTER_CODE[n] (power section code of drive module)
The index [n] used in the machine data is the slot number of the real drives. The number is
automatically assigned by the NC for all connected drive modules on POWER ON. The
index is numbered starting with "0" at the beginning of the drive bus (1st real drive available)
and continues in ascending order to the end. Multi-axis modules are assigned consecutive,
physical drive numbers (counted from left to right).
The MD13010 $MN_DRIVE_LOGIC_NR (logical drive number)
can also be used to create placeholders for modules that are not yet available.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 389
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

SINUMERIK 840Di with SIMODRIVE 611 universal


SINUMERIK 840Di with PROFIBUS-DP
When a SINUMERIK 840Di is operated with the PROFIBUS-DP drive 611 universal, the
following MD are not used:
● MD13000 $MN_DRIVE_IS_ACTIVE[n] (activate SIMODRIVE 611 digital drive)
● MD13010 $MN_DRIVE_LOGIC_NR[n] (logical drive number)
● MD13020 $MN_DRIVE_INVERTER_CODE[n] (power section code of drive module)
● MD13030 $MN_DRIVE_MODULE_TYPE[n] (module identifier)
● MD13040 $MN_DRIVE_TYPE[n] (Identification of the drive type)
The following machine data are used instead of MD13000 to MD13040:
● MD13050 $MN_DRIVE_LOGIC_ADDRESS[n] (drive address)
● MD13060 $MN_DRIVE_TELEGRAM_TYPE[n]
(Message frame type for drives connected to PROFIBUS-DP)
● MD13070 $MN_DRIVE_FUNCTION_MASK[n]
(DP functions used for drives connected to PROFIBUS-DP)
Allows adaptation of certain non-standardized PROFIBUS control bits of the SIMODRIVE
611 universal.
● MD13080 $MN_DRIVE_TYPE_DP[n] (PROFIBUS-DP drive type)
Selection of external slaves, synchronous, asynchronous or linear drives.

7.4.4 Adapting the motor/load ratios

Gear types
The following gear types are available for adapting the mechanical ratios:

Gear type Activation Adaptation Installation location


Motor/load gear Parameter set Fixed configuration Gear unit
Measuring gear encoder Power ON Sensor-dependent Sensor-side
Load intermediate gear unit NewConfig Load-dependent Tool-side

Basic Functions
390 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Local position of gear unit/encoder

0RWRUVLGHHQFRGHU /RDGVLGHHQFRGHU 7RROVLGHHQFRGHU


(1&B,6B',5(&7  (1&B,6B',5(&7  (1&B,6B',5(&7 
(1&B,6B',5(&7  (1&B,6B',5(&7  (1&B,6B',5(&7 

0 7RRO
0RWRUORDG ,QWHUPHGLDWH 3RZHUHGWRROV
JHDU JHDU

'5,9(B$;B5$7,2B180(5$ =
1RRIORDGUHYV
'5,9(B$;B5$7,2B'(120 1RRIWRROUHYV

'5,9(B$;B5$7,2B180(5$ 1RRIPRWRUUHYV
=
'5,9(B$;B5$7,2B'(120 1RRIORDGUHYV

Figure 7-3 Gear unit types and encoder locations

Motor/load gear
The motor/load gear supported by SINUMERIK is configured via the following machine data:
MD31060 $MA_DRIVE_AX_RATIO_NUMERA (Numerator load gearbox)
MD31050 $MA_DRIVE_AX_RATIO_DENOM (Denominator load gearbox)
The transmission ratio is obtained from the numerator/denominator ratio of both machine
data. The associated parameter sets are used automatically as default by the control to
synchronize the position controller with the relevant transmission ratios.
Since a gear stage change is not always carried out automatically, and there are also
several ways to request a gear stage change, the position controller is not always
incorporated via parameter sets.

Note
For more information about parameter sets during gear stage change, see:
References:
/FB1/ Function Manual, Basic Functions; Spindles (S1).

Intermediate gear
Additional, configurable load intermediate gears are also supported by the control:
MD31066 $MA_DRIVE_AX_RATIO2_NUMERA (intermediate gear numerator)
MD31064 $MA_DRIVE_AX_RATIO2_DENOM (intermediate gear denominator)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 391
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Power tools generally have their "own" intermediate gear. Such variable mechanics can be
configured by multiplying the active intermediate gearbox and the motor/load gearbox.

CAUTION
Unlike the motor/load gear, there is no parameter set for the intermediate gear and,
therefore, no way of controlling the time-synchronized switchover to part program or PLC
(VDI interface). Part programming during gear change is, therefore, ruled out. It remains the
task of the user to match the synchronization of the relevant changed machine data to the
corresponding mechanical switchover and activate it. On switchover during a movement,
compensations cannot be ruled out due to jumps in the scaling factors. These are not
monitored for violation of the maximum acceleration.

Encoder directly on tool


Another connection option is possible for a "tool-side encoder" on the intermediate gear, by
configuring machine data:
MD31044 $MA_ENC_IS_DIRECT2.

Encoder not directly on tool


The following supplementary conditions apply to a gear change of the intermediate gear in
position-control mode:
● The gear ratio to be changed is incorporated in a re-scaling of the encoder information in
this case.
In this case, the following applies to axes/spindles in positioning mode:
● A non-abrupt gear change is only possible at zero speed.
To do this, the tool-side position before and after a gear change are set equal for a
change in the ratio, since the mechanical position does not (or hardly) changes during a
gear stage change.
Recommendation:
To avoid 21612 "Controller enable reset during motion", changeover should be carried
out "only at zero speed". It is still permissible and expedient to switch the axis or spindle
to speed-control or follow-up mode before or during a gear change.

Supplementary conditions
If the encoder to be used for position control is connected directly at the tool, the gear stage
change only affects the physical quantities at the speed interface between the NC and the
drive of the motor/load gear. The internal parameter sets are not changed.

Basic Functions
392 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Reference point and position reference


In the case of gear changes, it is not possible to make a statement about the effect of the
reference point or machine position reference on the encoder scaling. In such cases, the
control partially cancels the status "Axis referenced/synchronized".
If the position reference to the machine, tool, etc., has been lost, it must first be restored
through appropriate adjustment or referencing of the lost reference point. This is especially
important for the functions Travel to fixed stop, Referencing to Bero, Cam and Zero marker.

CAUTION
The control cannot detect all possible situations that can lead to loss of the machine
position reference. Therefore, it is the responsibility of the commissioning engineer or user
to initiate explicit referencing of zero marker synchronization in such cases.

Note
To facilitate re-referencing without a disruptive RESET,
machine data:
MD34080 $MA_REFP_MOVE_DIST
and
MD34090 $MA_REFP_MOVE_DIST_CORR
should be reset to NewConfig efficacy.
For more information about referencing, please see:
References:
/FB1/ Function Manual, Basic Functions; Reference Point Approach (R1)

7.4.5 Speed setpoint output

Control direction and travel direction of the feed axes


You must determine the travel direction of the feed axis before starting work.
Control direction
Before the position control is started up, the speed controller and current controller of the
drive must be started up and optimized.
Travel direction
With the machine data:
MD32100 $MA_AX_MOTION_DIR (travel direction).
the direction of motion of the axis can be reversed,
without affecting the control direction of the position control.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 393
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Speed setpoint adjustment


SINUMERIK 840D
In the case of speed setpoint comparison, the NC is informed, which speed setpoint
corresponds to which motor speed in the drive, for parameterizing the axial control and
monitoring. This comparison is carried out automatically.
SINUMERIK 840D with PROFIBUS-DP
For PROFIBUS-DP drives with automatic adjustment of the speed setpoint standardization it
is necessary that the machine data:
MD32250 $MA_RATED_OUTVAL[n] (rated output voltage)
be changed from 80% to 0% corresponding to the value "0".
This value is also to be ensured for an NC side adjustment.
For PROIBUS-DP drives, alternatively, the manual speed setpoint comparison is also
possible.
● Manual comparison
In the machine data:
MD32250 $MA_RATED_OUTVAL
a value not equal to zero is entered.
For more detailed information about motor speed adjustments, please see:
References:
/HBI/ Manual SINUMERIK 840Di; "Axes and Spindles"
SINUMERIK 840D with SIMODRIVE 611 universal
The speed setpoint comparison for SINUMERIK 840Di with SIMODRIVE 611 universal
drives can be performed automatically or manually.
● Automatic adjustment
The configuration values for the speed value standardization are adjusted automatically,
as long as the machine data:
MD32250 $MA_RATED_OUTVAL[n] = 0
remains.
The speed setpoint comparison through acyclic services at PROFIBUS-DP can be
performed automatically.
SINUMERIK 840D with SIMODRIVE digital

Note
Velocity adjustment and maximum speed setpoint
Owing to the automatic speed setpoint comparison a velocity adjustment is not necessary for
SINUMERIK 840D!

Basic Functions
394 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Maximum speed setpoint


In case of SINUMERIK 840D the maximum speed setpoint is the highest value.
owing to the maximum speed of the drive machine data set
MD1401/2401 $MD_MOTOR_MAX_SPEED (maximum useful motor speed)
on which the output of SIMODRIVE 611 digital drive can be done.
MD1401 corresponds to the maximum motor speed on the spindle drive. The desired speed
at the spindle is reached via the mechanical gear stage.
The output of the spindle speed is implemented in the NC for SINUMERIK 840D/840Di.
Data for 5 gear stages are realized in the control.
These stages are defined by a minimum and maximum speed for the stage itself and by a
minimum and maximum speed for the automatic gear stage changeover. A new set gear
stage is output only if the new programmed speed cannot be traversed in the current gear
stage.
With the machine data:
MD36210 $MA_CTRLOUT_LIMIT[n] (maximum speed setpoint)
the speed setpoint is restricted percentage-wise
Values up to 200% are possible.
When the speed is exceeded, an alarm is generated.

Q 6HW  6SHHGVHWSRLQW
0D[VSHHGVHWSRLQW
0'&75/287B/,0,7

0D[D[LVYHORFLW\
0'0$;B$;B9(/2

W>V@

Figure 7-4 Maximum speed setpoint

However, due to control processes, the axes should not reach their maximum velocity
(MD32000 $MA_MAX_AX_VELO) at 100% of the speed setpoint, but at 80% to 95%.
In case of axes, whose maximum speed is attained at around 80% of the speed setpoint
range, the default value (80%) of the machine data:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 395
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

In case of SINUMERIK 840D/810 the machine data:


MD36210 $MA_CTRLOUT_LIMIT[n] (maximum speed setpoint)
and
MD1405/2405 $MD_MOTOR_SPEED_LIMIT (Monitoring speed Motor)
should match.

Note
For further explanations for setpoint value adjustment for SIMODRIVE digital drive see:
References:
/IAD/ Installation and Startup Guide; Axes and Spindles
For explanations for setpoint standardization for SIMODRIVE analog drives see
References:
/FB3/ Function Manual Special Functions; Analog axes (TE2)

7.4.6 Actual-value processing

Actual-value resolution
In order to be able to create a correctly closed position control loop, the control system must
be informed of the valid actual-value resolution. The axis-specific machine data below are
used for this.
The control calculates the actual-value resolution from the settings made in the MD. The
control parameter sets of the position control are identified as servo parameter sets.
The machining process of the machine forms the basis of the position actual-value
acquisition.

Direct measuring system (DM) is on machine directly: Load-side encoder


Indirect measuring system (IM) is on motor indirectly: Motor-side encoder

Depending on the type of axis (linear axis, rotary axis) and the type of actual-value
acquisition (directly at the machine, indirectly at the motor), the following machine data must
be parameterized to calculate the actual-value resolution:

Basic Functions
396 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Machine data Linear axis Linear axis Rotary axis


Linear scale/ Encoder Encoder Encoder Encoder
or as direct on on on on
measuring motor machine motor machine
system and/or tool and/or tool
MD30300 $MA_IS_ROT_AX 0 0 0 1 1
MD31000 $MA_ENC_IS_LINEAR[n] 1 0 0 0 0
MD31010 $MA_ENC_GRID_POINT_DIST[n] Spacing - - - -
MD34320 $MA_ENC_INVERS[n] Opposite - - - -
direction
MD31040 $MA_ENC_IS_DIRECT[n] - / (1) 0 1 0 1
MD31044 $MA_ENC_IS_DIRECT2[n] - / (1) 0 1 0 1
MD31020 $MA_ENC_RESOL[n] - Pulses/ Pulses/ Pulses/r Pulses/
rev rev ev rev
MD31030 $MA_LEADSCREW_PITCH - mm/rev. mm/rev. - -
MD31050 $MA_DRIVE_AX_RATIO_DENOM[n] - Load - Load See
rev. rev. note
MD31060 $MA_DRIVE_AX_RATIO_NUMERA[n] - Motor - Motor See
rev. if rev. note
infeed
gear
available
MD31070 $MA_DRIVE_ENC_RATIO_DENOM[n] - Encoder Encoder Encoder Encoder
rev. rev. rev. rev.
MD31080 $MA_DRIVE_ENC_RATIO_NUMERA[n] - Motor- Motor Motor Load
side rev. rev. rev.
encoder*

- = Does not apply to this combination


* The encoder on the motor side is a built-in encoder and, therefore, does not have a measuring gear unit.
The transmission ratio is always 1:1.

Note
These machine data are not required for encoder matching (path evaluation).
However, they must be entered correctly for the setpoint calculation!
Otherwise the required servo gain (KV) factor will not be set.
In machine data:
MD31050 $MA_DRIVE_AX_RATIO_DENOM
one enters the load rotations, in machine data:
MD31060 $MA_DRIVE_AX_RATIO_NUMERA
the motor rotations.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 397
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Coding of the machine data


The indices of the following machine data are coded at the encoder [Encoder no.]:
Encoder 0 or 1

Encoder-dependent machine data Meaning


MD31070 $MA_DRIVE_ENC_RATIO_DENOM[n] (Measuring gear denominator)
MD31080 $MA_DRIVE_ENC_RATIO_NUMERA[n] (Measuring gear numerator)
MD31000 $MA_ENC_IS_LINEAR[n] (Direct measuring system, linear scale)
MD31010 $MA_ENC_GRID_POINT_DIST[n] (Distance between reference marks on
linear scales)
MD31020 $MA_ENC_RESOL[n] (Encoder pulses per revolution)
for rotary encoder
MD31040 $MA_ENC_IS_DIRECT[n] (Encoder is connected directly at the
machine)
MD34320 $MA_ENC_INVERS[n] (Length measurement system is inverse)
Further machine data without index
MD30200 $MA_NUM_ENCS (Number of encoders)
MD30300 $MA_IS_ROT_AX (rotary axis)
MD31030 $MA_LEADSCREW_PITCH (Leadscrew pitch)

Index [n] of the following machine data depend on the servo parameter sets of the position
controller, with which the actual-value resolution is calculated automatically in the control:
MD DRIVE_AX_...[servo parameter set no.]: 0-5

Parameter-set-dependent machine data Description


MD31050 $MA_DRIVE_AX_RATIO_DENOM[n] (Denominator load gear unit)
MD31060 $MA_DRIVE_AX_RATIO_NUMERA[n] (Numerator load gear unit)

For the following machine data, the control does not consider any parameter set nor any
indices for coded encoders.

NewConfig-dependent machine data Description


MD31064 $MA_DRIVE_AX_RATIO2_DENOM (Intermediate gear denominator)
MD31066 $MA_DRIVE_AX_RATIO2_NUMERA (Intermediate gear numerator)
MD31044 $MA_ENC_IS_DIRECT2 (Encoder on intermediate gear)
MD32000 $MA_MAX_AX_VELO (Maximum axis velocity)
MD34080 $MA_REFP_MOVE_DIST (Reference point distance)
MD34090 $MA_REFP_MOVE_DIST_CORR (Reference point offset)

Note
These machine data can be activated in part programs with the command NEWCONF or via
the HMI operator panel using a soft key.

Basic Functions
398 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Variants of actual-value acquisition


The relevant machine data and relational calculations for the different methods of actual-
value acquisition are described in the following.

7.4.7 Adjustments to actual-value resolution

Calculating the ratio


The calculation of the ratio is obtained from the associated machine data and is defined for
incremental encoders as follows:

&RPSXWDWLRQDOUHVROXWLRQ ,QWHUQDOLQFUHPHQWV PP
$FWXDOYDOXHUHVROXWLRQ (QFRGHULQFUHPHQWV PP

For incremental encoders with rotary axis, the following applies:

&RPSXWDWLRQDOUHVROXWLRQ ,QWHUQDOLQFUHPHQWV GHJUHHV


$FWXDOYDOXHUHVROXWLRQ (QFRGHULQFUHPHQWV GHJUHHV

The internal pulse multiplication factor provided by the measuring system logic module is
● 2048
For raw signal generators on 840D with SIMODRIVE 611 digital

Linear axis with linear scale

0',6B527B$; 

7DEOH
0 %DOOVFUHZ

/LQHDUVFDOH
/RDGJHDU

0'(1&B,6B/,1($5 
0'(1&B*5,'B32,17B',67 OLQHDUHQFRGHU
0'(1&B,19(56 LQWKHRSSRVLWHGLUHFWLRQ

Figure 7-5 Linear axis with linear scale

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 399
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

In order to adapt the actual-value resolution to the calculation resolution, the control
calculates the quotients from the "internal increments/mm" and the "encoder increments/mm"
as follows:

,QWHUQDOLQFUHPHQWVPP (1&B*5,'B32,17B',67>Q@ ,17B,1&5B3(5B00


(QFRGHULQFUHPHQWVPP ,QWHUQDOPXOWLSOLFDWLRQ

The distance for linear encoders is based on the pulse increments.

Linear axis with rotary encoder on motor

(1&B,6B/,1($5B  ,6B527B$; 
n
(QFRGHU (1&B,6B/,1($5B 
7DEOH
* 0 %DOOVFUHZ
0HDV /RDG
JHDU JHDU n /($'6&5(:B3,7&+
n 6SLQGOH
0RWRU
(1&B5(62/ '5,9(B$;B5$7,2B180(5$ 1RRIPRWRUUHYV
=
'5,9(B$;B5$7,2B'(120 1RRIVSLQGOHUHYV

'5,9(B(1&B5$7,2B180(5$ 1XPEHURIPRWRUUHYROXWLRQV
=
'5,9(B(1&B5$7,2B'(120 1XPEHURIHQFRGHUUHYROXWLRQV

Figure 7-6 Linear axis with rotary encoder on motor

In order to adapt the actual-value resolution to the calculation resolution, the control
calculates the quotients from the "internal increments/mm" and the "encoder increments/mm"
as follows:
SINUMERIK example
Linear axis with rotary encoder (2048 Impulse) on motor;
internal multiplication (2048)

Gear: Motor/leadscrew 5
Pitch 10 mm
10000 increments per mm

Basic Functions
400 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

,QWHUQDOLQFUHPHQWVPP 
(QFRGHULQFUHPHQWVPP (1&B5(62/>Q@ LQWHUQDOPXOWLSOLFDWLRQ

'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@

'5,9(B$;B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B180(5$>Q@

/($'6&5(:B3,7&+

,17B,1&5B3(5B00

⇒ MD30300 $MA_IS_ROT_AX =0
MD31000 $MA_ENC_IS_LINEAR[0] =0
MD31040 $MA_ENC_IS_DIRECT[0] =0
MD31020 $MA_ENC_RESOL[0] = 2048
MD31030 $MA_LEADSCREW_PITCH = 10
MD31080 $MA_DRIVE_ENC_RATIO_NUMERA[0] = 1
MD31070 $MA_DRIVE_ENC_RATIO_DENOM[0] =1
MD31060 $MA_DRIVE_AX_RATIO_NUMERA[0] =5
MD31050 $MA_DRIVE_AX_RATIO_DENOM[0] =1
MD10200 $MN_INT_INCR_PER_MM = 10000

,QWHUQDOLQFUHPHQWVPP   
(QFRGHULQFUHPHQWVPP    

PP LQFUPP 

Result:
1 encoder increment corresponds to 0.004768 increments of the internal unit. In practice, the
available encoder resolution should not be resolved more accurately than the internal
computational resolution.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 401
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Linear axis with rotary encoder on the machine

,6B527B$;  (1&B,6B',5(&7 

(1&B,6B/,1($5 
7DEOH
0 *
%DOOVFUHZ (1&B5(62/
/RDG  0HDV
JHDU JHDU
/($'6&5(:B3,7&+
Q 6SLQGOH Q (QFRGHU

'5,9(B(1&B5$7,2B180(5$ 1RRIVSLQGOHUHYV
'5,9(B(1&B5$7,2B'(120 1RRIHQFRGHUUHYV

Figure 7-7 Linear axis with rotary encoder on the machine

In order to adapt the actual-value resolution to the calculation resolution, the control
calculates the quotients from the "internal increments/mm" and the "encoder increments/mm"
as follows:

,QWHUQDOLQFUHPHQWVPP 
(QFRGHULQFUHPHQWVPP (1&B5(62/>Q@ LQWHUQDOPXOWLSOLFDWLRQ

'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@

/($'6&5(:B3,7&+

,17B,1&5B3(5B00

Basic Functions
402 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Rotary axis with rotary encoder on motor

(1&B,6B/,1($5 

(1&B,6B',5(&7 
Q (QFRGHU Q /RDG ,6B527B$; 

* 0 /
5RWDU\WDEOH

Q 0RWRU '5,9(B$;B5$7,2B180(5$ 1RRIPRWRUUHYV


(1&B5(62/
'5,9(B$;B5$7,2B'(120 1RRIORDGUHYV
5HVROYHUJHDULQJ /RDGJHDU

'5,9(B(1&B5$7,2B180(5$ 1XPEHURIPRWRUUHYROXWLRQV
'5,9(B(1&B5$7,2B'(120 1XPEHURIHQFRGHUUHYROXWLRQV

Figure 7-8 Rotary axis with rotary encoder on motor

In order to adapt the actual-value resolution to the calculation resolution, the control
calculates the quotients from the "internal increments/degree" and the "encoder
increments/degree" as follows:
Example for rotary axis with encoder on motor
Rotary axis with rotary encoder (2048 Impulse) on motor;
internal multiplication (2048)

Gear: Motor/rotary axis 5


1000 increments per degree

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 403
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV
(QFRGHULQFUHPHQWVGHJUHHV (1&B5(62/>Q@ LQWHUQDOPXOWLSOLFDWLRQ

'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@

'5,9(B$;B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B180(5$>Q@

,17B,1&5B3(5B'(*

⇒ MD30300 $MA_IS_ROT_AX =1
MD31040 $MA_ENC_IS_LINEAR[0] =0
MD31040 $MA_ENC_IS_DIRECT[0] =0
MD31040 $MA_ENC_RESOL[0] = 2048
MD31080 $MA_DRIVE_ENC_RATIO_NUMERA[0] =1
MD31080 $MA_DRIVE_ENC_RATIO_DENOM[0] =1
MD31060 $MA_DRIVE_AX_RATIO_NUMERA[0] =5
MD31050 $MA_DRIVE_AX_RATIO_DENOM[0] =1
MD10210 $MN_INT_INCR_PER_DEG = 1000

,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV  
(QFRGHULQFUHPHQWVGHJUHHV    

LQFUGHJUHHV 

Result:
1 encoder increment corresponds to 0.017166 increments of the internal unit.
The encoder resolution is thus coarser than the computational resolution by a factor of 58.

Basic Functions
404 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Rotary axis with rotary encoder on the machine

Q /RDG

5RWDU\WDEOH (1&B,6B',5(&7 
Q (QFRGHU
(1&B5(62/
0 / * (1&B,6B/,1($5B 

,6B527B$;  '5,9(B(1&B5$7,2B180 1RRIORDGUHYV


'5,9(B(1&B5$7,2B'(120(5$ 1RRIHQFRGHUUHYV

/RDGJHDU 5HVROYHUJHDULQJ

Figure 7-9 Rotary axis with rotary encoder on the machine

In order to adapt the actual-value resolution to the calculation resolution, the control
calculates the quotients from the "internal increments/degree" and the "encoder
increments/degree" as follows:

,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV
(QFRGHULQFUHPHQWVGHJUHHV (1&B5(62/>Q@ LQWHUQDOPXOWLSOLFDWLRQ

'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@

,17B,1&5B3(5B'(*

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 405
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Setpoint/actual-value system

Intermediate gear encoder on tool

'5,9(B$;B5$7,2B180(5$ 1RRIORDGUHYV
'5,9(B$;B5$7,2B'(120 1RRIVSLQGOHUHYV
(1&B,6B',5(&7 
(1&B,6B',5(&7  Q
7RRO
5RWDWLQJWRRO
* 0 7RRO
0HDV /RDG ,QWHUPHGLDWHJHDU
JHDU JHDU
Q Q
(QFRGHU 0RWRU (1&B,6B',5(&7  (1&B,6B',5(&7 
(1&B5(62/ (1&B,6B',5(&7  (1&B,6B',5(&7 

'5,9(B$;B5$7,2B180(5$ 1RRIPRWRUUHYV
'5,9(B$;B5$7,2B'(120 1RRIVSLQGOHUHYV

'5,9(B(1&B5$7,2B180(5$ 1XPEHURIPRWRUUHYROXWLRQV
'5,9(B(1&B5$7,2B'(120 1XPEHURIHQFRGHUUHYROXWLRQV

Figure 7-10 Intermediate gear with encoder directly on the rotating tool

In order to adapt the actual-value resolution to the calculation resolution, the control
calculates the quotients from the "internal increments/mm" and the "encoder increments/mm"
as follows:

,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV
(QFRGHULQFUHPHQWVGHJUHHV (1&B5(62/>Q@ LQWHUQDOPXOWLSOLFDWLRQ

'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@

,17B,1&5B3(5B'(*

Basic Functions
406 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

7.5 Closed-loop control

7.5.1 General

Position control of an axis/spindle


The closed-loop control of an axis consists of the current and speed control loop of the drive
plus a higher-level position control loop in the NC.
The speed and current control for SIMODRIVE 611 are explained in:
References:
/IAD/ "Installation and Startup Guide" SINUMERIK 840D/SIMODRIVE 611 digital
/PJU/ "Configuration Manual" Converter
The basic structure of an axis/spindle position control is illustrated below:

0'$;B-(5.B(1$%/(
0'$;B-(5.B02'( 0'326&75/B*$,1>Q@
0'$;B-(5.B7,0(

'\QDPLF )HHG 6SHHG


)LQH -HUN &ORVHG
UHVSRQVH IRUZDUG VHWSRLQW
LQWHUSRODWLRQ OLPLWDWLRQ ORRSFRQWURO
DGDSWDWLRQ FRQWURO SURFHVVLQJ

0'),32B7<3( 0''<1B0$7&+B(1$%/( 0')5,&7B&203B(1$%/(


0''<1B0$7&+B7,0(>Q@ 0'$;B027,21B',5
,)&
SRVLWLRQPHDVXULQJ
V\VWHP
$FWXDOYDOXH
0')):B02'( SURFHVVLQJ
0')):B$&7,9$7,21B02'(
0'9(/2B)):B:(,*+7>Q@ 3DUDPHWHUVHWV 0'(1&B)(('%$&.B32/>Q@
0'$;B,1(57,$ 0'(1&B&203B(1$%/(>Q@
0'(48,9B63(('&75/B7,0(>Q@ 0'%$&./$6+>Q@
0'(48,9B&855&75/B7,0(>Q@ 0'%$&./$6+B)$&725>Q@

Figure 7-11 Additional servo parameter sets for position control

For a description of the feedforward control, backlash, friction compensation with further
machine data, and leadscrew error compensation, see:
References:
/FB2/ Function Manual Extended Functions; Compensations (K3)
For a description of jerk limitation, see:
References:
/FB1/ Function Manual, Basic Functions; Acceleration (B2).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 407
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

Fine Interpolation
The fine interpolator (FIPO) is used to adjust the setpoint of the (generally lower) interpolator
cycle clock to the later position-control cycle.
Fine interpolation further improves the quality of the contour (decreasing the step effect of
the speed setpoint).
There are three types of FIPOs:

1: Differential FIPO
2: Cubic FIPO
3: Cubic FIPO, optimized for operation with feedforward control

The type of fine interpolation can be determined through the following machine data:
MD33000 $MA_FIPO_TYPE (fine interpolator type)
A differential FIPO not only performs cycle matching but also calculates a mean value
(smoothing) from an IPO cycle.
The cubic FIPO, type 3, supplies the best contour accuracy in addition to the cycle
adaptation.

Kv factor
In order that few contour deviations occur in the continuous path mode, a high Kv-Factor is
necessary:
MD32200 $MA_POSCTRL_GAIN[n]
However, if the servo gain factor (Kv) is too high, instability, overshoot and possibly
impermissibly high loads on the machine will result.
The maximum permissible servo gain factor (Kv) depends on the following:
● Design and dynamics of the drive
(rise time, acceleration and braking capacity)
● Machine quality
(elasticity, oscillation damping)
● Position-control cycle
The servo gain factor (Kv) is defined as follows:

9HORFLW\ >PPLQ@
.9 
)ROORZLQJHUURU >PP@

[m/min]/[mm]: Unit of servo gain factor (KV) according to VDI standard

Basic Functions
408 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

KV factor setting for SINUMERIK 840D

6WHSUHVSRQVH
RIWKHSRVLWLRQ
FRQWUROORRS $[LVHTXLYWLPH

(TXLYWLPH '<1B0$7&+B7,0( $[LV>$[LV@


$[LVZLWKKLJKVHUYRJDLQ
DQGG\QDPLFUHVSRQVHDGDSWDWLRQ
$[LVZLWK
KLJKVHUYR
JDLQ

$[LVZLWKORZVHUYRJDLQ

Figure 7-12 Dynamic response adaptation

Dynamic response adaptation


The purpose of dynamic response adaptation is to set an identical following error for axes
with different servo gain factors (Kv). The optimum contour accuracy for axes interpolating
with each other can thus be achieved without reduced control quality. A high servo gain
factor (Kv) for an axis can be maintained, which guarantees optimum disturbance
suppression of the axis.
The function is activated with the machine data:
MD32900 $MA_DYN_MATCH_ENABLE (dynamic response adaptation)
The adjustment of the axes is done via the machine data:
MD32910 $MA_DYN_MATCH_TIME [n] (time constant of dynamic response adaptation)
With this MD the equivalent time constant of the position control loops of the axes with a
higher Kv factor is adjusted to the axes with the lowest Kv factor.
The difference of the equivalent time constants of the "slowest" control loop to the respective
axis is to be entered in the machine data:
MD32910 $MA_DYN_MATCH_TIME [n] (time constant of dynamic response adaptation)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 409
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

Example of dynamic response adaptation of axes 1, 2 and 3 (without speed feedforward


control):

The equivalent time constant of the position control loop is as follows:


For axis 1: 30 ms
For axis 2: 20 ms
For axis 3: 24 ms
⇒ Axis 1 is dynamically the slowest axis.
⇒ This results in the following values for the machine data MD32910:

Axis 1: 0 ms
Axis 2: 10 ms
Axis 3: 6 ms

Approximation formulae
The equivalent time constant of the position control loop of an axis is calculated according to
the following formula:
● No feedforward control is active


76SDUHV ป
0'326&75/B*$,1>V@

● Speed feedforward control

76SDUHV ป 0'(48,9B63(('&75/B7,0(

● Torque feedforward control

76SDUHV ป 0'(48,9B&855&75/B7,0(

Note
If a dynamic response adaptation is done for a geometry axis, then the same dynamic
behavior is necessary for all other geometry axes and is to be activated with the following
setting:
MD32900 $MA_DYN_MATCH_ENABLE= 1
References:
/IAD/, Start-up Guide, SINUMERIK 840D/611D

Basic Functions
410 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

7.5.2 Parameter sets of the position controller

Six different parameters sets


The position control can operate with 6 different servo parameter sets.
They are used as follows
1. Fast adaptation of the position control to altered machine characteristics during operation,
e.g. a gear change of the spindle.
2. Matching the dynamics of an axis to another axis, e.g. during tapping.

Parameter set changeover

The following machine data can be changed by switching over the parameter set during operation:
Denominator load gearbox MD31050 $MA_DRIVE_AX_RATIO_DENOM[n]
Numerator load gearbox MD31060 $MA_DRIVE_AX_RATIO_NUMERA[n]
Kv factor MD32200 $MA_POSCTRL_GAIN[n]
Backlash compensation MD32452 $MA_BACKLASH_FACTOR[n]
Feedforward control factor MD32610 $MA_VELO_FFW_WEIGHT[n]
Exact stop limits MD36012 $MA_STOP_LIMIT_FACTOR[n]
MD36000 $MA_STOP_LIMIT_COARSE
MD36010 $MA_STOP_LIMIT_FINE
and zero-speed window MD36030 $MA_STANSTILL_POS_TOL
Equivalent time constant MD32800 $MA_EQUIV_CURRCTRL_TIME[n]
current control loop for torque feedforward
control
Equivalent time constant MD32810 $MA_EQUIV_SPEEDCTRL_TIME[n]
speed control loop for speed feedforward control
Time constant for dynamic matching MD32910 $MA_DYN_MATCH_TIME[n]
Threshold value for velocity monitoring MD36200 $MA_AX_VELO_LIMIT[n]

Tapping or thread cutting


The following applies to parameter sets for axes:
● For machine axes not involved in tapping or thread cutting, parameter set 1 (index=0) is
always used.
The further parameter sets need not be considered.
● For machine axes involved in tapping or thread cutting, the same parameter set number
as for the current gear stage of the spindle is activated.
All parameter sets correspond to the gear stages and must therefore be parameterized.
The current parameter set is displayed in operating area "Diagnostics" in the "Service axis"
display. The parameter sets for gear stages 1 to 5 are referred to as interpolation
parameters.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 411
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

Parameter sets during gear stage change


Interpolation parameter sets during gear stage change:
In the case of spindles, each gear stage is assigned its own parameter set.
Dependent on the NC/PLC interface signal:
DB31, ... DBX16.0 - 16.2 (actual gear stage)
the corresponding parameter set is activated.

DB31, ... DBX16.0 - 16.2 (actual gear stage) Active parameter set
000 1st gear stage 2 (Index=1)
001 1st gear step 2 (Index=1)
010 2nd gear step 3 (Index=2)
011 3rd gear step 4 (Index=3)
100 4th gear step 5 (Index=4)
101 5th gear step 6 (Index=5)
110
111
For more information on gear stages for spindles see:
References:
/FB1/ Function Manual Basic Functions; Spindles (S1)

7.5.3 Extending the parameter set

Application
Some machines use the same drive for moving various machine parts, which, in view of
considerably varying speeds, results in a gear stage change. With each gear stage change,
the corresponding parameter set is also switched over.
Now several parameter sets are provided for further practical applications and for setting the
feedforward control of the control loop.

Functionality
To optimize closed-loop control during startup, these codable parameter sets support
practice-oriented startup by substantially reducing configuration expenditure with regard to
the new functions, such as backlash compensation, feedforward control factor, exact stop
limits, and zero-speed window.

Basic Functions
412 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

New parameter sets


Until now it has been possible to change the gear ratio and other control loop parameters
(such as achievable control servo gain) by switching over the servo parameter set. The
already existing machine data with parameter set coding are extended as follows:

Parameter set coding (modifiable as a function of parameter set)


Backlash compensation MD32450 $MA_BACKLASH[n] (max. number of
encoders)
Feedforward control factor MD32610 $MA_VELO_FFW_WEIGHT[n]
Exact stop limits MD36000 $MA_STOP_LIMIT_COARSE
MD36010 $MA_STOP_LIMIT_FINE
Zero-speed window MD36030 $MA_STANSTILL_POS_TOL

Weighting factor for parameter set changeover


Weighting factor for: MD32452 $MA_BACKLASH_FACTOR[n]
• Backlash compensation MD32450 $MA_BACKLASH[n]
Weighting factor for: MD36012 $MA_STOP_LIMIT_FACTOR[n]
• Exact stop limits MD36000 $MA_STOP_LIMIT_COARSE
MD36010 $MA_STOP_LIMIT_FINE
• Zero-speed window MD36030 $MA_STANSTILL_POS_TOL

Machine data tried and tested to date


Further machine data with parameter set coding
The following existing machine data can be coded using parameter sets and have already
been tried and tested during the startup of the NC:

Denominator load gearbox MD31050 $MA_DRIVE_AX_RATIO_DENOM


Numerator load gearbox MD31060 $MA_DRIVE_AX_RATIO_NUMERO
Equivalent time constant current control loop MD32800 $MA_EQUIV_CURRCTRL_TIME
Equivalent time constant speed control loop MD32810 $MA_EQUIV_SPEEDCTRL_TIME
Time constant for dynamic response MD32910 $MA_DYN_MATCH_TIME
adaptation
Threshold value for velocity monitoring MD36200 $MA_AX_VELO_LIMIT

Advantages
● The indirect switchover of a single function: (e.g. MD32452 not 1)
The parameter set-dependent function is only relevant if required.
● The indirect switchover of several functions: (e.g. MD36012 not 1)
The common weighting factor forces the ratios of all parameter set-dependent functions
within various machine data to remain constant. To switch over several functions, one
single machine data can be sufficient.
In this way, configuration errors are avoided and input work reduced.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 413
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

Activating the parameter set coding


Default setting without parameter set coding
Provided that the machine data below retain a value of (1), the control is compatible with
earlier software versions:
MD32452 $MA_BACKLASH_FACTOR = 1
MD32610 $MA_VELO_FFW_WEIGHT = 1
MD36012 $MA_STOP_LIMIT_FACTOR = 1
Activating the parameter set coding
If the default setting in machine data:
MD32452 $MA_BACKLASH_FACTOR
is changed to something other than (1.0), the backlash compensation is also changed,
depending on the parameter set.
If the default setting in machine data:
MD32610 $MA_VELO_FFW_WEIGHT
is changed to something other than (1.0), the feedforward control factor is also changed,
depending on the parameter set.
If the default setting in machine data:
MD36012 $MA_STOP_LIMIT_FACTOR
is changed to something other than (1.0), the exact limit stops and the zero-speed window
are also changed, depending on the parameter set.
When loading previous archives (from data stored in earlier software versions), machine
data:
MD32610 $MA_VELO_FFW_WEIGHT
is automatically set to the same value for all indices, to ensure that the control remains
compatible.
Machine data:
MD32452 $MA_BACKLASH_FACTOR
and
MD36012 $MA_STOP_LIMIT_FACTOR
are not even available in previous archives.
In this case, the default setting remains active automatically.
The response is also compatible in this case.

Basic Functions
414 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Closed-loop control

Example
Effects of various parameter sets with backlash compensation:

MD32450 $MA_BACKLASH[AX1] = 0.01


MD32452 $MA_BACKLASH_FACTOR[0,AX1] = 1.0 Parameter set 1
MD32452 $MA_BACKLASH_FACTOR[1,AX1] = 2.0 Parameter set 2
MD32452 $MA_BACKLASH_FACTOR[2,AX1] = 3.0 Parameter set 3
MD32452 $MA_BACKLASH_FACTOR[3,AX1] = 4.0 Parameter set 4
MD32452 $MA_BACKLASH_FACTOR[4,AX1] = 5.0 Parameter set 5
MD32452 $MA_BACKLASH_FACTOR[5,AX1] = 6.0 Parameter set 6

In parameter set 1 (index 0) of the first axis (AX1), a backlash compensation factor with the
value 1.0 has the following effect:
1.0 * MD32450 = 0.01 mm (or inch or degrees)
The backlash compensation is twice as large in parameter set 2, three times as large in
parameter set 3, etc.
The maximum value is 100.

Supplementary conditions
The functional expansion is available for all control variants.

Control response on POWER ON, RESET, REPOS


The new or modified data are activated via the "Enable machine data" soft key or by a
RESET or POWER ON. Mode switchover, block search or REPOS have no influence.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 415
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

7.6 Optimization of the control

7.6.1 Position controller: injection of positional deviation

Application
The stability and positioning response of axes with a low natural frequency (up to approx. 20
Hz) and a mechanical design capable of generating oscillations is improved by active
oscillation damping with simultaneous use of the feedforward control.
To illustrate this, the difference in position between two measuring systems is generated
and injected as an additional current setpoint for the feedforward control, according to the
weighting of machine data:
MD32950 $MA_POSCTRL_DAMPING.
The function is used predominantly for axes with strong tendency to vibrate.

Functionality
The positional deviation is injected in the NC in the position controller cycle of the higher-
level position control loop in the NC.
The difference in position between a direct and an indirect measuring system is generated
and injected as an additional current setpoint, depending on the weighting of machine data:
MD32950 $MA_POSCTRL_DAMPING.

Direct measuring system:


MD31040 $MA_ENC_IS_DIRECT[1]=1
The encoder for position actual-value acquisition is connected directly to the machining
process of the machine (load encoder).
Indirect measuring system:
MD31040 $MA_ENC_IS_DIRECT[0]=0
The encoder for position actual-value acquisition is located on the motor (motor encoder).

MD32950
The function is activated via the following machine data setting:
MD32950 $MA_POSCTRL_DAMPING = 1.
It is possible to enter both positive and negative values,
which will then serve to scale the injection of the positional deviation.
Standard setting:
MD32950 $MA_POSCTRL_DAMPING = 0.
In this case, the injection of positional deviation is inactive.

Basic Functions
416 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

Note
The weighting of machine data:
MD32950 $MA_POSCTRL_DAMPING
can be set on the basis of step responses, for example.
If the control approaches the stability limit (vibration inclination increases), then the
parameter is too large.

Supplementary condition
1. The functional expansion is available for all control variants,
which use SIMODRIVE 611 digital drives.
2. The function can only be used on axes with two encoders:
MD30200 $MA_NUM_ENCS = 2
One of the encoders must be parameterized as an indirect measuring system and the
other as a direct measuring system.
If these conditions are not met, reset alarm 26016 will acknowledge the function when an
attempt is made to activate machine data:
MD32950 $MA_POSCTRL_DAMPING.

The function remains deactivated internally when this alarm is active.

7.6.2 Position controller position setpoint filter: New balancing filter

Application
For speed and torque feedforward control
With feedforward control active, the position setpoint is sent through a so-called balancing
filter before it reaches the controller itself. It is thus possible to control the speed setpoint to
100 % in advance, without resulting in overshoots when positioning.

Functionality
Until now, it was possible to compensate the negative effects of the balancing filter (a low
pass with an adjustable time constant), which has remained unchanged since SW 1 and
admits undesired undershoots of some 10 micrometers instead of an overshoot, as follows:
● Setting a compromise of overshoots and undershoots
● Setting the positioning slightly overshooting and reducing the amplitude of these
overshoots by way of position setpoint signal smoothing and jerk limitation

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 417
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

● Setting a speed controller with reference model instead of PI behavior (only possible with
840D)
● Setting the filter time to zero and setting the feedforward control factor to a value less
than 100 %
● Sacrificing the feedforward control and bringing the machine to a very high position
controller gain using dynamic stiffness control. This measure requires a rigid machine.
In view of this, a second improved balancing filter is available with SW 5 and higher. The
existing filter is still installed and is active with the same function when transferring existing
archives (e.g. in the case of upgrades).

Advantages
The new balancing filter provides the following improvements:
● An axis with feedforward control:
– Has a considerably lower inclination to undershoots when positioning
– Achieves a higher degree of accuracy on curved contours (can be measured using the
circularity test, for example)
– Is easier to set (part of the setting is carried out by the control system automatically)

Filter activation
The new filter is activated and the feedforward control variant selected by changing the axial
machine data:
MD32620 $MA_FFW_MODE

Value Meaning
3 Speed feedforward control with new balancing
4 Torque feedforward control (only possible with SINUMERIK 840D) with new balancing
For reasons of a compatible response of archives that contain only changes compared with
the default settings, no default value can be set for these new values 3 and 4 in the new
software versions.

Activation of feedforward control


Part programs can be used to activate and deactivate the feedforward control for all axes,
using instructions FFWON and FFWOF, which does not affect the following machine data:
MD32630 FFW_ACTIVATION_MODE

Control response with POWER ON, RESET, REPOS, etc.


In the case of POWER ON and RESET, as well as with "Enable machine data", the setting
data of the feedforward control are read in anew (see the appropriate values of the machine
data).
Mode change, block search and repositioning have no influence on the feedforward control.

Basic Functions
418 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

Supplementary conditions
The functional expansion is available for all control variants.

New setting rule for MD32810 and MD32800


If the new filter is active, the setting rules change for the following machine data:
MD32810 $MA_EQUIV_SPEEDCTRL_TIME
MD32800 $MA_EQUIV_CURRCTRL_TIME
This means that, if the old balancing filter had previously been active and is to be changed to
the new filter, the following actions must be considered:
Setting the equivalent time constant with speed feedforward control
If the previous setting was MD32620 $MA_FFW_MODE = 1:
1. Set MD32620 $MA_FFW_MODE = 3.
2. Set MD32610 $MA_VELO_FFW_WEIGHT = 1.
3. Reset MD32810 $MA_EQUIV_SPEEDCTRL_TIME.
Setting the equivalent time constant with torque feedforward control
If the previous setting was MD32620 $MA_FFW_MODE = 2:
1. Set MD32620 $MA_FFW_MODE = 4.
2. Set MD32610 $MA_VELO_FFW_WEIGHT = 1.
3. Reset MD32800 $MA_EQUIV_CURRCTRL_TIME.
This also applies when you load an older archive into the control system, e.g. from a
previous version. For example, when changing MD32620 $MA_FFW_MODE from 1 to 3,
MD32810 $MA_EQUIV_SPEEDCTRL_TIME may not simply retain its old value, but must be
reset. Otherwise, no improvement will be achieved, but rather a worsening of the positioning
response.

Recommended setting in case of recommissioning


If recommissioning, or if previous standard values are loaded (switch position 1 on
commissioning switch and POWER ON), the following machine data default values apply:
MD32620 $MA_FFW_MODE = 1
MD32610 $MA_VELO_FFW_WEIGHT = 1
These are not the recommended settings, but are chosen for reasons of compatibility.
However, the following setting is recommended during recommissioning:
MD32620 $MA_FW_MODE = 3
The balancing time for the speed feedforward control then just has to be adjusted in the
following machine data:
MD32810 $MA_EQUIV_SPEEDCTRL_TIME

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 419
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

Setting the equivalent time constant of the speed control loop


MD32810 speed feedforward control
We recommend that the axis be allowed to move in and out in "AUTOMATIC" mode with a
part program and that travel-in to the target position, i.e. the actual position value of the
active measuring system, be monitored with servo trace (HMI Advanced or programming
device).
The actual position value can also be output to the drive module's digital-to-analog converter,
and an oscilloscope can be used for monitoring.
The initial value for setting is the time constant of the speed control loop. This can be read
from the reference frequency characteristic of the speed control loop. In the frequent case of
a proportional-plus-integral-action controller with special value smoothing, an approximate
equivalent time can be read from drive machine data 1500-1503.
Another option would be to trace the speed setpoint and actual value at a constant
acceleration using an oscilloscope and to measure the follow-on time of the speed actual
value.
This start value (e.g. 1.5 ms) is now entered:
MD32810 $MA_EQUIV_SPEEDCTRL_TIME = 0.0015
The axis then travels to and fro and the operator monitors a greatly-magnified characteristic
of the position actual value at the target position.
The following rules apply to making manual fine adjustments:

Overshoot monitored: → magnify MD32810.


Excessively slow approach monitored: → reduce MD32810.

Magnifying MD32810
Increasing the value of MD32810 slows the axis down and increases the geometric contour
error on curves to some degree.
It has a similar effect to reducing the position controller gain:
MD32200 $MA_POSCTRL_GAIN
This can also be watched in the Diagnostics area in the screen form "Service Axis" based on
the servo gain value calculated.
Reducing MD32810
Reducing the value of MD32810 quickens the axis.
Therefore, MD32810 should be assigned as small a value as possible, with the overshoot
setting the limit during positioning.
MD32810 fine adjustment
Experience has shown that the initial value is only modified slightly during fine adjustment,
typically by adding or deducting 0.25 ms.
For example, if the initial value is 1.5 ms, the optimum value calculated manually is usually
within the range 1.25 ms to 1.75 ms.
In the case of axes equipped with direct measuring systems (load encoders) and strong
elasticity, you may possibly accept small overshoots of some micrometers.

Basic Functions
420 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

These can be reduced with the help of the position setpoint filter for dynamic response
adaptation (MD32910 $MA_DYN_MATCH_TIME) and for jerk (MD32410
$MA_AX_JERK_TIME), which also reduces the axis speed.
Identical axis data within an interpolation group
All the axes within an interpolation group must have identical settings in the following data:
MD32200 $MA_POSCTRL_GAIN
MD32620 $MA_FFW_MODE
MD32610 $MA_VELO_FFW_WEIGHT
MD32810 $MA_EQUIV_SPEEDCTRL_TIME (or MD32800 $MA_EQUIV_CURRCTRL_TIME)
MD32400 $MA_AX_JERK_ENABLE
MD32402 $MA_AX_JERK_MODE
MD32410 $MA_AX_JERK_TIME
The servo gain display (KV) in the axis service screen form is used for checking.
If identical values are not possible for the above data, the following machine data can be
used to make an adjustment:
MD32910 $MA_DYN_MATCH_TIME
This allows the same servo gain value (KV) to be displayed; however, this rarely occurs.
Different servo gain values (KV) usually point to the following:
● The gear ratios do not match in one or several axes.
● The feedforward control setting data do not match.
● The jerk filter setting data is incorrect at some point.
Automatic switchover when changing the position-control cycle
Previously, if the position-control cycle (MD10050 $MN_SYSCLOCK_CYCLE_TIME)
changed or the acceptance time of the speed setpoints was modified in order to increase the
servo gain (KV) (MD10082 $MN_CTRLOUT_LEAD_TIME), or dynamic stiffness control was
enabled (MD32640 $MA_STIFFNESS_CONTROL_ENABLE), the adjustment of MD32810
$MA_EQUIV_SPEEDCTRL_TIME had to be repeated, as the optimum value changed
significantly.
With setting MD32620 $MA_FFW_MODE = 3 or 4, the control takes these changes into
account automatically so that MD32810 $MA_EQUIV_SPEEDCTRL_TIME no longer has to
be reset.
After major changes, however, you should nevertheless check the positioning behavior (via
servo trace).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 421
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

Example of speed feedforward control


Programming example: selection of the speed feedforward control with new balancing and
default setting: FFWON and FFWOF are active.

Program code Comment


MD32620 $MA_FFW_MODE[X1] = 3 ; New mode for speed feedforward
control
MD32630 $MA_FFW_ACTIVATION_MODE[X1] = 1 ; FFWON and FFWOF are active in the
NC program.

FFWON now enables the speed feedforward control in the program (with all axes of the
channel with the same settings as X1); FFWOF will disable them again.
FFWON can also be preset for every channel via the following machine data:
MD20150 $MC_GCODE_RESET_VALUES[23] (reset position of G groups)

Program code Comment


MD32620 $MA_FFW_MODE[X1]=3 ; New mode for speed feedforward
control
MD32630 $MA_FFW_ACTIVATION_MODE[X1]=0 ; FFWON and FFWOF are active in the
NC program.

In this case, the speed feedforward control with X1 is enabled continuously, also in JOG
mode. MD20150 $MC_GCODE_RESET_VALUES[ ], FFWON and FFWOF have no effect on
X1.
This can be useful if the machine is only permitted to run with feedforward control, e.g. for
reasons of accuracy, or if you also want to test the feedforward control without a program
during startup.

Note
The setting of the feedforward control must be the same for all axes of an interpolation
group.

Setting the equivalent time constant of the current control loop


MD32800 torque feedforward control for each additional option
The same rules and recommendations apply to setting the time constant of the current
control loop as to the speed feedforward control.
However, activation of the torque feedforward control filter with:
MD32620 $MA_FFW_MODE = 4
must, for the purposes of setting the time constant with
MD32800 $MA_EQUIV_CURRCTRL_TIME
still be enabled additionally via the option and in the drive.

Basic Functions
422 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

As with activating the previous filter via:


MD32620 $MA_FFW_MODE = 2
all other machine data are set with due consideration for the corresponding elasticity limits of
the machine.
Limitation to stiff machines
Experience has shown that this expenditure is only worthwhile in the case of very stiff
machines, and requires appropriate experience. The elasticities of the machine are often
excited due to the injection of the torque so strongly that the existing vibrations neutralize the
gain in contour accuracy.
In this case, it would be worth trialing the use of Dynamic Stiffness Control (DSC) as an
alternative:
MD32640 $MA_STIFFNESS_CONTROL_ENABLE = 1

Note
If DSC is to be activated (MD32640 = 1), no parameters may be assigned for actual-value
inversion in the NC (MD32110 $MA_ENC_FEEDBACK_POL = -1). Otherwise, error 26017
occurs.
In DSC mode, actual-value inversion may only be undertaken in the drive (SINAMICS
parameter p410).

Example of torque feedforward control


Programming example: selection of the speed feedforward control with new balancing and
default setting: FFWON and FFWOF are active.

Program code Comment


MD32620 $MA_FFW_MODE[X1]=4 ; New mode for torque feedforward
control
MD32630 $MA_FFW_ACTIVATION_MODE[X1]=1 ; FFWON and FFWOF are active.

FFWON now enables the torque feedforward control in the program (with all axes of the
channel with the same settings as X1); FFWOF will disable them again.
FFWON can also be preset for every program via the following machine data:
MD20150 $MC_GCODE_RESET_VALUES[23] (reset position of G groups)

Program code Comment


MD32620 $MA_FFW_MODE[X1]=4 ; New mode for torque feedforward
control
MD32630 $MA_FFW_ACTIVATION_MODE[X1]=0 ; FFWON and FFWOF are active.

In this case, the torque feedforward control with X1 is enabled continuously, also in JOG
mode. MD20150 $MC_GCODE_RESET_VALUES[ ], FFWON and FFWOF have no effect on
X1. This can be useful if the machine is only permitted to run with feedforward control, e.g.
for reasons of accuracy, or if you also want to test the feedforward control without a program
during startup.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 423
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

For more information about the effect of the feedforward control relating to the speed and
torque position controller setpoints, please refer to:
References:
Function Manual, Extended Functions; Compensations (K3)

Note
The setting of the feedforward control must be the same for all axes of an interpolation
group.

7.6.3 Position controller position setpoint filter: new jerk filter

Application
In some applications, such as when milling sculptured surfaces, it can be advantageous to
smooth the position setpoint curves to obtain better surfaces, due to reduced excitations of
machine vibrations.

Functionality
The filter effect of the position setpoints must be as strong as possible without impermissibly
affecting contour accuracy.
The smoothing behavior of the filter must also be as "symmetrical" as possible, i.e. if the
same contour was to be traveled in both forward and reverse, the characteristic rounded by
the filter should be as similar as possible in both directions.
The effect of the filter can be monitored by means of the effective servo gain factor (KV),
which is displayed on the Axis service screen form. The filtering effect rounds the position
setpoints slightly, thus reducing the path accuracy so that with increasing filter time a smaller
effective servo gain factor (KV) is displayed.

Advantages
The filter available since software version 1, which is set via:
MD32400 $MA_AX_JERK_ENABLE = 1
and
MD32410 $MA_AX_JERK_TIME = filter time,
meets the requirements for a strong filter effect with smoothing behavior that is as
symmetrical as possible for small time constants of up to approximately 10 ms.
A considerably better result is achieved using this new filter type for axial jerk limitation with
floating averaging. In this case, filter time constants of approx. 20 to 40 ms can be used,
depending on the particular machine.
Thanks to the floating averaging, the new filter achieves lower contour errors with the same
smoothing effect, compared with the previous 2nd degree filter type. The contour of the
smoothing behavior is to a large degree balanced.

Basic Functions
424 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

Filter enable with MD32402


Machine data:
MD32402 $MA_AX_JERK_ENABLE
is used to enable the new position setpoint filter,
and is defined as follows:

MD32402 $MA_AX_JERK_MODE =2 Select new jerk filter mode


MD32410 $MA_AX_JERK_TIME = 0.02 Set filter time in seconds (20 ms)
MD32400 $MA_AX_JERK_ENABLE =1 Enable filter calculation

If no filter mode was previously activated:


MD32402 $MA_AX_JERK_MODE = 2,
POWER ON has to be triggered once.
Otherwise, "Enable machine data" or RESET on the machine control panel are sufficient.
For reasons of compatibility, the default setting is:
MD32402 $MA_AX_JERK_MODE = 1.

Note
For new machines, the new filter is generally recommended:
MD32402 $MA_AX_JERK_MODE = 2.

Only if very high filter times are needed and contour accuracy plays a minor part (e.g. as
sometimes occurs when positioning axes), can the old filter be more advantageous.

Fine adjustment
The fine adjustment of the position setpoint filter is carried out as follows:
1. Assess the traversing response of the axis
(e.g. based on positioning processes with servo trace).
2. Modify the filter time in MD32410 $MA_AX_JERK_TIME.
3. Activate the modified time via "Enable machine data" or RESET on the machine control
panel.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 425
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

Disabling
Disabling the position setpoint filter:
1. Disable filter calculation:
MD32410 $MA_AX_JERK_ENABLE = 0.
2. Activate the interlock via "Enable machine data" or RESET on the machine control panel.

Supplementary conditions
The position setpoint filter is available in all control system variants as follows:
● Effective filter times are limited to a range between a minimum of 1 position-control cycle
up to a maximum of 32 position-control cycles (31 position-control cycles are available).
Further supplementary conditions regarding the filter effect:
● The display of the calculated servo gain factor (KV) in the Axis service screen form
displays smaller values than would be appropriate based on the filter effect.
● Path accuracy is better than the displayed servo gain (KV) suggests.
Therefore, on resetting
MD32400 $MA_AX_JERK_MODE = 1
to
MD32400 $MA_AX_JERK_MODE = 2,
the displayed servo gain (KV) can be reduced while retaining the same filter time,
although the path accuracy improves.
Axes that interpolate with each other must be set identically.
Once an optimum value has been identified for these axes, the one with the longest filter
time should be used as the setting for all axes within the interpolation group.
For more information about jerk limitation on an interpolator level, please refer to:
References:
/FB1/ Function Manual, Basic Functions; Acceleration (B2)
Chapter: "Axis-oriented jerk limitation"
Chapter: "Axis-specific machine data".

Basic Functions
426 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

7.6.4 Position control with proportional-plus-integral-action controller

Function
In the default scenario, the core of the position controller is a proportional controller with the
above-mentioned upstream override options.
For special uses (such as for electronic gearing), an integral part can be connected. The
resulting proportional-plus-integral-action controller then corrects the error between setpoint
and actual positions down to zero in a finite, settable time period when the appropriate
machine data are set accordingly.

CAUTION
When the proportional-plus-integral-action controller is active, overshoots occur in the
actual position. In this instance, you must decide whether this effect is admissible or
acceptable for the application in question. Expert knowledge of control engineering and
measurements taken using servo trace are absolutely essential when using this function. If
incorrect settings are made for the relevant machine data, there is a risk of damaging the
machine, due to possible instability.

Background
The transfer function of the proportional-plus-integral-action controller is as follows:

*5 V .5   V
7Q

KR: P component gain


Tn: Integral time

Procedure
1. First optimize the position control loop as a proportional-action controller first using the
tools described in the previous subsections.
2. Increase the tolerances of the following machine data while measurements are being
taken to determine the quality of the position control with proportional-plus-integral-action
controller:
– MD36020 $MA_POSITIONING_TIME
– MD36030 $MA_STANDSTILL_POS_TOL
– MD36040 $MA_STANDSTILL_DELAY_TIME
– MD36400 $MA_CONTOUR_TOL

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 427
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

3. Activate the position control loop as a proportional-plus-integral-action controller by


setting the following machine data:
MD32220 $MA_POSCTRL_INTEGR_ENABLE ; set value 1
MD32210 $MA_POSCTRL_INTEGR_TIME ; integral time [sec.]
Effect of integral time:
– Tn → 0:
The control error is corrected quickly; however, the control loop can become instable.
– Tn → ∞:
The control error is corrected more slowly.
4. Find the appropriate compromise for Tn for your application, using these two extreme
cases as outer limits.
Tn must not be set too close to the instability limit, since there is a risk of damage to the
machine if instability should occur.
5. Use servo trace to trace the travel-in of an automatic program traveling to and from a
target position.
6. Set the servo trace to display the following:
– Following error
– Actual velocity
– Actual position
– Reference position
7. Reset the tolerance values in the following machine data to the required values, once the
optimum value for Tn has been identified:
– MD36020 $MA_POSITIONING_TIME
– MD36030 $MA_STANDSTILL_POS_TOL
– MD36040 $MA_STANDSTILL_DELAY_TIME
– MD36400 $MA_CONTOUR_TOL

Example
Setting result after several iterative processes for KR and Tn.
Each of the following quantities - following error, actual velocity, actual position, and position
setpoint - has been recorded by servo trace. When traversing in JOG mode, the
characteristic of the individual data shown in the following figure was then drawn.
Set machine data:
MD32220 $MA_POSCTRL_INTEGR_ENABLE = 1
MD32210 $MA_POSCTRL_INTEGR_TIME = 0.003
MD32200 $MA_POSCTRL_GAIN[1] = 5.0
Parameter set selection 0

Basic Functions
428 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

*UDSKLF7U$[LV;7U$[LV;!
7U)ROORZLQJHUURU 0DUNHU;
7U$FWXDOYHORFLW\

*UDSKLF7U$[LV;7U$[LV;!
7U$FWXDOSRVLWLRQPHDVXULQJV\VW 0DUNHU;
7U3RVLWLRQVHWSRLQW

Figure 7-13 Following error (1), actual velocity (2), position actual value (3), position setpoint (4)

7.6.5 System variable for status of pulse enable

Application
For all applications that must quickly react to pulse enabling, the status of the pulse enable is
imaged to a new system variable in order to accelerate the braking signal.
This system variable is preferably evaluated in synchronized actions. Using the synchronized
action, either a direct output to an NCK output can be carried out or a faster transfer to the
PLC.

Functionality
Since 611D digital drives have no integrated braking signal, the brakes are normally
controlled from the PLC. The brake can be closed again by deleting the pulse enable in the
PLC.
If the pulse enable is deleted due to external events (611D interface, terminal 663 to the
PLC) or due to drive or axis errors, the PLC can close the brake only with a delay, since the
transport of the pulse enable signal via servo and interpolator requires 2 to 3 interpolator
cycle clocks. In the worst case, the PLC needs another two PLC cycles. With hanging axes
and linear motors, this is often slow.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 429
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

System variable for enabling the drive power


Since the function must be available for all kinds of drives in the same form (also for non-
electrical drives), the variable is given the name "Drive power enable".

Description NCK variable


Status of the power enable (pulse enable) of a $VA_DPE[machine axis]
machine axis
Predefined range of values:
FALSE: no power enable
TRUE: power enable exists

Activation
The variable is predefined and can be used at any time acc. to the data type BOOL with
FALSE or TRUE. While communication with the drive is not yet established, the value 0
(FALSE) is supplied.
The synchronized actions, in which the variable is evaluated, should preferably be carried
out as soon as the control powers up, e.g. by starting an ASUB from the PLC. To make sure
that the synchronized actions remain continuously active and are not affected by the mode
change, we recommend that they are programmed as "static synchronized actions" (using
IDS as the vocabulary word).

Example
Output of the pulse enable of machine axis X1 to the first digital NCK output in all modes
IDS = 1 DO $A_OUT[1] = $VA_DPE[X1]

Supplementary conditions
The functional expansion is available for digital drives in all control variants providing
synchronized actions.

Control response with POWER ON, RESET, REPOS, etc.


After POWER ON, the value 0 is supplied while communication with the drive is not yet
established. Then, the system variable $VA_DPE always specifies the pulse enable value
acquired at the beginning of the interpolation cycle. The mode-independent evaluation or
retransmission should be carried out using static synchronized actions (vocabulary word
IDS).

Basic Functions
430 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

7.6.6 Expansions for "deceleration axes"

Application
In the case of design-conditioned non-linearities and elasticities, as often occurs in material
handling and high-bay racking technology, it is often necessary to sacrifice the position
control due to the unstable position control loop. The axes are, therefore, traversed closed-
loop controlled and not open-loop controlled. To this aim, the WF723 module offers the
special function of the "deceleration axes".

Functionality
This "deceleration axes" function blocks any path movements, but allows positioning with
approach to the target position by reducing the velocity step by step. The response
corresponds to that of a multi-point controller.
For reasons relating to position control loop stability, the position controller algorithm is
extended instead of the special positioning function "deceleration axes". It is thus also
possible to operate drives that might cause problems using the position control.

Advantages
Compared with the existing method "deceleration axes", the expansion of the position
controller algorithm provides the following advantages:
● The structure of the interpolation and control is extended only slightly.
Thus, this axis automatically has all the properties of a normal axis.
● Traversing on the path also becomes possible; exactly which path can be foreseen
considerably earlier, e.g. a high-bay racking cage will take at different velocities.
A possible collision can thus be avoided.
● It is much easier to configure the function.
● In particular, with feedforward control enabled, the positioning processes are faster.

Low-pass filter for analog drives


A low-pass filter connected at the position controller output now also allows the position
controller gain to be reduced quickly with increasing frequency for analog drives (axes).
This suppresses the effect of strong natural frequencies in the form of settable speed
setpoint filters.
This functionality is provided as standard for digital drives.

MD32930/MD32940
The low-pass filter is activated via setting:
MD32930 $MA_POSCTRL_OUT_FILTER_ENABLE = 1.
The filter time constant is input via machine data:
MD32940 $MA_POSCTRL_OUT_FILTER_TIME.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 431
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

MD32960 "dead zone"


Non-linearities close to zero speed, such as those, which can occur when simple frequency
converters are used, are inhibited by a "dead zone" in the controller.
The threshold for system deviation, under which a speed setpoint of "zero" is output, can be
set via machine data:
MD32960 $MA_POSCTRL_ZERO_ZONE.
The "dead zone" is input in MD32960 for each individual encoder.

Stability risk
The expanded position controller algorithm will reduce the risks that a stable control admits
only a rather poor setting of the gain, or that the position control loop does not remain stable
despite the effective extensions, to a minimum.

Supplementary conditions
The functional expansion is available for all control variants.
The low-pass filter is only activated if dynamic stiffness control is inactive:
MD32640 $MA_STIFFNESS_CONTROL_ENABLE = 0.
If the low-pass filter is active, the modeled following error is larger than usual during
acceleration phases.
It can, therefore, be necessary to increase machine data:
MD36400 $MA_CONTOUR_TOL
above the standard value,
in order to prevent activation of axial contour monitoring (alarm 25050).
If the adjustable "dead zone" of the position controller retains its standard setting:
MD32960 $MA_POSCTRL_ZERO_ZONE = 0,
this corresponds to an input value, which is the same size as the current encoder fine
resolution.
The default setting is therefore compatible with earlier software versions.
If the "dead zone":
MD32960 $MA_POSCTRL_ZERO_ZONE
is configured to be larger than the zero-speed tolerance:
MD36030 $MA_STANDSTILL_POS_TOL,
zero-speed monitoring (alarm 25040) could be activated on termination of a positioning
process.

Basic Functions
432 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Optimization of the control

With a "dead zone":


MD32960 $MA_POSCTRL_ZERO_ZONE
greater than the exact stop limits:
MD36000 $MA_STOP_LIMIT_COARSE,
no exact stop signals are output.
This can trigger the positioning monitoring function (alarm 25080)
and block the block change.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 433
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Data lists

7.7 Data lists

7.7.1 Machine data

7.7.1.1 Memory-specific machine data

Number Identifier: $MM_ Description


9004 DISPLAY_RESOLUTION Display resolution
9010 SPIND_DISPLAY_RESOLUTION Display resolution for spindles
9011 DISPLAY_RESOLUTION_INCH Display resolution for INCH system of measurement

7.7.1.2 NC-specific machine data

Number Identifier: $MN_ Description


10000 AXCONF_MACHAX_NAME_TAB[n] Machine axis name
10050 SYSCLOCK_CYCLE_TIME System basic cycle
10070 IPO_SYSCLOCK_TIME_RATIO Factor for interpolator cycle
10060 POSCTRL_SYSCLOCK_TIME_RATIO Factor for position-control cycle
10080 SYSCLOCK_SAMPL_TIME_RATIO Division factor of position-control cycle for actual-
value acquisition
10200 INT_INCR_PER_MM Computational resolution for linear positions
10210 INT_INCR_PER_DEG Computational resolution for angular positions
10220 SCALING_USER_DEF_MASK Activation of scaling factors
10230 SCALING_FACTORS_USER_DEF[n] Scaling factors of physical quantities
10240 SCALING_SYSTEM_IS_METRIC Basic system metric
10250 SCALING_VALUE_INCH Conversion factor for switchover to
inch system
10260 CONVERT_SCALING_SYSTEM Basic system switchover active
10270 POS_TAB_SCALING_SYSTEM Measuring system of position tables
10290 CC_TDA_PARAM_UNIT Physical units of the tool data for CC
10292 CC_TOA_PARAM_UNIT Physical units of the tool edge data for CC
13000 DRIVE_IS_ACTIVE[n] Drive activation
13010 DRIVE_LOGIC_NR[n] Logical drive number
13020 DRIVE_INVERTER_CODE[n] Power section code of drive module
13030 DRIVE_MODULE_TYPE[n] Module identifier
13040 DRIVE_TYPE[n] Identifier of drive type
13050 DRIVE_LOGIC_ADDRESS[n] Logical drive addresses
13060 DRIVE_TELEGRAM_TYPE[n] Standard message frame type for PROFIBUS DP
13070 DRIVE_FUNCTION_MASK[n] DP function used
13080 DRIVE_TYPE_DP[n] Drive type PROFIBUS DP

Basic Functions
434 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Data lists

7.7.1.3 Channel-specific machine data

Number Identifier: $MC_ Description


20150 GCODE_RESET_VALUES[n] Reset G groups

7.7.1.4 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


30100 CTRLOUT_SEGMENT_NR[n] Setpoint assignment: Drive type
30110 CTRLOUT_MODULE_NR[n] Setpoint assignment: Drive number/module number
30120 CTRLOUT_NR[n] Setpoint assignment: Setpoint output on drive
module/module
30130 CTRLOUT_TYPE[n] Output type of setpoint
30134 IS_UNIPOLAR_OUTPUT[n] Setpoint output is unipolar
30200 NUM_ENCS Number of encoders
30210 ENC_SEGMENT_NR[n] Actual-value assignment: Drive type
30220 ENC_MODULE_NR[n] Actual-value assignment: Drive module
number/measuring circuit number
30230 ENC_INPUT_NR[n] Actual-value assignment: Input on drive
module/measuring circuit module
30240 ENC_TYPE[n] Type of actual-value acquisition (position actual value)
30242 ENC_IS_INDEPENDENT Encoder is independent
30300 IS_ROT_AX Rotary axis
30350 SIMU_AX_VDI_OUTPUT Output of axis signals for simulation axes
31000 ENC_IS_LINEAR[n] Direct measuring system (linear scale)
31010 ENC_GRID_POINT_DIST[n] Distance between reference marks on linear scales
31020 ENC_RESOL[n] Encoder pulses per revolution
31030 LEADSCREW_PITCH Leadscrew pitch
31040 ENC_IS_DIRECT[n] Encoder is connected directly to the machine
31044 ENC_IS_DIRECT2 Encoder on intermediate gear
31050 DRIVE_AX_RATIO_DENOM[n] Denominator load gearbox
31060 DRIVE_AX_RATIO_NUMERA[n] Numerator load gearbox
31064 DRIVE_AX_RATIO2_DENOM Intermediate gear denominator
31066 DRIVE_AX_RATIO2_NUMERA Intermediate gear numerator
31070 DRIVE_ENC_RATIO_DENOM[n] Measuring gear denominator
31080 DRIVE_ENC_RATIO_NUMERA[n] Measuring gear numerator
31090 JOG_INCR_WEIGHT Weighting of increment for INC/handwheel
31200 SCALING_FACTOR_G70_G71 Factor for converting values when G70/G71 is active
32000 MAX_AX_VELO Maximum axis velocity
32100 AX_MOTION_DIR Travel direction
32110 ENC_FEEDBACK_POL[n] Sign actual value (feedback polarity)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 435
Velocities, Setpoint/Actual Value Systems, Closed-Loop Control (G2)
Data lists

Number Identifier: $MA_ Description


32200 POSCTRL_GAIN [n] Servo gain factor (Kv)
32210 POSCTRL_INTEGR_TIME Integrator time position controller
32220 POSCTRL_INTEGR_ENABLE Activation of integral component of position controller
32250 RATED_OUTVAL[n] Rated output voltage
32260 RATED_VELO[n] Rated motor speed
32450 BACKLASH[n] Backlash
32500 FRICT_COMP_ENABLE Friction compensation active
32610 VELO_FFW_WEIGHT Feedforward control factor for speed feedforward
control
32620 FFW_MODE Feedforward control mode
32630 FFW_ACTIVATION_MODE Activate feedforward control from program
32650 AX_INERTIA Moment of inertia for torque feedforward control
32711 CEC_SCALING_SYSTEM_METRIC System of measurement of sag compensation
32800 EQUIV_CURRCTRL_TIME [n] Equivalent time constant current control loop for
feedforward control
32810 EQUIV_SPEEDCTRL_TIME [n] Equivalent time constant speed control loop for
feedforward control
32900 DYN_MATCH_ENABLE Dynamics matching
32910 DYN_MATCH_TIME [n] Time constant for dynamic response adaptation
32930 POSCTRL_OUT_FILTER_ENABLE Activation of low-pass filter at position controller
output
32940 POSCTRL_OUT_FILTER_TIME Time constant of low-pass filter at position controller
output
32950 POSCTRL_DAMPING Factor for additional damping of position control loop
32960 POSCTRL_ZERO_ZONE[n] Dead zone position controller
33000 FIPO_TYPE Fine interpolator type
34320 ENC_INVERS[n] Length measuring system is inverse
35100 SPIND_VELO_LIMIT Maximum spindle speed
36200 AX_VELO_LIMIT [n] Threshold value for velocity monitoring
36210 CTRLOUT_LIMIT[n] Maximum speed setpoint
36400 AX_JERK_ENABLE Axial jerk limitation
36410 AX_JERK_TIME Time constant for axial jerk filter
36500 ENC_CHANGE_TOL Max. tolerance for position actual-value switchover
36510 ENC_DIFF_TOL Measuring system synchronism tolerance
36700 ENC_COMP_ENABLE[n] Interpolatory compensation

Basic Functions
436 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2) 8
8.1 Brief description

8.1.1 Function
Auxiliary functions permit activation of the system functions of NC and PLC user functions.
Auxiliary functions can be programmed in:
● Part programs
● Synchronized actions
● User cycles
References:
For detailed information on using auxiliary function outputs in synchronized actions, refer to
the Function Manual, Synchronized Actions.

Predefined auxiliary functions


Predefined auxiliary functions activate system functions. The auxiliary function is also output
to the NC/PLC interface.
The following auxiliary functions are predefined:

Type Function Example Meaning


M Miscellaneous M30 End of program
(i.e. special) function
S Spindle function S100 Spindle speed 100 (e.g. rpm)
T Tool number T3 Tool number 3
D, DL Tool offset D1 Tool cutting edge number 1
F Feed F1000 Feedrate 1000 (e.g. mm/min)

User-defined auxiliary functions


User-defined auxiliary functions are either extended predefined auxiliary functions or user-
specific auxiliary functions.
Extension of predefined auxiliary functions
Extension of predefined auxiliary functions refers to the "address extensions" parameter.
The address extension defines the number of the spindle to which the auxiliary function
applies. The spindle function M3 (spindle right) is predefined for the master spindle of a
channel. If a 2nd spindle is assigned to a channel, a corresponding user-defined auxiliary
function must be defined that extends the predefined auxiliary function.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 437
Auxiliary Function Outputs to PLC (H2)
Brief description

Type Function Example Meaning


M Miscellaneous M2=3 2nd spindle: Spindle right
(i.e. special) function
S Spindle function S2=100 2nd spindle: Spindle speed = 100 (e.g. rpm)
T Tool number T2=3
User-specific auxiliary functions
User-specific auxiliary functions do not activate system functions. User-specific auxiliary
functions are output by the NC to the NC/PLC interface only. The functionality of the auxiliary
functions must be implemented by the machine manufacturer/user via the PLC user
program.

Type Function Example Meaning


H1) Auxiliary function H2=5 User-specific function
1) Recommendation

8.1.2 Definition of an auxiliary function


An auxiliary function is defined by the following parameters:
● Type, address extension, and value
The 3 parameters are output to the NC/PLC interface.
● Output behavior
The auxiliary function-specific output behavior defines for how long an auxiliary function is
output to the NC/PLC interface and when it is output relative to the traversing motion
programmed in the same part program block.
● Group assignment
An auxiliary function can be assigned to a particular auxiliary function group. The output
behavior can be defined separately for each auxiliary function group. This becomes
active if no auxiliary function-specific output behavior has been defined. Group
membership also affects output of an auxiliary function after block search.
References:
For more detailed information on auxiliary function output to the NC/PLC interface, see:
Function Manual, Basic Functions, Basic PLC Program (P3)

Basic Functions
438 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Brief description

8.1.3 Overview of auxiliary functions

M functions

M (special function)
Address extension Value

Value range Meaning Value range Type Meaning Number 8)


0 (implicit) --- up to 8 digits INT Function 5
Remarks:
---

Value range Meaning Value range Type Meaning Number 8)


1 ... 12 Spindle number 1 ... 99 INT Function 5
Remarks:
Example: "Spindle stop" for 2nd spindle of the channel: M2=5.
The master spindle of the channel is addressed if no an address extension is specified.

Value range Meaning Value range Type Meaning Number 8)


0 ... 99 Any 2147483647 INT Function 5
Remarks:
User-specific M function
8) See "Meaning of footnotes" at the end of the overview.
Application
Controlling machine functions in synchronism with the part program.
Further information
● The following M functions have a predefined meaning: M0, M1, M2, M17, M30
M3, M4, M5, M6, M19, M70, M40, M41, M42, M43, M44, M45.
● For each M function (M0 - M99), there is a dynamic signal at the NC/PLC interface that
indicates the validity (new output) of the M function. In addition, 64 additional signals can
be assigned for user M functions.
References:
Function Manual Basic Functions; PLC Basic Program (P3)
● For subprograms, machine data can be used to set whether an output of the M function
should be undertaken for the end of the part program M17, M2 and M30 to the PLC:
MD20800 $MC_SPF_END_TO_VDI (subprogram end to PLC)
● For the predefined M function M40 – M45, only limited redefinition of the output
specification is possible.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 439
Auxiliary Function Outputs to PLC (H2)
Brief description

● The predefined auxiliary functions M0, M1, M17, M30, M6, M4, M5 cannot be redefined.
● M function-specific machine data:
MD10800 $MN_EXTERN_CHAN_SYNC_M_NO_MIN
MD10802 $MN_EXTERN_CHAN_SYNC_M_NO_MAX
MD10804 $MN_EXTERN_M_NO_SET_INT
MD10806 $MN_EXTERN_M_NO_DISABLE_INT
MD10814 $MN_EXTERN_M_NO_MAC_CYCLE
MD10815 $MN_EXTERN_M_NO_MAC_CYCLE_NAME
MD20094 $MC_SPIND_RIGID_TAPPING_M_NR
MD20095 $MC_EXTERN_RIGID_TAPPING_M_NR
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO
MD22200 $MC_AUXFU_M_SYNC_TYPE
MD22530 $MC_TOCARR_CHANGE_M_CODE
MD22532 $MC_GEOAX_CHANGE_M_CODE
MD22534 $MC_TRAFO_CHANGE_M_CODE
MD22560 $MC_TOOL_CHANGE_M_CODE

S functions

S (spindle function)
Address extension Value

Value range Meaning Value range Type Meaning Number 8)


0 ... 12 Spindle number 5) 0 ... ± 3.4028 exp38 3) REAL Spindle speed 3
Remarks:
The master spindle of the channel is addressed if no an address extension is specified.
3) , 5), 8)See "Meaning of footnotes" at the end of the overview.
Application
Spindle speed.
Further information
● S functions are assigned to auxiliary function group 3 by default.
● Without an address extension, the S functions refer to the master spindle of the channel.
● S function-specific machine data:
MD22210 $MC_AUXFU_S_SYNC_TYPE (Output time of the S functions)

Basic Functions
440 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Brief description

H functions

H (aux. function)
Address extension Value

Value range Meaning Value range Type Meaning Number 8)


0 ... 99 Any - 2147483648 ... INT Any 3
+ 2147483647
0 ... ± 3.4028 exp38 2) 3) 4) REAL
Remarks:
The functionality must be implemented by the user in the PLC user program.
2) 3) 4) 8) See "Meaning of footnotes" at the end of the overview.
Application
User-specific auxiliary functions.
Further information
● H function-specific machine data:
MD22110 $MC_AUXFU_H_TYPE_INT (type of H-auxiliary function is an integer)
MD22230 $MC_AUXFU_H_SYNC_TYPE (Output time of the H functions)

T functions

T (tool number) 5) 6)
Address extension Value

Value range Meaning Value range Type Meaning Number 8)


1 ... 12 Spindle number 0 ... 32000 INT Selection of the tool 1
(with active tool (also symbolic tool names for
management) active tool management)
Remarks:
Tool names are not output to the PLC. 1)
1) 5) 6) 8) See "Meaning of footnotes" at the end of the overview.
Application
Tool selection.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 441
Auxiliary Function Outputs to PLC (H2)
Brief description

Further information
● Identification of the tools, optionally via tool number or location number.
References:
Function Manual, Tool Management
Function Manual, Basic Functions; Tool Offset (W1)
● When T0 is selected, the current tool is removed from the tool holder but not replaced by
a new tool (default setting).
● T function-specific machine data:
MD22220 $MC_AUXFU_T_SYNC_TYPE (Output time of the T functions)

D functions

D (tool offset)
Address extension Value

Value range Meaning Value range Type Meaning Number 8)


--- --- 0 ... 9 INT Selection of the tool 1
offset
Remarks:
Clearing the tool offset with D0. Default is D1.
8) See "Meaning of footnotes" at the end of the overview.
Application
Selection of the tool offset.
Further information
● Initial setting: D1
● After a tool change, the default tool cut can be parameterized via:
MD20270 $MC_CUTTING_EDGE_DEFAULT (Basic position of the tool cut without
programming)
● Deselection of the tool offset: D0
● D function-specific machine data:
MD22250 $MC_AUXFU_D_SYNC_TYPE (Output time of the D functions)

DL functions

DL (additive tool offset)


Address extension Value

Value range Meaning Value range Type Meaning Number 8)

Basic Functions
442 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Brief description

DL (additive tool offset)


--- --- 0 ... 6 INT Selection of the 1
additive tool offset
Remarks:
The additive tool offset selected with DL refers to the active D number.
8) See "Meaning of footnotes" at the end of the overview.
Application
Selection of the additive tool offset with reference to an active tool offset.
Further information
● Initial setting: DL = 0
● DL values cannot be output to the PLC via synchronized actions.
● Default setting of the additive tool offset without an active DL function:
MD20272 $MC_SUMCORR_DEFAULT (basic setting of the additive offset without a
program)
● Deselection of the additive tool offset: DL = 0
● DL function-specific machine data:
MD22252 $MC_AUXFU_DL_SYNC_TYPE (output time DL functions)

F functions

F (feedrate)
Address extension Value

Value range Meaning Value range Type Meaning Number 8)


--- --- 0.001 ... 999 999.999 REAL Path feed 6
Remarks:
---
8) See "Meaning of footnotes" at the end of the overview.
Application
Path velocity.
Further information
● F function-specific machine data:
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time of F functions)

FA functions

FA (axial feedrate)
Address extension Value

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 443
Auxiliary Function Outputs to PLC (H2)
Brief description

FA (axial feedrate)
Value range Meaning Value range Type Meaning Number 8)
1 - 31 Axis number 0.001 ... 999 999.999 REAL Axial feedrate 6
Remarks:
---
8) See "Meaning of footnotes" at the end of the overview.
Application
Axial velocity.
Further information
● F function-specific machine data:
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time of F functions)

Meaning of footnotes

1) If tool management is active, neither a T change signal nor a T word is output to the
interface (channel).
2) The type for the values can be selected by the user via MD22110
$MC_AUXFU_H_TYPE_INT.
3) Because of the limited display options on the operator panel screens, the REAL type
values displayed are restricted to:
–999 999 999.9999 to 999 999 999.9999
The NC calculates internally but with complete accuracy.
4) The REAL values are rounded and output to the PLC when setting the machine data:
MD22110 $MC_AUXFU_H_TYPE_INT = 1 (type of H-auxiliary functions is an integer)
The PLC user program must interpret the value transferred according to the machine
data setting.
5) If the tool management is active, the meaning of the address extension can be
parameterized. Address extension = 0 means the value must be replaced by that of the
master spindle number, i.e. it is equivalent to not programming the address extension.
Auxiliary functions M19 "Position spindle" collected during a block search are not output
to the PLC.
6) M6: Value range of the address extension:
- without tool management: 0 ... 99
- with tool management: 0 ... maximum spindle number
0: to be replaced by the value of the master spindle number or master tool holder
7) If tool management is active, the auxiliary function M6 "Tool change" can only be
programmed once in a part program block, irrespective the address extensions that are
programmed.
8) Maximum number of auxiliary functions per part program block.

Basic Functions
444 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

8.2 Predefined auxiliary functions

Function
Predefined auxiliary functions are auxiliary functions for activating system functions. The
assignment of predefined auxiliary functions to system function cannot be changed.
During execution of a predefined auxiliary function, the corresponding system function is
activated and the auxiliary functions are output to the NC/PLC interface.

Definition of a predefined auxiliary function


The parameters of a predefined auxiliary function are stored in machine data and can be
changed in some cases. All the parameters of an auxiliary function have the same index
(<n>).
● MD22040 $MC_AUXFU_PREDEF_GROUP[<n>] (group assignment of predefined
auxiliary functions)
● MD22050 $MC_AUXFU_PREDEF_TYPE[<n>] (type of predefined auxiliary functions)
● MD22060 $MC_AUXFU_PREDEF_EXTENSION[<n>] (address extension for predefined
auxiliary functions)
● MD22070 $MC_AUXFU_PREDEF_VALUE[<n>] (value of predefined auxiliary functions)
● MD22080 $MC_AUXFU_PREDEF_SPEC[<n>] (output behavior of predefined auxiliary
functions)

Predefined auxiliary functions (overview)

System function
Index <n> (index for the machine data for setting the parameters of an auxiliary function)
Type: MD22050 $MC_AUXFU_PREDEF_TYPE[<n>]
Address extension: MD22060 $MC_AUXFU_PREDEF_EXTENSION[<n>]
Value: MD22070 $MC_AUXFU_PREDEF_VALUE[<n>]
Group: MD22040 $MC_AUXFU_PREDEF_GROUP[<n>]
Output behavior: Bits 0 - 18
MD22080 $MC_AUXFU_PREDEF_SPEC[<n>]
Stop 0 M 0 0 1 → See the next table!
Conditional stop 1 M 0 1 1
End of subroutine 2 M 0 2 1
3 M 0 17 1
4 M 0 30 1

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 445
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

Tool change 5 M (0) 6 1) (1)


Spindle right 6 M (1) 3 (2)
Spindle left 7 M (1) 4 (2)
Spindle stop 8 M (1) 5 (2)
Position spindle 9 M (1) 19 (2)
Axis mode 10 M (1) 70 2) (2)
Automatic gear stage 11 M (1) 40 (4)
Gear stage 1 12 M (1) 41 (4)
Gear stage 2 13 M (1) 42 (4)
Gear stage 3 14 M (1) 43 (4)
Gear stage 4 15 M (1) 44 (4)
Gear stage 5 16 M (1) 45 (4)
Spindle speed 17 S (1) -1 (3)
Feed 18 F 0 -1 (1)
Cutting edge selection 19 D 0 -1 (1)
DL 20 L 0 -1 (1)
Tool selection 21 T (0) -1 (1)
Stop (associated) 22 M 0 -1 3) 1
Conditional stop 23 M 0 -1 4) 1
(associated)
End of subroutine 24 M 0 -1 5) 1
Nibbling 25 M 0 20 6) (10)
Nibbling 26 M 0 23 6) (10)
Nibbling 27 M 0 22 6) (11)
Nibbling 28 M 0 25 6) (11)
Nibbling 29 M 0 26 6) (12)
Nibbling 30 M 0 122 6) (11)
Nibbling 31 M 0 125 6) (11)
Nibbling 32 M 0 27 6) (12)

System function
Index <n> (index for the machine data for setting the parameters of an auxiliary function)
Output behavior: Bits 0 - 18
MD22080 $MC_AUXFU_PREDEF_SPEC[<n>]
18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Stop 0 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
Conditional stop 1 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
End of subroutine 2 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
3 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
4 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
Tool change 5 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (0) (1) (0) (0) (0) (0) (1)
Spindle right 6 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (0) (1) (0) (0) (0) (0) (1)

Basic Functions
446 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

Spindle left 7 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (0) (1) (0) (0) (0) (0) (1)
Spindle stop 8 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (0) (1) (0) (0) (0) (0) (1)
Position spindle 9 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (0) (1) (0) (0) (0) (0) (1)
Axis mode 10 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (0) (1) (0) (0) (0) (0) (1)
Automatic gear stage 11 0 0 0 (0) 0 0 0 (0) (0) (0) (0) 0 0 1 (0) (0) (0) (0) (1)
Gear stage 1 12 0 0 0 (0) 0 0 0 (0) (0) (0) (0) 0 0 1 (0) (0) (0) (0) (1)
Gear stage 2 13 0 0 0 (0) 0 0 0 (0) (0) (0) (0) 0 0 1 (0) (0) (0) (0) (1)
Gear stage 3 14 0 0 0 (0) 0 0 0 (0) (0) (0) (0) 0 0 1 (0) (0) (0) (0) (1)
Gear stage 4 15 0 0 0 (0) 0 0 0 (0) (0) (0) (0) 0 0 1 (0) (0) (0) (0) (1)
Gear stage 5 16 0 0 0 (0) 0 0 0 (0) (0) (0) (0) 0 0 1 (0) (0) (0) (0) (1)
Spindle speed 17 0 0 0 (0) 0 0 0 (0) (0) (0) 0 (0) (1) (0) (0) (0) 0 (0) (1)
Feed 18 0 0 0 (0) 0 0 0 (0) (0) (0) 0 (0) (1) (0) 0 (1) 0 (0) (1)
Cutting edge selection 19 0 0 0 (0) 0 0 0 (0) (0) (0) 0 (0) (0) (1) 0 (0) 0 (0) (1)
DL 20 0 0 0 (0) 0 0 0 (0) (0) (0) 0 (0) (0) (1) 0 (0) 0 (0) (1)
Tool selection 21 0 0 0 (0) 0 0 0 (0) (0) (0) 0 (0) (0) (1) 0 (0) 0 (0) (1)
Stop (associated) 22 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
Conditional stop 23 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
(associated)
End of subroutine 24 0 0 0 (0) 0 0 0 0 (0) 0 0 1 0 0 0 0 0 (0) (1)
Nibbling 25 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)
Nibbling 26 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)
Nibbling 27 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)
Nibbling 28 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)
Nibbling 29 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)
Nibbling 30 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)
Nibbling 31 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)
Nibbling 32 0 0 0 (0) 0 0 0 (0) (0) (0) (0) (0) (1) (0) 0 (0) (0) (0) (1)

1) The value is dependent upon machine data:


MD22560 $MC_TOOL_CHANGE_M_MODE (M function for tool change)
2) The value can be preset with a different value via the following machine data:
MD20095 $MC_EXTERN_RIGID_TAPPING_M_NR (M function for switching over to
the controlled axis mode (ext. mode))
MD20094 $MC_SPIND_RIGID_TAPPING_M_NR (M function for switching over to
controlled axis mode)
The value 70 is always output to the PLC.
3) The value is set via the machine data:
MD22254 $MC_AUXFU_ASSOC_M0_VALUE (additional M function for program stop)
4) The value is set via the machine data:
MD22256 $MC_AUXFU_ASSOC_M1_VALUE (additional M function for conditional
stop)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 447
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

5) The value is set via the machine data:


MD10714 $MN_M_NO_FCT_EOP (M function for spindle active after reset)
6) The value is set via the machine data:
MD26008 $MC_NIBBLE_PUNCH_CODE (definition of M functions)
( ) Only values in parentheses can be changed.

8.2.1 Parameter assignment

8.2.1.1 Group assignment


A predefined auxiliary function can be assigned to a specific auxiliary function group via the
following machine data:
MD22040 $MC_AUXFU_PREDEF_GROUP[<n>] (group assignment of predefined auxiliary
functions)
If the value is zero, the auxiliary function is not assigned to any auxiliary function group.

8.2.1.2 Type, address extension and value


An auxiliary function is programmed via the type, address extension, and value parameters
(see "Programming an auxiliary function (Page 466)").

Type
The identifier of an auxiliary function is defined via the "type," e.g.:

"M" For additional function


"S" for spindle function
"F" for feed
The setting is done via the following machine data:
MD22050 $MC_AUXFU_PREDEF_TYPE[<n>] (type of predefined auxiliary functions)

Note
The "type" cannot be changed for predefined auxiliary functions.

Basic Functions
448 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

Address extension
The "address extension" of an auxiliary function is for addressing different components of the
same type. In the case of predefined auxiliary functions, the value of the "address extension"
is the spindle number to which the auxiliary function applies.
The setting is done via the following machine data:
MD22060 $MC_AUXFU_PREDEF_EXTENSION[<n>] (address extension for predefined
auxiliary functions)
Grouping together auxiliary functions
To assign an auxiliary function for all spindles of a channel to the same auxiliary function
group, the value "–1" is entered for the "address extension" parameter.
Example:
The auxiliary function M3 (machine data index = 6) is assigned to the second auxiliary
function group for all the channel's spindles.

MD22040 $MC_AUXFU_PREDEF_GROUP[ 6 ] =2
MD22050 $MC_AUXFU_PREDEF_TYPE[ 6 ] = "M"
MD22060 $MC_AUXFU_PREDEF_EXTENSION[ 6 ] = -1
MD22070 $MC_AUXFU_PREDEF_VALUE[ 6 ] =3

Value
The parameters "value" and "type" define the meaning of an auxiliary function, i.e. the
system function that is activated on the basis of this auxiliary function.
The "value" of an auxiliary function is defined in the machine data:
MD22070 $MC_AUXFU_PREDEF_VALUE[<n>] (value of predefined auxiliary functions)

Note
The "value" cannot be changed for a predefined auxiliary function. For some predefined
auxiliary functions, the "value" can be reconfigured via additional machine data (see
"Associated auxiliary functions (Page 461)").

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 449
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

8.2.1.3 Output behavior


The "output behavior" defines when the auxiliary function is output to the NC/PLC interface
and when it is acknowledged by the PLC.
The setting is done via the following machine data:
MD22080 $MC_AUXFU_PREDEF_SPEC[<n>] (output behavior of predefined auxiliary
functions)

Bit Value Meaning Access


0 1 Output duration one OB1 cycle (normal acknowledgment) r/w
1 1 Output duration one OB40 cycle (quick acknowledgment) r/w
2 1 No predefined auxiliary function r/w
3 1 No output (can only be set as a single bit) r/w
4 1 Spindle response following acknowledgment r/w
5 1 Output prior to motion r/w
6 1 Output during motion r/w
7 1 Output at block end r/w
8 1 No output after type 1, 2, and 4 block searches r/w
9 1 Collection during type 5 block searches (SERUPRO) r/w
10 1 No output during type 5 block searches (SERUPRO) r/w
11 1 Cross-channel auxiliary function (SERUPRO) r/w
12 1 Output performed via synchronized action r
13 1 Implicit auxiliary function r
14 1 Active M01 r
15 1 No output during positioning test run r/w
16 1 Nibbling off r
17 1 Nibbling on r
18 1 Nibbling r
Bit 0 = 1: Output duration one OB1 cycle (normal acknowledgment)
An auxiliary function with normal acknowledgment is output to the NC/PLC interface at the
beginning of the OB1 cycle. The auxiliary function-specific change signal indicates to the
PLC user program that the auxiliary function is valid.
The auxiliary function is acknowledged as soon as organization block OB1 has run once.
This corresponds to a complete PLC user cycle.
The auxiliary function with normal acknowledgment is output in synchronism with the part
program block in which it is programmed. If execution of the part program block, e.g. path
and/or positioning axis movements, is completed before acknowledgment of the auxiliary
function, the block change is delayed until after acknowledgment by the PLC.
In continuous-path mode, a constant path velocity can be maintained in conjunction with an
auxiliary function with normal acknowledgment, if the auxiliary function is output by the PLC
during the traversing motion and before reaching the end of the block.

Basic Functions
450 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

Bit 1 = 1: Output duration one OB40 cycle (quick acknowledgment)


An auxiliary function with quick acknowledgment is output to the NC/PLC interface before the
next OB1 cycle. The auxiliary function-specific change signal indicates to the PLC user
program that the auxiliary function is valid.
The auxiliary function is acknowledged immediately by the PLC basic program in the next
OB40 cycle. Acknowledgment of the auxiliary function is not confirmation that the
corresponding PLC user function has been executed. The auxiliary function is still executed
in the OB1 cycle. Next output of the auxiliary functions to the PLC is therefore not possible
until after this OB1 cycle has run completely. This is noticeable in continuous-path mode
(drop in path velocity) especially if auxiliary functions with quick acknowledgment are output
in several consecutive part program blocks.
With auxiliary functions with quick acknowledgment, it cannot be guaranteed that the PLC
user program will respond in synchronism with the block.

Note
Parameterization of the output behavior of auxiliary functions as "quick auxiliary functions" is
only possible in conjunction with user-defined auxiliary functions.

Bit 2 = 1: No predefined auxiliary function


A predefined auxiliary function is treated like a user-defined auxiliary function with this
setting. The auxiliary function then no longer triggers the corresponding system function but
is only output to the PLC.
Example:
Reconfiguration of the "Position spindle" auxiliary function (index 9) to a user-defined
auxiliary function with normal acknowledgment and output prior to the traversing motion.
MD22080 $MC_AUXFU_PREDEF_SPEC [ 9 ] = 'H25' (100101B)
Bit 3 = 1: No output
The auxiliary function is not output to the PLC.
Bit 4 = 1: Spindle response following acknowledgment
The corresponding spindle function is only started after acknowledgment by the PLC.
Bit 5 = 1: Output prior to motion
The auxiliary function is output before the traversing motions programmed in the part
program block (path and/or block-related positioning axis movements).
Bit 6 = 1: Output during motion
The auxiliary function is output during the traversing motions programmed in the part
program block (path and/or block-related positioning axis movements).
Bit 7 = 1: Output at block end
The auxiliary function is output after completion of the traversing motions programmed in the
part program block (path and/or block-related positioning axis movements).
Bit 8 = 1: No output after type 1, 2 and 4 block searches
The collected auxiliary function is not output after a type 1, 2 or 4 block search.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 451
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

Bit 9 = 1: Collection during type 5 block searches (SERUPRO)


If SERUPRO is active, the auxiliary function is collected on a group-specific basis in system
variables $AC_AUXFU_M_VALUE[<n>], $AC_AUXFU_M_EXT[<n>], and
$AC_AUXFU_M_STATE[<n>].
Bit 10 = 1: No output during type 5 block searches (SERUPRO)
The auxiliary function is output to the PLC if SERUPRO is active.
Bit 11 = 1: Cross-channel auxiliary function (SERUPRO)
If SERUPRO is active, the auxiliary function is collected on an cross-channel basis in the
global list. Only the last auxiliary (highest tick) collected in this group is entered in the global
list.
Bit 12 = 1: Output performed via synchronized action
This bit can only be read and is set if the auxiliary function is output via a synchronized
action.
Bit 13 = 1: Implicit auxiliary function
This bit can only be read and is set if the auxiliary function is output implicitly.
Bit 14 = 1: Active M01
This bit can only be read and is set if the auxiliary function was output to the PLC when M01
was active.

Note
In the case of auxiliary functions for which no output behavior has been defined, the
following default output behavior is active:
• Output duration one OB1 cycle
• Output at block end

Output behavior relative to motion


Output prior to motion
● The traversing motions (path and/or block-related positioning axis movements) of the
previous part program block end with an exact stop.
● The auxiliary functions are output at the beginning of the current part program block.
● Traversing motions of the current part program block (path and/or positioning axis
movements) are started after acknowledgment of the auxiliary functions by the PLC:
– Output duration one OB1 cycle (normal acknowledgment): after one OB1 cycle
– Output duration one OB40 cycle (quick acknowledgment): after one OB40 cycle

Basic Functions
452 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

Output during motion


● The auxiliary functions are output at the beginning of the traversing motions (path and/or
positioning axis movements).
● The path velocity of the current part program block is reduced so that the time to the end
of the block is greater than the time to acknowledgment of the auxiliary functions by the
PLC.
– Output duration one OB1 cycle (normal acknowledgment): one OB1 cycle
– Output duration one OB40 cycle (quick acknowledgment): one OB40 cycle
Output after motion
● The traversing motions (path and/or block-related positioning axis movements) of the
current part program block end with an exact stop.
● The auxiliary functions are output after completion of the traversing motions.
● The block change is performed after acknowledgment of the auxiliary functions by the
PLC:
– Output duration one OB1 cycle (normal acknowledgment): after one OB1 cycle
– Output duration one OB40 cycle (quick acknowledgment): after one OB40 cycle

Examples of different output behavior


The following figures illustrate the differing behavior regarding:
● Output and acknowledgment of the auxiliary function
● Spindle response (speed change)
● Traverse movement (velocity change)
The binary values specified in the figures under "Output behavior" relate to the configurable
output behavior (MD22080).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 453
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

06;B2XWSXWRSWLRQ
6SLQGOH 
(GLWLRQ 4XLW UHVSRQVH

0 $[LVPRWLRQ

W
%ORFN
Y FKDQJH

6SLQGOH 06;B2XWSXWRSWLRQ
UHVSRQVH 
(GLWLRQ 4XLW

0 $[LVPRWLRQ

W
%ORFN
Y
FKDQJH

6SLQGOH 06;B2XWSXWRSWLRQ
UHVSRQVH 
(GLWLRQ 4XLW

0 $[LVPRWLRQ

W
Y %ORFN
FKDQJH
6SLQGOH
UHVSRQVH 06;B2XWSXWRSWLRQ
(GLWLRQ 4XLW 
0 $[LVPRWLRQ

W
%ORFN
FKDQJH

Basic Functions
454 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions

6SLQGOH 0;
UHVSRQVH B2XWSXWRSWLRQ
(GLWLRQ 4XLW

$[LVPRWLRQ
0

%ORFNFKDQJH W
Y

6SLQGOH 0;
UHVSRQVH B2XWSXWRSWLRQ
(GLWLRQ 4XLW

0
$[LVPRWLRQ

%ORFNFKDQJH W
Y

6SLQGOH
UHVSRQVH
(GLWLRQ 4XLW 'HIDXOWVHWWLQJ
06;
0 B2XWSXWRSWLRQ
$[LVPRWLRQ

%ORFNFKDQJH W
Y

6SLQGOH
UHVSRQVH 'HIDXOWVHWWLQJ
(GLWLRQ 4XLW 06;
0 B2XWSXWRSWLRQ
$[LVPRWLRQ

%ORFNFKDQJH W
Y

6SLQGOH
'HIDXOWVHWWLQJ
UHVSRQVH
0;
(GLWLRQ 4XLW
B2XWSXWRSWLRQ
0
$[LVPRWLRQ

%ORFNFKDQJH W

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 455
Auxiliary Function Outputs to PLC (H2)
Predefined auxiliary functions


'HIDXOWVHWWLQJ
6SLQGOHUHVSRQVH 0;
2XWSXW $FN
2XWSXWEHKDYLRU
0
$[LVPRYHPHQW

W
%ORFNFKDQJH
Y

6SLQGOHUHVSRQVH 'HIDXOWVHWWLQJ
0;
2XWSXW $FN 2XWSXWEHKDYLRU

0
$[LVPRYHPHQW

W
%ORFNFKDQJH
Y


6SLQGOHUHVSRQVH 'HIDXOWVHWWLQJ
2XWSXW $FN 06;
6 2XWSXWEHKDYLRU
$[LVPRYHPHQW

W
%ORFNFKDQJH

Basic Functions
456 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
User-defined auxiliary functions

8.3 User-defined auxiliary functions


There are two uses for user-defined auxiliary functions:
● Extension of predefined auxiliary functions
● User-specific auxiliary functions

Extension of predefined auxiliary functions


Because there is only one set of machine data for the predefined auxiliary functions, they
can only ever be used to address one spindle of the channel. To address further spindles,
user-defined auxiliary functions must be parameterized to supplement the predefined
auxiliary functions.
Extension of predefined auxiliary functions refers to the "address extensions" parameter. The
number of the spindle that the auxiliary function refers to is entered in the "address
extension" parameter.
The relevant predefined auxiliary functions can be extended for the following system
functions:

System function Type


Address extension 1)
Value
Tool change M 1 6
Spindle right M 1 3
Spindle left M 1 4
Spindle stop M 1 5
Position spindle M 1 19
Axis mode M 1 70
Automatic gear stage M 1 40
Gear stage 1 M 1 41
Gear stage 2 M 1 42
Gear stage 3 M 1 43
Gear stage 4 M 1 44
Gear stage 5 M 1 45
Spindle speed S 1 -1
Tool selection T 1 -1
1) Address extension = 1 is the default value used in the auxiliary functions predefined in the
machine data

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 457
Auxiliary Function Outputs to PLC (H2)
User-defined auxiliary functions

Example:
Extension of the predefined auxiliary function for the system function "spindle right" for the
second and third spindle of the channel.

Auxiliary function "spindle right" for the second spindle of the channel:
MD22010 $MC_AUXFU_ASSIGN_TYPE[ n ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[ n ] =2
MD22030 $MC_AUXFU_ ASSIGN_VALUE[ n ] =3

Auxiliary function "spindle right" for the third spindle of the channel:
MD22010 $MC_AUXFU_ ASSIGN_TYPE[ m ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[ m ] =3
MD22030 $MC_AUXFU_ ASSIGN_VALUE[ m ] =3

User-specific auxiliary functions


User-specific auxiliary functions have the following characteristics:
● User-specific auxiliary functions only activate user functions.
● No system functions can be activated by user-specific auxiliary functions.
● A user-specific auxiliary function is output to the PLC according to the parameterized
output behavior.
● The functionality of a user-specific auxiliary function is implemented by the machine
manufacturer/user in the PLC user program.

8.3.1 Parameter assignment

8.3.1.1 Maximum number of user-defined auxiliary functions


The maximum number of user-defined auxiliary function per channel can be parameterized
via the machine data:
MD11100 $MN_AUXFU_MAXNUM_GROUP_ASSIGN (maximum number of user-defined
auxiliary functions)

8.3.1.2 Group assignment


A user-defined auxiliary function can be assigned to a certain auxiliary function group via the
following machine data:
MD22000 $MC_AUXFU_ASSIGN_GROUP[<n>] (group assignment of user-defined auxiliary
functions)
If the value is zero, the auxiliary function is not assigned to any auxiliary function group.

Basic Functions
458 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
User-defined auxiliary functions

8.3.1.3 Type, address extension and value


An auxiliary function is programmed via the type, address extension, and value parameters
(see "Programming an auxiliary function (Page 466)").

Type
The name of an auxiliary function is defined via the "type".
The identifiers for user-defined auxiliary functions are:

Type Identifier Meaning


"H" Auxiliary function User-specific auxiliary functions
"M" Additional function Extension of predefined auxiliary
"S" Spindle function functions
"T" Tool number
The setting is done via the following machine data:
MD22010 $MC_AUXFU_ASSIGN_TYPE[<n>] (type of user-defined auxiliary functions)

Address extension
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[<n>] (address extension user-defined
auxiliary functions)
The functionality of the address extension is not defined in user-specific auxiliary functions. It
is generally used to distinguish between auxiliary functions with the same "value".
Grouping together auxiliary functions***
If all the auxiliary functions of the same type and value are assigned to the same auxiliary
function group, a value of "-1" must be entered for the "address extension" parameter.
Example:
All user-specific auxiliary functions with the value "= 8" are assigned to the tenth auxiliary
function group.

MD22000 $MC_AUXFU_ASSIGN_GROUP [ 1 ] = 10
MD22010 $MC_AUXFU_ ASSIGN_TYPE [ 1 ] = "H"
MD22020 $MC_AUXFU_ ASSIGN_EXTENSION [ 1 ] = -1
MD22030 $MC_AUXFU_ ASSIGN_VALUE [ 1 ] =8

Value
MD22030 $MC_AUXFU_ASSIGN_VALUE[<n>] (value of user-defined auxiliary functions)
The functionality of the "value" parameter is not defined in user-specific auxiliary functions.
The value is generally used to activate the corresponding PLC user function.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 459
Auxiliary Function Outputs to PLC (H2)
User-defined auxiliary functions

Grouping together auxiliary functions


If all the auxiliary functions of the same type and address extension are assigned to the
same auxiliary function group, a value of "-1" must be entered for the "value" parameter.
Example:
All user-specific auxiliary functions with the address extension "= 2" are assigned to the
eleventh auxiliary function group.

MD22000 $MC_AUXFU_ASSIGN_GROUP [ 2 ] = 11
MD22010 $MC_AUXFU_ ASSIGN_TYPE[ 2 ] = "H"
MD22020 $MC_AUXFU_ ASSIGN_EXTENSION[ 2 ] = 2
MD22030 $MC_AUXFU_ ASSIGN_VALUE[ 2 ] = -1

8.3.1.4 Output behavior


The "output behavior" of user-defined auxiliary functions can be parameterized via the
machine data:
MD22035 $MC_AUXFU_ASSIGN_SPEC[<n>] (output behavior of user-defined auxiliary
functions)
For a description of the individual output parameters, see the "Output behavior (Page 450)"
section of the predefined auxiliary functions. The information given there can be applied
analogously to the output behavior of user-defined auxiliary functions.

Basic Functions
460 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Associated auxiliary functions

8.4 Associated auxiliary functions

Function
Associated auxiliary functions are user-defined auxiliary functions that have the same effect
as the corresponding predefined auxiliary functions. User-defined auxiliary functions can be
associated for the following predefined auxiliary functions:
● M0 (stop)
● M1 (conditional stop)

Requirements
The precondition for association of a user-defined auxiliary function with one of the
predefined auxiliary functions mentioned is parameterization of a user-defined auxiliary
function. Only "M" is allowed as a "type" parameter of the user-defined auxiliary function.

Parameter assignment
Association of a user-defined auxiliary function with one of the predefined auxiliary functions
mentioned is set in the machine data:
MD22254 $MC_AUXFU_ASSOC_M0_VALUE (additional M function for program stop)
MD22256 $MC_AUXFU_ASSOC_M1_VALUE (additional M function for conditional stop)

Group assignment
The group assignment of an associated user-defined auxiliary function is always the group
assignment of the corresponding predefined auxiliary function.

Application
Associated auxiliary functions can be used in:
● Main program
● Subroutine
● Cycle

Note
Associated auxiliary functions may not be used in synchronized actions.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 461
Auxiliary Function Outputs to PLC (H2)
Associated auxiliary functions

NC/PLC interface signals


In the case of an associated user-defined auxiliary function, the same signals are output to
the NC/PLC interface as for the corresponding predefined auxiliary function. To distinguish
which auxiliary function has actually been programmed, the value of the user-defined
auxiliary function ("value" parameter) is output as the value of the auxiliary function. This
means it is possible to distinguish between predefined and user-defined auxiliary functions in
the PLC user program.

Note
A change in machine data MD22254 and/or MD22256 may require corresponding
adjustment of the PLC user program:

Specific NC/PLC interface signals


The following specific NC/PLC interface signals are available:
● DB21, ... DBX318.5 (associated M00/M01 active) feedback signal
● DB21, ... DBX30.5 (activate associated M01) activation signal

Boundary conditions
Please note the following boundary conditions:
● A user-defined auxiliary function may not be multiply associated.
● Predefined auxiliary functions (e.g. M3, M4, M5 etc.) may not be associated.

Example
Associating the user-defined auxiliary function M123 with M0:
MD22254 $MC_AUXFU_ASSOC_M0_VALUE = 123
The user-defined auxiliary function M123 thus has the same functionality as M0.

Basic Functions
462 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Type-specific output behavior

8.5 Type-specific output behavior

Function
The output behavior of auxiliary functions relative to a traversing motions programmed in the
part program block can be defined type-specifically.

Parameter assignment
Parameters are assigned to type-specific output behavior via the machine data:
MD22200 $MC_AUXFU_M_SYNC_TYPE (output time for M functions)
MD22210 $MC_AUXFU_S_SYNC_TYPE (output time for S functions)
MD22220 $MC_AUXFU_T_SYNC_TYPE (output time for T functions)
MD22230 $MC_AUXFU_H_SYNC_TYPE (output time for H functions)
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time for F functions)
MD22250 $MC_AUXFU_D_SYNC_TYPE (output time for D functions)
MD22252 $MC_AUXFU_DL_SYNC_TYPE (output time for DL functions)
The following output behaviors can be parameterized:
MD $MC_AUXFU_xx_SYNC_TYPE = <value>

Value Output behavior


0 Output prior to motion
1 Output during motion
2 Output at block end
3 No output to the PLC
4 Output according to the output behavior defined with MD22080
For a description of the various output behaviors, see the section titled "Output behavior
(Page 450)".

Note
For the output behavior that can be set for each type of auxiliary function, please refer to the
"Detailed Description of Machine Data" Parameter Manual.

Example
Output of auxiliary functions with different output behaviors in a part program block with
traverse movement.
Output behavior for which parameters have been assigned:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 463
Auxiliary Function Outputs to PLC (H2)
Type-specific output behavior

MD22200 $MC_AUXFU_M_SYNC_TYPE = 1 ⇒ M function:


Output during motion
MD22220 $MC_AUXFU_T_SYNC_TYPE = 0 ⇒ T function:
Output prior to motion
MD22230 $MC_AUXFU_H_SYNC_TYPE = 2 ⇒ H function:
Output at the end of the block
Part program block:

Program code
...
N10 G01 X100 M07 H5 T5
...

Time sequence for auxiliary function output:

;

7

0

+

!6WDUW1

Basic Functions
464 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Priorities of the output behavior for which parameters have been assigned

8.6 Priorities of the output behavior for which parameters have been
assigned
The following priorities must be observed for the following areas in connection with the
parameterized output behavior of an auxiliary function:
● Output duration (normal/quick acknowledgment)
● Output relative to motion (prior to/during/after the motion)
As a general rule, the parameterized output behavior with lower priority becomes active if no
output behavior with higher priority has been parameterized.

Output duration
The following priorities apply to the output duration:

Priority Output behavior Defined via:


Highest auxiliary function-specific Part program instruction: QU(…)
(see "Programmable output duration (Page 468)")
↓ Auxiliary function-specific MD22035 $MC_AUXFU_ASSIGN_SYNC[<n>]
MD22080 $MC_AUXFU_PREDEF_SYNC[<n>]
↓ Group-specific MD11110 $MC_AUXFU_GROUP_SPEC[<n>]
Lowest Not defined Default output behavior: Output duration one OB1 cycle

Output relative to motion


The following rules apply to output relative to motion:

Priority Output behavior Defined via:


Highest Auxiliary function-specific MD22035 $MC_AUXFU_ASSIGN_SYNC[<n>]
MD22080 $MC_AUXFU_PREDEF_SYNC[<n>]
↓ Group-specific MD11110 $MC_AUXFU_GROUP_SPEC[<n>]
↓ Type-specific MD22200 $MC_AUXFU_M_SYNC_TYPE
MD22210 $MC_AUXFU_S_SYNC_TYPE
MD22220 $MC_AUXFU_T_SYNC_TYPE
MD22230 $MC_AUXFU_H_SYNC_TYPE
MD22240 $MC_AUXFU_F_SYNC_TYPE
MD22250 $MC_AUXFU_D_SYNC_TYPE
MD22252 $MC_AUXFU_DL_SYNC_TYPE
Lowest Not defined Default output behavior: Output at block end

Note
Part program blocks without path motion
In a part program block without a path motion (even those with positioning axes and
spindles), the auxiliary functions are all output immediately in a block.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 465
Auxiliary Function Outputs to PLC (H2)
Programming an auxiliary function

8.7 Programming an auxiliary function

Syntax
An auxiliary function is programmed in a part program block with the following syntax:
<Type>[<Address extension>=]<Value>

Note
If no address extension is programmed, the address extension is implicitly set = 0.
Predefined auxiliary functions with the address extension = 0 always refer to the master
spindle of the channel.

Symbolic addressing
The values for the "address extension" and "value" parameters can also be specified
symbolically. The symbolic name for the address extension must then be stated in brackets.
Example:
Symbolic programming of the auxiliary function M3 (spindle right) for the first spindle:

Program code Comment


DEF SPINDEL_NR=1 ; First spindle in the channel
DEF DREHRICHTUNG=3 ; Clockwise direction of rotation
N100 M[SPINDEL_NR] = DREHRICHTUNG ; corresponding to: M1=3

Note
If you use symbolic names to program an auxiliary function, the symbolic name is not
transferred when the auxiliary function is output to the PLC. The corresponding numerical
value is transferred instead.

Examples
Example 1: Programming of predefined auxiliary functions

Program code Comment


N10 M3 ; "Spindle right" for the master spindle of the channel.
N20 M0=3 ; "Spindle right" for the master spindle of the channel.
N30 M1=3 ; "Spindle right" for the 1st spindle of the channel.
N40 M2=3 ; "Spindle right" for the 2nd spindle of the channel.

Basic Functions
466 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Programming an auxiliary function

Example 2: Programming examples of auxiliary functions with the corresponding values for
output to the PLC

Program code Comment


DEF Coolant=12 ; Output to PLC: - - -
DEF Lubricant=130 ; Output to PLC: - - -
H[coolant]=lubricant ; Output to PLC: H12=130
H=coolant ; Output to PLC: H0=12
H5 ; Output to PLC: H0=5
H=5.379 ; Output to PLC: H0=5.379
H17=3.5 ; Output to PLC: H17=3.5
H[coolant]=13.8 ; Output to PLC: H12=13.8
H='HFF13' ; Output to PLC: H0=65299
H='B1110' ; Output to PLC: H0=14
H5.3=21 ; Error

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 467
Auxiliary Function Outputs to PLC (H2)
Programmable output duration

8.8 Programmable output duration

Function
User-specific auxiliary functions, for which the output behavior "Output duration of an OB1
cycle (slow acknowledgement)" was parameterized, can be defined for individual outputs via
the part program guide QU (Quick) for auxiliary functions with quick acknowledgement.

Syntax
An auxiliary function with quick acknowledgment is defined in a part program block with the
following syntax:
<Type>[<Address extension>]=QU(<Value>)

Example
Different behavior for the output of the auxiliary functions M100 and M200 in a part program.
The output behavior of the auxiliary functions is parameterized as follows:
● M100
– Output duration one OB1 cycle (slow acknowledgment)
– Output during motion
● M200
– Output duration one OB1 cycle (slow acknowledgment)
– Output prior to motion

Program code Comment


N10 G94 G01 X50 M100 ; Output of M100: during the motion
; Acknowledgment: slow
N20 Y5 M100 M200 ; Output of M200: prior to the motion
; Output of M100: during the motion
; Acknowledgment: slow
N30 Y0 M=QU(100) M=QU(200) ; Output of M200: prior to the motion
; Output of M100: during the motion
; Acknowledgement: quick
N40 X0
N50 M100 M200 ; Output of M200: immediate 1)
; Output of M100: immediate 1)
; Acknowledgment: slow
M17
1) Without a traverse movement, auxiliary functions are always output to the PLC immediately.
The following figure shows the time sequence of the part program. Please note the time
difference during the processing of part program blocks N20 and N30.

Basic Functions
468 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Programmable output duration

;D[LV
<D[LV
0
0
%ORFNQXPEHU 1 1 1 1 1

6WUREHIURP1&.DQG 0
DFNQRZOHGJPHQWE\EDVLF
3/&SURJUDP 0

0FKDQJH ,6

0FKDQJH ,6
3/&F\FOHWLPH 2%
2%

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 469
Auxiliary Function Outputs to PLC (H2)
Auxiliary function output to the PLC

8.9 Auxiliary function output to the PLC

Function
On output of an auxiliary function to the PLC, the following signals and values are passed to
the NC/PLC interface:
● Change signals
● "Address extension" parameter
● "Value" parameter

Data areas in the NC/PLC interface


The change signals and values of the auxiliary functions are within the following data areas
in the NC/PLC interface:
● Change signals for auxiliary function transfer from NC channel:
DB21, ... DBB58 - DBB67
● Transferred M and S functions:
DB21, ... DBB68 - DBB112
● Transferred T, D and DL functions:
DB21, ... DBB116 - DBB136
● Transferred H and F functions:
DB21, ... DBB140 - DBB190
● Decoded M signals (M0 - M99):
DB21, ... DBB194 - DBB206 (dynamic M functions)

References
● A detailed description of the above data areas in the NC/PLC interface can be found in:
Parameter Manual, Lists, Book 2; chapter: "Signals from/to NCK channel (DB 21 –
DB 30)"
● The access methods for the NC/PLC interface are described in:
Function Manual, Basic Functions, Basic PLC Program (P3)

Basic Functions
470 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Auxiliary functions without block change delay

8.10 Auxiliary functions without block change delay

Function
For auxiliary functions with parameterized and/or programmed output behavior, too:
● "Output duration one OB40 cycle (quick acknowledgment)"
● "Output before the motion" or "Output during the motion"
there may be drops in velocity in continuos-path mode (short traverse paths and high
velocities). This the system has to wait for acknowledgment of the auxiliary function by the
PLC toward the end of the block. To avoid these velocity drops, the block change can be
made irrespective of whether such auxiliary functions have been acknowledged:

Parameter assignment
Suppression of the block change delay with quick auxiliary functions is set via the machine
data:
MD22100 $MC_AUXFU_QUICK_BLOCKCHANGE (block change delay with quick auxiliary
functions)

Value Meaning
0 In the case of quick auxiliary function output to the PLC, the block change is delayed until
acknowledgment by the PLC (OB40).
1 In the case of quick auxiliary function output to the PLC, the block change is not delayed.

Boundary conditions
Synchronism of auxiliary functions that are output without a block change delay is no longer
ensured for the part program block in which they are programmed. In the worst case
scenario, acknowledgment comes one OB40 cycle and execution of the auxiliary function
comes one OB1 cycle after the change to the next part program block.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 471
Auxiliary Function Outputs to PLC (H2)
M function with an implicit preprocessing stop

8.11 M function with an implicit preprocessing stop

Function
Triggering a preprocessing stop in conjunction with an auxiliary function can be programmed
explicitly via the STOPRE part program command. Always triggering a preprocessing stop in
M function programming can be parameterized for each M function via the following machine
data:
MD10713 $MN_M_NO_FCT_STOPRE[<n>] (M function with preprocessing stop)

Example
The user-defined M function M88 is intended to trigger a preprocessing stop.
Parameter assignment:
MD10713 $MN_M_NO_FCT_STOPRE [ 0 ] = 88
Application:
Part program (extract)

Program code Comment


...
N100 G0 X10 M88 ; Traversing motion and implicit preprocessing stop via M88
N110 Y=R1 ; N110 is only interpreted after the traversing motion has
been completed and the M function has been acknowledged.
...

Boundary conditions
If a subroutine called indirectly via an M function in a part program in one of the following
ways, no preprocessing stop is performed:
● MD10715 $MN_M_NO_FCT_CYCLE (M function to be replaced by subroutine)
● M98 (ISO dialect T/ISO dialect M)

Basic Functions
472 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Response to overstore

8.12 Response to overstore

Overstore
On the SINUMERIK operator interface, before starting the following functions:
● NC START of a part program
● NC START to resume an interrupted part program
the auxiliary functions that are output at the start can be changed by the "Overstore"
function.
Possible applications include:
● Addition of auxiliary functions after block search
● Restoring the initial state to position a part program

Types of auxiliary functions that can be overstored


The following types of auxiliary functions can be overstored:
● M (special function)
● S (spindle speed)
● T (tool number)
● H (aux. function)
● D (tool offset number)
● DL (additive tool offset)
● F (feed)

Duration of validity
An overstored auxiliary function, e.g. M3 (spindle right), is valid until it is overwritten by
another auxiliary function from the same auxiliary function group, by additional overstoring or
by programming in a part program block.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 473
Auxiliary Function Outputs to PLC (H2)
Block-search response

8.13 Block-search response

8.13.1 Auxiliary function output during type 1, 2, and 4 block searches

Output behavior
In the case of type 1, 2, and 4 block searches, the auxiliary functions are collected on the
basis of specific groups. The last auxiliary function in each auxiliary function group is output
after NC-START in a separate part program block before the actual reentry block, and has
the following output behavior:
● Output duration of one OB1 cycle (normal acknowledgment)
● Output prior to motion

Output control
Whether or not the auxiliary function is output to the PLC after a block search can be
configured via bit 8 of the machine data:
● MD22080 $MC_AUXFU_PREDEF_SPEC[<n>]
(output behavior of predefined auxiliary functions)
where <n> = system function index (0 ... 32)
● MD22035 $MC_AUXFU_ASSIGN_SPEC[<n>]
(output behavior of user-defined auxiliary functions)
where <n> = auxiliary function index (0 ... 254)
● MD11110 $MN_AUXFU_GROUP_SPEC[<n>]
(output behavior of the auxiliary functions in a group)
where <n> = group index (0 ... 63)

Bit Value Meaning


10 0 Output during type 1, 2, and 4 block searches
1 No output during type 1, 2, and 4 block searches
This behavior does not affect the display and does not affect variables
$AC_AUXFU_STATE[<n>], $AC_AUXFU_VALUE[<n>], and $AC_AUXFU_EXT[<n>].
The auxiliary functions are always regarded as collected after a block search, even though
they are not output to the PLC.
During collection, an auxiliary function that is not output after a block search also overwrites
an auxiliary function whose bit 8 is not set.

Basic Functions
474 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

The user can scan the collected auxiliary functions after a block search and, under certain
circumstances, output them again by means of the subprogram or synchronous actions.

Note
The following auxiliary functions are not collected:
• Auxiliary functions which are not assigned to any auxiliary function group.
• Auxiliary functions which are assigned to the first auxiliary function group.

Overstorage of auxiliary functions


After completion of a block search, the collected auxiliary functions are ouput on the next
NC-START. If it is necessary to output additional auxiliary functions, they can be added via
the "Overstore" function (see "Response to overstore (Page 473)").

M19 behavior (position spindle)


After a block search, the last spindle positioning command programmed with M19 is always
carried out, even if other spindle-specific auxiliary functions are programmed between the
part program with M19 and the target block. Setting the necessary spindle enables must
therefore be derived from the interface signals of the traverse commands in the PLC user
program:
DB31, ... DBX64.6/64.7 (traverse command minus/plus)
In this case, the spindle-specific auxiliary functions M3, M4, and M5 are not suitable because
they might not be output to the PLC until after the spindle positioning.

References
For detailed information on the block search, please refer to:
Function Manual, Basic Functions, Mode Group, Channel, Program Operation, Reset
Behavior (K1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 475
Auxiliary Function Outputs to PLC (H2)
Block-search response

8.13.2 Assignment of an auxiliary function to a number of groups

Function
User-defined auxiliary functions can also be assigned to multiple groups via the group
assignment (MD22000 $MC_AUXFU_ASSIGN_GROUP). During the block search these
auxiliary functions are collected for all the configured groups.

Note
Predefined auxiliary functions can only be assigned to one group.

Example
The DIN includes the following M-commands for coolant output:
● M7: Coolant 2 ON
● M8: Coolant 1 ON
● M9: Coolants 1 and 2 OFF
Consequently, both coolants can also be active together:
● If M7 and M8 are collected in two separate groups (e.g. groups 5 and 6)
● If M9 has to be assigned to these two groups, e.g.:
– Group 5: M7, M9
– Group 6: M8, M9
Parameter assignment:
MD11100 $MN_AUXFU_MAXNUM_GROUP_ASSIGN = 4
MD22000 $MC_AUXFU_ASSIGN_GROUP[0] = 5
MD22000 $MC_AUXFU_ASSIGN_GROUP [1] = 5
MD22000 $MC_AUXFU_ASSIGN_GROUP [2] = 6
MD22000 $MC_AUXFU_ASSIGN_GROUP [3] = 6
MD22010 $MC_AUXFU_ASSIGN_TYPE [0] = M
MD22010 $MC_AUXFU_ASSIGN_TYPE [1] = M
MD22010 $MC_AUXFU_ASSIGN_TYPE [2] = M
MD22010 $MC_AUXFU_ASSIGN_TYPE [3] = M
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[0] = 0
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[1] = 0
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[2] = 0
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[3] = 0
MD22030 $MC_AUXFU_ASSIGN_VALUE[0] = 7
MD22030 $MC_AUXFU_ASSIGN_VALUE[1] = 9

Basic Functions
476 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

MD22030 $MC_AUXFU_ASSIGN_VALUE[2] = 8
MD22030 $MC_AUXFU_ASSIGN_VALUE [3] = 9
MD22035 $MC_AUXFU_ASSIGN_SPEC [0] = 'H121'
MD22035 $MC_AUXFU_ASSIGN_SPEC [1] = 'H121'
MD22035 $MC_AUXFU_ASSIGN_SPEC [2] = 'H121'
MD22035 $MC_AUXFU_ASSIGN_SPEC [3] = 'H121'
Part program (section):

Program code
...
N10 ... M8
N20 ... M9
N30 ... M7
...

During the block search, the auxiliary function M9 is collected for groups 5 and 6.
Scan of the collected M auxiliary functions:
M function of the fifth group: $AC_AUXFU_M_VALUE [4] = 7
M function of the sixth group: $AC_AUXFU_M_VALUE [5] = 9

8.13.3 Time stamp of the active M auxiliary function


When outputting collected auxiliary functions following a block search, attention must be paid
to the sequence during collecting. For this reason, each group is assigned a time stamp
which can be queried on a group-specific basis by way of the system variable below:
$AC_AUXFU_M_TICK[<n>] (time stamp of the active M auxiliary function)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 477
Auxiliary Function Outputs to PLC (H2)
Block-search response

8.13.4 Determining the output sequence

Function
The following predefined procedure is provided to simplify the process of determining the
output sequence of M auxiliary functions for the programmer:
AUXFUMSEQ(VAR INT _NUM_IN, VAR INT _M_IN[], VAR INT _EXT_IN[], VAR
INT _NUM_OUT, VAR INT _M_OUT[], VAR INT _EXT_OUT[])
Input parameters:
VAR INT _NUM_IN: Number of relevant M commands
VAR INT _M_IN[]: Field of relevant M codes
VAR INT _EXT_IN[]: Field of relevant M address extensions

Output parameters:
VAR INT _NUM_OUT: Number of determined M codes
VAR INT _M_OUT[]: Field of determined M codes
VAR INT _EXT_OUT[]: Field of determined M address extensions
The function determines the sequence in which the M auxiliary functions, which have been
collected on a group-specific basis, are output for the predefined M codes. The sequence is
determined from the collection times $AC_AUXFU_M_TICK[<n>] (see "Time stamp of the
active M auxiliary function (Page 477)").
A particular M code is only taken into account once, even if it belongs to more than one
group. If the number of relevant M commands is less than or equal to 0, all the collected M
codes are output. The number of relevant M commands is limited to 64.

Example
M commands for coolant output:
● M7: Coolant 2 ON
● M8: Coolant 1 ON
● M9: Coolants 1 and 2 OFF
Group assignment:
● Group 5: M7, M9
● Group 6: M8, M9

Part program (section):

Program code
...
N10 ... M8
N20 ... M9
N30 ... M7
...

Basic Functions
478 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

During block searches, the auxiliary functions are collected on the basis of specific groups.
The last auxiliary function in an auxiliary function group is output to the PLC following a block
search:
● Group 5: M7
● Group 6: M9
If they are output in the sequence M7 → M9, no coolant is then active. However, coolant 2
would be active during the execution of the program. Therefore, the correct output sequence
for the M auxiliary functions is determined with an ASUP which contains the predefined
procedure AUXFUMSEQ(…):

Program code
DEF INT _I, _M_IN[3], _EXT_IN[3], _NUM_OUT, _M_OUT[2], _EXT_OUT[2]
_M_IN[0]=7 _EXT_IN[0]=0
_M_IN[1]=8 _EXT_IN[1]=0
_M_IN[2]=9 _EXT_IN[2]=0
AUXFUMSEQ(3,_M_IN,_EXT_IN,_NUM_OUT,_M_OUT,_EXT_OUT)
FOR _I = 0 TO _NUM_OUT-1
M[_EXT_OUT[_I]]=_M_OUT[_I]
ENDFOR

8.13.5 Output suppression of spindle-specific auxiliary functions

Function
In certain situations, such as a tool change, it may be necessary not to output the spindle-
specific auxiliary functions collected during the block search in action blocks, but to delay
output, for example, until after a tool change. The automatic output of the spindle-specific
auxiliary functions after a block search may be suppressed for this purpose. Output can then
be performed manually later by overstoring or by an ASUB.

Parameterization
Suppression of the automatic output of the spindle-specific auxiliary functions after a block
search is set via machine data:
MD11450 $MN_SEARCH_RUN_MODE (behavior after a block search)

Bit Value Meaning


2 0 The output of the spindle-specific auxiliary functions is performed in the action blocks.
1 Output of the auxiliary functions is suppressed in the action blocks.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 479
Auxiliary Function Outputs to PLC (H2)
Block-search response

System variables
The spindle-specific auxiliary functions are always stored in the following system variables
during block searches, irrespective of the parameter assignment described above:

System variable Description


$P_SEARCH_S [<n> ] Accumulated spindle speed
Value range: 0 ... Smax
$P_SEARCH_SDIR [<n>] Accumulated spindle direction of rotation
Value range: 3, 4, 5, -5, -19, 70
$P_SEARCH_SGEAR [<n>] Accumulated spindle gear level M function
Value range: 40 ... 45
$P_SEARCH_SPOS [<n>] Accumulated spindle position
Value range: 0 ... MD30330 $MA_MODULO_RANGE
(size of the module range)
or
Accumulated traversing path
Value range: -100,000,000 ... 100,000,000
$P_SEARCH_SPOSMODE [<n>] Accumulated position approach mode
Value range: 0 ... 5
For later output of the spindle-specific auxiliary functions, the system variables can be read
in an AS, for example, and output after the action blocks are output:
DB21, ... DBX32.6 = 1 (last action block active)

Note
The contents of the system variables $P_S, $P_DIR and $P_SGEAR may be lost after block
search due to synchronization operations.

More detailed information on ASUB, block search, and action blocks is to be found in:
References:
Function Manual, Basic Functions; BAG, Channel, Program Operation, Reset Response
(K1), Chapter: "Program test"

Example
Block search for contour with suppression of output of the spindle-specific auxiliary functions
and start of an ASUB after output of action blocks.
Parameter assignment: MD11450 $MN_SEARCH_RUN_MODE, bit 2 = 1
After the block search on N55, the ASUB is started.
Part program:

Program code Comment


N05 M3 S200 ; Spindle 1
N10 G4 F3
N15 SPOS=111 ; Spindle 1 is positioned to 111 degrees in the ASUB

Basic Functions
480 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

Program code Comment


N20 M2=4 S2=300 ; Spindle 2
N25 G4 F3
N30 SPOS[2]=IC(77) ; Spindle 2 traverses incrementally by 77 degrees
N55 X10 G0 ; Destination block
N60 G4 F10
N99 M30

ASUB:

Program code Comment


PROC ASUP_SAVE
MSG ("Output of the spindle functions")
DEF INT SNR=1
AUSG_SPI:
M[SNR]=$P_SEARCH_SGEAR[SNR] ; Output gear level.
S[SNR]=$P_SEARCH_S[SNR] ; Output speed (for M40, a suitable
gear level is determined).
M[SNR]=$P_SEARCH_SDIR[SNR] ; Output direction of rotation,
positioning or axis mode.
SNR=SNR+1 ; Next spindle.
REPEAT AUSG_SPI P=$P_NUM_SPINDLES-1 ; For all spindles.
MSG("")
REPOSA
RET

Explanation of example
If the number of spindles is known, outputs of the same type can be written in one part
program block to reduce program runtime.
Output of $P_SEARCH_SDIR should be made in a separate part program block because
spindle positioning or switchover to axis mode in conjunction with the gear change can
cause an alarm.
If the ASUB which has been started is ended with REPOSA, spindle 1 remains at position 111
degrees, while spindle 2 is repositioned at position 77 degrees.
If a different response is required, the program sequence for block search (for example)
"N05 M3 S..." and "N30 SPOS[2] = IC(...)" requires special treatment.
Whether block search is active can be ascertained in the ASUB via the system variable
$P_SEARCH.
$P_SEARCH==1 ; Block search active
In the case of incremental positioning after speed control operation, the path to be traversed
is defined but, in some cases, the final position reached only becomes known during
positioning. This is the case, for example, during position calibration on crossing the zero
mark when switching on position control. For this reason, the distance programmed after the
zero position is accepted as the REPOS position (REPOSA in the ASUB).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 481
Auxiliary Function Outputs to PLC (H2)
Block-search response

Boundary conditions
Collected S values
The meaning of an S value in the part program depends on the feed type that is currently
active:

G93, G94, G95, G97, G971: The S value is interpreted as the speed
G96, G961: The S value is interpreted as a constant cutting rate
If the feed operation is changed (e.g. for a tool change) before output of the system variable
$P_SEARCH_S, the original setting from the target block in the part program must be
restored to avoid use of the wrong type of feed.
Collected direction of rotation
For output of the direction of rotation, the system variable $P_SEARCH_SDIR is assigned
default value "-5" at the start of the block search. This value has no effect on output.
This ensures that the last spindle operating mode is retained for a block search across
program section in which spindles are not programmed with a direction of rotation,
positioning or axis mode.
The programming of M19, SPOS, and SPOSA is collected as "M-19" (internal M19) in the
system variables $P_SEARCH_SDIR as an alternative to M3, M4, M5, and M70.
For the output of "M-19", the positioning data is read internally from the system variables
$P_SEARCH_SPOS and $P_SEARCH_SPOSMODE. Both system variables can also be
written to, in order, for example, to make corrections.

Note
Because of the assignments described above (e.g. M[<n>] = $P_SEARCH_SDIR[<n>]), the
values "–5" and "–19" generally remain hidden from the user and only have to be observed in
the case of special evaluation of the system variables in the ASUB.

8.13.6 Auxiliary function output with a type 5 block search (SERUPRO)

Output behavior
In the case of type 5 block searches (SERUPRO), an auxiliary function can be output to the
PLC during the block search and/or collected on a group-specific basis in the following
system variables:
● $AC_AUXFU_PREDEF_INDEX[<n>] (index of a predefined auxiliary function)
● $AC_AUXFU_TYPE[<n>] (type of auxiliary function)
● $AC_AUXFU_STATE[<n>] (output state of the auxiliary function)
● $AC_AUXFU_EXT[<n>] (address extension of the auxiliary function)
● $AC_AUXFU_VALUE[<n>] (value of the auxiliary function)
For a description of the system variables, see "Querying system variables (Page 496)".

Basic Functions
482 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

Output control
Whether an auxiliary function is output to the PLC during a type 5 block search (SERUPRO)
and/or collected on a group-specific basis in the following system variables can be
configured via bits 9 and 10 of the machine data:
● MD22080 $MC_AUXFU_PREDEF_SPEC[<n>]
(output behavior of predefined auxiliary functions)
where <n> = system function index (0 ... 32)
● MD22035 $MC_AUXFU_ASSIGN_SPEC[<n>]
(output behavior of user-defined auxiliary functions)
where <n> = auxiliary function index (0 ... 254)
● MD11110 $MN_AUXFU_GROUP_SPEC[<n>]
(output behavior of the auxiliary functions in a group)
where <n> = group index (0 ... 63)

Bit Value Meaning


9 0 No collection during type 5 block searches (SERUPRO)
1 Collection during type 5 block searches (SERUPRO)
10 0 Output during type 5 block searches (SERUPRO)
1 No output during type 5 block searches (SERUPRO)

Output counter
The user can output the collected auxiliary functions to the PLC on a channel-by-channel
basis in the block search ASUB. For the purposes of serialized output via multiple channels,
the three output counters are changed across all the channels each time an auxiliary
function is output:

$AC_AUXFU_TICK[<n>,<m>] (output counter for the active auxiliary function)

<n>: Group index (0 to 63)


<m>: Output counter (0 ... 2)
0: Output sequence counter (All outputs within an IPO cycle)
1: Package counter within an output sequence in the IPO cycle
2: Auxiliary function counter within a package
Explanation:
An auxiliary function package comprises a maximum of 10 auxiliary functions.
Two packages can be processed per IPO cycle in each channel during SERUPRO because
synchronized actions are processed in this cycle.
An output sequence of up to a maximum of 20 packages (2 packages per channel * 10
channels) can be processed within an IPO cycle across all channels.
This encoding defines how many auxiliary function packages and, within these, how many
auxiliary functions have been processed during the same IPO cycle: Auxiliary functions

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 483
Auxiliary Function Outputs to PLC (H2)
Block-search response

which have been collected in one IPO cycle all have the same sequence counter. Auxiliary
functions which have been collected in one package (block or synchronized action) all have
the same package counter. The total on the auxiliary function counter increases every time
an auxiliary function is collected.

Global list of auxiliary functions


At the end of SERUPRO, the auxiliary functions collected on a group-specific basis in the
individual channels are entered in a cross-channel (global) list with the channel number
($AN_AUXFU_LIST_CHANNO[<n>]) and group index
($AN_AUXFU_LIST_GROUPINDEX[<n>]) according to their counter state
($AC_AUXFU_TICK[<n>,<m>]).

&KDQQHOb &KDQQHOb &KDQQHOb


Q  0$;180B*52836 Q  0$;180B*52836 Q  0$;180B*52836

Q  Q  Q 

Q  Q   Q 
$&B$8;)8B35('()B,1'(;>Q@ $&B$8;)8B35('()B,1'(;>Q@ $&B$8;)8B35('()B,1'(;>Q@
$&B$8;)8B7<3(>Q@ $&B$8;)8B7<3(>Q@ $&B$8;)8B7<3(>Q@
$&B$8;)8B(;7>Q@ $&B$8;)8B(;7>Q@ $&B$8;)8B(;7>Q@
$&B$8;)8B9$/8(>Q@ $&B$8;)8B9$/8(>Q@ $&B$8;)8B9$/8(>Q@
$&B$8;)8B67$7(>Q@ $&B$8;)8B67$7(>Q@ $&B$8;)8B67$7(>Q@
$&B$8;)8B63(&>Q@ $&B$8;)8B63(&>Q@ $&B$8;)8B63(&>Q@
$&B$8;)8B7,&.>Q@ $&B$8;)8B7,&.>Q@ $&B$8;)8B7,&.>Q@

*OREDOOLVWRIDX[LOLDU\IXQFWLRQV

Q 0$;180B*52836 0$;180B&+$11(/6  Q $1B$8;)8B/,67B*5283,1'(;>Q@ $1B$8;)8B/,67B&+$112>Q@


  
  
  
  
  
  
  
  
  
  
  
  
$1B$8;)8B/,67B(1',1'(;
  
 
 
  

The two field variables $AN_AUXFU_LIST_CHANNO[<n>] and


$AN_AUXFU_LIST_GROUPINDEX[<n>] from the global list are writable and readable.
The index <n> has the following range of values: 0 ... MAXNUM_GROUPS *
MAXNUM_CHANNELS - 1
The global list is structured on the basis of the sequence in which the search target was
found. It is intended to be used as a system proposal for auxiliary functions to be output in
the following ASUB at the end of SERUPRO. If an auxiliary function is not to be output, the
corresponding group index is to be set to "0".

Basic Functions
484 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

Behavior regarding spindle auxiliary functions


Following the start of the search, all the channels collect the auxiliary functions in the
channel variables on a group-specific basis. In order to perform a far-reaching restoration of
the spindle state in the SERUPRO target block using the collected auxiliary functions, the
last active auxiliary function in any group of spindle auxiliary functions must characterize the
state of the spindle in the target block. In the case of transitions in spindle states, obsolete
auxiliary functions are deleted or, if necessary, implicit auxiliary functions are entered.
All the spindle auxiliary functions from the global auxiliary function list must correspond to the
spindle states achieved in the target block to enable the auxiliary functions to be processed
when the list is output and to ensure that no alarms or unintended spindle states are
requested which could prevent the continuation of the part program.
This affects the groups of auxiliary functions for any spindle configured in the system,
whereby the spindle number corresponds to an auxiliary function's address extension.

Group a: M3, M4, M5, M19, M70


Group b: M40, M41, M42, M43, M44, M45
Group c: S
Deleting obsolete auxiliary functions
In the functions below, the auxiliary functions from group a are deleted for the spindle
concerned:
● For the following spindle when a generic coupling, such as COUPON, TRAILON, EGON,
etc. is switched on
Generating implicit auxiliary functions from group a
In the functions below, the auxiliary functions from group a are generated implicitly for the
spindle concerned:
● For the following spindle when the synchronous spindle coupling is switched off
– COUPOF generates M3, M4 and S or M5 in the main run depending on the coupling
situation.
– COUPOF(S<n>, S<m>, POS) and COUPOFS(S<n>, S<m>, POS, POS) generate M3,
M4 and S.
– COUPOFS generates M5 in the main run.
– COUPOFS(S<n>, S<m>, POS) generates M19 in the main run.
The implicit M19 ("SPOS[<address extension>] = IC(0)" in the ASUB) activates the
positioning mode without a traversing motion.
● M70 is generated during a traversing motion as an axis or during the transition to axis
mode by selecting a transformation during which the spindle enters as an axis.
● M5 is generated during SPCOF.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 485
Auxiliary Function Outputs to PLC (H2)
Block-search response

Note
Within the context of the "axis interchange" and "axis container rotation" functions, the
auxiliary functions for programming the spindle must always be specified in a way which
ensures compatibility with the actual (motor) state during interchange/rotation. A distinction is
made here between the axis interchange and axis container mechanisms.
Example of axis container rotation:
An axis container has four spindles, each assigned to a separate channel (1 - 4). M3 S1000
is always programmed in channel 1, and an axis container rotation is then executed. The
other channels do not perform any spindle programming. Following the third axis container
rotation and the fourth spindle programming, M3, all four spindles rotate clockwise at a
speed of 1,000 rpm. If the end of the SERUPRO now lies within this range, every ASUB for a
channel is expected to contain an M3 S1000 for the local spindle.
During interchange however, the collected auxiliary functions may only be assigned to the
channel where the spindle is currently located.

Cross-channel auxiliary function


An auxiliary function can also be collected on a cross-channel basis in the global auxiliary
function list in the case of type 5 block searches 5 (SERUPRO). Only the last auxiliary
function collected from this group (highest counter state) is entered in the global list.
Configuration takes place via bit 11 in the machine data:
● MD22080 $MC_AUXFU_PREDEF_SPEC[<n>]
(output behavior of predefined auxiliary functions)
where <n> = system function index (0 ... 32)
● MD22035 $MC_AUXFU_ASSIGN_SPEC[<n>]
(output behavior of user-defined auxiliary functions)
where <n> = auxiliary function index (0 ... 254)
● MD11110 $MN_AUXFU_GROUP_SPEC[<n>]
(output behavior of the auxiliary functions in a group)
where <n> = group index (0 ... 63)

Bit Value Meaning


11 0 Channel-specific collection
1 Cross-channel collection
The spindle auxiliary functions are filtered out beforehand at the end of the search
depending on the spindle state. The channel data is updated accordingly. The global
auxiliary function list can be processed in sequence in the ASUBs at the end of the
SERUPRO, and the sorted auxiliary functions can be output with channel synchronization.

Basic Functions
486 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

Querying the last auxiliary function collected


The index of the last auxiliary function collected in the global list can be queried using the
system variable $AN_AUXFU_LIST_ENDINDEX.

8.13.7 ASUB at the end of the SERUPRO

Function
The collected auxiliary functions should be output in the ASUBs at the end of the SERUPRO,
serialized on a channel-by-channel basis. The user is provided with predefined subroutine
calls for this purpose.

Predefined subroutine call AUXFUSYNC


Function:
The function implicitly triggers a preprocessing stop. The global list can be read out on a
channel-specific basis in a loop with this procedure.
For the purposes of the cross-channel serialization of the output, a WAITM string is supplied
at a suitable time by the procedure.
Syntax:
PROC AUXFUSYNC(VAR INT <NUM>,VAR INT <Group index>[10],VAR
STRING[400] <ASSEMBLED>)
Parameters:

<NUM>: The number of auxiliary functions per block is supplied via the call-
by-reference parameter <NUM>.
If the number is -1, no further strings are supplied. If the number is 0,
a valid string has been supplied containing no auxiliary functions; it
contains the likes of WAITM, G4 F0.001, etc. instead.
<GROUP INDEX>: The group indices for all the auxiliary functions which can be output
in one block are supplied via the field parameter <GROUP INDEX>.
Up to ten auxiliary functions can be output simultaneously per block.
<ASSEMBLED>: The auxiliary function block to be output can be returned in the
STRING parameter <ASSEMBLED>. The actual parameter must be a
STRING-type parameter (max. length: 400).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 487
Auxiliary Function Outputs to PLC (H2)
Block-search response

Further information:
If an auxiliary function has been collected via a synchronized action, two strings are supplied
in order containing an action which is synchronized by blocks and a block that can be
executed, such as
WHEN TRUE DO M100 M102
G4 F0.001
If an implicit M19, activated by SPOS, is collected, the function returns the string
"SPOS[<spindle number>] = IC(0)". The purpose of this instruction is to bring the spindle into
the positioning mode. The position which is programmed in the part program is approached
by means of REPOS.
If the implicit M19 is activated by means of a synchronized action, the string "WHEN TRUE
DO SPOS[<spindle number>] = IC(0)" is supplied.

Predefined subroutine call AUXFUDEL


Function:
This predefined subroutine call is used to delete an auxiliary function from the global list. The
procedure implicitly triggers a preprocessing stop and sets the value for all the group indices
for the specified auxiliary function of the calling channel to 0. Thus, the auxiliary function is
not output via AUXFUSYNC(...).
Syntax:
PROC AUXFUDEL(CHAR <TYPE>,INT <EXT>,REAL <VALUE>,INT <GROUP>)
Parameters:

<TYPE>: Type of auxiliary function to be deleted


<EXT>: Address extension of the auxiliary function to be deleted
<VALUE>: Value of auxiliary function to be deleted
<GROUP>: Group index of the auxiliary function to be deleted

Predefined subroutine call AUXFUDELG


Function:
This predefined subroutine call is used to delete an auxiliary function group from the global
list. The procedure implicitly triggers a preprocessing stop and sets the value for the group
indices for all the collected auxiliary functions of this group within the calling channel to 0.
Thus, the auxiliary function for this group is not output via AUXFUSYNC(...).
Syntax:
PROC AUXFUDELG(INT <GROUP>)
Parameters:

<GROUP>: Group index of the auxiliary function group to be deleted

Basic Functions
488 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

Examples
The following examples serve as a template for an ASUB at the end of the SERUPRO:
Example 1:

Program code Comment


N10 DEF STRING[400] ASSEMBLED=""
N20 DEF STRING[31] FILENAME="/_N_CST_DIR/_N_AUXFU_SPF"
N30 DEF INT GROUPINDEX[10]
N40 DEF INT NUM
N50 DEF INT RUN
N10 DEF INT ERROR
N70 DEF BOOL ISQUICK
N80
N90
N140 AUXFUDEL("M",1,100,1) ; Filtering the global list, M1=100
is not output.
150
N170 AUXFUDELG(6) ; Delete the auxiliary function from
group 6.
N180
N190 IF ISFILE(FILENAME)
N210 DELETE(ERROR,FILENAME) ; File already exists and must be
deleted.
N220 IF (ERROR<>0)
N230 SETAL(61000+ERROR)
N240 ENDIF
N250 ENDIF
N260
N270 LOOP
N300 AUXFUSYNC(NUM,GROUPINDEX,ASSEMBLED) ; Procedure for generating auxiliary
function blocks from the global
auxiliary function list.
N310
N320 IF (NUM==-1) ; All of the channel's auxiliary
functions are processed.
N340 GOTOF LABEL1
N350 ENDIF
N360
N380 WRITE(ERROR,FILENAME,ASSEMBLED) ; Write an auxiliary function block
to a file.
N390 IF (ERROR<>0)
N400 SETAL(61000+ERROR)
N410 ENDIF
N420
N430 ENDLOOP
N440

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 489
Auxiliary Function Outputs to PLC (H2)
Block-search response

Program code Comment


N450 LABEL1:
N460
N480 CALL FILENAME ; Process a generated subroutine.
N490
N510 DELETE(ERROR,FILENAME) ; Delete the file again after
execution.
N520 IF (ERROR<>0)
N530 SETAL(61000+ERROR)
N540 ENDIF
N550
N560 M17

Example 2 (in case the user wishes to set up the output string himself):

Program code Comment


N610 DEF STRING[400] ASSEMBLED=""
N620 DEF STRING[31] FILENAME="/_N_CST_DIR/_N_AUXFU_SPF"
N630 DEF INT GROUPINDEX[10]
N640 DEF INT NUM
N650 DEF INT LAUF
N660 DEF INT ERROR
N670 DEF BOOL ISQUICK
N680 DEF BOOL ISSYNACT
N690 DEF BOOL ISIMPL
...
N760 AUXFUDEL("M",1,100,1) ; Filtering the global list,
M1=100 is not output.
770
N790 AUXFUDELG(6) ; Delete the auxiliary function
from group 6.
N800
N810 IF ISFILE(FILENAME)
N830 DELETE(ERROR,FILENAME) ; File already exists and must
be deleted.
N840 IF (ERROR<>0)
N850 SETAL(61000+ERROR)
N860 ENDIF
N870 ENDIF
N880
N890 LOOP
N920 AUXFUSYNC(NUM,GROUPINDEX,ASSEMBLED) ; Procedure for generating
auxiliary function blocks from
the global auxiliary function
list.
N930

Basic Functions
490 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Block-search response

Program code Comment


N940 IF (NUM==-1) ; All of the channel's auxiliary
functions are processed.
N960 GOTOF LABEL1
N970 ENDIF
N980
N1000 IF (NUM>0) ; The block is generated if
there are auxiliary functions
to output.
N1010
N1020 ASSEMBLED=""
N1030
N1050 FOR LAUF=0 TO NUM-1 ; Collected auxiliary functions
for a block
N1060
N1080 IF GROUPINDEX[LAUF]<>0 ; Auxiliary functions deleted
from the global list have the
group index 0.
N1090
N1100 ISQUICK=$AC_AUXFU_SPEC[GROUPINDEX[LAUF]] BAND'H2'
N1110
N1120 ISSYNACT=$AC_AUXFU_SPEC[GROUPINDEX[LAUF]] BAND'H1000'
N1130
N1140 ISIMPL=$AC_AUXFU_SPEC[GROUPINDEX[LAUF]] BAND'H2000'
N1150
N1180 IF ISSYNACT ; Assemble a block for the M
auxiliary function output.
N1190 ASSEMBLED= ASSEMBLED << "WHEN TRUE DO "
N1200 ENDIF
N1210
N1230 IF (ISIMPL AND ($AC_AUXFU_VALUE[GROUPINDEX[LAUF]==19)) ; Implicitly generated M19 is
mapped to SPOS[SPI(<spindle
no.>)] = IC(0).
N1240 ASSEMBLED= ASSEMBLED << "SPOS[SPI(" << $AC_AUXFU_EXT[GROUPINDEX[LAUF]] << ")=IC(0)"
N1260 ELSE
N1270 ASSEMBLED= ASSEMBLED << "M[" << $AC_AUXFU_EXT[GROUPINDEX[LAUF]] << "]="
N1280
N1290 IF ISQUICK
N1300 ASSEMBLED= ASSEMBLED << "QU("
N1310 ENDIF
N1320
N1330 ASSEMBLED= ASSEMBLED << $AC_AUXFU_VALUE[GROUPINDEX[LAUF]]
N1340
N1350 IF ISQUICK
N1360 ASSEMBLED= ASSEMBLED << ")"
N1370 ENDIF

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 491
Auxiliary Function Outputs to PLC (H2)
Block-search response

Program code Comment


N1380 ENDIF
N1390
N1400 ENDIF
N1410
N1420 ENDFOR
N1430
N1450 WRITE(ERROR,FILENAME,ASSEMBLED) ; Write an auxiliary function
block to a file.
N1460
N1470 IF ISSYNACT
N1480 ASSEMBLED="G4 F0.001"
N1490 WRITE(ERROR,FILENAME,ASSEMBLED)
N1500 ENDIF
N1510
N1520 ELSE
N1540 WRITE(ERROR,FILENAME,ASSEMBLED) ; Write an auxiliary function
block to a file.
N1550 ENDIF
N1560
N1570 ENDLOOP
N1580
N1590 LABEL1:
N1600
N1620 CALL FILENAME ; Process a generated
subroutine.
N1630
N1650 DELETE(ERROR,FILENAME) ; Delete the file again after
execution.
N1660 IF (ERROR<>0)
N1670 SETAL(61000+ERROR)
N1680 ENDIF
N1690
N1070 M17

Basic Functions
492 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Implicitly output auxiliary functions

8.14 Implicitly output auxiliary functions

Function
Implicitly output auxiliary functions are auxiliary functions which have not been programmed
explicitly and which are also output by other system functions (e.g. transformation selection,
tool selection, etc.). These implicit auxiliary functions do not lead to any system function;
instead, the M codes are collected according to output behavior parameters assigned to
them and/or are output to the PLC.

Parameterization
The M codes for auxiliary functions to be output implicitly are defined with the machine data:
● MD22530 $MC_TOCARR_CHANGE_M_CODE (M code with a toolholder change)
This machine data value indicates the number of the M code which is output when a
toolholder is activated at the NC/PLC interface.
If the value is positive, the unchanged M code is always output.
If the value is negative, the number of the toolholder is added to the machine data value,
and this number is output.
● MD22532 $MC_GEOAX_CHANGE_M_CODE (M code when switching the geometry
axes)
Number of the M code which is output when the geometry axes on the NC/PLC interface
are switched.
● MD22534 $MC_TRAFO_CHANGE_M_CODE (M code in the case of transformation
changes)
Number of the M code which is output during a transformation switch of the geometry
axes at the NC/PLC interface.

Note
No M code is output if the number of the M code being output or the
MD22530/MD22532/MD22534 value is between 0 and 6, or is either 17 or 30. Whether or
not an M code which is generated in this manner leads to conflicts with other functions is
not monitored.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 493
Auxiliary Function Outputs to PLC (H2)
Implicitly output auxiliary functions

Output behavior
In the case of implicitly output auxiliary functions, bit 13 is set in machine data MD22080 or
MD22035 (output behavior of predefined or user-defined auxiliary functions).
This bit can be queried via the system variable $AC_AUXFU_SPEC[<n>].

Implicitly output auxiliary function M19


To achieve uniformity in terms of how M19 and SPOS or SPOSA behave at the NC/PLC
interface, auxiliary function M19 can be output to the NC/PLC interface for SPOS and
SPOSA (see spindles (S1), "positioning mode" < "General functionality (Page 1216)").
The implicitly output auxiliary function M19 is collected during the block search.

Basic Functions
494 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Information options

8.15 Information options


Information about auxiliary functions (e.g. about the output status) is possible via:
● The group-specific modal M auxiliary function display on the user interface
● Querying system variables in part programs and synchronized actions

8.15.1 Group-specific modal M auxiliary function display

Function
The output status and acknowledgement status of M auxiliary functions can be displayed on
the user interface on a group-specific basis.

Requirements
To implement function-oriented acknowledgement and display of M auxiliary functions,
the auxiliary functions must be managed in the PLC and, thus, in the user program itself.
Therefore, it is up to the PLC programmer to program the acknowledgement of these
auxiliary functions. He has to know which auxiliary functions in which group have to be
acknowledged.

Standard
M auxiliary functions that are not managed by means of the PLC are identified by the NC as
"transferred" and output to the PLC. There is no functional acknowledgement for these
auxiliary functions. All M-auxiliary functions collected after a block search are also displayed
so that the operator knows which auxiliary functions will be output after a start following a
block search.

PLC activities
In the case of auxiliary function groups that are managed by the PLC itself, the PLC user
program must acknowledge all auxiliary functions of this groups when Apply and Function
End are activated. The PLC programmer must know all the auxiliary functions of these
groups.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 495
Auxiliary Function Outputs to PLC (H2)
Information options

Miscellaneous
Only the group-specific M auxiliary functions are displayed. The block-by-block display is
also retained. Up to 15 groups can be displayed, whereby only the last M function of a group
that was either collected or output to the PLC is displayed for each group. The M functions
are presented in various display modes depending on their status:

Status Display mode


Auxiliary function is collected Inverted with yellow font
Auxiliary function is output from NCK to PLC Inverted
Auxiliary function has been transferred from NCK to PLC Black font on gray background
and transport acknowledgement has taken place
Auxiliary function is managed by the PLC and has been Black font on gray background
directly applied by the PLC.
Auxiliary function is managed by the PLC, and the function Black font on gray background
acknowledgement has taken place.

Display update
The display is organized in such a way that the collected auxiliary functions are always
displayed first, before those that were managed by the PLC and before those that were
managed by the NC. A collected auxiliary function is marked as collected until it has been
output from the NCK to the PLC. PLC-managed auxiliary functions are retained until they are
displaced by another auxiliary function. In the case of a reset, only the collected auxiliary
functions and the NC-managed auxiliary functions are deleted.

8.15.2 Querying system variables

Function
Auxiliary functions can be queried on a group-specific basis via system variables in the part
program and via synchronized actions:
$AC_AUXFU_... [<n>] = <value>

System variables Meaning


$AC_AUXFU_PREDEF_INDEX[<n>] <value>: Index of the last auxiliary function collected for an
auxiliary function group (search) or the last
predefined auxiliary function to be output
Type: INT
If no auxiliary function has been output yet for the
specified group or if the auxiliary function is a
user-defined auxiliary function, the variable
supplies the value "-1".
<n>: Group index (0 to 63)
Note:
A predefined auxiliary function can be uniquely identified via
this variable.

Basic Functions
496 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Information options

System variables Meaning


$AC_AUXFU_TYPE[<n>] <value>: Type of the last auxiliary function collected for an
auxiliary function group (search) or the last
auxiliary function to be output
Type: CHAR
<n>: Group index (0 to 63)
$AC_AUXFU_EXT[<n>] <value>: Address extension of the last auxiliary function
or M function specific: collected for an auxiliary function group (search)
or the last auxiliary function to be output
$AC_AUXFU_M_EXT[<n>]
Type: INT
<n>: Group index (0 to 63)
$AC_AUXFU_VALUE[<n>] <value>: Value of the last auxiliary function collected for an
or M function specific: auxiliary function group (search) or the last
auxiliary function to be output
$AC_AUXFU_M_VALUE[<n>]
Type: REAL
<n>: Group index (0 to 63)
$AC_AUXFU_SPEC[<n>] Value: Bit-encoded output behavior according to
MD22080/MD22035 (or QU programming) of the
last auxiliary function collected for an auxiliary
function group (search) or the last auxiliary
function to be output
Type: INT
<n>: Group index (0 to 63)
Note:
This variable can be used to determine whether the auxiliary
function should be output with a fast acknowledgement.
$AC_AUXFU_STATE[<n>] <value>: Output state of the last auxiliary function collected
or M function specific: for an auxiliary function group (search) or the last
auxiliary function to be output
$AC_AUXFU_M_STATE[<n>]
Type: INT
Value range: 0 ... 5
0: No auxiliary function
1: M-auxiliary function was collected via a
search
2: M-auxiliary function has been output to the
PLC
3: M-auxiliary function has been output to the
PLC and the transport acknowledgement has
taken place
4: M-auxiliary function is managed by the PLC
and has been applied by the PLC
5: M-auxiliary function is managed by the PLC,
and the function acknowledgement has taken
place
<n>: Group index (0 to 63)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 497
Auxiliary Function Outputs to PLC (H2)
Information options

Example
All M-auxiliary functions of the 1st group will be stored in the order they are output
id=1 every $AC_AUXFU_M_STATE[0]==2 do
$AC_FIFO[0,0]=$AC_AUXFU_M_VALUE[0]

References
For more information on the system variables, refer to:
Parameter Manual, System variables

Basic Functions
498 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Supplementary conditions

8.16 Supplementary conditions

8.16.1 General constraints

Spindle replacement
Because the auxiliary functions are parameterized channel-specifically, if function: "spindle
replacement" is used, the spindle-specific auxiliary function must be parameterized
immediately in all channels that use the spindles.

Tool management
If tool management is active, the following constraints apply:
● T and M<k> functions are not output to the PLC.
Note
k is the parameterized value of the auxiliary function for the tool change (default: 6):
MD22560 $MC_TOOL_CHANGE_M_CODE (auxiliary function for tool change)
● If no address extension is programmed, the auxiliary function refers to the master spindle
or the master tool holder of the channel.
Definition of the master spindle:
– MD20090 $MC_SPIND_DEF_MASTER_SPIND
– Part program instruction: SETMS
Definition of the master tool holder
– MD20124 $MC_TOOL_MANAGEMENT_TOOLHOLDER
– Part program instruction: SETMTH

Maximum number of auxiliary functions per part program block


A maximum of 10 auxiliary functions may be programmed in one part program block.

DL (additive tool offset)


The following restrictions apply to the DL function:
● Only one DL function can be programmed per part program block.
● If DL functions are used in synchronous actions, parameter: "Value" is not output to the
PLC.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 499
Auxiliary Function Outputs to PLC (H2)
Supplementary conditions

8.16.2 Output behavior

Thread cutting
During active thread cutting G33, G34 and G35, the following output behavior:
● Output duration one OB40 cycle (quick acknowledgment)
● Output during motion
is always active for the spindle-specific auxiliary functions:
● M3 (spindle right)
● M4 (spindle left)
The spindle-specific auxiliary function M5 (spindle stop) is always output at the end of the
block. The part program block that contains M5 is always ended with exact stop, i.e. even
during active continuous path mode.

Synchronized actions
With output auxiliary functions from synchronized actions, the parameterized output behavior
is ignored except for the following parameters:
● Bit0: Output duration one OB1 cycle (normal acknowledgment)
● Bit1: Output duration one OB40 cycle (quick acknowledgment)

Auxiliary functions: M17 or M2/M30 (end of subroutine)


In its own part program block
If one of the auxiliary functions M17, M2 or M30 is programmed as the only auxiliary function
in a part program block and an axis is still in motion, the auxiliary function is not output to the
PLC until after the axis has stopped.
Overriding the parameterized output behavior
The parameterized output behavior of the auxiliary functions M17 or M2/M30 is overridden by
the output behavior that is determined in the following machine data:
MD20800 $MC_SPF_END_TO_VDI, Bit 0 (subprogram end/stop to PLC)

Bit Value Description


0 0 The auxiliary functions M17 or M2/M30 (subprogram end) are not output to the PLC.
Continuous-path mode is not interrupted at the end of the subroutine
1 The auxiliary functions M17 or M2/M30 (subprogram end) are output to the PLC.

Basic Functions
500 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Supplementary conditions

Auxiliary function: M1 (conditional stop)


Overlapping of the parameterized output behavior
The parameterized output behavior of the auxiliary function M1 is overridden by the output
behavior defined in the following machine data:
MD20800 $MC_SPF_END_TO_VDI, Bit 1 (subprogram end/stop to PLC)

Bit Value Description


1 0 The auxiliary function M01 (conditional stop) is always output to the PLC. A quick
acknowledgement is ineffective, because M01 is permanently assigned to the first
auxiliary function group and is therefore always output at the end of the block.
1 The auxiliary function M01 (conditional stop) is only output to the PLC, if the function:
"Programmed stop" is activated via the HMI user interface.
In the case of a quick acknowledgement, the M1 is output to the PLC during the motion.
While the function is not active, this does not interrupt continuous-path mode.

Part program blocks without traverse movement


In a part program block without a traverse movement, all auxiliary functions are output in a
block immediately, irrespective of their parameterized output behavior.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 501
Auxiliary Function Outputs to PLC (H2)
Examples

8.17 Examples

8.17.1 Extension of predefined auxiliary functions

Task
Parameter assignment of auxiliary functions M3, M4, and M5 for the second spindle of the
channel

Parameter assignment: M3
Requirements:
● Machine data index: 0 (first user-defined auxiliary function)
● Auxiliary function group: 5
● Type and value: M3 (spindle right)
● Address extension: 2 as appropriate for the 2nd spindle of the channel
● Output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Output prior to motion
Parameter assignment:

MD22000 $MC_AUXFU_ASSIGN_GROUP[ 0 ] =5
MD22010 $MC_AUXFU_ASSIGN_TYPE [ 0 ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [ 0 ] = 2
MD22030 $MC_AUXFU_ASSIGN_VALUE [ 0 ] =3
MD22035 $MC_AUXFU_ASSIGN_SPEC [ 0 ] = 'H21'

Parameter assignment: M4
Requirements:
● Machine data index: 1 (second user-defined auxiliary function)
● Auxiliary function group: 5
● Type and value: M4 (spindle left)
● Address extension: 2 as appropriate for the 2nd spindle of the channel
● Output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Spindle response following acknowledgment
– Output during motion

Basic Functions
502 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Examples

Parameter assignment:

MD22000 $MC_AUXFU_ASSIGN_GROUP [ 1 ] =5
MD22010 $MC_AUXFU_ASSIGN_TYPE [ 1 ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [ 1 ] = 2
MD22030 $MC_AUXFU_ASSIGN_VALUE [ 1 ] =4
MD22035 $MC_AUXFU_ASSIGN_SPEC [ 1 ] = 'H51'

Parameter assignment: M5
Requirements:
● Machine data index: 2 (third user-defined auxiliary function)
● Auxiliary function group: 5
● Type and value: M5 (spindle stop)
● Address extension: 2 as appropriate for the 2nd spindle of the channel
● Output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Spindle response following acknowledgment
– Output at block end
Parameter assignment:

MD22000 $MC_AUXFU_ASSIGN_GROUP [ 2 ] =5
MD22010 $MC_AUXFU_ASSIGN_TYPE [ 2 ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [ 2 ] = 2
MD22030 $MC_AUXFU_ASSIGN_VALUE [ 2 ] =5
MD22035 $MC_AUXFU_ASSIGN_SPEC [ 2 ] = 'H91'

8.17.2 Defining auxiliary functions

Task
Parameter assignment of the auxiliary function-specific machine data for a machine with the
following configuration:
Spindles
● Spindle 1: Master spindle
● Spindle 2: Second spindle
Gear stages
● Spindle 1: 5 gear stages
● Spindle 2: No gear stages

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 503
Auxiliary Function Outputs to PLC (H2)
Examples

Switching functions for cooling water on/off


● Spindle 1
– "ON" = M50
– "OFF" = M51
● Spindle 2
– "ON" = M52
– "OFF" = M53

Requirements
Spindle 1 (master spindle)

Note
Default assignments
• The auxiliary functions M3, M4, M5, M70 and M1=3, M1=4, M1=5, M1=70 of spindle 1
(master spindle) are assigned as standard to the second auxiliary function group.
• All S and S1 values of spindle 1 (master spindle) are assigned to the third auxiliary
function group by default.

● The gear stage last programmed is to be output after block search. The following auxiliary
functions are assigned to the ninth auxiliary function group for this reason:
– M40, M41, M42, M43, M44, M45
– M1=40, M1=41, M1=42, M1=43, M1=44, M1=45
● The auxiliary functions M3, M4, M5, M70 and M1=3, M1=4, M1=5, M1=70
(second auxiliary function group) and S and S1 values (third auxiliary function group)
should possess the following output behavior:
– Output duration one OB40 cycle (quick acknowledgment)
– Output prior to motion
● The auxiliary functions for gear changeover M40 to M45 and M1=40 to M1=45
(ninth auxiliary function group) should have the following output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Output prior to motion

Basic Functions
504 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Examples

Spindle 2
● Only one M function for directional reversal may be programmed in one block. The
direction of rotation last programmed is to be output after block search. The following
auxiliary functions are assigned to the tenth auxiliary function group for this reason:
– M2=3, M2=4, M2=5, M2=70
● All S2 values are assigned to auxiliary function group 11.
● The auxiliary functions M2=3, M2=4, M2=5, M2=70 (tenth auxiliary function group) and
S2 values (auxiliary function group 11) should have the following output behavior:
– Output duration one OB40 cycle (quick acknowledgment)
– Output prior to motion
Cooling water
● It is not permissible to switch the cooling water on and off in one part program block. After
a block search, the cooling water will be switched on or off. For this purpose, the following
auxiliary functions are assigned, for example, to auxiliary function group 12 or 13:
– Auxiliary function group 12: M50, M51
– Auxiliary function group 13: M52, M53
● The auxiliary functions M50, M51 (auxiliary function group 12) and M52, M53 (auxiliary
function group 13) should have the following output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Output prior to motion

Parameterization of the machine data


The machine data are parameterized by appropriate programming within a part program.

Program code Comment


$MN_AUXFU_MAXNUM_GROUP_ASSIGN=21 ; Number of user-defined auxiliary functions per
channel

$MN_AUXFU_GROUP_SPEC[1]='H22' ; Output behavior of auxiliary function group 2


$MN_AUXFU_GROUP_SPEC[2]='H22' ; Output behavior of auxiliary function group 3
$MN_AUXFU_GROUP_SPEC[8]='H21' ; Output behavior of auxiliary function group 9

$MC_AUXFU_ASSIGN_TYPE[0]="M" ; Description of auxiliary function 1: M40


$MC_AUXFU_ASSIGN_EXTENSION[0]=0
$MC_AUXFU_ASSIGN_VALUE[0]=40
$MC_AUXFU_ASSIGN_GROUP[0]=9
; ... (and analogously for aux. functions 2 to
5)
$MC_AUXFU_ASSIGN_TYPE[5]="M" ; Description of auxiliary function 6: M45
$MC_AUXFU_ASSIGN_EXTENSION[5]=0
$MC_AUXFU_ASSIGN_VALUE[5]=45
$MC_AUXFU_ASSIGN_GROUP[5]=9

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 505
Auxiliary Function Outputs to PLC (H2)
Examples

Program code Comment

$MC_AUXFU_ASSIGN_TYPE[6]="M" ; Description of auxiliary function 7: M1=40


$MC_AUXFU_ASSIGN_EXTENSION[6]=1
$MC_AUXFU_ASSIGN_VALUE[6]=40
$MC_AUXFU_ASSIGN_GROUP[6]=9
; . . . (and analogously for aux. functions 8 to
11)
$MC_AUXFU_ASSIGN_TYPE[11]="M" ; Description of auxiliary function 12: M1=45
$MC_AUXFU_ASSIGN_EXTENSION[11]=1
$MC_AUXFU_ASSIGN_VALUE[11]=45
$MC_AUXFU_ASSIGN_GROUP[11]=9

$MN_AUXFU_GROUP_SPEC[9] = 'H22' ; Output behavior of auxiliary function group 10

$MC_AUXFU_ASSIGN_TYPE[12]="M" ; Description of auxiliary function 13: M2=3


$MC_AUXFU_ASSIGN_EXTENSION[12]=2
$MC_AUXFU_ASSIGN_VALUE[12]=3
$MC_AUXFU_ASSIGN_GROUP[12]=10

$MC_AUXFU_ASSIGN_TYPE[13]="M" ; Description of auxiliary function 14: M2=4


$MC_AUXFU_ASSIGN_EXTENSION[13]=2
$MC_AUXFU_ASSIGN_VALUE[13]=4
$MC_AUXFU_ASSIGN_GROUP[13]=10

$MC_AUXFU_ASSIGN_TYPE[14]="M" ; Description of auxiliary function 15: M2=5


$MC_AUXFU_ASSIGN_EXTENSION[14]=2
$MC_AUXFU_ASSIGN_VALUE[14]=5
$MC_AUXFU_ASSIGN_GROUP[14]=10

$MC_AUXFU_ASSIGN_TYPE[15]="M" ; Description of auxiliary function 16: M2=70


$MC_AUXFU_ASSIGN_EXTENSION[15]=2
$MC_AUXFU_ASSIGN_VALUE[15]=70
$MC_AUXFU_ASSIGN_GROUP[15]=10

$MN_AUXFU_GROUP_SPEC[10] = 'H22' ; Specification of auxiliary function group 11

$MC_AUXFU_ASSIGN_TYPE[16] = "S" ; Description of auxiliary function 17: S2=<all


values>
$MC_AUXFU_ASSIGN_EXTENSION[16]=2
$MC_AUXFU_ASSIGN_VALUE[16]=-1
$MC_AUXFU_ASSIGN_GROUP[16]=11

$MN_AUXFU_GROUP_SPEC[11]='H21' ; Specification of auxiliary function group 12

Basic Functions
506 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Examples

Program code Comment


$MC_AUXFU_ASSIGN_TYPE[17]="M" ; Description of auxiliary function 18: M50
$MC_AUXFU_ASSIGN_EXTENSION[17]=0
$MC_AUXFU_ASSIGN_VALUE[17]=50
$MC_AUXFU_ASSIGN_GROUP[17]=12

$MC_AUXFU_ASSIGN_TYPE[18]="M" ; Description of auxiliary function 19: M51


$MC_AUXFU_ASSIGN_EXTENSION[18]=0
$MC_AUXFU_ASSIGN_VALUE[18]=51
$MC_AUXFU_ASSIGN_GROUP[18]=12

$MN_AUXFU_GROUP_SPEC[12]='H21' ; Specification of auxiliary function group 13

$MC_AUXFU_ASSIGN_TYPE[19]="M" ; Description of auxiliary function 20: M52


$MC_AUXFU_ASSIGN_EXTENSION[19]=0
$MC_AUXFU_ASSIGN_VALUE[19]=52
$MC_AUXFU_ASSIGN_GROUP[19]=13

$MC_AUXFU_ASSIGN_TYPE[20]="M" ; Description of auxiliary function 21: M53


$MC_AUXFU_ASSIGN_EXTENSION[20]=0
$MC_AUXFU_ASSIGN_VALUE[20]=53
$MC_AUXFU_ASSIGN_GROUP[20]=13

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 507
Auxiliary Function Outputs to PLC (H2)
Data lists

8.18 Data lists

8.18.1 Machine data

8.18.1.1 NC-specific machine data

Number Identifier: $MN_ Description


10713 M_NO_FCT_STOPRE M function with preprocessing stop
10714 M_NO_FCT_EOP M function for spindle active after NC RESET
10715 M_NO_FCT_CYCLE M function to be replaced by subroutine
11100 AUXFU_MAXNUM_GROUP_ASSIGN Maximum number of user-defined auxiliary functions
per channel
11110 AUXFU_GROUP_SPEC Group-specific output behavior
11450 SEARCH_RUN_MODE Behavior after a block search

8.18.1.2 Channel-specific machine data

Number Identifier: $MC_ Description


20110 RESET_MODE_MASK Definition of control initial setting after part program
start.
20112 START_MODE_MASK Definition of control initial setting after power-up and
on RESET or at end of part program
20270 CUTTING_EDGE_DEFAULT Basic setting of tool cutting edge without programming
20800 SPF_END_TO_VDI Subroutine end/Stop at PLC
22000 AUXFU_ASSIGN_GROUP Group assignment of user-defined auxiliary functions
22010 AUXFU_ASSIGN_TYPE Type of user-defined auxiliary functions
22020 AUXFU_ASSIGN_EXTENSION Address extension for user-defined auxiliary functions
22030 AUXFU_ASSIGN_VALUE Value of user-defined auxiliary functions
22035 AUXFU_ASSIGN_SPEC Output behavior of user-defined auxiliary functions
22040 AUXFU_PREDEF_GROUP Group assignment of predefined auxiliary functions
22050 AUXFU_PREDEF_TYPE Type of predefined auxiliary functions
22060 AUXFU_PREDEF_EXTENSION Address extension for predefined auxiliary functions
22070 AUXFU_PREDEF_VALUE Value of predefined auxiliary functions
22080 AUXFU_PREDEF_SPEC Output behavior of predefined auxiliary functions
22100 AUXFU_QUICK_BLOCKCHANGE Block change delay with quick auxiliary functions
22110 AUXFU_H_TYPE_INT Type of H auxiliary functions

Basic Functions
508 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Data lists

Number Identifier: $MC_ Description


22200 AUXFU_M_SYNC_TYPE M functions output time
22210 AUXFU_S_SYNC_TYPE S functions output time
22220 AUXFU_T_SYNC_TYPE T functions output time
22230 AUXFU_H_SYNC_TYPE H functions output time
22240 AUXFU_F_SYNC_TYPE F functions output time
22250 AUXFU_D_SYNC_TYPE D functions output time
22252 AUXFU_DL_SYNC_TYPE DL functions output time
22254 AUXFU_ASSOC_M0_VALUE Additional M function for program stop
22256 AUXFU_ASSOC_M1_VALUE Additional M function for conditional stop
22530 TOCARR_CHANGE_M_CODE M code for change of tool holder
22532 GEOAX_CHANGE_M_CODE M code for replacement of geometry axes
22534 TRAFO_CHANGE_M_CODE M code for change of tool holder
22560 TOOL_CHANGE_M_CODE Auxiliary function for tool change

8.18.2 Signals

8.18.2.1 Signals to channel

DB number Byte.Bit Description


21, ... 30.5 Activate associated M01

8.18.2.2 Signals from channel

DB number Byte.Bit Description


21, ... 58.0 – 58.4 M function 1 - 5 change
21, ... 59.0 – 59.4 M function 1 - 5 not included in list
21, ... 60.0 - 60.2 S function 1 - 3 change
21, ... 60.4 - 60.6 S function 1 - 3 quick
21, ... 61.0 - 61.2 T function 1 - 3 change
21, ... 61.4 - 61.6 T function 1 - 3 quick
21, ... 62.0 - 62.2 D function 1 - 3 change
21, ... 62.4 - 62.6 D function 1 - 3 quick
21, ... 63.0 E function 1 change
21, ... 63.4 E function 1 quick
21, ... 64.0 - 64.2 H function 1 - 3 change
21, ... 64.4 - 64.6 H function 1 - 3 quick
21, ... 65.0 - 65.5 F function 1 - 6 change
21, ... 66.0 - 66.4 M function 1 - 5 quick

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 509
Auxiliary Function Outputs to PLC (H2)
Data lists

DB number Byte.Bit Description


21, ... 67.0 - 67.5 F function 1 - 6 quick
21, ... 68 - 69 Extended address of M function 1 (binary)
21, ... 70 - 73 M function 1 (integer)
21, ... 74 - 75 Extended address of M function 2 (binary)
21, ... 76 - 79 M function 2 (integer)
21, ... 80 - 81 Extended address of M function 3 (binary)
21, ... 82 - 85 M function 3 (integer)
21, ... 86 - 87 Extended address of M function 4 (binary)
21, ... 88 - 91 M function 4 (integer)
21, ... 92 - 93 Extended address of M function 5 (binary)
21, ... 94 - 97 M function 5 (integer)
21, ... 98 - 99 Extended address of S function 1 (binary)
21, ... 100 - 103 S function 1 (real)
21, ... 104 - 105 Extended address of S function 2 (binary)
21, ... 106 - 109 S function 2 (real)
21, ... 110 - 111 Extended address of S function 3 (binary)
21, ... 112 - 115 S function 3 (real)
21, ... 116 - 117 Extended address of T function 1 (binary)
21, ... 118 - 119 T function 1 (integer)
21, ... 120 - 121 Extended address of T function 2 (binary)
21, ... 122 - 123 T function 2 (integer)
21, ... 124 - 125 Extended address of T function 3 (binary)
21, ... 126 - 127 T function 3 (integer)
21, ... 128 Extended address of D function 1 (binary)
21, ... 129 D function 1 (binary)
21, ... 130 Extended address of D function 2 (binary)
21, ... 131 D function 2 (binary)
21, ... 132 Extended address of D function 3 (binary)
21, ... 133 D function 3 (binary)
21, ... 134 Extended address of DL function (binary)
21, ... 136 DL function (real)
21, ... 140 - 141 Extended address of H function 1 (binary)
21, ... 142 - 145 H function 1 (real format)
21, ... 146 - 147 Extended address of H function 2 (binary)
21, ... 148 - 151 H function 2 (real or double integer)
21, ... 152 - 153 Extended address of H function 3 (binary)
21, ... 154 - 157 H function 3 (real format)
21, ... 158 - 159 Extended address of F function 1 (binary)
21, ... 160 - 163 F function 1 (real format)
21, ... 164 - 165 Extended address of F function 2 (binary)
21, ... 166 - 169 F function 2 (real format)

Basic Functions
510 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Auxiliary Function Outputs to PLC (H2)
Data lists

DB number Byte.Bit Description


21, ... 170 - 171 Extended address of F function 3 (binary)
21, ... 172 - 175 F function 3 (real format)
21, ... 176 - 177 Extended address of F function 4 (binary)
21, ... 178 - 181 F function 4 (real format)
21, ... 182 - 183 Extended address of F function 5 (binary)
21, ... 184 - 187 F function 5 (real format)
21, ... 188 - 189 Extended address of F function 6 (binary)
21, ... 190 - 193 F function 6 (real format)
21, ... 194 Dynamic M function: M00 - M07
21, ... 195 Dynamic M function: M08 - M15
21, ... 196 Dynamic M function: M16 - M23
21, ... 197 Dynamic M function: M24 - M31
21, ... 198 Dynamic M function: M32 - M39
21, ... 199 Dynamic M function: M40 - M47
21, ... 200 Dynamic M function: M48 - M55
21, ... 201 Dynamic M function: M56 - M63
21, ... 202 Dynamic M function: M64 - M71
21, ... 203 Dynamic M function: M72 - M79
21, ... 204 Dynamic M function: M80 - M87
21, ... 205 Dynamic M function: M88 - M95
21, ... 206.0 – 206.3 Dynamic M function: M96 - M99
21, ... 318.5 Associated M00/M01 active

8.18.2.3 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 78 - 81 F function for positioning axis (real)

8.18.2.4 Signals from axis/spindle

DB number Byte.Bit Description


31, ... 86 - 87 M function for spindle (binary)
31, ... 88 - 91 S function for spindle (real)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 511
Auxiliary Function Outputs to PLC (H2)
Data lists

Basic Functions
512 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
9
Mode Group, Channel, Program Operation, Reset
Response (K1)

9.1 Brief description

Channel
An NC channel represents the smallest unit for manual traversing of axes and automatic
processing of part programs. At any one time, a channel will always be in a particular mode,
e.g. AUTOMATIC, MDA, or JOG. A channel can be regarded as an independent NC.

Mode group
A channel always belongs to a mode group. A mode group can also consist of several
channels.
A mode group can be identified by the fact that all channels of the mode group are always in
the same mode at a particular time, e.g. AUTOMATIC, MDA, or JOG. This is ensured
through the NC internal mode logic.
A mode group can be regarded as an independent multi-channel NC.

Channel gaps
When channels are configured, placeholder channels can be provided in order to create as
uniform a configuration as possible over machines in a series. Only the channels that are
actually used are then activated.

Program test
The following options are available for testing or moving in position a new part program.
● Program execution without setpoint outputs
● Program execution in single-block mode
● Program execution with dry run feedrate
● Skip part program blocks
● Block search with or without calculation.

Block search
The block search function enables the following program simulations for locating specific
program points:
● Type 1 without calculation at contour
● Type 2 with calculation at contour

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 513
Mode Group, Channel, Program Operation, Reset Response (K1)
Brief description

● Type 4 with calculation at block end point


● Type 5 automatic start of the selected program point with calculation of all required data
from history
● Automatic start of an ASUB after a block search
● Cascaded block search
● Cross-channel block search in program test mode

Program operation
The execution of part programs or part program blocks in AUTOMATIC or MDA modes is
referred to as program operation. During execution, the program sequence can be controlled
by PLC interface signals and commands.
For each channel, basic settings or channel-specific machine data can be specified. These
initial settings affect, for example, G groups and auxiliary function output.
A part program can be selected only if the relevant channel is in the Reset state.
Furthermore, all further program runs are handled by PLC interface signals and the
corresponding commands.
● Start of part program or part program block
● Part program calculation and program control
● RESET command, program status, and channel status
● Responses to operator and program actions
● Event-driven program calls

Asynchronous subroutines (ASUBs), interrupt routines


Interrupt inputs allow the NC to interrupt the the current part program execution so that it can
react to more urgent events in interrupt routines or ASUBs.

Single block
With the single-block function, the user can execute a part program block-by-block.
There are 3 types of setting for the single-block function:
● SLB1: = IPO single block
● SLB2: = Decode single block
● SLB3: = Stop in cycle

Basic Functions
514 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Brief description

Basic block display


A second basic block display can be used with the existing block display to display all blocks
that produce an action on the machine.
The actually approached end positions are shown as an absolute position. The position
values refer either to the workpiece coordinate system (WCS) or the settable zero system
(SZS).

Program execution from external source


When complex workpieces are machined, the NC may not have enough memory for the
programs. The "Execution from external source" function enables subroutines to be called
(EXTCALL) and executed from an external memory (e.g. from the HMI Advanced hard disk).

Behavior after POWER ON, Reset, ...


The control-system response after:
● Power up (POWER ON)
● Reset/part program end
● Part program start
can be modified for functions, such as G codes, tool length compensation, transformation,
coupled axis groupings, tangential follow-up, programmable synchronous spindle for certain
system settings through machine data.

Subroutine call with M, T and D functions


For certain applications, it may be advantageous to replace M, T or D functions as well as a
few NC language commandsSPOS, SPOSA, by a subroutine call. This can be used, for
example, to call the tool change routine.
Relevant machine data can be used to define and control subroutines having M, T or D
functions. For example, for a gear stage change.

Program runtime/part counter


Information on the program runtime and the part count is provided to assist the machine tool
operator.
The functions defined for this purpose are not identical to the functions of tool management
and are intended primarily for systems without tool management.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 515
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode group (MG)

9.2 Mode group (MG)

Mode group
A mode group combines NC channels with axes and spindles to form a machining unit.
A mode group contains the channels that are required to run simultaneously in the same
mode from the point of view of the machining sequence.
The configuration of a mode group defines which channels are to be included in the group.

Note
This description assumes one mode group and one channel.
Functions that need several channels (e.g. axis replacement), are described in:
References:
/FB2/ Functional Manual Extension functions; BAGs, Channels, Axis replacement (K5)

Assignment: Channel - Mode group


Axes and/or spindles are assigned to one channel.
The channel, in turn, is assigned to a mode group with the following machine data:
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP (channel valid in mode group)
If the same mode group is addressed in several channels, these channels together form a
mode group.

Note
The control system does not recognize mode group-specific data. However, it is possible to
make some channel-specific settings that pertain to the mode group.

Channel-specific assignments
Axes can be assigned to multiple channels that, in turn, are allocated to different mode
groups. The axes can then be interchanged between these channels (axis replacement).
Axis replacement functions independently of the mode group.
Machine axes and spindles are assigned to a channel. They differ as follows:
● Geometry axes can be operated in the path grouping.
Using the master spindle, they can perform functions such as G96, G961, G331, G332,
etc.
● Channel axes that are not defined as geometry axes can be moved as path axes,
synchronous axes, positioning axes, PLC axes, and command axes.
● Special axes have no geometric relationship with one another.

Basic Functions
516 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode group (MG)

● Master spindle geometry axes can perform functions using the master spindle.
● Auxiliary spindles are all other spindles/axes in the channel apart from the master
spindle.
The GEOAX replacement command can be programmed to declare a channel axis as a
geometry axis and define its geometry axis number. It is defined with SETMS, which spindle
in the channel should be the master spindle.
Any axis in the channel can be configured as a spindle. The number of axes per channel
depends on the control version. In order to optimize the performance utilization, the available
channel and axis configurations are limited depending on the hardware.
With SINUMERIK 840D or 840D sl, the following configurations are permissible depending
on the HW/SW version:
● Up to 12 axes/spindles per channel
● Maximum of 31 axes or 20 spindles per NCU
For more information about other axis configurations such as axis containers, link axes,
reciprocating axes, master axes, rotary axes, linear axes, master axes, and slave axes and
the various versions, please refer to:
References:
/FB1/ Function Manual Basic Functions; Axes, Coordinate Systems, Frames (K2)
/FB1/ Function Manual Basic Functions; Spindles (S1)

Mode group-specific interface signals


The exchange of mode group-specific signals to/from the mode group is transferred to DB11
in the user interface. In this way, the mode group can be monitored and controlled from the
PLC or NCK.
The following table represents all the mode group-specific interface signals.

Signals from PLC to NCK


Mode group Reset
Mode group Stop axes plus spindles
Mode group Stop
Mode change
Operating mode: JOG, MDA, AUTOM.
Single block: Type A, Type B
Machine function REF, REPOS, TEACH IN,

Signals from NCK to PLC


Mode strobe: JOG, MDA, AUTOMATIC
Machine function strobe: REF, REPOS, TEACH IN
All channels (1 to 10, max.) in Reset state
Mode group Ready
Active mode: JOG, MDA, AUTOMATIC

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 517
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode group (MG)

Signals from NCK to PLC


Digitizing
Active machine function: REF, REPOS, TEACH IN
var. INC, 10000 INC ......... 1 INC

Change in mode group


A configuration change of a mode group with respect to its assigned channels requires a
subsequent POWER ON.
The change is made using machine data:
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP.
Mode group numbers must be assigned contiguously starting with 1.

Machine data
There are no mode group-specific machine data.

Channel gaps
The channels to which a mode group is assigned with MD10010 are regarded as activated.
Instead of a mode group number, the number "0" can be assigned to channels. The result is
as follows:
● The non-activated channel does not take up memory space in the control.
● Series machines with similar designs can be kept uniform during configuration. Only the
channels that can actually be used by the machine tool are activated (channels with
mode group number greater than 0).
Special case:
Channel 1 must always be available!
⇒ If:
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP [0] = 0
is specified, the control automatically sets
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP [0] = 1 (mode group 1).
Example configurations:
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[0] = 1
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[1] = 2
...
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[3] = 0 ; gap
...
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[8] = 1
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[9] = 2

Basic Functions
518 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode group (MG)

9.2.1 Mode group Stop

Function
The following NC/PLC interface signals are used to stop the traversing motions of the axes
or of the axes and spindles in all mode group channels and to interrupt part program
execution:
DB11 DBX0.5 (mode group Stop)
DB11 DBX0.6 (mode group Stop axes plus spindles)

9.2.2 Mode group RESET

Function
A mode group Reset is requested via a mode group-specific NC/PLC interface signal:
DB11 DBX0.7 = 1 (mode group reset)

Effect
Effect on the channels of mode group:
● Part program preparation (preprocessing) is stopped.
● All axes and spindles are decelerated to zero speed according to their acceleration
curves without contour violation.
● Any auxiliary functions not yet output to the PLC are no longer output.
● The preprocessing pointers are set to the interruption point, and the block pointers are set
to the beginning of the appropriate part programs.
● All initial settings, (e.g. the G functions), are set to the parameterized values.
● All alarms with "Channel reset" criterion are canceled.
If all the channels of the mode group are in reset state, then:
● All alarms with "Mode group reset" cancel criterion are canceled.
● The NC/PLC interface indicates completion of the mode group Reset and the mode
group's readiness to operate:
DB11 DBX6.7 (all channels in the reset state)
DB11 DBX6.3 = 1 (mode group ready)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 519
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

9.3 Mode types and mode type change

Unique mode
The channels of a mode group operate in one mode.
A mode group is either in AUTOMATIC, JOG, or MDA mode.
Several channels of the same mode group cannot be in different modes at the same time.
If individual channels are assigned to different mode groups, a channel switchover activates
the corresponding mode group. This allows mode changes to be initiated via a channel
switchover.

Modes in the mode group


The following operating modes are available:
● AUTOMATIC
Automatic processing of part programs.
– Part program test
– All channels of the mode group can be active at the same time.
● JOG in Automatic
JOG in AUTOMATIC is an extension of AUTOMATIC mode intended to simplify use. JOG
can be executed without leaving AUTOMATIC mode if boundary conditions so permit.
● JOG
Jogging (manual axis traversal)
– The axes can be traversed manually with the handwheel or the traversing keys.
– Channel-specific signals and interlocks are effective in ASUBs and when a movement
is activated via IDS synchronized actions. Links are also taken into account.
– Every channel in the mode group can be active.
● MDA
Manual Data Automatic (the NC blocks are entered via the operator panel)
– Restricted automatic execution of part programs and sections of part programs
(can be only one block or a sequence of blocks).
– Part program test
– A maximum of 1 channel per mode group can be active (applies only to TEACH IN)
– Axes can be manually traversed only in subordinate machine functions such as JOG,
REPOS or TEACH IN.

Basic Functions
520 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

Applies to all modes


Cross-mode synchronized actions
Modal synchronized actions can be executed per IDS in all modes for the following functions
in parallel to the channel:
● Command axis functions
● Spindle functions
● Technology cycles

Selection
The user can select the desired operating mode by means of soft keys on the operator
interface.
This selection (AUTOMATIC, MDA, or JOG) is forwarded to interface signals:
DB11 DBX4.0 to DBX4.2 (mode strobe)
in the PLC, but is not activated at this point.

Activation and priorities


The desired mode of the mode group is activated via the interface signals:
DB11 DBX0.0 to DBX0.2 (mode type)
If several modes are selected at the same time, the following priority is in effect:

Priority Mode Mode-group signal (NCK → PLC)


1st priority, high JOG DB11 DBX0.2
2nd priority, medium MDA DB11 DBX0.1
3rd priority, low AUTOMATIC DB11 DBX0.0

Display
The current mode of the mode group is displayed via the interface signals:
DB11 DBX6.0 to DBX6.2 (active mode)

Mode-group signal (NCK → PLC) Active operating mode


DB11 DBX6.2 JOG
DB11 DBX6.1 MDA
DB11 DBX6.0 AUTOMATIC

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 521
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

Global machine function for mode group


After mode selection, a machine function can be selected, which is then valid globally for the
whole mode group.
Within JOG mode
Within JOG mode, one of the following machine functions can be selected:
● REF (reference point approach)
References:
/FB1/ Function Manual Basic Functions; Reference Point Approach (R1)
● REPOS (repositioning)
References:
/BEMsl/ Operating Manual HMI Embedded; Chap.: "Repositioning on contour with
controlled REPOS"

Within MDA mode


Within MDA mode, one of the following machine functions can be selected:
● REF (reference point approach)
References:
/FB1/ Function Manual Basic Functions; Reference Point Approach (R1)
● REPOS (repositioning)
References:
/BEMsl/ Operating Manual
● TEACHIN (teach-in of axis positions)
References:
/BEMsl/ Operating Manual HMI Embedded and /BEM/ Operating Manual HMI Embedded

TEACH IN, REPOS or REF


The selection of the machine functions TEACH IN, REPOS or REF from the user interface is
stored under the interface signal:
DB11 DBX5.0 to DBX5.2 (strobe machine function).
The desired machine functions TEACHIN, REPOS or REF are activated with the interface
signals:
DB11 DBX1.0 to DBX1.2 (machine function)
The display of the active machine function TEACHIN, REPOS or REF can be seen in the
interface signal:
DB11 DBX7.0 to DBX7.2 (active machine function)

Basic Functions
522 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

Operating statuses
The following three channel statuses can occur in each mode:
1. Channel reset
The machine is in its initial state. This is defined by the machine manufacturer's PLC
program, e.g. after POWER ON or at the end of the program.
2. Channel active
A program has been started, and the program is being executed or a reference point
approach is in progress.
3. Channel interrupted
The running program or reference point approach has been interrupted.

Functions in the modes


Modes are supplemented through user-specific functions. These functions are not related to
any particular technology or machine. A subset of the available functions can be selected in
each mode, depending on the operating state.
These functions are categorized as follows:
● NCK-specific functions
● Mode group-specific functions
● Channel-specific functions
The individual functions can be started and/or executed from the three individual channel
statuses: "channel reset", "channel active", or "channel interrupted". The channel states and
program states can be checked on the operator panel.

Boundary condition for submode TEACH IN


TEACH IN is not permissible for leading or following axes of an active axis grouping, e.g. for:
● gantry axis grouping or a gantry axis pair
● Coupled-axis grouping of master and slave axis

JOG in AUTOMATIC details


JOG in AUTOMATIC mode is permitted if the mode group is in RESET state and the axis is
jog-capable.
RESET for the mode group means:
● All channels in RESET state.
● All programs interrupted.
● No DRF channel active.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 523
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

Jog-capable axis means:


● The axis is not:
– A PLC axis (as a concurrent positioning axis), i.e. the PLC has fetched the axis via
axis replacement (e.g. via FC18).
– A command axis, i.e. the axis was programmed by a synchronous action and the
motion has not yet been completed.
– A rotating spindle, e.g. a spindle rotating despite RESET.
– An asynchronous reciprocating axis.
Note: The “jog-capable” property is independent of the “JOG in AUTOMATIC” function.
Activation
The function "JOG in AUTOMATIC" can be activated with the machine data:
MD10735 $MN_JOG_MODE_MASK
1. Before POWER ON, the following machine data must be set:
MD10735 $MN_JOG_MODE_MASK, Bit 0
2. The user switches to AUTO (PLC user interface DB11 DBX0.0 = 0→1 edge). “JOG in
AUTOMATIC” is then active if the NCK previously had channel status “RESET” and
program status “Aborted” in all mode group channels. The axis in question must also be
“jog-capable”. DRF must be deactivated (if not already deactivated).
3. RESET is initiated or the running program is finished with M30/M2 in all mode group
channels that do not have channel status “Reset” and program status “Aborted”.
4. The relevant axis is made "Jog-capable" (e.g. axis replacement PLC→NCK).
Note: In most applications, the axes to be traversed are “JOG-capable” and switching to
AUTO will also activate “JOG in AUTOMATIC”!
Features of JOG in AUTOMATIC
● The +/– keys cause a JOG movement, and the mode group is switched internally to JOG.
(i.e. “Internal JOG”).
● Moving the handwheels causes a JOG movement, and the mode group is switched
internally to JOG, unless DRF is active.
● An ongoing JOG movement is not complete until the end position of the increment has
been reached (if this has been set) or the movement has been aborted with “Delete
distance-to-go”.
In this way an increment can be stopped using Stop and then moved to the end using
Start. The NCK remains in “Internal JOG” during this time. A partial increment is possible,
but it must not be interrupted using Stop. There is a mode in which releasing the travel
key causes interruption within an increment.
● Without any JOG movement, “JOG in AUTOMATIC” responds in the same way as
“Automatic”. In particular, the Start key starts the selected part program and the
appropriate HMI softkey initiates a block search.

Basic Functions
524 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

● If JOG movement is active, the NCK is internally in JOG mode, and, thus, a block search
request is refused and a Start cannot start the part program. Start starts any remaining
increment or has no effect.
● While a mode group axis is being traversed in JOG mode, the mode group remains
internally in JOG mode.
Remark: This phase can begin with the JOG movement of an axis and end with the end
of the JOG movement of another axis.
● Axis replacement is not possible for an axis with active JOG movement. (The axis might
change mode group). The NCK blocks any axis replacement attempt.
● The PLC user interface indicates "Automatic" mode:
DB11 DBX6.0=1
DB11 DBX6.1=0
DB11 DBX6.2=0
DB11 DBX7.0=0
DB11 DBX7.1=0
DB11 DBX7.2=0
● In “JOG in AUTOMATIC”, the PLC user interface displays whether the mode group is in
“Mode group RESET”. This enables the NCK to now automatically switch internally to
JOG, if required.
DB11 DBX6.4
DB11 DBX26.4; For mode group 2
DB11 DBX46.4; For mode group 3
● In “JOG in AUTOMATIC”, the PLC user interface displays whether the NCK has
automatically switched to “Internal JOG”.
DB11 DBX6.5
DB11 DBX26.5; For mode group 2
DB11 DBX46.5; For mode group 3
Boundary conditions
“JOG in AUTOMATIC” can only switch internally to JOG if the mode group is in “Mode group
RESET” state, i.e. it is not possible to jog immediately in the middle of a stopped program.
The user can jog in this situation by pressing the JOG key or the Reset key in all channels of
the mode group.
Selecting AUTOMATIC disables the INC keys and the user can/must press the INC keys
again to select the desired increment. If the NCK switches to “Internal JOG”, the selected
increment is retained.
If the user attempts to jog the geometry or orientation axes, the NCK switches to “Internal
JOG” and the motion is executed. Several axes can be physically moved in this way; they
must all be “JOG-capable”.
Following the JOG movement, the NCK deactivates “Internal JOG” again and selects AUTO
mode again. The internal mode change is delayed until the movement is complete. This
avoids unnecessary multiple switching operations, e.g. when using the handwheel. The PLC
can only rely on the “Internal JOG active” PLC signal.
The NCK will then switch to “Internal JOG” if the axis is not enabled.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 525
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

9.3.1 Monitoring functions and interlocks of the individual modes

Channel status determines monitoring functions

Monitoring functions in operating modes


Different monitoring functions are active in individual operating modes. These monitoring
functions are not related to any particular technology or machine.
In a particular mode only some of the monitoring functions are active depending on the
operating status. The channel status determines which monitoring functions are active in
which mode and and in which operating state.
Interlocking functions in operating modes
Different interlocks can be active in the different operating modes. These interlocking
functions are not related to any particular technology or machine.
Almost all the interlocks can be activated in every mode, depending on the operating status.

9.3.2 Mode change

Introduction
A mode change is requested and activated via the mode group interface (DB11, ...). A mode
group will either be in AUTOMATIC, JOG, or MDA mode, i.e. it is not possible for several
channels of a mode group to take on different modes at the same time.
What mode transitions are possible and how these are executed can be configured in the
PLC program on a machine-specific basis.

Note
The mode is not changed internally until the signal "Channel status active" is no longer
pending. For error-free mode change however, all channels must assume a permissible
operating mode.

Basic Functions
526 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Mode types and mode type change

Possible mode changes


The following table shows possible mode changes for one channel.

AUTOMATIC JOG MDA


AUTO MDA JOG without AUTO
handwheel
Reset Interrupt Reset Interrupt Interrupt Reset Interrupt active Interrupt
AUTOMATIC X X X
JOG X X X X X
MDA X X X X
Possible mode changes are shown by an "X".

Special cases
● Errors during mode change
If a mode change request is rejected by the system, the error message "Operating mode
cannot be changed until after NC Stop" is output. This error message can be cleared
without changing the channel status.
● Mode change disable
A mode change can be prevented by means of interface signal:
DB11, DBX0.4 (Mode change disable).

This suppresses the mode change request.


The user must configure a message to the operator indicating that mode change is
disabled. No signal is set by the system.
● Mode change from MDA to JOG
If all channels of the mode group are in Reset state after a mode change from MDA to
JOG, the NC switches from JOG to AUTO. In this state, part program commands START
or INIT can be executed.
If a channel of the mode group is no longer in Reset state after a mode change, the part
program command START is rejected and Alarm 16952 is issued.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 527
Mode Group, Channel, Program Operation, Reset Response (K1)
Channel

9.4 Channel

Assignment part program - channel


Part programs are assigned to channels.
Part programs of different channels are largely independent of each other.

Channel properties
A channel constitutes an "NC" in which one part program can be executed at a time.
Machine axes, geometry axes and positioning axes are assigned to the channels according
to the machine configuration and the current program status (AXIS CHANGE, GEO AXIS
CHANGE, SETMS).
The system assigns each channel its own path interpolator with associated programming.
Each channel can run its own machining program, which is controlled from the PLC.
The following channel-specific functions make it possible for the channels to process part
programs independently:
● Each channel has its own NC Start, NC Stop, RESET.
● One feedrate override and one rapid traverse override per channel.
● Dedicated interpreter for each channel.
● Dedicated path interpolator for each channel, which calculates the path points such that
all the machining axes of the channel are controlled simultaneously from path axes.
● Selection and deselection of tool cutting edges and their length and radius
compensations for a tool in a specific channel.
For more information on tool offset, refer to:
References:
/FB1/ Function Manual, Basic Functions; Tool Offset (W1)
● Channel-specific frames and frames active in the channel for transforming closed
calculation rules into Cartesian coordinate systems. Offsets, rotations, scalings, and
mirrorings for geometry axes and special axes are programmed in a frame.
For more information on frames, refer to:
References:
/FB1/ Function Manual, Basic Functionse; Axes, Coordinate Systems, Frames (K2),
Chap: "External work offset"
● Display of channel-specific alarm responses.
● Display of current machining sequence (axis position, current G functions, current
auxiliary functions, current program block) for each channel.
● Separate program control functions for each channel.
These functions (with the exception of the display functions) are controlled and checked by
the PLC with interface signals.
Channels in the same mode group always have to be operated in the same mode
(AUTOMATIC, JOG, MDA).

Basic Functions
528 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Channel

Channel configuration
Channels can be filled with their own channel name via the following machine data:
MD20000 $MC_CHAN_NAME (channel name)
The various axes are then assigned to the available channels via machine data. There can
be only one setpoint-issuing channel at a time for an axis/spindle. The axis/spindle actual
value can be read by several channels at the same time. The axis/spindle must be registered
with the relevant channel.
Moreover, the following channel-specific settings can also be defined via machine data:
● Position of deletions or the basic program settings of G groups via the machine data:
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)
● Auxiliary function groups regarding the combination and the output time.
● Transformation conditions between machine axes and geometry axes
● Other settings for the execution of a part program

Change in the channel assignment


An online change in the channel configuration cannot be programmed in a part program or
PLC user program. Changes in the configuration must be made via the machine data. The
changes become effective only after a new POWER ON.

Container axes and link axes


An axis container combines a group of axes in a container. These axes are referred to as
container axes. This involves assigning a pointer to a container slot (ring buffer location
within the relevant container) to a channel axis. One of the axes in the container is located
temporarily in this slot.
Each machine axis in the axis container must be assigned at all times to exactly one channel
axis.
Link axes can be assigned permanently to one channel or dynamically (by means of an axis
container switch) to several channels of the local NCU or the other NCU. A link axis is a non-
local axis from the perspective of one of the channels belonging to the NCU to which the axis
is not physically connected.
The assignment between the link axes and a channel is implemented as follows:
● For permanent assignment using machine data:
Allow the direct logic machine axis image to show link axes.
● For dynamic assignment:
Allow the axis container slot machine data to show link axes.
For more information on link axes and container axes, refer to
References:
/FB2/ Function Manual, Extended Functions; Several Operator Panel Fronts and NCUs,
Distributed Systems (B3)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 529
Mode Group, Channel, Program Operation, Reset Response (K1)
Channel

Interface signals
NCK channel 1 signals lie in DB21 of the user interface, those of channel 2 in DB22. The
channel or channels can be monitored and controlled from the PLC or NCK.

Technology in channel
The machine data can be used to relate the technology specification for the machine to
specific channels:
MD27800 $MC_TECHNOLOGY_MODE
Among other functions, this information is used for evaluation in HMI, PLC, and standard
cycles.
Siemens supplies standard MD for milling. If the machine tool is not a milling machine, but
some other type, a different data/program block can be loaded by the HMI or PLC depending
on the technology mode set in the machine data.

Spindle functions using a PLC


It is possible to control special spindle motions via an axial PLC interface as an alternative to
FC18 and to start and stop them using VDI interface signals without executing a part
program.
This option is available only if the channel status is in "Interrupted" or "RESET" mode and
the program status is in "Interrupted" or "Aborted" mode. This acceptance state will occur in
case of RESET and in JOG mode.
A separate spindle start can be set for each spindle. The following spindle functions can be
controlled by PLC via interface signals:
● Spindle Stop (corresponds to M5)
● Spindle Start clockwise (corresponds to M3)
● Spindle Start counterclockwise" (corresponds to M4)
● Select gear stage
● Spindle positioning (corresponds to M19)
In the case of multi-channel operation, the spindle started by the PLC becomes active in the
channel that is handling the spindle when the start command is received.
For more information about the special spindle interface, see:
References:
/FB1/ Function Manual, Basic Functions; Spindles (S1)

Basic Functions
530 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Channel

Autonomous single-axis operations


It is possible to decouple a particular axis/spindle in the main run from the channel behavior
triggered by the NC program run.
The PLC identifies the corresponding axis/spindle from the axial NC/PLC interface signal:
DB31, ... DBB28.7 (PLC controlled axis) = 1 → assume control
DB31, ... DBB28.7 (PLC controlled axis) = 0 → relinquish control
The following functions can be controlled from the PLC:
● Cancel axis/spindle sequence (equivalent to delete distance-to-go)
● Stop or interrupt axis/spindle
● Resume axis/spindle operation (continue the motion sequence)
● Reset axis/spindle to the initial state
For a detailed description of these stand-alone single axis operations, refer to:
References:
/FB2/ Function Manual, Basic Functions; Positioning axes (P2)
For additional information on the channel-specific signal exchange (PLC → NCK), see:
References:
/FB1/ Function Manual Basic Functions; PLC Basic Program (P3)

9.4.1 Global start disable for channel

User/PLC
A global Start disable can be set for the selected channel via the HMI or from the PLC.

Function
When Start disable is set, no new program starts are accepted for the selected channel.
Start attempts are counted internally.
If a start is executed by the PLC before a global block disable is sent from the HMI to the
NCK, the program is not stopped by the Start disable and its status is transmitted to the HMI.
NC Start disable and global Start disable have the same effect on the internal counter for
starts that have been sent but not executed. (OPI variable startRejectCount).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 531
Mode Group, Channel, Program Operation, Reset Response (K1)
Channel

Bypassing global Start disable


The interface signal:
DB21, ... DBX7.5 (PLC → NCK)
allows the PLC to temporarily bypass a global Start disable.

0: Global Start disable is effective


1: Global Start disable is temporarily canceled.

Messages
If desired, a message can be issued when a Start attempt occurs while a global block
disable is active.
The control is exercised using machine data:
MD11411 $MN_ENABLE_ALARM_MASK Bit 6

1: Alarm 16956 appears: Channel %1, Program %2 cannot be started because of


"Global Start disable".
0: Start attempts when a global block disable is set are not signaled by an alarm.

Basic Functions
532 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program test

9.5 Program test


Several control functions are available for testing a new part program. These functions are
provided to reduce danger at the machine and time required for the test phase. Several
program functions can be activated at the same time to achieve a better result.

Test options
The following test options are described below:
● Program execution without setpoint outputs
● Program execution in single-block mode
● Program execution with dry run feedrate
● Skip part program blocks
● Block search with or without calculation.

9.5.1 Program execution without setpoint outputs

Function
In the "Program test" status, a part program is executed without the output of axis or spindle
setpoints.
The user can use this to check the programmed axis positions and auxiliary function outputs
of a part program. This program simulation can also be used as an extended syntax check.

Selection
This function is selected via the operator interface in the "Program control" menu.
The selection sets the following interface signal:
DB21, ... DBX25.7 (program test selected)
This does not activate the function.

Activating
The function is activated via interface signal:
DB21, ... DBX1.7 (activate program test)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 533
Mode Group, Channel, Program Operation, Reset Response (K1)
Program test

Display
The corresponding field on the operator interface is reversed and the interface signal in the
PLC as a checkback of the active program test:
DB21, ... DBX33.7 (program test active)

Program start and program run


The part program can be started and executed during the active program test function using
interface signal:
DB21, ... DBX7.1 (NC Start)
i.e. using auxiliary function outputs, wait times, G-function outputs, etc.
Safety functions such as software limit switches and working area limits remain valid.
The safety functions such as software limit switch, working area limits continue to be valid.
The only difference compared to normal program operation is that an internal axis disable is
set for all axes (including spindles). The machine axes do not move, the actual values are
generated internally from the setpoints that are not output. The programmed velocities
remain unchanged. This means that the position and velocity information on the operator
interface is exactly the same as that output during normal part program execution. The
position control is not interrupted when this function is active, so the axes do not have to be
referenced when the function is switched off.

CAUTION
The signals for exact stop:
DB31, ... DBX60.6/60.7 (exact stop coarse/fine)
mirror the actual status on the machine.
They are only canceled during program testing if the axis is pushed out of its set position
(the set position remains constant during program testing).
With signal:
DB21, ... DBX33.7 (program test active)
both the PLC program and the part program can use variable
$P_ISTEST
to decide how to react or branch in response to these signals during testing.

Note
Dry run feedrate
"Program execution without axis motion" can also be activated with the function "Dry run
feedrate". With this function, part program sections with a small programmed feedrate can be
processed in a shorter time.

Basic Functions
534 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program test

Note
Tool management
Because of the axis disable, the assignment of a tool magazine is not changed during
program testing. A PLC application must be used to ensure that the integrity of the data in
the tool management system and the magazine is not corrupted. The toolbox diskettes
contain an example of the basic PLC program.

9.5.2 Program execution in single-block mode

Function
In case of "Program execution in single block mode" the part program execution stops after
every program block. If tool cutter radius compensation or a tool nose radius correction is
selected, processing stops after every intermediate block inserted by the control.
The program status switches to "Program status stopped".
The channel status remains active.
The next part program block is processed on NC Start.

Application
The user can execute a part program block-by-block to check the individual machining steps.
Once the user decides that an executed part program block is functioning correctly, he can
call the next block.

Single block types


The following different types of single block are provided:
● Decoding single block
With this type of single block, all blocks of the part program (even the pure computation
blocks without traversing motions) are processed sequentially by "NC Start".
● Action single block (initial setting)
With this type of single block, the blocks that initiate actions (traversing motions, auxiliary
function outputs, etc.) are processed individually.
Blocks that were generated additionally during decoding (e.g. for cutter radius
compensation at acute angles) are also processed individually in single-block mode.
Processing is however not stopped at calculation blocks as these do not trigger actions.
The single block types are determined via the user interface in the menu "Program controls".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 535
Mode Group, Channel, Program Operation, Reset Response (K1)
Program test

CAUTION
In a series of G33/G34/G35 blocks, a single block is only operative if "dry run feed" is
selected.
Calculation blocks are not processed in single step mode (only if single decoding block is
active).
SBL2 is also ineffective with G33/G34/G35.

Selection
It is possible to select the single block mode:
● via the machine control panel (key "Single Block")
● via the user interface
For an exact procedure see:
References:
Operations Manual of the installed HMI Application

Note
In case of HMI Advanced without machine control panel, a user display must be
configured with a corresponding softkey.

Activating
The function is activated through the PLC basic program via the interface signal:
DB21, ... DBX0.4 (activate single block)

Display
Active single block mode is indicated by a reversal in the relevant field in the status line on
the operator interface.
Because of the single block mode, as soon as the part program processing has processed a
part program block, the following interface signal is set:
DB21, ... DBX35.3 (program status interrupted)

Processing without single block stop


Despite the selected sigle block mode, a processing without the single block stop can be set
for specific program runs, e.g. for:
● Internal ASUPs
● User ASUPs
● Intermediate blocks
● Block search group blocks (action blocks)

Basic Functions
536 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program test

● Init blocks
● Subroutines with DISPLOF
● Non-reorganizable blocks
● Non-repositionable blocks
● Reposition block without travel information
● Tool approach block.
The setting is done via the following machine data:
MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (Prevent single block stop)
The assignment of the processes to the bits of the machine data is given in:
References:
Detailed machine data description

9.5.3 Program execution with dry run feedrate

Function
During "Program execution with dry run feedrate" the traversing speeds, which have been
programmed together with G01, G02, G03, G33, G34 and G35, are replaced by a
parameterized feedrate value:
SD42100 $SC_DRY_RUN_FEED (dry run feed rate)
The dry run feedrate value also replaces the programmed revolutional feedrate in program
blocks with G95.
The exact way of working of the parameterized dry run feedrate (SD42100) depends on the
setting of another setting data:
SD42101 $SC_DRY_RUN_FEED_MODE (Mode for test run speed)

Value Description
0 Dry run feedrate is the maximum of the programmed feedrate and setting data SD42100.
(Default setting!)
⇒ SD42100 becomes effective only when the stored value is greater than the programmed
feedrate.
1 Dry run feedrate is the minimum of the programmed feedrate and SD42100.
⇒ SD42100 becomes effective only when the stored value is less than the programmed
feedrate.
2 The value in SD42100 acts as the dry run feed rate, regardless of the programmed feedrate.
10 As in the case of "0", except thread cutting (G33, G34, G35) and thread boring (G331, G332,
G63). These functions are executed as programmed.
11 As in the case of "1", except thread cutting (G33, G34, G35) and thread boring (G331, G332,
G63). These functions are executed as programmed.
12 As in the case of "2", except thread cutting (G33, G34, G35) and thread boring (G331, G332,
G63). These functions are executed as programmed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 537
Mode Group, Channel, Program Operation, Reset Response (K1)
Program test

A dry run feedrate can be selected in the automatic modes and activated on interruption of
an automatic mode or end of a block.
For more information on feedrate control, refer to:
References:
/FB1/ Function Manual, Basic Functions; Feeds (V1)

Application

DANGER
Workpieces may not be machined when "dry run feedrate" is active because the altered
feedrates might cause the permissible tool cutting rates to be exceeded and the workpiece
or machine tool could be damaged.

Selection
This function is selected via the operator interface in the "Program control" menu.
The selection sets the following interface signal:
DB21, ... DBX24.6 (dry run feed rate selected)
This does not activate the function.

Activating
The function is activated via interface signal:
DB21, ... DBX0.6 (activate dry run feed)

Display
Active dry run feedrate mode is indicated by a reversal in the relevant field in the status line
on the operator interface.

Basic Functions
538 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program test

9.5.4 Skip part-program blocks

Function
When testing or breaking in new programs, it is useful to be able to disable or skip certain
part program blocks during program execution. For this, the respective records must be
marked with a slash.

Main program/subroutine

%100
N10 ...

N20 ...
Block being N30 ...
processed
Skip blocks
/N40 ... N40 and N50 during
processing
/N50 ...

N60 ...

N70 ...
N80 ...

N90 ...

N100 ...

N110 ...
N120 M30

Figure 9-1 Skipping part program blocks

Selection
This function is selected via the operator interface in the "Program control" menu.
The selection sets the following interface signal:
DB21, ... DBX26.0 (skip block selected)
This does not activate the function.

Activating
The function is activated via the interface signal:
DB21, ... DBX2.0 (activate skip block)

Note
The "Skip part programs" function remains active during block searches.

Display
Activated "Skip block" function is indicated by a reversal of the relevant field on the operator
interface.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 539
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

9.6 Block search

Function
Block search offers the possibility of starting part program execution from almost any part
program block.
This involves the NC rapidly performing an internal run through the part program (without
traversing motions) to the selected target block during block search. Here, every effort is
made to achieve to the exact same control status as would result at the target block during
normal part program execution (e.g. with respect to axis positions, spindle speeds, loaded
tools, NC/PLC interface signals, variable values) in order to be able to resume automatic part
program execution from the target block with minimum manual intervention.

Block search types


● Type 1: Block search without calculation
Block search without calculation is used to find a part program block in the quickest
possible way. No calculation of any type is performed. The control status at the target
block remains unchanged compared to the status before the start of the block search.
● Type 2: Block search with calculation at contour
Block search with calculation at contour is used to enable the programmed contour to be
approached in any situation. On NC Start, the start position of the target block or the end
position of the block before the target block is approached. This is traversed up to the end
position. Processing is true to contour.
● Type 4: Block search with calculation at block end point
Block search with calculation at block end point is used to enable a target position (e.g.
tool change position) to be approached in any situation. The end position of the target
block or the next programmed position is approached using the type of interpolation valid
in the target block. This is not true to contour.
Only the axes programmed in the target block are moved. If necessary, a collision-free
initial situation must be created manually on the machine in "JOG REPOS" mode before
the start of further automatic part program execution.
● Type 5: Block search with calculation in "Program test" (SERUPRO) mode
SERUPRO (search run by programtest) is a cross-channel block search with calculation.
Here, the NC starts the selected part program in "Program test" mode. On reaching the
target block, the program test is automatically deselected. This type of block search also
enables interactions between the channel in which the block search is being performed
and synchronized actions as well as with other NC channels.

Note
For more information on block searches, refer to:
References:
/FB1/ Function Manual Basic Functions; Auxiliary Function Output to PLC (H2),
Chapter: "Behavior on block search"

Basic Functions
540 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

Subsequent actions
After completion of a block search, the following subsequent actions may occur:
● Type 1 - Type 5: Automatic Start of an ASUB
When the last action block is activated, a user program can be started as an ASUB.
● Type 1 - Type 4: Cascaded block search
A further block search with a different target specification can be started from "Search
target found".

9.6.1 Sequence for block search of Type 1, 2 and 4

Time sequence
The block search (Types 1, 2, and 4) proceeds as follows:
1. Activate search via input in HMI Advanced or HMI Embedded
2. Search target found, or alarm if target cannot be found
3. NC Start for output of action blocks
4. NC Start for program continuation.

Block search Search target 1 Block search Search target 2 NC Start Last
starting found starting found action blocks action block
being output

Block search
active (DB21, ...
DBX33.4)

Action block
active (DB21, ...
DBX32.3)

Last action block


active (DB21, ...
DBX32.6)

Channel status
Reset (DB21, ...
DBX35.7)

Channel status
interrupted
(DB21, ... DBX35.6)

Figure 9-2 Time sequence of interface signals

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 541
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

Interface signals
In the PLC, the following interface signals are set according to the time sequence shown in
the figure:
DB21, ... DBX33.4 (block search active)
DB21, ... DBX32.3 (action block active)
DB21, ... DBX32.4 (approach block active)
DB21, ... DBX32.6 (last action block active)
DB21, ... DBX1.6 (PLC action complete)

Continuation mode after block search


Following the block search, the program can be resumed via interface signal:
DB21, ... DBX7.1 (NC Start).

If an axis is first programmed after "Block search with calculation at block end point", the
incremental value can be added to the value accumulated up to the search target using
setting data
SD42444 $SC_TARGET_BLOCK_INCR_PROG.

Action blocks
Action blocks contain the actions accumulated during "Block search with calculation", such
as auxiliary function outputs and tool (T, D), spindle (S), and feedrate programming
commands. During "block search with calculation" (contour or block end point), actions such
as M function outputs are accumulated in so-called action blocks. These blocks are output
on an NC Start after "Search target found".

Note
With the action blocks, the accumulated spindle programming (S value, M3/M4/M5/M19,
SPOS) also becomes active.
The PLC user program must ensure that the tool can be operated and that, if necessary, the
spindle programming is reset via PLC signal:
DB31, ... DBX2.2(spindle reset)
or the spindle programming is not output.

Single-block processing: MD10702 $MN_IGNORE_SINGLEBLOCK_MASK ()


By setting bit 3 = 1, it is possible to prevent a stop after every action block in single-block
mode.

Basic Functions
542 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

Boundary conditions for approach block/target block


Block search type 2
Interface signal:
DB21, ... DBX32.4 (approach block active)
is only set with "Block search with calculation at contour" because a separate approach
block is not generated with "Block search with calculation at block end point" (the approach
block is the same as the target block).
Block search type 4
The approach movement "Search with calculation to block end point" is performed using the
type of interpolation valid in the target block. This should be G0 or G1, as appropriate. With
other types of interpolation, the approach movement can be aborted with an alarm (e.g.
circle end point error on G2/G3).

9.6.2 Block search in connection with other NCK functions

9.6.2.1 ASUB after and during block search

Synchronization of the channel axes


With the start of an ASUB after "block search with calculation", the actual positions of all
channel axes are synchronized during preprocessing.
Effects:
● System variable: $P_EP (programmed end position)
In the ASUB, the system variable provides: $P_EP (programmed end position) the
current actual position of a channel axes in the work piece coordinate system.
$P_EP == "current actual position of the channel axis"
● System variable: $AC_RETPOINT (repositioning point in the ASUB)
In the ASUB, the system variable provides: $AC_RETPOINT (repositioning point in the
ASUB) the actual position of a channel axis in the workpiece coordinate system
accumulated with a block search.
$AC_RETPOINT == "collected search position of the channel axis (WCS)"

Block search type 2


For block search type 2 (block search with calculation on contour) the following part program
command must be programmed at the conclusion of the ASUB:
REPOSA (repositioning on the contour; linear; all channel axes)
Effect:
● All channel axes are moved to their search position that was collected during the block
search.
● $P_EP == "accumulated search position of the channel axis (WCS)"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 543
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

Block search type 4 and part program command REPOS


After block search type 4 (block search with calculation at block end point) no automatic
repositioning is initiated during the following period of time by the part program command
REPOS:
● Start: NC/PLC interface signals: DB21,... DBB32, Bit6 (last action block active) == 1
● End: Continuing the part program processing per NC START,.
The start point of the approach movement is represented by the current axis positions of the
channel axes at the time of the NC start command. The end point results from the other
transversing movements programmed in the part program.
For block search type 4, no approach movement is generated by the NC.
Effect:
● After exiting the ASUB, the system variable $P_EP thus provides the actual position, on
which the channel axes of the ASUB were positioned (or manual (mode: JOG).
$P_EP == "current actual position of the channel axis"

9.6.2.2 PLC actions after block search


To allow activation of PLC actions (starting of ASUBs, call-up of PLC functions) after the end
of the block search at a defined point, there is the NCK/PLC interface signal:
DB21, ... DB32.6 (last action block active) == 1
This means that all action blocks are processed and that actions are possible by the PLC
(ASUB, FC) or the operator (overstoring, mode change after JOG/REPOS). This allows the
PLC to perform another tool change, for example, before the start of the transversing
movement.
By default, alarm 10208 is output at this moment to notify the operator that another NC
START is needed to continue program execution.
In combination with alarm 10208, the following interface signals are set:
DB21, ... DBX36.7 (NCK alarm with processing stop)
DB21, ... DBX36.6 (channel-specific NCK alarm is present)

PLC-controlled alarm triggering


The setting by which alarm 10208 is only triggered after ending the PLC action, is done via
machine data:
MD11450 $MN_SEARCH_RUN_MODE, Bit 0 = 1

Bit Value Meaning


0 1 With the change of the last action block after a block search, the following takes
place:
• Execution of the part program is stopped
• DB21, ... DBB32.6 (last action block active) = 1
• Alarm display: Alarm 10208 only if the following applies:
DB21, ... DBX1.6 (PLC action ended) == 1

Basic Functions
544 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

9.6.2.3 Spindle functions after block search

Control system response and output


The behavior with regard to the spindle functions after ending the block search can be set
via machine data:
MD11450 $MN_SEARCH_RUN_MODE, Bit 2

Bit Value Meaning


2 0 Output of spindle auxiliary functions (M3, M4, M5, M19, M70) in action blocks.
1 Output of the auxiliary functions is suppressed in the action blocks. The spindle
programmings that accumulated during the block search can be output at a later
point in time (e.g. via ASUB).
The program data for this is stored in the following system variables:
• $P_SEARCH_S
• $P_SEARCH_SDIR
• $P_SEARCH_SGEAR
• $P_SEARCH_SPOS
• $P_SEARCH_SPOSMODE

System variables
The spindle-specific auxiliary functions are always stored in the following system variables
on block search, irrespective of the programming described above:

System variables Description


$P_SEARCH_S[ n ] Collected spindle speed,
value range = { 0 ... Smax }
$P_SEARCH_SDIR[ n ] Collected spindle rotation direction,
value range = { 3, 4, 5, -5, -19, 70 }
$P_SEARCH_SGEAR[ n ] Collected spindle gear stage M function,
value range = { 40 ... 45 }
$P_SEARCH_SPOS[ n ] Collected spindle position,
value range = { 0 ... MD30330 $MA_MODULO_RANGE }
Collected traverse path,
value range = { -100.000.000 ... 100.000.000 }
$P_SEARCH_SPOSMODE[ n ] Collected position approach mode,
value range = { 0 ... 5 }
For later output of the spindle-specific auxiliary functions, the system variables can be read,
for example in an ASUB, and output after output of the action blocks:
DB21, ... DBX32.6 == 1 (last action block active)

Note
The contents of the system variables $P_S, $P_DIR and $P_SGEAR may be lost after block
search due to synchronization operations.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 545
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

References:
More detailed information on ASUB, block search, and action blocks is to be found in:
● /FB1/ Function Manual, Basic Functions; Auxiliary Function Output to PLC (H2),
Section: Output suppression of spindle-specific auxiliary functions
● /FB1/ Function Manual, Basic Functions; Mode Group, Channel, Program Operation (K1)
Section: Program test
● /FB1/ Function Manual, Basic Functions; Spindles (S1),
Section: Auxiliary spindle functions after block search

9.6.3 Automatic start of an ASUB after a block search

Parameter assignment
Making the function effective
The automatic ASUB start after a block search is activated by the following MD setting:
MD11450 $MN_SEARCH_RUN_MODE, bit 1 = 1
Program to be activated
In the default setting, the program _N_PROG_EVENT_SPF is activated from the directory
_N_CMA_DIR as ASUB after the block search by changing the last action block. If another
program is to be activated, then the name of this user program must be entered in the
following machine data:
MD11620 $MN_PROG_EVENT_NAME
Behavior when the single block processing is set
Via the following channel-specific machine data it can be set, whether the activated ASUB
are processed without interruption despite a set single block processing or whether the
single block processing is to be made active:
MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK

Bit Value Description


4 0 Single block execution is active.
1 Single block processing is suppressed.
Behavior when the read-in disable is set
Via the following channel-specific machine data it can be set, whether the activated ASUB
are processed without interruption despite a set read-in disable (DB21, ... DBX6.1 = 1), or
whether the read-in disable is to be made active:
MD20107 $MC_PROG_EVENT_IGN_INHIBIT

Bit Value Description


4 0 Read-in disable is active.
1 Read-in disable is suppressed.

Basic Functions
546 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

Note
For moe information on parameterization of \MD11620, MD20108 and MD20107 see "Event-
driven Program calls > Parameterization (Page 621)".

Programming
The event that has started this ASUB can be determined by scanning the system variable
$P_PROG_EVENT. In case of an automatic activation after a block search
$P_PROG_EVENT returns the value "5".

Sequence
Sequence of automatic start of an ASUB after a block search
1. Start block search (with/without calculation, at contour, at end-of-block point).
2. Stop after "Search target found".
3. NC Start for output of action blocks.
4. Last action block is activated.
5. Automatic start of /_N_CMA_DIR/_N_PROG_EVENT_SPF (default) as an ASUB.
6. The NC will stop after changing the last ASUB block (REPOSA command) and the
following NC/PLC interface signal is set:
DB21, ... DBX32.6 (last action block active)
The alarm 10208 "Enter NC-start for program continuation" is generated.

Note
If bit 0 is set to "1" in MD11450 $MN_SEARCH_RUN_MODE, then the alarm 10208 is
generated only when the PLC requests this by setting the following NC/PLC interface
signal:
DB21, ... DBX1.6 (PLC action complete)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 547
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

9.6.4 Cascaded block search

Functionality
The "Cascaded block search" function can be used to start another block search from the
status "Search target found". The cascading can be continued after each located search
target as often as you want and is applicable to the following block search functions:
● Type 1 block search without calculation
● Type 2 block search with calculation at contour
● Type 3 block search with calculation at block end point

Note
Another "cascaded block search" can be started from the stopped program execution
only if the search target has been found.

Activation
The "cascaded block search" is configured in the existing machine data:
MD11450 $MN_SEARCH_RUN_MODE
● Cascaded block search is enabled (i.e. several search targets can be specified)
with Bit 3 = 0 (FALSE).
● For compatibility reasons, the cascaded block search can be disabled with Bit 3 = 1
(TRUE). By default, the cascaded block search is set with Bit 3 = 0.

Execution behavior

Search target found, restart search


When the search target is reached, the program execution stops and the search target is
displayed as a current block. After each located search target, a new block search can be
repeated as often as you want.
Change search target specifications
You can change the search target specifications and block search function prior to each
block search start.

Basic Functions
548 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

Example: Sequence with cascaded block search


● RESET
● Block search up to search target 1
● Block search up to search target 2 → "Cascaded block search"
● NC Start for output of the action blocks → Alarm 10208
● NC Start → Continue program execution

Block search Search target 1 Block search Search target 2 NC Start Last
starting found starting found action blocks action block
being output

Block search
active (DB21, ...
DBX33.4)

Action block
active (DB21, ...
DBX32.3)

Last action block


active (DB21, ...
DBX32.6)

Channel status
Reset (DB21, ...
DBX35.7)

Channel status
interrupted
(DB21, ... DBX35.6)

Figure 9-3 Chronological order of interface signals

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 549
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

9.6.5 Examples of block search with calculation

Selection
From the following examples, select the type of block search that corresponds to your task.

Type 4 block search with calculation at block end point


Example with automatic tool change after block search with active tool management:
1. Set machine data:
MD11450 $MN_ SEARCH_RUN_MODE to 1
MD11602 $MN_ASUP_START_MASK Bit 0 = 1 (ASUB Start from stopped state)
2. Select ASUB "BLOCK_SEARCH_END" from PLC via FB4.
References:
/FB1/ Function Manual, Basic Functions, Basic PLC Program (P3)
3. Load and select part program "WORKPIECE_1".
4. Search to block end point, block number N220.
5. HMI signals "Search target found".
6. NC Start for output of action blocks.
7. With the PLC signal:
DB21... DB32.6 (last action block active)
the PLC starts ASUB "BLOCK_SEARCH_END" via FC9.
References:
/FB1/ Function Manual, Basic Function, Basic PLC Program (P3)
8. After the end of the ASUB (can be evaluated, e.g. via M function M90 to be defined, see
example for block N1110), the PLC sets signal:
DB21, ... DBX1.6 (PLC action ended).
Alternatively, the VDI interface signal:
DB21-DB30 DBB318 Bit 0 (ASUB is stopped)
can also be scanned.
As a result, Alarm 10208 is displayed, i.e. other actions can now be performed by the
operator.

Basic Functions
550 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

9. Manual operator actions (JOG, JOG-REPOS, overstoring)


10.Continue part program with NC Start.
Y
Tool
change point
300 (450,300)

200

Approach movement
Target block N220

100

Approach point
(170,30)
0 X
100 200 300 400
Figure 9-4 Approach movement for search to block end point (target block N220)

Note
"Search to contour" with target block N220 would generate an approach movement to the
tool change point (start point of the target block).

Type 2 block search with calculation at contour


Example with automatic tool change after block search with active tool management:

1. to 3. Same as example for Type 4 block search


4. Search to contour, block number N260
5. to 10. Same as example for Type 4 block search

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 551
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

Y
Tool
change point
300 (450,300)

200 Approach movement

N260
Approach point

100

0 X
100 200 300 400

Figure 9-5 Approach movement for search to contour (target block N260)

Note
"Search to block end point" with target block N260 would result in Alarm 14040 (circle end
point error).

Part programs for Type 4 and Type 2


PROC WORKPIECE_1

;Main program
...
;Machine contour section 1 with "CUTTER_1"tool
...
N100 G0 G40 X200 Y200 ; Deselect radius compensation
N110 Z100 D0 ; Deselect length compensation
;End of contour section 1
;
;Machine contour section 2 with "CUTTER_2"tool
N200 T="CUTTER_2" ; Preselect tool
N210 WZW ; Call tool change routine
N220 G0 X170 Y30 Z10 S3000 M3 D1 ; Approach block for contour section 2
N230 Z-5 ; Infeed
N240 G1 G64 G42 F500 X150 Y50 ; Start point of contour
N250 Y150
N260 G2 J50 X100 Y200
N270 G1 X50
N280 Y50

Basic Functions
552 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search

N290 X150
N300 G0 G40 G60 X170 Y30 ; Deselect radius compensation
N310 Z100 D0 ; Deselect length correction
End of contour section 2
...
M30
PROC WZW
Tool change routine
N500 DEF INT TNR_AKTIV ; Variable for active T number
N510 DEF INT TNR_VORWAHL ; Variable for preselected T number
N520 TNR_AKTIV = $TC_MPP6[9998,1] ; Read T number of active tool
N530 GETSELT(TNR_VORWAHL) ; Read T number of preselected tool
;
;Execute tool change only if tool is not yet active
N540 IF TNR_AKTIV == TNR_VORWAHL GOTOF ENDE
N550 G0 G40 G60 G90 SUPA X450 Y300 Z300 D0 ; Approach tool change position
N560 M6 ; Execute tool change
;
END: M17
PROC SUCHLAUF_ENDE SAVE
ASUB for calling the tool change routine after block search
N1000 DEF INT TNR_AKTIV ; Variable for active T number
N1010 DEF INT TNR_VORWAHL ; Variable for preselected T number
N1020 DEF INT TNR_SUCHLAUF ; Variable for T number determined in
search
N1030 TNR_AKTIV = $TC_MPP6[9998,1] ; Read T number of active tool
N1040 TNR_SUCHLAUF = $P_TOOLNO ; Read T number determined by search
N1050 GETSELT(TNR_VORWAHL) ; Read T number of preselected tool
N1060 IF TNR_AKTIV ==TNR_SUCHLAUF GOTOF ASUP_ENDE
N1070 T = $TC_TP2[TNR_SUCHLAUF] ; T selection by tool name
N1080 WZW ; Call tool change routine
N1090 IF TNR_VORWAHL == TNR_SUCHLAUF GOTOF ASUP_ENDE
N1100 T = $TC_TP2[TNR_VORWAHL] ; Restore T preselection by tool name
ASUP_ENDE:
N1110 M90 ; Check-back signal to PLC
N1120 REPOSA ; ASUB end

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 553
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7 Block search Type 5 SERUPRO

SERUPRO
The "search via program test" is from now on referred to as SERUPRO. This acronym has
been derived from "SEarch RUn by PROgram test".

Function
SERUPRO can be used for a cross-channel block search.
This search permits a block search with calculation of all necessary data from the previous
history, so as to acquire all previously valid status data for a particular overall NC status. The
PLC is hereby updated to the current status.
The NC is operated in "Program test" mode during this block search so that interactions
between a channel and synchronized actions or between several channels, can take place
within an NCU.

Channels
In combination with the HMI, SERUPRO is provided for the following channels:
● For the current SERUPRO channel only (1)
● For all channels with the same workpiece name as the SERUPRO channel (2)
● For all channels with the same mode group as the SERUPRO channel (3)
● For all channels of the NCU (4)
The scope of channels for SERUPRO is selected by means of configuration file
maschine.ini, in Section [BlockSearch]:

Section [BlockSearch] Enable search function for HMI and select search configuration
SeruproEnabled=1 ;SERUPRO softkey available for HMI. Default value is (1)
SeruproConfig=1 ;Number (1) to (4) of above indicated channel grouping. Default value is (1)
All other channels started with SERUPRO are operated in "Self-Acting SERUPRO" mode.
Only the channel in which a target block has been selected can be started with a block
search in SERUPRO mode.

Supported functions
Supported NC functions during SERUPRO:
● Gear stage change
● Setpoint and actual value linkages for drives such as "master-slave" as well as "electronic
gear" and "axial master value coupling"
● Coupled motion in axis grouping
● Gantry axes
● Tangential follow-up of individual axes

Basic Functions
554 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

● Superimposed motion interpolation


● Travel to fixed stop
● Synchronous spindle grouping
On reaching the beginning of the target block (see "Time sequence of SERUPRO" below),
the user can activate a SERUPRO ASUB.
Special points should be noted during SERUPRO ASUB with regard to:
● Reference point approach
● Tool management
● Spindle ramp-up
Other functions after search target was found, such as:
● Continue machining after SERUPRO search target found (REPOS offset)
● Repositioning on contour with controlled REPOS
● Part program expansions for SERUPRO

Activating
SERUPRO is activated via the HMI. SERUPRO is operated using the "Prog.Test Contour"
softkey.
SERUPRO uses REPOS to approach the target block.

Chronological sequence of SERUPRO


1. Via HMI, softkey "Pog. test contour" and the search target are operated.
2. The NC now automatically starts the selected program in "Program test" mode.
– In this mode, axes are not traversed.
– Auxiliary functions $A_OUT and the direct PLC IO are output.
– The auxiliary functions of the target block are not output.
3. Numerous operator actions are permitted during this phase:
– Start, Stop
– Axis replacement
– Deletion of distance-to-go
– Mode change, ASUBs, etc.
The program and channel statuses of interface signal:
DB21, ... DBB35
or system variable:
$AC_PROG
is supplied analogous to real operation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 555
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

4. The part program command WAITM/WAITE/WAITMC will wait for the partner channels
involved.
This waiting occurs if the partner channels are:
– In SERUPRO mode
– In Program test more or are actually running
5. Selection of program test and dry run feedrate is rejected with corresponding Alarm
16935.
6. The NC stops at the beginning of the target block, deselects "Program test" internally,
and displays the Stop condition "Search target found" in its block display.
7. As required, the user can start an ASUB that is traversed really. This ASUB is referred to
below as the SERUPRO-ASUB.
8. The user presses Start:
The spindles are started. Then, the path axes start a REPOS operation that guides them
to the block starting point of the target block.
The REPOS operation is implemented by a system ASUB and can be expanded using
the "Editable ASUB" function.

SERUPRO operation
The sequence of operations in items 2. to 6. corresponds to one SERUPRO operation.

SERUPRO ASUP
An ASUB that can be called optionally when the target block is reached. It is actually
executed.

SERUPRO approach
Approach to the starting point of the target block during a block search in SERUPRO test
mode.

Boundary conditions for block search SERUPRO


The SERUPRO function may only be activated in "AUTOMATIC" mode and may only be
aborted in program status (channel status RESET).
If in normal mode only the PLC starts commonly several channels, then this can be
simulated by SERUPRO in each channel.
If machine data setting:
MD10708 $MN_SERUPRO_MASK Bit 1 = 0
Alarm 16942: "Channel %1 Start program command action %2<ALNX> not possible"
aborts the simulation if part program command START is used.

Basic Functions
556 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Machine data:
MD10707 $MN_SERUPRO_TEST_MASK
allows program testing to be deactivated in the stopped state without the SERUPRO
operation being affected. The default setting allows program testing to be deactivated only in
the RESET state.

Note
After program testing has been deactivated, a REPOS operation is initiated that is subject to
the same restrictions as a SERUPRO approach operation. Any adverse effects can be
inhibited using an ASUB.

Controlling SERUPRO behavior


Machine data:
MD10708 $MN_SERUPRO_MASK
can be used to control the SERUPRO behavior as follows:

Stop at M0 during search phase.


Bit 0 = 0 NC is stopped at M0 during the search phase.
Bit 0 = 1 NC is not stopped at M0 during the search phase.

Allow part program command "START" if alarm 16942 is issued.


Bit 1 = 0 The alarm aborts the search phase during part program START.
Bit 1 = 1 The alarm is suppressed. A program uses part program command
"Start(j)" in channel i according to the following sequence:
The preselected program is started in channel j.
Channel j performs a real start with moving axes.
A program test can be selected beforehand in channel j
by the user. Channel j will now not select a search target.

Bit 2 Reserved

SERUPRO not ended simultaneously.


Bit 3 = 0 Switches the function off. All channels that find the search target (also for
self-acting SERUPRO) end SERUPRO at the same time.
Bit 3 = 1 SERUPRO ends as soon as the simulation has found the search target.
No further synchronization operations take place in the channels started
by SERUPRO.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 557
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Initial setting for SERUPRO


Machine data:
MD20112 $MC_START_MODE_MASK
is used to define the initial setting of the control for part program start with respect to G
codes (especially the current plane and settable zero offset), tool length compensation,
transformation, and axis couplings.
The special option exists for the SERUPRO operation of using machine data:
MD22621 $MC_ENABLE_START_MODE_MASK_PRT
to select an initial setting that differs from the normal part program start.
The new setting must be stored in machine data:
MD22620 $MC_START_MODE_MASK_PRT.

The meaning of the bits of MD22620 is identical to those of MD20112.


Example: The synchronous spindle coupling at the beginning of the SERUPRO operation is
retained for the part program start.

; synchronous spindle coupling not


configured
$MC_START_MODE_MASK = 'H400' ; is switched off
$MC_START_MODE_MASK_PRT = 'H00' ; remains active.
$MC_ENABLE_START_MODE_MASK_PRT = 'H01' ; $MC_START_MODE_MASK_PRT is
evaluated in SERUPRO instead of
$MC_START_MODE_MASK.

Identification of the active SERUPRO in the interface.


DB21, ... DBX318.1
The VDI signal from NCK channel (NCK→PLC)
DB21, ... DBX318.1 (block search via program test is active)
has the following meaning and effect:
The NC runs in the internal "Program test" mode until the target block of the search is
activated in the main run and the program status changes to "Stopped".
During this time, interface "Block search via program test is active" is set to 1.

Basic Functions
558 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

For user-defined ASUB after the SERUPRO operation

Note
If the machine manufacturer decides to start an ASUB after the SERUPRO operation as
described in item 7, the following must be observed:
Stopped status acc. to point 6.:
Machine data:
MD11602 $MN_ASUP_START_MASK
and
MD11604 $MN_ASUP_START_PRIO_LEVEL
allow the NCK to start the ASUB from stopped status automatically via the FC9 block.
Acknowledgement of FC9 only after completion of REPOS block:
The ASUB can only be signaled as complete from the FC9 block with "ASUB Done" if the
REPOS block has also been completed.
Deselection of assigned REPOS operation after Item 8:
The start of the ASUB deselects the assigned REPOS operation!
Therefore, the ASUB should be ended with REPOSA in order to retain the REPOS
operation.
Deleting an unwanted REPOS operation:
The unwanted REPOS operation is deleted by completing the ASUB with M17 or RET.
Special handling of ASUB:
As a basic rule, an ASUB that ends with REPOS and is started from stopped status receives
special treatment.
The ASUB stops automatically before the REPOS block and indicates this via:
DB21, ... DBX318.0 (ASUB is stopped)

Automatic ASUB start


The ASUB in path:
/_N_CMA_DIR/_N_PROG_EVENT_SPF
is started automatically in SERUPRO approach with machine data:
MD11450 $MN_SEARCH_RUN_MODE, Bit1 = 1
according to the following sequence:
1. The SERUPRO operation has been performed completely.
2. The user presses "Start".
3. Automatic ASUB start.
4. The NCK stops automatically before the REPOS part program command
and Alarm 10208 "Press NC Start to continue the program" appears.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 559
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

5. The user presses "Start" again.


6. The NCK executes the REPOS movement and continues the part program at the target
block.

Note
The automatic ASUB start with MD11450 requires Starts to continue the program.
The procedure is in this respect similar to other search types.

9.7.1 REPOS

MD11470
REPOS occurs according to machine data:
MD11470 $MN_REPOS_MODE_MASK
Case A:
The REPOS operation moves all axes from the current position to the start of the target
block in a single block.
MD11470 $MN_REPOS_MODE_MASK Bit 3 = 1
Case B:
The path axes are repositioned together in one block. The SPOS and POS axes are
repositioned in the residual block.
MD11470 $MN_REPOS_MODE_MASK Bit 3 = 0

9.7.1.1 Continue machining after SERUPRO search target found

User information regarding the REPOS operation


REPOS is generally used to interrupt an ongoing machining operation and to continue
machining after the interruption.
In the SERUPRO approach, on the other hand, a program section must be "executed" later.
This is the case, when SERUPRO has finished the simulation and is to be moved again to
the target block. SERUPRO refers to the existing REPOS function, which the user can adapt
as necessary.

SERUPRO approach
The user can change the REPOS behavior of individual axes at specific times to reposition
certain axis types either earlier, later, or not at all. This affects SERUPRO approach in
particular. Repositioning movements of some axes can also be controlled independently of
SERUPRO approach during the REPOS operation.

Basic Functions
560 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

CAUTION
The REPOS operation moves all axes from the current position to the start of the target
block in a single block with the appropriate setting of machine data:
MD11470 $MN_REPOS_MODE_MASK Bit 3.

During this process, the NC cannot detect any possible collisions with the machine or the
workpiece!
Protection zones and software limits are monitored.

Set REPOS response


Machine data:
MD11470 $MN_REPOS_MODE_MASK
can be used to set bits that specify the behavior of the NC during repositioning.

Bit 0 = 1 The dwell time is resumed at the point of interruption in the residual
repositioning block.
Bit 1 = 1 Reserved
Bit 2 = 1 Prevent repositioning of individual axes using VDI signals.
Bit 3 = 1 Reposition positioning axes in the approach block during block search via
program test (SERUPRO).
Bit 4 = 1 Positioning axes in approach block on every REPOS.
Bit 5 = 1 Modified feedrates and spindle speeds are valid immediately in the residual
block. Otherwise, not until the next block.
Bit 6 = 1 After SERUPRO, neutral axes and positioning spindles in the approach block
are repositioned as command axis.
Bit 7 = 1 The level of interface signal:
DB31, ... DBX10.0 (REPOSDELAY)
is read if REPOSA is interpreted.
Axes, which are neither geometry nor orientation axes, are then excluded by
REPOS and are not moved.

Repositioning with controlled REPOS


At any point during processing, a part program can be interrupted and an ASUB started with
a REPOS.
For path axes, the REPOS mode can be controlled by the PLC via VDI signals to reposition
on the contour. This mode is programmed in the part program and defines the approach
behavior. See "Repositioning to contour with controlled REPOS".
The REPOS behavior of individual axes can also be controlled via VDI signals
and is enabled with machine data:
MD11470 $MN_REPOS_MODE_MASK BIT 2==1.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 561
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Path axes cannot be influenced individually. For all other axes that are not geometry axes,
repositioning of individual axes can be prevent temporarily and also delayed. VDI signals can
be used to subsequently reenable or to continue blocking individual channel axes that
REPOS would like to traverse.

DANGER
Signal:
DB31, ... DBX2.2 (Delete distance-to-go, axis-specific)
produces the following dangerous behavior with ”Prevent repositioning of individual axes"
via:
MD11470 $MN_REPOS_MODE_MASK (Bit 2==1).
As long as an axis is programmed incrementally after the interruption, the NC approaches
different positions than those approached with no interruption (see example below).

Example: Axis is programmed incrementally


Axis A is positioned at 11° before the REPOS operation; the programmed operation in the
interruption block (target block for SERUPRO) specifies 27°.
Any number of blocks later, this axis is programmed to move incrementally through 5° with:
N1010 POS[A]=IC(5) FA[A]=1000.

With interface signal:


DB31, ... DBX10.0 (REPOSDELAY)
the axis does not traverse in the REPOS operation and is moved to 32° with N1010.
(The user may have to deliberately acknowledge the travel from 11° to 27°.)
Caution:
The axis is programmed incrementally after the interruption.
In the example, the NC moves to 16° (instead of 32°).
A) Start axes individually
The REPOS behavior for SERUPRO approach with several axes is selected with:
MD11470 $MN_REPOS_MODE_MASK BIT 3 == 1
The NC commences SERUPRO approach with a block that moves all positioning axes to the
programmed end and the path axis to the target block.
The user starts the individual axes by selecting the appropriate feedrate enables. The target
block motion is then executed.

Basic Functions
562 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

B) Reposition positioning axes in the repositioning block


Positioning axes are not repositioned in the residual block but rather in the repositioning
block, and their effect is not limited to the block search via program test on SERUPRO
approach.

MD11470 $MN_REPOS_MODE_MASK
Bit 3=1 for block search via program test (SERUPRO)
Bit 4=1 for each REPOS

Note
If neither bit 3 nor bit 4 is set, "non-path axes" are repositioned in the residual block in this
phase.

Prefer or ignore REPOS


Further REPOS adaptations can be made by setting the bits in:
MD11470 $MN_REPOS_MODE_MASK

Bit 5 = 1 Modified feedrates and spindle speeds are valid immediately in the residual
block and are given priority. This behavior relates to every REPOS operation.
Bit 6 = 1 Neutral axes and positioning spindles are repositioned after SERUPRO.
Neutral axes that are not allowed to be further repositioned must receive
interface signal:
DB31, ... DBX10.0 (REPOSDELAY)
This cancels the REPOS movement.
Bit 7 = 1 The level of interface signal:
DB31, ... DBX10.0 (REPOSDELAY)
is read if REPOSA is interpreted.
Axes, which are neither geometry nor orientation axes, are then excluded by
REPOS and are not moved.
Note: REPOSDELAY is changed from edge to level evaluation.

Delayed approach of axis with REPOS offset


With the axial level-triggered VDI signal axis/spindle (PLC→NCK):
DB31, ... DBX10.0 (REPOSDELAY)
with the edge of NST:
DB21, ... DBX31.4 (REPOSMODEEDGE)
the REPOS offset for this axis is traversed only after the next time it is programmed.
Whether this axis is currently subject to a REPOS offset can be scanned via synchronized
actions with $AA_REPOS_DELAY.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 563
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

CAUTION
Interface signal:
DB31, ... DBX10.0 (REPOSDELAY)
has no effect on machine axes that form a path.
Whether an axis is a path axis can be determined with:
DB31, ... DBX76.4 (path axis).

Acceptance timing of REPOS VDI signals


With the 0/1 edge of the channel-specific VDI signal (PLC→NCK):
DB21, ... DBX31.4 (REPOSMODEEDGE)
the level signals of:
DB21, ... DBX31.0-31.2 (REPOSPATHMODE0 till 2)
and
DB31, ... DBX10.0 (REPOSDELAY)
are transferred to the NC.
The levels relate to the current block in the main run. There are two different cases:
Case A:
One repositioning block of a currently active REPOS operation is contained in the main run.
The active REPOS operation is aborted, restarted and the REPOS offsets controlled via the
signals:
DB21, ... DBX31.0-31.2 (REPOSPATHMODE0 till 2)
and
DB31, ... DBX10.0 (REPOSDELAY).

Case B:
No repositioning block of a currently active REPOS operation is contained in the main run.
Each future REPOS operation wishing to reapproach the current main program block is
controlled by the level of interface signal:
DB21, ... DBX31.0-31.2 (REPOSPATHMODE0 till 2)
and
DB31, ... DBX10.0 (REPOSDELAY).

Basic Functions
564 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Note
In the running ASUB affects the NST:
DB21, ... DBX31.4 (REPOSMODEEDGE)
does not affect the final REPOS, unless this signal applies to the REPOS blocks.
In Case A, the signal is only allowed in the stopped state.
Response to RESET:
NCK has acknowledged the PLC signal
If the level of the signals:
DB21, ... DBX31.4 (REPOSMODEEDGE) = 1
and
DB21, ... DBX319.0 (REPOSMODEEDGEACKN) = 1
and
a RESET occurs in this situation, then the interface signal of the NCK:
DB21, ... DBX319.1–319.3 (Repos Path Mode Ackn0 to 2)
is deleted.
NCK has not yet acknowledged the PLC signal:
If the level of the signals:
DB21, ... DBX31. (REPOSMODEEDGE 4) = 1
and
DB21, ... DBX319.0 (REPOSMODEEDGEACKN) = 0
and a RESET occurs in this situation, the NCK cancels interface signal:
DB21, ... DBX319.0 (REPOSMODEEDGEACKN) = 0
and
DB21, ... DBX319.1–319.3 (Repos Path Mode Ackn0 to 2).

Controlling SERUPRO approach with VDI signals


The SERUPRO approach can be used with:
DB21, ... DBX31.4 (REPOSMODEEDGE)
and the associated signals in the following phases:
● Between "Search target found" and "Start SERUPRO ASUB"
● From "SERUPO-ASUB stops automatically before REPOS" to "Target block is executed"
While the SERUPRO ASUB is being executed, e.g. in the program section before the
REPOS operation, interface signal:
DB21, ... DBX31.4 (REPOSMODEEDGE)
does not affect the SERUPRO approach.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 565
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

REPOS operations with VDI signals


Control REPOS with VDI interface signals
REPOS offsets can be positively influenced with the following channel-specific VDI interface
signals from the PLC:
DB21, ... DBX31.0-31.2 (REPOSPATHMODE0 to 2) channel-specific *
DB21, ... DBX31.4 (REPOSMODEEDGE) channel-specific
DB31, ... DBX10.0 (REPOSDELAY) *axis/spindle
(This axial interface does not affect machine axes that form a path.)
DB31, ... DBX72.0 (REPOSDELAY) axis/spindle
* These signals are available in the respective DB of the HMI or PLC.

REPOS acknowledgement signals


The following VDI signals can be used to acknowledge from the NCK functions that control
the REPOS response via PLC:
DB21, ... DBX319.0 (REPOSMODEEDGEACKN) channel-specific
DB21, ... DBX319.1-319.3 (Repos Path Mode Ackn0 to 2) channel-specific
DB21, ... DBX319.5 (Repos DEFERRAL Chan) channel-specific
DB31, ... DBX70.0 (Repos offset) axis/spindle
DB31, ... DBX70.1 (Repos offset valid) axis/spindle
DB31, ... DBX70.2 (Repos Delay Ackn) axis/spindle
DB31, ... DBX76.4 (path axis) axis/spindle
For further information, see "REPOS offset in the interface"

REPOS acknowledgement operations


With the channel-specific VDI signal:
DB21, ... DBX319.0 (REPOSMODEEDGEACKN)
if a "handshake" is established by the interface signal:
DB21, ... DBX31.4 (REPOSMODEEDGE)
recognized by the NC and acknowledged with DB21, ... DBX319.0 to the PLC.

Note
If the NCK has not yet acknowledged interface signal:
DB21, ... DBX31.4 (REPOSMODEEDGE)
with interface signal:
DB21, ... DBX319.0 (REPOSMODEEDGEACKN)
a RESET in this situation causes the program to abort, and the REPOS that is to be used to
control the REPOSPATHMODE can no longer take place.

A REPOSMODE specified by the PLC from NCK with the interface signals:
DB21, ... DBX319.1-319.3 (Repos Path Mode Ackn0 to 2)

Basic Functions
566 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

and
DB31, ... DBX10.0 (Repos Delay)
with:
DB31, ... DBX70.2 (Repos Delay Ackn)
in the following way:
A part program is stopped at N20 (→ time (2) in figure). The NCK stops according to the
braking ramp. After the PLC has specified the REPOSPATHMODE, the NCK accepts the
REPOSPATHMODE with the 0/1 edge of REPOSMODEEDGE at → Time (3). Repos Path
Mode Ackn remains set until the ASUB is initiated (→ Time (4)). The REPOS command is
started in the ASUB (→ Time (5)). The ASUB RESET block is activated again (→ Time (6)):

 &RPPDQGLVVWDUWHGZLWK$683
 5HSRVLWLRQIURP5(326LV
WHUPLQDWHG
7KHUHPDLQLQJEORFNVWDUWV
1 

1  ,QLWLDWH$68% 1

 6HOHFW501
 6WRSSDUWSURJUDP

 6WDUWSDUWSURJUDP  7KHUHPDLQLQJEORFNLV
ILQLVKHG
5(3263$7+02'(

5(32602'(('*(

5(32602'(('*($&.1

5HSRV3DWK0RGH$FN
 

W    

Figure 9-6 REPOS sequence in part program with timed acknowledgement signals from NCK

NCK sets acknowledgement again


Phase with REPOSPATHMODE still active (residual block of the program stopped at → Time
(2) is not yet completely executed).
As soon as the REPOS repositioning motion of the ASUB is executed, the NCK sets the
"Repos Path Mode Ackn" again (→ Time (5)). If no REPOSPATHMODE has been
preselected via a VDI signal, the programmed REPOS mode is displayed.
"Repos Path Mode Ackn" is canceled when the residual block is activated (→ Time (6)).
The part program block N30 following the block at → Time (2) is resumed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 567
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Interface signal:
DB31, ... DBX70.2 (Repos Delay Ackn) is defined in the same way.
DB31, ... DBX70.1 (Repos offset valid) = 1, if:
DB21, ... DBX319.1-319.3 (Repos Path Mode Ackn0 to 2) = 4 (RMN).

Valid REPOS offset


When the SERUPRO operation is complete, the user can read out the REPOS offset via the
axis/spindle VDI signal (NCK→PLC):
DB31, ... DBX70.0 (REPOS offset).
The effects of this signal on the relevant axis are as follows:

Value 0: No REPOS offset is applied.


Value 1: REPOS offset is applied.

Range of validity
Interface signal:
DB31, ... DBX70.0 (REPOS offset)
is supplied at the end of the SERUPRO operation.
The REPOS offset is invalidated at the start of a SERUPRO ASUB or the automatic ASUB
start.

Updating the REPOS offset within the scope


Between the SERUPRO end and SERUPRO start, the axis can be moved in JOG mode with
a mode change.
In JOG mode, the user manually moves the axis over the REPOS offset path in order to set
interface signal:
DB31, ... DBX70.0 (REPOS offset) to the value 0.
Within the range of validity, the axis can also be traversed using FC18, whereby the IS
DB31, ... DBX70.0 (REPOS offset) is continuously updated.

Displaying the range of validity


The range of validity of the REPOS offset is indicated with interface signal:
DB31, ... DBX70.1 (REPOS offset valid)
It is indicated whether the REPOS offset calculation was valid or invalid:

Value 0: The REPOS offset of this axis is calculated correctly.


Value 1: The REPOS offset of this axis cannot be calculated, as the REPOS has not
yet occurred, e.g. it is at the end of the ASUB, or no REPOS is active.

Basic Functions
568 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

REPOS offset after an axis replacement


The group signal:
DB21, ... DBX319.5 (Repos DEFERRAL Chan)
can be used to determine whether a valid REPOS offset has taken place:

Value 0: All axes currently controlled by this channel have either no REPOS offset or
their REPOS offsets are invalid.
Value 1: Miscellaneous.

REPOS offset with synchronized synchronous spindle coupling


When repositioning with SERUPRO, processing continues at the point of interruption. If a
synchronous spindle coupling was already synchronized, there is no REPOS offset of the
following spindle and no synchronization path is present. The synchronization signals remain
set.

Search target found on block change


The axial VDI signal:
DB31, ... DBX76.4 (path axis)
is 1 if the axis is part of the path grouping.
This signal shows the status of the current block to be executed during block change.
Subsequent status changes are ignored.
If the SERUPRO operation is ended with "Search target found",
DB31, ... DBX76.4 (path axis) refers to the target block.

9.7.1.2 Repositioning on contour with controlled REPOS

Approach modes

Influence path axes individually


During SERUPRO approach, a REPOS operation is initiated in order to reposition to the
contour. A large number of axes, which the user can control by means of interface signals, is
frequently moved. The operator panel interface supplies the offsets per channel axis, which
REPOS intends to traverse.
Repositioning of the individual path axes can be controlled by the PLC with the interface
signals and it therefore has priority over the actual commands RMI, RMB and RME in the part
program.
RMI Repositioning to interruption point
RMB Repositioning to start of block
RME Repositioning to end-of-block position
RMN Repositioning to next point on path

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 569
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Repositioning with RMN


Like RMI, RMB and RME, RMN (REPOS Mode Next) is redefined for SUREPRO approach.
After an interruption, RMN is used not to complete an already started repositioning, but to
process from the next path point:
At the time REPOSA is interpreted, position (B) is referenced in order to find point C at the
interruption block with the shortest distance to B. The repositioning block moves from B to C
to the end position.

$$FWXDOSRVLWLRQGXULQJVHDUFK

%3RVLWLRQUHDFKHGXVLQJ-2*NH\
DIWHUWKH6(58352RSHUDWLRQ

&6(58352DSSURDFKPRYHVIURP%
WR&DV&LVWKHSRLQWQH[WWR%LQ
$ WDUJHWEORFN

$SDUWSURJUDPZLWKWKHEORFNV
% 

&

   

Figure 9-7 SUREPRO approach under RMN

Application and procedure


SUREPRO approach with RMN offers the oppotunity of using the application shown in the
figure: If a program abort is forced by RESET at any point when the program is advancing
from block 2 to 3,
● RMN is used to approach the abort location by the shortest route in order to process just
the distance to go from C-3 and 3-4. The user starts a SERUPRO operation at the
interruption block and uses the JOG keys to move in front of the problem component of
the target block.
● RMI and RMB are always approached with RMI and RMB and the target block thus
repeated once completely.

Basic Functions
570 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Selecting REPOS mode


With the channel-specific VDI signal (PLC→NCK)
DB21, ... DBX31.0-31.2 (REPOSPATHMODE0-2) the concerned function RMB, RMI, RME or
RMN can be selected with the 3 bits.
Repositioning point
RMNOTDEF REPOS Mode is not redefined
RMB Repositioning of block start point or last end point
RMI Repositioning interruption point
RME Repositioning end-of-block point
RMN Repositioning to next path point
DB21, ... DBX31.0-31.2 (REPOSPATHMODE)=0 corresponds to RMNOTDEF
DB21, ... DBX31.0-31.2 (REPOSPATHMODE)=1 corresponds to RMB
DB21, ... DBX31.0-31.2 (REPOSPATHMODE)=2 corresponds to RMI
DB21, ... DBX31.0-31.2 (REPOSPATHMODE)=3 corresponds to RME
DB21, ... DBX31.0-31.2 (REPOSPATHMODE)=4 corresponds to RMN
With DB21, ... DBX31.0-31.2 (REPOSPATHMODE0 to 2) = 0, no settings are overwritten
and the current program is valid. The interface signal responds to the level of the
corresponding mode.

Note
RMN is a general REPOS extension and it is not restricted to SERUPRO. For SERUPRO RMI
and RMB are identical.
With DB21, ... DBX31.0–31.2 (REPOSPATHMODE0 to 2), the path as a whole is controlled.
The path axes cannot be changed individually.
The behavior of the other axis types can be changed individually using interface signal
DB31, ... DBX10.0 (REPOSDELAY). This REPOS offset is not applied immediately, but only
when it is next programmed.
For further information on the programming of repositioning point, please refer to
References:
/PGA/ Job Planning Programming Manual; "Path Behavior" repositioning on Contour

Read REPOS mode in synchronized actions


The valid REPOS mode of the interrupted block can be read via synchronized actions using
system variable $AC_REPOS_PATH_MODE=

0: not defined Repositioning not defined


1: RMB Repositioning to beginning
2: RMI Repositioning to point of interruption
3: RME Repositioning to block end point
4: RMN Repositioning to next geometric path point of interrupted block

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 571
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.2 Acceleration measures via MD

Machine data settings


The processing speed of the entire SERUPRO operation can be accelerated using the
following machine data.
MD22600 $MC_SERUPRO_SPEED_MODE and
MD22601 $MC_SERUPRO_SPEED_FACTOR
With MD22600 $MC_SERUPRO_SPEED_MODE == 1, the SERUPRO operation will run at
the usual "dry run feedrate".
Through MD22600 $MC_SERUPRO_SPEED_MODE == 0
MD22601 $MC_SERUPRO_SPEED_FACTOR is evaluated,
and a further acceleration is permitted. Dynamic monitoring functions are disabled in this
mode.

SPEED factor for channel axes during ramp-up


Machine data MD22600 $MC_SERUPRO_SPEED_MODE is effective for the following
channel axes in the main run throughout the entire SERUPRO operation:
● PLC axes
● Command axes
● Positioning axes
● Reciprocating axes
The functions of MD22600 $MC_SERUPRO_SPEED_MODE and
MD22601 $MC_SERUPRO_SPEED_FACTOR apply only to SERUPRO and not to program
testing. In this case no axes/spindles are moved.

CAUTION
The NC as a discrete system generates a sequence of interpolation points.
It is possible that a synchronized action that was triggered in normal operation will no
longer be triggered in SERUPRO.

Mode of functioning with DryRun


An active SERUPRO SPEED-FACTOR has the following effect on DryRun:
● DryRun is activated simultaneously.
This causes a switch from G95/G96/G961/G97/G971 to G94 in order to execute
G95/G96/G961/G97/G971 as quickly as you wish.
● Tapping and thread cutting are performed at the usual velocity for DryRun.
DryRun and SERUPRO affect the spindle/axis with the following G codes:

Basic Functions
572 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

● G331/G332 causes the spindle to be interpolated as an axis in a path grouping. In the


case of tapping, the drilling depth (e.g. axis X) and the pitch and speed (e.g. spindle S)
are specified.
In the case of DryRun, the velocity of X is specified, the speed remains constant, and the
pitch is adjusted.
Following the SERUPRO simulation, the position for spindle S deviates from the normal
position because the spindle S has rotated less during simulation.

9.7.3 SERUPRO ASUP

SERUPRO ASUB special points


Special points should be noted for SERUPRO ASUB with regard to:
● Reference point approach: Referencing via part program G74
● Tool management: Tool change and magazine data
● Spindle ramp-up On starting a SERUPRO ASUB

G74 reference point approach


If statement G74 (reference point approach) is programmed between the program start and
the search target, this will be ignored by the NC.
SERUPRO approach does not take this G74 statement into account!

Tool management
If tool management is active, the following setting is recommended:
Set MD18080 $MA_TOOL_MANAGEMENT_MASK BIT 20 = 0.
The tool management command generated during the SERUPRO operation is thus not
output to the PLC!
The tool management command has the following effect:
● The NC acknowledges the commands automatically.
● No magazine data are changed.
● Tool data are not changed.
Exception:
The tool enabled during the test mode can assume 'active' status. As a result, the spindle
may contain the incorrect tool after the SERUPRO operation.
Remedy:
The user starts a SERUPRO ASUB that is actually traversed. Prior to the start, the user
can start an ASUB that loads the correct tool.
SERUPRO operation: Functionality: In sequence steps 2. to 6.
SERUPRO ASUB: Functionality: The sequence of point 7.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 573
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

In addition, machine data setting


MD18080 $MA_TOOL_MANAGEMENT_MASK Bit 11 = 1 is required because the ASUB
may have to repeat a T selection.
Systems with tool management and auxiliary spindle are not supported by SERUPRO!

Example
Tool change subroutine

PROC L6 ; Tool change routine


N500 DEF INT TNR_AKTUELL ; Variable for active T number
N510 DEF INT TNR_VORWAHL ; Variable for preselected T number

; Determine current tool


N520 STOPRE ; In program testing
N530 IF $P_ISTEST ; from the program context
N540 TNR_AKTUELL = $P_TOOLNO ; the "current" tool is read.
N550 ELSE ; Otherwise, the tool of the spindle
is read out.
N560 TNR_AKTUELL = $TC_MPP6[9998,1] ; Read tool T number on the spindle
N570 ENDIF

N580 GETSELT(TNR_VORWAHL) ; Read T number of preselected tool


of the master spindle. Execute tool
change only if tool not yet
current.
N590 IF TNR_AKTUELL <> TNR_VORWAHL ; Approach tool change position
N600 G0 G40 G60 G90 SUPA X450 Y300 Z300 D0
N610 M206 ; Execute tool change
N620 ENDIF
N630 M17

ASUB for calling the tool change routine after block search type 5

PROC ASUPWZV2
N1000 DEF INT TNR_SPINDEL ; Variable for active T number
N1010 DEF INT TNR_VORWAHL ; Variable for preselected T number
N1020 DEF INT TNR_SUCHLAUF ; Variable for T number determined in
block search
N1030 TNR_SPINDEL = $TC_MPP6[9998,1] ; Read tool T number on the spindle
N1040 TNR_SUCHLAUF = $P_TOOLNO ; read T number determined by search
run, i.e. that tool determines the
current tool offset.
N1050 GETSELT(TNR_VORWAHL) ; Read T number of preselected tool
N1060 IF TNR_SPINDEL ==TNR_SUCHLAUF GOTOF ;
ASUP_ENDE1

Basic Functions
574 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

N1070 T = $TC_TP2[TNR_SUCHLAUF] ; T selection by tool name


N1080 L6 ; Call tool change routine
;
N1085 ASUP_ENDE1: ;
N1090 IF TNR_VORWAHL == TNR_SUCHLAUF GOTOF ;
ASUP_ENDE
N1100 T = $TC_TP2[TNR_VORWAHL] ; Restore T preselection by tool name
;
N1110 ASUP_ENDE: ;
N1110 M90 ; Feedback to PLC
N1120 REPOSA ; ;ASUB end

In both of the programs PROC L6 and PROC ASUPWZV2, the tool change is programmed
with M206 instead of M6.
ASUB program "ASUPWZV2" uses different system variables to detect the progress of the
program ($P_TOOLNO) and represent the current status of the machine
($TC_MPP6[9998,1] ).

Spindle ramp-up
When the SERUPRO ASUB is started, the spindle is not accelerated to the speed specified
in the program because the SERUPRO ASUB is intended to move the new tool into the
correct position at the workpiece after the tool change.
A spindle ramp-up is performed with SERUPRO ASUB as follows:
● SERUPRO operation has finished completely.
● The user starts the SERUPRO ASUB via function block FC 9
in order to ramp up the spindle.
● The start after M0 in the ASUB does not change the spindle status.
● SERUPRO ASUB automatically stops before the REPOS part program block.
● The user presses START.
● The spindle accelerates to the target block state if the spindle was not programmed
differently in the ASUB.

Note
Modifications for REPOS of spindles:
The transitions of speed control mode and positioning mode must be taken into
consideration in the event of modifications in SERUPRO approach and spindle
functionality.
For further information about operating mode switchover of spindles, see
References: /FB1/ Function Manual, Basic Functions; Spindles (S1), 2.1 Spindle Modes.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 575
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.4 Self-acting SERUPRO

Self-acting SERUPRO
The channel-specific function "Self-acting SERUPRO" allows a SERUPRO sequence without
having to previously define a search target in a program of the associated SERUPRO
channels.
In addition, a special channel, the "serurpoMasterChan", can be defined for each "Self-acting
SERUPRO". A search target can be defined in this channel.
The "Self-acting SERUPRO" function supports the SERUPRO cross-channel block search.

Function
The "Self-Acting SERUPRO" operation cannot be used to find a search target. If the search
target is not reached, no channel is stopped. In certain situations, however, the channel is
nevertheless stopped temporarily. In this case, the channel will wait for another channel.
Examples are: Wait marks, couplings, or axis replacement.

Wait phase occurs


During this wait phase, the NC checks whether the channel "seruproMasterChan" has
reached a search target. If no search target is reached, the Wait phase is left.
If the search target is reached,
the SERUPRO operation is also ended in the channel. The "serupro-MasterChan" channel
must have been started in normal SERUPRO mode.

No wait phase occurs


"Self-Acting SERUPRO" is ended by M30 of the part program.
The channel is now in Reset state again.
A SERUPRO approach does not not take place.

Basic Functions
576 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Starting a group of channels


If a group of channels is only started with "Self-Acting SERUPRO", then all channels are
ended with "RESET".
Exceptions:
A channel waits for a partner channel that has not been started at all.
A cross-channel block search can be carried out as follows:
● Via the HMI, the user selects the channels that must work together (channel group).
● The user chooses an especially important channel from the channel group for which he
wants to select a search target explicitly (target channel).
● The HMI will then start SERUPRO on the target channel and "Self-Acting SERUPRO" in
the remaining channels of the channel group.
The operation is complete if each channel concerned has deleted "seruproActive".
"Self-acting SERUPRO" accepts no master channel on another NCU.

Activation
"Self-acting SERUPRO" is activated via the HMI as a block search start for the Type 5 block
search for target channel "seruproMasterChan".
No search target is specified for dependent channels started from the target channel.

9.7.5 Inhibit specific part of the program in the part program for SERUPRO

Programmed interrupt pointer


As a general rule, only the user of the machine knows the mechanical situation that is
currently being executed in the program. The user can use a "programmable interrupt
pointer" to suppress SERUPRO at a particular point in the program where complex
mechanical conditions prevail to enable user intervention.
Through suitable manipulation of the interrupt pointer, it is possible, with "search for interrupt
point", to resume processing to the search-suppressed location prior to the search-
suppressed location. Search-suppressed areas can also be defined in areas of the part
program in which the NCK is not allowed to resume processing.
The last block processed before the search-suppressed target area is used as a search
pointer.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 577
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Input program section


The IPTRLOCK and IPTRUNLOCK language commands mark search-suppressed sections
of the program. These language commands cannot be used in synchronized actions.

IPTRLOCK Start of search-suppressed program section


IPTRUNLOCK End of search-suppressed program section

IPTRLOCK
Freezes the interrupt pointer at the next "machine function block". This block is referred to
below as the Hold block. If a program abort occurs after IPTRLOCK, then the hold block is
used as a search pointer.
Machine function block
Is a single block (SBL1) that can be executed in the main run with a stop after each function
block.
IPTRUNLOCK
The interrupt pointer is repositioned at the current block at the time of the interrupt for the
subsequent program section.

Note
When a search target is found, the interrupt pointer is set to the hold block. The block search
can be repeated for a new search target with the same hold block.

A search-suppressed area in the part program can be detected using the $P_IPRTLOCK
variable.

Nesting rules
The following features regulate the interaction between NC commands IPTRLOCK and
IPTRUNLOCK with nesting and end of subroutine:
1. IPTRLOCK is activated implicitly at the end of the subroutine in which IPTRUNLOCK is
called.
2. IPTRLOCK in an untraceable section has no effect.
3. If subprogram1 calls subprogram2 in a search-suppressed area, subprogram2 remains
search-suppressed. IPTRUNLOCK in particular has no effect in subroutine 2.

Basic Functions
578 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Examples of nesting with two program levels


Nesting of search-suppressed program sections in two program levels.

; Interpretation of the blocks in an illustrative


sequence.
; Subprogram1 is prepared for the block search:
N10010 IPTRLOCK() ; Program level 1
N10020 R1 = R1 + 1 ;
N10030 G4 F1 ; hold block
of the search-suppressed program section starts
... ;
N10040 Subprogram2 ; Interpretation of subprogram2
... ; Program level 2
N20010 IPTRLOCK () ; is ineffective
... ;
N20020 IPTRUNLOCK () ; is ineffective
... ;
N20030 RET ;
... ;
N10050 IPTRLOCK() ;
N10060 R2 = R2 + 2 ;
N10070 G4 F1 ; End of search-suppressed program section

An interruption in a search-suppressed program section of the above program always


returns N10030 G4 F1 block.

With implicit IPTRUNLOCK


Nesting of search-suppressed program sections in two program levels with implicit
IPTRUNLOCK. The implicit IPTRUNLOCK in subprogram 1 ends the search-suppressed
area.

; Interpretation of the blocks in an illustrative


sequence.
; Subprogram1 is prepared for the block search:
N10010 IPTRLOCK() ; Program level 1
N10020 R1 = R1 + 1 ;
N10030 G4 F1 ; Hold block
... ; of the search-suppressed program section starts
as in previous example ;
N20030 RET ;
... ;
N10060 R2 = R2 + 2 ;
N10070 RET ; End of search-suppressed program section
N100 G4 F1 ; Main program is continued

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 579
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

An interruption in a search-suppressed program section of the above program always


returns N10030 G4 F1 block.
An interruption at N100 provides N100 again in SPARPRI

On one program level


Nesting of IPTRLOCK and IPTRUNLOCK on one program level

; Interpretation of the blocks in an illustrative


sequence
; Subprogram1 is prepared for the block search:
N10010 IPTRLOCK() ; Program level 1
N10020 R1 = R1 + 1 ;
N10030 G4 F1 ; hold block
of the search-suppressed program section starts
... ;
N10050 IPTRLOCK() ; is ineffective
... ;
N10060 IPTRUNLOCK() ; is ineffective
N10070 R2 = R2 + 2 ; End of search-suppressed program section
N100 IPTRLOCK() ; is ineffective
... ;

An interruption in a search-suppressed program section of the above program always


returns theN10030 G4 F1 block in SPARPI.
An interruption on N100 then provides N100 again.

Basic Functions
580 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Automatic interrupt pointer


In certain applications it can be useful to automatically define a prespecified type of coupling
as a search-suppressed area. The automatic interrupt pointer function is activated with
machine data
MD22680 $MC_AUTO_IPTR_LOCK.
● Bit 0 = 1: Electronic gearbox with EGON
● Bit 1 = 1: Axial leading value coupling with LEADON
This program section begins with the last executable block before the activation and ends
with the deactivation.
The automatic interrupt pointer is not active for couplings that were activated or deactivated
via synchronized actions.
Example: To declare axial master value coupling as search-suppressed:

N100 G0 X100 ;
N200 EGON(Y, "NOC", X, 1, ; search-suppressed program section starts
1)
N300 LEADON(A, B, 1) ;
... ;
N400 EGOFS(Y) ;
... ;
N500 LEADOF(A, B) ; search-suppressed program section ends
N600 G0 X200 ;

A program abort within search-suppressed program section (N200 - N500) always provides
the interrupt pointer with N100.

CAUTION
Using an overlap of the "programmable interrupt pointer" and
"automatic interrupt pointer" via machine data, the NC selects the largest possible search-
suppressed area.
A program may need a coupling for almost all of the runtime. In this case, the automatic
interrupt pointer would always point to the start of the program and the SERUPRO function
would in fact be useless.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 581
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.6 Special features in the part-program target block

9.7.6.1 STOPRE in the part-program target block

STOPRE block
The STOPRE block receives all modal settings from the preceding block and can, therefore,
apply conditions in advance in relation to the following actions:
● Synchronize program line currently processing with the main run.
● Derive modal settings for SERUPRO in order, for example, to influence this REPOS
motion on approach of SERUPRO.

Example 1
Position a Z axis by specifying an X axis setpoint.
When block "G1 F100 Z=$AA_IM[X]" is interpreted, the preceding STOPRE block ensures
synchronization with the main run. The correct setpoint of the X axis is thus read via $AA_IM
to move the Z axis to the same position.

Example 2
Read and correctly calculate external zero offset.

N10 G1 X1000 F100 ;


N20 G1 X1000 F500 ;
N30 G1 X1000 F1000 ;
N40 G1 X1000 F5000 ;
N50 SUPA G1 F100 X200 ; move external zero offset after 200
N60 G0 X1000 ;
N70 ... ;

Via an implicit STOPRE before N50, the NCK can read and correctly and correctly compute
the current zero offset.
For a SERUPRO operation on the search target N50 repositioning occurs in the SERUPRO
approach to the implicit STOPRE and the speed is determined from N40 with F5000.

Basic Functions
582 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Implicit preprocessing stop


Situations in which interpreter issues an implicit preprocessing stop:
1. In all blocks in which one of the following variable access operations occurs: -
Programming of a system variable beginning with $A...
-Redefined variable with attribute SYNR/SYNRW
2. On the following part program commands:
-Part program command MEACALC, MEASURE
-Programming of SUPA (suppress frames and online offsets)
-Programming of CTABDEF (start of curve table definition)
-Part program command WRITE/DELETE (write/delete file)
-Before the first WRITE/DELETE command in a sequence of such commands
-Part program command EXTCALL
-Part program command GETSELT, GETEXET
-Tool change and active fine tool offset FTOCON
3. On the following commands executions:
-Finishing of Type 1 search ("Search without calculation") and
Type 2 search with calculation ("Search at contour end point")
Note: Type 2 search "Block search at contour start point" has the same behavior.

9.7.6.2 SPOS in target block

SPOS
If a spindle is programmed with M3/M4 and the target block contains an SPOS command,
the spindle is switched over to SPOS on completion of the SERUPRO process (search
target located). This is indicated on the VDI interface.

9.7.7 Behavior during POWER ON, mode change and RESET

SERUPRO is inactive during POWER ON. The mode change is permitted during
SERUPRO. RESET will cancel SERUPRO and deselects the internally selected program
test. SERUPRO cannot be combined with other block search types.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 583
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.8 Special features of functions supported during SERUPRO

SERUPRO supports the following NC functions:


● Traversing to fixed stop: FXS and FOC automatically
● Force Control
● Synchronous spindle: Synchronous spindle grouping with COUPON
● Autonomous single-axis operations: the PLC-controlled axes
● Linkages: Setpoint and actual value couplings can be simulated
Master/slave for drives. These functions are closely simulated
by electronic gears. The relevant
Axial master value coupling restrictions must be considered in each case!
● Axis couplings
Coupled motion: Axis grouping with TRAILON and TRAILOF,
Traverse gantry axis couplings
Tangential control: Tangential follow-up of individual axes
● Axis functions
Axis enable,
Autonomous axis operations,
Axis transfer
● Gear stage change: During program test (not fully automatically)
● Overlaid movements: Superimposed motion interpolation
For more information about these functions, see the following subsections.

9.7.8.1 Travel to fixed stop (FXS)

FXS
The functionality of FOC is repeated automatically with REPOS and designated FXS-
REPOS below. Every axis is taken into account and the torque last programmed before the
search target is applied.
Furthermore, the meaning of system variable $AA_FXS is redefined for SERUPRO as
follows:
● $AA_FXS displays the current status of program simulation.
● $VA_FXS always describes the real machine status.
The two system variables $AA_FXS and $VA_FXS have the same values continuously
outside the SERUPRO function.
The user can treat FXS and FOC as special commands in a SERUPRO ASUB.

Basic Functions
584 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.8.2 Force Control (FOC)

System variables $AA_FOC, $VA_FOC


The meaning of system variable $AA_FOC is redefined for SERUPRO as follows:
● $AA_FOC represents the current status of program simulation.
● $VA_FOC always describes the real machine status.
The FOC-REPOS function behaves analogously to the FXS-REPOS function. The
functionality of FOC is repeated automatically with REPOS and is designated FOC-REPOS.
Every axis is taken into account and the torque last programmed before the search target is
applied.

Boundary condition
A continuously changing torque characteristic cannot be implemented with FOC-REPOS.

Example
A program moves axis X from 0 to 100 and activates FOC every 20 increments for 10
increments at a time. This torque characteristic is usually generated with non-modal FOC
and cannot, therefore, be traced by FOC-REPOS. FOC-REPOS will traverse axis X from 0 to
100, with or without FOC, according to the last programming.

Note
For further information about the SERUPRO block search in relation to FXS or
FOC, see
References: /FB1/ Function Manual Basic Functions; Traversing to Fixed Stop (F1), General
Functions

9.7.8.3 Synchronous spindle

The synchronous spindle can be simulated


The synchronous spindle operation with main spindle and any number of following spindles
can be simulated in all existing channels with SERUPRO.
For further information about synchronous spindles, see:
References: /FB2/ Function Manual, Extended Functions; Synchronous Spindle (S3)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 585
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.8.4 Couplings and master-slave

Setpoint and actual value couplings


The SERUPRO operation is a program simulation in Program Test mode with which setpoint
and actual value couplings can be simulated.

Specifications for EG simulation


For simulation of EG, the following definitions apply:
1. Simulation always takes place with setpoint coupling.
2. If under SERUPRO there are only some, i.e. not all, leading axes, the simulation is
aborted with Alarm 16952 "Reset Clear/No Start". This can occur with cross-channel
couplings.
3. Axes that have only one encoder from the point of view of the NCK and are operated with
external data cannot be simulated correctly. These axes must not be integrated in
couplings.

CAUTION
In order to be able to simulate couplings correctly, the couplings must have been
switched off previously.
This can occur with machine data MD10708 $MA_SERUPRO_MASK.

Specifications for coupled axes


The SERUPRO operation simulates coupled axes always assuming that they are setpoint
couplings. In this way, the end points are calculated for all axes that are used as target
points for SERUPRO approach. The coupling is also active with "Search target found". The
path from the current point to the end point is carried out for SERUPRO approach with the
active coupling.

LEADON
The following specifications apply for the simulation of axial master value couplings:
1. Simulation always takes place with setpoint coupling.
2. SERUPRO approach takes place with active coupling and an overlaid motion of the
following axis in order to reach the simulated target point.
The following axis that is moved solely by the coupling cannot always reach the target point.
In SERUPRO approach, an overlaid linear motion is calculated for the following axis to
approach the simulated point!

Basic Functions
586 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Reaching simulated target point for LEAD with JOG


At the time of "Search target found", the coupling is already active, especially for the JOG
movements. If the target point is not reached, SERUPRO approach can be used to traverse
the following axis with active coupling and an overlaid motion to the target point.

Note
For further information about the repositioning of soupled axes, see
"Continue machining after SERUPRO search target found".

Master-slave
During the block search, only the link status should be updated without calculating the
associated positions of the coupled axis.
A system ASUB can be started automatically after the block search is finished. In this
subroutine, the user can control the link status and the associated axis positions
subsequently. The information needed can be read from additional block search system
variables.
System variable for master/slave
The following system variables are needed for the position offset between the axes to be
coupled with the desired link status:

NCK variables Description


$P_SEARCH_MASLD[X] Slave* Position offset between slave and master axis when
the link is closed.
$P_SEARCH_MASLC[X] Slave* Current status of a master/slave link was changed
during block search.
$AA_MASL_STAT[X] Slave* Current status of a master/slave link active.
Slave* for slave axis identifier

Note
This block search for the master/slave link is effective only if the position offset between the
axes can be determined.
In order to determine the programmed positions, the axes to be linked must be in the same
channel at the time of the block search. If this is not the case, the block search is aborted
with alarm 15395.
Variables $P_SEARCH_MASLD, $P_SEARCH_MASLC and $AA_MASL_STAT are cleared
on MASLON.

For further information about the master/slave link, see:


References:
/FB3/ Function Manual Special Function; Speed/Torque Coupling (TE3), Master-Slave

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 587
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

The system ASUB is called progevent.spf and must be available in the /_N_CMA_DIR
directory. The contents might be as follows:
progevent.spf
X=Master axis, Y=Slave axis

Programming
N10 IF(($S_SEARCH_MASLC[Y]< >0) AND ($AA_MASL_STAT[Y]< >0))
N20 MASLOF(Y)
N30 SUPA Y=$AA_IM[X]-$P_SEARCH_MASLD[Y]
N40 MASLON(Y)
N50 ENDIF
N60 REPOSA

To ensure that the ASUB can be automatically started, the following machine data must be
set:
MD11602 $MN_ASUB_START_MASK = 'H03'
MD11604 $MN_ASUP_START_PRIO_LEVEL = 100
MD11450 $MN_SEARCH_RUN_MODE = 'H02'

Coupled axes
The following coupled axes links are compatible with the SERUPRO operation:
● Coupled motion TRAILON and TRAILOF
● Gantry axes
● Tangential control
● The activatable and deactivatable "master/slave" link as long as activation and
deactivation is not selective

Note
In case of the leading axis, whose following axes are in another channel, with:
MD22601 $MC_SERUPRO_SPEED_FACTOR = positive
the measure for acceleration of the processing speed does not work.

Coupled motion
The motion-synchronous action for coupled motion of an axis grouping with TRAILON,
TRAILOF is supported by SERUPRO.
For further information about coupled motion with TRAILON, TRAILOF please refer to
References:
/FB3/ Function Manual, Special Functions; M3, "Axis Couplings and ESR"
/PGA/ Job Planning Programming Manual; "Path Behavior" and "Motion-Synchronous
Actions"

Basic Functions
588 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Gantry axes
Mechanically linked machine axes can be moved without a mechanical offset using the
gantry axis function. This operation is simulated correctly with SERUPRO.
For further information about the functionality of gantry axes, refer to
References:
/FB3/ Function Manual Special Functions; G1, "Gantry Axes"

Tangential control
Tangential follow-up of individual axes is supported by SERUPRO.
For further information about tangential control, see:
References:
/FB3/ Function Manual Special Functions; T3, "Tangential Control"
If "overlaid movements" are used, only the block search via program test (SERUPRO) can
be used, since the overlaid movements are interpolated accordingly in the main run. This
applies in particular to $AA_OFF.

9.7.8.5 Axis functions

SERUPRO conditions
The special conditions for SERUPRO must be observed with axis enable, autonomous axis
operations, and axis replacement.

Axis enable
The axial IS DB31, ... DBX3.7 ("Program test axis/spindle enable") controls the axis enables
if no closed-loop controller enable is to (or can) be issued at the machine and is active only
during the program test or when SERUPRO is active.
It is possible, via the interface signal PLC → NCK
DB31, ... DBX3.7 (program test axis/spindle enable) to do this enabling. If the real servo
enable is missing during program testing or SERUPRO, the effect on the axes/spindles is as
follows:
● As soon as the simulated program run intends to move an axis/spindle, the message
"Waiting for axis enable" or "Waiting for spindle enable" is displayed and the simulation is
stopped.
● If, during a simulated movement, the VDI signal DB31, ... DBX3.7 (program test
axis/spindle enable) is canceled again, the alarm 21612: "Channel %1 axis %2 VDI signal
’servo enable’ reset during motion” is activated.

Autonomous axis operations


Autonomous single-axis operations are axes controlled by the PLC that can also be
simulated on SERUPRO. During SERUPRO operation, as in normal operation, the PLC can
take over or give up control of an axis. If required, this axis can also be traversed using

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 589
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

FC18. The PLC takes over control of the axis before the approach block and is responsible
for positioning this axis. This is valid for all block search types.
For further information about autonomous single-axis operations, see:
References:
/FB2/ Function Manual Extended functions; P2, "Positioning axes"

Axis replacement
Problem: A program moves an axis and gives up control before the target block with
WAITP(X). X is thus not subject to REPOS and the axis is not taken into account in
SERUPRO approach.
Via the machine data MD11470 $MN_REPOS_MODE_MASK, the following behavior can be
achieved for SERUPRO-REPOS:
The neutral axes are moved as "command axes" in the SERUPRO-REPOS. The axis
interpolates without a path context even it was last programmed as a path axis. In this
scenario, the velocity results from MD32060 $MA_POS_AX_VELO. After SERUPRO
approach, this axis is again neutral.
Neutral axes that are however not allowed to be repositioned must receive the axial VDI
signal “REPOSDELAY”. This deletes the REPOS movement.
Example:
After SERUPRO, one axis is deliberately moved in the synchronized action via technology
cycles. The command axes are always moved in the approach block, never in the target
block. The target block can only be changed if all command axes have been moved to the
end.

CAUTION
The PLC-controlled axis is not repositioned!
Axes enabled by RELEASE(X) before the target block are not repositioned.

Basic Functions
590 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.8.6 Gear stage change

Operational sequences
The gear stage change (GSW) requires physical movements from the NCK in order to shift
into a new gear.
In the SERUPRO operation, no gear stage change is required and is carried out as follows:
Some gears can only be changed when controlled by the NC, since either the axis must
oscillate or a certain position must be approached beforehand.
The gear stage change can be suppressed selectively for DryRun, program test, and
SERUPRO using bits 0 to 2 in MD35035 $MA_SPIND_FUNCTION_MASK.
The gear stage change must then be performed in REPOS; this will work even if the axis
involved is to be in "speed control mode" at the target block. In other cases, the automatic
gear stage change is denied with an alarm if, for example, the axis was involved in a
transformation or coupling between the gear stage change and the target block.

Note
For further information about gear stage changes in DryRun, Program test and SERUPRO,
see
References: /FB1/ Function Manual Basic Functions; Spindle Programming (S1)

9.7.8.7 Superimposed motion

Only SERUPRO
If "overlaid movements" are used, only the block search via program test (SERUPRO) can
be used, since the overlaid movements are interpolated accordingly in the main run. This
applies in particular to $AA_OFF.

Velocity profile instead of maximum axis velocity


During Program test, a velocity profile must be used, which allows "superimposed
movements" to be interpolated during the main run. It is thus not possible to interpolate at
the maximum axis velocity.
The axis velocity is set in "Dry run feedrate" mode using
SD42100 $SC_DRY_RUN_FEED.
The velocity of the SERUPRO operation is selected using
MD22600 $MC_SERUPRO_SPEED_MODE.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 591
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.8.8 REPOS offset in the interface

REPOS offset provided or valid


When the SERUPRO operation is finished, the user can use the OPI to read off the REPOS
offset applied via the REPOS process.
An axial interface bit is offered for this
DB31, ...DBX70.0 (REPOS offset).
Value 0 No REPOS offset has to be applied to this axis
Value 1 A REPOS offset has to be applied to this axis.
Scope: The axis-VDI-interface bit "REPOS offset" is provided when the SERUPRO operation
is finished. The "REPOS offset" is invalid when a SERUPRO ASUB starts or continues. The
axis can be moved in JOG mode with a mode change between the SERUPRO end and start
and the "REPOS offset" bit is continuously updated (i.e. the user traverses the REPOS offset
by hand and the bit changes to 0). In the scope, the axis can also be traversed using FC18,
with the "REPOS offset" continuously being updated.
The scope of "REPOS offset" is displayed with the axial VDI interface bit
DB31, ...DBX70.1 (REPOS offset valid):
Value 0 DB31, ... DBX70.0 (REPOS offset) has not been calculated as valid
Value 1 DB31, ... DBX70.0 (REPOS offset) has been calculated as valid

9.7.8.9 Making the initial settings more flexible

Initial setting/initial SERUPRO setting


Machine data MD20112 $MC_START_MODE_MASK defines the initial setting of the control
for part program start with respect to the G codes (especially the current plane and settable
zero offset), tool length compensation, transformation, and axis couplings. The special option
exists for the SERUPRO operation of using
MD22620 $MC_ENABLE_START_MODE_MASK_PRT
to select an initial setting that differs from the normal part program start. The new setting
must therefore been stored in:
MD22620 $MC_START_MODE_MASK_PRT
The meaning of the bits of MD22620 is identical to those of:
MD20112 $MC_START_MODE_MASK.

Basic Functions
592 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Example
The synchronous spindle coupling at the beginning of the SERUPRO operation is retained
for the part program start.

; synchronous spindle coupling not


configured
$MC_START_MODE_MASK = 'H400' ; is switched off
$MC_START_MODE_MASK_PRT = 'H00' ; remains active
$MC_ENABLE_START_MODE_MASK_PRT = 'H01' ; $MC_START_MODE_MASK_PRT is evaluated
in SERUPRO instead of
$MC_START_MODE_MASK

9.7.9 System variables and variables for SERUPRO sequence

SERUPRO detection
The SERUPRO sequence can be detected using the following system variables:
$P_ISTEST is TRUE (valid also for program test)
$P_SEARCH is set to 5 (search in extended program test)
$AC_ASUP Bit 20 in system ASUB is set after the search target
is found (SERUPRO operation step 8.)
$P_ISTEST AND (5 == $P_SEARCHL) reliably detects SERUPRO.
$AC_SEARCH is not supplied by the SERUPRO operation.

Note
$P_SEARCHL is set at the beginning of the SERUPRO operation and
reset on RESET. As a result, $P_SEARCHL continues to be set in the SERUPRO ASUB and
in the residual part program and can continue to be evaluated.
In contrast, the $P_ISTEST variable is set only in the SERUPRO operation and is thus
suitable for search-specific adaptation of programs.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 593
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

Synchronized action
SERUPRO can be scanned in a synchronized action using system variable
$AC_SERUPRO = TRUE.
SERUPRO Updated REPOS acknowledgements can be scanned via:

"Program-sensitive system variable" Description


$AC_REPOS_PATH_MODE Type of REPOS MODE
$AA_REPOS_DELAY REPOS suppression is currently active
for this axis

$AC_SERUPRO and $P_ISTEST, if SERUPRO is still active in the main run

Note
During interpretation of system variables $P_ISTEST and $AC_SERUPRO, a check is made
to determine whether the SERUPRO target block has already been found.
If so, an implicit preprocessing stop is inserted before the two system variables are
evaluated.
As a result, interpretation is halted and not continued again until SERUPRO is deactivated in
the main run as well. The decision as to whether SERUPRO must be active or inactive is
then made correctly.

Additional variable for interpretation during simulation search


In JOG and MDA modes, NC variable "selectedWorkPProg" can be used to select whether
the previously selected program or the program to be simulated is to be displayed in the HMI
during the simulation, e.g. with SERUPRO. For more information, refer to
References: /LIS2/ Lists (Book 2), Section "Variables".

Basic Functions
594 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Block search Type 5 SERUPRO

9.7.10 Restrictions

Conditional use
SERUPRO supports the following NC functions subject to certain restrictions:

NCK functionality Restrictions


Master/slave for drives Selective enabling and disabling of the master/slave link with
and SERUPRO MASLON active
Axis enables and SERUPRO Real servo enable missing during program testing
Axis replacement and SERUPRO Axes traversing as path axes before RELEASE are ignored on
REPOS

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 595
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8 Program operation mode

PLC, MD, operation


The execution of part programs can be controlled via the HMI in many ways using PLC
inputs, machine data settings and operator inputs.

Definition
The execution of part programs or part program blocks in AUTOMATIC or MDA modes is
referred to as program operation.

Channel control
Every channel can be manipulated by means of interface signals from the PLC. The control
is exercised via mode group-specific or channel-specific interface signals. An overview of
these signals is given under data lists in this Function Manual.

Status messages
Each channel reports its current program operation status to the PLC with interface signals.
These signals are, in turn, divided up into mode group-specific and channel-specific signals.

9.8.1 Initial settings

Machine data
Defined conditions can be set via machine data for the program operation or certain
implementations of the NC language scope.

MD settings

Initial settings
Initial settings can be programmed in channel-specific machine data for each channel.
These initial settings affect, for example, G groups and auxiliary function output.

Basic Functions
596 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Auxiliary function output


The timing for output of auxiliary functions can be predefined via machine data
AUXFU_x_SYNC_TYPE (MD22200, 22210, 22220, 22230, 22240, 22250, 22260),
(output timing for M, S, T, H, F, D, E functions). For further information, see:
References:
/FB1/ Function Manual Basic Functions; Auxiliary Function Outputs to PLC (H2)

G groups
An initial programming setting can be specified for each of the available G groups using
MD20150 $MC_GCODE_RESET_VALUES (reset state of G groups). This initial setting is
automatically active during program start or in Reset until it is deselected by a G command
from the same G group.
Via the MD22510 $MC_GCODE_GROUPS_TO_PLC (G codes, which are output to interface
NCK-PLC after block change/RESET), the output of the G codes to the PLC interface can be
activated.
A list of G groups with the associated G functions is available in:
References:
/PG/ Programming Manual Fundamentals

Basic configurations of the NC language scope for SINUMERIK solution line


For SINUMERIK 840D sl, certain basic configurations of the NC language scope can be
generated (configurable) via machine data. The options and functions of the NC language
scope is specially tailored (configured) to the needs of the user.

NC language scope
The way that non-active options and functions should be moved with NC language
commands can be set via the machine data MD10711
$MN_NC_LANGUAGE_CONFIGURATION:
0: All available language commands can be programmed. Whether or not the needed
function is activated can only be recognized upon execution. This corresponds to the default
setting for previous controls such as SINUMERIK 840D and 840Di.
If only certain options are enabled and not all operations are available:
1: All the language commands are known. Language commands for non-enabled options are
already recognized at the beginning of the program interpretation and lead to the alarm
12553 "option/function is not active."

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 597
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

2: Only those language commands are known, which correspond to the current scope of
enabled options of the NCK software. All commands for non-enabled options are not
recognized and trigger the alarm 12550 "Name not defined or option/function not available".

Note
Option-free functions also have the status "enable option"

If only certain functions activated are:


3: All the language commands are known. Non-activated functions are already recognized at
the beginning of the program interpretation and result in the alarm 12553 "Option/function is
not active". For example, if the option date is set for the cylinder coat transformation, but the
transformation is not activated in machine data MD24100 $MC_TRAOF_TYPE_1, then the
programming of TRACYL triggers the alarm 12553.
4: Only those NC language commands are known, which correspond to the current scope of
active functions of the NCK software. All commands for non-active functions are not
recognized and trigger the alarm 12550 "Name not defined or option/function not available".
Whether the command in question is generally unavailable in the Siemens NC language or
whether this is true only on the corresponding system cannot be distinguished in this
scenario.
Whether the current NC language scope of enabled options and active functions is also truly
programmable can be checked using the STRINGIS program command, see example.

Check sample application for NC language scope on cylinder jacket transformation TRACYL
The cylinder jacket transformation is optional and must be enabled beforehand. In order to
check this, the following initial conditions are assumed:
The cylinder coat transformation option is not enabled and the machine data
$MN_NC_LANGUAGE_CONFIGURATION = 2; NC language command TRACYL is unknown
The following program is started

N1 R1=STRINGIS("TRACYL") ;R1 is 0 (TRACYL is an unknown name)


N2 IF STRINGIS("TRACYL") ==204
N3 TRACYL(1, 2, 3) ;block is not interpreted
N4 ELSE
N5 G00
N6 ENDIF
N7 M30

Basic Functions
598 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Example of whether STRINGIS result is programmable or not


The result of STRINGIS = number-coded return value (three-digit)
Number coding of the basic information (1st digit from the left):
000 Name is unknown, programming is denied with Alarm 12550
100: Name is known but cannot be programmed, triggers alarm 12533
200: Name/symbol is known, but interpretation is not possible
2xx: Name/symbol is known, the command can be programmed, if xx > 0
Definition for name/symbol:
Name: Any STRING that is checked to see
whether it is a component of the NC language in the existing NCK version or configuration.
Symbol: contains the description or significance of an NC language command that is needed
for the NC program and cycle interpretation.
Dependent on machine data MD10711
$MN_NC_LANGUAGE_CONFIGURATION = (set value) results in the following interpretations
of the option and function relative to their programmability 2xx:

Table 9- 1 Setting options

MD10711 = 0 1 2 3 4
Option Function Return value as the basic information (1st digit from the left)
0 0 2 1 0 1 0
1 0 2 2 2 1 0
1 1 2 2 2 2 2
0 1 2 1 0 1 0
Definition for option/function:
0 corresponds to option not activated or function deactivated
1 corresponds to option/activated or function activated
For more detailed information on the value ranges of 2xx programmable functions, see
References:
/PGA/ Job Planning Programming Manual; Other Functions, "STRINGIS"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 599
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.2 Selection and start of part program or part-program block

Reset status

Channel status
A part program can be selected only if the relevant channel is in the Reset state.

Start command, channel status


There are two possible START commands for initiating processing of a part program or part
program block:
● The channel-specific interface DB21, ... DBX7.1 (NC Start), which is usually controlled
from the machine control panel key NC Start, starts program execution in the same
channel.
● With the NC instruction START, program execution in the first channel can be started
from the second channel, for example (for further information, see Section on Channel
synchronization).
The START command can only be executed in AUTOMATIC and MDA modes. For this, the
channel concerned must be in the following state:
DB21, ... DBX35.7 (channel status reset) or
DB21, ... DBX35.6 (channel status interrupted).

Signals, Alarms

Required signal states


The part program can now be enabled for execution in the channel with the START
command on the condition that certain signal states exist on the machine.
The following enable signals are relevant on the VDI interface:
● DB11 DBX4.4 (Mode group ready) must be present
● DB11 DBX0.7 (mode group reset) must not be present
● DB21, ... DBX1.7 (activate program test) must not be present
● DB21, ... DBX7.0 (NC start disable) must not be present
● DB21, ... DBX7.2 (NC stop at the block limit) must not be present
● DB21, ... DBX7.3 (NC Stop) must not be present
● DB21, ... DBX7.4 (NC Stop axes plus spindle) must not be present
● DB21, ... DBX7. 7 (Reset) must not be present
● DB10 DBX56.1 (Emergency stop) may not be present
● No axis or NCK alarm must be active
For a further explanation of the individual signals see Chapter 5.

Basic Functions
600 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Execution of command
The part program or the part program block is automatically executed and the the following
interface signals are set:
DB21, ... DBX35.5 (channel status reset)
DB21, ... DBX35.0 (program status running)
The program is processed until the end of the program has been reached or the channel is
interrupted or aborted by a STOP or RESET command.

Alarms
Under certain conditions the START command will have no effect and one of the following
alarms will be triggered:
● 10200 "No NC Start permitted with active alarm"
● 10202 "No NC Start permitted with active command" (see /DA/)
● 10203 "No NC Start permitted for non-referenced axes"

9.8.3 Part-program interruption

"Interrupted" status

Channel status
The STOP command is executed only if the channel concerned has the status
IS DB21, ... D35.5 ("Channel active").

STOP commands
There are various commands that stop the program execution and set the channel status to
"interrupted". These are in particular the interface signals:
● DB21, ... DBX7.2 ("NC stop at the block limit)
● DB21, ... DBX7.3 ("NC stop")
● DB21, ... DBX7.4 ("NC stop, axes plus spindles")
● DB21, ... DBX2.0 ("Single block")
● Programming command "M00" or "M01".
For a further explanation of the individual interface signals, please see
References: /FB1/ Function Manual Basic Functions; NC/PLC interface signals (Z1), for
explanations of the individual part program instructions, see:
References: /PG/ Programming Manual Fundamentals; see "List of Instructions"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 601
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Execution of command
After execution of the STOP command, the IS DB21, ... DBX35.3 ("Program status
interrupted") is set. Processing of the interrupted program can continue from the point of
interruption with the command START.
The following actions are executed when the STOP command is triggered:
● Part program execution is stopped at the next block limit (with NC stop at block limit,
M00/M01 or single block), processing is stopped immediately with the other STOP
commands.
● Any auxiliary functions of the current block not yet output, are no longer output.
● The axes of each channel are brought to a standstill along a braking ramp and part
program execution is then stopped.
● The block indicator stops at the point of interruption.

Possible actions in the interrupt state


The following actions can be executed when the part program has been interrupted (program
status stopped, channel interrupted):
● Overstoring
References:
/BEM/, Operating Manual HMI Embedded
● Block search
References:
/BEM/ Operating Manual HMI Embedded
● Repositioning at contour (machine function REPOS)
References:
/BEM/ Operating Manual HMI Embedded
● Oriented tool retraction
References:
/PGA/ Programming Manual, Advanced
● Interrupt routine (see )
● DRF-Function, Displacement of the workpiece zero
References: /FB2/ Function Manual, Extended Functions; Manual and Handwheel Travel (H1)
● Starting the interrupted program with the interface signal:
DB21, ... DBX7.1 (NC start) or
via NC instruction START from another channel.

Basic Functions
602 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.4 RESET command

Command priority

Channel status
The RESET command can be executed in every channel state. This command is aborted by
another command.

Commands

RESET-Command
The following Reset commands are available:
● DB11, ... DBX0.7 ("mode group reset")
● DB21, ... DBX7.7 ("Reset")
For a further explanation of the individual interface signals, please see
References: /FB1/ Function Manual Basic Functions; NC/PLC interface signals (Z1)
A RESET command can be used to interrupt an active part program or a part program block
(in MDA).
After execution of the Reset command, the interface signal DB21, ... DBX35.7 ("Channel
status Reset") is set.
The part program cannot be continued at the point of interruption. All the axes of the channel
go into exact stop unless they are in follow-up mode. The same applies to the spindles
configured in the channel.
The following actions are executed when the RESET command is triggered:
● Part program preparation is stopped immediately.
● Axes and, if they exist, spindles in the channel are decelerated along a braking ramp.
● Any auxiliary functions of the current block not yet output, are no longer output.
● The block indicator is reset to the beginning of the part program.
● All Reset alarms (channel-specific, axis-specific, spindle-specific) are cleared from the
display.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 603
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.5 Program status

Interface information
The status of the selected program is displayed in the interface for each channel.
The PLC can then trigger certain responses and interlocks configured by the manufacturer
depending on the status.
The program status is only displayed in the AUTOMATIC and MDA modes. In all other
modes the program status is aborted or interrupted.

Program statuses
The following program statuses are available at the interface:
● DB21, ... DBX35.4 ("Program status aborted")
● DB21, ... DBX35.3 ("program status interrupted")
● DB21, ... DBX35.2 ("Program status stopped")
● DB21, ... DBX35.1 ("Program status wait")
● DB21, ... DBX35.0 ("Program status running")
For a further explanation of the individual interface signals, please see
References: /FB1/ Function Manual Basic Functions; NC/PLC interface signals (Z1)

The effect of commands/signals


The program status can be controlled by activating different commands or interface signals.
The following table shows the resulting program status when these signals are set
(assumption: status before the signal is set -> Program status running).

Table 9- 2 Effect on program status

Commands Program execution statuses


Aborted Interrupted Stopped Wait Running
IS "Reset" X
IS "NC Stop" X
IS "NC stop at block limit" X
IS "NC stop axes and spindles" X
IS "Read-in disable" X
IS "Feed stop, channelsp." X
IS "Feed stop, axissp." X
Feed override = 0% X
IS "Spindle stop" X
M02/M30 in a block X
M00/M01 in a block X
IS "Single block" X
IS "Delete distance-to-go" X
Auxiliary functions output to PLC but X
not yet acknowledged
Wait instruction in program X

Basic Functions
604 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.6 Channel status

Interface representation
The current channel status is displayed in the interface. The PLC can then trigger certain
responses and interlocks configured by the manufacturer depending on the status at the
interface.
The channel status is displayed in all operating modes.

Channel statuses
The following channel statuses are available at the interface:
● DB21, ... DBX35.7 ("channel status reset")
● DB21, ... DBX35.6 ("channel status interrupted")
● DB21, ... DBX35.5 ("channel status reset")
For a further explanation of the individual signals see Chapter 5.

The effect of commands/signals


The channel status can be modified through the activation of various commands or interface
signals. The following table shows the resulting channel status when these signals are set
(assumed status before the signal is set - > Channel status active).
The "Channel status active" signal is obtained when a part program or
part program block is being executed or when the axes are traversed in JOG mode.

Resulting channel status


Commands
Reset Interrupted Active
IS "Reset" X
IS "NC Stop" X
IS "NC stop at block limit" X
IS "NC stop axes and spindles" X
IS "Read-in disable" X
IS "Feed stop, channelsp." X
IS "Feed stop, axissp." X
Feed override = 0%
IS "Spindle stop" X
M02/M30 in a block X
M00/M01 in a block X
IS "Single block" X
IS "Delete distance-to-go" X
Auxiliary functions output to PLC but X
not yet acknowledged
Wait instruction in program X

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 605
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.7 Responses to operator or program actions

Status transitions
The following table shows the channel and program statuses that result after certain operator
and program actions.
The left-hand side of the table shows the channel and program statuses and the mode
groups from which the initial situation can be selected. Various operator/program actions are
listed on the right-hand side of the table, the number of the situation after the action has
been carried out is shown in brackets after each action.

Table 9- 3 Responses to operator or program actions

Situation Channel Program status Active mode Operator or program action (Situation after the action)
status
R U A N U S W A A M J
1 x x x RESET (4)
2 x x x RESET (5)
3 x x x RESET (6)
4 x x x NC Start (13); Mode change (5 or 6)
5 x x x NC Start (14); Mode change (4 or 6)
6 x x x Direction key (15); Mode change (4 or 5)
7 x x x NC Start (14)
8 x x x NC Start (15)
9 x x x NC Start (13); Mode change (10 or 11)
10 x x x NC Start (16); Mode change (9 or 11)
11 x x x Direction key (17); Mode change (9 or 10)
12 x x x NC Start (13); Mode change (10 or 11)
13 x x x NC Stop (12)
14 x x x NC Stop (7); at block end (5)
15 x x x NC Stop (8); at JOG end (6)
16 x x x NC Stop (10); at block end (10)
17 x x x NC Stop (11); at JOG end (11)
18 x x x Reset (4); wait for other channel (18)

Channel status Program status Operating modes


R --> aborted N --> aborted A --> aborted
U --> interrupted U --> interrupted M --> aborted
A --> running S --> stopped J --> aborted
W --> waiting
A --> running

Basic Functions
606 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.8 Part-Program Start

Start handling

Table 9- 4 Typical program sequence

Sequence Command Conditions Comments


(must be satisfied before the
command)
1 Load program (via the operator
interface or part program)
2 Select AUTOMATIC mode
3 Program preselection Channel preselected
Preselected channel in
RESET state
User ID sufficient for
program preselection
4 NC start for preselected channel NC start disable not
available
Reference point approached in
all
axes
5 Program execution
6 M02/M30/RESET None End of program

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 607
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.9 Example of timing diagram for a program run

Signal sequences

1&67$57 IURP3/&+0,&20;XVHUODQJXDJH
1&6723 IURP3/&+0,&20;XVHUODQJXDJH
,61&67$57',6$%/( '%'%;

,65HDGLQGLVDEOH '%'%; 

,6$[LVFRQWUROOHUHQDEOH '%'%;
,6)HHG6723 '%'%;

,66SLQGOHFRQWUROOHUHQDEOH '%'%;
,66SLQGOH6723 '%'%;


,63URJUDPVWDWXVUXQQLQJ '%'%;
,63URJUDPVWDWXVLQWHUUXSWHG '%'%;
,63URJUDPVWDWXVVWRSSHG IURP1&.  
 '%'%;
,63URJUDPVWDWXVDERUWHG IURP1&.  
 '%'%;

,67UDYHOFRPPDQG;D[LV IURP1&.  '%'%%


,6([DFWVWRSILQH IURP1&.  '%'%;

,66SLQGOHVWDWLRQDU\ IURP1&.  '%'%;

,66SLQGOHLQVHWSRLQWUDQJH IURP1&.
 '%'%;
3URJUDP
/LQNYLD3/&XVHUSURJUDP 1**;
$X[)0IURP3/&XVHUSURJUDPFRPSOHWHG 06)
LHEORFN1FRPSOHWHG $X[)RXWSXWGXULQJWUDYHUVH 0,I10,I
3URJUDPVWRSSHGZLWKUHDGLQGLVDEOH 6SLQGOHUDPSXS $[LVUXQQLQJ 
3URJUDPDERUWHGZLWK5(6(7

Figure 9-8 Examples of signals during a program run

Basic Functions
608 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.10 Program jumps

9.8.10.1 Jump back to start of program

Function
With the function "Jump back to start of the program" the control jumps back from a part
program to the beginning of the program. The program is then processed again.
As compared to the function "Program jumps to jump marks", with which a repeated
processing of the program can also be implemented, the function "Jump back to the start of
the program" offers the following advantages:
● The programming of a jump mark at the start of the program is not necessary.
● The program restart can be controlled through the NC/PLC interface signal:
DB21, ... DBX384.0 (control program branching)
● The timer for the program runtime can be reset to "0" at the restart of the program.
● The timer for workpiece counting can be incremented by "1" at program restart.

Application
The function is used, if the processing of subsequent workpieces is to be done through an
automatic program restart e.g. in case of turning machine with bar loader/-changer.

Activation
The jump back takes place only when the following NC/PLC interface signal is set:
DB21, ... DBX384.0 (control program branching) = 1
If the signal is at "0", then no jump back is exected and the program processing is continued
with the next part program block after the function call.

Parameter assignment
Program runtime
The runtime of the selected NC program is stored in the system variable $AC_CYCLE_TIME.
When starting a new program, the system variable is automatically reset to "0"(see Chapter
" Program runtime (Page 712)")
Via the following machine data it can be set that the system variable $AC_CYCLE_TIME is
reset to "0" even in case of a program restart through the function "jump back to start of
program":
MD27860 $MC_PROCESSTIMER_MODE (Activation of the program runtime measurement)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 609
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Bit Value Description


8 0 $AC_CYCLE_TIME is not reset to "0" by the function "jump back to start of program".
1 $AC_CYCLE_TIME is reset to "0" by the function "jump back to start of program".

Note
In order that the setting of bit 8 can become effective, the measurement of the current
program runtime must be active (MD27860 bit 1 = 1).

Workpiece count
After the part program end (M02/M30) has been attained, the activated workpiece counters
($AC_TOTAL_PARTS/$AC_ACTUAL_PARTS/$AC_SPECIAL_PARTS) are incremented by
"1" (see Chapter " Workpiece Counter (Page 718)").
Via the following machine data it can be set that the activated workpiece counter is
incremented even in case of a program restart through the function "jump back to start of
program":
MD27880 $MC_PART_COUNTER (activation of workpiece counters)

Bit Value Description


In case of a program restart through the function "jump back to start of program",
the workpiece counter:
7 0 $AC_TOTAL_PARTS is not incremented.
1 $AC_TOTAL_PARTS is incremented.
11 0 $AC_ACTUAL_PARTS is not incremented.
1 $AC_ACTUAL_PARTS is incremented.
15 0 $AC_SPECIAL_PARTS is not incremented.
1 $AC_SPECIAL_PARTS is incremented.

Programming
The function is called in the main or the part program via the command GOTOS.

Syntax: GOTOS

Parameters: none

Application in synchronized actions: not possible

Note
GOTOS internally initiates a STOPRE (pre-processing stop).

Basic Functions
610 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Example

Programming Comment
N10 ... ; Beginning of the program
...
N90 GOTOS ; Jump to beginning of the program
...

9.8.11 Program section repetitions

9.8.11.1 Overview

Function
The program section repetition allows the repetition of any labeled section of a part program.
For more information on labels, please see:
References:
/PG/ Programming Manual Fundamentals; Program Jumps and Program Repetitions

Definition options of part program sections


The program repetition offers various options for defining a part program section that is
supposed to be repeated:
● A single part program block
● A part program section after a start label
● A part program section between a start label and end label
● A part program section between a start label and the key word: ENDLABEL
References:
/PGA/ Job Planning Programming Manual; Chapter "Program Coordination"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 611
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.11.2 Individual part program block

Functionality
Via REPEATB (B=Block) in part program block N150, the part program processing branches
to the part program block N120 that is labeled START_1. This is repeated x number of times.
If P is not specified, the program section is repeated exactly once. After the last repetition,
the part program is continued with the part program block N160 following the
REPEATBinstruction.

:
N100 ...
N120 START_1: ... ; Label: START_1
N130 ...
N140 ...
N150 REPEATB START_1 P=n ; Repetition after: START_1
N160 ...
:

Note
Label search direction
The part program block identified by the label can appear before or after the REPEATB
statement. The search initially commences toward the start of the program. If the label is not
found, a search is made in the direction of the program end.

Programming

Syntax: REPEATB <Label> [P=n]


Label Start label to which the instruction: REPEAT branches
Type: String
P Number of repetitions
n Number of repetitions
Type: Integer

Basic Functions
612 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.11.3 A part program section after a start label

Functionality
Via REPEAT in part program block N150, the part program processing branches to the part
program block N120 that is labeled START_1. This part program block and all of the
following part program blocks (N130 and N140) are repeated x number of times up to the
part program block that contains the REPEATinstruction (N150). If P is not specified, the part
program section (N120 - N140) is repeated exactly once. After the last repetition, the part
program is continued with the part program block N160 following the REPEATinstruction.

:
N100 ...
N120 START_1: ... ; Start label: START_1
N130 ...
N140 ...
N150 REPEAT START_1 P=n ; Repetition after: START_1
N160 ...
:

Note
Label search direction
The part program block marked with the Start label must come before the
REPEATinstruction.

Programming

Syntax: REPEAT <Label> [P=n]


Label Start label to which the instruction: REPEAT branches
Type: String
P Number of repetitions
n Number of repetitions
Type: Integer

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 613
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.11.4 A part program section between a start label and end label

Functionality
Via REPEAT in part program block N160, the part program processing branches to the part
program block N120 that is labeled START_1 with a start label. This part program block and
all the part program blocks up to and including the part program block marked with the end
label END_1 (N140) are repeated x number of times. If P is not specified, the part program
section (N120 - N140) is repeated exactly once. After the last repetition, the part program is
continued with the part program block N170 following the REPEATinstruction.

:
N100 ...
N120 START_1: ... ; Start label: START__1
N130 ...
N140 END_1 ... ; End label: END_1
N150 ...
N160 REPEAT START_1 END_1 P=n ; Repetition: START_1 until END_1
N170 ...
:

Note
Label search direction
The program section marked with the Start and End labels can come before or after the
REPEATinstruction. The search initially commences toward the start of the program. If the
Start label is not found, a search is made in the direction of the program end.
If the REPEAT instruction is between the Start and End label, only the part program section
from the Start label to the REPEAT instruction is repeated.
REPEAT instruction repeated.

Programming

Syntax: REPEAT <Start_Label> <End_Label> [P=n]


Start_Label Start label to which the instruction: REPEAT branches.
Beginning of the part program section that is repeated.
Type: String
End_Label End of the part program section that is repeated.
Type: String
P Number of repetitions
n Number of repetitions
Type: Integer

Basic Functions
614 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.11.5 A part program section between a Start label and the key word: ENDLABEL

Functionality
Via REPEAT in part program block N150, the part program processing branches to the part
program block N120 that is labeled START_1 with a start label. This part program block and
all the part program blocks up to and including the part program block marked with the key
word ENDLABEL (N140) are repeated x number of times. If P is not specified, the part
program section (N120 - N140) is repeated exactly once. After the last repetition, the part
program is continued with the part program block N170 following the REPEATinstruction.

:
N100 ...
N120 START_1: ... ; Start label: START__1
N130 ...
N140 ENDLABEL: ... ; End label: Keyword ENDLABEL
N150 ...
N160 REPEAT START_1 END_1 P=n ; Repetition: START_1 until END_1
N170 ...
:

Note
Label search direction
The program section marked with the Start and End labels can come before or after the
REPEATinstruction. The search initially commences toward the start of the program. If the
Start label is not found, a search is made in the direction of the program end.
If no keyword ENDLABEL is located between the Start label and the REPEAT instruction, the
part program section from the Start label to the REPEAT instruction is repeated.

Programming

Syntax: REPEAT <Label> [P=n]


Label Start label to which the instruction: REPEAT branches.
Beginning of the part program section that is repeated.
Type: String
P Number of repetitions
n Number of repetitions
Type: Integer

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 615
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.12 Event-driven program calls

9.8.12.1 Function

What is the purpose of the function?


The function "Event-driven program calls" offers the possibility of letting an application
program run implicitly during certain events, such as for doing the default settings of
functions of initializations.

Events
Triggering events can be:
● Part program start
● Part program end
● Operator panel reset
● Power-up of the NC control
The triggering events are selected with the machine data MD20108
$MC_PROG_EVENT_MASK (see chapter "Parameterization").

User program
In the default setting the program _N_PROG_EVENT_SPF is activated after the triggering
event occurs. If a different application program is to be activated, then it must be entered in
the machine date MD11620 $MN_PROG_EVENT_NAME (see chapter "Parameterization").
The application program activated by the event is basically processed in the channel, in
which the respective event occurred.
The application program is executed with the lowest priority and so can be interrupted by the
user ASUB.

Basic Functions
616 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Processing sequence
Sequence during activation through part program start
Initial state:

Channel: in the Reset-state


Mode: AUTO
AUTO + overstoring or MDA
TEACHIN
1. NC Start
2. Initialization sequence with evaluation of:
MD20112 $MC_START_MODE_MASK (Definition of the control default settings in case
of NC START)
3. Implicit call of _N_PROG_EVENT_SPF as part program
4. Processing of the data part of the main program
5. Processing of the program part of the main program

Sequence during activation through part program end


Initial state:

Channel: in active status


Mode: AUTO
AUTO + overstoring or MDA
TEACHIN
1. Block with end of part program is changed
2. Control activates reset-sequence with evaluation of machine data:
MD $MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
3. Implicit call of _N_PROG_EVENT_SPF as ASUB
4. Control activates reset-sequence with evaluation of machine data:
$MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
⇒ The G code reset position continues to be set with machine data!

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 617
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Sequence during activation through operator panel reset


Initial state:
Channel: any
Mode: any
1. Control activates reset-sequence with evaluation of machine data:
MD $MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
2. Implicit call of _N_PROG_EVENT_SPF as ASUB
3. Control activates reset-sequence with evaluation of machine data:
$MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
⇒ The G code reset position continues to be set with machine data!

Sequence during activation through power-up


1. Control activates after power-up reset-sequence with evaluation of machine data:
MD $MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
2. Implicit call of _N_PROG_EVENT_SPF as ASUB
3. Control activates reset-sequence with evaluation of machine data:
$MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
⇒ The G code reset position continues to be set with machine data!

Basic Functions
618 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Signal chart
The following diagrams show the signal chart of the NC/PLC interface signals DB21, ...
DBB35 ("Program status" and "Channel status") in case of event-driven program call:

3DUW B1B352*B 3DUW B1B352*B B1B352*B


SURJUDP (9(17B63) SURJUDP (9(17B63) (9(17B63)
6WDUW (QG (QG $FWLYH (QG

'%'%;
3URJUDPVWDWXVUXQQLQJ

'%'%;
3URJUDPVWDWXVVWRSSHG
'%'%;
3URJUDPVWDWXVDERUWHG

'%'%;
FKDQQHOVWDWXVDFWLYH

'%'%;
FKDQQHOVWDWXVLQWHUUXSWHG
'%'%;
&KDQQHOVWDWXVUHVHW

Figure 9-9 Signal chart in case of activation through part program start and part program end

2SHUDWRU B1B352*B B1B352*B


SDQHO (9(17B63) (9(17B63)
UHVHW $FWLYH (QG

'%'%;
3URJUDPVWDWXVUXQQLQJ

'%'%;
3URJUDPVWDWXVVWRSSHG
'%'%;
3URJUDPVWDWXVDERUWHG

'%'%;
FKDQQHOVWDWXVDFWLYH

'%'%;
FKDQQHOVWDWXVLQWHUUXSWHG
'%'%;
&KDQQHOVWDWXVUHVHW

Figure 9-10 Signal chart during activation through operator panel reset

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 619
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Note
DB21, ... DBX35.4 ("Program status aborted") and DB21, ... DBX35.7 ("Channel status
reset") are only received if event-driven use program is complete. Between program end and
the start of the event-driven application program these states are not imported. This is also
the case between an operator panel reset and the start of the application program.

Display
The information about the triggering event is provided to the PLC via the NC/PLC interface
byte DB21, ... DBB376.

Bit Value Description


0 1 Part program start from the channel status reset
1 1 Part program end
2 1 Operator panel reset
3 1 Ramp-Up
4 1 1st start after block search (see "Automatic Start of an ASUB after block search
(Page 546)")
The global query of DB21, ... DBB376 on 0 enables the determination, whether an event-
driven application program is active at all.
If the event-driven application program has expired or has been interrupted with RESET,
then the related display bit is deleted in the interface. For a very brief program, the
corresponding bit remains for at least the duration of a complete PLC cycle.

Basic Functions
620 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.12.2 Parameter assignment

Triggering event
Which events the application program should activate, is set channel-specific in the machine
data:
MD20108 $MC_PROG_EVENT_MASK (event-controlled program call)

Bit Value Description


0 1 Activation through part program start
1 1 Activation through part program end
2 1 Activation through Operator panel reset
3 1 Activation through Power up of the NC control
Prerequisite for the activation:
The application program (default setting: _N_PROG_EVENT_SPF) must be loaded and
cleared.

Note
MD20108 $MC_PROG_EVENT_MASK is ignored during the simulation.

User program
In the default setting after an event set with MD20108 occurs, the program
_N_PROG_EVENT_SPF is activated from the directory _N_CMA_DIR.
If another program is to be activated, then the name of this user program must be entered in
the following machine data:
MD11620 $MN_PROG_EVENT_NAME
The specified program must be present in one of the cycle directories.
The following search path is run when an event set with MD20108 occurs.
1. /_N_CUS_DIR/ for user cycles
2. /_N_CMA_DIR/ for manufacturer cycles
3. /_N_CUS_DIR/ for standard cycles
The first found program with the given name is called.

Note
The specified name is checked syntactically as in case of a subroutine identifier i.e. the first
two characters must be alphabets or underscores (no digits). Prefix (_N_) and suffix (_SPF)
of the program names are added automatically, if not specified.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 621
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Note
The same protection mechanisms that can be activated for cycles (protection levels for
writing, reading etc.) are activated.

Behavior when starting a user ASUB


The behavior of the function "event-driven program call" upon start of a user ASUB from the
channel statu reset can be set channel-specific with the machine data:
MD20109 $MC_PROG_EVENT_MASK_PROPERTIES

Bit Value Description


0 0 The occurrence of an event set with MD20108 (part program start, part program
end and/or operator panel reset) leads to the activation of the event-driven user
program.
1 The occurrence of an event set with MD20108 does not lead to the activation of the
event-driven user program.

Behavior when the single block processing is set


The behavior of the function "event-driven program call" in case of set single block
processing can be set channel-specific with the machine data:
MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK

Bit Value Description


In the event-driven user program:
0 • after an activation through part program start
0 the single block processing is effective.
1 the single block processing is suppressed.
1 • after an activation through part program end
0 the single block processing is effective.
1 the single block processing is suppressed.
2 • after an activation through operator panel reset:
0 the single block processing is effective.
1 the single block processing is suppressed.
3 • after an activation through power-up
0 the single block processing is effective.
1 the single block processing is suppressed.

Basic Functions
622 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

If the single block processing is suppressed, then the event-driven user program is
processed without interruption.

Note
MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK affects all single block processing
types.

Note
The single block processing in the event-driven user program can be switched-off through
the following configuration:
MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (Prevent single block stop) bit 0 = 1
The differentiated settings in MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK are then
ineffective.

Behavior when the read-in disable is set


The behavior of the function "event-driven program call" in case of set read-in disable
(DB21, ... DBX6.1 = 1) can be set channel-specific with the machine data:
MD20107 $MC_PROG_EVENT_IGN_INHIBIT

Bit Value Description


In the event-driven user program:
0 • after an activation through part program start
0 the read-in disable is effective.
1 the read-in disable is suppressed.
1 • after an activation through part program end
0 the read-in disable is effective.
1 the read-in disable is suppressed.
2 • after an activation through operator panel reset:
0 the read-in disable is effective.
1 the read-in disable is suppressed.
3 • after an activation through power-up
0 the read-in disable is effective.
1 the read-in disable is suppressed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 623
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Note
For bit 0 = 1 (user program is activated after part program start) the following constraint is
applicable:
If the user program is ended with the part program command RET, then RET always leads to
an executable block (similar to M17).
In case of bit 0 = 0, RET interpretation is done in the interpreter and leads to an executable
block.

Suppress updating of the display of the program and channel statuses.


In order to avoid a flickering of the display of the program and the channel statuses in the
operator panel, the updating of the display can be suppressed for the execution of the
normally very brief event-driven user program. In the display then, the program and channel
status remains visible before activation of the event-driven user program (e.g. "program
status cancelled" and "channel state reset").
The parameterization of this function is done with the channel-specific machine data:
MD20192 $MC_PROG_EVENT_IGN_PROG_STATE

Bit Value Description


During execution of an event-driven user program the updating of the display of the
program and channel status
1 • upon an activation through part program end
0 is not suppressed.
1 suppressed.
2 • upon an activation through operator panel reset:
0 is not suppressed.
1 suppressed.
3 • upon an activation through power-up
0 is not suppressed.
1 suppressed.

Note
The system variables $AC_STAT and $AC_PROG are not affected by this function, i.e. in
the running event-driven user program $AC_STAT is set to "active" and $AC_PROG to
"running".
NC/PLC interface signals DB21, ... DBX35.0-7 ("Program status ..." and "Channel status ...")
also remain unaffected.

Basic Functions
624 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Behavior for NC Stop


The behavior of the function "event-driven program call" for NC-Stop (i.e. NC/PLC interface
signal DB21, ... DBX7.2, 7.3 or 7.4 is set) can be set channel-specific for the triggering event
part program end, operator panel reset and power up with the machine data:
MD20193 $MC_PROG_EVENT_IGN_STOP

Bit Value Description


The event-driven user program is:
1 • upon an activation through part program end
0 stopped/prevented at NC stop
1 despite NC Stop been completely processed.
2 • upon an activation through operator panel reset:
0 stopped/prevented at NC stop
1 despite NC Stop been completely processed.
3 • upon an activation through power-up
0 stopped/prevented at NC stop
1 despite NC Stop been completely processed.
In this way, an edge change of the interface signal DB21, ... DBX7.3 (NC-Stop) initiated by
the user by activating the NC Stop key in case of reset or power-up is ignored during the
execution of the event-driven user program and an undesired stop behavior at the machine
is prevented.

Note
A programming of DELAYFSTON/ DELAYFSTOF in the event-driven user program cannot be
provided with the behavior set with MD20193, because the NC Stop can cause an
interruption before the execution of the first command DELAYFSTON.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 625
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.12.3 Programming

User program
End of program
The following must be kept in mind, if the user program is to be activated through the part
program start.
● The user program must be ended with M17 or RET.
● A jump back by means of REPOS command is not permitted and leads to an alarm.
Block display
The display can be suppressed in the current block display using the DISPLOF attribute in
the PROC statement.
Processing status
Via the user M function the PLC can be informed about the processing status of the event-
driven user program.

Scan for triggering event


The event, which causes the activation of the user program, can be queried in the user
program with the following system variable:
$P_PROG_EVENT (event-driven program call active)

Value Description
1 Activation through part program start
2 Activation through part program end
3 Activation through Operator panel reset
4 Activation through Power up
5 Activation after output of the last action block after Block search (see "Automatic Start of an
ASUB after block search (Page 546)")

Query of the current channel


The application program is basically processed in the channel, in which the corresponding
event has occurred. The current channel is queried in the user program with the following
system variables:
$P_CHANNO (query of the current channel number)

Note
Power up is an event that takes place in all channels.

Basic Functions
626 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.12.4 Boundary conditions

Emergency stop/error message


If an error is present when the operator panel is reset or after power-up EMERGENCY
STOP or Mode group/NCK-Continue, then the event-driven user program will only be
processed after EMERGENCY STOP or the error has been acknowledged in all channels.

Note
The power up event occurs in all channels at the same time.

9.8.12.5 Examples

Example 1: Call of all events set with MD20108


Parameter assignment:

MD20108 $MC_PROG_EVENT_MASK = 'H0F' Call of _N_PROG_EVENT_SPF for:


• Part program start
• Part program end
• Operator panel reset
• Ramp-Up

Programming:

Program code Comment


PROC PROG_EVENT DISPLOF

IF ($P_PROG_EVENT==1) ; Processing for part program start.


MY_GUD_VAR=0 ; Initialize GUD variable
RET
ENDIF

IF ($P_PROG_EVENT==2) OR ($P_PROG_EVENT==3) ; Processing for part program end and


operator panel reset.
DRFOF ; Deactivate DRF offsets
IF $MC_CHAN_NAME=="CHAN1"
CANCEL(2) ; Delete modal synchronized action 2
ENDIF
RET
ENDIF

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 627
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Program code Comment


IF ($P_PROG_EVENT==4) ; Sequence for power-up
IF $MC_CHAN_NAME=="CHAN1"
IDS=1 EVERY $A_INA[1]>5.0 DO $A_OUT[1]=1
ENDIF
RET
ENDIF

RET

Example 2: Call through Operator panel reset


Parameter assignment:

MD20108 $MC_PROG_EVENT_MASK = 'H04' Call of _N_PROG_EVENT_SPF for:


• Operator panel reset

Programming:

Program code Comment


PROC PROG_EVENT DISPLOF
N10 DRFOF ; Deactivate DRF offsets
N20 M17

Example 3: Initialization of the function


Section of the startup file (_N_INITIAL_INI):

Program code Comment


...
CHANDATA(3) ; Initialization for channel 3
$MC_PROG_EVENT_IGN_INHIBIT='H04F'
$MC_PROG_EVENT_MASK='H04'
...

Meaning:
The part program _N_PROG_EVENT_SPF from the directory _N_CMA_DIR should be
started automatically with the RESET key and processed till the end, regardless of whether
the read-in disable is activated or deactivated.

Basic Functions
628 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

9.8.13 Influencing the Stop events through Stop delay area

Stop Delay Area


The reaction to a stop event can be influenced by conditioned interruptible area in the
current part program. Such a program area is called stop delay area.
Within the stop delay areas there should be no stop and the feed should not be changed.
Stops do not take effect until the program section has been completed (Example: making of
a thread).
A stop delay area is defined with the part program commands:

DELAYFSTON Start a Stop Delay Area


DELAYFSTOF End a Stop Delay Area
References:
Programming Manual, Job Planning

Stop events
Overview of the NCK events that cause a stop:

NCK events Response Stop criteria


Reset and mode group RESET immediate IS: DB21, ... DBX7.7 and DB11 DBX20.7
PROG_END Alarm 16954 NC prog.: M30
Interrupt delayed IS: "FC-9" and ASUP DB10 DBB1
DELDISTOGO_SYNC immediate IS: "Delete distance-to-go" DB21, ... DBX6.2 and axial
PROGRESETREPEAT delayed IS: "Clear number of subprogram passes" DB21, ...
DBX6.3
PROGCANCELSUB delayed IS: "Program level abort" DB21, ... DBX6.4
SINGLEBLOCKSTOP delayed In the stop delay area: NC stops at the end of the 1st
block outside the stop delay area.
Sinlge block is active before the stop delay area:
IS: "NC Stop at block limit" DB21, ... DBX7.2
SINGLEBLOCK_IPO delayed IS: "Activate single-block type 1" DB11 DBX21.7
SINGLEBLOCK_DECODIER delayed IS: "Activate single-block type 2" DB11 DBX21.6
STOPALL immediate IS: DB21, ... DBX7.4 and DB11 DBX20.6
STOPPROG delayed IS: DB21, ... DBX7.3 and DB11 DBX20.5
OVERSTORE_BUFFER_END_REACHED Alarm 16954 NC prog.: Stop because of empty overstore buffer
PREP_STOP Alarm 16954 NC prog.: STOPRE and all implicit Stopres
PROG_STOP Alarm 16954 NC prog.: M0 and M1
STOPPROGATBLOCKEND delayed IS: "NC Stop at block limit" DB21, ... DBX7.2
STOPPROGATSUPEND System fault SR end should always deselect the stop delay section.
WAITM Alarm 16954 NC prog.: WAITM
WAITE Alarm 16954 NC prog.: WAITE
INIT_SYNC Alarm 16954 NC prog.: INIT with parameter "S"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 629
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

NCK events Response Stop criteria


MMCCMD Alarm 16954 NC prog.: MMC( STRING, CHAR )
PROGMODESLASHON delayed IS: DB21, ... DBB26 Activate/switch over skip block
PROGMODESLASHOFF delayed IS: DB21, ... DBB26 deactivate skip block
PROGMODEDRYRUNON delayed IS: DB21, ... DBX0.6 Activate DryRun
PROGMODEDRYRUNOFF delayed IS: DB21, ... DBX0.6 Deactivate DryRun
BLOCKREADINHIBIT_ON delayed IS: DB21, ... DBX6.1 Activate read-in disable
STOPATEND_ALARM immediate Alarm: Alarm configuration STOPATENDBYALARM
STOP_ALARM immediate Alarm: Alarm configuration STOPBYALARM
STOPATIPOBUFFER_ISEMPTY_ALARM immediate Internal: Stop after alarm on empty IPO buffer
STOPATIPOBUF_EMPTY_ALARM_REORG immediate Internal: Stop after alarm on empty IPO buffer
RETREAT_MOVE_THREAD Alarm 16954 NC prog.: Alarm 16954 at LFON (Stop & fast lift in G33
not possible
WAITMC Alarm 16954 NC prog.: WAITMC
NEWCONF_PREP_STOP Alarm 16954 NC prog.: NEWCONF
BLOCKSEARCHRUN_NEWCONF Alarm 16954 NC prog.: NEWCONF
SET_USER_DATA delayed OPI: PI "_N_SETUDT"
SYSTEM_SHUTDOWN immediate System shutdown for SINUMERIK 840Di
ESR delayed Extended stop and retract
EXT_ZERO_POINT delayed External work offset
STOPRUN Alarm 16955 OPI: PI "_N_FINDST" STOPRUN
Reaction
The reaction to a stop event can be:
● immediate
Stops immediately even in stop delay section. Is known as a "hard stop event".
● delayed
Does not stop (even short-term) until after stop delay section. Is known as a "soft stop
event".
● Alarm 16954
Program is aborted because illegal program commands have been used in stop delay
section.
● Alarm 16955
Program is continued, an illegal action has taken place in the stop delay section.
● Alarm 16957
The program section (stop delay section) enclosed by DELAYFSTON and DELAYFSTOF
could not be activated. As a result, every stop will take effect immediately and is not
subject to a delay! This will always occur when the deceleration begins before the stop
delay area but ends within the stop delay area. Likewise, if the stop delay area is entered
with an override of 0, the stop delay area also cannot be activated. (example: a G4 before
the stop delay section allows the user to reduce the override to 0. The next block in the
stop delay section then begins with override 0 and the described alarm situation occurs.)

Basic Functions
630 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program operation mode

Note
MD11411 $MN_ENABLE_ALARM_MASK (activation of warnings) Bit 7 activates this
alarm.

Stop criteria
A stop event can be triggered by the following

• VDI interface signals from the PLC → "Hard" stop event


• Alarms with NOREADY response → "Hard" stop event
• Stop key → "Soft" stop event
• Read-in disable → "Soft" stop event
• Single BLock → "Soft" stop event

Note
Some NCK events are stopped for a short time, in order to perform a switching operation,
and restart immediately. These include e.g. the ASUB that stops the contour briefly in order
to then start the ASUB program immediately. These events are also allowed in the stop
delay area, however they are pushed back to its end and are thus considered "soft stop
events".

Conditions
The following conditions apply while a stop delay area is being processed:
● A change in the feed is ignored while in the stop delay area. A feed disable is thus not
effective until the program area has been exited, and is stopped.
● None of the main run axes, such as command axes and positioning axes, which are
traversed with POSA, is stopped.
● Part program command G4 is permitted in the stop delay area.
Other part program commands that cause a stop in the meantime (e.g. WAITM), are not
permitted and trigger the alarm 16954.
● A stop delay section entered with an override of 0% will not be accepted!

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 631
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

9.9 Asynchronous subroutines (ASUBs), interrupt routines

9.9.1 Function

9.9.1.1 General functionality

Note
The terms "asynchronous subroutines (ASUB)" and "interrupt routines" used alternatively in
the description below refer to the same functionality.

interrupt routines
Interrupt routines are normal part programs, which are started by interrupt events (interrupt
inputs, process or machine status) related to the machining process or the relevant machine
status.
Any part program block currently being executed will be interrupted by the routine if it is not
specifically declared to be locked against interruption. It is possible to continue the
subroutine at the point of interruption at a later stage.

Basic Functions
632 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

0DLQSURJUDPVXESURJUDP ,QWHUUXSWURXWLQH


16(7,17 DURXWLQHWRDQHYHQW
DQGVZLWFKLWUHDG\$VVLJQ
1

%ORFNEHLQJ 1 $%+(%B=


SURFHVVHG
1
(YHQW 15 
1 LQSXWVZLWFKHG
1;<
1
1 

1
0
1
1

1 5HWXUQSRVVLEOH

10

Definition of interrupt routines


The command SETINT or an interrupt signal via the PI service "ASUB" must be assigned to
a part program, which is supposed to act as interrupt routine. This turns the part program
into an interrupt routine.

Interrupt signals
● A total of 8 interrupt signals (inputs) are available.
● All inputs can be controlled via the PLC.
● The first four interrupt signals are also controlled via the 4 rapid NC inputs of the NCU
module.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 633
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

● The signal status of the rapid NC inputs can be read out via the PLC interface (DB10).
● The transmission of the rapid NC input signals to the interrupt signals can be disabled via
the PLC interface (DB10).

4 rapid NC inputs

PLC interface

4 interrupt signals 4 interrupt signals

Figure 9-11 Interrupt signals

For more information on PLC control of the rapid NC inputs (interrupt signals) see:
References:
Function Manual Basic Functions; PLC Basic program (P3)
Function Manual, Extended functions; Digital and analog NCK I/Os (A4)

Call of interrupt routines


During program operation
It is possible to call the interrupt routines, when the mode groups are present in program
operation. This means that the processing is done either in the mode type AUTOMATIC or
MDA part program blocks.
Outside the program operation
Interrupt routines can also be activated in the following program statuses or mode types:
● JOG, JOG REF
● MDA Teach In, MDA Teach In REF, MDA Teach In JOG, MDA REF, MDA JOG
● AUTOMATIC, stopped, ready
● Not referenced
If an interrupt routine is activated in JOG or REF mode, it will interrupt any jogging and
referencing operations in progress.

Basic Functions
634 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Activating
The activation of an interrupt routine can be done:
● By a 0/1 transition of the interrupt signal, triggered by a 0/1 transition at the rapid NC
input
● by the call of the "Function Call ASUB"
References:
Function Manual Basic Functions; PLC Basic Program (P3)
● an exit is set via the synchronous action, which indirectly sets an interrupt entry via short-
circuit (see " Examples (Page 646)").
References:
Function Manual, Synchronized Actions

Display
The activation of an interrupt routine is shown with the following NC/PLC interface signal:
DB21, … DBX378.0 (ASUB active)

9.9.1.2 Sequence of an interrupt routine in program operation

Decelerating the axes


Upon activation, all machine axes are decelerated to a standstill according to the
acceleration ramp(MD32300 $MA_MAX_AX_ACCEL), and the axis positions are stored.

Reorganization
In addition to decelerating the axes, the previously decoded calculation blocks are calculated
back to the interruption block. i.e. all the variables, frames and G codes are assigned the
value that they would have at the point of interruption if the part program had not been
previously decoded. These values are put in the buffer so that they can be called up again
when the interrupt routine is completed.
Exceptions, where no reorganization is possible:
● In thread cutting blocks
● With complex geometries (e.g. spline or radius compensation)

Processing of interrupt routine


The Interrupt routine is automatically started on completion of reorganization.
The system handles the interrupt routine like a normal part program (nesting depth, etc.)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 635
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

End of interrupt routine


After the end identifier (M02, M30, M17) of the Interrupt routine has been processed, the axis
traverses by default to the end position programmed in the part program block following the
interruption block.
A REPOS instruction must have been programmed at the end of the interrupt routine if return
positioning to the point of interruption is required, e.g.
N104 REPOSL M17

Part program: Interrupt routine:


PROGNAME INTER
N10 ... N101 ...
N20 Y20 N102 ...
N30 X60 End point of the N103 ...
N40 ... interrupt routine N104 REPOSL M17
N50 M30
Standard (for G91)

Traverse path of the N104


interrupt routine
Path with
REPOSL
Standard (for G90)
N101

N20
N30
Interruption point N40

Figure 9-12 End of interrupt routine

Basic Functions
636 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

9.9.1.3 Interrupt routine with REPOSA


If an interrupt routine with REPOSA triggered by the PLC (block FC9) "interrupted" in channel
status in program operation is completed, then the following sequence is typical:
1. Before the re-approach to the contour, the controller stops and goes to program status
"Stopped". The following NC/PLC-interface signal is set:
DB21, ... DBX318.0 (ASUB is stopped)
2. The operator presses the START key. Thereupon, the signal DB21, ... DBX318.0 is reset
and the re-approach motion starts.
3. At the end of the re-approach motion, the FC9 signal "ASUB done" is set and the path of
the interrupted part program is continued.

Note
The NC/PLC-interface signal DB21, ... DBX318.0 (ASUB is stopped) is available only for
the following case: Interrupt "interrupted" in program operation in the channel status.

Note
In case of interrupt routines that close without REPOS, the signals "Asub-Done" and
DB21, ... DBX318.0 (ASUB is stopped) occur at the same time.

9.9.1.4 NC response
The different reactions of the control to an activated interrupt routine in the various operating
states are given in the following table:

Status of NC ASUB start Control system reaction


Program is active Interrupt, (PLC) 1. Fast retraction or stop axes
2. Interrupt the program for the duration of the ASUB
3. Approach of the interruption point, if REPOS in ASUB
4. Continuation of the part program
RESET Interrupt, (PLC) The ASUB is executed like a main program. RESET (without M30) is
executed at the end of the ASUB. The next control system status
depends on the following machine data:
MD20110 $MC_RESET_MODE_MASK
MD20112 $MC_START_MODE_MASK
References:
Function Manual Basic Functions; Axes, Coordinate Systems, Frames
(K2), Chapter: "Workpiece-related actual-value system"
Program operation Interrupt, (PLC) ASUB is executed. At the end of the ASUB the STOP state is reapplied.
(AUTOMATC or MDA) If REPOS in the ASUB:
+ channel stopped
• The ASUB processing is stopped before the approach block.
• The approach movement can be initiated with the Start key.
Start key Once the ASUB has been executed, processing of the interrupted
program is resumed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 637
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Status of NC ASUB start Control system reaction


Manual mode Interrupt, (PLC) Control system assumes the status "internal program execution mode"
+ channel stopped for the addressed channel (not evident externally) and then activates the
ASUB. The selected operating mode remains valid. The original status is
resumed after execution of the ASUB (M17).
JOG Interrupt, (PLC) Stop processing, evaluate:
AUTO Teach-In MD11602 $MN_ASUP_START_MASK
AUTO Teach reference pnt.
MD11604 $MN_ASUP_START_PRIO_LEVEL
MDA JOG, Interrupt, (PLC)
Internal switchover to "internal program execution mode" if appropriate,
MDA Teach-In,
activate ASUB, restore status prior to ASUB start.
MDA Teach reference pnt.
Any LIFTFAST defined with SETINT is not activated in JOG mode.
Manual mode Interrupt, (PLC) The current active motion is stopped. The distance-to-go is deleted. The
+ channel running remaining sequence of operations is the same as for "Manual mode,
channel stopped".
Processing of INITIAL.INI not possible The signal "Interrupt request not possible" is generated.
Block search
Alarm that cannot be
removed by NC start.
Digitalizing active
Channel in fault condition

9.9.2 Parameter assignment

Effect of mode group signals


The effect of the mode group signals (mode group reset, mode group Stop axes plus
spindle, mode change disable, ...) on channels of mode group, which are currently
processing the interrupt routines, is set in the machine data:
MD11600 $MN_BAG_MASK

Bit Value Description


0 0 Mode group signals are applicable.
1 Mode group signals are not applicable.
MD11600 also controls, whether the internal program execution mode is imported only for
the channel, in which the interrupt routine has been activated, or to all channels in the mode
group.

Bit Value Description


1 0 The mode switchover is done to all channels in the mode group.
1 An internal mode switchover takes place only in the channel, in which the interrupt
routine was activated (possible only if bit 0 is set to "1").
If, via MD11600, the channel in which the interrupt is running has left the mode group, the
mode group signals Mode Group RESET, Mode Group STOP, ... have no effect on this
channel. In this way the interrupt routines can run without being disturbed by the mode group
signals.

Basic Functions
638 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Ignore stop conditions


In the default setting an ASUB start is prevented under the following conditions:
● Stop by means of Stop key, M0, M01
● Not all axes are referenced yet
● read-in disable is active (DB21, ... DBX6.1 = 1)
Via the following machine data the ASUP Start can also be enabled for these conditions:
MD11602 $MN_ASUP_START_MASK (ignore stop conditions for ASUB)

Bit Value Description


0 Stop reason: Stop key, M0 or M1
0 Stop reason prevented ASUB start.
1 An ASUB is started immediately, if the NCK is in the reset status or in the JOG
mode.
Tip:
Without this bit setting, no ASUB can be started in the reset status /JOG mode.
Note:
• This bit is set implicitly, if the machine data
MD20108 $MC_PROG_EVENT_MASK in a channel deviates from zero!
• This bit is set implicitly, if in the machine data
MD11450 $MN_SEARCH_RUN_MODE the bit 1 is set!
1 Stop reason: Not all axes are referenced yet
0 Stop reason prevented ASUB start.
1 ASUB start also permitted, if all axes are not yet referenced.
2 Stop reason: Read-in disable is active
0 The ASUB is selected internally, but processed only when the read-in disable is
cancelled.
The value of the machine data MD20116 $MC_IGNORE_INHIBIT_ASUP is
evaluated.
In case MD20116=0, then an ASUB is triggered internally immediately, the blocks
of the ASUB Program are changed only with the cancellation of the read-in disable.
With the triggering of ASUB the path is decelerated immediately (except with the
option of BLSYNC).
A resetting of the read-in disable is done in the ASUP program.
1 ASUB start also permitted, when the read-in disable is active.
That is, the blocks of the ASUB program are changed and processed immediately.
In this way, the machine data MD20116 $MC_IGNORE_INHIBIT_ASUP becomes
ineffective.
The NCK behavior corresponds to the machine data allocation:
MD20116 $MC_IGNORE_INHIBIT_ASUP= FFFFFFFF.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 639
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Note
Explicit ASUB start
If MD11602 is set such that the ASUB may not be started automatically, the routine can still
be activated by the Start key. Any rapid retraction that may be parameterized is always
started.

Jogging during interruption of a JOG ASUB


In case of single or multi-channel systems the ASUB started automatically in the mode type
JOG can be jogged during interruption.
This functionality is enabled via the bit 3 in the machine data:
MD11602 $MN_ASUP_START_MASK

Bit Value Description


3 0 Jogging during interruption of a JOG ASUB is not possible.
1 Jogging during interruption of a JOG ASUB is possible.
In case of multi-channel systems, the bit 1 must also be set in the machine data
MD11600 $MN_BAG_MASK.
After jogging, a REPOS is triggered with the START key and the ASUB is continued at the
interruption point.
Application example:
In case of a single-slide turning machine a stock removal cycle is started as ASUB in the
mode type JOG and with this a shaft several meters long is processed. During processing it
is necessary to change the cutting edge of the tool. The machine operator stops the ASUB
and jogs away for changing the cutting edge of the tool. After changing the cutting edge, he
activates the START key. The interruption point is approached through REPOS. Thereafter,
the ASUB is continued.

Note
The function "Jogging during interruption of a JOG ASUB" acts only for those ASUB, which
have been activated from the program status "cancelled" (channel status reset).
The function does not work in multi-channel systems without MD11600 $MN_BAG_MASK
Bit1=1.

Effectiveness of MD11602
Priorities are assigned to the interrupt routines, which define the ranking during the
processing (see also "Programming"). There are priorities from 1 to 128. Priority 1
corresponds to the highest priority.
Starting from which priority the ASUB start conditions parameterized with
MD11602 $MN_ASUP_START_MASK are to be effective, is determined with the machine
data:
MD11604 $MN_ASUP_START_PRIO_LEVEL
MD11602 is considered from the priority given here till the highest priority.

Basic Functions
640 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Behavior when the read-in disable is set


Via the following channel-specific machine data it can be set for each interrupt signal,
whether the assigned interrupt routines are processed without interruption despite a set
read-in disable (DB21, ... DBX6.1 = 1), or whether the read-in disable is to be made active:
MD20116 $MC_IGNORE_INHIBIT_ASUP

Bit Value Description


In case of a set read-in disable:
0 • after an activation the interrupt routine is assigned to the interrupt signal 1:
0 the read-in disable is effective.
1 the read-in disable is suppressed.
1 • after an activation the interrupt routine is assigned to the interrupt signal 2:
0 the read-in disable is effective.
1 the read-in disable is suppressed.
2 • after an activation the interrupt routine is assigned to the interrupt signal 3:
0 the read-in disable is effective.
1 the read-in disable is suppressed.

Note
The settings in MD20116 $MC_IGNORE_INHIBIT_ASUP are ineffective, if the read-in
disable in the interrupt routines is ignored through the following configuration:
MD11602 $MN_ASUP_START_MASK (ignore stop conditions for ASUB) Bit 2 = 1

Behavior when the single block processing is set


Via the following channel-specific machine data it can be set for each interrupt signal,
whether the assigned interrupt routines are processed without interruption despite a set
single block processing or whether the single block processing is to be made active:
MD20117 $MC_IGNORE_SINGLEBLOCK_ASUP

Bit Value Description


In case of a single block processing:
0 • after an activation the interrupt routine is assigned to the interrupt signal 1:
0 the single block processing is effective.
1 the single block processing is suppressed.
1 • after an activation the interrupt routine is assigned to the interrupt signal 2:
0 the single block processing is effective.
1 the single block processing is suppressed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 641
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Bit Value Description


2 • after an activation the interrupt routine is assigned to the interrupt signal 3:
0 the single block processing is effective.
1 the single block processing is suppressed.

Note
MD20117 $MC_IGNORE_SINGLEBLOCK_ASUP is effective only for the single block
processing type 1 (SBL1).

Note
The settings in MD20117 $MC_IGNORE_SINGLEBLOCK_ASUB are ineffective, if the single
block processing in the interrupt routines is ignored through the following configuration:
MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (Prevent single block stop) bit 1 = 1

Suppress updating of the display of the program and channel statuses.


In order to avoid a flickering of the display of the program and the channel statuses in the
operator panel, the updating of the display can be suppressed for the execution of the
normally very brief interrupt routines. The program and the channel status before the
activation of the interrupt routine then remain visible in the display.
The parameterization of this function is done with the channel-specific machine data:
MD20191 $MC_IGN_PROG_STATE_ASUP

Bit Value Description


The updating of the display of the program and channel statuses is:
0 • during execution the interrupt routine is assigned to the interrupt signal 1:
0 is not suppressed.
1 suppressed.
1 • during execution the interrupt routine is assigned to the interrupt signal 2:
0 is not suppressed.
1 suppressed.
2 • during execution the interrupt routine is assigned to the interrupt signal 3:
0 is not suppressed.
1 suppressed.

The activation of an interrupt routine with suppressed display updating is shown with the
following NC/PLC interface signal:
DB21, … DBX378.1 (stopped ASUB active)

Basic Functions
642 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Note
The system variables $AC_STAT and $AC_PROG are not affected by this function, i.e. in
the running interrupt routine $AC_STAT is set to "active" and $AC_PROG to "running".
NC/PLC interface signals DB21, ... DBX35.0-7 ("Program status ..." and "Channel status ...")
also remain unaffected.

Fast retraction from contour (LIFTFAST)


If mirroring is active for execution via frames, then the following machine data can be used to
set whether during "fast retraction from the contour" the retraction direction is also to be
mirrored:
MD21202 $MC_LIFTFAST_WITH_MIRROR (fast retraction with mirroring)
The distance for the fast retraction is stored for the 3 geometry axes in the machine data:
MD21200 $MC_LIFTFAST_DIST (Traversing path for fast retraction from the contour)
The maximum axis acceleration (MD32300 $MA_MAX_AX_ACCEL) effective during the
LIFTFAST motion is reduced by a factor, which is specified in the following machine data:
MD20610 $MC_ADD_MOVE_ACCEL_RESERVE
This creates an acceleration reserve for an overlayed motion.

9.9.3 Programming

Assignment Interrupt signal ↔ part program


The assignment interrupt signal ↔ part program is done with the command SETINT.
Example:

Program code Comment


...
N20 SETINT(3) ABHEBEN_Z ; If input 3 switches, then interrupt routine
"ABHEB_Z" should start.
...

Together with SETINT additionally the following commands can be programmed:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 643
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

● LIFTFAST
When the interrupt signal arrives, a "Fast retraction of the tool from the contour" is
executed before the interrupt routine starts. The motion direction for the fast retraction is
specified by the program instruction ALF.
● BLSYNC
Upon receiving the interrupt signal, the current program block is processed and only then
is the interrupt routine started.

Note
The assignment interrupt signal ↔ part program is cleared when the following happens:
• Channel in Reset state
• CLRINT instruction in part program

Priorities
If several SETINT instructions are in the part program and therefore several signals can be
simultaneously received, the assigned interrupt routines must be allocated priorities that
define the sequence in which the interrupt routines are executed:
PRIO=<value>
There are priorities from 1 to 128. Priority 1 corresponds to the highest priority.
Example:

Program code Comment


...
N20 SETINT(3) PRIO=2 ABHEBEN_Z ; If input 3 switches, then interrupt routine
"ABHEB_Z" should start.
N30 SETINT(2) PRIO=2 ABHEBEN_X ; If input 2 switches, then interrupt routine
"ABHEB_X" should start.
...

The interrupt routines are executed in the sequence of the priority values if the inputs
become available simultaneously (are energized simultaneously): First "ABHEBEN_Z", then
"ABHEBEN_X".

REPOS-query
Interrupt routines sequences may be generated for which there is no unambiguous return to
an interruption point in the block processing sequence (REPOS).
The system variable $P_REPINF can be used to scan the ASUB to determine whether a
REPOS is possible.

Basic Functions
644 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

Value Description
0 Repositioning with REPOS not possible because:
• not called in ASUB
• ASUB ran from reset status
• ASUB ran from JOG
1 Repositioning with REPOS possible in ASUB

Determine cause of activation


With the system variable $AC_ASUP the cause leading to the activation of an intrerrupt
routine, is specified bit-coded and can be read in the part program and in synchronous
actions (see "User-specific ASUB for RET and REPOS > Programming (Page 649)").

Flexible programming
The following commands help in the flexible programming of interrupt routines:

Command Description
SAVE If the SAVE command has been used to define the interrupt routine, the G
codes, frames and transformations previously active in the interrupted
part program become operative again as soon as the interrupt routine is
ended.
DISABLE The DISABLE command can be set to protect part program sections from
being interrupted by an interrupt routine.
The assignment interrupt signal ↔ part program is maintained but the
interrupt routine no longer respond to the 0/1 signal transition.
ENABLE The DISABLE command can be reset with the ENABLE command.
Interrupt routines are not activated until the next 0/1 transition of the
interrupt signal.
CLRINT Clear assignment Interrupt signal ↔ part program

References
Programming Manual, Job Planning; Chapter: "Flexible NC Programming" > "Interrupt
routine (ASUB)"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 645
Mode Group, Channel, Program Operation, Reset Response (K1)
Asynchronous subroutines (ASUBs), interrupt routines

9.9.4 Restrictions

Cross-mode Start of interrupt routines


Requirements:
● Option: Cross-mode actions
● MD11602 $MN_ASUP_START_MASK, at least Bit 0 = 1
For error-free execution of the function, the following settings in particular must be noted:
● MD11600 $MN_BAG_MASK
● MD11604 $MN_ASUP_START_PRIO_LEVEL
● Interrupt assignment priority
Recommended settings:
● MD11600 $MN_BAG_MASK = H11
● MD11602 $MN_ASUP_START_MASK = H111
● MD11604 $MN_ASUP_START_PRIO_LEVEL = 7

9.9.5 Examples

Activation of an interrupt routine via synchronous action


1. Define number of active digital inputs/outputs:
MD10350 $MN_FASTIO_DIG_NUM_INPUTS=3
MD10360 $MN_FASTIO_DIG_NUM_OUTPUTS=3
2. Generate short-circuit with the following MD setting:
MD10361 $MN_FASTIO_DIG_SHORT_CIRCUIT[0]='H0102B102'
MD10361 $MN_FASTIO_DIG_SHORT_CIRCUIT[1]='H0202B202'
3. HW assignment of the external NC input byte for NC program interrupt:
MD21210 $MC_SETINT_ASSIGN_FASTIN=2 ; better 1 byte more than needed
4. Define input as ASUB trigger:
SETINT(1) PRIO=1 SYNCASUP
5. IDS=1 EVERY $$AC_PATHN>=0.5 DO $A_OUT_[9]=1

Basic Functions
646 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
User-specific ASUB for RET and REPOS

9.10 User-specific ASUB for RET and REPOS

9.10.1 Function

Function
The NCK software supplied contains preprogrammed processes (internal ASUBs) for
implementation of the RET and REPOS functions. They can be replaced by user-specific
ASUBs written by the machine tool manufacturer.

DANGER
The machine manufacturer is responsible for the contents of ASUB routines used to
replace ASUP.SYF supplied by Siemens.

Installation
In the manufacturer directory _N_CMA_DIR or in the user directory _N_CUS_DIR a routine
with the name "_N_ASUP_SPF" can be loaded. These must implement the actions desired
by the user for the functions RET and REPOS.

9.10.2 Parameter assignment

Activating
The parameters for the activation of the user-specific routine "_N_ASUP_SPF" are set with
the machine data:
MD11610 $MN_ASUP_EDITABLE (activation of a user-specific ASUP program).
Bit 0 and bit 1 specify, which of the internal system routines are to be replaced by the user-
specific ASUB:

Binary value Description


0 Neither in case RET nor in case of REPOS the user-specific routine _N_ASUP_SPF
is activated.
1 The user-defined routine is activated for RET, the routine provided in the system is
activated for REPOS.
2 The user-defined routine is activated for REPOS, the routine provided in the system is
activated for RET.
3 As in case RET and also in case of REPOS the user-specific routine is activated.

Bit 2 defines in which directory the user-specific routine is to be searched first in case of
activation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 647
Mode Group, Channel, Program Operation, Reset Response (K1)
User-specific ASUB for RET and REPOS

Bit Value Description


2 0 The user-specific routine is searched first in the user directory _N_CUS_DIR.
1 The user-specific routine is searched first in the manufacturer directory
_N_CMA_DIR.

Defining a level of protection


If a user-specific ASUB is to be used for RET and/or REPOS, i.e. when:
MD11610 $MN_ASUP_EDITABLE ≠ 0
then a level of protection can be defined for the user-specific routine "_N_ASUP_SPF". The
level of protection can have values in the range 0 - 7.
The setting is done via the following machine data:
MD11612 $MN_ASUP_EDIT_PROTECTION_LEVEL (level of protection of the user-specific
ASUB)
For further information about protection levels, refer to:
References:
Startup guide; level of protection concept

Behavior when the single block processing is set


Via the following machine data it can be set, that despite a set single block processing the
internal ASUB or the user-specific "_N_ASUP_SPF" is processed without interruption:
MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (Prevent single block stop)

Bit Value Description


0 0 A stop is done in each ASUB block.
1 The ASUB is processed without interruption.

Basic Functions
648 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
User-specific ASUB for RET and REPOS

9.10.3 Programming

Determine cause of ASUB activation


The reason that led to the activation is specified in bit code through the $AC_ASUP system
variable, and can be read in part program and synchronized actions.

Bit
19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RET 1 1 * 1
REPOS 1 1 1 1 1 1 1 1 * 1 1 1
*: If bit 9 is set, then the behavior depends on MD20114 (see table below)

The significance of the bits of system variable $AC_ASUP is as follows:

Bit Description
0 User interrupt "ASUB with BLSYNC"
Continuation: Freely selectable REORG or RET
1 User interrupt "ASUP"; The position at which it was stopped is stored for continuation with
REPOS.
Continuation: Freely selectable REORG or RET
2 User interrupt "ASUB from channel status Ready"
Continuation: Freely selectable REORG or RET
3 User interrupt "ASUB in a manual mode and in channel status not Ready"
Continuation: Freely selectable REORG or RET
4 User interrupt "ASUP"; The current position is stored when the interrupt occurs, for
continuation with REPOS.
Continuation: Freely selectable REORG or RET
5 Abort of the subroutine repeat
Continuation: With system ASUB REPOS
6 Activation of decoder single block
Continuation: With system ASUB REPOS
7 Activation of delete distance-to-go
Continuation: With system ASUB RET
8 Activation of axis synchronization
Continuation: With system ASUB REPOS
9 Mode change
Continuation: in case of system ASUP, REPOS or RET depending upon
MD20114 $MC_MODESWITCH_MASK (interruption of MDA through mode change):
Bit 0 = 0: → RET
Bit 0 = 1: → REPOS
10 Program continuation during TEACHIN or after TEACHIN deactivation
Continuation: With system ASUB RET

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 649
Mode Group, Channel, Program Operation, Reset Response (K1)
User-specific ASUB for RET and REPOS

Bit Description
11 Overstore selection
Continuation: With system ASUB REPOS
12 Alarm with reaction correction block with REPOS
Continuation: With system ASUB REPOS
13 Retraction motion in case of G33 and Stop
Continuation: With system ASUB RET
14 Activation of dry run feedrate
Continuation: With system ASUB REPOS
15 Deactivation of dry run feedrate
Continuation: With system ASUB REPOS
16 Activation of skip block
Continuation: With system ASUB REPOS
17 Deactivation of skip block
Continuation: With system ASUB REPOS
18 Activate machine data
Continuation: With system ASUB REPOS
19 Make user data effective
Continuation: With system ASUB REPOS
20 Activation of system ASUB, after search type SERUPRO has reached the search target
Continuation: With system ASUB REPOS

Basic Functions
650 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Single block

9.11 Single block

Block-by-block processing
With the single-block function, the user can execute a part program block-by-block.

Single-block types
There are 3 types of setting for the single-block function:
● SBL1 := IPO single block
When the SLB1 function is active, machining stops or pauses after each machine action
block (Ipo block).
● SBL2 := Decode single block
When the SLB2 function is active, machining always stops or pauses after each part
program block. If a part program block is processed in several IPO blocks, machining
stops after every Ipo block. Thread cutting is an exception.
● SBL3 := Decode single block
As for SLB2, but machining also stops in the part program blocks of the cycles.

1. Stopping after every block is undesirable in many situations and/or with certain blocks.
– 1st example:
Change after jog operation, if reorganization and/or repositioning
is not possible, MD10702, bits 6 and 7.
If a stop occurs in a block at the end of block, which cannot be
reorganized and/or repositioned, in this situation
Jog mode cannot be selected.
– 2nd example:
Change after JOG operation to a STOPRE block,
MD10702, bits 6 and 7
If AUTO mode is changed to Jog mode while a
STOPRE block is active, in addition to system ASUB2, a continuation start will be
followed by one residual block and one or possibly (with
decoder single block) two more STOPRE blocks. A logic operation,
which always triggers a part program start in single block
and then always changes to Jog mode, remains
at the STOPRE block indefinitely.
– 3rd example:
DISPOF: Deactivate block display, MD10702, bits 6 and 7
If DISPOF is programmed in a subroutine, the block display
is suppressed. The operator must continuously
press Start blindly in the single block up to the end of the subroutine.
2. When single block is deactivated there is no stop at end of block.
3. When STOPRE blocks are displayed, the main run and preprocessing are synchronized
in the decoding single block.
The following sections describe how to control the behavior of single blocks and prevent
stops in particular situations.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 651
Mode Group, Channel, Program Operation, Reset Response (K1)
Single block

9.11.1 Decoding single block SBL2 with implicit preprocessing stop

Asynchronicity
As a result of preprocessing of part program blocks, the reference between the current block
display relative to the main run status of the NCK and the variable values displayed on the
HMI can be lost. The operator display then shows implausible variable values.

Preprocessing stop for each block


A preprocessing stop is executed for active SBL2 with each block with the channel-specific
setting data SD42200 $SC_SINGLEBLOCK2_STOPRE (activate debug mode for SBL2).
This suppresses preprocessing of part program blocks and maintains the relationship
between the current block display and the variable values display.

Note
This variant of SBL2 does not maintain an accurate contour. In other words, as a result of
the preprocessing stop, a different contour may be generated from the one created without
single-block mode or with SBL1.
Application: Debug mode for testing part programs.

9.11.2 Single block stop: Suppression using SBLOF

Single block off


Programs characterized by the SBLOF language command are executed completely in one
block as with every type of single block.
SBLOF is also valid in the called subroutines.

SBLOF
Example for subroutine without stop in single block:

PROC EXAMPLE SBLOF


G1 X10
RET

At the return command, the decision is made whether to stop at the end of the subprogram:

Return jump with M17 Stop at the end of the subprogram


Return jump with RET No stop at end of subroutine

Basic Functions
652 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Single block

SBLOF in the program


SBLOF alone must remain in the block. Single-block stop is deactivated from this block
onwards up to the next programmedSBLON or up to the end of the active subroutine level.
If SBLOF is active, then this definition is also valid in the called subroutines. SBLON
Example for an area in single block mode
The area between N20 and N60 is executed as one step in single-block mode.

N10 G1 X100 F1000


N20 SBLOF ; Deactivate single block
N30 Y20
N40 M100
N50 R10=90
N60 SBLON ; Reactivate single block
N70 M110
N80 ...

Asynchronous subprograms
The asynchronous subroutines ASUP1.SYF and ASUP2.SYF started system-internally in
REORG/REPOS can process the system ASUP in one step through the programming of
SBLOF.
Example: ASUP.SPF:

N10 SBLOF
N20 IF $AC_ASUP==’H200’
N30 RET ; No REPOS on mode change
N40 ELSE
N50 REPOSA ; REPOS in all other cases
N60 ENDIF
N70 RET

Constraints
● The current block display can be suppressed in cycles with DISPLOF.
● IfDISPLOF is programmed together withSBLOF, then the cycle call continues to be
displayed on single-block stops within the cycle.
● The preset behavior of asynchronous subroutines in single block mode specified in
MD20117 MC_IGNORE_SINGLEBLOCK_ASUP (process interrupt program fully despite
single block) can be overwritten on a program-specific basis using SBLOF.

Cycle
Example 1: A cycle is to act like a command for a user.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 653
Mode Group, Channel, Program Operation, Reset Response (K1)
Single block

Main program:

N10 G1 X10 G90 F200


N20 X-4 Y6
N30 CYCLE1
N40 G1 X0
N50 M30

Program cycle:1

N100 PROC CYCLE1 DISPLOF SBLOF ; Suppress single block


N110 R10=3*SIN(R20)+5
N120 IF (R11 <= 0)
N130 SETAL(61000)
N140 ENDIF
N150 G1 G91 Z=R10 F=R11
N160 M17

CYCLE1 is processed for an active single block, i.e. the Start key must be pressed once to
process CYCLE1.
Example 2: An ASUB, which is started by the PLC in order to activate a modified zero offset
and tool offsets, is to be executed invisibly.

N100 PROC ZO SBLOF DISPLOF


N110 CASE $P_UIFRNUM OF 0 GOTOF
_G500 1 GOTOF _G54 2 GOTOF _G55 3 GOTOF _G56 4
GOTOF _G57 DEFAULT GOTOF END
N120 _G54: G54 D=$P_TOOL T=$P_TOOLNO
N130 RET
N140 _G54: G55 D=$P_TOOL T=$P_TOOLNO
N150 RET
N160 _G56: G56 D=$P_TOOL T=$P_TOOLNO
N170 RET
N180 _G57: G57 D=$P_TOOL T=$P_TOOLNO
N190 RET
N200 END: D=$P_TOOL T=$P_TOOLNO
N210 RET

Basic Functions
654 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Single block

9.11.3 Single block stop: inhibit according to situation

Suppress stopping in single cases


Depending on
MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (Prevent single block stop)
setting bits 0 to 12 = 1 can suppress stopping at the end of the block during the following
machining processes.
Program execution must not stop after single blocks in the case of the following even if
block-by-block processing is selected:
1. An internal Asub
2. During a user ASUP
3. Subroutines with the attribute DISPLOF
4. Intermediate blocks
5. Block search group blocks
6. Init blocks
7. Blocks, which cannot be reorganized
8. Blocks, which are not repositionable
9. A repositioning block, which contains no traversing information
10.A prerun/main run/synchronization block, due to REORG
11.At a Tool selection block.
12.At a GET block
13.During a single block type 2

Sequence
If an ASUB is activated during the single block, for example, execution of the ASUB is
completed. The deceleration movement does not take place until after the end of the ASUB
or the first IPO block in which single-block suppression is not activated. If the velocity is too
large for the deceleration to be performed in this block (with continuous-path mode G64
active), G64), further block changes are allowed.
For decoding single block, MD10702 is only effective with "internal ASUB", "user ASUB" and
"subroutines with the attribute DISPLOF". In these cases, it is already clear at the time of
interpretation that the block belongs to one of the above categories. In these cases, further
blocks can be generated.

SBLON in ASUB
The single block stop of an internal ASUP or user ASUP that is suppressed with MD10702
$MN_IGNORE_SINGLEBLOCK_MASK can be reactivated in ASUP by programming SBLON.
This functionality can be suppressed again with MD20117
$MC_IGNORE_SINGLEBLOCK_ASUB. The SBLON command then becomes ineffective.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 655
Mode Group, Channel, Program Operation, Reset Response (K1)
Single block

Boundary conditions
The following restriction applies to decoding single block SBL2:
● Block search approach blocks
● Block not in ASUB; DISPLOF, SBLOF
● Non-reorganizable and non-repositionable blocks
● Blocks that are not generated in the interpreter, e.g. intermediate blocks

9.11.4 Single-block behavior in mode group with type A/B

Classifying channels
One mode group channel must be classified as a single-block control channel (KS), while the
other mode group channels must be classified as dependent channels (KA) via interface
signal. Type A or type B single-block behavior can be selected for KA channels.
Type A determines Stop (analogous to STOP key).
Type B determines Stop (analogous to stop at block limit).

Channel classification
In one channel (KS) in a mode group, the user should select single-block (NST DB21 ...
DBX0.4 (activate single block)). Single-block type A or B refers to other channels (KA) of a
mode group.

0RGHJURXS
&KDQQHO.6 &KDQQHO.$ &KDQQHO.$ 
 &KDQQHOQ.$

%HKDYLRUFDQEHVHOHFWHGYLDW\SH$RUW\SH%

Figure 9-13 Channel classification for single block in mode group 1

Type A, NST DB11, … DBX1.7=1 (single block type A)


- all channels are stopped.
- All channels receive a start (Start key).
- Channel KS stops at the end of the block (due to single-block)
- Channels KA receive a STOP. (analogous to STOP key).
- All channels are stopped. (deceleration phase of all KAs)

Basic Functions
656 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Single block

Type B, NST DB11, ... DBX1.6=1 (single block type B)


- All channels are stopped.
- All channels receive a start
- Channel KS stops at the end of the block
- Channels KA receive a STOPATEND.
(analogous with NST DB21, ... DBX7.2 ("NC stop at the block limit).
- All channels are stopped at a block limit (at some point in time).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 657
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

9.12 Program control

Options
1. Function selection (via operator interface or PLC)
2. Activation of skip levels
3. Adapting the size of the interpolation buffer
4. Program display modes via an additional basic block display
5. Execution from external source (buffer size and number)
6. Execution from external subroutines

9.12.1 Function selection (via operator panel front or PLC)

Operator interface or PLC


The user can control part program execution via the operator panel front or PLC.

Selection, activation, feedback


Selection
Different functions are available under the Program control soft key. Selection affects an
interface signal in the PLC. These signals are to be understood as selection signals from the
operator interface, and do not activate the selected function.
Activation
These signal states must be transferred to another area of the data block to activate the
selected function. With program control by the PLC the signals are to be set directly.
Feedback
The activated functions are partly signaled back to the PLC from the NCK.

Table 9- 5 Program control: Interface signals

Function Selection signal Activation signal Feedback signal


SKP skip block 0 to 7 DB21, ... DBX26.0 - 26.7 DB21, ... DBX2.0 - 2.7 ---
SKP skip block 8 to 9 DB21, ... DBX27.0 - 27.1 DB21, ... DBX31.6 - 31.7
DRY dry run feedrate DB21, ... DBX24.6 DB21, ... DBX0.6 DB21, ... DBX318.6
ROV Rapid traverse override DB21, ... DBX25.3 DB21, ... DBX6.6 ---
Single block: Preselection of SBL1, SBL2 or SBL3 via program control display of HMI
SBL1: Action single block HMI operator panel DB21, ... DBX0.4 ---
SBL2: Decoding single block
SBL3: In cycle
M01 (Programmed stop) DB21, ... DBX24.5 DB21, ... DBX0.5 DB21, ... DBX32.5

Basic Functions
658 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Function Selection signal Activation signal Feedback signal


Associated M01 DB21, ... DBX24.4 DB21, ... DBX30.5 DB21, ... DBX318.5
DRF selection DB21, ... DBX24.3 DB21, ... DBX0.3 DB21, ... DBX33.3
PRT program test DB21, ... DBX25.7 DB21, ... DBX1.7 DB21, ... DBX33.7
References:
/FB1/ Function Manual Basic Functions; NC/PLC Interface Signals (Z1)
/BAD/ Operating Manual HMI Advanced "Operating Area, Machine"

9.12.2 Activation of skip levels

/, /0, ... /9
It is possible to skip blocks, which are not to be executed every time the program runs.
Blocks to be skipped are indicated in the part program by an oblique "/" before the block
number.
The skip levels in the part program are specified by "/0" to "/7".
Only one skip level can be specified for each part program block.

Number of levels
The number of skip levels is defined with MD9423 $MM_MAX_SKP_LEVEL (max. skip levels
in the NC program).
Example signals:
Blocks which are not to be executed in every program pass can be skipped according to the
following diagram (e.g. program test blocks):/ ; block skipped, (DB21, ... DBX2.0) 1st skip
level
/ N005 ; block skipped, (DB21, ... DBX2.0) 1st skip level
/0 N005 ; block skipped, (DB21, ... DBX2.0) 1st skip level
/1 N010 ; block skipped, (DB21, ... DBX2.1) 2nd skip level
/2 N020 ; block skipped, (DB21, ... DBX2.2) 3rd skip level
/3 N030 ; block skipped, (DB21, ... DBX2.3) 4th skip level
/4 N040 ; block skipped, (DB21, ... DBX2.4) 5th skip level
/5 N050 ; block skipped, (DB21, ... DBX2.5) 6th skip level
/6 N060 ; block skipped, (DB21, ... DBX2.6), 7th skip level
/7 N070 ; block skipped, (DB21, ... DBX2.7) 8th skip level
/8 N080 ; block skipped, (DB21, ... DBX31.6), 9th skip level
/9 N090 ; block skipped, (DB21, ... DBX31.7) 10th skip level
The 10 skip levels "/0" to "/9" are activated by the PLC setting the PLC -> NCK interface
signals.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 659
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

The function is activated from the HMI via the "Program control" menu in the Machine
operating area for skip levels
● "/0" to "/7" via interface HMI -> PLC DB21 ... DBB26 (Skip-block selected).
● "/8" to "/9" via interface HMI -> PLC DB21, ... DBX27.0 to DBX27.1.
References:
/BAD/ Operation Manual HMI Advanced "Operating Area, Machine"

Note
The levels to be skipped can only be changed when the control is in the STOP/RESET state.

9.12.3 Adapting the size of the interpolation buffer

MD28060
The channel-specific interpolator executes prepared blocks from the interpolation buffer
during the part program run. The maximum number of blocks requiring space in the
interpolation buffer at any given point in time is defined by the memory configuring MD28060
$MM_IPO_BUFFER_SIZE (number of NC blocks in the IPO buffer (DRAM)). For some
applications it may be meaningful not to use the full buffer capacity in order to minimize the
"interval" between preparation and interpolation.

SD42990
The number of blocks in the interpolation buffer can be restricted dynamically to a smaller
value than in MD28060 $MC_MM_IPO_BUFFER_SIZE (number of NC blocks in the IPO
buffer (DRAM)), minimum 2 blocks, with the setting data SD42990
$SC_MAX_BLOCKS_IN_IPOBUFFER (max. number of blocks in the IPO buffer).
Values of setting data SD42990 $SC_MAX_BLOCKS_IN_IPOBUFFER:

Value Effect
<0 No interpolation buffer limit active.
The max. possible interpolation buffer as set in MD28060
MM_IPO_BUFFER_SIZE is activated.
or 1 The minimum permissible interpolation buffer with 2 blocks is activated.
< < MM_IPO_BUFFER_SIZE The interpolation buffer is activated with no more than the maximum specified
number of blocks.
>= MM_IPO_BUFFER_SIZE The interpolation buffer is activated with the number of blocks specified in
MD28060 MM_IPO_BUFFER_SIZE.

Basic Functions
660 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Note
If SD42990 $SC_MAX_BLOCKS_IN_IPOBUFFER is set in the part program, the
interpolation buffer limitation takes effect immediately if the block with the SD is being
preprocessed by the interpreter.
This means that the limitation of the IPO buffer may take effect a few blocks before the
intended limitation (see also MD28070 $MC_MM_NUM_BLOCKS_IN_PREP).
To avoid premature activation and to make the limitation of the IPO buffer take effect in
synchronism with the block, a STOPRE (preprocessing stop) must be programmed before
the SD is set in the part program.

Validity
SD42990 $SC_MAX_BLOCK_IN_IPOBUFFER has global, channel-specific validity and can
also be modified in a part program. This modified value is maintained at program end. If this
setting data is to be reset again on defined events, a so-called event-driven program must be
created to do this. For example, this setting data could always be set to a predefined value
on RESET.

Application
The IPO buffer limitation can be used whenever the number of blocks between block
preparation and interpolation must be minimized, e.g. when actual positions in the part
program must be read and processed for other purposes.

Example

N10 ...
N20 ...
..........
N100 $SC_MAX_BLOCKS_IN_IPOBUFFER = 5 ; Limitation of IPO buffer to 5 NC
blocks
N110 ...
N120 ...
............
N200 $SC_MAX_BLOCKS_IN_IPOBUFFER = -1 ; Cancellation of the IPO buffer
limitation
N210 ...
............

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 661
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

9.12.4 Program display modes via an additional basic block display

Basic block display (only for ShopMill/ShopTurn)


A second so-called basic block display can be used with the existing block display to show
all blocks that produce an action on the machine.

Look Ahead basic block display


The actually approached end positions are shown as an absolute position. The position
values refer either to the workpiece coordinate system (WCS) or the settable zero system
(SZS).
The number of Look Ahead display blocks stored in the display buffer depends on the
number of prepared blocks in the NCK preprocessing buffer in the relevant processing state.
If a preprocessing stop is processed, the number of display blocks is reduced to zero and
increases again after the stop is acknowledged. In the case of REORG events (e.g. mode
change, ASUB start), the display blocks stored for Look Ahead are deleted and
preprocessed again afterwards.

Processed values
Values processed in the basic block display coincide with the:
● selected tools
● feed and spindle speed
● actually approached position values
exceptions:
With active tool radius compensation, deviations can occur.
For modulo axes, the programmed value is displayed in the basic block display. This
value can also lie outside the modulo range.

Note
As a basic rule the positions are represented in the WCS or the SZS.
The basic block display can be activated or deactivated with setting data
SD42750 $SC_ABSBLOCK_ENABLE.

Basic Functions
662 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

9.12.5 Basic block display for ShopMill/ShopTurn

Configure basic block display


The basic block display can be configured via the following machine data:

NCK machine data for basic block display Significance:


MD28400 $MC_MM_ABSBLOCK Activate basic block display
MD28402 Size of display buffer
$MC_MM_ABSBLOCK_BUFFER_CONF[2]
Display machine data Position values to be set:
MD9004 $MM_DISPLAY_RESOLUTION For metric measurements
MD9011 $MM_DISPLAY_RESOLUTION_INCH For inch measurements
MD9010 $MM_SPIND_DISPLAY_RESOLUTION Settable coordinate system for spindle display
resolution
MD9424 $MM_MA_COORDINATE_SYSTEM For actual value display in WCS or SZS
These display machine data are copied to NCK machine data
MD17200 $MN_GMMC_INFO_UNIT[0] to MD17200 $MN_GMMC_INFO_UNIT[3]. allowing
them to be accessed from the NCK.

Activating
The basic block display is activated by MD28400 $MC_MM_ABSBLOCK by means of Power
On. If MD28400 $MC_MM_ABSBLOCK is set to 1, a channel-specific display buffer (FIFO) is
created during power-up.
Size of display buffer (FIFO) = (MD28060 $MC_MM_IPO_BUFFER_SIZE + MD28070
$MC_MM_NUM_BLOCKS_IN_PREP) multiplied by 128 bytes. This corresponds to a size of
6KB in the machine data default setting.
Optimize size of display buffer:
The memory requirement can be optimized by entering a value between 128 and 512. The
display blocks preprocessed in the display buffer are transferred to the HMI via a
configurable upload buffer.
Maximum size of upload buffer is obtained by multiplying (MD28402
$MC_MM_ABSBLOCK_BUFFER_CONF[0] +
MD28402 $MC_MM_ABSBLOCK_BUFFER_CONF[1] + 1) by the block length configured in
MD28400 $MC_MM_ABSBLOCK.
The number of blocks before the current block is configured in
MD28402 $MC_MM_ABSBLOCK_BUFFER_CONF[0] and the number of blocks after the
current block is configured in MD28402 $MC_MM_ABSBLOCK_BUFFER_CONF[1].

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 663
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Constraints
If the length of a display block configured in MD28400 $MC_MM_ABSBLOCK is exceeded,
this display block is truncated accordingly. This is represented by string "..." at the end of the
block.
For preprocessed cycles (MD10700 $MN_PREPROCESSING_LEVEL > 1), the display block
contains only axis positions.
Additional boundary conditions for the basic block display:
● Modal synchronized action blocks with absolute values are
not taken into account.
● The basic block display is deactivated during block search with or without computation.
● Polar coordinate programming is not shown in Cartesian system.

Radius/diameter values
Diameter values shown in the basic block display and position display may be needed as a
radius for internal calculation. These values for measurements in radius/diameter according
to G code group 29 can be manipulated using the following options:
● G code DIAMCYCOF (expansion of channel-specific diameter programming)
This G code deactivates the channel-specific diameter programming during the cycle
execution. In this way, computations in the cycle can always be done in the radius. The
position display and the basic block display are continued according to the state of the
diameter programming before DIAMCYCOF.
In the basic block display, the last displayed value is retained.
● G code DIACYCOFA[AX] (axis-specific diameter programming)
This G code deactivates the axis-specific diameter programming during the cycle
execution. In this way, computations in the cycle can always be done in the radius. In the
position display and in the basic block display, this continues according to the state of the
diameter programming before DIACYCOFA[AX].
In the basic block display, the last displayed value is retained.
● MD27100 $MC_ABSBLOCK_FUNCTION_MASK

Bit0 = 1 Transverse axis setpoints are always shown as diameter values in the
basic block display.

Basic Functions
664 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Behavior while the compressor is active


With active compressor and G/Code group 30 not equal to COMPOF, two display blocks are
generated. The
● first contains the G/Code of the active compressor.
● The second contains the string "..." as character for missing display blocks.

Example

G0 X10 Y10 Z10 ; Block to be preprocessed for the basic block display
COMPCAD ; Compressor for optimized surface quality (CAD prog.) A
... ; string as character for missing display blocks

To avoid bottlenecks in the NCK performance, the basic block display is deactivated
automatically. As a sign that the display blocks are missing, a display block with the string
"..." is generated.
All display blocks are always generated in the single block.

9.12.6 Structure for a DIN block

Structure of display block for a DIN block


Basic structure of display block for a DIN block
● Block number/label
● G-functions of the first G-group
(only if changed as compared to the last machine function block).
● Axis position
(sequence corresponding to MD20070 $MC_AXCONF_MACHAX_USED (machine axis
number valid in the channel)).
● Further modal G functions
(only if changed as compared to the last machine function block).
● Other addresses as programmed.
The display block for the basic block display is directly derived from the programmed part
program blocks according to the following rules:
● Macros are expanded.
● Skip identifiers and comments are omitted.
● Block number and labels are transferred from the original block, but omitted if DISPLOF is
active.
● The number of decimal places is defined in display machine data MD9004, MD9010 and
MD9011 via the HMI.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 665
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

HMI display machine data Access in NCK machine data


MD9004 $MM_DISPLAY_RESOLUTION MD17200 $MN_GMMC_INFO_NO_UNIT[0]
MD9011 MD17200 $MN_GMMC_INFO_NO_UNIT[1]
$MM_DISPLAY_RESOLUTION_INCH
MD9010 MD17200 $MN_GMMC_INFO_NO_UNIT[2]
$MM_SPIND_DISPLAY_RESOLUTION
MD9424 $MM_MA_COORDINATE_SYSTEM MD17200 $MN_GMMC_INFO_NO_UNIT[3]
● Programmed axis positions are represented as absolute positions in the coordinate
system (WCS/ENS) specified in MD9424 $MM_MA_COORDINATE_SYSTEM (coordinate
system for actual value display)

Note
The modulo correction is omitted for modulo axes, which means that positions outside the
modulo range can be displayed. It also means that the basic block display differs from the
position display in which values are always modulo-converted.

Examples
Comparisons between display block (original block) and basic block display:
● Programmed positions are displayed as absolute.
The addresses AP/RP are displayed with their programmed values.

Original block: Display block:


N10 G90 X10.123 N10 X10.123
N20 G91 X1 N20 X11.123

● Address assignments (non-DIN addresses) are displayed in the form <address> =


<constant>.

Original block: Display block:


N110 R1 = -67.5 R2 = 7.5
N130 Z = R1 RND = R2 N130 Z-67.5 RND = 7.5

● Address indices (address extensions) are displayed as constants <address> [ <constant>


] = <constant>.

Original block: Display block:


N220 DEF AXIS AXIS_VAR = X
N240 FA[ AXIS_VAR] = R2 N240 FA[X] = 1000

● DIN addresses without address extension are displayed in the form


<din_address> <constant>.

Basic Functions
666 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Original block: Display block:


N410 DEF REAL FEED = 1.5
N420 F = FEED N420 F1.5

The following applies for H functions: Each programmed valus is display irrespective of the
output type to PLC
(MD22110 $MC_AUXFU_H_TYPE_INT (type of H auxiliary function is integer)).
● For Tool selection by tool command
display information is generated in the form T<value> or T=<string>. If an address
extension has been programmed, this is displayed as well.
If several spindles have been configured or the "Tool change via master tool holder"
function (MD20124 $MC_TOOL_MANAGEMENT_TOOLHOLDER (tool holder number))
is active, the T number is always output with address extension.
If no address extension has been programmed, the number of the master spindle or the
master toolholder is used instead (T<spindle_number/tool_holder>= ).
● For the Spindle programming via S, M3, M4, M5, M19, M40 - M45 and M70 (or MD20094
$MC_SPIND_RIGID_TAPPING_M_NR (M function for switching over in the controlled
axis operation)) the following regulation applies regarding the address extension:
If an address extension has been programmed, then this is also resolved.
If several spindles have been configured, then the address extension is also output.
If no address extension has been programmed, the number of the master spindle is used
(S<spindle_number>=).
● Indirect G code programming in form G[ <group> ] = <printout> is substituted by the
corresponding G code.

Original block: Display block:


N510 R1=2
N520 G[8]= R1 N520 G54

● Modal G codes that do not generate an executable block are collected and output with
the display block of the next executable block if permitted by the syntax (DIN block). If
this is not the case (e.g. predefined subroutine call TRANSMIT), a separate display block
containing the modified G codes is placed in front of the next executable block.

Original block: Display block:


N610 G64 G64
N620 TRANSMIT N620 TRANSMIT

● A display block is always generated for part program lines in which the addresses F and
FA appear (including for MD22240 $MC_AUXFU_F_SYNC_TYPE = 3 (output time of the
F functions)).

Original block: Display block:


N630 F1000 N630 F1000
N640 X100 N640 X100

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 667
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

● The display blocks generated for the block display are derived directly from the
programmed part program blocks. If intermediate blocks (e.g. tool radius compensation
G41/G42, radius/chamfer RNDM, RND, CHF, CHR) are generated in the course of
contour preprocessing, these are assigned the display information from the part program
block on which the motion is based.

Original block: Display block:


N710 Y157.5 G42 N710 Y157.5 G42
N720 Z-67.5 RND=7.5 N720 Z-67.5 RND=7.5

● With the EXECTAB command (processing a table of contour elements), the block
generated by EXECTAB is shown in the display block.

Original block: Display block:


N810 EXECTAB (KTAB[5]) N810 G01 X46.147 Z-25.38

● For the EXECSTRING command, the block generated via EXECSTRING is displayed in
the display block.

Original block:
N910 DEF STRING[40] PROGSTRING = "N905 M3 S1000 G94 Z100 F1000 G55"
N920 EXECSTRING(PROGSTRING)

Display block:
N905 Z100 G55 G94 M3 S1000 F1000

Basic Functions
668 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

9.12.7 Execution from external

Function
The "Execution from external" function can be used to execute programs that cannot be
saved directly in the NC memory due to memory shortage from an external program
memory.

Note
Protected cycles (_CPF files) cannot be processed with this function.

External program memory


Depending on the system (SINUMERIK 840D sl/840D), the available user interface (HMI
sl/HMI Advanced/HMI Embedded) and the acquired options, external program memories
may be stored on the following data carriers:
● CompactFlash card
● USB drive
● Network drive
● Local hard disk

Note
Execution from external source via USB interface with SINUMERIK 840D sl
If external programs are to be transferred from an external USB drive via a USB interface,
only the interface via X203 (named "TCU_1") can be used.
A USB FlashDrive cannot be recommended as a persistent storage medium.

Note
Execution from external source via V24 interface with SINUMERIK 840D
In HMI Embedded, the "Execution from external source" softkey can be used to transfer
external programs across the RS-232 interface onto the NC.

Applications
● Direct execution from external programs
In principle, any program that is accessible via the directory structure of the interface in
the "Execution from external" HMI mode can be selected and executed.
● Execution of external sub-programs from the part program
The external subroutine is called through the part program command EXTCALL with
specification of a call path (optional) and the subroutine identifier (→ refer to Chapter:
"Execution from external subroutines").

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 669
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Parameterization
A reloading memory (FIFO buffer) must be reserved in the dynamic NC memory for
executing a program in the "Executing from external" mode (main program or subroutine).
Size of FIFO buffer
The size of the FIFO buffer is set in the machine data:
MD18360 $MN_MM_EXT_PROG_BUFFER_SIZE (FIFO buffer size for processing from
external)
Default: 30 kbyte
Number of the FIFO buffer
One FIFO buffer must be provided each for all programs (main run or subroutine) that are
executed simultaneously in the "Execution from external source" mode.
The number of the FIFO buffer is set in the machine data:
MD18362 $MN_MM_EXT_PROG_NUM (number of externally executed program levels
executable simultaneously)

Behavior during RESET, POWER ON


External program calls are aborted through RESET and POWER ON and the concerned
FIFO buffers are erased.
A program selected for "Execution from external source" remains selected for "Execution
from external source" even after RESET/part program end. A POWER ON deletes the
selection.

9.12.8 Execution from external subroutines

Function
Individual machining steps for producing complex workpieces may involve program
sequences that require so much memory they cannot be stored in the NC memory.
In such cases, the user has the option of executing the program sequences as subroutines
from an external program memory in the "Execution from external source" mode with the
help of the EXTCALL part program instruction.

Preconditions
The following preconditions are applicable to the execution from external subroutines:
● The subroutines must be accessible via the directory structure of the operator interface.
● A reloading memory (FIFO buffer) must be reserved for each subprogram in the dynamic
NC memory.

Basic Functions
670 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Parameterization
The path for the external subprogram directory can be preset using setting data:
SD42700 $SC_EXT_PROG_PATH (Program path for the EXTCALL external subprogram
call)
The entire path of the program to be called along with the subprogram path or identifier
specified during programming is derived therefrom.

Programming
An external subroutine is called by means of part program command EXTCALL.

Syntax: EXTCALL("<path/program_name>")

Parameter:

Path/program name: The path name is optional, i.e. the absolute path (or a relative
path) or only the program name (subroutine identifier) can be
specified.
The program name can be specified with or without the "_N_"
prefix and "_SPF" or "_MPF" file extension.
Type: STRING

Note
SINUMERIK 840D with HMI Embedded
An absolute path must always be specified for SINUMERIK powerline with HMI Embedded!

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 671
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Effects
EXTCALL call with absolute path name
If the subprogram exists at the specified path, it will be executed following the EXTCALL call.
If it does not exist, program execution is cancelled.
EXTCALL call with relative path name/without path name
In the event of an EXTCALL call with a relative path name or without a path name, the
available program memories are searched as follows:
1. If a path name is preset in SD42700, the data specified in the EXTCALL call (program
name or with relative path name) is searched for first, starting from this path. The
absolute path results from linking the following characters:
– The path name preset in SD42700
– The "/" character as a separator
– The subprogram path or identifier programmed in EXTCALL
2. If the called subprogram is not found at the preset path, the data specified in the
EXTCALL call is then searched for in the user-memory directories.
3. If the called subprogram is not found on the program memory currently being searched
(e.g. CompactFlash card), the next program memory (e.g. network drive) is searched in
accordance with points 1 and 2.
4. The search ends when the subprogram is found for the first time.
If the search does not produce any hits, the program is canceled.

Basic Functions
672 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program control

Examples
1. Execution from local hard disk
System: SINUMERIK 840D sl/840D with HMI Advanced
The "_N_MAIN_MPF" main program is stored in NC memory and is selected for execution:

N010 PROC MAIN


N020 ...
N030 EXTCALL ("ROUGHING")
N040 ...
N050 M30

The "_N_ROUGHING_SPF" subprogram to be reloaded is stored on the local hard disk in


the directory "_N_WCS_DIR/_N_WST1".
The subprogram path is preset in SD42700:
SD42700 $SC_EXT_PROG_PATH = "_N_WCS_DIR/_N_WST1"

N010 PROC ROUGHING


N020 G1 F1000
N030 X= ... Y= ... Z= ...
N040 ...
...
...
N999999 M17

2. Execution from network drive


Systems: SINUMERIK 840D sl/840D with HMI sl/HMI Advanced/HMI Embedded
The "Contour2.spf" program to be reloaded is stored on the network drive in the directory
"\\R4711\\Workpieces".

...
N... EXTCALL("\\R4711\Workpieces\Contour2.spf")
...

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 673
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

9.13 System settings for power-up, RESET/part-program end and part-


program start

Concept
The control-system response after:
● Power up (POWER ON)
● Reset/part program end
● Part program start
can be modified for functions, such as G codes, tool length compensation, transformation,
coupled axis groupings, tangential follow-up, programmable synchronous spindle via
machine data.

The control-system can be set with:


response after:
Power-up (POWER ON) *) MD20110 $MC_RESET_MODE_MASK
(Definition of control default settings after reset/part program end)
MD20144 $MC_TRAFO_MODE_MASK
(Selection of the kinematic transformation function)
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)
RESET/part program end MD20110 $MC_RESET_MODE_MASK
(Definition of control default settings after reset/part program end)
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)
MD20152 $MC_GCODE_RESET_MODE
(Definition of control initial setting after reset)
Part program start MD20110 $MC_START_MODE_MASK
(Definition of control initial setting after part program start)
MD20112 $MC_RESET_MODE_MASK
(Definition of control initial setting after reset/part program end)
*) See also POWER ON (Page 850)
Example:
For certain applications (e.g. grinding) it is advisable not to apply the reset position of
individual functions until the part program start. This is possible through the appropriate
setting of machine data MD20110, MD20150, MD20152 and MD20112.

Basic Functions
674 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

System settings after power-up


MD20110 $MC_RESET_MODE_MASK, bit 0 = 0 or 1

3RZHUXS
32:(521

0' %LW  7UDQVIRUPDWLRQDFWLYH


DFFRUGLQJWR0'0'ELW0'ELW
5(6(7B02'(B0$6. *HRD[LVH[FKDQJHDFWLYH
%LWb 'HIDXOW DFFRUGLQJWR0'ZLWK0'

%LW 

%LW 
%LW 

0' 7KHWRROOHQJWKFRPSHQV
%LWDQGELW DWLRQVHOHFWHGEHIRUH
32:(521UHPDLQVDFWLYH

%LW 

7RROOHQJWKFRPSHQVDWLRQDFWLYH
DFFWR0'0'0'

7UDQVIRUPDWLRQRII
7RROOHQJWKFRPSHQVDWLRQRII


*FRGHVDFFRUGLQJWR0'0&B*&2'(B5(6(7B9$/8(6

&RXSOHGD[LVJURXSLQJVDUHGHDFWLYDWHG

7DQJHQWLDOWUDFNLQJLVQRWDFWLYDWHG
6\QFKURQRXVVSLQGOHFRXSOLQJLVQRWDFWLYDWHG
$[LDOIHHGUDWHSHUUHYROXWLRQRII3DWKDQGV\QFKURQL]HGD[HVRQPDVWHUVSLQGOHEDFN

*HRPHWU\D[LVDVVLJQPHQWDFFRUGLQJWR0'0&B$;&21)B*(2$;B$66,*1B7$%

0DVWHUYDOXHFRXSOLQJLVQRWDFWLYDWHG

%DVLFIUDPHLVGHVHOHFWHG
(OHFWURQLFJHDULVQRWDFWLYDWHG
,QLWLDOVWDWHIRUPDVWHUVSLQGOHDFFRUGLQJWR0'0&B63,1'B'()B0$67(5B63,1'
0DVWHUWRROKROGHULQLWLDOVWDWHDFFRUGLQJWR0'0&B722/B0$1*(0(17B722/+2/'(5
5HIHUHQFHD[LVDFFRUGLQJWR0'0&B',$0(7(5B$;B'()

5(6(7SDUWVSURJUDPHQG

Figure 9-14 System settings after power-up

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 675
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

System settings after RESET/end of part program and part program start
MD20110 $MC_RESET_MODE_MASK, bit 0 = 0 or 1

5(6(7SDUWVSURJUDPHQG

%LW  *FRGHVDFFRUGLQJWR0'DQG0'
0' 0'ELWVDUHHYDOXDWHGLH
5(6(7B02'(B0$6. WKHIXQFWLRQDVVLJQHGWRWKHUHVSHFWLYHELWV
%LW HLWKHUDGRSWVLWVUHVHWSRVLWLRQRUUHWDLQV
'HIDXOW LWVFXUUHQWSRVLWLRQ UHIHUWRWDEOHVEHORZ

%LW 

7KHFXUUHQWVHWWLQJVDUHUHWDLQHG

3DUWVSURJUDPVWDUW

*FRGHVDFFRUGLQJWR0'
7RROOHQJWKFRPSHQVDWLRQRII
7UDQVIRUPDWLRQRII
&RXSOHGPRWLRQRII
7DQJHQWLDOWUDFNLQJRII 7KHVHWWLQJVDFWLYDWHGE\5(6(7
6\QFKURQRXVVSLQGOHRII EHFRPHYDOLG
*HRPHWU\D[LVDVVLJQPHQWDFFRUGLQJWR0'
0DVWHUYDOXHFRXSOLQJRII
$[LDOUHYROXWLRQDOIHHGUDWHRII
5HVHUYHG EDVLFIUDPH RII
0DVWHUVSLQGOHDFFRUGLQJWR0'
0DVWHUWRROKROGHURII
5HIHUHQFHD[LVDFFRUGLQJWR0'

%LW 
%LWV
0' )XQFWLRQDGRSWV5(6(7SRVLWLRQ
5(6(7B02'(B0$6.
%LW
%LW
5HIHUHQFHD[LVLVUHWDLQHG

%LW  GHIDXOW

%LWV7KHFXUUHQWVHWWLQJVDUHUHWDLQHG
%LW)XQFWLRQDGRSWV5(6(7SRVLWLRQ

,QWHUSUHWDWLRQRIWKHILUVWSDUWSURJUDPEORFN

Figure 9-15 System settings after RESET/part program end and part program start

Basic Functions
676 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

Effect of MD20110 $MC_RESET_MODE_MASK

Bit Value "0": Value "1":


0 Compatibility with older software versions Initial state after power-up and RESET/part
program end
1 D, T, M output on tool selection No D, T, M output on tool selection
With active tool management, irrelevant
2 No tool offset active after POWER ON If bit 0=1 and bit 6 =1, the tool offset of the last
active tool is active after POWER ON
With active tool management, irrelevant
3 Use active tool or tool offset from last Use active tool or tool offset from last program
program terminated before switching on test terminated at the end of test mode
mode
4 Reserved
5 Reserved
6 Tool offset according to MD20120, Active tool offset is retained
MD20121,
MD20130; D, T, M output to PLC dependent
on bit 1
7 Transform. according to MD20140 Active transformation is retained
8 Coupled-axis groupings are deactivated Coupled-axis groupings are retained
9 Tangential tracking is deactivated. Tangential tracking is retained.
10 Not configured synchronous spindle coupling Not configured synchronous spindle coupling
is switched off remains active
11 Revolutional feedrate is no longer valid Current setting for revolutional feedrate is
retained
12 Modified geometry axis assignment is Modified geometry axis assignment is retained
deleted according to MD20050, depending
on MD20118 (because of compatibility)
13 Guide value coupling is separated Active guide value coupling is retained
14 Basic frame is deselected The current setting of the basic frame is
retained.
15 The active electronic gears are retained The active electronic gears are deactivated
16 Initial setting for the master spindle The current setting of the master spindle is
according to MD20090 retained.
17 Initial setting for the master tool holder The current setting of the master tool holder is
according to MD20124 retained.
18 Reference axis for G96, G961, G962 Reference axis is retained.
according to MD20100

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 677
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

MD20152 $MC_GCODE_RESET_MODE
Each G code group controlled in MD20150 $MC_GCODE_RESET_VALUES[i] can be
selectively controlled with MD20152 $MC_GCODE_RESET_MODE[i].

MD20152 $MC_GCODE_RESET_MODE[i] 0 1
(i = G code group -1)
MD20150 $MC_GCODE_RESET_VALUES[i] The value stored in The last active/
MD20150 is active current value is active

Part program start


The initial setting of the control system at part program start, e.g. G codes (especially active
plane and active settable zero offset), active tool length compensation, transformation, and
axis coupling, is determined according to the following table.
Application
If a bit is set in MD20112 $MC_START_MODE_MASK, the reset action of the relevant
function can be delayed until the start of the part program.

Table 9- 6 MD20112 $MC_START_MODE_MASK active

Bit Value "0": Value "1":


1 D, T, M output on tool selection No D, T, M output on tool selection
With active tool management, irrelevant
2 Reserved
3 Reserved
4 Current level is retained. Level according to MD20150
5 Current settable frame is retained Frame according to MD20150
6 Active tool offset is retained Tool offset according to MD20120, MD20121,
and
MD20130; D, T, M output to PLC dependent on
bit 1
7 Active transformation is retained Transformation according to MD20140
8 Coupled-axis groupings are retained Coupled-axis groupings are deactivated
9 Tangential tracking is retained. Tangential tracking is
deactivated.
10 Not configured Synchronous spindle Not configured Synchronous spindle coupling is
coupling remains active switched off
11 Reserved
12 Modified geometry axis assignment is Geometry axis assignment is deleted
retained according to MD20050, depending on MD20118
(because of compatibility).
13 Active master value coupling is retained. Master value coupling is deactivated.
14 Reserved for basic frame
15 reserved for electronic gears
16 Current setting of the master spindle Initial setting for master spindle according to
(SETMS) is retained MD20090

Basic Functions
678 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

Bit Value "0": Value "1":


17 The current setting of the master tool holder MD20124 > 0: Initial setting for the master tool
(SETMTH) is retained. holder according to MD20124
18 Reference axis for G96, G961, G962 Reference axis is retained.
according to MD20100

Note
In MD20110 bits set to 1 cause settings to be retained,
in MD20112 bits set to 0 cause settings to be retained.

Significance of the machine data


The channel-specific machine data in the table "Selection of RESET and power-up
response" has the following significance:

Machine data Meaning


MD20120 $MC_TOOL_RESET_VALUE Tool length compensation on power-up
Definition of the tool (T No.) whose tool length compensation
values must be considered during RESET and power-up
according to MD20110 $MC_RESET_MODE_MASK
MD20121 $MC_TOOL_PRESEL_RESET_VALUE Preselected tool on RESET
Definition of the tool (T-No.) as a preselected tool whose tool
length compensation values must be considered during
RESET and power-up according to
MD20110 $MC_RESET_MODE_MASK
MD20130 $MC_CUTTING_EDGE_RESET_VALUE Tool cutting-edge length compensation on power-up
Definition of the cutting-edge number (D number) of the tool
in MD20120 $MC_TOOL_RESET_VALUE
MD20140 $MC_TRAFO_RESET_VALUE Power-up transformation data block
Definition of the transformation data block (TRAORI,
TRAANG, TRANSMIT)
MD20144 $MC_TRAFO_MODE_MASK Selection of the kinematic transformation function
Setting bit 1 causes the last active transformation to be
retained on POWER ON.
MD20150 $MC_GCODE_RESET_VALUES Reset position of G groups
MD20152 $MC_GCODE_RESET_MODE Reset behavior of G groups
G code initial state on RESET
MD20152 specifies for each entry in MD20150
$MC_GCODE_RESET_VALUES whether the setting in
accordance with MD20150 $MC_GCODE_RESET_VALUES
is adopted again (MD20152=0) or the current setting is
retained (MD20152=1) on reset/part program end.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 679
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

Machine data Meaning


MD21330 $MC_COUPLE_RESET_MODE_1 Coupling cancellation response
Cancelation of an axis coupling
MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB Assignment of geometry axis to channel axis
Acts upon bit 12 in MD20110/20112
MD20118 $MC_GEOAX_CHANGE_RESET Allow automatic geometry axis change
Acts upon bit 12 in MD20110/20112

Example
1. Activate RESET setting on RESET:
MD20110 = 'H01' (bit 0)
MD20112 = '0'
2. Transformation remains active on RESET/part program start:
MD20110 = 'H81' (bit 0 + bit 7)
MD20112 = '0'
3. Tool length compensation remains active on RESET/part program start:
MD20110 = 'H41' (bit 0 + bit 6)
MD20112 = '0'
4. Active level (bit 4) and settable frame (bit 5) remain active after RESET and are reset on
part program start:
MD20110 = 'H41' (bit 4 + bit 5)
MD20112 = '30'

Note
For bit 5 and bit 6:
If MD20110/MD20112 are parameterized so that tool length compensation or a frame is
active on a part program start/MDA start, the first programming of the axes must use
absolute measurements (because of the offsetting process).
Exception: With MD42442/MD42440 the offsetting process for G91 is suppressed.

Basic Functions
680 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

9.13.1 Tool withdrawal after POWER OFF with orientation transformation

Function
If processing with tool orientation is interrupted as a result of power failure, the
transformation which was previously active can be reselected when power is restored,
provided it is configured accordingly, and a frame can be generated towards the tool axis.
The tool can then be retracted in JOG mode by means of a retraction movement towards the
tool axis.
This procedures requires valid axis positions after POWER ON which are either delivered by
absolute encoders or by the function "Position restoration on POWER ON (Page 1170)".

Parameter assignment
In the event-driven program call for power-up (MD20108 bit 3=1), the user must wait in the
user program /_N_CMA_DIR/_N_PROG_EVENT_SPF and query the system variable
$AA_ENC_ACTIVE[<axis>] until valid axis positions are available.
A frame, which positions the tool axis in the direction of the X, Y or Z axes, can then be
generated by the part program commands TROTX/TROTY/TROTZ .

Note
Once the tool has been retracted in JOG mode, axes whose positions have been restored
are homed. See also machine data:
• MD20700 $MC_REFP_NC_START_LOCK
• MD34110 $MA_REFP_CYCLE_NR

Boundary condition
It is to be assumed that axes with incremental encoders and without actual-value buffering
are clamped with sufficient speed in the event of a power failure to prevent them drifting from
their last position setpoint.

Example
Example with orientation transformation and incremental encoders of the orientation axes:

MD10720 $MN_OPERATING_MODE_DEFAULT[0]=6 ; Power-up in JOG mode


MD30240 $MA_ENC_TYPE[0, AX*] = 1 ; Incremental measuring system
MD34210 $MA_ENC_REFP_STATE[0, AX*] = 3 ; Enable the restoration of axis positions for
incremental encoders.
MD20108 $MC_PROG_EVENT_MASK = ’H9’ ; Activate PROG_EVENT during power-up and at the
start of the part program.
MD20152 $MC_GCODE_RESET_MODE[52] = 1 ; Obtain TOFRAME via reset.
MD20110 $MC_RESET_MODE_MASK = ’HC1’ ; Obtain transformation and tool via reset.
MD20144 $MC_TRAFO_MODE_MASK = ’H02’ ; Obtain transformation via POWER OFF.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 681
Mode Group, Channel, Program Operation, Reset Response (K1)
System settings for power-up, RESET/part-program end and part-program start

Table 9- 7 User program: /_N_CMA_DIR/_N_PROG_EVENT_SPF

Program code Comment


IF $P_PROG_EVENT == 4 ; Power-up
IF $P_TRAFO <> 0 ; Transformation has been selected.
WHILE (TRUE) ; Wait for a measuring system.
IF $AA_ENC_ACTIVE[B] == TRUE
AND $AA_ENC_ACTIVE[C] == TRUE
GOTOF SYNC_POSITION
ENDIF
G4 F0.5 ; 0.5 s wait time
ENDWHILE
SYNC_POSITION: GET(B, C) ; Synchronize the position of the orientation
axes.
TOROTZ ; Rotate the Z axis of the WCS towards the tool
axis.
ENDIF
M17
ENDIF

IF $P_PROG_EVENT == 1 ; Start of the part program


TOROTOF ; Reset the tool frame.
RET
ENDIF

Basic Functions
682 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

9.14 Replacement of NC functions by subprograms

9.14.1 General

Function
The NC-language offers the option of structuring more complex processing sequences
through subprograms. Normally these subprograms are started from the part programs with
explicitly programmed subprogram calls. Along with this, there is also the possibility of hiding
a subprogram call behind another NC-command (e.g. call of an M function) and thus of
replacing the actual command function by the subprogram.
Example: Call of the tool change cycle by the auxiliary function M6
The reasons for this are as follows:
● Existing part programs can be adapted to the changed environmental conditions without
correcting the part programs themselves.
● An introduced programming style can be maintained.

Replaceable NC functions
The following NC functions can be replaced by subprograms:
● M, T, and D/DL auxiliary functions:
– M Functions for switching operations
– T Functions for tool selection
– D/DL-Functions for tool compensation selection
● Spindle-related functions during active synchronous spindle coupling:
– Gear stage change (automatic change or direct gear stage)
– Spindle positioning with SPOS, SPOSA and M19

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 683
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

9.14.2 Replacement of M functions

Conditions
The following conditions are applicable for replacing the M functions:
● A maximum of one function replacement is active for each block.
● The block with the function replacement may not contain the following elements:
– M98
– Modal subroutine call
– Subprogram return
– Part program end
● A subroutine call must not be superimposed on M functions with predetermined
significance (see Section "Non-configurable M functions").

Configuration
The numbers of the M functions to be replaced by the subprograms are specified in the
machine data:
MD10715 $MC_M_NO_FCT_CYCLE[<n>]
The names of the subprograms that are to replace the M functions specified in MD10715 are
entered in the machine data:
MD10716 $MC_M_NO_FCT_CYCLE_NAME[<n>]
Example:
MD10715 $MC_M_NO_FCT_CYCLE[0] = 101
MD10716 $MC_M_NO_FCT_CYCLE_NAME[0] = "SUB_M101"
⇒ Call of the subprogram SUB_M101 through M101
MD10715 $MC_M_NO_FCT_CYCLE[1] = 102
MD10716 $MC_M_NO_FCT_CYCLE_NAME[1] = "SUB_M102"
⇒ Call of the subprogram SUB_M102 through M102

Programming
If the M function configured with MD10715 is programmed in a part program block, the
appropriate subroutine is called at the end of the part program block.
If the M function is programmed again within the called subroutine, the M function is not
replaced again. In addition, other M function replacements configured with MD10715 or
MD10716 are not executed.
Exception:
The M function is also replaced in an ASUB if the ASUB was started in a subroutine that was
called via an M function.

Basic Functions
684 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

System variables for the transfer parameters


Information about the programmed M function can be read in the replacement subroutine via
the following system variables:

System variable Meaning


$C_M_PROG = TRUE if the M function has been replaced
$C_M Value of the replaced address M (type: INT)
$C_AUX_VALUE[0] Value of the replaced address M (type: REAL)
$C_ME Address extension of the replaced M function
$C_AUX_EXT[0] Address extension of the replaced M function
(identical to $C_ME)
$C_AUX_IS_QUICK[0] = TRUE if M function was programmed with quick output to PLC

M functions that cannot be configured


M Functions that trigger system functions as pre-defined auxiliary functions should not be
used to call subroutines. The following M functions have standard predetermined
significance:

M function Remarks
M0 ... M5, Predefined auxiliary functions that trigger system functions
M17, M30, M19,
M40 ... M45
M98, M99 with activated external NC language:
MD18800 $MN_MM_EXTERN_LANGUAGE == TRUE

M functions can be defined for specific tasks using the following machine data. Through this,
they receive a fixed meaning and, therefore, must not be used to call subroutines:

Machine data Significance


MD10714 $MN_M_NO_FCT_EOP M function for spindle active after
RESET
MD10804 $MN_EXTERN_CHAN_M_NO_SET_INT M function for ASUB activation (external
mode)
MD10806 $MN_EXTERN_CHAN_M_NO_DISABLE_INT M function for ASUB deactivation
(external mode)
MD10814 $MN_EXTERN_M_NO_MAC_CYCLE Macro call via M function
MD20094 $MC_SPIND_RIGID_TAPPING_M_NR M function for switchover to controlled
axis mode
MD20095 $MC_EXTERN_RIGID_TAPPING_M_NR M function for switchover to controlled
axis mode (external mode)
MD22254 $MC_AUXFU_ASSOC_M0_VALUE Additional M function for program stop

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 685
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Machine data Significance


MD22256 $MC_AUXFU_ASSOC_M1_VALUE Additional M function for conditional stop
MD26008 $MC_NIBBLE_PUNCH_CODE Definition of M functions (for nibble-
specific)
MD26012 $MC_PUNCHNIB_ACTIVATION Activation of punching and nibbling
functions

Note
An exception here is the M function for the tool change configured via the following machine
data:
MD22560 $MC_TOOL_CHANGE_M_CODE (Tool change with M Function)
This M function is permitted to be replaced by a subroutine (see " Replacement of the
M function for the tool change (Page 689)").

9.14.3 Replacement of T and D/DL functions

9.14.3.1 General

Conditions
The following conditions are applicable for the replacement of T or D or DL functions:
● A maximum of one function replacement is active for each block.
● The block with the function replacement may not contain the following elements:
– M98
– Modal subroutine call
– Subprogram return
– Part program end

Configuration
Specification of the replacement subroutine
The name of the subroutine, which is to become effective in case of T-Function replacement,
is entered in the machine data:
MD10717 $MN_T_NO_FCT_CYCLE_NAME
The name of the subroutine, which is to become effective in case of D/DL function
replacement, is entered in the machine data:
MD11717 $MN_D_NO_FCT_CYCLE_NAME

Basic Functions
686 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Note
The same subroutine should be configured for the T and D/DL replacement subroutine.

Specification of the D or DL number to the replacement subroutine


For a simultaneous programming of D or DL and T in a block, D or DL can either be
specified as parameter to the replacement subroutine or executed before calling the
replacement subroutine.
The behavior depends on the setting of bit 0 in the machine data:
MD10719 $MN_T_NO_FCT_CYCLE_MODE (Parameterization of the T function
replacement)

Bit Value Description


0 0 The D or the DL number is specified to the replacement subroutine via the system
variable (default setting).
1 The D or DL number is calculated directly in the block.
Note:
This function is only active if the tool change was configured with M function:
MD22550 $MC_TOOL_CHANGE_MODE = 1
otherwise the D or DL values are always transferred.

Call time of the replacement subroutine


The call time of the replacement subroutine is defined by the setting of bit 1 and bit 2 in the
machine data:
MD10719 $MN_D_NO_FCT_CYCLE_MODE

Value of bit 1 Value of bit 2 Call time of the replacement subroutine


0 0 At block end (default)
After the replacement subroutine has been executed, the
interpretation is resumed with the subprogram line following the
line that triggered the replacement operation.
1 0 At block start
After the replacement subroutine has been executed, the part
program line that controlled the call of the subroutine is
interpreted. The T address and the D or DL address and the M
function for the tool change are no longer processed.
0/1 1 At block start and block end
The replacement program is called twice.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 687
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Note
Which replacements are to be performed at the block start and which are to be performed at
the block end is up to the user.

Programming
Read activation time of the replacement subroutine
The $P_SUB_STAT system variables can be used to define the time (block start/block end)
when the replacement operation is executed:

Value Description
0 Replacement subroutine is not active
1 Replacement subroutine is active, call at block start
2 Replacement subroutine is active, call at block end

Example: T function replacement

Project design: Meaning:


MD22550 $MC_TOOL_CHANGE_MODE = 0 Tool change with T
function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" T replacement subroutine
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 0

Programming Comment
...
N110 D1
N120 G90 G0 X100 Y100 Z50 ; D1 is active
N130 D2 X110 Z0 T5 ; D1 remains active, programmed D2 is provided to
the T replacement cycle as a variable.
...

A comprehensive example for the T function replacement is given in " Examples of M/T
function replacement during tool change (Page 694) ".

Basic Functions
688 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

9.14.3.2 Replacement of the M function for the tool change

Tool change with M function


MD22550 $MC_TOOL_CHANGE_MODE = 1
For certain machine types (e.g. milling machine with tool magazine) the T function is not
used for the actual tool change, but instead for its preparation i.e. with the T function the new
tool is brought to the tool change position parallel to the machining time (without interruption
of the processing).
The actual tool change is then called with the M function, which is configured in the following
machine data:
MD22560 $MC_TOOL_CHANGE_M_CODE (M function for tool change)
References:
Function Manual Extended Functions; Tool Change (W3)

Replacement of the M function for the tool change


The M function for the tool change configured via MD22560 is replaced by a subroutine, if a
corresponding replacement subroutine is configured via both the following machine data:
MD10715 $MN_M_NO_FCT_CYCLE[n] (M function to be replaced by a subroutine)
MD10716 $MN_M_NO_FCT_CYCLE_NAME[n] (Name of subroutine for M function)
For more information, see " Replacement of M functions (Page 684) ".

Note
The configuration of a replacement subroutine for the tool change with M code is dependent
on whether the tool change with M code was actually configured with MD22550
$MC_TOOL_CHANGE_MODE.

M function replacement with parameter transfer


If an M function replacement is configured with MD10715[n] and MD10716[n], then for this M
function replacement a parameter transfer can be set (similar to the parameter transfer for
the T function replacement):
MD10718 $MN_M_NO_FCT_CYCLE_PAR = n

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 689
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

The data (parameters) needed for the tool offset or the tool offset selection is passed to the
subroutine via the system variables. The parameters stored in the system variables always
refer to the part program line in which the M function to be replaced is programmed.

Note
The address extension and function value of the M function must be explicitly, i.e. constantly,
programmed for M function replacements with parameter transfer. An indirection definition
via variables is not allowed.
Permissible programming:
M<function value>
M=<function value>
M[<address extension>] = <function value>
Impermissible programming:
M=<Variable1>
M[<variable2>] = <variable1>

Conflict case: M and T functions for tool change in a block


If, in addition to the M function replacement with parameter transfer, a T function
replacement was configured, the following behavior is applicable in case of a conflict, i.e. T
and M function for tool change are in one block:
● The T function replacement does not take place. Instead, the T value is made available to
the M function replacement via the appropriate $C_T... system variables.
● The programming of the address T in the M function subroutine does not result in another
replacement.

9.14.3.3 Function replacement with parameter transfer

Rules for parameter transfer


The following rules are applicable for the parameter transfer to the replacement subroutines:
● If one of the above-mentioned replacements is active, then all the information required for
the tool offset selection (T, D or DL numbers, M function for tool change, address
extensions) is transferred to the replacement subroutine.
Exception:
MD10719 $MN_T_NO_FCT_CYCLE_MODE Bit 0 = 1
With this configuration the D or the DL numbers are not transferred to the replacement
subroutines.

Basic Functions
690 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

● In a block, only one replacement subroutine can be processed at a time.


In case of multiple replacements of the T, D/DL addresses and the M Function for the tool
change, only one of the replacement subroutines is always active even under different
names. As described above, all the required parameters for the tool offset selection are
then made available to it. If configured accordingly, the subroutine is called before and/or
after execution of the part program line.
● One and the same subroutine can be configured for the replacement of the T, D/DL
addresses and the M Function for the tool change. The function to be replaced can then
be determined by querying the system variables.

CAUTION
The values passed to the replacement subroutine have not yet been executed and
must, therefore, be programmed again in this subroutine.

System variables
The programmed values (T, D or Dl numbers, M function for tool change, address
extensions) can be transferred to the replacement subroutine via the following system
variables:

System variable Description


$C_T_PROG Returns the value "1", if address T has been programmed.
$C_T Value of the programmed address T
$C_TE Address extension of address T
$C_TS_PROG Returns the value "1", if the address T has been programmed with a tool identifier
of type STRING (only in case of active tool monitoring).
$C_TS Returns the string of the tool identifier programmed under address T (only in case
of active tool monitoring)
$C_D_PROG Returns the value "1", if address D has been programmed.
$C_D Value of the programmed address D
$C_DL_PROG Returns the value "1", if address DL has been programmed.
$C_DL Value of the programmed address DL
$C_M_PROG Returns the value '1", if an M function has been programmed for the tool change.
$C_M Value of the programmed address M
There are two different cases:
1. For the tool change with M function, a replacement subroutine is programmed
with parameter transfer. $C_M then returns the value: MD10715
$MN_M_NO_FCT_CYCLE
2. Only one replacement subroutine was configured for the addresses T and/or
D/DL and in the program the M function for the tool change is programmed
with the addresses to be replaced. $C_M then returns the value:
MD22560 $MC_TOOL_CHANGE_M_CODE
$C_ME Address extension of the M function for the tool change

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 691
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Sample parameter transfers


Example 1:
Tool change with M6 should be active. The D/DL number is to be transferred to the
replacement subroutine.

Project design: Meaning:


MD22550 $MC_TOOL_CHANGE_MODE = 1 Tool change with
M function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" T replacement subroutine
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 0 Transfer of the D/DL
number

Programming Comment
...
N210 D1
N220 G90 G0 X100 Y100 Z50 ; D1 is active
N230 D2 X110 Z0 T5 ; D1 remains active, programmed D2 is provided
to the T replacement subroutine as a variable.
N240 M6 ; Execute tool change
...

Example 2:
Tool change with M6 should be active. The D/DL number is not to be transferred to the
replacement subroutine.

Project design: Meaning:


MD22550 $MC_TOOL_CHANGE_MODE = 1 Tool change with
M function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" Replacement
subroutine
for T function
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 1 No transfer of the
D/DL number

Programming Comment
...
N310 D1
N320 G90 G0 X100 Y100 Z50 ; D1 is active
N330 D2 X110 Z0 T5 ; D2 is activated, D2 is not transferred to the
T replacement subroutine as a variable
N340 M6 ; Execute tool change
...

Basic Functions
692 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Example 3:
A replacement subroutine (MY_T_CYCLE ) is configured for T and M6.
In addition, MD10718 $MN_M_NO_FCT_CYCLE_PAR (M Function replacement with
parameters) was used to configure the parameter transfer to M6 replacement subroutine.
If M6 is now programmed in the block with D or DL, then the D or the DL number is also
transferred as parameter to the M6 replacement subroutine, when:
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 1

Project design: Meaning:


MD22550 $MC_TOOL_CHANGE_MODE = 1 Tool change with M
function
MD22560 $MC_TOOL_CHANGE_M_CODE = 6 M code for tool
change
MD10715 $MC_M_NO_FCT_CYCLE[3] = 6 M function to be
replaced
MD10716 $MC_M_NO_FCT_CYCLE_NAME[3] = "MY_T_CYCLE" Replacement
subroutine
for M function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" Replacement
subroutine
for T function
MD10718 $MN_M_NO_FCT_CYCLE_PAR = 3 Parameter-
transfer to the
replacement
subroutine
for M6
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 1 No transfer of the
D/DL number

Programming Comment
...
N410 D1
N420 G90 G0 X100 Y100 Z50 ; D1 is active
N330 D2 X110 Z0 T5 M6 ; D1 remains active, D2 and T5 are transferred
to the M6 replacement subroutine as a variable
...

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 693
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

9.14.3.4 Example of M/T function replacement for tool change

Example 1: Call of subroutine SUB_M6 through M6 with parameter transfer

Project design: Meaning:


MD10715 $MN_M_NO_FCT_CYCLE[2] = 6 M code for tool
change
MD10716 $MN_M_NO_FCT_CYCLE_NAME[2] = "SUB_M6" Replacement
subroutine
for M function
MD10718 $MN_M_NO_FCT_CYCLE_PAR = 2 M function
replacement with
parameter transfer

Main program:

Programming
PROC MAIN
...
N10 T1 D1 M6
...
N90 M30

Replacement subroutine:

Programming Comment
PROC SUB_M6
N110 IF $C_T_PROG==TRUE ; Scan whether address T has been programmed
N120 T[$C_TE] = $C_T ; Execute T selection
N130 ENDIF
N140 M[$C_ME] = 6 ; Execute tool change
N150 IF $C_D_PROG==TRUE Scan whether address D has been programmed.
N160 D=$C_D Execute D selection
N170 ENDIF
N190 M17

Example 2: Replacement of T address and D or DL addresses at block start


The following should be true for the example:
● Tool change is done with the address T.
● Tool management not active.
● B axis as indexing axis with Hirth tooth system.

Basic Functions
694 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Project design: Meaning:


MD11717 $MN_D_NO_FCT_CYCLE_NAME = "D_T_SUB_PROG" Replacement
subroutine
for D function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "D_T_SUB_PROG" Replacement
subroutine
for M function
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 'H2' Call at block start
MD22550 $MC_TOOL_CHANGE_MODE = 0 Tool change with T
function

Main program:

Programming
...
N410 G01 F1000 X10 T1=5 D1
...

Replacement subroutine:

Programming Comment
N1000 PROC D_T_SUB_PROG DISPLOF SBLOF
...
N4100 IF $C_T_PROG==TRUE ; Scan whether address T has been
programmed
N4110 ; Replacement for address T with
tool no.
N4120 POS[B] = CAC($C_T) ; Move revolver to indexing position
N4130 T[$C_TE] = $C_T ; Select tool (T selection)
N4140 ENDIF

N4300 IF $C_T_PROG==TRUE ; Scan whether address D has been


programmed.
N4310 ; Replacement for address D
N4320 D=$C_D ; Select offset (D selection)
N4330 ENDIF

N4400 IF $C_DL_PROG==TRUE ; Scan whether address DL has been


programmed.
N4410 ; Replacement for address DL
N4420 D=$C_DL ; Select insert offset
N4430 ENDIF
...
N9999 RET

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 695
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

This causes the part program line


N410 G01 F1000 X10 T1=5 D1
to execute the following program:

Program Comment
N1000 PROC D_T_SUB_PROG DISPLOF SBLOF
...
N4100 IF $C_T_PROG==TRUE ; Scan whether address T has been
programmed
N4110 ; Replacement for address T with
tool no.
N4120 POS[B] = CAC($C_T) ; Move revolver to indexing position
N4130 T[$C_TE] = $C_T ; Select tool (T selection)
N4140 ENDIF

N4300 IF $C_T_PROG==TRUE ; Scan whether address D has been


programmed.
N4310 ; Replacement for address D
N4320 D=$C_D ; Select offset (D selection)
N4330 ENDIF

N4400 IF $C_DL_PROG==TRUE ; Scan whether address DL has been


programmed.
N4430 ENDIF
...
N9999 RET
N410 G01 F1000 X10 ; Rest of N410 without tool
programming

Basic Functions
696 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

9.14.3.5 Conflict resolution in case of multiple replacements

Multiple replacements
Multiple replacements mean that several replacement subroutines with different names have
been configured, e.g.:
● For Address D and DL:
MD11717 $MN_FCT_CYCLE_NAME = "D_SUB_PROG"
● For Address T:
MD10717 $MN_FCT_CYCLE_NAME = "T_SUB_PROG"
● for the M function for the tool change
MD10715 $MN_M_NO_FCT_CYCLE[0] = 6
MD10716 $MN_M_NO_FCT_CYCLE_NAME[0] = "M6_SUB_PROG"
MD10718 $MN_M_NO_FCT_CYCLE_PAR = 0
MD22550 $MC_TOOL_CHANGE_MODE = 1
MD22560 $MC_TOOL_CHANGE_M_CODE = 6

Conflict resolution
The following table illustrates how the control system resolves the conflicts in case of
multiple replacements:

The following are programmed in one part program line: Called


replacement subroutine:
D and/or DL T M6
– – X M6_SUB_PROG
– X – T_SUB_PROG
– X X M6_SUB_PROG
X – – D_SUB_PROG
X – X M6_SUB_PROG
X X – T_SUB_PROG
X X X M6_SUB_PROG

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 697
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

9.14.4 Replacement of spindle-related functions

9.14.4.1 General

Function
In case of active synchronous spindle coupling, the following spindle-related functions can
be replaced by a subroutine for the leading spindleof this coupling:
● Direct gear stage change with M41 to M45 and automatic gear stage change in case of
speed programming with M40
● Spindle positioning with SPOS, SPOSA and M19

Conditions
● The replacement of a spindle-related function is executed only when:
– the programmed spindle is active as leading spindleof a synchronous spindle
coupling.
– Leading and following spindle are present in the same channel.
– in case of a gear-stage change actually a gear-stage change is present.
● Only one of the possible spindle-related function replacements can be executed in a part
program line. Multiple replacements lead to the termination of the part program
processing. If still several spindle-related functions have to be replaced, then the
respective function calls must be distributed to several part program lines.

Configuration
Functions to be replaced
The spindle-related functions to be replaced through the subprogram are selected in the
machine data:
MD30465 $MA_AXIS_LANG_SUB_MASK

Bit Description
0 Gear-stage change automatic (M40) and directly (M41-M45)
=0 No replacement
=1 Replacement through the subroutine set in MD15700 and MD15702
1 Spindle positioning with SPOS/SPOSA/M19
=0 No replacement
=1 Replacement through the subroutine set in MD15700 and MD15702

Name of subprogram
The name of the subroutine, which is to replace the spindle-related function selected in
MD30465, is to be entered in the machine data:
MD15700 $MN_LANG_SUB_NAME (Name for the substitution subroutine)

Basic Functions
698 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Path to the subroutine


The path to the subroutine is set with the machine data:
MD15700 $MN_LANG_SUB_NAME (call path for the substitution subroutine)

Value Description
0 Path to the directory with the Manufacturer cycles: /_N_CMA_DIR
(default setting)
1 Path to the directory with the User cycles: /_N_CUS_DIR
2 Path to the directory with the Siemens cycles: /_N_CST_DIR

Call time of the replacement subroutine


Call at block start
If the replacement subroutine is called at block start, then the part program line that led to
the calling of the subroutine is processed after the subroutine is processed. The parts to be
replaced from the replacement subroutine are not processed any more.
Call at block end
During call at block end, the part program line that lead to the calling of the subroutine is
called first. The parts to be replaced in the replacement subroutine are processed. The
subroutine is called finally.
Read activation time of the replacement subroutine
The $P_SUB_STAT system variables can be used to define the time (block start/block end)
when the replacement operation is executed:

Value Description
0 Replacement subroutine is not active
1 Replacement subroutine is active, call at block start
2 Replacement subroutine is active, call at block end

9.14.4.2 Function replacement during gear-stage change

Function
If a gear-stage change is to be done for the leading spindle of an active synchronous spindle
coupling and the replacement is configured through a subroutine
(MD30465 $MA_AXIS_LANG_SUB_MASK, Bit 0 = 1), then a replacement subroutine is
called for the implementation of the gear-stage change.
The replacement subroutine handles the following tasks:
1. Resolve coupling
2. The gear stage change of the spindles involved in the coupling is executed
3. Close coupling again

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 699
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Call time of the replacement subroutine


The call always takes place at the block start during automatic gear stage change with M40.
In case of programmed gear-stage change with M41 to M45 the time of the call depends on
the output response of this auxliary function to the PLC:
MD22080 $MC_AUXFU_PREDEF_SPEC[12] (output specification for M41)
...
MD22080 $MC_AUXFU_PREDEF_SPEC[16] (output specification for M45)

Bit Value Description


5 1 Output of the auxiliary function before the motion
6 1 Output of the auxiliary function during the motion
7 1 Output of the auxiliary function after the motion
In case of output before or during the motion the subroutine call is made at the block start. In
case of output after the motion the subroutine call is made at the block end.

Data transfer to the replacement subroutine


The data required for the replacement can be read in the replacement subroutine through
the following system variables:

System variable Description


$P_SUB_AXFCT scan for replacement type
Returns the value "1", if the replacement for the gear-stage change (M40,
M41-M45) is used.
$P_SUB_GEAR Programmed gear stage
Returns for each spindle the programmed or the calculated gear stage.
Outside the replacement program, these variables deliver the gear stage
of the leading spindle.
$P_SUB_AUTOGEAR Automatic gear stage change is active
Delivery to a spindle-specific replacement the information whether an
automatic gear stage change with M40 was active in the part program line
that triggered the replacement operation.
Outside the replacement operation, this variable delivers the current
setting in the interpreter.
$P_SUB_LA Leading spindle of the active coupling
Returns the axis identifier of the leading spindle of the active coupling,
which had triggered the replacement operation.
Tip:
If the variable is called outside the replacement operation, the program
processing is cancelled with an alarm.
$P_SUB_CA Following spindle of the active coupling
Returns the axis identifier of the following spindle of the active coupling,
which had triggered the replacement operation.
Tip:
If the variable is called outside the replacement operation, the program
processing is cancelled with an alarm.

Basic Functions
700 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Example
Configuration
The replacement subroutine for the gear-stage change is activated:
MD30465 $MA_AXIS_LANG_SUB_MASK[AX5] = 'H0001'
For the output of M41 to M45 to the PLC an output before the motion is configured:
MD22080 $MC_AUXFU_PREDEF_SPEC[12] = 'H21'
MD22080 $MC_AUXFU_PREDEF_SPEC[13] = 'H21'
MD22080 $MC_AUXFU_PREDEF_SPEC[14] = 'H21'
MD22080 $MC_AUXFU_PREDEF_SPEC[15] = 'H21'
MD22080 $MC_AUXFU_PREDEF_SPEC[16] = 'H21'
Main program:

Programming Comment
PROC MAIN
...
N110 COUPON(S2,S1) ; Activate synchronous spindle coupling
N120 G01 F100 X100 S5000 M3 M43 ; Call of _N_LANG_SUB_SPF due to M43
N130 M40 ; Automatic gear stage change on
N140 M3 S1000 ; Call of _N_LANG_SUB_SPF in case of
automatic gear-stage change based on S
programming.

Replacement subroutine _N_LANG_SUB_SPF, Variant 1:


This programming example is optimized for simplicity and speed. The spindles are thus
addressed directly (typically the machine manufacturer would know, which following
Spindle(s) are affected during spindle positioning and address these spindles directly). In the
example S1 is the leading spindle and S2 is the following spindle.

Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
N1100 IF($P_SUB_AXFCT ==1) ; Replacement due to gear stage
change
...

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 701
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Programming Comment
N1140 DELAYFSTON ; Start Stop Delay Area
N1150 COUPOF(S2,S1) ; Deactivate synchronous spindle
coupling
N1160 ; Execute gear-stage change
separately for main and following
spindle:
N1170 M1=$P_SUB_GEAR M2=$P_SUB_GEAR
N1180 DELAYFSTON ; End of Stop Delay Area
N1190 COUPON(S2,S1) ; Activate synchronous spindle
coupling
N1200 ENDIF
...
N9999 RET

Replacement subroutine _N_LANG_SUB_SPF, Variant 2:


In this programming example the spindles are not addressed directly, but instead the system
variables $P_SUB_LA and $P_SUB_CA are used.

Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
N1010 DEF AXIS _LA ; Auxiliary memory for leading axis/leading
spindle
N1020 DEF AXIS _CA ; Auxiliary memory for following
axis/following spindle
N1030 DEF INT _GEAR ; Auxiliary memory for gear stage
...
N1100 IF($P_SUB_AXFCT==1) ; Replacement due to gear stage change
N1110 _GEAR=$P_SUB_GEAR ; Save gear stage to be activated
temporarily
N1120 _LA=$P_SUB_LA ; Save axis identifier of the leading
spindle temporarily
N1130 _CA=$P_SUB_CA ; Save axis identifier of the following
spindle temporarily
N1140 DELAYFSTON ; Start Stop Delay Area
N1150 COUPOF(_CA,_LA) ; Deactivate synchronous spindle coupling
N1160 ; Execute gear stage change for leading and
following spindle:
N1170 M[AXTOSPI(_LA)]=_GEAR M[AXTOSPI(_CA)]=_GEAR
N1180 DELAYFSTOF End of Stop Delay Area
N1190 COUPON(_CA,_LA) ; Activate synchronous spindle coupling
N1200 ENDIF
...
N9999 RET

Basic Functions
702 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

9.14.4.3 Function replacement during spindle positioning

Function
When the leading spindle of an active synchronous coupling with SPOS, SPOSA or M19 is to
be positioned and the replacement is configured through a subroutine
(MD30465 $MA_AXIS_LANG_SUB_MASK, Bit 1 = 1), then a replacement subroutine is
called for the implementation of the positioning.
The replacement subroutine handles the following tasks:
1. Resolve coupling
2. The spindles involved in the coupling are positioned separately at the position specified
by the leading spindle
3. Close coupling again

Application
Parallel processing of workpieces, e.g. in double-spindle machine. The spindles in such a
machine are coupled with the help of a coupling factor not equal to one and must, e.g. be
positioned at the same position due to a tool change. If the coupling is separated earlier,
then each spindle can be positioned at the tool change position separately.

Call time of the replacement subroutine


The call of the replacement subroutine during spindle positioning with SPOS or SPOSA always
takes place at the block start.
In the programming of M19 the call time depends on the output response of this auxiliary
function to the PLC:
MD22080 $MC_AUXFU_PREDEF_SPEC[9] (output specification for M19)

Bit Value Description


5 1 Output of the auxiliary function before the motion
6 1 Output of the auxiliary function during the motion
7 1 Output of the auxiliary function after the motion
In case of output before or during the motion the subroutine call is made at the block start.
In case of output after the motion the subroutine call is made at the block end.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 703
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Data transfer to the replacement subroutine


The data required for the replacement can be read in the replacement subroutine through
the following system variables:

System variable Description


$P_SUB_AXFCT scan for replacement type
Returns the value "2", when the replacement for spindle positioning is
active.
$P_SUB_SPOS Scan whether spindle positioning with SPOS is active
Returns TRUE, when the replacement is activated through SPOS.
$P_SUB_SPOSA San whether spindle positioning with SPOSA is active
Returns TRUE, when the replacement is activated through SPOSA.
$P_SUB_M19 Scan whether spindle positioning with M19 is active
Returns TRUE, when the replacement is activated through M19.
$P_SUB_SPOSIT SPOS/SPOSA -Position
Returns the programmed position.
Tip:
If the variable is called outside the replacement operation, the program
processing is cancelled with an alarm.
$P_SUB_SPOSMODE position approach mode
Returns the position approach mode for the spindle position returned by
$P_SUB_SPOSIT:
=0 No change of the position approach mode
=1 AC
=2 IC
=3 DC
=4 ACP
=5 ACN
=6 OC
=7 PC
Tip:
If the variable is called outside the replacement operation, the program
processing is cancelled with an alarm.
$P_SUB_LA Leading spindle of the active coupling
Returns the axis identifier of the leading spindle of the active coupling,
which had triggered the replacement operation.
Tip:
If the variable is called outside the replacement operation, the program
processing is cancelled with an alarm.
$P_SUB_CA Following spindle of the active coupling
Returns the axis identifier of the following spindle of the active coupling,
which had triggered the replacement operation.
Tip:
If the variable is called outside the replacement operation, the program
processing is cancelled with an alarm.

Basic Functions
704 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Example
Configuration
The replacement subroutine for the spindle positioning is activated:
MD30465 $MA_AXIS_LANG_SUB_MASK[AX5]='H0002'
For the output of M19 to the PLC an output before the motion is configured:
MD22080 $MC_AUXFU_PREDEF_SPEC[9]='H0021'
For spindle positioning with M19 the spindle position "260" is configured:
SD43240 $SA_M19_SPOS[AX5]=260
For the position approach mode during spindle positioning with M19 "Approach in positive
direction (ACP)" is configured:
SD43250 $SA_M19_SPOSMODE[AX5]=4
Main program:

Programming Comment
PROC MAIN
...
N110 COUPON(S2,S1) ; Activate synchronous spindle coupling
N220 SPOS[1]=100 ; Position leading spindle with SPOS
...
N310 G01 F1000 X100 M19 ; Position leading spindle with M19

Replacement subroutine _N_LANG_SUB_SPF, Variant 1:


This programming example is optimized for simplicity and speed. The spindles are thus
addressed directly (typically the machine manufacturer would know, which following
Spindle(s) are affected during spindle positioning and address these spindles directly). In the
example S1 is the leading spindle and S2 is the following spindle.
The SPOS and SPOSA commands are handled in common in the replacement subroutine. In
other wrods SPOSA is mapped to the SPOS command.

Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
...
N2100 IF($P_SUB_AXFCT==2)
N2110 ; Replacement of the SPOS/SPOSA/M19
command for an active synchronous
spindle coupling
N2185 DELAYFSTON ; Start Stop Delay Area
N2190 COUPOF(S2,S1) ; Deactivate synchronous spindle
coupling
N2200 ; Position leading and following spindle
N2210 IF($P_SUB_SPOS==TRUE) OR ($P_SUB_SPOSA==TRUE)
N2220 ; Positioning the spindle with SPOS:
N2230 SPOS[1]=GP($P_SUB_SPOSIT,$P_SUB_SPOSMODE)
SPOS[2]=GP($P_SUB_SPOSIT,$P_SUB_SPOSMODE)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 705
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Programming Comment
N2250 ELSE
N2260 ; Positioning the spindle using M19:
N2270 M1=19 M2=19 ; Position leading and following spindle
N2280ENDIF
N2285 DELAYFSTOF ; End of Stop Delay Area
N2290 COUPON(S2,S1) ; Activate synchronous spindle coupling
N2410 ELSE
N2420 ; Query on further replacements
...
N3300 ENDIF
...
N9999 RET

Replacement subroutine _N_LANG_SUB_SPF, Variant 2:


In this replacement subroutine the spindles are not addressed directly, but instead the
system variables $P_SUB_LA and $P_SUB_CA are used.

Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
N1010 DEF AXIS _LA ; Auxiliary memory for leading
axis/leading spindle
N1020 DEF AXIS _CA ; Auxiliary memory for following
axis/following spindle
N1030 DEF INT _LSPI ; Auxiliary memory for leading spindle
number (programmed spindle)
N1040 DEF INT _CSPI ; Auxiliary memory for following
spindle number
...
N2100 IF($P_SUB_AXFCT==2)
N2110 ; Replacement of the SPOS/SPOSA/M19
command for an active synchronous
spindle coupling
N2120 _LA=$P_SUB_LA ; Save axis identifier of the leading
spindle temporarily
N2130 _CA=$P_SUB_CA ; Save axis identifier of the following
spindle temporarily
N2140 _LSPI=AXTOSPI(_LA) ; Save the number of the leading
spindle temporarily
N2180 _CSPI=AXTOSPI(_LA) ; Save the number of the following
spindle temporarily
N2185 DELAYFSTON ; Start Stop Delay Area
N2190 COUPOF(_CA,_LA) ; Deactivate synchronous spindle
coupling
N2200 ; Position leading and following
spindle:
N2210 IF($P_SUB_SPOS==TRUE) OR ($P_SUB_SPOSA==TRUE)

Basic Functions
706 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Programming Comment
N2220 ; Positioning the spindle with SPOS:
N2230 SPOS[_LSPI]=GP($P_SUB_SPOSIT,$P_SUB_SPOSMODE)
SPOS[_CSPI]=GP($P_SUB_SPOSIT,$P_SUB_SPOSMODE)
N2250 ELSE
N2260 ; Positioning the spindle using M19:
N2270 M[_LSPI]=19 M[_CSPI]=19 ; Position leading and following
spindle
N2280 ENDIF
N2285 DELAYFSTOF End of Stop Delay Area
N2290 COUPON(_CA,_LA) ; Activate synchronous spindle coupling
N2410 ELSE
N2420 ; Query on further replacements
...
N3300 ENDIF
...
N9999 RET

9.14.4.4 Sequence
The sequence of replacement of a spindle-related function depends on the replacement type
(gear-stage change or spindle positioning) and on the time of call of the replacement
subroutine (block start or block end).
The most important options are described in more detail below:

Sequence of a replacement program for a gear stage change at block start


The leading spindle is located in an active synchronous spindle coupling and an automatic
(M40 S...) or a gear stage change programmed with M41 to M45 is determined during the
interpretation of a part program line.
1. Call the replacement subroutine
The replacement subroutine set using MD15702 $MN_LANG_SUB_PATH (call path)
MD15700 $MN_LANG_SUB_NAME is called.
The system variable $P_SUB_AXFCT returns the value "1":
⇒ Replacement for gear-stage change is active.
The system variable $P_SUB_STAT returns the value "1":
⇒ Replacement subroutine is active, call at block start.
2. Transfer of the required data in the replacement subroutine
With the system variable $P_SUB_GEAR the programmed gear stage M41 to M45 or
during automatic gear-stage change (M40 S...) the calculated gear-stage is scanned in
the replacement subroutine.
The system variable $P_SUB_LA delivers the axis identifier of the leading spindle and
$P_SUB_CA delivers the axis identifier of the first following spindle involved in the
coupling.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 707
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

3. Resolve coupling, gear-stage change of the spindles involved in the coupling


The coupling is disabled and the gear-stage change is done separately for the leading
and following spindles involved in the coupling.
4. Close coupling again and continue the part program
Then the coupling is closed again.
After the replacement subroutine has been executed, the part program line that controlled
the call of the subroutine is interpreted. Thus, the S value that lead to calling the
replacement subroutine during automatic gear stage change is now active too. In this
case, the automatic gear stage change M40 too is restored again. The gear stage request
M41-M45 is no longer processed.

Sequence of a replacement program for a gear stage change at block end


The part program line that leads to calling the replacement subroutine is executed first,
without the gear stage change. The replacement subroutine is called finally.
The system variable $P_SUB_STAT returns the value "2":
⇒ Replacement subroutine is active, call at block end.
The further sequence corresponds to the sequence of a replacement program for a gear-
stage change at block start.

Sequence of a replacement program for spindle positioning at the block start


The leading spindle is located in an active synchronous spindle coupling and the leading
spindle is positioned while interpreting a part program line with SPOS, SPOSA or M19.
1. Call the replacement subroutine
The replacement subroutine set using MD15702 $MN_LANG_SUB_PATH (call path)
MD15700 $MN_LANG_SUB_NAME is called.
The system variable $P_SUB_AXFCT returns the value "2":
⇒ Replacement for spindle-positioning is active.
The system variable $P_SUB_STAT returns the value "1":
⇒ Replacement subroutine is active, call at block start.
2. Transfer of the required data in the replacement subroutine
With the system variables $P_SUB_SPOS, $P_SUB_SPOSA or $P_SUB_M19 the
positioning command to be replaced can be determined.
The system variables $P_SUBPOSIT and $P_SUBPOSMODE are used to query the
travel position and the position approach mode that must be used.
The system variable $P_SUB_LA delivers the axis identifier of the leading spindle and
$P_SUB_CA delivers the axis identifier of the first following spindle involved in the
coupling.

Basic Functions
708 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

3. Resolve coupling, positioning of the spindles involved in the coupling


The coupling is disabled and the leading and the following spindles involved in the
coupling are positioned accordingly.
4. Close coupling again and continue the part program
Then the coupling is closed again.
After the replacement subroutine has been executed, the part program line that controlled
the call of the subroutine is interpreted. In this case the SPOS, SPOSA or M19 command
used to trigger the replacement is no longer processed.

Sequence of a replacement program for a spindle positioning with M19 at block end
The part program line that leads to calling the replacement subroutine is executed first,
without the spindle positioning.
The system variable $P_SUB_STAT returns the value "2":
⇒ Replacement subroutine is active, call at block end.
The further sequence corresponds to the sequence of a replacement program for spindle
positioning at block start.

9.14.5 Properties of replacement subroutines

General rules
● Like any other subroutine, a replacement subroutine can contain a PROC statement.
● Replacement subroutines can also be called from the ISO-Dialect mode. The processing
of the replacement subroutine is basically done in Siemens standard mode. The return
shifts the control back to the language mode.
● No transfer parameters can be defined. The transfer of data to the replacement
subroutine always occurs via a system variable.
● The PROC statement enables program attributes such as SBLOF and DISPLOF to be
programmed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 709
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

● The behavior in case of active single block and programmed SBLOF attribute depends on
the setting of bit 14 in the machine data:
MD10702 IGNORE_SINGLEBLOCK_MASK (Prevent single block stop)
Bit 14 = 0:
The replacement subroutine behaves like any other subroutine:
– Return jump with M17: Stop at the end of the subprogram
Note:
The output of the M function at the PLC depends on the setting of bit 0 in the machine
data:
MD20800 $MC_SPF_END_TO_VDI (subprogram end to PLC)
Bit 0 = 0: no output
Bit 0 = 1: M17 is output to the PLC.
– Return jump with RET: No stop at end of subprogram
Bit 14 = 1:
In a part program line, in which a replacement subroutine is called, stop is done only
once. Thereby it is not important, whether:
– the replacement subroutine was called at the block start and/or at the block end.
– from the replacement subroutine further subroutines were called.
– the replacement subroutine was exited with M17 or RET.
The single block stop takes place for the replacement of M functions at the end of the
replacement subroutine. For the replacement of T functions and D/DL functions the time
of the single block stop depends on the call time of the replacement subroutine:
Call at block start ⇒ single block stop at the end of the part program line
Call at block end ⇒ single block stop at the end of the replacement subroutine
● If the replacement subroutine has the DISPLOF attribute, the program line that has
resulted in the replacement subroutine call is displayed as the current block in the block
display.
● With DELAYFSTON and DELAYFSTOF areas or even the entire replacement subroutine
can be protected against interruptions, such as NC stop, read-in disable, etc.
● Replacements do not occur recursively, i.e. the function that has led to the replacement
subroutine call is no longer replaced if it is programmed again in the replacement
subroutine.

Output of auxiliary functions to PLC


In the case of replacements that are called due to programmed auxiliary functions, the
replacement subroutine call does not result in any output of the auxiliary function to the PLC.
The auxiliary function is only output if it is programmed again in the replacement cycle.

Basic Functions
710 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Replacement of NC functions by subprograms

Block-search response
The replacement subroutines are executed as in the normal program mode in case of block
search with calculation and SERUPRO.

9.14.6 Restrictions
For using the function "Replacement of NC functions through subroutines" the following
boundary conditions must be noted:
● Replacements in synchronized actions are not permitted
● Replacements in technology cycles are not permitted
● A part program line that contains language constructs to be replaced at the block start
may not be placed in front of any block-wise synchronized actions.
● Spindle-related replacements are executed only if the programmed spindle is the leading
spindle of an active synchronous spindle coupling. It is detected by the system only if the
leading spindle is located in the channel in which the coupling was closed. If the leading
spindle is changed to another channel, then a gear stage change or a repositioning of this
spindle does not lead to the desired call in the replacement cycle.
● Only the actions required for the respective replacements can be performed in the
replacement cycle.
● in a part program block in which a replacement subroutine is called at the block end, no:
– modular subroutine call should be active
– Ssubroutine return should be programmed.
– part program end should be programmed.

CAUTION
The system does not monitor whether the user actually replaces the respective
function in the replacement cycle. Therefore, if the user fails to implement this
correctly, the actual intended function can be omitted.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 711
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

9.15 Program runtime/part counter


Information on the program runtime and workpiece counter are provided to support the
machine tool operator.
This information can be processed as system variables in the NC and/or PLC program. This
information is also available to be displayed on the operator interface.

9.15.1 Program runtime

Function
The "program runtime" function provides internal NC timers to monitor technological
processes, which can be read into the part program and into synchronized actions via the
NC and channel-specific system variables.
Time since the last control power-up
The timers for measuring the time since the last control power-up are always active and can
be read via NC-specific system variables:

System variable Description


$AN_SETUP_TIME Time since the last control power-up with default values ("cold restart") in minutes.
Is automatically reset to "0" in each control power-up with default values.
$AN_POWERON_TIME Time since the last normal control power-up ("warm restart") in minutes.
Is automatically reset to "0" in each normal control power-up.
Program runtimes
The timers for measuring the program runtimes are:
● available only in the mode type AUTOMATIC
● can be read via channel-specific system variables
Some of the timers are always active, others can be activated/deactivated through MD
parameterization.

Basic Functions
712 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

The following system variables are available for the timers that are always active:

System variable Description


$AC_ACT_PROG_NET_TIME Actual net runtime of the current program in seconds
(Net runtime means that the time, in which the program was stopped, has
been deducted.)
$AC_ACT_PROG_NET_TIME is automatically reset to "0" with the part
program start in the mode type AUTOMATIC from the channel status RESET.
Tip:
With $AC_PROG_NET_TIME_TRIGGER, $AC_ACT_PROG_NET_TIME can
be manipulated further.
$AC_OLD_PROG_NET_TIME Net runtime in seconds of the program that has just been correctly ended
("Correctly ended" means that the program was not interrupted with RESET,
but instead ended properly with M30.)
If a new program is started, $AC_OLD_PROG_NET_TIME remains
unscanned, till M30 is reached again.
Tip:
The implied copying process of $AC_ACT_PROG_NET_TIME after
$AC_OLD_PROG_NET_TIME takes place only when
$AC_PROG_NET_TIME_TRIGGER is not written.
$AC_OLD_PROG_NET_TIME_COUNT Changes to $AC_OLD_PROG_NET_TIME
After POWER ON, $AC_OLD_PROG_NET_TIME_COUNT is at "0".
$AC_OLD_PROG_NET_TIME_COUNT is always increased if the control has
newly written to $AC_OLD_PROG_NET_TIME.
If the user terminates the running program with RESET ,
$AC_OLD_PROG_NET_TIME and $AC_OLD_PROG_NET_TIME_COUNT
remain unchanged.
With $AC_OLD_PROG_NET_TIME_COUNT it can thus be ascertained,
whether $AC_OLD_PROG_NET_TIME was written.
Example:
If two programs running consecutively have the same runtime and were ended
correctly, then the user can identify this via the changed value in
$AC_OLD_PROG_NET_TIME_COUNT.
$AC_PROG_NET_TIME_TRIGGER Trigger for the runtime measurement
Used for selective measurement of program sections i.e. by writing
$AC_PROG_NET_TIME_TRIGGER in the NC program the time measurement
can be enabled and disabled again:
1. $AC_PROG_NET_TIME_TRIGGER = 2 starts the measurement and in so
doing sets $AC_ACT_PROG_NET_TIME to "0".
2. $AC_PROG_NET_TIME_TRIGGER = 1 ends the measurement and copies
the value from $AC_ACT_PROG_NET_TIME into
$AC_OLD_PROG_NET_TIME.

In order to exploit all trigger options, specific values for


$AC_PROG_NET_TIME_TRIGGER are filled with special functions:
0 Neutral state
The trigger is not active.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 713
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

System variable Description


1 Exit
Ends the measurement and copies the value from
$AC_ACT_PROG_NET_TIME into $AC_OLD_PROG_NET_TIME.
$AC_ACT_PROG_NET_TIME is set to "0" and then continues to run.
2 Start
Starts the measurement and in so doing sets
$AC_ACT_PROG_NET_TIME to "0". $AC_OLD_PROG_NET_TIME is not
changed.
3 Stop
Stops the measurement. Does not change $AC_OLD_PROG_NET_TIME
and keeps $AC_ACT_PROG_NET_TIME constant until it resumes
4 Resume
The measurement is resumed, i.e. a measurement that was previously
stopped is continued. $AC_ACT_PROG_NET_TIME continues to run.
$AC_OLD_PROG_NET_TIME is not changed.
All system variables are reset to 0 as a result of POWER ON!

Note
Residual time for a workpiece
If the same workpieces are produceed one after the other, then from the timer values:
• Processing time for the last workpiece produced (see $AC_OLD_PROG_NET_TIME)
and
• current processing time (see $AC_ACT_PROG_NET_TIME)
the remaining residual time for a workpiece can be determined.
The residual time is displayed on the operator interface in addition to the current processing
time.

NOTICE
Using STOPRE
The system variables $AC_OLD_PROG_NET_TIME and
$AC_OLD_PROG_NET_TIME_CTR do not generate any implicity preprocessing stop. This
is uncritical when used in the part program if the value of the system variables comes from
the previous program run. However, if the trigger for the runtime measurement
($AC_PROG_NET_TIME_TRIGGER) is written very frequently and as a result
$AC_OLD_PROG_NET_TIME changes very frequently, then an explicit STOPRE should be
used in the part program.

Basic Functions
714 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

The following system variables are available for the timers that are activated/deactivated
through MD parameterization:

System variable Description


$AC_OPERATING_TIME Total runtime of NC programs in Automatic mode (in s)
In the automatic mode, the runtimes of all programs between NC start and end of
program/reset are summed up.
The default is not to count in NC STOP and override = 0%. Continued counting can be
activated at an override of 0% via MD27860.
The value is automatically reset to "0" every time the control powers up.
$AC_CYCLE_TIME Runtime of the selected NC program (in seconds)
The runtime between NC Start and End of program/NC-Reset is measured in the selected
NC program.
The default is not to count in NC STOP and override = 0%. Continued counting can be
activated at an override of 0% via MD27860.
The value is automatically reset to "0" every time a new NC program starts up. MD27860
can be set to ensure that this value will be deleted even if there is a jump to the beginning
of the program with GOTOS or in the event of ASUBs and PROG_EVENTs starting.
$AC_CUTTING_TIME Processing time in seconds
The runtime of the path axes (at least one is active) is measured in all NC programs
between NC start and end of program/NC reset without rapid traverse active. MD27860
can be used to set whether measuring should only be conducted when the tool is active or
independent of the tool state.
The measurement is interrupted when a dwell time is active.
The value is automatically reset to "0" every time the control powers up with default
values.

Activation/Deactivation
The activation/deactivation of the timers is done using machine data:
MD27860 $MC_PROCESSTIMER_MODE, Bit 0-2

Bit Value Description


0 0 Timer for $AC_OPERATING_TIME not active.
1 Timer for $AC_OPERATING_TIME active.
1 0 Timer for $AC_CYCLE_TIME not active.
1 Timer for $AC_CYCLE_TIME active.
2 0 Timer for $AC_CUTTING_TIME not active.
1 Timer for $AC_CUTTING_TIME active.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 715
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

Parameter assignment
With MD27860 the behavior of the active time measurements (bit 0, 1, 2 = 1) is also
determined during special functions (e.g. dry run feedrate, program test):

Bit Value Description


4 0 No measurement during active dry run feedrate.
1 Measurement during active dry run feedrate.
5 0 No measurement during program test.
1 Measurement during program test.
6 Only for bit 1 = 1
0 $AC_CYCLE_TIME is reset to "0" also in case of Start through ASUB and
PROG_EVENTs.
1 $AC_CYCLE_TIME is not reset to "0" in case of Start through ASUB and
PROG_EVENTs.
7 Only for bit 2 = 1
0 Timer for $AC_CUTTING_TIME counts only for the active tool.
1 Timer for $AC_CUTTING_TIME counts independent of the tool.
8 Only for bit 1 = 1
0 $AC_CYCLE_TIME is not reset to "0" in case of a jump with GOTOS to the program
start.
1 $AC_CYCLE_TIME is reset to "0" in case of a jump with GOTOS to the program start.
9 Only for bit 0, 1 = 1
0 Counting of the program runtime is not continued at an override of 0%.
1 Counting of the program runtime continues at an override of 0%.

Boundary conditions
● Block search
No program runtimes are determined through block searches.
● REPOS
The duration of a REPOS process is added to the current processing time
($AC_ACT_PROG_NET_TIME).

Examples
Example 1: Parameterization of the runtime measurement via MD27860
● Activating the runtime measurement for the active NC program and hence no
measurement in case of active dry run feedrate and program test:
MD27860 $MC_PROCESSTIMER_MODE = 'H2'
● Activating the measurement for the tool action time and measurement also with active dry
run feedrate and program test.
MD27860 $MC_PROCESSTIMER_MODE = 'H34'
● Activating the measurement for the total runtime and the processing time with an active
tool, including measurement with a program test:
MD27860 $MC_PROCESSTIMER_MODE = 'H25'

Basic Functions
716 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

● Activating the measurement for the total runtime and the machining time (independent of
the tool), including measurement with a program test:
MD27860 $MC_PROCESSTIMER_MODE = 'Ha5'
● Activating the measurement for the processing time with an active tool, including
measurements at an override of 0%, but not with a trial run feed active:
MD27860 $MC_PROCESSTIMER_MODE = 'H22'

Example 2: Measuring the duration of "mySubProgrammA"

Program code
...
N50 DO $AC_PROG_NET_TIME_TRIGGER=2
N60 FOR ii= 0 TO 300
N70 mySubProgrammA
N80 DO $AC_PROG_NET_TIME_TRIGGER=1
N95 ENDFOR
N97 mySubProgrammB
N98 M30

After the program has processed line N80, the net runtime of "mySubProgrammA" is located
in $AC_OLD_PROG_NET_TIME.
The value from $AC_OLD_PROG_NET_TIME:
● is kept beyond M30.
● is updated each time the loop is run through.

Example 3: Measuring the duration of "mySubProgrammA" and "mySubProgrammC"

Program code
N10 DO $AC_PROG_NET_TIME_TRIGGER=2
N20 mySubProgrammA
N30 DO $AC_PROG_NET_TIME_TRIGGER=3
N40 mySubProgrammB
N50 DO $AC_PROG_NET_TIME_TRIGGER=4
N60 mySubProgrammC
N70 DO $AC_PROG_NET_TIME_TRIGGER=1
N80 mySubProgrammD
N90 M30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 717
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

9.15.2 Workpiece counter

Function
The "Workpiece counter" function makes available various counters which can be used in
particular internally in the control to count workpieces.
The counters exist as channel-specific system variables with read and write access in a
range of values from 0 to 999,999,999.
Channel-specific machine data can be used to control counter activation, counter reset
timing and the counting algorithm.
System variables for workpiece counting

System variable Description


$AC_REQUIRED_PARTS Number of the workpieces to be produced (setpoint number of
workpieces)
In this counter the number of workpieces at which the actual workpiece
count ($AC_ACTUAL_PARTS) will be reset to "0" can be defined.
MD27880 can be used to activate the generation of the display alarm:
"Channel %1 workpiece target = %2 reached"
and of the channel-specific NC/PLC interface signal:
DB21, DBX317.2 (workpiece target reached).
$AC_TOTAL_PARTS Number of completed workpieces in total (actual workpiece total)
This counter specifies the total number of all workpieces produced
since the start time. The value is only automatically reset to "0" when
the control powers up with default values.
$AC_ACTUAL_PARTS Number of completed workpieces (actual workpiece total)
This counter registers the total number of all workpieces produced
since the start time. On condition that $AC_REQUIRED_PARTS > 0,
the counter is automatically reset to "0" when the required number of
workpieces ($AC_REQUIRED_PARTS) is reached.
$AC_SPECIAL_PARTS Number of workpieces selected by the user
This counter supports user-specific workpiece counts. An alarm can be
defined to be output when the setpoint number of workpieces is
reached ($AC_REQUIRED_PARTS). Users must reset the counter
themselves.

Note
All workpiece counters are set to "0" when the control powers up with default values and can
be read and written independent of their activation.

Activation
The workpiece counter is activated with the machine data:
MD27880 $MC_PART_COUNTER (activation of workpiece counters)

Basic Functions
718 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

Bit Value Significance


0 1 $AC_REQUIRED_PARTS is active
1 0 Alarm/signal output in case of: $AC_ACTUAL_PARTS = $AC_REQUIRED_PARTS
1 Alarm/signal output in case of: $AC_SPECIAL_PARTS = $AC_REQUIRED_PARTS
4 1 $AC_TOTAL_PARTS is active.
5 0 $AC_TOTAL_PARTS is increased by the value "1" through M02/M30.
1 $AC_TOTAL_PARTS is incremented by the value "1" through the M command
defined with MD27882[0].
6 0 $AC_TOTAL_PARTS is also active for program test/block search.
7 1 $AC_TOTAL_PARTS is incremented by the value "1" upon a jump back with GOTOS.
8 1 $AC_ACTUAL_PARTS is active
9 0 $AC_ACTUAL_PARTS is increased by the value "1" through M02/M30.
1 $AC_ACTUAL_PARTS is incremented by the value "1" through the M command
defined with MD27882[1].
10 0 $AC_ACTUAL_PARTS is also active for program test/block search.
11 1 $AC_ACTUAL_PARTS is incremented by the value "1" upon a jump back with
GOTOS.
12 1 $AC_SPECIAL_PARTS is active.
13 0 $AC_SPECIAL_PARTS is increased by the value "1" through M02/M30.
1 $AC_SPECIAL_PARTS is incremented by the value 1 through the M command
defined with MD27882[2].
14 0 $AC_SPECIAL_PARTS is also active for program test/block search.
15 1 $AC_SPECIAL_PARTS is incremented by the value "1" upon a jump back with
GOTOS.

Workpiece counting with user-defined M command


If the corresponding bit is set in MD27880, then the count pulse can be triggered via a user-
defined M command instead of via the end of program M2/M30.
The M command code is defined with the machine data:
MD27882 $MC_PART_COUNTER_MCODE[<n>] (workpiece counting with user-defined M
command)

<n> Significance
0 MD27882[0] defines the M command code, in which $AC_TOTAL_PARTS is incremented.
1 MD27882[1] defines the M command code, in which $AC_ACTUAL_PARTS is incremented.
2 MD27882[2] defines the M command code, in which $AC_SPECIAL_PARTS is incremented.
The respective workpiece counter is incremented by "1", when a user-defined M command is
called.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 719
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

Boundary conditions
● Mode change/NC RESET
The counters are not affected by a mode change or NC RESET.
● $AC_REQUIRED_PARTS ≤ 0
Where $AC_REQUIRED_PARTS ≤ 0 and MD27880 $MC_PART_COUNTER bit 0 = 1,
the counting procedure and the identity comparison set with MD27880 are not conducted
for all the activated counters.

Examples
● Activation of the workpiece counter $AC_REQUIRED_PARTS:
MD27880 $MC_PART_COUNTER = 'H3'
– $AC_REQUIRED_PARTS is active
– Display alarm at: $AC_REQUIRED_PARTS == $AC_SPECIAL_PARTS
● Activation of the workpiece counter $AC_TOTAL_PARTS:
MD27880 $MC_PART_COUNTER = 'H10'
MD27882 $MC_PART_COUNTER_MCODE[0] = 80
– $AC_TOTAL_PARTS is active; the counter is incremented by the value 1 with each
M02.
– $MC_PART_COUNTER_MCODE[0] has no significance.
● Activation of the workpiece counter $AC_ACTUAL_PARTS:
MD27880 $MC_PART_COUNTER = 'H300'
MD27882 $MC_PART_COUNTER_MCODE[1] = 17
– $AC_TOTAL_PARTS is active; the counter is incremented by a value of "1" with each
M17.
● Activation of the workpiece counter $AC_SPECIAL_PARTS:
MD27880 $MC_PART_COUNTER = 'H3000'
MD27882 $MC_PART_COUNTER_MCODE[2] = 77
– $AC_SPECIAL_PARTS is active.
– The following takes place with every M77: $AC_SPECIAL_PARTS + 1
● Deactivation of the workpiece counter $AC_ACTUAL_PARTS:
MD27880 $MC_PART_COUNTER = 'H200'
MD27882 $MC_PART_COUNTER_MCODE[1] = 50
– $AC_ACTUAL_PARTS is inactive

Basic Functions
720 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Program runtime/part counter

● Activation of all counters:


MD27880 $MC_PART_COUNTER = 'H3313'
MD27882 $MC_PART_COUNTER_MCODE[0] = 80
MD27882 $MC_PART_COUNTER_MCODE[1] = 17
MD27882 $MC_PART_COUNTER_MCODE[2] = 77
– $AC_REQUIRED_PARTS is active
– Display alarm at: $AC_REQUIRED_PARTS == $AC_SPECIAL_PARTS
– $AC_TOTAL_PARTS is active; the counter is incremented by the value 1 with each
M02.
– $MC_PART_COUNTER_MCODE[0] has no significance.
– $AC_ACTUAL_PARTS is active; the counter is incremented by a value of "1" with
each M17.
– $AC_SPECIAL_PARTS is active; the counter is incremented by a value of "1" with
each M77.
● Workpiece counter $AC_ACTUAL_PARTS is not processed during the program test/
block search:
MD27880 $MC_PART_COUNTER = 'H700'
MD27882 $MC_PART_COUNTER_MCODE[1] = 75
– $AC_ACTUAL_PARTS is active; the counter is incremented by a value of "1" with
each M75, apart from during the program test and search.
● Cancellation of the count modes in the MD27880 $MC_PART_COUNTER with bit 0 = 1:
MD27882 $MC_PART_COUNTER_MCODE[0] = 41
MD27882 $MC_PART_COUNTER_MCODE[1] = 42
MD27882 $MC_PART_COUNTER_MCODE[2] = 43

Program code Comment


...
N100 $AC_REQUIRED_PARTS=-10 ; value < 0 stop counting.
N200 M41 M43 ; Not counting.
N300 M42
...
N500 $AC_REQUIRED_PARTS=52 ; Value > 0: Counting in accordance with MD27880
activated.
N501 M43 ; Counting.
N502 M42 M41 ; Counting.
...

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 721
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

9.16 Data lists

9.16.1 Machine data

9.16.1.1 General machine data

HMI-specific machine data

Number Identifier: $MM_ Description


ADV EMB
9421 9421 MA_AXES_SHOW_GEO_FIRST Display geo axes of channel first
9422 9422 MA_PRESET_MODE PRESET/basic offset in JOG.
9423 9423 MA_MAX_SKP_LEVEL Maximum number of skip levels

NC-specific machine data

Number Identifier: $MN_ Description


10010 ASSIGN_CHAN_TO_MODE_GROUP Channel valid in mode group
10280 PROG_FUNCTION_MASK Compare commands ">" and "<" compatible to SW 6.3
10700 PREPROCESSING_LEVEL Program preprocessing level
10702 IGNORE_SINGLEBLOCK_MASK Prevent single-block stop
10707 PROG_TEST_MASK Program test modes
10708 SERUPRO_MASK Block change modes
10710 PROG_SD_RESET_SAVE_TAB Setting data to be updated
10711 NC_LANGUAGE_CONFIGURATION Manner of handling the languages, whose related
option or function is not activated.
10713 M_NO_FCT_STOPRE M function with preprocessing stop
10715 M_NO_FCT_CYCLE M function to be replaced by subroutine
10716 M_NO_FCT_CYCLE_NAME Subroutine name for M function replacement
10717 T_NO_FCT_CYCLE_NAME Name of tool change cycle for T function
10718 M_NO_FCT_CYCLE_PAR M function replacement with parameters
10719 T_NO_FCT_CYCLE_MODE Parameter assignment for T function replacement
11450 SEARCH_RUN_MODE Block search parameter settings
11470 REPOS_MODE_MASK Repositioning properties
11600 BAG_MASK Mode group response to ASUB
11602 ASUP_START_MASK Ignore stop conditions for ASUB
11604 ASUP_START_PRIO_LEVEL Priorities, starting from which
$MN_ASUP_START_MASK is effective
11610 ASUP_EDITABLE Activation of an ASUB for RET/REPOS

Basic Functions
722 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

Number Identifier: $MN_ Description


11612 ASUP_EDIT_PROTECTION_LEVEL Protection level of user-specific ASUB
11620 PROG_EVENT_NAME Program name for PROG-EVENT
11717 D_NO_FCT_CYCLE_NAME Subroutine name for D function replacement
15700 LANG_SUB_NAME Name for replacement subroutine
15702 LANG_SUB_PATH Call path for replacement subroutine
17200 GMMC_INFO_NO_UNIT Global HMI info (without physical unit)
17201 GMMC_INFO_NO_UNIT_STATUS Global HMI status info (without physical unit)
18360 MM_EXT_PROG_BUFFER_SIZE FIFO buffer size for one program level
18362 MM_EXT_PROG_NUM Number of external program levels (DRAM)

9.16.1.2 Channel-specific machine data

Basic machine data

Number Identifier: $MC_ Description


20000 CHAN_NAME Channel name
20050 AXCONF_GEOAX_ASSIGN_TAB Assignment of geometry axis to channel axis
20060 AXCONF_GEOAX_NAME_TAB Geometry axis name in channel
20070 AXCONF_MACHAX_USED Machine axis number valid in channel
20080 AXCONF_CHANAX_NAME_TAB Channel axis name in channel [channel axis no.]: 0...7
20090 SPIND_DEF_MASTER_SPIND Initial setting of master spindle in channel
20100 DIAMETER_AX_DEF Geometry axis with transverse axis function
20106 PROG_EVENT_IGN_SINGLEBLOCK Prog events ignore the single block
20107 PROG_EVENT_IGN_INHIBIT Prog events ignore the read-in disable
20108 PROG_EVENT_MASK Event-driven program calls
20109 PROG_EVENT_MASK_PROPERTIES Prog events properties
20114 MODESWITCH_MASK Setting for REPOS
20116 IGNORE_INHIBIT_ASUP Execute user ASUBs completely in spite of read-in
disable
20117 IGNORE_SINGLEBLOCK_ASUP Process user ASUBs completely in spite of single-
block processing
20160 CUBIC_SPLINE_BLOCKS Number of blocks for C spline
20170 COMPRESS_BLOCK_PATH_LIMIT Maximum traversing length of NC block for
compression
20191 IGN_PROG_STATE_ASUP Do not display the execution of the interrupt routine on
the operator panel
20192 PROG_EVENT_IGN_PROG_STATE Do not display the execution of the program events on
the operator panel
20193 PROG_EVENT_IGN_STOP Prog events ignore the Stop key
20210 CUTCOM_CORNER_LIMIT Max. angle for intersection calculation with tool radius
compensation

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 723
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

Number Identifier: $MC_ Description


20220 CUTCOM_MAX_DISC Maximum value with DISC
20230 CUTCOM_CURVE_INSERT_LIMIT Maximum angle for intersection calculation with tool
radius compensation
20240 CUTCOM_MAXNUM_CHECK_BLOCKS Blocks for predictive contour calculation with tool
radius compensation
20250 CUTCOM_MAXNUM_DUMMY_BLOCKS Max. no. of dummy blocks with no traversing
movements
20270 CUTTING_EDGE_DEFAULT Basic setting of tool cutting edge without programming
20400 LOOKAH_USE_VELO_NEXT_BLOCK Look Ahead to programmed following block velocity
20430 LOOKAH_NUM_OVR_POINTS Number of override switch points for Look Ahead
20440 LOOKAH_OVR_POINTS Override switch points for LookAhead
20500 CONST_VELO_MIN_TIME Minimum time with constant velocity
20600 MAX_PATH_JERK Path-related maximum jerk
20610 ADD_MOVE_ACCEL_RESERVE Acceleration reserve for overlaid movements
20700 REFP_NC_START_LOCK NC start disable without reference point
20750 ALLOW_GO_IN_G96 G0 logic in G96
20800 SPF_END_TO_VDI Subprogram end to PLC
21000 CIRCLE_ERROR_CONST Circle end point monitoring constant
21010 CIRCLE_ERROR_FACTOR Circle end point monitoring factor
21100 ORIENTATION_IS_EULER Angle definition for orientation programming
21110 X_AXIS_IN_OLD_X_Z_PLANE Coordinate system for automatic Frame definition
21200 LIFTFAST_DIST Traversing path for fast retraction from the contour
21210 SETINT_ASSIGN_FASTIN NCK input bytes for interrupts
21202 LIFTFAST_WITH_MIRROR Lift fast with mirror
21250 START_INDEX_R_PARAM Number of first channel-specific R parameter

Block search

Number Identifier: $MC_ Description


20128 COLLECT_TOOL_CHANGE Collect tool changes during block search
22600 SERUPRO_SPEED_MODE Velocity with block search type 5
22601 SERUPRO_SPEED_FACTOR Velocity factor for block search type 5
22621 ENABLE_START_MODE_MASK_PRT Enables MD22620 START_MODE_MASK_ PRT for
SERUPRO search run
22622 DISABLE_PLC_START Allow part program start via PLC
22680 AUTO_IPTR_LOCK Disable interrupt pointer

Basic Functions
724 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

Reset response

Number Identifier: $MC_ Description


20110 RESET_MODE_MASK Initial setting at RESET
20112 START_MODE_MASK Initial setting at special NC Start after power-up and at
RESET
20118 GEOAX_CHANGE_RESET Allow automatic geometry axis change
20120 TOOL_RESET_VALUE Tool whose length compensation is selected during
power-up (Reset/part program end)
20121 TOOL_PRESEL_RESET_VALUE Preselected tool whose length compensation is
selected in power-up (Reset/part program end)
20130 CUTTING_EDGE_RESET_VALUE Tool cutting edge on power-up (Reset/part program
end)
20140 TRAFO_RESET_VALUE Active transformation on RESET
20150 GCODE_RESET_VALUES Reset G groups
20152 GCODE_RESET_MODE G code basic setting at RESET
20156 MAXNUM_GCODES_EXT Reset behavior of the external G groups
22620 START_MODE_MASK_PRT Initial setting at special NC Start after power-up and at
RESET

Auxiliary function settings

Number Identifier: $MC_ Description


22000 AUXFU_ASSIGN_GROUP Auxiliary function group
22010 AUXFU_ASSIGN_TYPE Auxiliary function type
22020 AUXFU_ASSIGN_EXTENSION Auxiliary function extension
22030 AUXFU_ASSIGN_VALUE Auxiliary function value
22200 AUXFU_M_SYNC_TYPE Output timing of M functions
22210 AUXFU_S_SYNC_TYPE Output timing of S functions
22220 AUXFU_T_SYNC_TYPE Output timing of T functions
22230 AUXFU_H_SYNC_TYPE Output timing of H functions
22240 AUXFU_F_SYNC_TYPE Output timing of F functions
22250 AUXFU_D_SYNC_TYPE Output timing of D functions
22260 AUXFU_E_SYNC_TYPE (available soon) Output timing of E functions.
22400 S_VALUES_ACTIVE_AFTER_RESET S function active after RESET
22410 F_VALUES_ACTIVE_AFTER_RESET F function active after reset
22500 GCODE_OUTPUT_TO_PLC G functions to PLC
22510 GCODE_GROUPS_TO_PLC G codes that are output to the NCK/PLC interface on
block change/RESET
22550 TOOL_CHANGE_MODE New tool offset for M function
22560 TOOL_CHANGE_M_CODE M function for tool change

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 725
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

Memory settings

Number Identifier: $MC_ Description


25000 REORG_LOG_LIMIT Percentage of IPO buffer for log file enable
28000 MM_REORG_LOG_FILE_MEM Memory size for REORG (DRAM)
28010 MM_NUM_REORG_LUD_MODULES Number of blocks for local user variables for REORG
(DRAM)
28020 MM_NUM_LUD_NAMES_TOTAL Number of local user variables (DRAM)
28030 MM_NUM_LUD_NAMES_PER_PROG Number of local user variables per program (DRAM)
28040 MM_LUD_VALUES_MEM Memory size for local user variables (DRAM)
(available soon)
28050 MM_NUM_R_PARAM Number of channel-specific R parameters (SRAM)
28060 MM_IPO_BUFFER_SIZE Number of NC blocks in IPO buffer (DRAM)
28070 MM_NUM_BLOCKS_IN_PREP Number of blocks for block preparation (DRAM)
(available soon)
28080 MM_NUM_USER_FRAMES Number of settable Frames (SRAM)
28090 MM_NUM_CC_BLOCK_ELEMENTS Number of block elements for compile cycles (DRAM)
28100 MM_NUM_CC_BLOCK_USER_MEM Size of block memory for compile cycles (DRAM)
28400 MM_ABSBLOCK Dimension basic block display
28402 MM_ABSBLOCK_BUFFER[2] Dimension size of upload buffer
28500 MM_PREP_TASK_STACK_SIZE Stack size of preparation task (DRAM)
28510 MM_IPO_TASK_STACK_SIZE Stack size of IPO task (DRAM)

Program runtime and workpiece counter

Number Identifier: $MC_ Description


27860 PROCESSTIMER_MODE Activate the runtime measurement
27880 PART_COUNTER Activate the workpiece counter
27882 PART_COUNTER_MCODE[ ] Workpiece counting via M command

9.16.1.3 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


30465 AXIS_LANG_SUB_MASK Substitution of NC language commands
30550 AXCONF_ASSIGN_MASTER_CHAN Reset position of channel for axis change
30600 FIX_POINT_POS Fixed value positions of axes with G75
33100 COMPRESS_POS_TOL Maximum deviation with compensation

Basic Functions
726 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

9.16.2 Setting data

9.16.2.1 Channel-specific setting data

Number Identifier: $SC_ Description


42000 THREAD_START_ANGLE Start angle for thread
42010 THREAD_RAMP_DISP Starting and deceleration distance of feed axis in
thread cutting
42100 DRY_RUN_FEED Dry run feedrate
42200 SINGLEBLOCK2_STOPRE Activate debug mode for SBL2
42444 TARGET_BLOCK_INCR_PROG Continuation mode after block search with calculation
42700 EXT_PROG_PATH Name of an external program path for subroutine call
EXTCALL
42750 ABSBLOCK_ENABLE Enable basic block display
42990 MAX_BLOCKS_IN_IPOBUFFER Control of max. number of blocks in interpolation
buffer

9.16.3 Signals

9.16.3.1 Signals to NC

DB number Byte.Bit Description


10 56.1 EMERGENCY STOP

9.16.3.2 Signals to mode group

DB number Byte.Bit Description


11, ... 0.0 AUTOMATIC mode
11, ... 0.1 MDA mode
11, ... 0.2 JOG mode
11, ... 0.4 Mode changeover inhibit
11, ... 0.5 Mode group stop
11, ... 0.6 Mode group stop axes plus spindles
11, ... 0.7 Mode group reset
11, ... 1.0 Machine function TEACH IN
11, ... 1.1 Machine function REPOS
11, ... 1.2 Machine function REF

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 727
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

9.16.3.3 Signals from mode group

DB number Byte.Bit Description


11, ... 4.0 Selected AUTOMATIC mode
11, ... 4.1 Selected MDA mode
11, ... 4.2 Selected JOG mode
11, ... 5.0 Selected TEACH IN machine function
11, ... 5.1 Selected REPOS machine function
11, ... 5.2 Selected REF machine function
11, ... 6.0 Active AUTOMATIC mode
11, ... 6.1 Active MDA mode
11, ... 6.2 Active JOG mode
11, ... 6.3 Mode group ready
11, ... 6.4 Mode group reset
11, ... 6.5 Internal JOG active
11, ... 6.7 All channels in the reset state
11, ... 7.0 Active TEACH IN machine function
11, ... 7.1 Active REPOS machine function
11, ... 7.2 Active REF machine function

9.16.3.4 Signals to channel

DB number Byte.Bit Description


21, ... 0.3 Activate DRF, refer to Jog with/without handwheel (H1)
21, ... 0.4 Activate single block
21, ... 0.5 Activate M01
21, ... 0.6 Activate dry run feedrate, refer to Feeds (V1)
21, ... 1.6 PLC action completed
21, ... 1.7 Activate program test
21, ... 2.0 - 2.7 Skip block levels: /0 to /7
21, ... 6.1 Read-in disable
21, ... 6.4 Program level abort
21, ... 7.0 NC start inhibit
21, ... 7.1 NC start
21, ... 7.2 NC stop at block limit
21, ... 7.3 NC stop
21, ... 7.4 NC stop axes plus spindles
21, ... 7.7 Reset
21, ... 31.0 - 31.2 REPOSPATHMODE
21, ... 31.4 REPOSMODEEDGE

Basic Functions
728 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

9.16.3.5 Signals from channel

DB number Byte.Bit Description


21, ... 24.3 DRF selected
21, ... 24.4 Select associated M01
21, ... 24.5 M01 selected
21, ... 24.6 Dry run feed rate selected
21, ... 25.0-2 REPOSPATHMODE 0 - 2
21, ... 25.3 Feed rate override selected for rapid traverse
21, ... 25.4 REPOS MODE EDGE
21, ... 25.7 Program test selected
21, ... 26.0-7 Skip-block selected /0 - /7
21, ... 27.0 Skip-block selected
21, ... 27.1 Skip-block selected
21, ... 31.0-2 REPOSPATHMODE 0 - 2
21, ... 31.4 REPOS MODE EDGE
21, ... 31.6 Skip block active /8
21, ... 31.7 Skip block active /9
21, ... 32.0 Execution from external active
21, ... 32.3 Action block active
21, ... 32.4 Approach block active
21, ... 32.5 M00/M01 active
21, ... 32.6 Last action block active
21, ... 33.4 Block search active
21, ... 33.5 M02/M30 active
21, ... 33.6 Transformation active
21, ... 33.7 Program test active
21, ... 35.0 Program status: Running
21, ... 35.1 Program status: Maintaining
21, ... 35.2 Program status: Stopped
21, ... 35.3 Program status: Interrupted
21, ... 35.4 Program status: Aborted
21, ... 35.5 Channel status: Active
21, ... 35.6 Channel status: Interrupted
21, ... 35.7 Channel status: Reset
21, ... 36.4 Interrupt handling active
21, ... 36.5 Channel ready
21, ... 37.6 Read-in enable is ignored
21, ... 37.7 Stop at the end of block with SBL is suppressed
21, ... 208 - 271 Number of the active G function of G function group 1 – n (binary)
21, ... 317.2 Workpiece setpoint reached
21, ... 318.0 ASUB is stopped

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 729
Mode Group, Channel, Program Operation, Reset Response (K1)
Data lists

DB number Byte.Bit Description


21, ... 318.1 Block search via program test is active
21, ... 319.0 REPOS MODE EDGEACKN
21, ... 319.1-3 Repos Path Mode Quitt: 0 - 2
21, ... 319.5 Repos DEFERAL Chan
21, ... 376.0-7 Display of the triggering event in case of event-driven program call
21, ... 378.0 ASUB is active
21, ... 378.1 ASUB with suppressed display update is active

9.16.3.6 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 10.0 REPOSDELAY

9.16.3.7 Signals from axis/spindle

DB number Byte.Bit Description


31, ... 70.0 REPOS offset
31, ... 70.1 REPOS offset valid
31, ... 70.2 REPOS Delay Ack
31, ... 72.0 REPOSDELAY
31, ... 76.2 Path axis

Basic Functions
730 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2) 10
10.1 Brief description

10.1.1 Axes

Machine axes
Machine axes are the axes that actually exist on a machine tool.

Channel axes
Every geometry axis and every special axis is assigned to a channel and, therefore, a
channel axis. Geometry axes and additional axes are always traversed in "their" channel.

Geometry axes
The three geometry axes always make up a fictitious rectangular coordinate system, the
basic coordinate system (BCS).
By using FRAMES (offset, rotation, scaling, mirroring), it is possible to image geometry axes
of the workpiece coordinate system (WCS) on the BCS.

Special axes
In contrast to geometry axes, no geometrical relationship is defined between the special
axes.

Path axes
Path axes are interpolated together (all the path axes of a channel have a common path
interpolator).
All the path axes of one channel have the same acceleration phase, constant travel phase
and delay phase.

Positioning axes
Positioning axes are interpolated separately (each positioning axis has its own axis
interpolator). Each positioning axis has its own feedrate and acceleration characteristic.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 731
Axes, Coordinate Systems, Frames (K2)
Brief description

Synchronized axes
Synchronous axes are interpolated together with path axes (all path axes and synchronous
axes of one channel have a common path interpolator).
All path axes and all synchronous axes of a channel have the same acceleration phase,
constant travel phase and deceleration phase.

Axis configuration
The machine data below are used to assign the geometry axes, special axes, channel axes
and machine axes as well as the names of the individual axis types:
MD20050 $MC_AXCONF_GEOAX_ASIGN_TAB (assignment of geometry axis to channel
axis)
MD20060 $MC_AXCONF_GEOAX_NAME_TAB (name of the geometry axis in the channel)
MD20070 $MC_AXCONF_MACHAX_USED (machine axis number valid in channel)
MD20080 $MC_AXCONF_CHANAX_NAME_TAB (name of the channel axis in the channel)
MD10000 $MN_AXCONF_MACHAX_NAME_TAB (machine axis name)
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX (assignment of spindle to machine axis)

Replaceable geometry axes


The "Replaceable geometry axes" function allows the geometry axes in a grouping to be
replaced by other channel axes.
Axes that are initially configured as synchronous special axes in a channel can replace any
selected geometry axis in response to a program command.

Link axis
Link axes are axes, which are physically connected to another NCU and whose position is
controlled from this NCU. Link axes can be assigned dynamically to channels of another
NCU. Link axes are not local axes from the perspective of a particular NCU.
The axis container concept is used for the dynamic modification of the assignment to an
NCU. Axis replacement with GET and RELEASE from the part program is not available for link
axes across NCU boundaries.
The link axes are described in
References:
/FB2/ Function Manual, Expansion Functions; Multiple Operator Panels on Multiple NCUs,
Distributed Systems (B3)

Basic Functions
732 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Brief description

Axis container
An axis container is a circular buffer data structure, in which local axes and/or link axes are
assigned to channels. The entries in the circular buffer can be shifted cyclically.
In addition to the direct reference to local axes or link axes, the link axis configuration in the
logical machine axis image also allows references to axis containers.
This type of reference consists of:
● Axis container number
● A slot (circular buffer location within the corresponding container)
The entry in a circular buffer location contains:
● A local axis
Or
● A link axis
The axis container function is described in
References:
/FB2/ Function Manual, Expansion Functions; Multiple Operator Panels on Multiple NCUs,
Distributed Systems (B3)

10.1.2 Coordinate systems

MCS
The machine coordinate system (MCS) has the following properties:
● It is defined by the machine axes.
● The machine axes can be perpendicular to each other to form Cartesian system or
arranged in any other way.
● The names of the machine axes can be defined.
● The machine axes can be linear or rotary axes.

BCS
The basic coordinates system (BKS) has the following properties:
● The geometry axes form a perpendicular Cartesian coordinate system.
● The BCS is derived from a kinematic transformation of the MCS.

BZS
The basic zero system (BZS) is the basic coordinate system with a basic offset.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 733
Axes, Coordinate Systems, Frames (K2)
Brief description

SZS
The settable zero system (SZS) is the workpiece coordinate system with a programmable
frame from the viewpoint of the WCS. The workpiece zero is defined by the settable frames
G54 to G599.

WCS
The workpiece coordinate system (WCS) has the following properties:
● In the workpiece coordinate system all the axes coordinates are programmed (part
program).
● It is made up of geometry axes and special axes.
● Geometry axes always form a perpendicular Cartesian coordinate system
● Special axes form a coordinate system without any geometrical relation between the
special axes.
● The names of the geometry axes and special axes can be defined.
● The workpiece coordinate system can be translated, rotated, scaled or mirrored with
FRAMES (TRANS, ROT, SCALE, MIRROR).
Multiple translations, rotational movements, etc., are also possible.

Zero offset external


The zero offset external has the following properties:
● At a time defined in the PLC, a predefined additional zero offset between the basic and
the workpiece coordinate systems is activated.
● The magnitudes of the offsets can be set by the following for each of the axes involved:
– PLC
– Operator Panel
– Part program
● Activated offsets take effect at the instant the first motion block of the relevant axes is
processed after offset activation. The offsets are superimposed on the programmed path
(no interpolation).
The velocity, at which the zero offset external is applied, is as follows:
Programmed F value plus +1/2 JOG velocity
The zero offset external is traversed at the end of G0 blocks.
● The activated offsets are retained after RESET and end of program.
● After POWER ON, the last active offset is still stored in the control but must be
reactivated by the PLC.

Basic Functions
734 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Brief description

10.1.3 Frames

FRAME
A FRAME is a closed calculation rule that translates one Cartesian coordinate system into
another.

FRAME components

6FDOLQJ
0LUURULQJ

5RWDWLRQ

)LQHRIIVHW

5RXJKRIIVHW

Figure 10-1 FRAME components

A FRAME consists of the following components:

FRAME components Programmable with:


Offset Rough offset TRANS
ATRANS (additive translation component)
CTRANS (zero offset for multiple axes)
G58 (axial zero offset)
Fine offset CFINE
G59 (axial zero offset)
Rotation ROT/ROTS
AROT/AROTS
CROTS
Scaling SCALE
ASCALE
Mirroring MIRROR
AMIRROR

Features in relation to axes


The rough and fine offsets, scaling and mirroring can be programmed for geometry and
special axes. A rotation can also be programmed for geometry axes.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 735
Axes, Coordinate Systems, Frames (K2)
Brief description

Rough and fine offsets


The translation component of FRAMES comprises:
● Rough offset with TRANS, ATRANS and CTRANS
The rough offset is normally specified by the machine setter.
The programmable offsets for all geometry axes and special axes are specified with
TRANS.
● Fine offset with CFINE
This can be defined by the machine operator, within certain input limits.

G58, G59
G58 and G59 can be programmed to replace the rough and fine offsets of the programmable
frame on an axial basis. These functions can only be used when the fine offset is configured.
● Rough offset with G58
G58 changes only the absolute translation component (rough offset) for the specified
axis; the total of additively programmed translations (fine offset) is retained.
● Fine offset with G59
G59 is used for axial overwriting of the additively programmed translations for the
specified axes that were programmed with ATRANS.

Frame rotations
Orientations in space are defined via frame rotations as follows:
● Rotation with ROT defines the individual rotations for all geometry axes.
● Solid angles with ROTS, AROTS, CROTS define the orientation of a plane in space.
● Frame rotation with TOFRAME defines a frame with a Z axis pointing in the tool direction.

Scaling
SCALE is used to program the programmable scale factors for all geometry axes and special
axes.
If a new scaling is to be based on a previous scaling, rotation, translation or mirroring, then
ASCALE must be programmed.

Mirroring
The axis to be mirrored can be set via the following machine data:
MD10610 MIRROR_REF_AX (reference axis for the mirroring)

Value Significance
0 Mirroring is performed around the programmed axis.
1, 2 or 3 Depending on the input value, mirroring is mapped onto the mirroring of a specific
reference axis and rotation of two other geometry axes.

Basic Functions
736 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Brief description

Frame chaining
The current FRAME is composed of the total basic frame, the settable FRAME, the system
frames and the programmable FRAME.
The current complete frame is calculated according to the formula below:

$P_ACTFRAME = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME :


$P_ISO1FRAME : $P_ISO2FRAME : $P_ISO3FRAME :
$P_ACTBFRAME : $P_IFRAME : $P_TOOLFRAME :
$P_WPFRAME : $P_TRAFRAME: $P_PFRAME
$P_ISO4FRAME : $P_CYCFRAME

Frames with G91


Incremental programming with G91 is defined such that the compensation value is traversed
additively to the incrementally programmed value when a zero offset is selected.
The behavior depends on the setting in the setting data:
SD42440 $SC_FRAME_OFFSET_INCR_PROG (zero offset in frames)

Value Significance
1 Zero offset is applied on FRAME and incremental programming of an axis (= default setting).
0 Only the programmed path is traversed.

Suppression of frames
Current frames can be suppressed with the following instructions:

Command Significance
G53 Current zero offset (ZO)
G153 Current frame including basic frame
SUPA Current ZO, incl. programmed offsets

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 737
Axes, Coordinate Systems, Frames (K2)
Brief description

NCU global basic frames


For rotary indexing machine technology, for example, a channel must be used to define
frames for other channels. These cross-channel frames are shown in the "NCU global basic
frames" below.
Properties of the NCU global basic frames:
● Can be read and written from all channels.
● Can be activated only in the channels
● There are up to 16 NCU global basic frames
Global frames can be used to apply offsets, scale factors and mirroring operations to
channel and machine axes.
All basic frames (up to 16 global and 16 channel-specific) are chained to produce total basic
frame. The standard configuration is designed in such a way that there is at least one basic
frame per channel.
Settable frames can be defined as either NCU global or channel-specific.

Channel coordination
With NCU global frames, the user must ensure channel coordination and activation of the
frames (e.g. using the WAITMC command), to allow the frames to be calculated at the
desired point in the program.
Cross-channel activation of frames is not supported.

Basic Functions
738 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

10.2 Axes

10.2.1 Overview

*HRPHWU\D[HV 6SHFLDOD[HV

&KDQQHOD[HV

3DWKD[HV 3RVLWLRQLQJD[HV 6SLQGOHD[HV


&RPPDQGD[HV *DQWU\D[HV
)HHGUDWHGHWHU 6\QFKUR 5HFLSURFDWLQJD[HV &RXSOHGPRWLRQD[HV
PLQHGSDWKD[HV QRXVD[HV 3/&D[HV *XLGHYDOXHFRXSOLQJD[HV
)*5283 

.LQHPDWLF
WUDQVIRUPDWLRQ
/LQHDUD[HV
5RWDU\D[HV
2ULHQWDWLRQD[HV

0DFKLQHD[HV

Figure 10-2 Relationship between geometry axes, special axes and machine axes

0DFKLQHD[HV

/RFDOPDFKLQHD[LV /LQND[LV YLD1&8OLQN

Figure 10-3 Local and external machine axes (link axes)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 739
Axes, Coordinate Systems, Frames (K2)
Axes

10.2.2 Machine axes

Meaning
Machine axes are the axes that actually exist on a machine tool.

%


=

&

;

<

Figure 10-4 Machine axes X, Y, Z, B, S on a Cartesian machine

Application
The following can be machine axes:
● Geometry axes X, Y, Z
● Orientation axes A, B, C
● Loader axes
● Tool turrets

Basic Functions
740 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

● Axes for tool magazine


● Axes for automatic tool changer
● Spindle sleeves
● Axes for pallet changers
● Etc.

10.2.3 Channel axes

Meaning
Each geometry axis and each special axis is assigned to a channel. Geometry axes and
additional axes are always traversed in "their" channel.

10.2.4 Geometry axes

Meaning
The three geometry axes always make up a fictitious rectangular coordinate system.
By using FRAMES (offset, rotation, scaling, mirroring), it is possible to image geometry axes
of the workpiece coordinate system (WCS) on the BCS.

Application
Geometry axes are used to program the workpiece geometry (the contour).
Plane selection G17, G18 and G19 (DIN 66217) always refers to the three geometry axes.
That is why it is advantageous to name the three geometry axes X, Y and Z.

10.2.5 Replaceable geometry axes

Significance
The "Replaceable geometry axes" function allows the geometry axes in a grouping to be
replaced by other channel axes.
Axes that are initially configured as synchronous special axes in a channel can replace any
selected geometry axis in response to a program command.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 741
Axes, Coordinate Systems, Frames (K2)
Axes

Example
On a machine with two Z axes, Z1 and Z2, either of the Z axes can be programmed as the
geometry axis in response to an instruction in the part program.

Activation
Axis replacement is activated by the program command:
GEOAX([n, channel axis name]...)
n=0: Removes an axis from the geometry axis grouping.
n=1, 2, 3: Index of the geometry axis
GEOAX( ): Establishes the basic setting defined via MD for the assignment of
channel axes to geometry axes.
Channel axis name: Name of channel axis, which is to operate as a geometry axis.
A channel axis, which has been designated a geometry axis, can only be addressed under
its geometry axis name. The geometry axes names themselves remain unchanged.
Geometry axes can be replaced either individually or as a group in one command.

Supplementary conditions
As a basic rule, any channel axis designated as a geometry axis can be replaced by another
channel axis.
In this case, the following restrictions apply:
● Rotary axes may not be programmed as geometry axes.
● A geometry axis, which has the same name as a channel axis, cannot be replaced by
another channel axis (alarm message). Nor can an axis of this type be removed from the
geometry axis grouping. It cannot change its position within the geometry axis grouping.
● Both axes in each of the axis pairs involved in the replacement operation must be block-
synchronized.
● The following functions may not be active when geometry axes are replaced:
– Transformation
– Spline interpolation
– Tool radius compensation
– Tool fine compensation
● Any active DRF offset or zero offset external will remain operative. They both act on
channel axes. The channel axis assignment is not affected by the replacement of
geometry axes.

Basic Functions
742 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

Replacement of geometry axes


All frames, protection zones and working area limitations are deleted. They may need to be
reprogrammed after the replacement operation.
The system response to replacement of geometry axes is, therefore, identical to its response
to a change (switch on/off, switchover) in a kinematic transformation.

Tool Length Compensation


Any active tool length compensation remains operative and is applied to the new geometry
axes after replacement.
The system treats tool length compensations as not yet applied for the following geometry
axes:
● All geometry axes, which have been newly added to the geometry axis grouping
● All geometry axes, which have changed their positioning within the geometry axis
grouping
Geometry axes, which retain their position within the geometry axis grouping after a
replacement operation, also retain their status with respect to tool length compensation.

RESET
The reset behavior of the changed geometry axis assignment is defined with the following
machine data:
MD20110 $MC_RESET_MODE_MASK (definition of initial control system settings after
RESET/TP end)
MD20118 $MC_GEOAX_CHANGE_RESET (allow automatic geometry axis change)
MD20110 $MC_RESET_MODE_MASK

Bit Value Significance


12 0 In case of set machine data MD20118 $MC_GEOAX_CHANGE_RESET (allow
automatic geometry axis change) a changed geometry axis assignment is deleted
during reset or part program end.
The initial setting defined in the machine data for the geometry axis assignment
becomes active.
1 A modified geometry axis assignment remains active after a reset/part-program end.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 743
Axes, Coordinate Systems, Frames (K2)
Axes

MD20118 $MC_GEOAX_CHANGE_RESET

Value Significance
0 The current configuration of the geometry axes remains unchanged on reset and program
start. With this setting, the response is identical to older software versions without geometry
axis replacement.
1 The configuration of the geometry axis remains unchanged during reset or part program end
as a function of machine data MD20110 $MC_RESET_MODE_MASK and during part
program start as a function of machine data MD20112 $MC_START_MODE_MASK
(definition of initial control system settings with NC START) or brought to the initial status
defined in the machine data MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB (assignment
of geometry axis to channel axis).

Program start
Analogously to the Reset response, the behavior during program start is based on the
setting in the machine data:
MD20112 $MC_START_MODE_MASK (definition of initial control system settings with
NC-START)

Bit Value Significance


12 0 A modified geometry axis assignment remains active on part-program start.
1 A modified geometry axis assignment is cleared on part-program start.

Approaching a reference point


When the "Reference point approach" mode is selected, the geometry axis configuration
defined by the machine data is automatically set.

M code
A changeover of the geometry axis with GEOAX( ) can be communicated to the PLC
through the output of an M code:
MD22532 $MC_GEOAX_CHANGE_M_CODE (M-Code during tool holder change)

Note
If this machine data is set to one of the values 0 to 6, 17, 30, then no M code is output.

Basic Functions
744 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

Transformation changeover
The following interrelationships must be noted with respect to kinematic transformation and
geometry axis replacement:
● Geometry axis assignments cannot be modified when the transformation is active.
● Activation of a transformation deletes the programmed geometry axis configuration and
replaces it by the geometry axis assignment stored in the machine data of the activated
transformation.
● The initial setting defined through MD for the geometry axis configuration becomes
effective after deactivating the transformation.
Should it be necessary to modify the geometry axis assignment in connection with
transformations, then another new transformation must be configured. The total number of
the transformations simultaneously available in the channel is equal to 8.
A maximum of two transformations per channel can be available simultaneously from the
transformation groups below:
● Orientation transformations
(3-axis, 4-axis, 5-axis and nutation transformation)
● TRAANG (oblique axis)
● TRANSMIT
● TRACYL
References:
/FB3/ Function Manual, Special Functions; 3-Axis to 5-Axis Transformation (F2)
/FB2/ Function Manual, Extension Functions; Kinematic Transformation (M1)

Example
In the example below, it is assumed that there are 6 channel axes with channel axis names
XX, YY, ZZ, U, V, W and three geometry axes with names X, Y, Z. The basic setting is
defined in machine data such that the geometry axes are imaged on the first three channel
axes, i.e. on XX, YY and ZZ.

GEOAX() ; The geometry axis assignment defined via the machine


data MD AXCONF_GEOAX_ASSIGN_TAB
is effective, i.e. XX, YY and ZZ become geometry axes.
G0 X0 Y0 Z0 U0 V0 W0 ; All the axes in rapid traverse to position 0.
GEOAX (1, U, 2, V, 3, W) ; Channel axis U becomes the first, V the second and W
the third geometry axis.
GEOAX(1, XX, 3, ZZ) ; Channel axis XX becomes the first, ZZ the third
geometry axis. The second geometry axis remains
unchanged.
G17 G2 X20 I10 F1000 ; Semicircle in the X, Y plane. Channel axes XX and V
traverse.
GEOAX(2,W) ; Channel axis W becomes the second geometry axis.
The first and third geometry axes remain unchanged.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 745
Axes, Coordinate Systems, Frames (K2)
Axes

G17 G2 X20 I10 F1000 ; Full circle in the X, Y plane. Channel axes XX and W
traverse.
GEOAX() ; The geometry axis assignment defined via the machine
data MD AXCONF_GEOAX_ASSIGN_TAB
is effective,
i.e. XX, YY and ZZ become geometry axes.
GEOAX (1, U, 2, V, 3, W) ; U, V and W become the first, second and third
geometry axes.
G1 X10 Y10 Z10 XX=25 ; Channel axes U, V, W each traverse to position 10,
XX traverses to position 25.
GEOAX(0,V) ; V is again removed from the geometry axis grouping.
U and W remain geometry axes. The second geometry
axis is no longer assigned.
GEOAX (1, U, 2, V, 3, W) ; U, V and W become the first, second and third
geometry axes, i.e. U and W remain unchanged.
GEOAX(3,V) ; V becomes the third geometry axis. This means that
W, which was previously the third geometry axis, is
removed from the geometry axis grouping. The second
geometry axis is no longer assigned.

10.2.6 Special axes

Significance
In contrast to geometry axes, no geometrical relationship is defined between the special
axes.

Note
Geometry axes have an exactly defined relationship in the form of a right-angled coordinate
system.

Special axes are part of the basic coordinate system (BCS). With FRAMES (translation,
scaling, mirroring), special axes of the workpiece coordinate system can be mapped on the
basic coordinate system.

Application
Typical special axes are:
● Rotary axes
● Machine tool axes
● Tool revolver axes
● Loader axes

Basic Functions
746 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

10.2.7 Path axes

Meaning
Path axes are interpolated together (all the path axes of a channel have a common path
interpolator).
All the path axes of one channel have the same acceleration phase, constant travel phase
and delay phase.
The feedrate programmed under address F (path feedrate) applies to all the path axes
programmed in a block, with the following exceptions:
● An axis has been programmed that has been defined as having no control over the path
velocity with instruction FGROUP.
● Axes programmed with instructions POS or POSA have an individual feedrate setting (axis
interpolator).

Application
Path axes are used to machine the workpiece with the programmed contour.

10.2.8 Positioning axes

Significance
Positioning axes are interpolated separately (each positioning axis has its own axis
interpolator). Each positioning axis has its own feedrate and acceleration characteristic.
Positioning axes can be programmed in addition to path axes (even in the same block). Path
axis interpolation (path interpolator) is not affected by the positioning axes. Path axes and
the individual positioning axes do not necessarily reach their block end points at the same
time.
Instructions POS and POSA are used to program positioning axes and define block change
criteria:
● POS
Block change takes place when the path axes and positioning axes have reached their
block end points.
● POSA
Block change takes place when the path axes have reached their end of block position.
Positioning axes continue to traverse beyond block limits to their block end point.
Concurrent positioning axes differ from positioning axes in that they:
● Only receive their block end points from the PLC
● Can be started at any time (not at block limits)
● Do not affect the execution of current part programs.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 747
Axes, Coordinate Systems, Frames (K2)
Axes

Application
Typical positioning axes are:
● Loaders for moving workpieces away from machine
● Tool magazine/turret

Reference
References:
/FB2/ Function Manual, Extended Functions, Positioning Axes (P2)
/FB1/ Function Manual, Basic Functions, Spindles (S1)
FB3/ Function Manual, Special Functions,; Gantry Axes (G1)
/FB3/ Function Manual, Special Functions; Axis Couplings and ESR (M3)
/FB1/ Function Manual, Basic Functions; Basic PLC Program (P3)
/FB2/ Function Manual, Expansion functions; Oscillation (P5)
/FBSY/ Function Manual Synchronized Actions

10.2.9 Main axes

Significance
A main axis is an axis that is interpolated by the main run.
This interpolation can be started as follows:
● From synchronized actions
(as command axes due to an event via block-related, modal or static synchronized
actions)
● From the PLC via special function blocks in the PLC basic program
(named as a concurrent positioning axis or a PLC axis)
● Via the setting data or from the part program
(as an asynchronous or block-synchronous oscillating axis)

Channel control
An axis interpolated by the main axis reacts in terms of:
● NC STOP
● Alarm handling
● Program control

Basic Functions
748 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

● End of program
● RESET

Note
The response at the end of the program varies. The axis movement need not always be
completed and, therefore, may carry on beyond the end of the program.

Application
Certain axes in the main run can be decoupled at the channel response triggered by the NC
program sequence and controlled from the PLC. These axes are also interpolated in the
main run and respond independently for the channel and program sequence.
A PLC-controlled axis can then be controlled independently by the NC. This concerns the
following actions:
● The sequence for canceling the axis (equivalent to delete distance-to-go)
● Stopping or interrupting the axis
● Continuing the axis (continue sequence of motion)
● Resetting the axis to its basic status

10.2.10 Synchronized axes

Significance
Synchronous axes are components of the path axes, which are not referenced in order to
calculate the tool path velocity. They are interpolated together with path axes (all path axes
and synchronous axes of one channel have a common path interpolator).
All path axes and all synchronous axes of a channel have the same acceleration phase,
constant travel phase and deceleration phase.
The feedrate (path feedrate) programmed under address F applies to all the path axes
programmed in a block but not to the synchronous axes.
Synchronous axes take the same time to cover the programmed path as the path axes.

FGROUP command
The command FGROUP specifies whether the axis is a feed-defining path axis (used to
calculate the path velocity) or a synchronous axis (not used to calculate the path velocity).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 749
Axes, Coordinate Systems, Frames (K2)
Axes

Example

N05 G00 G94 G90 M3 S1000 X0 Y0 Z0 ;


N10 FGROUP(X,Y) ; Axes X/Y are path axes,
Z is a synchronous axis.
N20 G01 X100 Y100 F1000 ; Progr. feedrate 1000 mm/min.
Feedrate of axis X = 707 mm/min.
Feedrate of axis Y = 707 mm/min.
N30 FGROUP (X) ; Axis X is a path axis,
axis Y is a synchronous axis
N20 X200 Y150 ; progr. Feedrate 1000 mm/min
Feedrate of Axis X = 1000 mm/min
Feedrate of Axis Y is set to 500 mm/min,
because only half the distance is to be
traversed.

Note
The channel axis name must be used for the FGROUP command.
This is defined by the machine data:
MD20080 $MC_AXCONF_CHANAX_NAME_TAB (name of the channel axis in the channel)

Application
In the case of helical interpolation FGROUP can be programmed to determine whether:
● The programmed feedrate should be valid on the path
(all 3 programmed axes are path axes)
● The programmed feedrate should be valid on the circuit
(2 axes are path axes and the infeed axis is a synchronous axis)

Basic Functions
750 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

10.2.11 Axis configuration

Allocation
The figure below shows the assignment between the geometry axes, special axes, channel
axes and machine axes as well as the names of the individual axis types. MD are used for
assignment.

0'0&B$;&21)B*(2$;B1$0(B7$% 0'0&B$;&21)B*(2$;B$66,*1B7$%
&KDQQHO &KDQQHO
&KDQQHO &KDQQHO
VWJHRPHWU\D[LV>@ ; 
QGJHRPHWU\D[LV>@ < 
UGJHRPHWU\D[LV>@ = 

0'0&B$;&21)B&+$1$;B1$0(B7$% 0'0&B$;&21)B0$&+$;B86('
&KDQQHO &KDQQHO

&KDQQHO &KDQQHO
VWFKDQQHOD[LV>@ ; 
QGFKDQQHOD[LV>@ < 
UGFKDQQHOD[LV>@ = 
WKFKDQQHOD[LV>@ % 
WKFKDQQHOD[LV>@ :=0 
WKFKDQQHOD[LV>@ & 
WKFKDQQHOD[LV>@  
WKFKDQQHOD[LV>@  
  



0'01B$;&21)B0$&+$;B1$0(B7$% 0'0$B63,1'B$66,*1B72B0$&+$;

VWPDFKLQHD[LV>@ ; 
QGPDFKLQHD[LV>@ < 
UGPDFKLQHD[LV>@ = 
WKPDFKLQHD[LV>@ % 
WKPDFKLQHD[LV>@ : 
WKPDFKLQHD[LV>@ & 
WKPDFKLQHD[LV>@  
WKPDFKLQHD[LV>@  
  



Figure 10-5 Axis configuration

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 751
Axes, Coordinate Systems, Frames (K2)
Axes

Note
Leading zeroes in user-defined axis identifiers are ignored.
Example:
MD10000 `$MN_AXCONF_MACHAX_NAME_TAB[0] = X01 corresponds to X1
The geometry axes must be assigned to the channel axes in ascending order leaving no
gaps.

Special points to be noted


● Three geometry axes are assigned to the channel axes in the MD.
● All channel axes that are not assigned to the three geometry axes are special axes.
● The channel axes are assigned to machine axes.
● The spindles are also assigned to machine axes.

Channel axis gaps


A machine axis (local or link axis) need not be assigned to every channel axis according to:
MD20080 $MC_AXCONF_CHANAX_NAME_TAB (channel axis name in the channel)
through:
MD20070 $MC_AXCONF_MACHAX_USED (machine axis number valid in channel).
If the existing concrete machine has a machine axis, which has been specifically assigned to
a certain channel axis, then references to the logical machine axis image:
MD10002 $MN_AXCONF_LOGIC_MACHAX_TAB(logical NCK machine axis image)
are entered in the machine data:
MD20070 $MC_AXCONF_MACHAX_USED (machine axis number valid in the channel),
otherwise the value is 0.
Application:
Consistent, semi-defined channel axis names for various machine versions of a
manufacturer's machine series.
Advantages:
● Uniform basic configuration of various machines
● Simple reconfiguration on removal of a machine
● Portability of programs

Reliability of channel axis gaps


Channel axis gaps must be communicated explicitly through the following machine data:
MD11640 $MN_ENABLE_CHAN_AX_GAP (channel axis gaps are allowed in
AXCONF_MACHAX_USED)

Basic Functions
752 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

If this is not carried out, an entry of 0 prevents other machine axes being assigned to
channel axes in the following machine data:
MD20070 $MC_AXCONF_MACHAX_USED (machine axis number valid in channel)
References:
/FB2/ Function Manual, Extension Functions; Several Control Panels on Multiple NCUs,
Decentralized Systems (B3)

Example
In the example below, a machine tool channel axis is specified without a real machine axis.

1&8
&KDQQHOD[LVQDPHV 0DFKLQHD[HVXVHGLQWKHFKDQQHO
0'0&B$;&21)B&+$1$;B1$0(B7$% 0'0&B$;&21)B0$&+$;B86('
&KDQQHO &KDQQHO

&KDQQHO &KDQQHO

VWFKDQQHOD[LV>@ ; 
QGFKDQQHOD[LV>@ < 
UGFKDQQHOD[LV>@ = 
WKFKDQQHOD[LV>@ % 
WKFKDQQHOD[LV>@ :=0 &KDQQHOD[LVJDS 
WKFKDQQHOD[LV>@ & 
WKFKDQQHOD[LV>@ & 
WKFKDQQHOD[LV>@  
  

/RJLFDOPDFKLQHD[LVLPDJH
0'01B$;&21)B/2*,&B0$&+$;B7$%
       
1&B$;Q

&7B6/

; < = % 

$[LVFRQWDLQHUQDPHV
0'01B$;&7B1$0(B7$%
/RFDOPDFKLQHD[HV $[LVFRQWDLQHU&7
0'01B$;&21)B0$&+$;B1$0(B7$% 0'01B$;&7B$;&21)B$66,*1B7$% &7
VWPDFKLQHD[LV>@ 1&B$; 6ORW &7
;
QGPDFKLQHD[LV>@ < &7
UGPDFKLQHD[LV>@ = 1&B$; 6ORW &7
WKPDFKLQHD[LV>@ % &7
WKPDFKLQHD[LV>@ & 1&B$; 6ORW
&0 &7
WKPDFKLQHD[LV>@
WKPDFKLQHD[LV>@  1&B$; 6ORW &7
WKPDFKLQHD[LV>@  
  1&QB$;P
&RQWDLQHUOLQND[LV
/LQND[LV$;QPDFKLQHD[LVRQ1&8

Figure 10-6 Axis configuration with channel axis gap

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 753
Axes, Coordinate Systems, Frames (K2)
Axes

Note
The gaps count as axes with reference to the number of channel axes and their indices.
If the following machine data is used to try to define a channel axis gap with the geo axis,
then the attempt is rejected without an alarm:
MD20050 $MC_AXCONF_GEOAX_ASIGN_TAB (assignment of geometry axis to channel
axis)
Using channel axes in
MD24120ff. $MC_TRAFO_GEOAX_ASSIGN_TAB1...
and
MD24110ff. $MC_TRAFO_AXES_IN1...8
to which no machine axes are assigned (gap) through
MD20070 $MC_AXCONF_MACHAX_USED (machine axis number valid in the channel),
triggers alarms 4346 or 4347.

10.2.12 Link axes

Significance
Link axes are axes, which are physically connected to another NCU and whose position is
controlled from this NCU. Link axes can be assigned dynamically to channels of a different
NCU. From the perspective of a particular NCU, link axes are non-local axes.
The axis container concept is used for the dynamic modification of the assignment to an
NCU. Axis replacement with GET and RELEASE from the part program is not available for link
axes across NCU boundaries.

Basic Functions
754 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

Requirements
● The participating NCUs, NCU1 and NCU2, must be connected by means of high-speed
communication via the link module.
References:
/PHD/Configuring Manual NCU 571-573.2; Link Module
● The axis must be configured appropriately by machine data.
● The link axis option must be installed.

1&8 ' 1&8 '

&KDQQHO &KDQQHO
$ %

&KDQQHO
$
%

$

/LQNPRGXOH +: /LQNPRGXOH +:
/LQNFRPPXQLFDWLRQ

Figure 10-7 Overview of link axes

The link axes are described in


References:
/FB2/ Function Manual, Expansion Functions; Multiple Operator Panels on Multiple NCUs,
Distributed Systems (B3)

Note
The link axis functionality is currently not available with the SINUMERIK 840Di.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 755
Axes, Coordinate Systems, Frames (K2)
Axes

Axis container
An axis container is a circular buffer data structure, in which local axes and/or link axes are
assigned to channels. The entries in the circular buffer can be shifted cyclically.
In addition to the direct reference to local axes or link axes, the link axis configuration in the
logical machine axis image also allows references to axis containers. This type of reference
consists of:
● Container number
● a slot (circular buffer location within the container)
The entry in a circular buffer location contains:
● A local axis
Or
● A link axis

&KDQQHOD[HV

01B$;&21)B/2*,&B0$&+$;B7$%
; 
\  $;  /RFDOPDFKLQHD[LV
=  $;  /RFDOPDFKLQHD[LV
6  
6 

1&B$;  /LQND[LVZLWKRXWFRQWDLQHU
&7B6/  $[LVFRQWDLQHUVORW
&7B6/  $[LVFRQWDLQHUVORW
&KDQQHO 


0&B$;&21)B0$&+$;B86('
/RJLFDOPDFKLQHD[LVLPDJH
,QWHUQDOD[LVYLHZRIWKH1&.

$VVLJQHGWR1&8

$[LVFRQWDLQHU &LUFXODUEXIIHUORFDWLRQ VORW


1&80D[LV 1&B$; 
1&80D[LV 1&B$;  01B$;&B$;&21)B$66,*1B7$%
1&80D[LV 1&B$; 

$[LVFRQWDLQHU &LUFXODUEXIIHUORFDWLRQ VORW



 01B$;&B$;&21)B$66,*1B7$%


$[LVFRQWDLQHU &LUFXODUEXIIHUORFDWLRQ VORW



1&80D[LV 1&B$;  01B$;&B$;&21)B$66,*1B7$%


1&8JOREDOLQOLQNPHPRU\

Figure 10-8 Mapping of channel axes onto axis containers via logical machine axis image

Basic Functions
756 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Axes

Axis container entries contain local machine axes or link axes from the perspective of an
individual NCU.
The entries in the logical machine axis image of an individual NCU:
MD10002 $MN_AXCONF_LOGIC_MACHAX_TAB
are fixed.

Note
The axis container functionality is currently not available with the SINUMERIK 840Di.

The axis container function is described in


References:
/FB2/ Function Manual, Expansion Functions; Multiple Operator Panels on Multiple NCUs,
Distributed Systems (B3)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 757
Axes, Coordinate Systems, Frames (K2)
Zeros and reference points

10.3 Zeros and reference points

10.3.1 Reference points in working space

Zeros and reference points


The neutral position of the machine is obtained from the coordinate axes and the
constructive characteristics of the machine. The zero of the coordinate system is obtained by
defining a suitable reference point on the machine in its neutral position.
The position of the coordinate systems (MCS, BCS, BZS, SZS, WCS) is determined by
means of zeros.

Zero points Reference points


M = Machine zero R = Reference point

W = Workpiece zero T = Toolholder reference point

Machine zero M
The machine zero M defines the machine coordinate system MCS. All other reference points
refer to the machine zero.

Workpiece zero W
The workpiece zero W defines the workpiece coordinate system in relation to the machine
zero M. The programmed part-program blocks are executed in the workpiece coordinate
system WCS.

Reference point R
The position of the reference point R is defined by cam switches. Reference point R
calibrates the position measuring system.
With incremental encoders, the reference point must be approached every time the control
power is switched on. The control can only then work with the measuring system and
transfer all position values to the coordinate systems.

Toolholder reference point T


The toolholder reference point T is located on the toolholder locator. By entering the tool
lengths, the control calculates the distance between the tool tip (TCP Tool Center Position)
and the toolholder reference point.

Basic Functions
758 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Zeros and reference points

Example: Zeros and reference points on a turning machine

0 :
7

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 759
Axes, Coordinate Systems, Frames (K2)
Zeros and reference points

10.3.2 Position of coordinate systems and reference points

Control POWER ON
For incremental measuring probes, the reference point must be approached each time the
control is activated so that the control can transfer all position values to the coordinate
system.

0DFKLQH :RUNSLHFH
FRRUGLQDWH :RUNSLHFH FRRUGLQDWH
V\VWHP 0&6 6SLQGOH OHQJWK V\VWHP :&6

0 0

0DFKLQH :RUNSLHFH
]HUR ]HUR

Figure 10-9 Position of coordinate systems by machine zero M and workpiece zero W

;
=
5

5HIHU
HQFH
7 7RROKROGHU SRLQW

0DFKLQH
]HUR / ;

7RROKROGHUUHIHUHQFHSRLQW
/

Figure 10-10 Position of reference point in relation to machine zero

Basic Functions
760 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

10.4 Coordinate systems

10.4.1 Overview

Cartesian coordinate systems


DIN 66217 stipulates that machine tools must use right-angled, rectangular (Cartesian)
coordinate systems. The positive directions of the coordainate axes are determined using
the "Right Hand Rule". The coordinate system is related to the workpiece and programming
takes place independently of whether the tool or the workpiece is being traversed. When
programming, it is always assumed that the tool traverses relative to the coordinate system
of the workpiece, which is intended to be stationary.

] [

Figure 10-11 Right-hand rule

<
;<=
$[HVSHUSHQGLFXODUWR
%
RQHDQRWKHU

$%&
5RWDU\D[HVURWDWLQJ
DERXW;<=
r

&
;
$
=

Figure 10-12 Clockwise, rectangular Cartesian coordinate system

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 761
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

The following coordinate systems are defined:

MCS Machine Coordinat System


BCS Basic Coordinate System
BZS Basic Zero System
SZS Settable Zero System
WCS Workpiece Coordinate System

Interrelationships between coordinate systems


The coordinate systems are determined by the kinematic transformation and the FRAMES.
A kinematic transformation is used to derive the BCS from the MCS. If no kinematic
transformation is active, the BCS is the same as the MCS.
The basic frame maps the BCS onto the BKS.
An activated adjustable FRAME G54...G599 ENS is derived from the BNS.
The WCS, which is the basis for programming, is defined by the programmable FRAME.

Basic Functions
762 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

)UDPHFKDLQ

:&6
)UDPHIRUF\FOHVSURJUDPPDEOH
IUDPHWUDQVIRUPDWLRQV
6=6
6\VWHPIUDPHIRU72527
72)5$0( ZRUNSLHFHV

*WR*VHWWDEOHIUDPH
FKDQQHOVSHFRU1&8JOREDO
%=6
&KDLQHGILHOGRIEDVLFIUDPHV
FKDQQHOVSHFDQGRU1&8JOREDO

&KDLQHGV\VWHPIUDPHVIRU3$52735(6(7
VFUDWFKLQJ]HURRIIVHWH[WHUQDO

+DQGZKHHO '5) RIIVHWVXSHULPSRVHGPRYHPHQW ]HUR


RIIVHWH[WHUQDO
%&6

.LQHPDWLFWUDQVIRUPDWLRQ
0&6

+RPHSRVLWLRQRIIVHW

0&6 0DFKLQH&RRUGLQDWH6\VWHP
%&6 %DVLF&RRUGLQDWH6\VWHP
:&6 :RUNSLHFH&RRUGLQDWH6\VWHP
%=6 %DVLF=HUR6\VWHP
6=6 6HWWDEOH=HUR6\VWHP

Figure 10-13 Interrelationships between coordinate systems

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 763
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

10.4.2 Machine coordinate system (MCS)

Machine coordinate system (MCS)


The machine coordinate system (MCS) is made up of all physically available machine axes.

%


=

&

;

<

Figure 10-14 MCS with machine axes X, Y, Z, B, C (5-axis milling machine)

Basic Functions
764 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

;

0
=

Figure 10-15 MCS with machine axes X, Z (turning machine)

Axial preset offset


The "Preset" function can be used to redefine the control zero in the machine coordinate
system. The preset values act on machine axes. Axes do not move when "Preset" is active.

Note
After Preset, the reference points are invalid!
If possible do not use this function.

10.4.3 Basic coordinate system (BCS)

Basic coordinate system (BCS)


The basic coordinate system (BCS) consists of three mutually perpendicular axes (geometry
axes) as well as other special axes, which are not interrelated geometrically.

Machine tools without kinematic transformation


BCS and MKS always coincide when the BCS can be mapped onto the MCS without
kinematic transformation (e.g. TRANSMIT/face transformation, 5-axis transformation and up
to three machine axes).
On such machines, machine axes and geometry axes can have the same names.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 765
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

<

;
0&6 %&6

= 0DFKLQH]HUR

Figure 10-16 MCS=BCS without kinematic transformation

Machine tools with kinematic transformation


The BCS and MCS do not coincide when the BCS is mapped onto the MCS with kinematic
transformation (e.g. TRANSMIT/face transformation, 5-axis transformation or more than
three axes).
On such machines the machine axes and geometry axes must have different names.

<%&6

.LQHPDWLF
WUDQVIRUPDWLRQ

<0&6
; %&6

%DVLFFRRUGLQDWHV\VWHP %&6
= %&6

; 0&6

0DFKLQHFRRUGLQDWHV\VWHP 0&6
= 0&6

Figure 10-17 Kinematic transformation between the MCS and BCS

Basic Functions
766 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

Machine kinematics
The workpiece is always programmed in a two- or three-dimensional, right-angled coordinate
system (WCS). However, such workpieces are being programmed ever more frequently on
machine tools with rotary axes or linear axes not perpendicular to one another. Kinematic
transformation is used to represent coordinates programmed in the workpiece coordinate
system (rectangular) in real machine movements.
References:
/FB3/ Function Manual, Special Functions; 3-Axis to 5-Axis Transformation (F2)
/FB2/ Function Manual, Extension Functions; Kinematic Transformation (M1)

10.4.4 Additive offsets

Zero offsets external


The "zero offset external" is an axial offset. Unlike with frames, no components for rotation,
scaling and mirroring are possible.

<

([WHUQDO
]HURRIIVHW

<
;

%DVLF]HURV\VWHP %=6
=

;

%DVLFFRRUGLQDWHV\VWHP %&6
=

Figure 10-18 Zero offset external between BCS and BZS

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 767
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

Setting the offset values


The offset values are set:
● PLC
By describing system variables
● Via the operator panel
From menu "Current zero offsets"
● NC Program
By assigning to system variable $AA_ETRANS[axis]

Activation of the offset values


The 0/1 edge of the following PLC signal activates the previously defined offset values:
DB31, ... DBX3.0 (accept external zero offset)
The 0/1 edge change is only evaluated in Automatic operating mode.

Effect of activation
The offset for an axis becomes active when the first motion block for this axis is executed
after the offset is activated.
Example of possible chronological sequence:

G0 X100
X150 ; A new "Zero offset external" is activated by the PLC during this
motion.
X200 ; The new "Zero offset external" is applied due to G0 programming at the
end of the block (X200), if no velocity reserve is available (100%).

The "Zero offset external via system frame" is applied immediately.


Channel-specific system frames can be configured through the following machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK (System frames SRAM)

Programming
Setting a new offset via the axis-specific system variables:
$AA_ETRANS[axis]=Ri
The instruction below reads the axis-specific active offset value:

Basic Functions
768 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

Ri=$AA_ETRANS[axis]

Note
The read value can then differ from the previously set value, if the set value has not yet been
activated.
The read value corresponds to a value set previously, if the most recently set value has not
yet been activated. The system frame for the "Zero offset external" exists only if it has been
configured.

DRF offset
The DRF offset enables the adjustment of an additional incremental zero offset for geometry
and additional axes in the basic coordinate system through handwheel.
The DRF offset can be read via the axis-specific system variable:
$AC_DRF[<Axis>]
References:
/FB2/ Function Manual of Extension Functions; Jog with/without Handwheel (H1),
Section: DRF offset

Overlaid movements
The "Superimposed motion" for the programmed axis can only be accessed from
synchronized actions via the system variable $AA_OFF[axis].

Run-up
After run-up (POWER ON) the last used offset values for the "Zero offset external" are
stored and do not become effective again until there is a renewed activation signal.
System frames are retained during Power ON, depending on the following machine data:
MD24008 $MC_CHSFRAME_POWERON_MASK (reset system frames after Power On)

RESET/end of program
The activated values remain active after RESET and program end.
Reset response of channel-specific system fames as follows:
The system frame for the "external zero offset" is active after RESET with the following
machine data setting:
MD24006 $MC_CHSFRAME_RESET_MASK, Bit 1 = 1
The "external zero offset" in the active system frame is deleted in the data management
through the following machine data setting:
MD24006 $MC_CHSFRAME_RESET_MASK, Bit 1 = 0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 769
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

The following frames are active after RESET:


● System frame for:
MD24006 $MC_CHSFRAME_RESET_MASK, Bit 4 = 1 (workpiece reference point)
MD24006 $MC_CHSFRAME_RESET_MASK, Bit 5 = 1 (cycles)

Suppression
The NC program instruction SUPA suppresses the "Zero offset external" while the block is
being processed.
The command G74 (reference point approach) and the equivalent operator actions in
"Reference point approach" mode suppress the "Zero offset external" for the duration of the
reference point approach.
With G74, i.e. "Automatic" or "MDA" mode, the previously active "Zero offset external"
automatically becomes active again with the next traverse motion in the block.
After a mode change from "Reference point approach" mode, the VDI signal for the
referenced axes must be set for reactivation.

10.4.5 Basic zero system (BZS)

Basic zero system (BZS)


The basic zero system (BZS) is the basic coordinate system with a basic offset.

<

%DVLFRIIVHW
<
;

%DVLF]HURV\VWHP %=6
=

;

%DVLFFRRUGLQDWHV\VWHP %&6
=

Figure 10-19 Basic offset between BCS and BZS

Basic Functions
770 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

Basic offset
The basic offset describes the coordinate transformation between BCS and BZS. It can be
used, for example, to define the palette window zero.
The basic offset comprises:
● Zero offset external
● DRF offset
● Superimposed motion
● Chained system frames
● Chained basic frames

]
] 3URJUDPPDEOH
IUDPH

]
]
\ \

6=6 :&6 :RUNSLHFH


\ [
\
[
*
]
]
\ \
*
0&6 %=6
%&6 :&6
6=6 [
3DOOHW
%DVHIUDPH [ [

:RUNSLHFH
3URJUDPPDEOH
IUDPH

Figure 10-20 Example of the use of the basic offset

The following settings apply:


● The user can change the basic offset from the part program by means of an operator
action and from the PLC.
● If the basic offset is to take effect immediately, an ASUB can be started via the PLC using
FC9 in order to execute the appropriate G code.

Note
Recommendation to the machine manufacturer
Use the 3rd basic offset onwards for your own applications.
The 1st and 2nd basic offset are reserved for PRESET and the "Zero offset external".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 771
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

10.4.6 Settable zero system (SZS)

Settable zero system (SZS)


The "settable zero system" (SZS) is the workpiece coordinate system WCS with a
programmable frame (viewed from the perspective of the WCS). The workpiece zero is
defined by the settable FRAMES G54 to G599.

<

**
<
;

6HWWDEOH]HURV\VWHP 6=6
=

;

%DVLF]HURV\VWHP %=6
=

Figure 10-21 Settable FRAME G54 ... G599 between BNS and ENS

Programmable offsets act on the "settable zero system". All programmable offsets refer to
the "settable zero system".

Basic Functions
772 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

WCS actual-value display in WCS or SZS


The actual values of the axes in the machine coordinate system (MCS) or the WCS can be
displayed on the HMI operator interface. For displays in WCS, the actual values can also be
displayed in relation to the SZS. The corresponding parameterization takes place through
the machine data:
MD9424 $MM_MA_COORDINATE_SYSTEM (coordinate system for actual value display)

Value Significance
0 Actual-value display in relation to the WCS
1 Actual-value display in relation to the SZS

Note
Display of the current coordinate system
When "Actual-value display in relation to the SZS" is active, the WCS is still displayed on the
HMI operator interface as the coordinate system to which the actual-value display relates.

Example
Actual-value display in relation to the WCS or SZS

Code (excerpt) Actual value display: Actual value display:


Axis X (WCS) Axis X (SZS)
N10 X100 100 100
N20 X0 0 0
N30 $P_PFRAME = CTRANS(X,10) 0 10
N40 X100 100 110

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 773
Axes, Coordinate Systems, Frames (K2)
Coordinate systems

10.4.7 Workpiece coordinate system (WCS)

Workpiece coordinate system (WCS)


The workpiece coordinate system (WCS) is the programming basis.

<

3URJUDPPDEOHB)5$0(
ZLWKB3B3)5$0(
<
;

:RUNSLHFHFRRUGLQDWHV\VWHP :&6
=

;

6HWWDEOH]HURV\VWHP 6=6
=

Figure 10-22 Programmable FRAME between SZS and WCS

Basic Functions
774 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5 Frames

10.5.1 Overview

Frame
A frame is an axis-specific structure through all channel axes, in which there is a value for
each axis, for the translation, fine offset, rotation (only for geometry axes) scaling and
mirroring.

TRANS FINE ROT MIRROR SCALE


x 10.0 0.1 0.0 0 1
Y 0.0 0.0 0.0 1 1
z 0.0 0.0 45.0 0 1
chx 10.0 0.1 0 1
chy 0.0 0.0 1 1
chz 0.0 0.0 0 1
a 2.0 0.1 0 2
b 0.0 0.0 1 1
In global frames, this is valid for all machine axes.

TRANS FINE MIRROR SCALE


ax1 10.0 0.1 0 1
ax2 0.0 0.0 1 1
ax3 0.0 0.0 0 1
ax4 2.0 0.1 0 2
ax5 0.0 0.0 1 1
Activating a frame causes a static coordinate transformation to be carried out via a defined
calculation rule.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 775
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.2 Frame components

10.5.2.1 Translation

Programming
The program commands below are used to program the translation:

Command Comment
$P_UIFR[1] = CTRANS(x,10,y,10)
$P_UIFR[1,x,tr] = 10 Frame components
TRANS x=10 y=10 Prog. frame only

7UDQVODWLRQ
)LQHRIIVHW

10.5.2.2 Fine offset

Parameterization
The corresponding fine offset parameterization takes place through the machine data:
MD18600 $MN_MM_FRAME_FINE_TRANS (fine offset in FRAME (SRAM))

Value Significance
0 The fine offset cannot be entered or programmed.
1 Fine offset possible for settable frames, basic frames and the prog. frame via command or
program.

Programming
The fine offset can be programmed in the program using command CFINE (x, .., y, ...).
The coarse offset is defined with CTRANS(...). Coarse and fine offset add up to the total
offset.

Basic Functions
776 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

$P_UBFR = CTRANS(x, 10) : CFINE(x, 0.1) : CROT(x, 45)


$P_UIFR[1]=CFINE(x, 0.5, y, 1.0, z, 0.1)
Access to the individual components of the fine offset is achieved through component
specification FI.
finex = $P_UIFR[ $P_UIFRNUM, x, FI ]
Fine offestting can be programmed only if:
MD18600 $MN_FRAME_FINE_TRANS = 1
if this is not the case, then each assignment of a fine offset to a settable frame and to the
basic frame with the alarm "FRAME: fine offset not possible".
A fine offset changed by the operator does not apply until after activation of the
corresponding frame, i.e. activation via G500, G54 to G599.
Once activated, a fine offset of a frame remains active the whole time the frame is active.
When the offset of the current frame is displayed, the total offset (coarse offset and fine
offset) is output.

10.5.2.3 Rotations for geometry axes

Function
The direction of rotation about the coordinate axes is determined by means of a right-hand,
rectangular coordinate system with axes X, Y and Z.

Rotations

If the rotary motion is in a clockwise direction when looking in the positive direction of the
coordinate axis, the direction of rotation is positive. A, B and C identify rotations whose axes
are parallel to X, Y and Z.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 777
Axes, Coordinate Systems, Frames (K2)
Frames

[
$

&
5LJKWKDQGUHFWDQJXODU
FRRUGLQDWHV\VWHP
]

Parameterization
The corresponding rotation in frame is parameterized through the machine data:
MD10600 $MN_FRAME_ANGLE_INPUT_MODE (rotation sequence in FRAME)

Value Significance
1 RPY notation
2 Euler angle

Basic Functions
778 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

RPY angles
Rotations with a RPY angle are carried out in the order Z, Y', X''.

5RWDWLRQDERXW] 5RWDWLRQDERXW\ 5RWDWLRQDERXW[

]
] ]
] ] ]
[  [
[ \
\ \  \ \

[
[
[

The angles are only defined ambiguously in the following ranges:

-180 <= x <= 180


-90 < Y < 90
-180 <= z <= 180

Euler angle
Rotations with a Euler angle are carried out in the order Z, X', Z''.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 779
Axes, Coordinate Systems, Frames (K2)
Frames

5RWDWLRQDERXW] 5RWDWLRQDERXW[ 5RWDWLRQDERXW]

]
] ]
\
\
\
] ]
\
\

\ [

[ [
[

[  [

The angles are only defined ambiguously in the following ranges:

0 <= x < 180


-180 <= Y <= 180
-180 <= z <= 180
The written angles can be uniquely read back again in these areas. When rotations that are
larger than the specified angles are entered, these are converted to a mode of
representation that does not exceed the specified range limits.

RPY example
$P_UIFR[1]=crot(x,10,y,90,z,40) returns on reading back $P_UIFR[1]=crot(x,0,y,90,z,30)
$P_UIFR[1]=crot(x,190,y,0,z,-200) delivers during reading: $P_UIFR[1]=crot(x,-170,y,0,z,160)

On writing and reading frame rotation components, these limits should be observed so the
same results are achieved on writing and reading, or on repeated writing.

Programming
The program commands below are used to program the rotation:
$P_UIFR[1]=CROT(x,10,y,10)
ROT x=10 y=10
$P_UIFR[1,x,rt]=10

CRPL - Constant Rotation Plane


The predefined function "Constant Rotation Plane", allows a rotation to be programmed in
any plane for each frame:
FRAME CRPL(INT,REAL)

Basic Functions
780 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

This method offers the advantage that no axis identifier, around which a rotation should be
executed, has to be specified for a geometry coordinate axis.
As a rule, turning machines have only two geo axes, meaning that, up to now, a rotation in
the plane could not be programmed.
Parameter:

INT 0: Rotation in the active plane


1: Rotation around z
2: Rotation around y
3: Rotation around x

REAL Angle of rotation in degrees


RPY: -180 <= x <= 180
-90 <= y <= 90
-180 <= z <= 180
Euler: -180 <= x <= 180
0 <= y <= 180
-180 <= z <= 180
The user must keep to the named angles, in the interests of a unique backward
calculation. If the limits are violated, a unique backward calculation is impossible. Entry is
not aborted with an alarm.

Chaining with frames


CRPL() can be chained with frames and known frame functions such as CTRANS(),
CROT(), CMIRROR(), CSCALE(), CFINE().
Examples:
$P_CYCFRAME = $P_CYCFRAME : CRPL(0,30)
$P_CYCFRAME = CTRANS(x,10) : CRPL(1.30)
$P_CYCFRAME = CROT(x,10) : CRPL(2.30)
$P_CYCFRAME = CRPL(3,30) : CMIRROR(y)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 781
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.2.4 Scaling

J
LQ
DO
6F
[

Programming
The program commands below are used to program the scaling:
$P_UIFR[1] = CSCALE(x,1,y,1)
SCALE x = 1y = 1
$P_UIFR[1,x,sc] = 1

10.5.2.5 Mirroring

0LUURULQJ

Programming
The program commands below are used to program a mirroring:
$P_UIFR[1] = CMIRROR(x,1,y,1)
MIRROR x = 1y = 1
$P_UIFR[1,x,mi] = 1

Basic Functions
782 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.2.6 Chain operator


Frame components or complete frames can be combined into a complete frame using the
chain operator ( : ).

10.5.2.7 Programmable axis identifiers


Geo, channel and machine axis identifiers can be used in the frame commands.
The programmed axis must be known to the channel-specific frames in the channel.

SPI
When programming frame instructions, the SPI(<spindle number>) axis function can be
used in place of an axis identifier.
SPI(<spindle number>) forms the reference of the spindle to the channel axis.
→ refer to MD35000 $MA_SPIND_ASSIGN_TO_MACHAX[ ] (assignment of spindle to
machine axis)
The following frame instructions can be programmed with SPI(spino):
CTRANS()
CFINE()
CMIRROR()
CSCALE()
A spindle can only be assigned to one rotary axis at a time. The CROT(..) function can
therefore not be programmed withSPI(), as only geometry axes are permitted forCROT().
The channel axis identifier or machine axis identifier of the axis belonging to the spindle is
always output when decompiling frames, even when axis identifiers have been programmed
in the part program with SPI(..).
If the spindle is assigned e.g. to the Channel Axis A then the programming:
N10 $P_UIFR[1] =
CTRANS(SPI(1),33.33,X,1):CSCALE(SPI(1),33.33):CMIRROR(SPI(1))
during recompilation:
$P_UIFR[1]=CTRANS(X,1,A,33.33):CSCALE(A,33.33):CMIRROR(A)
If a spindle and an assigned axis are programmed in a frame instruction, then Alarm 16420
"Axis % multiply programmed" is output.
Example:
$P_UIFR[1] = CTRANS(SPI(1),33.33,X,1,A,44)
(The spindle is assigned to Axis A.)

Programming examples
$P_PFRAME[SPI(1),TR]=22.22
$P_PFRAME=CTRANS(X, axis value,Y,axis value,SPI(1),axis value)
$P_PFRAME=CSCALE(X,Scale,Y,scale,SPI(2),scale)
$P_PFRAME=CMIRROR(S1,Y,Z)
$P_UBFR=CTRANS(A,10):CFINE(SPI(1),0.1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 783
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.2.8 Coordinate transformation

6FDOLQJ

0LUURULQJ
5RWDWLRQ

)LQHRIIVHW

5RXJKRIIVHW

The formulae below are used to discover the coordinate transformation for geometry axes:

:&6ൺ%&6 Y 5 6 0 YಫW

%&6ൺ:&6 Y  LQY 0  LQY 6  LQY 5  YW

V: Position vector in BCS


V': Position vector in WCS

Basic Functions
784 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.3 Frames in data management and active frames

10.5.3.1 Overview
There are various types of frame: system frames, basic frames, settable frames and the
programmable frame. Apart from the programmable frame, all types have a frame in the data
management and an active frame. The programmable frame is only active. Frames in the
data management are stored in the static NC memory and can be archived. The program
can describe both data management frames and active frames. HMI can only describe data
management frames.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 785
Axes, Coordinate Systems, Frames (K2)
Frames

$UFKLYLQJ 3URJUDP +0,

6WDWLF1&PHPRU\

3B5(/)5 6\VWHPIUDPHV
3B,62)5
3B&<&)5
3B,62)5
3B75$)5
3B,62)5 %DVLFIUDPHV **
3B:3)5
3B,62)5
3B722/)5 1&8 &+$1 1&8&+$1
3B(;7)5 3B1&%)5>Q@ 3B&+%)5>Q@ 3B8,)5>Q@
3B6(7)5

3B3$57)5 3B1&%)5>@ 3B&+%)5>@ 3B8,)5>@

***3,B6(78'7 5HVHWWUDQVIRUPDWLRQFKDQJH*(2$;

$FWLYHWRWDOIUDPH&KDLQRIDOODFWLYHIUDPHV

3B$&7)5$0(  3B3$57)5$0(3B6(7)5$0(3B(;7)5$0(
3B,62)5$0(3B,62)5$0(3B,62)5$0(
3B$&7%)5$0(3B,)5$0(3B722/)5$0(
3B:3)5$0(3B75$)5$0( 3B3)5$0(
3B,62)5$0(3B&<&)5$0(

3URJUDP

Basic Functions
786 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.3.2 Activating data management frames


Data management frames become active frames on executing G500, G54...G599, or on
resetting with the appropriate machine data setting, transformation change, GEOAX. HMI
writes to the data management frame and activates the frames through a PI service during
RESET.
Changing a frame via HMI with the aid of the _N_SETUDT PIs is effective only after a restart
of the program or in the reset state, provided the following HMI machine data is set:
MD9440 ACTIVATE_SEL_USER_DATA (Set active offset effective immediately)
WCS position specifications do not change immediately when a change is made to a frame
via HMI, but after restart.
System frames are activated during the preprocessing stage by executing the appropriate
system functions, either from the part program or using the HMI.
System frames, which are saved in the data management, are also activated by means of a
G500, G54 to G599 instruction. The cycle programmer has the option to modify the system
frames and activate them by means of a G500, G54 to G599 instruction. However, this option
should only be used with reservation.
The activation of all data management frames can be changed through the following
machine data:
MD24050 $MC_FRAME_SAA_MODE (save and activate data management frames)

Bit Significance
0 Data management frames are activated only by programming the $P_CHBFRMASK,
$P_NCBFRMASK and $P_CHSFRMASK bitmasks.
G500...G599 activate only the corresponding settable frame.
The reset response is independent of this.
1 Data management frames are not implicitly described by system functions, such as TOROT,
PAROT,
zero offset external and transformations.
The $P_CHSFRMASK variable is used to activate system frames from the data
management.
The value of the variables is specified as bitcoded according to the machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK (SRAM system frames)
If the corresponding bit is set to one, the data management frame is activated. If the bit is
equal to zero, the data management frame is not active and the currently active system
frame remains active.
All the system frames whose bits are set in the following machine data are activated for
actual value setting and external zero offset after the RESET:
MD24006 $MC_CHSFRAME_RESET_MASK (active system frames after Reset)
The system frames for TCARR, PAROT and TOROT, TOFRAME are activated according to the
setting in the following machine data:
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)
As when selecting and deselecting transformations and GEOAX(), when switching geometry
axes the current complete frame is either deleted or recalculated on the basis of the new
geometry axis configuration, and activated. The system frames and all other frames are
conditioned again in relation to the geometry axes.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 787
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.3.3 NCU global frames


All settable frames G54 to G599 and all basic frames can be configured NCU globally or
channel-specifically. A combination of these is also possible with basic frames. Global
frames affect all channels on an NCU. All channels have read and write access to the NCU.
Global frames only have axial frame components, such as translations, scales and mirrors of
individual axes. Each channel can read or modify global frames for any machine axis.
A characteristic of global frames is that they are calculated in all channels of an NCU. As the
assignment of machine axes to channel axes and, in particular, to geometry axes, can be
different in all channels, there is no geometric relationship. Global frames describe offsets,
scales and mirrors of machine axes. Rotations cannot be used on global frames.
All settable frames can be reconfigured to global frames with the following machine data:
MD18601 $MN_MM_NUM_GLOBAL_USER_FRAMES (number of global, pre-defined user
frames (SRAM))
If the value of this machine data is greater than zero, there are no channel-specific settable
frames.
The following machine data becomes irrelevant then, and is not evaluated:
MD28080 $MC_MM_NUM_USER_FRAMES (number of settable frames (SRAM))
The number of global basic frames is parameterized through the following machine data:
MD18602 $MN_MM_NUM_GLOBAL_BASE_FRAMES (number of global, basic frames
(SRAM))
Channel-specific basic frames can also exist simultaneously through the following machine
data:
MD28081 $MC_MM_NUM_BASE_FRAMES (number of basic frames (SRAM))
Global frames can be read and written from all channels of an NCU. When writing global
frames, the user must ensure channel coordination. This can be achieved through e.g. wait
markers.

Basic Functions
788 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.4 Frame chain and coordinate systems

10.5.4.1 Overview
The figure below shows the frame chain for the current complete frame. The frame chain is
stored between the BCS and WCS. The SZS (Settable Zero System) corresponds to the
WCS, transformed by the programmable frame. The BZS (Basic Zero System) still includes
the current settable frame. The system frame for the zero offset external is only available if it
has been configured, otherwise the zero offset external is interpolated as a superimposed
motion of the axis, as it has been up to this point.

Q
KDL
HF
DP
)U

:&63&6
3B75$)5$0(3B3)5$0(
3B,62)5$0(3B&<&)5$0(
6=6$&6
3B722/)5$0(3B:3)5$0(

3B,)5$0(
%=6)&6
3B$&7%)5$0(

3B3$57)5$0(3B6(7)5$0(3B(;7)5$0(
3B,62)5$0(3B,62)5$0(3B,62)5$0(
%&6%&6
+DQGZKHHO '5) RIIVHWVXSHULPSRVHGPRYHPHQW]HURRIIVHW
H[WHUQDONLQHPDWLFWUDQVIRUPDWLRQ
0&60&6
5HIHUHQFHSRLQWRIIVHW

WCS: Workpiece Coordinate System


SZS: Settable Zero System
BZS: Basic Zero System
BCS: Basic Coordinate System
MCS: Machine Coordinate System
PCS: Part Coordinate System
ACS: Adjustable Coordinate System

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 789
Axes, Coordinate Systems, Frames (K2)
Frames

FCS: Foot Coordinate System


BCS: Basic Coordinate System
MCS: Machine Coordinate System
The current complete frame is calculated according to the formula below:

$P_ACTFRAME = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME :


$P_ISO1FRAME : $P_ISO2FRAME : $P_ISO3FRAME :
$P_ACTBFRAME : $P_IFRAME :
$P_TOOLFRAME : $P_WPFRAME : $P_TRAFRAME:
$P_PFRAME : $P_ISO4FRAME : $P_CYCFRAME

10.5.4.2 Relative coordinate systems


Relative coordinate systems display the current setpoint positions of the axes, which lie
relative to a specified reference point in the active displayed coordinate system. No
programming can be done regarding the relative coordinate systems. Only the axis positions
in these systems can be read via the system variables.
The new display coordinate systems lie relative to WCS and ENS coordinate system and
result through transformation of the WCS or ENS axis positions with the active system frame
$P_RELFRAME. The relative coordinate systems can not only be displaced linearly, but also
rotated, mirrored, compressed or expanded.
The position indicator for axis setpoints is done in WCS or in ENS. The configuring is done
via HMI machine data. Always only one display-coordinate system is active in the channel.
For this reason only one relative frame is provided, which generates both the relative
coordinate systems in the same ratio. The HMI displays the relative coordinates according to
the configuring.

/
&6 5(
/
3
6 5(
:.
/
&6 5(
$
6 5(/
(1
(
$0
)5
(

(/
$0

5
)5

B
3
(/
5
B

:.63&6
3

(16$&6

Figure 10-23 Relative coordinate systems

Basic Functions
790 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

The data maintenance frame $P_RELFR can be written in the part program and via BTSS.
All the frame components can be modified.
The active system frame $P_RELFRAME can be written in the part program and via BTSS.
The configuring of the system frame $P_RELFR is done via the following machine data:

Machine data Bit Description


MD28082 $MC_MM_SYSTEM_FRAME_MASK 11 Creation of $P_RELFR; with this, relative
coordinate systems become existent.
MD28083 $MC_MM_SYSTEM_DATAFRAME_MASK 11 Data maintenance frame $P_RELFR
MD24006 $MC_CHSFRAME_RESET_MASK. 11 $P_RELFR becomes active at Reset
MD24007 $MC_CHSFRAME_RESET_CLEAR_MASK 11 $P_RELFR is deleted at Reset
MD24008 $MC_CHSFRAME_POWERON_MASK 11 $P_RELFR is deleted at PowerOn
The axis position in the relative coordinate system WCSRel can be read via the variable
$AA_PCS_REL[ax]. The variable can be read in part program, BTSS and via synchronous
actions.
The axis position in the relative coordinate system ENSRel can be read via the variable
$AA_ACS_REL[ax]. The variable can be read in part program, BTSS and via synchronous
actions.
The setting of a relative reference point via the operator panel is done via the general
command interface for the workpiece and tool measuring. The system frame $P_RELFR for
relative coordinate systems is calculated and activated as follows:
● $AC_MEAS_TYPE = 14
● PI-services _N_SETUDT(6, 7)
An example for setting the relative axis positions is given in:
References:
/FB2/ Function Manual Extended functions; Measurement (M5),
Chapter "Measurement of Geo- and special axes (Meas Type 14, 15)"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 791
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.4.3 Configurable SZS


The function of the SZS coordinate system is to display actual values and move the axes
during a cycle interruption. Cycles utilize frames in the frame chain to perform their functions.
They input translations or rotations into either the programmable frame or the cycle system
frame. The WCS is, therefore, modified by cycles. A user who uses Stop to interrupt a cycle,
however, does not wish to traverse in the "cycle coordinate system", but in the programmed
WCS. This is why the SZS is used for the display. For reasons of compatibility, the SZS is
made configurable.

0'0&B)5$0(B$&6B6(7 

:&6
3B&<&)5$0(

3B75$)5$0(3B3)5$0(
3B,62)5$0(
6=6

Basic Functions
792 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

0'0&B)5$0(B$&6B6(7 

:&6
3B&<&)5$0(
6=6
3B75$)5$0(3B3)5$0(
3B,62)5$0(

The following machine data can be used to set whether the SZS is with or without the
programmable frame, the transformation frame and $P_ISO4FRAME:
MD24030 $MC_FRAME_ACS_SET (setting of the ENS coordinate system)
As default, the value 1 is set.
Reconfiguring the SZS affects all SZS actual-value displays and the $AA_IEN[axis] system
variables. Traversing geometry axes in JOG mode in the SZS also depends on the
configuration.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 793
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.4.4 Manual traverse in the SZS coordinate system


Previously, geometry axes have been traversed manually in JOG mode in the WCS. In
addition, there is also the option to carry out this manual operation in the SZS coordinate
system. The $AC_JOG_COORD variable enables the user to switch between manual
traversing in the WCS and SZS. The user can now select if he wants to traverse in the SZS
or the WCS.

(
5$0
< &)
B&
3

6=6
3B75$)5$0(3B3)5$0(

Basic Functions
794 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.4.5 Suppression of frames

Programming

Command Significance
G53 Non-modal suppression of the following frames:
• System frame for cycles
• Programmable frame
• System frame for transformations, workpieces, TOROT and TOFRAME
• Active settable frame
G153 Non-modal suppression of the following frames:
• System frame for cycles
• Programmable frame
• System frame for TOROT and TOFRAME, workpieces
• Active settable frame
• All channel-specific and NCU global basic frames
• System frames for PAROT, PRESET, scratching, ext. ZO
SUPA Implicit preprocessing stop and non-modal suppression of frames analog G153 and
additional
• handwheel offsets (DRF)
• [ext. Zero offset]
• Overlaid motion
G500 Modal activation of the G500 frame. The G500 frame should be a zero frame.
DRFOF Deactivate (clear) the handwheel offsets (DRF)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 795
Axes, Coordinate Systems, Frames (K2)
Frames

3$
68




:&63&6
*

3B75$)5$0(3B3)5$0(


3B,62)5$0(3B&<&)5$0(
*

6=6$&6
3B722/)5$0(3B:3)5$0(

3B,)5$0(
%=6)&6
3B$&7%)5$0(

3B3$57)5$0(3B6(7)5$0(3B(;7)5$0(
3B,62)5$0(3B,62)5$0(3B,62)5$0(
%&6%&6
+DQGZKHHO '5) RIIVHWVXSHULPSRVHGPRYHPHQW]HURRIIVHWH[WHUQDO

.LQHPDWLFWUDQVIRUPDWLRQ
0&60&6
5HIHUHQFHSRLQWRIIVHW

Parameterization
Frame suppressions SUPA, G153 and G53 lead to the WCS, SZS and possibly the BZS
jumping when frame suppression is active. This characteristic for position display and pre-
defined position variables can be changed through the following machine data:
MD24020 $MC_FRAME_SUPPRESS_MODE (Positions during frame suppression)

Bit Significance
0 Positions for display (BTSS) are without frame suppression.
1 Position variables are without frame suppression.
When the bit is set, the position for the display or the variables is calculated without frame
suppression so that no further jumps in the position occur.

Basic Functions
796 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.5 Frame chain frames

10.5.5.1 Overview
There are up to four frame variants:
● Settable frames (G500,G54 to G599)
● Basic frames
● Programmable frame
● System frames

10.5.5.2 Settable frames $P_UIFR[n]


The number of NCU global settable frames is set through the following machine data:
MD18601 $MN_MM_NUM_GLOBAL_USER_FRAMES (number of global, pre-defined user
frames (SRAM))
The number can be between 0 and 100. If the MD has a value greater than zero, there are
only NCU global settable frames, otherwise the following machine data specifies the number
of channel-specific settable frames:
MD28080 $MC_MM_NUM_USER_FRAMES (number of settable frames (SRAM))
System variable $P_UIFR[n] can be used to read and write the frame field elements. The
frame is not activated simultaneously when writing a field element, but rather activation only
takes place on execution of a G500,G54, to G599 instruction. For NCU global frames, the
changed frame only becomes active in those channels of the NCU, which execute a
G500,G54 to G599 instruction. The variable is used primarily for storing write operations
from HMI or PLC. These frame variables are saved by the data backup.

Current settable frame $P_IFRAME


The predefined frame variable $P_IFRAME can be used to read and write the current
settable frame, which is valid in the channel, in the part program. The written settable frame
is immediately included in the calculation. In the case of NCU global settable frames, the
modified frame acts only in the channel in which the frame was programmed. If the frame is
to be modified for all channels of an NCU, $P_UIFR[n] and $P_IFRAME must be written
simultaneously. The other channels must then activate the corresponding frame, e.g. with
G54.

Programming of settable frames


Settable frames can be read and written via the part program and via the OPI by operator
actions and by the PLC. However, only data management frames can be written by the OPI.
The index of the active settable frame can be ascertained via the $P_UIFRNUM system
variable.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 797
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.5.3 Channel basic frames $P_CHBFR[n]


The number of basic frames in the channel can be configured via the machine data:
MD28081 $MC_MM_NUM_BASE_FRAMES (number of basic frames (SRAM))
The minimum configuration is designed for at least one basic frame per channel. A maximum
of 16 basic frames per channel is possible. In addition to the 16 basic frames, there can also
be 16 NCU-global basic frames in the channel.
System variable $P_CHBFR[n] can be used to read and write the basic frame field elements.
While writing a basic frame field element, the chained total frame is not activated. Instead,
the activation takes place only after a G500,G54..G599instruction is executed. The variable
is used primarily for storing write operations to the basic frame on HMI or PLC. These frame
variables are saved by the data backup.

Current channel basic frames $P_CHBFRAME[n]


System variable $P_CHBFRAME[n] can be used to read and write the current channel basic
frame field elements. The resulting total basic frame is calculated by means of the write
process in the channel. Whenever a basic frame is written, the complete basic frame is
calculated again.

Basic frame in channel $P_UBFR


The system variable is retained for reasons of compatibility, although it is redundant for the
$P_CHBFR[0] variables.
The basic frame with field device 0 is not activated simultaneously when writing to the
predefined $P_UBFR variable, but rather activation only takes place on execution of a
G500,G54,.G599instruction. For NCU global frames, the changed frame only becomes
active in those channels of the NCU, which execute a G500,G54..G599instruction. The
variable is used primarily for storing write operations to the basic frame on HMI or PLC. The
variable can also be read and written in the program.
$P_UBFR is identical to $P_CHBFR[0]. One basic frame always exists in the channel by
default, so that the system variable is compatible with older versions. If there is no channel-
specific basic frame, an alarm is issued at read/write: "Frame: Instruction not allowed" is
output on a read or write access.

Basic Functions
798 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Current first basic frame in the channel $P_BFRAME


The system variable is retained for reasons of compatibility, although it is redundant for the
$P_CHBFRAME[0] variables.
The predefined frame variable $P_BFRAME can be used to read and write the current basic
frame with the field device of 0, which is valid in the channel, in the part program. The written
basic frame is immediately included in the calculation. In the case of NCU global settable
frames, the modified frame acts only in the channel in which the frame was programmed. If
the frame is to be modified for all channels of an NCU, $P_UBFR and $P_BFRAME must be
written simultaneously. The other channels must then activate the corresponding frame, e.g.
with G54.
$P_BFRAME is identical to $P_CHBFRAME[0]. The system variable always has a valid
default value. If there is no channel-specific basic frame, an alarm is issued at read/write:
"Frame: Instruction not allowed" is output on a read or write access.

Programming basic frames


Basic frames can be read and written via the part program and via the OPI by operator
actions and by the PLC. However, only data management frames can be written by the OPI.

10.5.5.4 NCU global basic frames $P_NCBFR[n]


The number of global basic frames can be configured via the machine data:
MD18602 $MN_MM_NUM_GLOBAL_BASE_FRAMES (number of global, basic frames
(SRAM))
There are a maximum of 16 global basic frames. All basic frames are stored as fields.
System variable $P_NCBFR[n] can be used to read and write the basic frame field elements.
While writing a basic frame field element, the chained total frame is not activated. Instead,
the activation takes place only after a G500,G54..G599instruction is executed. If the
modified frame is to be active in every channel of the NCU, every channel must execute a
G500,G54..G599instruction. The variable is used primarily for storing write operations to the
basic frame on HMI or PLC. These frame variables are saved by the data backup.

Current NCU global basic frames $P_NCBFRAME[n]


System variable $P_NCBFRAME[n] can be used to read and write the current global basic
frame field elements. The resulting total basic frame is calculated by means of the write
process in the channel. The modified frame is activated only in the channel in which the
frame was programmed. If the frame is to be modified for all channels of an NCU,
$P_NCBFR[n] and $P_NCBFRAME[n] must be written simultaneously. The other channels
must then activate the frame, e.g. with G54. Whenever a basic frame is written, the complete
basic frame is calculated again.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 799
Axes, Coordinate Systems, Frames (K2)
Frames

Programming global frames


Global frames are programmed analogously, as are channel-specific frames, i.e. global basic
frames are programmed with $P_NCBFR[n] and global settable frames with $P_UIFR[n].
Geometry axis, channel axis and machine axis identifiers can be used as axis identifiers for
frame program commands. If there is no machine axis for the channel axis on the NCU,
programming with channel axis identifiers is rejected with the alarm 18314 "Frame: Type
conflict". Channel-specific frames can be programmed with geometry axis, channel axis and
machine axis identifiers. If there is no corresponding channel axis for the machine axis on
the NCU, programming with machine axis identifiers is rejected with the alarm 18314
"Frame: Type conflict". If frame components are applied to a machine axis or a channel axis,
which is also a geometry axis, the corresponding geometry axis components will also be
simultaneously modified.
Example:

$P_NCBFR[0] = CTRANS( ax1, 10 )


$P_NCBFR[0] = CTRANS(x, 10)
$P_NCBFR[0, ax1, FI ] = 0.1
$P_NCBFR[0, x, FI] = 0.1

Rotations cannot be used on global frames. The programming of a rotation is denied with
alarm: "18310 Channel %1 Block %2 Frame: rotation not allowed" is displayed.
It is not possible to program chaining of global frames and channel-specific frames, and any
attempt at this is rejected with the alarm 18314 "Frame: Type conflict". All global frames and
channel-specific frames are internally chained to the complete frame. This takes place in the
channel and only with all channel axes known in the channel. The assignment of a frame
with rotation components to a global frame is denied with alarm "Frame: Rotation not
allowed".
Example:

$P_NCBFR[0] = CTRANS( x, 10 ):CROT( y, 45 ; Faulty assignment on the global basic


) frame

The following frames are channel-specific:


$P_UBFR, $P_BFRAME, $P_CHBFR[n],
$P_CHBFRAME[n], $P_NCBFRAME[n],
$P_ACTBFRAME and $P_ACTFRAME
These frames can contain rotation components.
These frames only affect the channel that has been set.
With SW 5.1, attempts to program a channel axis, which is also a link axis, is rejected with
alarm "14092 Channel %1 block %2 axis %3 is wrong axis type". An axis can be
programmed only if it physically exists on the NCU.

Basic Functions
800 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.5.5 Complete basic frame $P_ACTBFRAME


The chained complete basic frame is determined by the variable. The variable is read-only.

3B$&7%)5$0(

3B&+%)5$0(>Q@

3B&+%)5$0(>@

3B1&%)5$0(>Q@

3B1&%)5$0(>@

$P_ACTBFRAME
corresponds to
$P_NCBFRAME[0] : ... : $P_NCBFRAME[n] : $P_CHBFRAME[0] : ... : $P_CHBFRAME[n].

Programmability of the complete basic frame


System variables $P_CHBFRMASK and $P_NCBFRMASK can be used to select, which
basic frames to include in the calculation of the "complete" basic frame. The variables can
only be programmed in the program and read via the operator panel interface. The value of
the variables is interpreted as a bit mask and specifies, which basic frame array element of
$P_ACTBFRAME is included in the calculation. $P_CHBFRMASK can be used to define,
which channel-specific basic frames are included, and $P_NCBFRMASK can be used to
define, which NCU global basic frames are included in the calculation. When the variables
are programmed, the complete basic frame and the complete frame are calculated again.
After RESET and in the default setting, the value of $P_CHBFRMASK equals
$MC_CHBFRAME_RESET_MASK and the value of $P_NCBFRMASK equals
$MN_NCBFRAME_RESET_MASK.

$P_NCBFRMASK = 'H81' ; $P_NCBFRAME[0] : $P_NCBFRAME[7]


$P_CHBFRMASK = 'H11' ; $P_CHBFRAME[0] : $P_CHBFRAME[4]

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 801
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.5.6 Programmable frame $P_PFRAME


Programmable frames are available only as active frames.
This frame is reserved for the programmer.
The programmable frame can be maintained with the machine data:
MD24010 $MC_PFRAME_RESET_MODE = 1 ("Reset mode for programmable frame")
during RESET.
This functionality is important, most of all if after a RESET one still wants to retract out of an
oblique hole.

MIRROR
Mirrorings of a geometry axis were thus far (up to SW-P4) related to a defined reference axis
only using the machine data:
MD10610 $MN_MIRROR_REF_AX ("reference axis for the mirroring").
From the user's point of view, this definition is hard to follow. When mirroring the z axis, the
display showed that the x axis was mirrored and the y axis had been rotated about 180
degrees. When mirroring two axes this became even more complex and it was no longer
easy to understand, which axes had been mirrored and, which had not.
With SW P5 and higher, there is the option to clearly display the mirroring of an axis. A
mirroring is then not mapped to the mirroring of a reference axis and rotation of other axes.
This setting can be configured through the machine data setting:
MD10610 $MN_MIRROR_REF_AX = 0.
MIRROR and AMIRROR are used to expand the programming of the programmable frame.
Previously, the specified value of the coordinate axis, e.g. the value 0 for MIRROR X0, is not
evaluated, but the AMIRROR has a toggle function, i.e. MIRROR X0 activates the mirror and a
further AMIRROR X0 deactivates it. MIRROR always has an absolute effect and AMIRROR an
additive effect.
The
MD10612 $MN_MIRROR_TOGGLE = 0 ("Mirror Toggle")
machine data setting can be used to define that the programmed values are evaluated.
A value of 0, as inAMIRROR X0, deactivates the mirroring of the axis, and values not equal
to 0 cause the axis to be mirrored if it is not already mirrored.
It is possible to read or write mirrors component by component independent of machine data
MD10612 $MN_MIRROR_TOGGLE.
A value = 0 means that the axis is not mirrored and a value = 1 means that the axis will
always be mirrored, irrespective of whether it has already been mirrored or not.

$P_NCBFR[0,x,mi] = 1 ; x axis is always mirrored.


$P_NCBFR[0,x,mi] = 0 ; x axis mirror is OFF.

Basic Functions
802 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Axial replacement G58, G59


The translation component of the programmable frame is split into an absolute component
and a component for the total of all additively programmed translations. The absolute
component can be changed using TRANS, CTRANS or by writing the translation components,
in which the additive component is set to zero. G58 changes only the absolute translation
component for the specified axis; the total of additively programmed translations is retained.
G58 X... Y... Z... A... ...
G59 is used for axial overwriting of the additively programmed translations for the specified
axes, which were programmed with ATRANS.
G59 X... Y... Z... A... ...
Example:

TRANS X10 Y10 Z10


ATRANS X5 Y5 ; Total translations X15 Y15 Z10
G58 X20 ; Total translations X25 Y15 Z10
G59 X10 Y10 ; Total translations X30 Y20 Z10

G58 and G59 can be used only if machine data:


MD24000 $MC_FRAME_ADD_COMPONENTS ("Frame components for G58/G59")
is TRUE, otherwise Alarm "18311 Channel %1 Block %2 Frame: instruction not permissible"
is output.
The function can also only be used in conjunction with a configured fine offset for the
programmable frame. If G58 or G59 is used without a configured fine offset, alarm "18312
channel %1 block %2 frame: Fine offset not configured" is output.
The absolute component of the translation is stored in the rough offset component and the
additive translation component is stored in the fine offset component. To this end, the
programmable frame or the fine offset is expanded.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 803
Axes, Coordinate Systems, Frames (K2)
Frames

7UDQVODWLRQ

5RXJKRUDEVROXWH )LQHRUDGGLWLYH
7UDQVODWLRQ 7UDQVODWLRQ

The fine component is transferred on saving the programmable frame in a local frame
variable (LUD or GUD) and on rewriting.
The table below shows the effect of various program commands on the absolute and
additive translation.

Coarse or absolute translation Fine or additive translation


TRANS X10 10 0
ATRANS X10 Unchanged alt_fine + 10
CTRANS(X,10) 10 0
CTRANS() 0 0
CFINE(X,10) 0 10
$P_PFRAME[X,TR] = 10 10 Unchanged
$P_PFRAME[X,FI] = 10 Unchanged 10
G58 X10 10 Unchanged
G59 X10 Unchanged 10

10.5.5.7 Channel-specific system frames

Channel-specific system frames


System frames are only described by system functions, such as PRESET, scratching, zero
offset external and oblique processing. There are up to seven system frames per channel.
The valid system frames in the channel can be defined via machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK (System frames SRAM)
Only system frames required for system functions should be configured, in the interests of
memory space. Per channel, each system frame occupies approx. 1 KB SRAM and approx.
6 KB DRAM. The system frame for PRESET and scratching and the system frame for cycles
are the default. Channel-specific system frames are configured as bit codes, in accordance
with the table below:

Bit Default System frame


0 1 PRESET and scratching
1 0 Zero offset external via system frames

Basic Functions
804 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Bit Default System frame


2 0 TCARR and PAROT with an orientational toolholder
3 0 TOROT and TOFRAME
4 0 Frame for workpiece reference points
5 1 Frame for cycles
6 0 Frame for selection and deselection of transformations
7 0 $P_ISO1FRAME : Frame for G51.1 mirroring (ISO)
8 0 $P_ISO2FRAME : Frame for G68 2DROT (ISO)
9 0 $P_ISO3FRAME : Frame for G68 3DROT (ISO)
10 0 $P_ISO4FRAME: Frame for G51 scale (ISO)
11 0 $P_RELFR: Frame for relative coordinate systems
Example:
$MC_MM_SYSTEM_FRAME_MASK = 'B001101' means that
there are three system frames; one for PRESET, one for PAROT and one for TOROT and
TOFRAME.
The system frame mask is used to define if the corresponding function has a system frame.
With non-configured frames, in certain circumstances the function will be rejected with an
alarm.

System frames in data management


The system frames are stored in the static NC memory and can, therefore, be archived and
reloaded. System frames in data management can be read and written in the program using
the following variables:

System variables Significance


$P_SETFR System frame for PRESET and scratching (SetFrame)
$P_EXTFR System frame for zero offset external (ExtFrame)
$P_PARTFR System frame for TCARR and PAROT (PartFrame)
$P_TOOLFR System frame for TOROT and TOFRAME (ToolFrame)
$P_WPFR System frame for workpiece reference points (Work-Piece-Frame)
$P_CYCFR System frame for cycles (Cycle-Frame)
$P_TRAFRAME System frame for transformations (Transformation Frame)
$P_ISO1FR Frame for G51.1 mirroring (ISO)
$P_ISO2FR Frame for G68 2DROT (ISO)
$P_ISO3FR Frame for G68 3DROT (ISO)
$P_ISO4FR System frame for G51 scale (ISO)
$P_RELFR System frame for relative coordinate systems
All write operations to these frames must be executed using system functions. For cycle
programmers, it has been made possible to write the frames using the above variables.
Attempts to write to a non-configured system frame are rejected with the alarm "Channel %1
block %2 name %3 not defined or option not available".
System frames in the data management are either activated directly with the system function
(TOROT, PAROT, etc.), or with a G500, G54 to G599 instruction.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 805
Axes, Coordinate Systems, Frames (K2)
Frames

Active system frames


The active system frames are the frames, which are active in the main run. An appropriate
current system frame exists for each current system frame in the data management. Only
with the activation of the data management frame are the values taken into account with
regard to the preprocessing.
The following current system frames exist:
● $P_SETFRAME
In the part program, the variable $P_SETFRAME can be used to read and write the
current system frame for PRESET and scratching. The variable returns a zero frame if the
system frame is not configured through MD28082.
● $P_EXTFRAME
In the part program, the variable $P_EXTFRAME can be used to read and write the
current system frame for the zero offset external. The variable returns a zero frame if the
system frame is not configured through MD28082.
● $P_PARTFRAME
In the part program, the variable $P_PARTFRAME can be used to read and write the
current system frame for TCARR and PAROT for toolholders with orientation capability. The
variable returns a zero frame if the system frame is not configured through MD28082.
● $P_TOOLFRAME
In the part program, the variable $P_TOOLFRAME can be used to read and write the
current system frame for TOROT and TOFRAME. The variable returns a zero frame if the
system frame is not configured through MD28082.
● $P_WPFRAME
In the part program, the variable $P_WPFRAME can be used to read and write the
current system frame for setting workpiece reference points. The variable returns a zero
frame if the system frame is not configured through MD28082.
● $P_CYCFRAME
In the part program, the variable $P_CYCFRAME can be used to read and write the
current system frame for cycles. The variable returns a zero frame if the system frame is
not configured through MD28082.
● $P_TRAFRAME
In the part program, the variable $P_TRAFRAME can be used to read and write the
current system frame for transformations. The variable returns a zero frame if the system
frame is not configured through MD28082.
● $P_ISO1FRAME, $P_ISO2FRAME, $P_ISO3FRAME, $P_ISO4FRAME
One can read and write the current system frames for special ISO language commands
in the part program through the variables. The variable returns a zero frame if the system
frame is not configured through MD28082.

Basic Functions
806 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

● $P_RELFRAME
In the part program, the variable $P_RELFRAME can be used to read and write the
current system frame for relative coordinate systems. The variable returns a zero frame if
the system frame is not configured through MD28082.
● $P_ACSFRAME
The currently resulting frame that is defined by the ENS-(ACS) coordinate system, can be
read and written through the $P_ACSFRAME variable.

For MD24030 $MC_FRAME_ACS_SET = 0, the frame is calculated as follows:

$P_ACSFRAME = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME :


$P_ISO1FRAME : $P_ISO2FRAME : $P_ISO3FRAME :
$P_ACTBFRAME : $P_IFRAME :
$P_TOOLFRAME : $P_WPFRAME

For MD24030 $MC_FRAME_ACS_SET = 1, the frame is calculated as follows:

$P_ACSFRAME = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME :


$P_ISO1FRAME : $P_ISO2FRAME : $P_ISO3FRAME :
$P_ACTBFRAME : $P_IFRAME :
$P_TOOLFRAME : $P_WPFRAME : $P_TRAFRAME:
$P_PFRAME : $P_ISO4FRAME
● $P_ACTFRAME
The resulting current complete frame $P_ACTFRAME is now a chain of all system
frames, basic frames, the current settable frame and the programmable frame. The
current frame is always updated whenever a frame component is changed.
The current complete frame is calculated according to the formula below:

$P_ACTFRAME = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME :


$P_ISO1FRAME : $P_ISO2FRAME : $P_ISO3FRAME :
$P_ACTBFRAME : $P_IFRAME :
$P_TOOLFRAME : $P_WPFRAME : $P_TRAFRAME:
$P_PFRAME : $P_ISO4FRAME : $P_CYCFRAME

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 807
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.6 Implicit frame changes

10.5.6.1 Frames and switchover of geometry axes


In the channel, the geometry axis configuration can be changed by switching a
transformation on and off and with the GEOAX() command (R3).
Machine data
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE
can be used to configure, for all channels of the system, whether the current complete frame
is calculated again on the basis of the new geometry axes or whether the complete frame is
deleted.
Four modes can be set via machine data:
● MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 0
The current complete frame is deleted when geometry axes are switched over, when
transformations are selected and deselected, and on GEOAX().
The modified geometry axis configuration is not used until a new frame is activated.
● MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1
The current complete frame is calculated again when the geometry axes are switched
over, and the translations, scales and mirrors of the new geometry axes are effective.
The rotations of the geometry axes, which were programmed before the switchover,
remain effective for the new geometry axes.
The aspects described in the chapter "Frames for selection and deselection of
transformations" are relevant to TRANSMIT, TRACYL and TRAANG.
References:
/FB1/ Function Manual, Basic Functions; Axes, Coordinate System, Frames (K2);
Chapter: Frame for selection and deselection of transformations
● MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 2
The current complete frame is calculated again when the geometry axes are switched
over, and the translations, scales and mirrors of the new geometry axes are effective. If
rotations are active in the current basic frames, the current settable frame or the
programmable frame before the switchover, it is aborted with the alarm "Frame:
Geometry axis switchover not allowed".
The aspects described in the chapter "Frames for selection and deselection of
transformations" are relevant to TRANSMIT, TRACYL and TRAANG.
References:
/FB1/ Function Manual, Basic Functions; Axes, Coordinate System, Frames (K2);
Chapter: Frame for selection and deselection of transformations
● MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 3
The current frame is deleted when selecting and deselecting transformations.
With GEOAX(), the current complete frame is calculated again and the translations,
scales and mirrors of the new geometry axes come into effect.
The rotations of the geometry axes, which were programmed before the switchover,
remain effective for the new geometry axes.

Basic Functions
808 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

The workpiece geometry is described by a coordinate system that is formed by the geometry
axes. A channel axis is assigned to each geometry axis and a machine axis is assigned to
each channel axis. An axial frame exists for each machine axis and for each frame (system
frame, basic frame, settable frame, programmable frame). When a new machine axis is
assigned to a geometry axis, the axial frame components of the machine axis, such as
translations (coarse and fine), scales and mirrors of the appropriate frame, are also applied.
The new geometry in the channel is then generated by the new contour frames resulting
from the new geometry axes (up to three in number).
The current valid frames are calculated again on the geometry axis switchover and a
resulting complete frame is generated. The data management frames are not included
unless they are activated.
Example:
The channel axis is to become a geometry axis x through geo axis substitution. The
substitution is to give the programmable frame a translation component of 10 in the x axis.
The current settable frame is to be retained.
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1

$P_UIFR[1] = CROT(x,10,y,20,z,30) ; Frame is retained after geo axis


substitution.
G54 ; Settable frame becomes active.
TRANS a10 ; Axial offset of a is also substituted.
GEOAX(1, a) ; a becomes x axis;
$P_ACTFRAME=CROT(x,10,
y,20,z,30):CTRANS(x10).

Several channel axes can become geometry axes on a transformation change.


Example:
Channel axes 4, 5 and 6 become the geometry axes of a 5-axis transformation. The
geometry axes are thus all substituted before the transformation. The current frames are
changed when the transformation is activated. The axial frame components of the channel
axes, which become geometry axes, are taken into account when calculating the new WCS.
Rotations programmed before the transformation are retained. The old WCS is restored
when the transformation is deactivated. The most common application will be that the
geometry axes do not change before and after the transformation and that the frames are to
stay as they were before the transformation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 809
Axes, Coordinate Systems, Frames (K2)
Frames

Machine data:
$MN_FRAME_GEOAX_CHANGE_MODE = 1

$MC_AXCONF_CHANAX_NAME_TAB[0] = "CAX"
$MC_AXCONF_CHANAX_NAME_TAB[1] = "CAY"
$MC_AXCONF_CHANAX_NAME_TAB[2] = "CAZ"
$MC_AXCONF_CHANAX_NAME_TAB[3] = "A"
$MC_AXCONF_CHANAX_NAME_TAB[4] = "B"
$MC_AXCONF_CHANAX_NAME_TAB[5] = "C"

$MC_AXCONF_GEOAX_ASSIGN_TAB[0] = 1
$MC_AXCONF_GEOAX_ASSIGN_TAB[1] = 2
$MC_AXCONF_GEOAX_ASSIGN_TAB[2] = 3

$MC_AXCONF_GEOAX_NAME_TAB[0] = "X"
$MC_AXCONF_GEOAX_NAME_TAB[1]="Y"
$MC_AXCONF_GEOAX_NAME_TAB[2] = "Z"

$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=4
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=5
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2]=6

$MC_TRAFO_AXES_IN_1[0] = 4
$MC_TRAFO_AXES_IN_1[1] = 5
$MC_TRAFO_AXES_IN_1[2] = 6
$MC_TRAFO_AXES_IN_1[3] = 1
$MC_TRAFO_AXES_IN_1[4] = 2

Program:

$P_NCBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_CHBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_IFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(z,45)
$P_PFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(x,10,y,20,z,30)

TRAORI ; Geo axis (4,5,6) sets transformer


; $P_NCBFRAME[0] = ctrans(x,4,y,5,z,6,cax,1,cay,2,caz,3)
; $P_ACTBFRAME =ctrans(x,8,y,10,z,12,cax,2,cay,4,caz,6)
; $P_PFRAME =
ctrans(x,4,y,5,z,6,cax,1,cay,2,caz,3):crot(x,10,y,20,z,30)
; $P_IFRAME = ctrans(x,4,y,5,z,6,cax,1,cay,2,caz,3):crot(z,45)

Basic Functions
810 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

TRAFOOF ; Geo axis (1,2,3) sets transformation deactivation


; $P_NCBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
; $P_CHBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
; $P_IFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(z,45)
; $P_PFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(x,10,y,20,z,30)

10.5.6.2 Frame for selection and deselection of transformations


This function is available with NCK 51.00.00 and higher. Transformations TRANSMIT,
TRACYL and TRAANG are supported.
As a rule, the assignment of geometry axes to channel axes changes when selecting and
deselecting transformations. It is not possible to uniquely assign axial frame components to
geometric contour frame components when carrying out transformations, in which rotary
axes become linear axes and vice versa. The contour frame must be conditioned using
special treatment for such non-linear transformations.
The mode, set with machine data
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1 and 2,
is expanded in such a way as to take the above transformations into account.
When selecting transformations, the contour frame is connected to the axial frames. With
transformations TRANSMIT, TRACYL and TRAANG, the virtual geometry axis is subject to
special treatment.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 811
Axes, Coordinate Systems, Frames (K2)
Frames

TRANSMIT

&

Transmit expansions:
The machine data
MD24905 $MC_TRANSMIT_ROT_AX_FRAME_1 = 1
MD24905 $MC_TRANSMIT_ROT_AX_FRAME_2 = 1
can be used to take the axial complete frame of the transmit rotary axis, i.e. the translation,
fine offset, mirroring and scaling, into account in the transformation.
A rotary axis offset can, for example, be entered by compensating the oblique position of a
workpiece in a frame within a frame chain. As a rule, this offset can also be included in the
transformation as an offset in the rotary axis. A c axis offset, as in the figure above, then
leads to corresponding x and y values.
MD24905 $MC_TRANSMIT_ROT_AX_FRAME_1 = 2
MD24905 $MC_TRANSMIT_ROT_AX_FRAME_2 = 2
With this setting, the axial offset of the rotary axis is taken account of in the transformation
up to the SZS. The axial offsets of the rotary axis included in the SZS frames are entered
into the transformation frame as rotations. This setting is only effective if the transformation
frame has been configured.
Frame expansions:
The expansions described below are only valid for the machine data
$MN_FRAME_GEOAX_CHANGE_MODE = 1
$MN_FRAME_GEOAX_CHANGE_MODE = 2
The selection of transformation TRANSMIT produces a virtual geometry axis, coupled by way
of the rotary axis, which is merely included in the contour frame but does not have a
reference to an axial frame. The geometric value results from the rotation of a rotary axis. All
other geometry axes accept their axial components when the transformation is selected.

Basic Functions
812 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Translations:
On selecting transmit, translations of the virtual axis are deleted. Translations of the rotary
axis can be taken into account in the transformation.
Rotations:
Rotations before the transformation are taken over.
Mirrorings:
Mirrorings of the virtual axis are deleted. Mirrorings of the rotary axis can be taken into
account in the transformation.
Scalings:
Scalings of the virtual axis are deleted. Scalings of the rotary axis can be taken into account
in the transformation.
Example:
Machine data for TRANSMIT

; FRAME configurations

$MC_MM_SYSTEM_FRAME_MASK = 'H41' ; TRAFRAME, SETFRAME


$MC_CHSFRAME_RESET_MASK = 'H41' ; Frames are active after Reset.
$MC_CHSFRAME_POWERON_MASK = 'H41' ; Frames are deleted on POWER ON.

$MN_FRAME_GEOAX_CHANGE_MODE = 1 ; Frames are calculated after


switchover of the geo axis.
$MC_RESET_MODE_MASK = 'H4041' ; Basic frame is not deselected after
RESET.
;$MC_RESET_MODE_MASK = 'H41' ; Basic frame is deselected after
RESET.

;$MC_GCODE_RESET_VALUES[7] = 2 ; G54 is the default setting.


$MC_GCODE_RESET_VALUES[7] = 1 ; G500 is the default setting.

$MN_MM_NUM_GLOBAL_USER_FRAMES = 0
$MN_MM_NUM_GLOBAL_BASE_FRAMES = 3

$MC_MM_NUM_USER_FRAMES = 10 ; from 5 to 100


$MC_MM_NUM_BASE_FRAMES = 3 ; from 0 to 8

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 813
Axes, Coordinate Systems, Frames (K2)
Frames

$MN_NCBFRAME_RESET_MASK = 'HFF'
$MC_CHBFRAME_RESET_MASK = 'HFF'

$MN_MIRROR_REF_AX = 0 ; No scaling when mirroring


$MN_MIRROR_TOGGLE = 0
$MN_MM_FRAME_FINE_TRANS = 1 ; Fine offset
$MC_FRAME_ADD_COMPONENTS = TRUE ; G58, G59 is possible

; TRANSMIT is 1st transformer

$MC_TRAFO_TYPE_1 = 256

$MC_TRAFO_AXES_IN_1[0] = 1
$MC_TRAFO_AXES_IN_1[1] = 6
$MC_TRAFO_AXES_IN_1[2] = 3
$MC_TRAFO_AXES_IN_1[3] = 0
$MC_TRAFO_AXES_IN_1[4] = 0

$MA_ROT_IS_MODULO[AX6] = TRUE;

$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=1
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=6
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2]=3

$MC_TRANSMIT_BASE_TOOL_1[0]=0.0
$MC_TRANSMIT_BASE_TOOL_1[1]=0.0
$MC_TRANSMIT_BASE_TOOL_1[2]=0.0

$MC_TRANSMIT_ROT_AX_OFFSET_1 = 0.0
$MC_TRANSMIT_ROT_SIGN_IS_PLUS_1 = TRUE

$MC_TRANSMIT_ROT_AX_FRAME_1 = 1

; TRANSMIT is 2nd transformer

$MC_TRAFO_TYPE_2 = 256

$MC_TRAFO_AXES_IN_2[0] = 1
$MC_TRAFO_AXES_IN_2[1] = 6
$MC_TRAFO_AXES_IN_2[2] = 2

Basic Functions
814 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

$MC_TRAFO_AXES_IN_2[3] = 0
$MC_TRAFO_AXES_IN_2[4] = 0

$MC_TRAFO_GEOAX_ASSIGN_TAB_2[0] = 1
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[1] = 6
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[2] = 2

$MC_TRANSMIT_BASE_TOOL_2[0] = 4.0
$MC_TRANSMIT_BASE_TOOL_2[1] = 0.0
$MC_TRANSMIT_BASE_TOOL_2[2] = 0.0

$MC_TRANSMIT_ROT_AX_OFFSET_2 = 19.0
$MC_TRANSMIT_ROT_SIGN_IS_PLUS_2 = TRUE

$MC_TRANSMIT_ROT_AX_FRAME_2 = 1
Part program:

; Frame settings
N820 $P_UIFR[1] = ctrans(x,1,y,2,z,3,c,4)
N830 $P_UIFR[1] = $P_UIFR[1] : crot(x,10,y,20,z,30)
N840 $P_UIFR[1] = $P_UIFR[1] : cmirror(x,c)
N850
N860 $P_CHBFR[0] = ctrans(x,10,y,20,z,30,c,15)
N870

; Tool selection, clamping compensation, plane selection


N890 T2 D1 G54 G17 G90 F5000 G64 SOFT
N900

;Approach start position


N920 G0 X20 Z10
N930
N940 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,C,15)
N950 setal(61000)
N960 endif
N970 if $P_BFRAME <> $P_CHBFR[0]
N980 setal(61000)
N990 endif
N1000 if $P_IFRAME <>
CTRANS(X,1,Y,2,Z,3,C,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1010 setal(61000)
N1020 endif

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 815
Axes, Coordinate Systems, Frames (K2)
Frames

N1030 if $P_IFRAME <> $P_UIFR[1]


N1040 setal(61000)
N1050 endif
N1060 if $P_ACTFRAME <>
CTRANS(X,11,Y,22,Z,33,C,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1070 setal(61000)
N1080 endif
N1090
N1100 TRANSMIT(2)
N1110
N1120 if $P_BFRAME <> CTRANS(X,10,Y,0,Z,20,CAZ,30,C,15)
N1130 setal(61000)
N1140 endif
N1180 if $P_IFRAME <>
CTRANS(X,1,Y,0,Z,2,CAZ,3,C,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1190 setal(61000)
N1200 endif
N1240 if $P_ACTFRAME <>
CTRANS(X,11,Y,0,Z,22,CAZ,33,C,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1250 setal(61001)
N1260 endif
N1270
N1280
N1290 $P_UIFR[1,x,tr] = 11
N1300 $P_UIFR[1,y,tr] = 14
N1310
N1320 g54
N1330

;Set frame
N1350 ROT RPL=-45
N1360 ATRANS X-2 Y10
N1370

;Four-edge roughing
N1390 G1 X10 Y-10 G41 OFFN=1; allowance 1 mm
N1400 X-10
N1410 Y10
N1420 X10
N1430 Y-10
N1440

Basic Functions
816 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

;Change tool
N1460 G0 Z20 G40 OFFN=0
N1470 T3 D1 X15 Y-15
N1480 Z10 G41
N1490

; Square finishing
N1510 G1 X10 Y-10
N1520 X-10
N1530 Y10
N1540 X10
N1550 Y-10
N1560

; Deselect frame
N2950 m30 N1580 Z20 G40
N1590 TRANS
N1600
N1610 if $P_BFRAME <> CTRANS(X,10,Y,0,Z,20,CAZ,30,C,15)
N1620 setal(61000)
N1630 endif
N1640 if $P_BFRAME <> $P_CHBFR[0]
N1650 setal(61000)
N1660 endif
N1670 if $P_IFRAME <>
TRANS(X,11,Y,0,Z,2,CAZ,3,C,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1680 setal(61000)
N1690 endif
N1730 if $P_ACTFRAME <>
TRANS(X,21,Y,0,Z,22,CAZ,33,C,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1740 setal(61001)
N1750 endif
N1760
N1770 TRAFOOF
N1780
N1790 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,C,15)
N1800 setal(61000)
N1810 endif
N1820 if $P_BFRAME <> $P_CHBFR[0]
N1830 setal(61000)
N1840 endif
N1850 if $P_IFRAME <>

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 817
Axes, Coordinate Systems, Frames (K2)
Frames

TRANS(X,11,Y,2,Z,3,C,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1860 setal(61000)
N1870 endif
N1880 if $P_IFRAME <> $P_UIFR[1]
N1890 setal(61000)
N1900 endif
N1910 if $P_ACTFRAME <>
TRANS(X,21,Y,22,Z,33,C,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1920 setal(61002)
N1930 endif
N1940
N2010 $P_UIFR[1] = ctrans()
N2011 $P_CHBFR[0] = ctrans()
N2020 $P_UIFR[1] = ctrans(x,1,y,2,z,3,c,0)
N2021 G54
N2021 G0 X20 Y0 Z10 C0
N2030 TRANSMIT(1)
N2040 TRANS x10 y20 z30
N2041 ATRANS y200
N2050 G0 X20 Y0 Z10
N2051 if $P_IFRAME <> CTRANS(X,1,Y,0,Z,3,CAY,2)
N2052 setal(61000)
N2053 endif
N2054 if $P_ACTFRAME <> CTRANS(X,11,Y,20,Z,33,CAY,2):CFINE(Y,200)
N2055 setal(61002)
N2056 endif
N2060 TRAFOOF
N2061 if $P_IFRAME <> $P_UIFR[1]
N2062 setal(61000)
N2063 endif
N2064 if $P_ACTFRAME <> CTRANS(X,11,Y,2,Z,33):CFINE(Y,0)
N2065 setal(61002)
N2066 endif

Basic Functions
818 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

TRACYL

&

[
'LDPHWHUG

Tracyl expansions:
The machine data below can be used to take the axial complete frame of the tracyl rotary
axis, i.e. the translation, fine offset, mirroring and scaling, into account in the transformation:
MD24805 $MC_TRACYL_ROT_AX_FRAME_1 = 1
MD24855 $MC_TRACYL_ROT_AX_FRAME_2 = 1
A rotary axis offset can, for example, be entered by compensating the oblique position of a
workpiece in a frame within a frame chain. As a rule, this offset can also be included in the
transformation as an offset in the rotary axis or as a y offset. A c axis offset, as in the figure
above, then leads to corresponding x and y values.
MD24805 $MC_TRACYL_ROT_AX_FRAME_1 = 2
MD24855 $MC_TRACYL_ROT_AX_FRAME_2 = 2
With this setting, the axial offset of the rotary axis is taken account of in the transformation
up to the SZS. The axial offsets of the rotary axis included in the SZS frames are entered
into the transformation frame as offsets on the sheath surface. This setting is only effective if
the transformation frame has been configured.
Frame expansions:
The expansions described below are only valid for the machine data
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 2
The selection of transformation TRANSMIT produces a virtual geometry axis on the sheath
surface, coupled by way of the rotary axis, which is merely included in the contour frame but
does not have a reference to an axial frame. All components of the virtual geometry axis are
deleted. All other geometry axes accept their axial components when the transformation is
selected.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 819
Axes, Coordinate Systems, Frames (K2)
Frames

Translations:
On selecting tracyl, translations of the virtual axis are deleted. Translations of the rotary axis
can be taken into account in the transformation.
Rotations:
Rotations before the transformation are taken over.
Mirrorings:
Mirrorings of the virtual axis are deleted. Mirrorings of the rotary axis can be taken into
account in the transformation.
Scalings:
Scalings of the virtual axis are deleted. Scalings of the rotary axis can be taken into account
in the transformation.
Example:
Machine data for TRACYL:

; FRAME configurations

$MC_MM_SYSTEM_FRAME_MASK = 'H41' ; TRAFRAME, SETFRAME


$MC_CHSFRAME_RESET_MASK = 'H41' ; Frames are active after Reset.
$MC_CHSFRAME_POWERON_MASK = ; Frames are deleted on POWER ON.
'H41'

$MN_FRAME_GEOAX_CHANGE_MODE = ; Frames are calculated after switchover of


1 the geo axis.

$MC_RESET_MODE_MASK = 'H4041' ; Basic frame is not deselected after RESET.


;$MC_RESET_MODE_MASK = 'H41' ; Basic frame is deselected after RESET.

;$MC_GCODE_RESET_VALUES[7] = 2 ; G54 is the default setting.


$MC_GCODE_RESET_VALUES[7] = 1 ; G500 is the default setting.

$MN_MM_NUM_GLOBAL_USER_FRAMES = 0
$MN_MM_NUM_GLOBAL_BASE_FRAMES = 3

$MC_MM_NUM_USER_FRAMES = 10 ; from 5 to 100


$MC_MM_NUM_BASE_FRAMES = 3 ; from 0 to 8

Basic Functions
820 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

$MN_NCBFRAME_RESET_MASK = 'HFF'
$MC_CHBFRAME_RESET_MASK = 'HFF'

$MN_MIRROR_REF_AX = 0 ; No scaling when mirroring


$MN_MIRROR_TOGGLE = 0
$MN_MM_FRAME_FINE_TRANS = 1 ; Fine offset
$MC_FRAME_ADD_COMPONENTS = ; G58, G59 is possible
TRUE

; TRACYL with groove side offset is 3rd transformer

$MC_TRAFO_TYPE_3 = 513; TRACYL

$MC_TRAFO_AXES_IN_3[0] = 1
$MC_TRAFO_AXES_IN_3[1] = 5
$MC_TRAFO_AXES_IN_3[2] = 3
$MC_TRAFO_AXES_IN_3[3] = 2

$MC_TRAFO_GEOAX_ASSIGN_TAB_3[0] = 1
$MC_TRAFO_GEOAX_ASSIGN_TAB_3[1] = 5
$MC_TRAFO_GEOAX_ASSIGN_TAB_3[2] = 3

$MC_TRACYL_BASE_TOOL_1[0] = 0.0
$MC_TRACYL_BASE_TOOL_1[1] = 0.0
$MC_TRACYL_BASE_TOOL_1[2] = 0.0

$MC_TRACYL_ROT_AX_OFFSET_1 = 0.0
$MC_TRACYL_ROT_SIGN_IS_PLUS_1 = TRUE

$MC_TRACYL_ROT_AX_FRAME_1 = 1
Part program:

;Simple traversing test with groove side offset


N450 G603
N460

; Frame settings
N500 $P_UIFR[1] = ctrans(x,1,y,2,z,3,b,4)
N510 $P_UIFR[1] = $P_UIFR[1] : crot(x,10,y,20,z,30)
N520 $P_UIFR[1] = $P_UIFR[1] : cmirror(x,b)
N530

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 821
Axes, Coordinate Systems, Frames (K2)
Frames

N540 $P_CHBFR[0] = ctrans(x,10,y,20,z,30,b,15)


N550
N560 G54
N570

; Continuous-path mode, resurface by grinding selected


N590 G0 x0 y0 z-10 b0 G90 F50000 T1 D1 G19 G641 ADIS=1 ADISPOS=5
N600
N610 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,B,15)
N620 setal(61000)
N630 endif
N640 if $P_BFRAME <> $P_CHBFR[0]
N650 setal(61000)
N660 endif
N670 if $P_IFRAME <>
TRANS(X,1,Y,2,Z,3,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N680 setal(61000)
N690 endif
N700 if $P_IFRAME <> $P_UIFR[1]
N710 setal(61000)
N720 endif
N730 if $P_ACTFRAME <>
TRANS(X,11,Y,22,Z,33,B,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N740 setal(61000)
N750 endif
N760

; Transformation ON
N780 TRACYL(40.)
N790
N800 if $P_BFRAME <> CTRANS(X,10,Y,0,Z,30,CAY,20,B,15)
N810 setal(61000)
N820 endif
N830 if $P_CHBFR[0] <> CTRANS(X,10,Y,0,Z,30,CAY,20,B,15)
N840 setal(61000)
N850 endif
N860 if $P_IFRAME <>
TRANS(X,1,Y,0,Z,3,CAY,2,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N870 setal(61000)
N880 endif
N890 if $P_UIFR[1] <>
TRANS(X,1,Y,0,Z,3,CAY,2,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N900 setal(61000)

Basic Functions
822 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

N910 endif
N920 if $P_ACTFRAME <>
TRANS(X,11,Y,0,Z,33,CAY,22,B,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N930 setal(61001)
N940 endif
N950
N960 $P_UIFR[1,x,tr] = 11
N970 $P_UIFR[1,y,tr] = 14
N980
N990 g54
N1000
N1010 if $P_BFRAME <> CTRANS(X,10,Y,0,Z,30,CAY,20,B,15)
N1020 setal(61000)
N1030 endif
N1040 if $P_BFRAME <> $P_CHBFR[0]
N1050 setal(61000)
N1060 endif
N1070 if $P_IFRAME <>
TRANS(X,11,Y,0,Z,3,CAY,2,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N1080 setal(61000)
N1090 endif
N1100 if $P_IFRAME <> $P_UIFR[1]
N1110 setal(61000)
N1120 endif
N1130 if $P_ACTFRAME <>
TRANS(X,21,Y,0,Z,33,CAY,22,B,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N1140 setal(61001)
N1150 endif
N1160

; Transformation off
N1180 TRAFOOF
N1190
N1200 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,B,15)
N1210 setal(61000)
N1220 endif
N1230 if $P_BFRAME <> $P_CHBFR[0]
N1240 setal(61000)
N1250 endif
N1260 if $P_IFRAME <>
TRANS(X,11,Y,2,Z,3,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N1270 setal(61000)
N1280 endif
N1290 if $P_IFRAME <> $P_UIFR[1]

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 823
Axes, Coordinate Systems, Frames (K2)
Frames

N1300 setal(61000)
N1310 endif
N1320 if $P_ACTFRAME <>
TRANS(X,21,Y,22,Z,33,B,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N1330 setal(61002)
N1340 endif
N1350
N1360 G00 x0 y0 z0 G90
N1370
N1380 m30

TRAANG

Frame expansions:
The expansions described below are only valid for the machine data
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 2
Translations:
On selecting traang, translations of the virtual axis are retained.
Rotations:
Rotations before the transformation are taken over.
Mirrorings:
Mirrorings of the virtual axis are taken over.
Scalings:
Scalings of the virtual axis are taken over.

Basic Functions
824 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Example:
Machine data for TRAANG:

; FRAME configurations

$MC_MM_SYSTEM_FRAME_MASK = 'H1' ; SETFRAME


$MC_CHSFRAME_RESET_MASK = 'H41' ; Frames are active after RESET.
$MC_CHSFRAME_POWERON_MASK = ; Frames are deleted on POWER ON.
'H41'

$MN_FRAME_GEOAX_CHANGE_MODE = ; Frames are calculated after switchover of


1 the geo axis.

$MC_RESET_MODE_MASK = 'H4041' ; Basic frame is not deselected after RESET.


;$MC_RESET_MODE_MASK = 'H41' ; Basic frame is deselected after RESET.

;$MC_GCODE_RESET_VALUES[7] = 2 ; G54 is the default setting.


$MC_GCODE_RESET_VALUES[7] = 1 ; G500 is the default setting.

$MN_MM_NUM_GLOBAL_USER_FRAMES = 0
$MN_MM_NUM_GLOBAL_BASE_FRAMES = 3

$MC_MM_NUM_USER_FRAMES = 10 ; from 5 to 100


$MC_MM_NUM_BASE_FRAMES = 3 ; from 0 to 8

$MN_NCBFRAME_RESET_MASK = 'HFF'
$MC_CHBFRAME_RESET_MASK = 'HFF'

$MN_MIRROR_REF_AX = 0 ; No scaling when mirroring


$MN_MIRROR_TOGGLE = 0
$MN_MM_FRAME_FINE_TRANS = 1 ; Fine offset
$MC_FRAME_ADD_COMPONENTS = ; G58, G59 is possible
TRUE

; TRAANG is 1st transformer

$MC_TRAFO_TYPE_1 = 1024

$MC_TRAFO_AXES_IN_1[0] = 4 ; Oblique axis


$MC_TRAFO_AXES_IN_1[1] = 3 ; Axis is parallel to z
$MC_TRAFO_AXES_IN_1[2] = 2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 825
Axes, Coordinate Systems, Frames (K2)
Frames

$MC_TRAFO_AXES_IN_1[3] = 0
$MC_TRAFO_AXES_IN_1[4] = 0

$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=4
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=2
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2]=3

$MC_TRAANG_ANGLE_1 = 85.
$MC_TRAANG_PARALLEL_VELO_RES_1 = 0.
$MC_TRAANG_PARALLEL_ACCEL_RES_1 = 0.

$MC_TRAANG_BASE_TOOL_1[0] = 0.0
$MC_TRAANG_BASE_TOOL_1[1] = 0.0
$MC_TRAANG_BASE_TOOL_1[2] = 0.0

; TRAANG is 2nd transformer

$MC_TRAFO_TYPE_2 = 1024

$MC_TRAFO_AXES_IN_2[0] = 4
$MC_TRAFO_AXES_IN_2[1] = 3
$MC_TRAFO_AXES_IN_2[2] = 0
$MC_TRAFO_AXES_IN_2[3] = 0
$MC_TRAFO_AXES_IN_2[4] = 0

$MC_TRAFO_GEOAX_ASSIGN_TAB_2[0] = 4
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[1] = 0
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[2] = 3

$MC_TRAANG_ANGLE_2 = -85.
$MC_TRAANG_PARALLEL_VELO_RES_2 = 0.2
$MC_TRAANG_PARALLEL_ACCEL_RES_2 = 0.2

$MC_TRAANG_BASE_TOOL_2[0] = 0.0
$MC_TRAANG_BASE_TOOL_2[1] = 0.0
$MC_TRAANG_BASE_TOOL_2[2] = 0.0

Basic Functions
826 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Part program:

; Frame settings
N820 $P_UIFR[1] = ctrans(x,1,y,2,z,3,b,4,c,5)
N830 $P_UIFR[1] = $P_UIFR[1] : crot(x,10,y,20,z,30)
N840 $P_UIFR[1] = $P_UIFR[1] : cmirror(x,c)
N850
N860 $P_CHBFR[0] = ctrans(x,10,y,20,z,30,b,40,c,15)
N870

; Tool selection, clamping compensation, plane selection


N890 T2 D1 G54 G17 G90 F5000 G64 SOFT
N900

;Approach start position


N920 G0 X20 Z10
N930
N940 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,B,40,C,15)
N950 setal(61000)
N960 endif
N970 if $P_BFRAME <> $P_CHBFR[0]
N980 setal(61000)
N990 endif
N1000 if $P_IFRAME <>
TRANS(X,1,Y,2,Z,3,B,4,C,5):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1010 setal(61000)
N1020 endif
N1030 if $P_IFRAME <> $P_UIFR[1]
N1040 setal(61000)
N1050 endif
N1060 if $P_ACTFRAME <>
TRANS(X,11,Y,22,Z,33,B,44,C,20):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1070 setal(61000)
N1080 endif
N1090
N1100 TRAANG(,1)
N1110
N1120 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,CAX,10,B,40,C,15)
N1130 setal(61000)
N1140 endif
N1150 if $P_BFRAME <> $P_CHBFR[0]
N1160 setal(61000)
N1170 endif

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 827
Axes, Coordinate Systems, Frames (K2)
Frames

N1180 if $P_IFRAME <>


CTRANS(X,1,Y,2,Z,3,CAX,1,B,4,C,5):CROT(X,10,Y,20,Z,30):CMIRROR(X,CAX,C)
N1190 setal(61000)
N1200 endif
N1210 if $P_IFRAME <> $P_UIFR[1]
N1220 setal(61000)
N1230 endif
N1240 if $P_ACTFRAME <>
TRANS(X,11,Y,22,Z,33,CAX,11,B,44,C,20):CROT(X,10,Y,20,Z,30):CMIRROR(X,CAX,C)
N1250 setal(61001)
N1260 endif
N1270
N1280
N1290 $P_UIFR[1,x,tr] = 11
N1300 $P_UIFR[1,y,tr] = 14
N1310
N1320 g54
N1330

;Set frame
N1350 ROT RPL=-45
N1360 ATRANS X-2 Y10
N1370

;Four-edge roughing
N1390 G1 X10 Y-10 G41 OFFN=1; allowance 1 mm
N1400 X-10
N1410 Y10
N1420 X10
N1430 Y-10
N1440

;Change tool
N1460 G0 Z20 G40 OFFN=0
N1470 T3 D1 X15 Y-15
N1480 Z10 G41
N1490

; Square finishing
N1510 G1 X10 Y-10
N1520 X-10
N1530 Y10

Basic Functions
828 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

N1540 X10
N1550 Y-10
N1560

; Deselect frame
N1580 Z20 G40
N1590 TRANS
N1600
N1610 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,CAX,10,B,40,C,15)
N1620 setal(61000)
N1630 endif
N1640 if $P_BFRAME <> $P_CHBFR[0]
N1650 setal(61000)
N1660 endif
N1670 if $P_IFRAME <>
TRANS(X,11,Y,14,Z,3,CAX,1,B,4,C,5):CROT(X,10,Y,20,Z,30):CMIRROR(X,CAX,C)
N1680 setal(61000)
N1690 endif
N1700 if $P_IFRAME <> $P_UIFR[1]
N1710 setal(61000)
N1720 endif
N1730 if $P_ACTFRAME <>
TRANS(X,21,Y,34,Z,33,CAX,11,B,44,C,20):CROT(X,10,Y,20,Z,30):CMIRROR(X,CAX,C)
N1740 setal(61001)
N1750 endif
N1760
N1770 TRAFOOF
N1780
N1790 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,B,40,C,15)
N1800 setal(61000)
N1810 endif
N1820 if $P_BFRAME <> $P_CHBFR[0]
N1830 setal(61000)
N1840 endif
N1850 if $P_IFRAME <>
TRANS(X,1,Y,14,Z,3,B,4,C,5):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1860 setal(61000)
N1870 endif
N1880 if $P_IFRAME <> $P_UIFR[1]
N1890 setal(61000)
N1900 endif
N1910 if $P_ACTFRAME <>
TRANS(X,11,Y,34,Z,33,B,44,C,20):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1920 setal(61002)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 829
Axes, Coordinate Systems, Frames (K2)
Frames

N1930 endif
N1940
N1950 m30

10.5.6.3 Adapting active frames


The geometry axis configuration can change during program execution or on RESET.
The number of available geometry axes can vary from zero to three. With unavailable
geometry axes, components in the active frames (e.g. rotations) can lead to the active
frames for this axis configuration becoming invalid. This is indicated by the alarms below:
Channel %1 block %2 rotation programmed for non-existent geometry axis
This alarm remains present until the frames have been changed accordingly.
The machine data below can be used to switch on the automatic adaptation of active frames,
thus preventing alarm 16440:
MD24040 $MC_FRAME_ADAPT_MODE
Bitmask for adapting the active frames with reference to the axis constellation.
The following settings apply:

Bit 0: Rotations in active frames, which rotate coordinate axes with no geometry
axes, are deleted from the active frames.
Bit 1: Shear angles in the active frames are orthogonalized.
Bit 2: Scalings of all geometry axes in the active frames are set to value 1.
With machine data setting
MD24040 $MC_FRAME_ADAPT_MODE = 1,
all rotations in the active frames, which could produce coordinate axis movements for non-
existent geometry axes, are deleted.
The data management frames are not changed. Only the possible rotations are applied
when the data management frames are activated.
Example:
No y axis exists:
MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB[0] = 1
MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB[1] = 0
MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB[2] = 3
$P_UIFR[1] = crot(x,45,y,45,z,45)

N390 G54 G0 X10 z10 f10000

if $P_IFRAME <> crot(y,45) ; Only the rotation about y is taken over.


setal(61000)
endif

Basic Functions
830 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.7 Predefined frame functions

10.5.7.1 Inverse frame


To round off the frame arithmetic, the part program provides a function which calculates the
inverse frame from another frame. The chaining between a frame and its inverse frame
always produces a zero frame.
FRAME INVFRAME( FRAME )
Frame inversion is an aid for coordinate transformations. Measuring frames are usually
calculated in the WCS. If you should wish to transform this calculated frame into another
coordinate system, i.e. the calculated frame should be entered into any desired frame within
the frame chain, the calculations below should be used.
The new complete frame is a chain of the old complete frame and the calculated frame.

$P_ACTFRAME = $P_ACTFRAME : $AC_MEAS_FRAME


The new frame in the frame chain is therefore:

Target frame is $P_SETFRAME:


$P_SETFRAME = $P_ACTFRAME : $AC_MEAS_FRAME : INVFRAME($P_ACTFRAME) :
$P_SETFRAME
Target frame is nth channel basic frame $P_CHBFRAME[n]:

n = 0: TMP = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME : $P_NCBFRAME[0..k]


n <> 0: TMP = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME :
$P_NCBFRAME[0..k] : $P_CHBFRAME[0..n-1]
k = $MN_MM_NUM_GLOBAL_BASE_FRAMES
$P_CHBFRAME[n] = INVFRAME(TMP) : $P_ACTFRAME : $AC_MEAS_FRAME :
INVFRAME($P_ACTFRAME) : TMP : $P_CHBFRAME[n]
Target frame is $P_IFRAME:

TMP = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME : $P_BFRAME


$P_IFRAME = INVFRAME(TMP) : $P_ACTFRAME : $AC_MEAS_FRAME :
INVFRAME($P_ACTFRAME) : TMP : $P_IFRAME
Application example:
A frame calculated, for example, via a measuring function, must be entered in the current
SETFRAME such that the new complete frame is a chain of the old complete frame and the
measurement frame. The SETFRAME is calculated accordingly by means of frame inversions.

DEF INT RETVAL


DEF FRAME TMP

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 831
Axes, Coordinate Systems, Frames (K2)
Frames

$TC_DP1[1,1]=120 ; Type
$TC_DP2[1,1]=20.;0
$TC_DP3[1,1]= 10. ; (z) length compensation vector
$TC_DP4[1,1]= 0. ; (y)
$TC_DP5[1,1]= 0. ; (x)
$TC_DP6[1,1]= 2. ; Radius

T1 D1

g0 x0 y0 z0 f10000

G54

$P_CHBFRAME[0] = crot(z,45)

$P_IFRAME[x,tr] = -sin(45)
$P_IFRAME[y,tr] = -sin(45)

$P_PFRAME[z,rt] = -45

; Measure corner with four measuring points


$AC_MEAS_VALID = 0

; Approach measuring point 1


g1 x-1 y-3

; Store measuring point 1


$AC_MEAS_LATCH[0] = 1

; Approach measuring point 2


g1 x5 y-3

; Store measuring point 2


$AC_MEAS_LATCH[1] = 1

; Approach measuring point 3


g1 x-4 y4

; Store measuring point 3


$AC_MEAS_LATCH[2] = 1

Basic Functions
832 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

; Approach measuring point 4


g1 x-4 y1

; Store measuring point 4


$AC_MEAS_LATCH[3] = 1

; Set position setpoint of the corner


$AA_MEAS_SETPOINT[x] = 0
$AA_MEAS_SETPOINT[y] = 0
$AA_MEAS_SETPOINT[z] = 0

; Define setpoint angle of intersection


$AC_MEAS_CORNER_SETANGLE = 90
$AC_MEAS_WP_SETANGLE = 30

; Measuring plane is G17


$AC_MEAS_ACT_PLANE = 0

;Select tool
$AC_MEAS_T_NUMBER = 1
$AC_MEAS_D_NUMBER = 1

; Set measuring type on corner 1


$AC_MEAS_TYPE = 4

; Start measuring process


RETVAL = MEASURE()

if RETVAL <> 0
setal(61000 + RETVAL)
endif

if $AC_MEAS_WP_ANGLE <> 30
setal(61000 + $AC_MEAS_WP_ANGLE)
endif

if $AC_MEAS_CORNER_ANGLE <> 90
setal(61000 + $AC_MEAS_CORNER_ANGLE)
endif

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 833
Axes, Coordinate Systems, Frames (K2)
Frames

; Transform measured frame and write in accordance with $P_SETFRAME in such a way
; that a complete frame is produced, as a result of the old complete frame
; being chained with the measuring frame.

$P_SETFRAME = $P_ACTFRAME : $AC_MEAS_FRAME : INVFRAME($P_ACTFRAME) :


$P_SETFRAME

; Describe system frames in data management


$P_SETFR = $P_SETFRAME

; Approach the corner


g1 x0 y0

; Retract the rectangle rotated about 30 degrees


g1 x10
y10
x0
y0

m30

10.5.7.2 Additive frame in frame chain


Measurements on the workpiece or calculations in the part program and cycles generally
produce a frame that is applied additively to the current complete frame. The WCS and thus
the programming zero must, therefore, be displaced and possibly rotated. This measured
frame is available as a temporary frame and not yet actively included in the frame chain. This
function is used to calculate and possible activate this frame:
INT ADDFRAME(FRAME,STRING)

Programming

Parameter 1: Type: FRAME Additively measured or calculated frame

Parameter 2: Type: STRING Strings for current frames:


"$P_CYCFRAME", "$P_ISO4FRAME",
"$P_PFRAME", "$P_WPFRAME",
"$P_TOOLFRAME", "$P_IFRAME",
"$P_CHBFRAME[0..16]", "$P_NCBFRAME[0..16]",
"$P_ISO1FRAME", "$P_ISO2FRAME",
"$P_ISO3FRAME",
"$P_EXTFRAME", "$P_SETFRAME"
"$P_PARTFRAME"

Basic Functions
834 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Strings for data management frames:


"$P_CYCFR", "$P_ISO4FR, "$P_TRAFR",
"$P_WPFR",
"$P_TOOLFR", "$P_UIFR[0..99]",
"$P_CHBFR[0..16]", "$P_NCBFR[0..16]",
"$P_ISO1FR, "$P_ISO2FR, "$P_ISO3FR,
"$P_EXTFR", "$P_SETFR", "$P_PARTFR"

Function value: Type: INT Value: Significance:


0 OK
1 Specified target (string) is wrong
2 Target frame is not configured
3 Rotation in frame is not permitted
The ADDFRAME() function calculates the target frame, which is specified by the STRING.
The target frame is calculated in such a way that the new complete frame appears as a
chain of the old complete frame and the transferred frame, e.g.:
ERG = ADDFRAME(TMPFRAME,"$P_SETFRAME")
The new complete frame is calculated to be:
$P_ACTFRAMEnew = $P_ACTFRAMEold : TMPFRAME
If a current frame has been specified as a target frame, then the new complete frame
becomes active at the preprocessing stage. If the target frame is a data management frame,
then the frame is not operative until it is explicitly activated in the part program.
The function does not set any alarms, but returns the error codes via the return value. The
cycle can react according to the error codes.

10.5.8 Functions

10.5.8.1 Setting zeros, workpiece measuring and tool measuring


PRESET is achieved using HMI operator actions or measuring cycles. The calculated frame
can be written to system frame SETFRAME. The position setpoint of an axis in the WCS can
be altered when the actual-value memory is preset.
"Scratching" means workpiece and tool measuring. The position of the workpiece in relation
to an edge, a corner or a hole can be measured. To determine the zero position of the
workpiece or the hole, position setpoints can be added to the measured positions in the
WCS. The resultant offsets can be entered in a selected frame. In tool measuring, the length
or radius of a tool can be measured using a measured reference part.
Measurements can be taken via operator actions or measuring cycles. Communication with
the NCK takes place via predefined system variables. In the NCK, the calculation is made by
using a HMI operator action to activate a PI service, or by using a part-program command
from the measuring cycles. A tool and a plane can be selected as a basis for the calculation.
The calculated frame is entered in the result frame.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 835
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.8.2 Zero offset external via system frames

Zero offset via PLC or part program


The amount of the external zero offset can be specified through HMI and PLC via BTSS or
programmed in the part program via the axis-specific system variable $AA_ETRANS
[<Axis>] = <Value>.
Activation
The activation of the external zero offset takes place through the interface signal:
DB31, ... DBX3.0 (accept external zero offset)
Behavior
After the activation the respective specified axis-specific amount of the external zero offset is
traversed outside for each axis with the next possible traversing block.
Next possible means that enough dynamic reserves must be available for the respective axis
for traversing the zero offset. If the axis is traversed in the next traversing block after
activation owing to its programming with the maximum speed, dynamic reserve is no longer
available for traversing the external zero offset.
Together with the continuous path mode G64 the traversing of the offset can stretch over
several part program blocks.

Zero offset via system frame


The external zero offset can then also be managed and activated by the functionality
described above via the system frame $P_EXTFRAME .
Configuring
The configuring of the external zero offset is done via the system frame $P_EXTFRAME via
bit1 = 1 in the machine data: MD28082 $MC_MM_SYSTEM_FRAME_MASK = 'B0010'
The amount for the external zero offset can be specified manually via the HMI user interface
and the PLC user program via BTSS or programmed in the part program via the axial system
variable $AA_ETRANS[<Axis>].
Activation
The activation of the external zero offset takes place through the interface signal:
DB31, ... DBX3.0 (accept external zero offset)
Behavior
Upon activation of the external zero offset the traversing movements of all axes, except
command and PLC axes, are stopped immediately and the advance is reorganized. The
rough offset of the current system frame and of the system frame in data management is set
to the value of the axial system variable $AA_ETRANS[<axis>]. Thereafter, the offset is
traversed first and then the interrupted movement is continued.

Basic Functions
836 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Behavior for incremental dimension


In case of active incremental dimension G91 and machine data:
MD42440 $MC_FRAME_OFFSET_INCR_PROG (zero offset in frames) = 0
traversing the offset is done in the scope of the external zero offset via system frame,
despite opposite configuring of the machine data, with the approach block, although it is
specified by a frame.

Note
The external zero offset always acts absolutely.

10.5.8.3 Toolholder

Translations
With kinematics of type P and M the selection of a toolholder activates an additive frame
(table offset of the orientational toolholder), which takes into account the zero point offset as
a result of the rotation of the table. The zero offset is entered in a system frame
($P_PARTFR). In this case the translatory component of this frame is overwritten. Other
contents of this frame remain intact.
To be able to use this system frame, the bit 2 must be set in the machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK.
Alternatively, there is the option to enter this offset into the basic frame identified by machine
data
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER.
This option is available in the interests of compatibility with older software versions.
It is not recommended for use with new systems.
A frame offset as a result of a toolholder change becomes effective immediately on selection
of TCARR=.... A change in the tool length, on the other hand, only becomes effective
immediately if a tool is active.
A frame rotation does not take place on activation and a rotation which is already active is
not changed. As in case T (only the tool can be rotated), the position of the rotary axes used
for the calculation is dependent on the G code TCOFR/TCOABS and determined from the
rotation component of an active frame or from the entries $TC_CARRn. Activation of a frame
changes the position in the workpiece coordinate system accordingly, without compensating
movement by the machine itself.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 837
Axes, Coordinate Systems, Frames (K2)
Frames

The ratios are shown in the figure below:

2ULJLQDOSRVLWLRQRIWKH
FRRUGLQDWHV\VWHP

2ULJLQDOSRVLWLRQRIWDEOH
3RVLWLRQRIFRRUGLQDWHV\VWHP
DIWHU3$527

3RVLWLRQRIFRRUGLQDWHV\VWHP
DIWHU7&$55

3RVLWLRQRIWDEOH
DIWHUURWDWLRQ

Figure 10-24 Frame on activation of a rotary table with TCARR

With kinematics of type M (tool and table are each rotary around one axis), the activation of
a toolholder with TCARR simultaneously produces a corresponding change in the effective
tool length (if a tool is active) and the zero offset.

Rotations
Depending on the machining task, it is necessary to take into account not only a zero offset
(whether as frame or as tool length) when using a rotary toolholder or table, but also a
rotation. However, the activation of an orientational toolholder never leads directly to a
rotation of the coordinate system.
If only the tool can be rotated, a frame can be defined for it using TOFRAME or TOROT.
With rotary tables (kinematics types P and M), activation with TCARR similarly does not lead
to an immediate rotation of the coordinate system, i.e. even though the zero point of the
coordinate system is offset relative to the machine, while remaining fixed relative to the zero
point of the workpiece, the orientation remains unchanged in space.
If the coordinate system needs to be fixed relative to the workpiece, i.e. not only offset
relative to the original position but also rotated according to the rotation of the table, then
PAROT can be used to activate such a rotation in a similar manner to the situation with a
rotary tool.
With PAROT, the translations, scalings and mirroring in the active frame are retained, but the
rotation component is rotated by the rotation component of an orientational toolholder
corresponding to the table.
Up to and including SW P6.1, the rotation activated by PAROT is calculated in the
programmable frame ($P_PFRAME), thus changing its rotation component.

Basic Functions
838 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

With SW P6.2 and higher, the entire programmable frame remains unchanged, including its
rotation component.
The rotation component, which describes the rotation of the tool table, is then entered into
system frame $PARTFR, if bit 2 of machine data
MD28082 $MC_MM_SYSTEM_FRAME_MASK
is set.
Alternatively, the basic frame described in machine data
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER
can also be used.
As with the note made in the description of the table offset, the second alternative here is not
recommended for use with new systems.
The rotation component of the part frame can be deleted with PAROTOF , independently of
whether this frame is found in a basic or a system frame.
The translation component is deleted when a toolholder, which does not produce an offset, is
activated or a possibly active orientational toolholder is deselected with TCARR=0.
PAROT or TOROT take into account the overall orientation change in cases where the table or
the tool are oriented with two rotary axes. With mixed kinematics only the corresponding
component caused by a rotary axis is considered. It is thus possible, for example, when
using TOROT, to rotate a workpiece such that an oblique plane lies parallel to the X-Y plane
fixed in space, whereby rotation of the tool must be taken into account in machining where
any holes to be drilled, for example, are not perpendicular to this plane.
Example:
On a machine, the rotary axis of the table points in the positive Y direction. The table is
rotated by +45 degrees. PAROT defines a frame, which similarly describes a rotation of 45
degrees about the Y axis. The coordinate system is not rotated relative to the actual
environment (marked in the figure with "Position of the coordinate system after TCARR"), but
is rotated by -45 degrees relative to the defined coordinate system (position after PAROT). If
this coordinate system is defined with ROT Y-45, for example, and if the toolholder is then
selected with active TCOFR, an angle of +45 degrees will be determined for the rotary axis of
the toolholder.
Language command PAROT is not rejected if no orientational toolholder is active. However,
such a call then produces no frame changes.

Machining in direction of tool orientation


Particularly on machines with tools that can be oriented, traversing should take place in the
tool direction (typically, when drilling) without activating a frame (e.g. using TOFRAME or
TOROT), on which one of the axes points in the direction of the tool. This is also a problem if,
when carrying out oblique machining operations, a frame defining the oblique plane is active,
but the tool cannot be set exactly perpendicularly because an indexed toolholder (Hirth tooth
system) prevents free setting of the tool orientation. In these cases it is then necessary -
contrary to the actually requested motion perpendicular to the plane - to drill in tool direction,
as the drill would otherwise not be guided in the direction of its longitudinal axis, which
among other things would lead to breaking of the drill.
The end point of such a motion is programmed with MOVT= ....
The programmed value is effective incrementally in the tool direction as standard.
The positive direction is defined from the tool tip to the tool adapter. The content of MOVT is
thus generally negative for the infeed motion (when drilling), and positive for the retraction
motion. This corresponds to the situation with normal paraxial machining, e.g. with G91 Z
....

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 839
Axes, Coordinate Systems, Frames (K2)
Frames

Instead of MOVT= ... it is also possible to write MOVT=IC( ...) if it is to be plainly visible
that MOVT is to function incrementally. There is no functional difference between the two
forms.
If the motion is programmed in the form MOVT=AC( ...), MOVT functions absolutely.
In this case a plane is defined, which runs through the current zero point, and whose surface
normal vector is parallel to the tool orientation. MOVT then gives the position relative to this
plane (see figure). The reference plane is only used to calculate the end position. Active
frames are not affected by this internal calculation.

$X[LOLDU\SODQH

0297 $& 

Programming with MOVT is independent of the existence of a toolholder that can be oriented.
The direction of the motion is dependent on the active plane.
It runs in the directions of the vertical axes, i.e. with G17 in Z direction, with G18 in Y
direction and with G19 in X direction. This applies both where no orientational toolholder is
active and for the case of an orientational toolholder without rotary tool or with a rotary tool in
its basic setting.
MOVT acts similarly for active orientation transformation (3-4-5-axis transformation).
If in a block with MOVT the tool orientation is changed simultaneously (e.g. active 5-axis
transformation by means of simultaneous interpolation of the rotary axes), the orientation at
the start of the block is decisive for the direction of movement of MOVT.
With an active 5-axis transformation, the path of the tool center point (TCP) is not affected by
the change of orientation, i.e. the path remains a straight line and its direction is determined
by the tool orientation at the start of the block.
If MOVT is programmed, linear or spline interpolation must be active (G0,G1, ASPLINE,
BSPLINE, CSPLINE). Otherwise, an alarm is produced.
If a spline interpolation is active, the resultant path is generally not a straight line, since the
end point calculated by MOVT is treated as if it had been programmed explicitly with X, Y, Z.
A block with MOVT must not contain any programming of geometry axes (alarm 14157).

Basic Functions
840 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Definition of frame rotations with solid angles


Where a frame is to be defined to describe a rotation around more than one axis, this is
achieved through chaining individual rotations. A new rotation is hereby always performed in
the already rotated coordinate system.
This also applies to programming in a block e.g. with ROT X... Y... Z...,
(the sequence of rotations is defined by machine data:
MD10600 $MN_FRAME_ANGLE_INPUT_MODE
and is independent of the sequence of the axis letters in the block)
and when constructing a frame in multiple blocks, e.g. in the format:

N10 ROT Y...


N20 AROT X...
N30 AROT Z...

In workpiece drawings, oblique surfaces are frequently described by way of solid angles, i.e.
the angles, which the intersection lines of the oblique plane form with the main planes (X-Y,
Y-Z, Z-X planes) (see figure). The machine operator is not expected to convert these solid
angles into the angles of rotation of a chaining of individual rotations.

2EOLTXHSODQH

\
[

For this reason, the language commands ROTS, AROTS and CROTS are used, with which the
rotations can be immediately described as solid angles.
The orientation of a plane in space is defined unambiguously by specifying two solid angles.
The third solid angle is derived from the first two. Therefore, a maximum of 2 solid angles
may be programmed, e.g. in the form ROTS X10 Y15. If a third solid angle is specified, an
alarm will be triggered.
It is permissible to specify a single solid angle. The rotations which are performed with ROTS
or AROTS in this case are identical to those for ROT and AROT.
An expansion of the existing functionality arises only in cases where exactly two solid angles
are programmed.
The two programmed axes define a plane, the non-programmed axis defines the related
third axis of a right-hand coordinate system. Which axis is first and which second is then
unambiguously defined for both programmed axes (the definition corresponds to those found
in the plane definition of G17/G18/G19). The angle programmed with the axis letter of an
axis of the plane then specifies the axis, around which the other axis of the plane must be
rotated in order to move this into the line of intersection, which the rotated plane forms with
the plane surrounded by the other and the third axis. This definition ensures that, in the case

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 841
Axes, Coordinate Systems, Frames (K2)
Frames

that one of the two programmed angles is towards zero, the defined plane enters the plane,
which is created if only one axis is programmed (e.g. with ROT or AROT).
The diagram shows an example where X and Y are programmed. Y here gives the angle, by
which the X axis must rotate around the Y axis to bring the X axis to the line of intersection
formed by the oblique plane and the X-Z plane. The same principle applies for the
programmed value of X.

Note
In the shown position of the oblique plane the value of Y is positive, that of X on the other
hand negative.

The specification of the solid angle does not define the orientation of the two-dimensional
coordinate system within the plane (i.e. the angle of rotation around the surface normal
vector). The position of the coordinate system is thus determined so that the rotated first axis
lies in the plane, which is surrounded by the first and third axes of the non-rotated coordinate
system.
This means that
● When programming X and Y the new X-axis lies in the old Z-X plane.
● When programming Z and X the new Z-axis lies in the old Y-Z plane.
● When programming Y and Z the new Y-axis lies in the old X-Y plane.
If the required coordinate system does not correspond to this basic setting, then an
additional rotation must be performed with AROT....
On programming the solid angles, they are converted into the equivalent RPY or Euler
angles, depending on machine data:
MD10600 $MN_FRAME_ANGLE_INPUT_MODE.
These then appear also in the display.

Frame rotation in tool direction


With the language command TOFRAME, which also existed in older software versions, it is
possible to define a frame whose Z axis points in the tool direction.
An already programmed frame is then overwritten by a frame, which describes a pure
rotation. Any zero offsets, mirrorings or scalings existing in the previously active frame are
deleted.
This response is sometimes interfering. It is often particularly practical to retain a zero offset,
with which the reference point in the workpiece is defined.
The language command TOROT is then also used. This command overwrites only the
rotation component in the programmed frame and leaves the remaining components
unchanged. The rotation defined with TOROT is the same as that defined with TOFRAME.
TOROT is, like TOFRAME, independent of the availability of an orientational toolholder.
This language command is also especially useful for 5-axis transformations.
The new language command TOROT ensures consistent programming with active
orientational toolholders for each kinematics type.

Basic Functions
842 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

TOFRAME or TOROT defines frames whose Z direction points in the tool direction. This
definition is suitable for milling, where G17 is usually active. However, particularly with
turning or, more generally, when G18 or G19 is active, it is desirable that frames, which will
be aligned on the X or Y axis, can be defined. As a result of this, the G codes below are
newly introduced into G code group 53:

TOFRAMEX
TOFRMAEY
TOFRAMEZ
TOROTX
TOROTY
TOROTZ
These G codes enable corresponding frames to be defined. The functions of TOFRAME and
TOFRAMEZ or of TOROT and TOROTZ are identical to one another.
With software version P6 and higher, there is the option to write frames produced by TOROT
or TOFRAME into their own system frame ($P_TOOLFR).
For this, bit 3 must be set in machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK.
The programmable frame is then retained unchanged.
When programming TOROT or TOFRAME, etc. response is identical, with or without a system
frame. Differences occur when the programmable frame is processed further elsewhere.
In new systems, it is recommended that only the intended system frame is used for frames
produced by G codes in group 53.
Example:
TRANS is programmed after TOROT. TRANS without specified parameters deletes the
programmable frame. In the variant without a system frame, this also deletes the frame
component of the programmable frame produced by TOROT, but if the TOROT component is
in the system frame, it is retained.
TOROT or TOFRAME, etc. are disabled with language command TOROTOF. TOROTOF deletes
the entire system frame $P_TOOLFR. If the programmable frame (old variant) and not the
system frame is described by commands TOFRAME, etc. TOROT only deletes the rotation
component and leaves the remaining frame components unchanged.
If a rotating frame is already active before language command TOFRAME or TOROT is
activated, a request is often made that the newly defined frame should deviate as little as
possible from the old frame. This is the case, for example, if a frame definition needs to be
modified slightly because the tool orientation cannot be set freely on account of Hirth-toothed
rotary axes. The language commands uniquely define the Z direction of the new frame.
In previous software versions, machine data:
MD21110 $MC_X_AXIS_IN_OLD_X_Z_PLANE
can be used to choose between two variants for the position of the X-axis and Y-axis.
However, in both cases there is no reference to the previously active frame.
Setting data
SD42980 $SC_TOFRAME_MODE
is, therefore, introduced, which can be used to control the response of TOFRAME and TOROT.
It can accept values of 0 (inactive) to 3. If the value of the setting data is not zero, the effect
of machine data:
MD21110 $MC_X_AXIS_IN_OLD_X_Z_PLANE is overwritten.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 843
Axes, Coordinate Systems, Frames (K2)
Frames

The values 1 to 3 have the following meanings:

1: The new X direction is chosen to lie in the X-Z plane of the old coordinate system.
In this setting the angle difference between the old and new Y axis will be minimal.
2: The new Y direction is chosen to lie in the Y-Z plane of the old coordinate system.
In this setting the angle difference between the old and new Y axis will be minimal.
3: The value chosen is the mean value of the two settings, which would have been
chosen with 1 and 2.
Characteristics and expansions:
Settings 1 and 2 are reached by rotating the coordinate system around the Z axis, starting
from any position on the X and Y axis, until the desired setting is reached. Setting 3 is
achieved by executing a rotation whose value is the exact mean of these two angles.
However, this only applies for the case that the old and new Z direction enclose an angle of
less than 90 degrees. With variant 1, both the old and new X axes form an angle of under 90
degrees, with variant 2 the same is true of the Y axis (the relevant axes point in
"approximately" the same direction). If the two Z directions form an angle of more than 90
degrees, however, the conditions of an angle < 90 degrees between the old and new axes
can no longer be met simultaneously for both X and Y. In this case, priority is given to the X
direction, i.e. a mean value is taken from the direction for 1 and the negative direction for 2.
If one of the G codes TOFRAMEX,TOFRAMEY,TOROTX,TOROTY is programmed in place of
TOFRAME(Z) or TOROT(Z), the descriptions for adapting the axis directions perpendicular to
the main direction are also valid for the cyclically exchanged axes. The assignments in the
table below are then valid:

TOFRAME, TOFRAMEZ TOFRAMEY TOFRAMEX


TOROT, TOROTZ TOROTY TOROTX
Tool direction Z Y X
(vertical axis)
Secondary axis X Z Y
(horizontal axis)
Secondary axis Y X Z
(ordinate)

Basic Functions
844 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

Example:

...
...
N90 $SC_TOFRAME_MODE=1
N100 ROT Z45
N110 TCARR=1 TCOABS T1 D1
N120 TOROT
...
...

N100 describes a rotation by 45 degrees in the X-Y plane. It is assumed that the toolholder
activated in N110 rotates the tool by 30 degrees around the X axis, i.e. the tool lies in the Y-
Z plane and is rotated by 30 degrees relative to the Z axis. As a result the Z axis of the frame
newly defined in N120 also points in this direction (independently of the value in setting data
SD42980 $SC_TOFRAME_MODE in N90).
In the figure below, the situation for setting data setting:
SD42980 $SC_TOFRAME_MODE=1
is shown:

[[

The old and new X axes X and X' coincide in the projection in the direction of the old Z axis.
The old and new Y axes Y and Y' form an angle of 8.13 degrees (right angles are generally
not retained in the projection).
For setting data setting:
SD42980 $SC_TOFRAME_MODE=2,
Y and Y' would coincide accordingly and X and X' would form an angle of 8.13 degrees.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 845
Axes, Coordinate Systems, Frames (K2)
Frames

For setting data setting:


SD42980 $SC_TOFRAME_MODE=3,
X and X', as well as Y and Y', would each form an angle of 4.11 degrees.

Note
The named angles (8.13 and 4.11 degrees) are the angles, which the projections of the axes
form in the X-Y plane. They are not the spatial angles of these axes.

TCARR and PAROT


Previously, TCARR has used the basic frame identified by machine data:
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER.
A system frame can be created for TCARR and PAROT alone, in order to avoid conflicts with
systems, which already use all the basic frames.
PAROT,TOROT and TOFRAME have previously changed the rotation component of the
programmable frame. In this case, it is not possible to shut down PAROT or TOROT
separately. On RESET, the programmable frame is deleted, which means the after changing
the operating mode to JOG, the rotation component of PAROT and TOROT is no longer
available. The user must also have unrestricted access to the programmable frame. Frames
produced by PAROT and TOROT must be able to be archived and reloaded via data backup.
The system frame for TCARR and PAROT is configured with bit 2 in machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK.
Machine data:
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER
is then no longer evaluated.
If the system frame for TCARR is configured, TCARR and PAROT describe that system frame;
otherwise the basic frame identified by machine data:
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER
is described.
With kinematics systems of the types P and M, TCARR will enter the table offset of the
orientational toolholder (zero offset resulting from the rotation of the table) as a translation
into the system frame. PAROT converts the system frame such, that a part-oriented WCS
results.
The system frames are stored in the SRAM and, therefore, remain stored after Reset. The
system frames also remain active in the case of a mode change.
For the display, the G codes PAROT and TOROT,TOFRAME are each assigned to a separate
G code group.

PAROTOF
PAROTOF is the switch off command for PAROT. This command deletes the rotations in the
system frame for PAROT. In so doing, the rotations in the current $P_PARTFRAME and in
the data management frame $P_PARTFR are deleted. The position of the coordinate system
is then recreated according to TCARR. PAROTOF is in the same G code group as PAROT and
appears, therefore, in the G code display.

Basic Functions
846 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

TOROT and TOFRAME


The system frame for TOROT and TOFRAME is configured with bit 3 in machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK.
This system frame is located before the programmable frame in the frame chain.
The SZS coordinate system is located before the programmable frame.

TOROTOF
TOROTOF is the switch off command for TOROT and TOFRAME. This command deletes the
system frame for TOROT and TOFRAME. The current $P_TOOLFRAME and the data
management frame $P_TOOLFR are also deleted. TOROTOF is in the same G code group as
TOROT and TOFRAME and appears, therefore, in the G code display.

Example
Example of using an orientational toolholder with deactivated kinematics:

N10 $TC_DP1[1,1]= 120


N20 $TC_DP3[1,1]=13 ; Tool length 13 mm
; Definition of toolholder 1:
N30 $TC_CARR1[1] = 0 ; X components of 1st offset vector
N40 $TC_CARR2[1] = 0 ; Y components of 1st offset vector
N50 $TC_CARR3[1] = 0 ; Z components of 1st offset vector
N60 $TC_CARR4[1] = 0 ; X components of 2nd offset vector
N70 $TC_CARR5[1] = 0. ; Y components of 2nd offset vector
N80 $TC_CARR6[1] = -15. ; Z components of 2nd offset vector
N90 $TC_CARR7[1] = 1 ; X components of 1st axis
N100 $TC_CARR8[1] = 0 ; Y components of 1st axis
N110 $TC_CARR9[1] = 0 ; Z components of 1st axis
N120 $TC_CARR10[1] = 0 ; X components of 2nd axis
N130 $TC_CARR11[1] = 1 ; Y components of 2nd axis
N140 $TC_CARR12[1] = 0 ; Z components of 2nd axis
N150 $TC_CARR13[1] = 30. ; Angle of rotation of 1st axis
N160 $TC_CARR14[1] = -30. ; Angle of rotation of 2nd axis
N170 $TC_CARR15[1] = 0 ; X components of 3rd offset vector
N180 $TC_CARR16[1] = 0 ; Y components of 3rd offset vector
N190 $TC_CARR17[1] = 0 ; Z components of 3rd offset vector
N200 $TC_CARR18[1] = 0 ; X components of 4th offset vector
N210 $TC_CARR19[1] = 0 ; Y component of 4th offset vector
N220 $TC_CARR20[1] = 15. ; Z components of 4th offset vector
N230 $TC_CARR21[1] = A ; Reference for 1st axis
N240 $TC_CARR22[1] = B ; Reference for 2nd axis
N250 $TC_CARR23[1] = "M" ; Toolholder type
N260 X0 Y0 Z0 A0 B45 F2000

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 847
Axes, Coordinate Systems, Frames (K2)
Frames

N270 TCARR=1 X0 Y10 Z0 T1 TCOABS ; Selection of orient. toolholder


N280 PAROT ; Rotation of table
N290 TOROT ; Rotation of z axis in tool orient.
N290 X0 Y0 Z0
N300 G18 MOVT=AC(20) ; Processing in G18 plane
N310 G17 X10 Y0 Z0 ; Processing in G17 plane
N320 MOVT=-10
N330 PAROTOF ; Deactivate rotation of table
N340 TOROTOF ; No longer align WCS with tool
N400M30

10.5.9 Subprograms with SAVE attribute (SAVE)

Settable frames G54 to G599


In case of adjustable frames the behavior depends on the setting of:
MD10617 $MN_FRAME_SAVE_MASK.BIT0
● BIT0 = 0
If the subprogram uses only the active adjustable frame, but which retains the G function,
the change is then also retained after the end of the subprogram.
● BIT0 = 1
With the end of the subprogram the adjustable frame which is active before the
subroutine call or the corresponding G function is reactivated.

Basic frames $P_CHBFR[ ] and $P_NCBFR[ ]


In case of basic frames the behavior depends on the setting of:
MD10617 $MN_FRAME_SAVE_MASK.BIT1
● BIT1 = 0
If the active basic frame is changed by the subprogram, the change remains effective
even after the end of the subprogram.
● BIT1 = 1
With the end of the subprogram the basic frame which is active before the subroutine call
is reactivated.

Programmable frame
With the end of the subprogram the programmable frame active before the subroutine call is
reactivated.

System frames
If the system frames are changed by the subprogram, the change remains effective even
after the end of the subprogram.

Basic Functions
848 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.10 Data backup


Data block _N_CHANx_UFR is used to archive the system frames.
Machine data
MD28082 $MC_MM_SYSTEM_FRAME_MASK
should not have changed between saving and reintroducing the saved system frames. If it
has changed then it is possible that saved system frames could no longer be loaded.
In this case, the loading process triggers an alarm.
Data backup always takes place in accordance with the currently valid geometry axis
assignment, not in accordance with the axis configurations set in the machine data.
The machine data
$MC_MM_SYSTEM_DATAFRAME_MASK
can be used to configure data management frames for the system frames.
If you do not want a data management frame for a system frame, the frame does not have to
be saved. With G500, G54 to G599, the active frame is retained.
A separate data block _N_NC_UFR is used to archive global frames.
The block requested by the HMI is created if the machine data
MD18601 $MN_MM_NUM_GLOBAL_USER_FRAMES
or
MD18602 $MN_MM_NUM_GLOBAL_BASE_FRAMES
has a value greater than zero.
Channel-specific frames are saved in data block _N_CHANx_UFR.
In certain circumstances, alarms could be triggered when reintroducing saved data, if the
frame affiliates, be they NCU global or channel-specific, have been changed using machine
data.
Data backup always takes place in accordance with the axis configuration set in the machine
data, not in accordance with the currently valid geometry axis assignment.

10.5.11 Positions in the coordinate system


The setpoint positions in the coordinate system can be read via the following system
variables. The actual values can be displayed in the WCS, SZS, BZS or MCS via the PLC.
There is a softkey for actual-value display in MCS/WCS. Machine manufacturers can define
on the PLC side, which coordinate system corresponds to the workpiece coordinate system
on their machines. The HMI requests the appropriate actual values from the NCK.
$AA_IM[axis]
The setpoints in the machine coordinate system can be read for each axis using the
variables $AA_IM[axis].

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 849
Axes, Coordinate Systems, Frames (K2)
Frames

$AA_IEN[axis]
The setpoints in the settable zero system (SZS) can be read for each axis using the
variables $AA_IEN[axis].
$AA_IBN[axis]
The setpoints in the basic zero system (BZS) can be read using the variable $AA_IBN[axis].
$AA_IW[axis]
The setpoints in the workpiece coordinate system (WCS) can be read using the variable
$AA_IW[axis].

10.5.12 Control system response

10.5.12.1 POWER ON

Frame conditions after POWER ON

Frame Frame conditions after POWER ON


Programmable frame Deleted.
Settable frames Are retained, depending on:
MD24080 $MC_USER_FRAME_POWERON_MASK Bit 0 = 1
MD20152 $MC_GCODE_RESET_MODE[7] = 1
Complete basic frame Retained, depending on
MD20110 $MC_RESET_MODE_MASK bit 0 and bit 14
Individual basic frames can be deleted with
MD10615 $MN_NCBFRAME_POWERON_MASK
and
MD24004 $MC_CHBFRAME_POWERON_MASK.
System frames Retained
Depending on:
MD24008 $MC_CHSFRAME_POWERON_MASK,
individual system frames can be deleted on POWER ON.
Deletion of system frame is executed in the data management
on first priority.
Zero offset external Permanent, but has to be activated again.
The system frame is retained.
DRF offset Deleted.

Basic Functions
850 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.12.2 Mode change

System frames
System frames are retained and remain active when the operating mode is changed.

JOG mode
In JOG mode, the frame components of the current frame are only taken into account for the
geometry axes if a rotation is active. No other axial frames are taken into account.

PLC and command axes


The response for PLC and command axes can be set via machine data:
MD32074 $MA_FRAME_OR_CORRPOS_NOTALLOWED (Frame or HL correction is not
permissible)

10.5.12.3 RESET, end of part program

RESET responses of basic frames


The RESET response of basic frames is set via the machine data:
MD20110 $MC_RESET_MODE_MASK (definition of initial control settings after
RESET/TP end)

RESET responses of system frames


The system frames are retained in the data management after a Reset.
The machine data below can be used to configure the activation of individual system frames:
MD24006 $MC_CHSFRAME_RESET_MASK (active system frames after Reset)

Bit Significance
0 System frame for actual value setting and scratching is active after RESET.
1 System frame for zero offset external is active after RESET.
2 Is not evaluated.
3 Is not evaluated.
4 System frame for workpiece reference point is active after RESET.
5 System frame for cycles is active after RESET.
6 Reserved, RESET response depends on MD20110 $MC_RESET_MODE_MASK.
7 System frame $P_ISO1FR is active after RESET.
8 System frame $P_ISO2FR is active after RESET.
9 System frame $P_ISO3FR is active after RESET.
10 System frame $P_ISO4FR is active after RESET.
11 System frame $P_RELFR is active after RESET.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 851
Axes, Coordinate Systems, Frames (K2)
Frames

RESET response of the system frames of TCARR, PAROT, TOROT and TOFRAME
The RESET response of the system frames of TCARR, PAROT, TOROT and TOFRAME
depends on the G-Code RESET setting.
The setting is made with machine data:
MD20110 $MC_RESET_MODE_MASK (definition of initial control settings after
RESET/TP end)
MD20152 $MC_GCODE_RESET_MODE[ ] (RESET response of G groups)
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)

MD20110 Significance
Bit 0 = 0 TCARR and PAROT system frames are retained as before the RESET.

Bit 0 = 1 MD20152 $MC_GCODE_RESET_MODE[51] = 0


MD20150 $MC_GCODE_RESET_VALUES[51] = 1 PAROTOF
MD20150 $MC_GCODE_RESET_VALUES[51] = 2 PAROT

MD20152 $MC_GCODE_RESET_MODE[51] = 1 TCARR and PAROT


system frames are retained
as before the RESET.

MD20152 $MC_GCODE_RESET_MODE[52] = 0
MD20150 $MC_GCODE_RESET_VALUES[52] = 1 TOROTOF
MD20150 $MC_GCODE_RESET_VALUES[52] = 2 TOROT
MD20150 $MC_GCODE_RESET_VALUES[52] = 3 TOFRAME

MD20152 $MC_GCODE_RESET_MODE[52] = 1 TOROT and TOFRAME


system frames are retained
as before the RESET.

TCARR and PAROT are two independent functions, which describe the same frame. With
PAROTOF, the component of TCARR is not activated on RESET.

Basic Functions
852 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

MD20110 Significance
Bit 0 = 1 and bit 14 = 0 Chained complete basic frame is deleted.

Bit 0 = 1 and bit 14 = 1 The complete basic frame is derived on the basis of:
MD24002 $MC_CHBFRAME_RESET_MASK
(active channel-specific basic frame after RESET)
and
MD10613 $MN_NCBFRAME_RESET_MASK
(active NCU global basic frame after RESET)

MD24002 $MC_CHBFRAME_RESET_MASK
Bit 0 = 1 1st channel basic frame is calculated into the chained
complete basic frame.
Bit 7 = 1 8th channel basic frame is calculated into the chained
complete basic frame.

MD10613 $MN_NCBFRAME_RESET_MASK
Bit 0 = 1 1st NCU global basic frame is calculated into the chained
complete basic frame.
Bit 7 = 1 8th NCU global basic frame is calculated into the chained
complete basic frame.

Frame conditions after RESET/part program end

Frame Condition after RESET/part program end


Programmable frame Deleted.
Settable frames Retained, depending on
MD20110 $MC_RESET_MODE_MASK
and
MD20152 $MC_GCODE_RESET_MODE.
Complete basic frame Retained, depending on:
MD20110 $MC_RESET_MODE_MASK Bit 0 and Bit 14,
MD10613 $MN_NCBFRAME_RESET_MASK
and
MD24002 $MC_CHBFRAME_RESET_MASK.
System frames Retained, depending on
MD24006 $MC_CHSFRAME_RESET_MASK
and
MD20150 $MC_GCODE_RESET_VALUES[ ].
External zero offset Retained
DRF offset Retained

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 853
Axes, Coordinate Systems, Frames (K2)
Frames

Deletion of system frames


The system frames in the data management can be deleted during RESET uisng machine
data:
MD24007 $MC_CHSFRAME_RESET_CLEAR_MASK (deletion of system frames during
RESET)

Bit Significance
0 System frame for actual value setting and scratching is deleted during RESET.
1 System frame for zero offset external is deleted during RESET.
2 Reserved, for TCARR and PAROT see MD20150 $MC_GCODE_RESET_VALUES[ ].
3 Reserved, for TOROT and TOFRAME see MD20150 $MC_GCODE_RESET_VALUES[ ].
4 System frame for workpiece reference points is deleted during RESET.
5 System frame for cycles is deleted during RESET.
6 Reserved, RESET response depends on MD20110 $MC_RESET_MODE_MASK.
7 System frame for $P_ISO1FR is deleted during RESET.
8 System frame for $P_ISO2FR is deleted during RESET.
9 System frame for $P_ISO3FR is deleted during RESET.
10 System frame for $P_ISO4FR is deleted during RESET.
11 System frame $P_RELFR is deleted during RESET.

10.5.12.4 Part program start

Frame conditions after part program start

Frame Condition after part program start


Programmable frame Deleted.
Settable frames Retained, depending on:
MD20112 $MC_START_MODE_MASK
Complete basic frame Retained
System frames Retained
External zero offset Retained
DRF offset Retained

Basic Functions
854 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Frames

10.5.12.5 Block search

Block search
Data management frames are also modified when carrying out a block search with
calculation.

Cancellation of block search


If the block search is aborted with RESET, then the machine data:
MD28560 $MC_MM_SEARCH_RUN_RESTORE_MODE
can be used to configure that all data management frames are set to the value they had
before the block search:

Bit Significance
0 All frames in the data management are restored.

In case of cascaded block searches, the frames are set to the status of the previous block
search.

SERUPRO
The "SERUPRO" function is not supported.

10.5.12.6 REPOS
There is no special treatment for frames. If a frame is modified in an ASUB, it is retained in
the program. On repositioning with REPOS, a modified frame is included, provided the
modification was activated in the ASUB.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 855
Axes, Coordinate Systems, Frames (K2)
Workpiece-related actual-value system

10.6 Workpiece-related actual-value system

10.6.1 Overview

Definition
The term "workpiece-related actual-value system" designates a series of functions that
permit the user:
● To use a workpiece coordinate system defined in machine data after power-up.
Features:
– No additional operations are necessary.
– Effective in JOG and AUTOMATIC modes
● To retain the valid settings for the following after end of program for the next part
program:
– Active plane
– Settable frame (G54-G57)
– Kinematic transformation
– Active tool offset
● To change between work coordinate system and machine coordinate system via the user
interface.
● To change the work coordinate system by operator action (e.g. changing the settable
frame or the tool offset).

10.6.2 Use of workpiece-related actual-value system

Requirements, basic settings


The settings described in the previous Section have been made for the system.
The predefined setting after power-up of the HMI software is MCS.

Switchover to WCS
The change to the WCS via the user interface causes the axis positions relative to the origin
of the WCS to be displayed.

Switchover to MCS
The change to the MCS via the user interface causes the axis positions relative to the origin
of the MCS to be displayed.

Basic Functions
856 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Workpiece-related actual-value system

Interrelationships between coordinate systems


The figure below shows the interrelationships between the machine coordinate system
(MCS) and the workpiece coordinate system (WCS).

)UDPHFKDLQ

:&6
)UDPHIRUF\FOHVSURJUDPPDEOH
IUDPHWUDQVIRUPDWLRQV
6=6
6\VWHPIUDPHIRU72527
72)5$0( ZRUNSLHFHV

*WR*VHWWDEOHIUDPH
FKDQQHOVSHFRU1&8JOREDO
%=6
&KDLQHGILHOGRIEDVLFIUDPHV
FKDQQHOVSHFDQGRU1&8JOREDO

&KDLQHGV\VWHPIUDPHVIRU3$52735(6(7
VFUDWFKLQJ]HURRIIVHWH[WHUQDO

+DQGZKHHO '5) RIIVHWVXSHULPSRVHGPRYHPHQW ]HUR


RIIVHWH[WHUQDO
%&6

.LQHPDWLFWUDQVIRUPDWLRQ
0&6

+RPHSRVLWLRQRIIVHW

0&6 0DFKLQH&RRUGLQDWH6\VWHP
%&6 %DVLF&RRUGLQDWH6\VWHP
:&6 :RUNSLHFH&RRUGLQDWH6\VWHP
%=6 %DVLF=HUR6\VWHP
6=6 6HWWDEOH=HUR6\VWHP

Figure 10-25 Interrelationship between coordinate systems

References:
/PG/ Programming Manual, Fundamentals
/FB1/ Function Manual, Basic Functions; Tool Offset (W1)
/FB1/ Function Manual, Basic Functions; Auxiliary Function Outputs to PLC (H2)
/FB2/ Function Manual, Expansion Functions; Kinematic Transformation (M1)
/FB3/ Function Manual, Special Functions; Axis Couplings and ESR (M3);
Section: Coupled Motion, Chapter: Master Value Coupling
/FB3/ Function Manual, Special Functions; Tangential Control (T3)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 857
Axes, Coordinate Systems, Frames (K2)
Workpiece-related actual-value system

10.6.3 Special reactions

Overstore
Overstoring in RESET state of:
● Frames (zero offsets)
● Active plane
● Activated transformation
● Tool offset
immediately affects the actual-value display of all axes in the channel.

Entry via operator panel front


If operations on the operator panel are used to change the values for
"Active frame" (zero offsets, "Parameters" operating area)
and
"Active tool length compensation" ("Parameters" operating area),
one of the following actions is used to activate these changes in the display:
● Press the RESET key.
● Reselect:
– Zero offset by the part program
– Tool offset by the part program
● Reset:
– Zero offset by overstoring
– Tool offset by overstoring
● Part-program start

MD9440
If the HMI machine data
MD9440 ACTIVATE_SEL_USER_DATA
for the operator panel front is set, the entered values become active immediately in RESET
state.
When values are entered in the part-program execution stop state, they become effective
when program execution continues.

Actual-value reading
If the actual value of $AA_IW is read in the WCS after activation of a frame (zero offset) or a
tool offset, the activated changes are already contained in the result read even if the axes
have not yet been traversed with the activated changes.
The actual values in the settable zero system (SZS) can be read from the part program for
each axis using the variable $AA_IEN[axis].
The actual values in the basic zero system (BZS) can be read from the part program for
each axis using the variable $AA_IBN[axis].

Basic Functions
858 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Workpiece-related actual-value system

Actual-value display
The programmed contour is always displayed in the WCS.
The following offsets are added to the MCS:
● Kinematic transformation
● DRF offset/zero offset external
● Active frame
● Active tool offset of the current tool

Switchover by PLC
The actual values can be displayed in the WCS, SZS, BZS or MCS via the PLC. The PLC
can define, which coordinate system corresponds to the workpiece coordinate system on a
machine.
On MMC power-on the MCS is preset.
With the signal DB19 DBB0.7 "MCS/WCS switchover", it is also possible to switch from the
PLC to the WCS.

Transfer to PLC
Depending on machine data
MD20110/MD20112, bit 1,
the auxiliary functions (D, T, M) are output to the PLC (or not) on selection of the tool length
compensation.

Note
If the WCS is selected from the PLC, an operator action can still be used to switch between
the WCS and MCS for the relevant mode.
However, when the mode and or area is changed, the WCS selected by the PLC is
evaluated and activated.
References:
/FB1/ Function Manual, Basic Functions; Mode Group, Channel, Program Operation, Reset
Response (K1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 859
Axes, Coordinate Systems, Frames (K2)
Restrictions

10.7 Restrictions
There are no supplementary conditions to note.

Basic Functions
860 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Examples

10.8 Examples

10.8.1 Axes

Axis configuration for a 3-axis milling machine with rotary table

1st machine axis: X1 Linear axis


2nd machine axis: Y1 Linear axis
3rd machine axis: Z1 Linear axis
4th machine axis: B1 Rotary table (for turning for multiface machining)
5th machine axis: W1 Rotary axis for tool magazine (tool revolver)
6th machine axis: C1 (Spindle)

1st geometry axis: X (1st channel)


2nd geometry axis: Y (1st channel)
3rd geometry axis: Z (1st channel)
1st special axis: B (1st channel)
2nd special axis: WZM (1st channel)
1st spindle: S1/C (1st channel)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 861
Axes, Coordinate Systems, Frames (K2)
Examples

<

:=0
%

;

=

Parameterization of the machine data

Machine data Value


MD10000 AXCONF_MACHAX_NAME_TAB[0] = X1
MD10000 AXCONF_MACHAX_NAME_TAB[1] = Y1
MD10000 AXCONF_MACHAX_NAME_TAB[2] = Z1
MD10000 AXCONF_MACHAX_NAME_TAB[3] = B1
MD10000 AXCONF_MACHAX_NAME_TAB[4] = W1
MD10000 AXCONF_MACHAX_NAME_TAB[5] = C1

MD20050 AXCONF_GEOAX_ASSIGN_TAB[0] =1
MD20050 AXCONF_GEOAX_ASSIGN_TAB[1] =2
MD20050 AXCONF_GEOAX_ASSIGN_TAB[2] =3

MD20060 AXCONF_GEOAX_NAME_TAB[0] =X
MD20060 AXCONF_GEOAX_NAME_TAB[1] =Y
MD20060 AXCONF_GEOAX_NAME_TAB[2] =Z

MD20070 AXCONF_MACHAX_USED[0] =1
MD20070 AXCONF_MACHAX_USED[1] =2

Basic Functions
862 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Examples

Machine data Value


MD20070 AXCONF_MACHAX_USED[2] =3
MD20070 AXCONF_MACHAX_USED[3] =4
MD20070 AXCONF_MACHAX_USED[4] =5
MD20070 AXCONF_MACHAX_USED[5] =6

MD20080 AXCONF_CHANAX_NAME_TAB[0] =X
MD20080 AXCONF_CHANAX_NAME_TAB[1] =Y
MD20080 AXCONF_CHANAX_NAME_TAB[2] =Z
MD20080 AXCONF_CHANAX_NAME_TAB[3] =B
MD20080 AXCONF_CHANAX_NAME_TAB[4] = WZM
MD20080 AXCONF_CHANAX_NAME_TAB[5] = S1

MD30300 IS_ROT_AX[3] =1
MD30300 IS_ROT_AX[4] =1
MD30300 IS_ROT_AX[5] =1

MD30310 ROT_IS_MODULO[3] =1
MD30310 ROT_IS_MODULO[4] =1
MD30310 ROT_IS_MODULO[5] =1

MD30320 DISPLAY_IS_MODULO[3] =1
MD30320 DISPLAY_IS_MODULO[4] =1

MD20090 SPIND_DEF_MASTER_SPIND =1

MD35000 SPIND_ASSIGN_TO_MACHAX[AX1] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX2] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX3] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX4] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX5] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX6] =1

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 863
Axes, Coordinate Systems, Frames (K2)
Examples

10.8.2 Coordinate systems

Configuring a global basic frame


An NC with 2 channels is required. The following applies:
● The global basic frame can then be written by either channel.
● The other channel recognizes this change when the global basic frame is reactivated.
● The global basic frame can be read by either channel.
● Either channel can activate the global basic frame for that channel.

Machine data

Machine data Value


MD10000 $MN_AXCONF_MACHAX_NAME_TAB[0] = X1
MD10000 $MN_AXCONF_MACHAX_NAME_TAB[1] = X2
MD10000 $MN_AXCONF_MACHAX_NAME_TAB[2] = X3
MD10000 $MN_AXCONF_MACHAX_NAME_TAB[3] = X4
MD10000 $MN_AXCONF_MACHAX_NAME_TAB[4] = X5
MD10000 $MN_AXCONF_MACHAX_NAME_TAB[5] = X6
MD18602 $MN_MM_NUM_GLOBAL_BASE_FRAMES =1
MD28081 $MC_MM_NUM_BASE_FRAMES =1

Machine data for channel 1 Value Machine data for channel 1 Value
$MC_AXCONF_CHANAX_NAME_TAB[0] =X $MC_AXCONF_CHANAX_NAME_TAB[0] =X
$MC_AXCONF_CHANAX_NAME_TAB[1] =Y $MC_AXCONF_CHANAX_NAME_TAB[1] =Y
$MC_AXCONF_CHANAX_NAME_TAB[2] =Z $MC_AXCONF_CHANAX_NAME_TAB[2] =Z
$MC_AXCONF_MACHAX_USED[0] =1 $MC_AXCONF_MACHAX_USED[0] =4
$MC_AXCONF_MACHAX_USED[1] =2 $MC_AXCONF_MACHAX_USED[1] =5
$MC_AXCONF_MACHAX_USED[2] =3 $MC_AXCONF_MACHAX_USED[2] =6
$MC_AXCONF_GEOAX_NAME_TAB[0] =X $MC_AXCONF_GEOAX_NAME_TAB[0] =X
$MC_AXCONF_GEOAX_NAME_TAB[1] =Y $MC_AXCONF_GEOAX_NAME_TAB[1] =Y
$MC_AXCONF_GEOAX_NAME_TAB[2] =Z $MC_AXCONF_GEOAX_NAME_TAB[2] =Z
$MC_AXCONF_GEOAX_ASSIGN_TAB[0] =1 $MC_AXCONF_GEOAX_ASSIGN_TAB[0] =4
$MC_AXCONF_GEOAX_ASSIGN_TAB[1] =2 $MC_AXCONF_GEOAX_ASSIGN_TAB[1] =5
$MC_AXCONF_GEOAX_ASSIGN_TAB[2] =3 $MC_AXCONF_GEOAX_ASSIGN_TAB[2] =6

Basic Functions
864 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Examples

Part program in first channel

Code (excerpt) Comment


. . .
N100 $P_NCBFR[0] = CTRANS( x, 10 ) ; Activation of the NC global basic frame
. . .
N130 $P_NCBFRAME[0] = CROT(X, 45) ; Activation of the NC global basic frame with rotation =>
alarm 18310, since rotations of NC global frames
are not permitted
. . .

Part program in second channel

Code (excerpt) Comment


. . .
N100 $P_NCBFR[0] = CTRANS( x, 10 ) ; The NCU global basic frame is also active in second
channel.
. . .
N510 G500 X10 ; Activate basic frame
N520 $P_CHBFRAME[0] = CTRANS( x, 10 ) ; Current frame of second channel is activated with an
offset.
. . .

10.8.3 Frames

Example 1
The channel axis is to become a geometry axis through geometry axis substitution.
The substitution is to give the programmable frame a translation component of 10 in the X
axis.
The current settable frame is to be retained:
FRAME_GEOX_CHANGE_MODE = 1

$P_UIFR[1] = ; Frame is retained after geo axis substitution.


CROT(x,10,y,20,z,30)
G54 ; Settable frame becomes active.
TRANS a10 ; Axial offset of a is also substituted.
GEOAX(1, a) ; a becomes x axis.
; $P_ACTFRAME= CROT(x,10,y,20,z,30):CTRANS(x10)

Several channel axes can become geometry axes on a transformation change.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 865
Axes, Coordinate Systems, Frames (K2)
Examples

Example 2
Channel axes 4, 5 and 6 become the geometry axes of a 5-axis orientation transformation.
The geometry axes are thus all substituted before the transformation.
The current frames are changed when the transformation is activated.
The axial frame components of the channel axes, which become geometry axes, are taken
into account when calculating the new WCS. Rotations programmed before the
transformation are retained. The old WCS is restored when the transformation is
deactivated.
The most common application will be that the geometry axes do not change before and after
the transformation and that the frames are to stay as they were before the transformation.
Machine data:

$MN_FRAME_GEOAX_CHANGE_MODE = 1

$MC_AXCONF_CHANAX_NAME_TAB[0] = "CAX"
$MC_AXCONF_CHANAX_NAME_TAB[1] = "CAY"
$MC_AXCONF_CHANAX_NAME_TAB[2] = "CAZ"
$MC_AXCONF_CHANAX_NAME_TAB[3] = "A"
$MC_AXCONF_CHANAX_NAME_TAB[4] = "B"
$MC_AXCONF_CHANAX_NAME_TAB[5] = "C"

$MC_AXCONF_GEOAX_ASSIGN_TAB[0] = 1
$MC_AXCONF_GEOAX_ASSIGN_TAB[1] = 2
$MC_AXCONF_GEOAX_ASSIGN_TAB[2] = 3

$MC_AXCONF_GEOAX_NAME_TAB[0] = "X"
$MC_AXCONF_GEOAX_NAME_TAB[1]="Y"
$MC_AXCONF_GEOAX_NAME_TAB[2] = "Z"

$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=4
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=5
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2]=6

$MC_TRAFO_AXES_IN_1[0] = 4
$MC_TRAFO_AXES_IN_1[1] = 5
$MC_TRAFO_AXES_IN_1[2] = 6
$MC_TRAFO_AXES_IN_1[3] = 1
$MC_TRAFO_AXES_IN_1[4] = 2

Basic Functions
866 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Examples

Program:

$P_NCBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_CHBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_IFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(z,45)
$P_PFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(x,10,y,20,z,30)

TRAORI ; Geo axis (4,5,6) sets transformer


; $P_NCBFRAME[0] =
ctrans(x,4,y,5,z,6,cax,1,cay,2,caz,3)
; $P_ACTBFRAME =
ctrans(x,8,y,10,z,12,cax,2,cay,4,caz,6)
; $P_PFRAME = ctrans(x,4,y,5,z,6,cax,1,cay,2,caz,3):
; crot(x,10,y,20,z,30)
; $P_IFRAME =
ctrans(x,4,y,5,z,6,cax,1,cay,2,caz,3):crot(z,45)

TRAFOOF; ; Geo axis (1,2,3) sets transformation deactivation


; $P_NCBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
; $P_CHBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
; $P_IFRAME =
ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(z,45)
; $P_PFRAME =
ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(x,10,y,20,z,30)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 867
Axes, Coordinate Systems, Frames (K2)
Data lists

10.9 Data lists

10.9.1 Machine data

10.9.1.1 Memory-specific machine data

Number Identifier: $MM_ Description


HMI HMI
Advanced Embedded
9242 MA_STAT_DISPLAY_BASE Numerical basis for display of moving
joint STAT
9243 MA_TU_DISPLAY_BASE Numerical basis for display of rotary
axis position TU
9244 MA_ORIAXES_EULER_ANGLE_NAME Display of orientation axes as Euler
angle
9245 MA_PRESET_FRAMEIDX Value storage scratching and
PRESET
9247 9247 USER_CLASS_BASE_ZERO_OFF_PA Availability of basic offset in
"Parameters" operating area
9248 9248 USER_CLASS_BASE_ZERO_OFF_MA Availability of basic offset in Machine
operating area
9249 USER_CLASS_VERT_MODE_SK Provide protection for vertical area
soft keys
9400 TOOL_REF_GEO_AXIS1 Absolute dimension tool length
compensation geometry axis 1
9401 TOOL_REF_GEO_AXIS2 Absolute dimension tool length
compensation geometry axis 2
9402 TOOL_REF_GEO_AXIS3 Absolute dimension tool length
compensation geometry axis 3
9424 9424 MA_COORDINATE_SYSTEM Coordinate system for actual-value
display
9425 MA_SCRATCH_DEFAULT_MODE Tool offset computation for geometry
axes with scratching
9440 9440 ACTIVE_SEL_USER_DATA Active data (frames) are immediately
operative after editing
9449 WRITE_TOA_LIMIT_MASK Applicability of MD9203 to edge data
and location-dependent offsets
9450 9450 MM_WRITE_TOA_FINE_LIMIT Limit value for wear fine
9451 9451 MM_WRITE_ZOA_FINE_LIMIT Limit value for offset fine
9459 PA_ZOA_MODE Display mode of zero offset

Basic Functions
868 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Data lists

10.9.1.2 NC-specific machine data

Number Identifier: $MN_ Description


10000 AXCONF_MACHAX_NAME_TAB Machine axis name
10600 FRAME_ANGLE_INPUT_MODE Input type for rotation with frame
10602 FRAME_GEOAX_CHANGE_MODE Frames and switchover of geometry axes
10610 MIRROR_REF_AX Reference axis for FRAME element mirroring
10612 MIRROR_TOGGLE Toggle mirroring
10613 NCBFRAME_RESET_MASK RESET response of global basic frame
10615 NCBFRAME_POWERON_MASK POWER ON response of global basic frames
10617 FRAME_SAVE_MASK Response of frames to subroutine return jump with
SAVE
10650 IPO_PARAM_NAME_TAB Name of interpolation parameters
10660 INTERMEDIATE_POINT_NAME_TAB Name of intermediate point coordinates for G2/G3
11640 ENABLE_CHAN_AX_GAP Channel axis gaps allowed
18600 MM_FRAME_FINE_TRANS Fine offset for all settable FRAMES and the basic
frame
18601 MM_NUM_GLOBAL_USER_FRAMES Number of globally predefined user frames
18602 MM_NUM_GLOBAL_BASE_FRAMES Number of global basic frames

10.9.1.3 Channel-specific machine data

Number Identifier: $MC_ Description


20050 AXCONF_GEOAX_ASSIGN_TAB Assignment geometry axis to channel axis
20060 AXCONF_GEOAX_NAME_TAB Geometry axis name in channel
20070 AXCONF_MACHAX_USED Machine axis number valid in channel
20080 AXCONF_CHANAX_NAME_TAB Channel axis name/special axis name in channel
20110 RESET_MODE_MASK Definition of basic control settings after RESET/
TP end)
20118 GEOAX_CHANGE_RESET Allow automatic geometry axis change
20126 TOOL_CARRIER_RESET_VALUE Active toolholder on RESET
20140 TRAFO_RESET_VALUE Transformation record on power-up (RESET/TP end)
20150 GCODE_RESET_VALUES Reset G groups
20152 GCODE_RESET_MODE RESET response of the G groups
20184 TOCARR_BASE_FRAME_NUMBER Number of the basic frame for pickup of the table
offset
21015 INVOLUTE_RADIUS_DELTA NC start disable without reference point
22532 GEOAX_CHANGE_M_CODE M code for replacement of geometry axes
22534 TRAFO_CHANGE_M_CODE M code for transformation changeover
24000 FRAME_ADD_COMPONENTS Separate programming/modification of additively
programmable frame components

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 869
Axes, Coordinate Systems, Frames (K2)
Data lists

Number Identifier: $MC_ Description


24002 CHBFRAME_RESET_MASK RESET response of channel-specific basic frames
24004 CHBFRAME_POWERON_MASK POWER ON response of channel-specific
basic frames
24006 CHSFRAME_RESET_MASK RESET response of channel-specific system frames
24007 CHSFRAME_RESET_CLEAR_MASK Clear system frames on RESET
24008 CHSFRAME_POWERON_MASK Delete system frames on POWER ON
24010 PFRAME_RESET_MODE RESET mode for programmable frame
24020 FRAME_SUPPRESS_MODE Positions for frame suppression
24030 FRAME_ACT_SET SZS coordinate system setting
24040 FRAME_ADAPT_MODE Adapting active frames
24050 FRAME_SAA_MODE Save and activate data management frames
24805 TRACYL_ROT_AX_FRAME_1 Rotary axis offset TRACYL 1
24855 TRACYL_ROT_AX_FRAME_2 Rotary axis offset TRACYL 2
24905 TRANSMIT_ROT_AX_FRAME_1 Rotary axis offset TRANSMIT1
24955 TRANSMIT_ROT_AX_FRAME_2 Rotary axis offset TRANSMIT2
28080 MM_NUM_USER_FRAMES Number of settable Frames (SRAM)
28081 MM_NUM_BASE_FRAMES Number of channel-specific base frames
28082 MM_SYSTEM_FRAME_FRAMES Configuration screen form for channel-specific system
frames
28560 MM_SEARCH_RUN_RESTORE_MODE Restore data after a simulation

10.9.1.4 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


32074 FRAME_OR_CORRPOS_NOTALLOWED FRAME or HL offset is not permitted
35000 SPIND_ASSIGN_TO_MACHAX Assignment spindle to machine axis

10.9.2 Setting data

10.9.2.1 Channel-specific setting data

Number Identifier: $SC_ Description


42440 FRAME_OFFSET_INCR_PROG Zero offsets are traversed on incremental
programming
42980 TOFRAME_MODE Determination of the direction of X and Y axes for
frame definition

Basic Functions
870 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Axes, Coordinate Systems, Frames (K2)
Data lists

10.9.3 System variables

Names Description
$AA_ETRANS[axis] Offset value zero offset external
$AA_IBN[axis] Actual value in basic zero coordinate system (BZS)
$AA_IEN[axis] Actual value in settable zero point coordinate system (ENS)
$AA_OFF[axis] Overlaid motion for programmed axis
$AC_DRF[axis] DRF offset (differential resolver function)
$AC_JOG_COORD Changeover of the manual operation coordinate system
$P_ACSFRAME Current frame for defining the ENS (ACS)
$P_ACTBFRAME Current chained total basic frame
$P_ACTFRAME Current total frame
$P_BFRAME Current first basic frame in the channel. Corresponds to $P_CHBFRAME
$P_CHBFR[n] Channel basic frames, activated via G500, G54 to G599
$P_CHBFRAME[n] Current basic frame in channel
0 to 15 NCU basic frames can be set through:
MD28081 MM_NUM_BASE_FRAMES
$P_CHBFRMASK Bit mask for definition of channel-specific basic frames
$P_CHSFRMASK Bit mask for activating system frames in data management
$P_CYCFR System frame for cycles
$P_CYCFRAME Current system frame for cycles
$P_EXTFR System frame for zero offset external in data management
$P_EXTFRAME Current system frame for zero offset external
$P_IFRAME Current settable frame
$P_ISO1FR System frame for ISO G51.1 mirroring
$P_ISO2FR System frame for G68 2DROT (ISO)
$P_ISO3FR System frame for G68 3DROT (ISO)
$P_ISO4FR System frame for G51 scale (ISO)
$P_ISO1FRAME Current system frame for ISO G51.1 mirroring
$P_ISO2FRAME Current system frame for G68 2DROT (ISO)
$P_ISO3FRAME Current system frame for G683DROT (ISO)
$P_ISO4FRAME Current system frame for G51 scale (ISO)
$P_NCBFR[n] NCU basic frames, activated via G500, G54 to G599
$P_NCBFRAME[n] Current NCU basic frame
0 to 15 NCU basic frames can be set through:
MD18602 MM_NUM_GLOBAL_BASE_FRAMES
$P_NCBFRMASK Bit mask for definition of NCU global basic frames
$P_PARTFR System frame for TCARR and PAROT in data management
$P_PARTFRAME Current system frame for TCARR and PAROT with an orientational toolholder
$P_PFRAME Current programmable frame
$P_SETFR System frame for PRESET and scratching in data management
$P_SETFRAME Current system frame for PRESET and scratching

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 871
Axes, Coordinate Systems, Frames (K2)
Data lists

Names Description
$P_TOOLFR System frame for TOROT and TOFRAME in data management
$P_TOOLFRAME Current system frame for TOROT and TOFRAME
$P_TRAFRAME System frame for transformations
$P_TRAFRAME Current system frame for transformations
$P_UBFR Basic frame in channel activated after G500, G54 to G599 Corresponds to
$P_CHBFR[0].
$P_UIFR[n] Settable frames, activated via G500, G54 to G599
$P_UIFRNUM Number of active frame $P_UIFR
$P_WPFR System frame for workpiece reference points
$P_WPFRAME Current system frame for workpiece reference points

$AA_ETRANS[X]
$AA_ETRANS[X] is an axis-specific system variable of the DOUBLE type. The default
setting in the system for this variable is zero.
Values set by the user are activated through the NC/PLC interface signal:
DB31, ... DBX3.0 (external zero offset)

10.9.4 Signals

10.9.4.1 Signals from channel

DB number Byte.Bit Description


21, ... 61.0 T function modification
21, ... 62.0 D function modification
21, ... 118-119 T function
21, ... 129 D function
21, ... 208 Number of active function G group 1
21, ... 209 Number of active function G group 2
... ... ...
21, ... 230 Number of active function G group 29

10.9.4.2 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 3.0 Accept zero offset external

10.9.4.3 Signals from axis/spindle

DB number Byte.Bit Description


31, ... 60.0 Spindle/no axis

Basic Functions
872 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Emergency Stop (N2) 11
11.1 Brief description

Function
The control system supports the machine manufacturer in implementing an emergency stop
function on the basis of the following functions:
● An emergency stop button is installed in a location easily accessible to the machine
operator on all SINUMERIK machine control panels. The functionality of the emergency
stop button includes the positive opening of electrical switching contacts and a
mechanical self-activating latching/locking.
● The emergency stop request to the NC is transmitted via the NC/PLC interface on the
PLC.
● In response to an emergency stop command, the NC decelerates all axes and spindles
as quickly as possible (with setpoint value 0), i.e. braking at the current limit of the drives.
● In the case of an emergency stop, all machine functions controlled by the PLC can be
brought to a safe state that can be set by the machine manufacturer.
● Unlatching the emergency stop button does not cancel the emergency stop state nor
does it initiate a restart.
● After the emergency stop state has been canceled, it is not necessary to reference the
machine axes or synchronize the spindles. The actual positions of the machine axes are
continuously tracked during the emergency stop sequence.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 873
Emergency Stop (N2)
Relevant standards

11.2 Relevant standards

Relevant standards
Compliance with the following standards is essential for the emergency stop function:
● EN ISO 12000-1
● EN ISO 12000-2
● EN 418
● EN 60204

EMERGENCY STOP
In accordance with EN 418, an emergency stop is a function that:
● Is intended to prevent or diminish developing or existing risks to operating personnel, and
damage to the machine or machined materials.
● is triggered by a single action of a person, if the normal stop function is not suitable for it.

Hazards
In the terms of EN 418, risks may arise from:
● Functional irregularities (machine malfunctions, unacceptable properties of the material to
be machined, human error, etc.).
● Normal operation.

Stadard EN ISO 12000-2


In accordance with the basic safety requirement of the EC Machinery Directive regarding
emergency stop, machines must be equipped with an energency stop device.
Exceptions
No emergency stop device is required on machines:
● Where an emergency stop device would not reduce the risk, either because the shutdown
time would not be reduced or because the measures to be taken would not be suitable for
controlling the risk.
● that are held and operated manually.

NOTICE
The machine manufacturer is expressly directed to comply with the national and
international standards. The SINUMERIK controllers support the machine manufacturer
in the implementation of the emergency stop function according to the specifications in
the following function description. But the responsibility for the emergency stop function
(its triggering, sequence, and acknowledgment) rests exclusively with the machine
manufacturer.

Basic Functions
874 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Emergency Stop (N2)
Emergency stop control elements

11.3 Emergency stop control elements

Emergency stop control elements


In accordance with EN 418, emergency stop control elements must be designed so that they
latch mechanically on their own and are easy for the operator and others to actuate in the
event of an emergency.
The following list includes some possible types of control elements:
● Mushroom-head pushbutton switches
● Wires/cables, cords, rods
● Puller grips
● In special cases: Foot-operated switches without protective covers

Emergency stop button and control


Actuation of the emergency stop button or a signal derived directly from the button must be
routed to the controller (PLC) as a PLC input. In the PLC user program, this PLC input must
be forwarded to the NC on the interface signal:
DB10 DBX56.1 (Emergency stop)
Resetting of the emergency stop button or a signal derived directly from the button must be
routed to the controller (PLC) as a PLC input. In the PLC user program, this PLC input must
be forwarded to the NC on the interface signal:
DB10 DBX56.2 (Acknowledge emergency stop)

Connection conditions
For connecting the emergency stop button see:
References:
/BH/ Operator Components Manual

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 875
Emergency Stop (N2)
Emergency stop sequence

11.4 Emergency stop sequence


After actuation of the emergency stop control element, the emergency stop device must
operate in the best possible way to prevent or minimize the danger.
"In the best possible way" means that the most favorable delay rate can be selected and the
correct stop category (defined in EN 60204) can be determined according to a risk
assessment.

Emergency stop sequence in the NC


The predefined (in EN 418) sequence of internal functions implemented to obtain the
emergency stop state is as follows in the control system:
1. Part program execution is interrupted.
All machine axes are braked in the relevant axis-specific parameterized time:
MD36610 $MA_AX_EMERGENCY_STOP_TIME (time of braking ramp in event of errors)
The maximum braking ramp that can be achieved thereby, is defned by the maximum
brake current of the respective drive. The maximum brake current is achieved by setting a
setpoint = 0 (fast braking).
2. Reset interface signal:
DB11 DBX6.3 (Mode group ready)
3. Set the interface signal:
DB10 DBX106.1 (Emergency stop active)
4. Alarm 3000 "emergency off" is shown.
5. After the expiry of a paramaterized delay time, the servo enables of machine axes are
reset.
The setting of the delay time is programmed in machine data:
MD36620 $MA_SERVO_DISABLE_DELAY_TIME (switch-off delay servo enable)
The following setting rule must be observed: MD36620 ≥ MD36610
6. All machine axes are switched in the follow-up mode within the controller.
The machine axes are no longer in position control during this.

Emergency stop sequence at the machine


The emergency stop sequence on the machine is determined solely by the machine
manufacturer.
Attention should be paid to the following points in connection to the sequence on the NC:

Basic Functions
876 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Emergency Stop (N2)
Emergency stop sequence

● The process in the NC is started using the interface signal:


DB10 DBX56.1 (Emergency stop)
After the machine axes have come to a standstill, the power supply must be interrupted,
in compliance with EN 418.

Note
The responsibility for interrupting the power supply rests with the machine manufacturer.

● The digital and analog outputs of the PLC I/O are not influenced by the emergency stop
sequence in the NC.
If individual outputs are required to attain a particular state or voltage level in the event of
an emergency stop, the machine manufacturer must implement this in the PLC user
program.
● The fast digital outputs of the NCK I/O system are not influenced by the emergency stop
sequence in the NC.
If individual outputs must assume a specific state in the case of emergency stop, the
machine manufacturer must transmit the desired state to the NC in the PLC user program
via interface signals:
DB10 DBB4-7

Note
If the sequence in the NC is not to be executed as described above, then the interface
signal DB10 DBX56.1 (emergency stop) must not be set until an emergency stop state
defined by the machine manufacturer in the PLC user program is reached.
As long as the interface signal is not set and no other alarm is pending, all interface
signals are operative in the NC. Any emergency stop state defined by the manufacturer
(including axis-, spindle-, and channel-specific emergency stop states) can therefore be
assumed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 877
Emergency Stop (N2)
Emergency stop acknowledgement

11.5 Emergency stop acknowledgement


The emergency stop control element may only be reset as a result of manual manipulation of
the emergency stop control element according to EN 418.
Resetting of the emergency stop control element alone must not trigger a restart command.
A machine restart must be impossible until all of the actuated emergency stop control
elements have been deliberately reset by hand.

Emergency stop acknowledgement


The EMERGENCY STOP state is only reset if the interface signal:DB10 DBX56.2
(acknowledge EMERGENCY STOP) is set followed by the interface signal:DB11, ... DBX0.7
(mode group reset).
Hence it can be noted that the interface signal DB10 DBX56.2 (acknowledge emergency
stop) and the interface signal DB21, ... DBX7.7 (Reset) together are set at least for so long,
till the interface signal DB10 DBX106.1(emergency stop active) is reset.

Note
The emergency stop state cannot be reset with the interface signal DB21, ... DBX7.7 (Reset)
alone.

'%'%; (PHUJHQF\VWRS
1
'%'%;
$FNQRZOHGJHHPHUJHQF\VWRS

'%'%; (PHUJHQF\VWRSDFWLYH

'%'%; 5(6(7
3

(1) DB10 DBX56.2 (acknowledge emergency stop) is inoperative


(2) DB21, ... DBX7.7 (Reset) is inoperative
(3) DB10 DBX56.2 and DB21, ... DBX7.7 reset DB10 DBX106.1(emergency stop active)
Figure 11-1 Resetting the emergency stop state

Basic Functions
878 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Emergency Stop (N2)
Emergency stop acknowledgement

Effects
Resetting the emergency stop state has the following effects:
● within the controller for all machine axes:
– the servo enables are set.
– the follow-up mode is cancelled.
– the position control is activated.
● the following interface signals are set:
DB31, ... DBX60.5 (position control active)
DB11 DBX6.3 (Mode group ready).
● the following interface signal is reset:
DB10 DBX106.1 (Emergency stop active)
● the alarm 3000 "emergency off" is deleted.
● Part program processing is interrupted in all channels of the NC.

PLC and NCK I/Os


The PLC user program must switch the PLC and NCK I/Os back to the state for operation of
the machine.

POWER OFF/ON (supply off/on)


The emergency stop state can also be reset by switching the controller off and back on
(POWER OFF/ON).
Requirement:
During power-up of the control the interface signal DB10 DBX56.1 (emergency stop) may not
be set.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 879
Emergency Stop (N2)
Data lists

11.6 Data lists

11.6.1 Machine data

11.6.1.1 Drive-specific machine data

Number Identifier: $MD_ Description


1404 PULSE_SUPPRESSION_DELAY Time for pulse suppression

11.6.1.2 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


36610 AX_EMERGENCY_STOP_TIME Length of the braking ramp for error states
36620 SERVO_DISABLE_DELAY_TIME Cutout delay servo enable

11.6.2 Signals

11.6.2.1 Signals to NC

DB number Byte.Bit Description


10 56.1 Emergency stop
10 56.2 Acknowledge Emergency Stop

11.6.2.2 Signals from NC

DB number Byte.Bit Description


10 106.1 Emergency stop active

11.6.2.3 Signals to mode group

DB number Byte.Bit Description


11 0.7 Mode group RESET

Basic Functions
880 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Transverse Axes (P1) 12
12.1 Brief description

Transverse axis
Within the framework of "turning" technology, the transverse axis refers to the machine axis
that travels perpendicular to the axis of symmetry of the spindle, in other words, to
longitudinal axis Z.

Properties
● Every geometry axis of a channel can be defined as a transverse axis.
● Only one transverse axis can be defined per channel.
● A transverse axis is a linear axis for the following functions, which can be permitted and
activated at the same time or separately:
– Programming and display in the diameter
– Reference axis for constant cutting speed G96/G961/G962

Several transverse axes in the channel


Diameter programming and reference axis for G96/G961/G962 can be active for different
transverse axes.

Transverse axis functions (overview)

Programming and display Reference axis for


in the diameter G96/G961/G962
Permissible axis type: Geometry axis Linear channel Geometry axis
axes
Selection in the channel one m of 3 m of n one one of 3
Specific effect: Channel Axis Channel
Machine data: MD20100 $MC_ MD30460 MD20100 $MC_
DIAMETER_AX $MA_BASE_FUNCTION_MASK DIAMETER_AX_
_DEF DEF
Programming: DIAM* SCC[AX]
channel-specific modal channel-specific modal
G group 29 Reference axis for G96/G961/G962
Acceptance during axis DIAM*A[AX]
replacement: axis-specific modal
Axis-specific non-modal DAC, DIC; RAC, RIC
diametral/radius blockwise axis-specific only programming
programming

DIAM*: DIAMOF, DIAMON, DIAM90, DIAMCYCOF


DIAM*A[AX]: DIAMOFA[AX], DIAMONA[AX], DIAM90A[AX], DIACYCOFA[AX], DIAMCHANA[AX]
AX: Axis identifier for geometry/channel or machine axis identifier

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 881
Transverse Axes (P1)
Brief description

Note
Rotary axes are not permitted to serve as transverse axes.

Programming the transversing paths


The traverse paths of a transverse axis programmed in the part program may be either
radius- or diameter-based. It is possible to switch between the two reference types with the
part program commands DIAMON (DIAMeter ON = diameter) and DIAMOF (DIAMeter OF =
radius). In this way, dimensional information can be taken directly from the technical drawing
without conversion.
Active part program
When the part program DIAMON (dimensional information as diameter) is active, the
following is true for the transverse axis:
● The setpoint and actual values that refer to the workpiece coordinate system are
displayed as diameter values.
● System variables for setpoints and actual values that refer to the workpiece coordinate
system contain diameter values.
● Offsets are entered, programmed and displayed in radius format.
● Programmed end positions are converted to radius values internally.
● The absolute interpolation parameters (e.g. I, J, K) for circular interpolation (G2 and G3)
are converted to radius values internally.
● Measurement results that were determined by touch trigger probe in the workpiece
coordinate system are stored as diameter measurements.
● Setpoints and actual values can be read in diameter format in the WCS with the aid of
system variables.
When the part program command DIAMOF (dimensional information as radius) is active, the
above-mentioned data is always entered, programmed, internally stored, read or displayed
as radius data.

Basic Functions
882 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Transverse Axes (P1)
Defining a geometry axis as transverse axis

12.2 Defining a geometry axis as transverse axis

Transverse axis
Within the framework of "turning" technology, the transverse axis refers to the machine axis
that travels perpendicular to the axis of symmetry of the spindle, in other words, to
longitudinal axis Z.

;
7UDQVYHUVHD[LV

0
:

/RQJLWXGLQDOD[LV

Figure 12-1 Position of the transverse axis in the machine coordinate system

Definition
Definition of a transversing axis in the channel
The definition of a geometry axis as a transverse axis is done using machine data:
MD20100 $MC_DIAMETER_AX_DEF (geometry axis with transverse axis function).
For this axis, diameter programming and assigning a constant cutting speed with
G96/G961/G962 are both permitted.
Definition of several transversing axes in the channel
The machine data MD30460 $MA_BASE_FUNCTION_MASK allows the definition of
additional transverse axes, for which axis-specific diameter programming with bit2=1 is
possible.
An axis can be simultaneously defined in MD20100 and in MD30460 with bit2. For this, the
channel-specific MD20100 has a higher priority than the axis-specific MD30460.
With:
● MD20100, the function G96/G961/G962 is assigned to the transverse axis during power
up.
● MD20100, the channel-specific diameter programming DIAMON, DIAMOF, DIAM90,
DIAMCYCOF is assigned to the transverse axis during power up.
This axis occupies the axis-specific basic position DIAMCHANA[AX] after power up.
● MD30460 bit2 the additional enabling of the axis-specific statements DIAMONA[AX],
DIAMOFA[AX], DIAM90A[AX], DIACYCOFA[AX], DIMCHANA[AX].

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 883
Transverse Axes (P1)
Defining a geometry axis as transverse axis

Example for defining a transverse axis in the channel

MD20100 $MC_DIAMETER_AX_DEF="X" ;the geometry axis X is the transverse axis


in the channel

Restrictions
However, only exactly one geometry axis can be defined as transverse axis per channel.
With MD30460 $MA_BASE_FUNCTION_MASK bit2=1 is only permitted for linear axes.

Channel-specific basic position after power up, RESET


The channel-specific basic position after power up or RESET or end of part program of the G
group 29: DIAMON, DIAM90, DIAMOF, DIAMCYCOF define the
MD20150 $MC_GCODE_RESET_VALUE
and independently of
MD20110 $MC_RESET_MODE_MASK/bit0 the MD20152 $MC_GCODE_RESET_MODE.
The user can set the respective desired status via an event-controlled program call (prog-
event).
If G96/G961/G962 is the basic position after power up, a transverse axis must be defined
using MD20100 $MC_DIAMETER_AX_DEF, otherwise the alarm message 10870 is output.
Reference axis for G96/G961/G962 retained:
MD20110 $MC_RESET_MODE_MASK, bit 18=1 for RESET or end of part program
MD20112 $MC_START_MODE_MASK, bit 18=1 for start of part program
A reference axis for G96/G961/G962 can also be assigned without application of a
transverse axis in MD20100 via SCC[AX]. For this scenario, the constant cutting speed
cannot be activated with G96. For further information refer to
Reference
/PG/ Programming Manual Fundamentals, Feedrate Control and Spindle Motion
"Constant Cutting Speed (G96, G961, G962, G97, G971, LIMS, ACC[AX])"

Basic Functions
884 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Transverse Axes (P1)
Dimensional information for transverse axes

12.3 Dimensional information for transverse axes


Transverse axes can be programed with respect to both diameter and radius. Generally,
they are diameter-related, i.e. programmed with doubled path dimension so that the
corresponding dimensional information can be transferred to the part program directly from
the technical drawings.

;
7UDQVYHUVHD[LV

0
:
' '
=
/RQJLWXGLQDOD[LV

Figure 12-2 Transverse axis with diameter information (D1, D2)

Switching the diameter programming on/off


Channel-specific diameter programming
The activating or deactivating of the diameter programming is done via the modally active
part program statements of the G group 29:
● DIAMON: Diameter programming ON
● DIAMOF: Diameter programming OFF, in other words, radius programming ON
● DIAM90: Diameter or radius programming depending on the reference mode:
– Diameter programming ON in connection with absolute dimensioning G90
– Radius programming ON in connection with incremental dimensioning G91
● DIAMCYCOF: Radius programming for G90 and G91 ON , for the HMI, the last active
G code of this group remains active
Reference is made exclusively to the transverse axis of the channel.
Axis-specific diameter programming for several transverse axes in one channel

Note
The additionally specified axis must be activated via MD30460
$MA_BASE_FUNCTION_MASK with bit2=1.
The axis specified must be a known axis in the channel. Geometry, channel or machine axes
are permitted.
Programming is not permitted in synchronized actions.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 885
Transverse Axes (P1)
Dimensional information for transverse axes

The following axis-specific modal statements can be programmed several times in a part
program block:
● DIAMONA[Axis]: Diameter programming for G90, G91 AC and IC ON
● DIAMOFA[Axis]: Diameter programming OFF, in other words, radius programming ON
● DIAM90A[axis]: Diametral or radius programming depending upon the reference mode:
– Diameter programming ON in connection with absolute dimensioning G90 and AC
– Radius programming ON in connection with incremental dimensioning G91 and IC
● DIACYCOFA[axis]: Radius programming for G90 and G91 ON , for the HMI, the last
active G code of this group remains active
● DIAMCHANA[axis]: Acceptance of diameter programming channel status
● DIAMCHAN: all axes with MD30460, bit2=1 accept the diameter programming channel
status
Axis-specific modal statements have priority over the channel setting.

Acceptance of the additional transverse axis in the channel


Due to a GET request from the part program, the diameter programming status for an
additional transverse axis is accepted in the new channel during axis replacement using
RELEASE[axis].
Axis replacement in synchronized actions
For axis replacement in synchronized actions, a transverse axis takes the status of the axis-
specific diameter programming with it into the new channel if the following applies to the
transverse axis:
● with MD30460, bit2=1 axis-specific diameter programming is permitted.
● it is not subordinated to the channel-specific diameter programming in the releasing
channel.
The active dimension can be queried via the system variable $AA_DIAM_STAT[AX].
Axis replacement via axis container rotation
By rotating the axis container, the assignment of a channel axis can change to assignment of
a machine axis. The current diameter programming status is retained however for the
channel axis after the rotation. This also applies to the current channel status and axis
status, because the status is the same for all axes of the axis container at the time of the
machine data "putting into effect" the status from MD30460 $MA_BASE_FUNCTION_MASK.

Initial setting
The following machine data is used to parameterize the initial setting:
MD20150 $MC_GCODE_RESET_VALUES [28] (initial setting of the G groups)
and independently of MD20110 $MC_RESET_MODE_MASK for bit0 the
MD20152 $MC_GCODE_RESET_MODE

Basic Functions
886 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Transverse Axes (P1)
Dimensional information for transverse axes

Diameter-related data
After activation of the diameter programming, the following data refer to diameter
dimensions:

DIAMON/DIAMONA[AX]
● Display data of transverse axis in the workpiece coordinate system:
– Setpoint and actual position
– Distance-to-go
– REPOS Offset
● "JOG" mode:
– Increments for incremental dimension (INC) and handwheel travel (dependent upon
active MD)
● Part program programming:
– End positions, independent of reference mode (G90/G91)
– Interpolation parameters of circular-path programming (G2/G3) if these are
programmed with part program instruction: AC absolute.
● Actual values read with reference to the workpiece coordinate system (WCS):
– $AA_MW[Transverse axis]
System variable of the measuring functions MEAS (measuring with delete distance-to-
go) and MEAW (measuring without delete distance-to-go)
– $P_EP[Transverse axis]
– $AA_IW[Transverse axis]

DIAM90/DIAM90A[AX]
After activation of the reference-mode-dependent diameter programming, the following data
are always displayed in relation to diameter regardless of the operating mode (G90/G91):
● Actual value
● Actual values read with reference to the workpiece coordinate system (WCS):
– $AA_MW[Transverse axis]
System variable of the measuring functions MEAS (measuring with delete distance-to-
go) and MEAW (measuring without delete distance-to-go)
– $P_EP[Transverse axis]
– $AA_IW[Transverse axis]

DIAMCYCOF/DIACYCOFA[AX]
Just as for DIAMCYCOF, a changeover to radius programing takes place within the controller
for DIACYCOFA[AX]. The diameter programming status that was active before DIAMCYCOF
or DIACYCOFA[AX] continues to be displayed to the HMI.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 887
Transverse Axes (P1)
Dimensional information for transverse axes

Permanently radius-related data


For transverse axes, the following data is always entered, programmed and displayed in
relation to radius:
● Offsets:
– Tool offsets
– Programmable and configurable frames
– External work offset
– DRF and preset offset
– etc.
● Working area limitation
● software limit switch
● Feed
● Display data with reference to the machine coordinate system
● Display data of the service images for axis, FSD and MSD
Extended functions for data that is always radius-related:
● PLC axes, via FC18 or axes controlled exclusively by the PLC.
– The dimension for PLC axes in the radius also applies to several transverse axes with
diameter function and is independent of channel-specific or axis-specific diameter
programming.
– In JOG mode (Inc) a PLC axis is subordinate to the channel status. If diameter
programming is active and MD20624 $MC_HANDWH_CHAN_STOP_COND bit15=0,
only half the path of the specified increment is transversed.
Radius programming from MD20100 $MC_DIAMETER_AX_DEF and
MD30460 $MA_BASE_FUNCTION_MASK, bit2 is dependent upon
MD20360 $MC_TOOL_PARAMETER_DEF_MASK taken into consideration as follows:
bit3=0: Work offset $P_EXTFRAME and frames
For transverse axes, work offsets in frames are always calculated as radius values.
Bit5=0: external work offset (axis superimposition)
For transverse axes, the external work offset is always calculated as radius values.
Bit8=1: Display of remaining path in WCS always as a radius
DRF-traveling with handwheel
For all transverse axes, MD11346 $MN_HANDWH_TRUE_DISTANCE == 1 for
bit9=0:
causes the half path of the specified handwheel increment to be traveled, if channel-specific
or axis-specific diameter programming is active for this axis.
Bit 9=1:
the half path of the specified handwheel increment is always traveled.

Basic Functions
888 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Transverse Axes (P1)
Dimensional information for transverse axes

Displaying position values in the diameter


Position values of the transverse axis are always displayed as a diameter value, if the bit0=1
is set by
MD27100 $MC_ABSBLOCK_FUNCTION_MASK.

Dimension on several transverse axes permanent diameter-related data


Several transverse axes permitted by MD30460 $MA_BASE_FUNCTION_MASK, bit2=1 do
not behave differently in comparison to a transverse axis defined using MD20100
$MC_DIAMETER_AX_DEF. Diameter values continue to be converted into radius values.
For all of the transverse axes defined in the channel, the following functions can be activated
as a diameter per MD20360 $MC_TOOL_PARAMETER_DEF_MASK for a set bit:
1: Transverse axis tool length as a diameter
2: Alarm for wear or tool length as a diameter and level change
3: Work offset in frames of the transverse axis as a diameter
4: Preset value as a diameter
5: External work offset of transverse as a diameter
6: Actual values of the transverse axis as a diameter
7: Display of actual values of the transverse axis as a diameter value.
10: Tool portion of an active tool carrier that can be oriented if no tool is active
11: Evaluation of $TC_DP6 as a diameter
12: Evaluation of $TC_DP15 as wear of the tool diameter
Work offset $P_EXTFRAME and frames
Bit3=1: For all transverse axes ,
work offsets in frames are always calculated as diameter values. The frame stores the work
offsets internally as a radius value. There is no conversion during a change of diameter, to
radius programming or vice versa.
Work offset external
Bit 5=1: For all transverse axes,
external work offsets are always calculated as diameter values. There is no conversion
during a change of diameter, to radius programming or vice versa.

Settable response of geometry axes for traveling with handwheel


If the geometry axis is traveled as a transverse axis in the channel for handwheel traveling
MD11346 $MN_HANDWH_TRUE_DISTANCE == 1, the response of the handwheel traveling
can be changed via MD20624 $MC_HANDWH_CHAN_STOP_COND, bit15:
Bit15=0: Only the half path of the specified increment is traveled.
Bit15=1: The specified increment is traveled completely.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 889
Transverse Axes (P1)
Dimensional information for transverse axes

Application examples
X is a transverse axis defined via MD20100 $MC_DIAMETER_AX_DEF.
Y is a geometry axis and U is an additional axis. These two axes are transverse axes with
specified diameter further defined in MD30460 $MA_BASE_FUNCTION_MASK with bit2=1.
DIAMON is not active after power up.

N10 G0 G90 X100 Y50 ;no diameter programming is active


N20 DIAMON ;Channel-specific diameter programming, in effect for X
N30 Y200 X200 ;Dimension: X in the diameter, Y in the radius
N40 DIAMONA[Y] ;axis-specific modal diameter programming,
;in effect for Y
N50 Y250 X300 ;Dimension: X and Y in diameter
N60 DIAM90 ;dimension: X G90/AC in the diameter, G91/IC in the radius
N70 Y200 ;Y: continuing, axis-specific modal diameter programming
N75 G91 Y20 U=DIC(40) ;dimension: Y in the diameter, U non-modally IC in the
diameter
N80 X50 Y100 ;dimension: X in the radius (G91), Y in the diameter
N85 G90 X100 U200 ;dimension: X in the diameter, U in the radius
N90 DIAMCHANA[Y] ;Y accepts the channel status DIAM90
N95 G91 X100 Y100 ;Dimension: X and Y in the radius(G91)
N100 G90 X200 Y200 ;Dimension: X and Y in diameter

Example with axle replacement


Transverse axes with diameter specification applied as in the previous example.
X and Y are located in channel 1 and are also known in channel 2, i.e. permitted for axis
replacement.

Channel 1
N10 G0 G90 X100 Y50 ;no diameter programming is active
N20 DIAMON ;Channel-specific diameter programming for X
N30 Y200 X200 ;Dimension: X in the diameter, Y in the radius
N40 DIAMONA[Y] ;Y axis-specific modal diameter programming
N50 Y250 X300 ;Dimension: X and Y in diameter
N60 SETM(1) ;Synchronous marker 1
N70 WAIT(1,2) ;wait for synchronous marker 1 in channel 2
Channel 2
...
N50 DIAMOF ;channel 2 no diameter programming active
...
N100 WAIT(1,1) ;wait for synchronous marker 1 in channel 1
N110 GETD(Y) ;Axis replacement direct Y
N120 Y100 ;Y the channel-specific diameter programming
;subordinated in channel 2, i.e. dimension in the radius

Basic Functions
890 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Transverse Axes (P1)
Data lists

12.4 Data lists

12.4.1 Machine data

12.4.1.1 Channel-specific machine data

Number Identifier: $MC_ Description


20050 AXCONF_GEOAX_ASSIGN_TAB[n] Assignment of geometry axis to channel axis
20060 AXCONF_GEOAX_NAME_TAB[n] Geometry axis name in channel
20100 DIAMETER_AX_DEF Geometry axis with transverse axis function
20110 RESET_MODE_MASK Definition of control basic setting after power-up and
RESET/part program end
20112 START_MODE_MASK Definition of the control basic settings for NC start
20150 GCODE_RESET_VALUES[n] Reset G groups
20152 GCODE_RESET_MODE[n] G code basic setting at RESET/end of part program
20360 TOOL_PARAMETER_DEF_MASK Definition of tool parameters
20624 HANDWH_CHAN_STOP_COND Definition of the behavior of traveling with handwheel
27100 ABSBLOCK_FUNCTION_MASK Parameterize block display with absolute values

12.4.1.2 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


30460 BASE_FUNCTION_MASK Axis functions

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 891
Transverse Axes (P1)
Data lists

Basic Functions
892 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3) 13
13.1 Brief description

General
The PLC basic program organizes the exchange of signals and data between the PLC user
program and the NCK (Numerical Control Kernel), HMI (Human Machine Interface) and MCP
(Machine Control Panel). In the case of signals and data, a distinction is made between the
following groups:
● Cyclic signal exchange
● Event-driven signal exchange
● Messages

Cyclic signal exchange


The cyclically-exchanged signals consist primarily of bit arrays.
● They contain commands transmitted from the PLC to the NCK (such as start or stop) and
status information from the NCK (such as program running, interrupted, etc.).
● The bit fields are organized into signals for:
– BAG
– Channels
– Axes/spindles
– General NCK signals
The cyclic exchange of data is performed by the basic program at the start of the PLC cycle
(OB1). This ensures, for example, that the signals from the NCK remain constant throughout
a cycle.

Event-driven signal exchange NCK → PLC


PLC functions that have to be executed as a function of the workpiece program are triggered
by auxiliary functions in the workpiece program. If a block with auxiliary functions is
executed, the type of auxiliary function determines whether the NCK has to wait for this
function to execute (e.g. tool change) or whether the function will be executed together with
the workpiece machining process (e.g. tool loading on milling machines with chain
magazine).
Data transfer must be as fast and yet as reliable as possible, in order to minimize the effect
on the NCK machining process. Data transfer is, therefore, interrupt- and acknowledgment-
driven. The basic program evaluates the signals and data, acknowledges this to the NCK
and transfers the data to the application interface at the start of the cycle. If the data do not
require user acknowledgment, this does not affect NC processing.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 893
Basic PLC Program (P3)
Brief description

Event-driven signal exchange PLC → NCK


An "event-driven signal exchange PLC → NCK" takes place whenever the PLC passes a
request to the NCK (e.g. traversal of an auxiliary axis). In this case, data transfer is also
acknowledgment-driven. When performed from the user program, this type of signal
exchange is triggered using a function block (FB) or function call (FC).
The associated FBs (Function Blocks) and FCs (Function Calls) are supplied together with
the basic program.

Messages
User messages are acquired and conditioned by the basic program. A defined bit field is
used to transfer the message signals to the basic program, where they are evaluated and, if
message events occur, entered in the PLC's interrupt buffer by means of the ALARM S/SQ
functions. Where an HMI (e.g. HMI embedded) is provided, the messages are transferred to
and displayed on the HMI.

PLC/HMI data exchange


In this type of data exchange, the HMI takes the initiative, being referred to as the "client" on
the bus system. The HMI polls or writes data. The PLC processes these requests at the
cycle control point via the operating system. The PLC basic program is not involved in these
exchanges.

Note
The function of the machine is largely determined by the PLC program. Every PLC program
in the RAM can be edited with the programming device.

Basic Functions
894 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Key data of the PLC-CPUs for 840D sl and 840Di sl

13.2 Key data of the PLC-CPUs for 840D sl and 840Di sl

Scope of performance
The table given below shows the performance range of the PLC CPUs and the scope of the
basic PLC program with reference to various types of control.

Type of control
840Di sl 840D sl
PLC-CPU: Integrated PLC Integrated PLC
CPU317-2DP CPU317-2DP
master/slave master/slave
Key CPU data
Memory for user and basic program 128 to 768 KB 128 to 768 KB
Data block memory max. 256 KB max. 256 KB
Memory submodule no No
Bit memories 32768 32768
Timers 512 512
Meters 512 512
Clock memories 8 8
Program/data blocks:
OB 1, 10, 20-21, 32-35, 40, 1, 10, 20-21, 32-35, 40,
55-57, 80, 82, 85-87, 90, 55-57, 80, 82, 85-87, 90,
100, 121-122 100, 121-122
FB 0-2048 0-2048
FC 0-2048 0-2048
DB 1-2048 1-2048
Max. data block length 64 KB 64 KB
Max. block length FC, FB 64 KB 64 KB
Inputs/outputs (addressing capacity in bytes)
digital + analog 4096/4096 4096/4096
Incl. reserved area (8192/8192) (8192/8192)
Process image 256/256 256/256
Note: The inputs/outputs above 4096 are reserved for integrated drives.
Inputs/outputs 1) (addressing)
Row 0 is integrated in the Through optional Through optional configuring
NCU. configuring of I/O devices: of I/O devices:
From I/O byte 0 From I/O byte 0
digital From PI/PO byte 288 From PI/PO byte 288
analog PROFIBUS only PROFIBUS only
Processing time
Bit instructions (I/O) 0.03 ms/kA 0.03 ms/kA
Word instructions 0.1 ms/kA 0.1 ms/kA
PDIAG (Alarm S,SQ) Yes yes

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 895
Basic PLC Program (P3)
Key data of the PLC-CPUs for 840D sl and 840Di sl

Type of control
PROFIBUS Master/Slave Master/Slave
Number of PROFIBUS slaves max. 125 max. 125
Number of PROFIBUS slots max. 512 max. 512
DP master system no. DP 1 1
DP master system no. MPI/DP 2 2
DP master system No. internal PROFIBUS (PCI) - 3
Programmable block communication PBK yes yes
Consistent data to standard slave via SFC 14, 15 128 128
I/O expansion
I/O modules, central none none
PROFIBUS DP interfaces 1 (2) 1 (2)
Interfaces (MPI) 1 (0) 1 (0)

1) Row 0 is integrated in the NC. Rows 1 to 3 are available for I/O devices

PLC filter
840Di sl (MCI3) 840D sl (NCU 730.2 PN)
PLC-CPU: Integrated PLC Integrated PLC
CPU319-3PN/DP CPU319-3PN/DP
Master/Slave Master/Slave
Key CPU data
Memory for user and basic 512 to 1536 KB 512 to 1536 KB
program
Data block memory max. 256 KB max. 256 KB
Memory submodule No No
Bit memories 65536 65536
Timers 2048 2048
Counter 2048 2048
Clock memory 8 8
Program/data blocks:
OB 1, 10, 20-21, 32-35, 40, 1, 10, 20-21, 32-35, 40,
55-57, 80, 82, 85-87, 90, 55-57, 80, 82, 85-87, 90,
100, 121-122 100, 121-122
FB 0-2048 0-2048
FC 0-2048 0-2048
DB 1-4096 1-4096
Max. data block length 64 KB 64 KB
Max. block length FC, FB 64 KB 64 KB
Inputs/outputs (addressing capacity in bytes)
digital + analog 4096/4096 (8192/8192) 4096/4096 (8192/8192)
Incl. reserved area
Process image 256/256 256/256
Note: The inputs/outputs above 4096 are reserved for integrated drives.

Basic Functions
896 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Key data of the PLC-CPUs for 840D sl and 840Di sl

PLC filter
Inputs/outputs 1) (addressing)

Row 0 is integrated in the Through optional Through optional configuring


NCU. configuring of I/O devices: of I/O devices:
From I/O byte 0 From I/O byte 0
digital From PI/PO byte 288 From PI/PO byte 288
analog PROFIBUS, PROFINET PROFIBUS, PROFINET
Processing time
Bit instructions (I/O) 0.01 ms/kA 0.01 ms/kA
Word instructions 0.02 ms/kA 0.02 ms/kA
PDIAG (Alarm S,SQ) yes yes
PROFIBUS Master/Slave Master/Slave
Number of PROFIBUS slaves max. 125 max. 125
Number of PROFIBUS slaves max. 256 max. 256
Number of PROFIBUS slots max. 512 max. 512
DP master system no. DP 1 1
DP master system no. MPI/DP 2 2
Master system No. PROFINET 100 100
DP master system No. internal PROFIBUS (PCI) - 3
PBK programmable block communication yes yes
Consistent Data to standard slave via SFC 14, 15 128 128
I/O expansion
I/O modules, central none none
PROFIBUS DP interfaces 1 (2) 1 (2)
Interfaces (MPI) 1 (0) 1 (0)
PROFINET interfaces 1 1

1) Row 0 is integrated in the NC. Rows 1 to 3 are available for I/O devices

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 897
Basic PLC Program (P3)
Key data of the PLC-CPUs for 840D sl and 840Di sl

Note
Number of PROFIBUS slaves
The content of the SDB2000 and related further SDBs is stored by the PLC operating system
in internal data structures, which the PROFIBUS ASIC can also access. Furthermore,
information from SDB2000 is also conditioned (CPI interface) and transmitted to the NCK
and the PLC basic program. This is necessary in order to control drives and PROFIsafe
modules on the PROFIBUS. A memory area defined by the PLC is available for these data
structures. Its size is limited by the maximum number of slots. This means that during
loading, SDBs with fewer slaves than listed above may be refused. A slot is usually a slave
module or the slave itself. Only on a module with both I and Q areas does one module count
as 2 slots. It is, therefore, not possible to specify the size of SDB 2000 exactly. It cannot be
determined whether the configuration is legal until the SDB container has been loaded to the
CPU. The values shown above must be taken as guide values only. If the configuration is not
permissible, the alarm 410160 is set. If the configuration does not fit in the internal data
range, no PROFIsafe and no SFC 15 functions work.

PLC versions
● PLC 317-2DP with SIMATIC version 2.1.8 (version ID 20.70.31) or higher version is
implemented
● PLC 319-2DP with SIMATIC version 2.4 (version ID 24.90.xx) or higher version is
implemented.
These versions are compatible with the corresponding SIMATIC CPU 300, which means that
all modules and software packages that are approved for these versions and CPUs on
SIMATIC are, therefore, suitable. Exceptions are modules, which in general may only be put
in line 0.
Version identification in the version screen is made up of:
● SIMATIC CPU PLC primary version identifier
● Firmware transfer increment
● Internal increment

Basic Functions
898 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Key data of the PLC-CPUs for 840D sl and 840Di sl

Version screen on HMI


In the version screen the currently used PLC and the related version of the PLC operating
system is displayed under PLC (e.g. PLC_317-2DP 20.70.31).
In the column after that the module code of the PLC module used can be read. The following
PLC module codes are currently in use:

Module code PLC module Firmware version Operating system


SW version ID
201x PLC 317-2DP with FW 2.1 20.70.31
IBC32
MCI 2 (840Di) PLC 317-2DP with FW 2.1 20.70.31
211x IBC32
2308 PLC 319-3PN/DP FW 2.4 24.90.10
MCI 3 (840Di) PLC 319-3PN/DP FW 2.4 24.90.10

PLC basic program functions

PLC filter
840Di 840D sl
Scope
Axes/spindles See catalog 31
Channels 6 10
Mode groups 6 10
Functions
Status/control signals + +
M decoders (M00-99) + +
G group decoders + +
Aux. function distributors + +
Aux. function transfer, interrupt-driven + +
M decoding acc. to list + +
Move axes/spindles from PLC + +
Async. subprogram interface + +
Error/operating messages + +
Transfer MCP and HHU signals + +
Display control handheld unit + +
Read/write NCK variables and GUD + +
PI services + +
Tool management + +
Star/delta switchover + +
m:n + +
Safety Integrated +
Program diagnostics + +

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 899
Basic PLC Program (P3)
Key data of the PLC-CPUs for 840D sl and 840Di sl

Mode selector on PLC CPUs for 840D


On the NCU component, the right-hand twist button labeled "PLC" is used to set the PLC
operating mode.
The switch settings are listed in the following table.

Switch setting Significance Remark


0 RUN-P
1 RUN Cannot load program
2 STOP
3 MRES

Basic Functions
900 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Reserve resources (timers, counters, FC, FB, DB, I/O)

13.3 Reserve resources (timers, counters, FC, FB, DB, I/O)

Reserve resources (timers, counters, FC, FB, DB, I/O)


The components below are reserved for the basic program:
● Timers
No reservation
● Counter
No reservation
● FC, FB, DB
FC 0 to FC 29 and FB 0 to FB 29 are reserved for the basic program. The number range
between 1000 and 1023 is also reserved for FCs and FBs. Data blocks DB 1 to DB 62
and DB 71 to DB 80 are reserved. The number range 1000 to 1099 is also reserved in
addition for DB. The data blocks of channels, axes/spindles and tool management
functions that are not activated may be assigned as desired by the user.
● I/O range
The PLC has an I/O address volume of 8192 bytes each for inputs and outputs. The
address ranges starting at 4096/4096 are reserved for/occupied by integrated drives.
However, diagnostic addresses for modules can be assigned to the highest address
range as proposed by STEP 7. Furthermore, the address range between 256 and 287 is
assigned for the NCK, CP and HMI in rack 0 on the SIMATIC 300 station.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 901
Basic PLC Program (P3)
Startup hardware configuration of the PLC-CPUs

13.4 Startup hardware configuration of the PLC-CPUs

General procedure
The hardware configuration for the PLC CPUs used in the NCU7x0, including other
components of the NCU (NCK, CP, HMI, drive), must be defined via STEP 7. Proceed as
follows in STEP7:
1. Create a new project (File, New, Project)
2. Insert, Hardware, SIMATIC 300 station
3. Select the SIMATIC 300 station with the mouse
4. Right mouse button, open object
The HW-Config is now started.
5. A suitable SINUMERIK component is selected from the hardware catalog
"SIMATIC 300 \ SINUMERIK \ 840D sl".
6. I/Os are to be extended from the hardware catalog of STEP 7
The addresses for the I/O modules can be changed, if needed.

Prerequisites
In order to be able to select SINUMERIK components from the hardware catalog, you must
run the Toolbox setup program first ("Hardware expansions for STEP7" and "Starter"). The
current version of hardware expansions for STEP 7 can also be found under eSupport.

Example of current hardware allocations PLC to NCU

Table 13- 1 Hardware expansions

Comparable Selecting from STEP 7 hardware


NCU MLFB SIMATIC CPU MLFB catalog
included
SINUMERIK 840D 6FC5 371-0AA00-0AA0 6ES7 317-2AJ00-0AB0 NCU710.1
NCU 710.1 STEP 7 V5.3 SP2 and higher
and Toolbox 840D sl 01.01.00)
SINUMERIK 840D 6FC5 372-0AA00-0AA0 6ES7 317-2AJ00-0AB0 NCU720.1
NCU 720.1 STEP 7 V5.3 SP2 and higher
and Toolbox 840D sl 01.01.00)
SINUMERIK 840D 6FC5 373-0AA00-0AA0 6ES7 317-2AJ00-0AB0 NCU730.1
NCU 730.1 STEP 7 V5.3 SP2 and higher
and Toolbox 840D sl 01.01.00)
SINUMERIK 840D 6FC5 374-0AA01-?AA0 6ES7 318-3EL00-0AB0 NCU740.1
NCU 740.1 STEP 7 V5.4 or later
and Toolbox 840D sl 01.04.02)

Basic Functions
902 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Startup hardware configuration of the PLC-CPUs

Comparable Selecting from STEP 7 hardware


NCU MLFB SIMATIC CPU MLFB catalog
included
SINUMERIK 840Di sl 6FC5 222-0AA02-1AA0 6ES7 317-2AJ00-0AB0 840Di with PLC317-2 DP
with MCI2 STEP 7 V5.3 SP2 and higher
and Toolbox 840D sl 01.02.00)
SINUMERIK 840Di sl 6FC5222-0AA02-3AA0 6ES7 318-3EL00-0AB0 840Di with MCI3
with MCI3 STEP 7 V5.4 or later
and Toolbox 840D sl 01.04.02)

Note
On SINUMERIK 840D, SIMATIC line 0 is allocated for the SINUMERIK components.
In this line stretches to:
• Slot 2: the integrated PLC with the different bus systems
• Slot 3, empty
• Slot 4: the NCK 840D sl. The properties (I/O-address 256, process alarm) of the NCK
must not be changed, as process interrupts (e.g. auxiliary functions) of the NCK to PLC
may, in this case, no longer function.
• Slot 5: the integrated Ethernet CP 840D sl
• Slot 6: the integrated HMI 840D sl
The integrated drive is linked on the internal PCI bus (PROFIBUS protocol).
Currently, this bus does not support I/O access, and SFCs are not supported for this bus.
If you are using a different NCU, you can change the NCU using "drag & drop". The settings
remain unaffected. When using the program "Starter" the icon "SINAMICS_in_NCUxyz" is
also to be deleted and created again after the exchange of the NCU in the SIMATIC
Manager.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 903
Basic PLC Program (P3)
Startup hardware configuration of the PLC-CPUs

Figure 13-1 Hardware configuration on the SINUMERIK 840D sl and SINAMICS Properties dialog box

Basic Functions
904 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Startup hardware configuration of the PLC-CPUs

Figure 13-2 DP slave properties

In the Properties dialog box for the integrated SINAMICS drive, object codes 1 to 6 are used
to identify axes 1 to 6. The axes are set for the largest possible message frame type 106 and
Safety Motion Monitoring as standard. This is the default setting. Telegram type 106 features
the longest possible user data length of an NC axis. The message frame type in the NC
machine data may not tally at all with this setting. In the context of an NC axis, message
frame type 106 means: 2 encoders + DSC
Object 8 contains the ALM via which, for example, enables have to be activated by the PLC
user program. Object 7 contains the CU (device 0). The manual for the NCU7x0 contains a
further description of these objects.
Axis expansions with the NX10 and NX15 modules are possible for NCU710, NCU720 and
NCU730. You will find NX10 and NX15 in the PROFIBUS-DP\SINAMICS module catalog.
You will find the clock settings for the drives in the dialog box under the "Isochronous
Operation" tab. In case the transmission cycles of the drives have to be changed, a change
must be made under this tab.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 905
Basic PLC Program (P3)
Startup hardware configuration of the PLC-CPUs

Ethernet communication
In case of CP 840D the Ethernet address is assigned by default for the port X127. As such,
the PLC can be reached via this port from a STEP 7 project. If needed, the Ethernet address
on the CP 840D can be changed to the Ethernet address of the port X120 or X130. Then a
cable connection to the PG of this port is also necessary.

Connection of central I/O-devices


The physical connection for a connection to an IM361 does not exist. No central I/O is
possible.

Basic Functions
906 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Starting up the PLC program

13.5 Starting up the PLC program

13.5.1 Installing the basic program for 840D


A complete general reset of the NCK and the PLC is necessary before starting up the NCU
component for the first time. Turn the "SIM/NCK" switch on the left-hand side to position 1
and the "PLC" switch on the right-hand side to position 3. Then restart the controller. This
action generates a "hard reset request" on the PLC. The memories of the PLC and NC are
then initialized.

Installation
The basic program is installed by the Toolbox by means of the execution of a setup program
for the basic program, hardware expansion for STEP7 (option package for SINUMERIK
840D sl) and NC-Var selector components, as well as for other tools. To start the installation,
run setup.exe in the main CD directory. You can then choose which components to install.
After the installation you can select the basic program library directly from STEP7
(bp7x0_14, 14 is the main basic program version 1.4). The concrete version of the basic
program can be scanned for the object properties of the library or the program folder in the
comment field.

General
The OB source programs, including standard parameterization, interface symbols and data-
block templates for the handheld unit and M decoding functions are included in the SIMATIC
project or SIMATIC library of the basic program.
STEP 7 must be installed before installing the basic program Toolbox. After an update of
STEP 7, it is generally recommended to reinstall the hardware expansion for STEP 7 from
the toolbox.

13.5.2 Application of basic program


A new CPU program (e.g. "Turnma1") must be set up in a project by means of the STEP 7
software for each installation (machine).

Comment
The catalog structures of a project and the procedure for creating projects and user
programs are described in the relevant SIMATIC documentation.

Procedure
The basic-program blocks are copied using the SIMATIC Manager and
"File" > "Open" > "Library".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 907
Basic PLC Program (P3)
Starting up the PLC program

The following components must be copied from the library:


● From the block container: FCs, FBs, DBs, OBs, SFC, SFB, UDT
● Source_files (from the source container): GPOB840D
● Possibly MDECLIST, HHU_DB and others
● The symbols table (from the symbols container)

Compatibility with STEP 7


There are no dependencies between the basic program and current STEP7 versions.

13.5.3 Version codes

Basic Program
The version of the basic program is displayed on the HMI version screen along with the
controller type.
The controller type is encoded as follows:

Left-justified decade Controller type


of DB 17 DBD 0 (byte 0)
03 SINUMERIK 840D (561,571, 572, 573)
04 SINUMERIK 840Di
03 SINUMERIK 840D sl (NCU 7x0)
SINUMERIK 840Di sl

User Program
Users can also display their own PLC version codes on the HMI version screen. For this
purpose, a data of type STRING containing a maximum of 54 characters must be defined in
any data block. The data can contain a text of the user's choice. Parameter assignments for
this string are made via a pointer in FB 1. Parameterization requires symbolic definition of
the data block.
See also section "block descriptions" > "FB 1: RUN_UP Basic program, start-up section
(Page 898) ".

13.5.4 Machine program


The machine manufacturer creates the machine program using the library routines supplied
with the basic program. The machine program contains the logic operations and sequences
on the machine. The interface signals to the NC are also controlled in this program. More
complex communication functions with the NCK, e.g. read/write NC data, tool-management
acknowledgments, etc., are activated and executed via blocks FCs and FBs of the basic-
program).

Basic Functions
908 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Starting up the PLC program

The machine program can be created in various STEP 7 creation languages, e.g. AWL,
KOP, FUP, S7-HIGRAPH, S7GRAPH, SCL. The complete machine program must be
generated and compiled in the correct sequence.
This means that blocks that are called by other blocks must generally be compiled before
these blocks.
If blocks that are called by other blocks are subsequently modified in the interface
(VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR) as the program is developed, then the
call block and all blocks associated with it must be compiled again. This general procedure
applies analogously to instance data blocks for FBs. If these sequence of operations is not
maintained, time-stamp conflicts occur when the data retranslated into STEP 7. As such, the
recompilability of the blocks is not ensured and with the function "Status of block"
unnecesary conflicts can also appear. It is, moreover, advisable to generate blocks in ASCII-
STL by means of the STEP 7 editor when they have been created in Ladder Diagram or in
single statements (incremental mode).

13.5.5 Data backup


The PLC-CPU does not save any symbolic names, but instead only the datatype
descriptions of the block parameters VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR and
the datatypes of the global data blocks.

Note
No sensible recompilation is possible without the related project for this machine. This
especially affects, for instance the function status of the block or the necessary changes
done in the PLC-CPU programs later. It is, therefore, necessary to keep a backup copy of
the STEP 7 project located in the PLC CPU on the machine. This is a great help for the
service case and saves unnecessary consumption of time in restoring the original project.

If the STEP 7 project exists and has been created according to the instructions given above,
then symbols can be processed in the PLC-CPU on this machine. It may also be advisable
to store the machine source programs as ".awl" files in case they are required for any future
upgrade.
The source programs of all organization blocks and all instance data blocks should always
be available.

13.5.6 PLC-series startup, PLC archive


Once the blocks have been loaded to the PLC CPU, a series archive can be generated via
the HMI operator interface to back up data on the machine. To ensure data consistency, this
backup must be created immediately after block loading when the PLC is in the Stop state. It
does not replace the SIMATIC project backup as the series archive saves binary data only,
For instance, no symbolic information is present here. In addition, no CPU DBs (SFC 22
DBs) or SDBs generated in the CPU are saved.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 909
Basic PLC Program (P3)
Starting up the PLC program

The PLC series archive can be generated directly from the relevant SIMATIC project as an
alternative. To do this, in STEP 7 select the "Archive" tab available under the "Options" >
"Settings" menu item. This contains an entry "SINUMERIK (*.arc)", which must be selected
to create a series commissioning file. After selection of the archive, select the "File" >
"Archive" menu item. The relevant series archive will then be generated. If the project
contains several programs, the program path can be selected. A series archive is set up for
the selected program path. All blocks contained in the program path are incorporated into the
archive, except for CPU-DBs (SFC 22 DBs). In addition, the "SDB archive" can be activated
or deactivated in the function. With this selection the SDB present in the STEP 7 project can
be added to the archive or left outside.

Automation
The process of generating a series archive can be automated (comparable to the command
interface in STEP7). In generating this series archive, the command interface is expanded.
The following functions are available for this expansion:
The functions (shown here in VB script) are not available until server instantiations and
Magic have been called:
Const S7BlockContainer = 1138689, S7PlanContainer = 17829889
Const S7SourceContainer = 1122308
set S7 = CreateObject("Simatic.Simatic.1")
instantiate rem command interface of STEP 7
Set S7Ext = CreateObject("SimaticExt.S7ContainerExt")
Call S7Ext.Magic("")
Functions:
Function Magic(bstrVal As String) As Long
Function MakeSeriesstart-up (FileName As String, Option As Long, Container As
S7Container) As Long

Description
Function Magic(bstrVal As String) As Long
Call gives access to certain functions. The function must be called once after server
instantiation. The value of bstrVal can be empty. This initiates a check of the correct STEP 7
version and path name in Autoexec. The functions are enabled with a return parameter of 0.
Return parameter (-1) = incorrect STEP 7 version
Return parameter (-2) = no entry in Autoexec.bat
Function MakeSeriesstart-up(FileName As String, Option As Long, Container As
S7Container) As Long

Basic Functions
910 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Starting up the PLC program

"Option" parameter:

0: Normal series IBN file with general reset.


Bit 0 = 1: Series IBN file without general reset. When project contains SDBs, this option is
inoperative.
A general reset is then always executed.
Bit 1 = 1: Series IBN file with PLC restart
Return parameter value:

0 = OK
-1 = Function unavailable, call Magic function beforehand
-2 = File name cannot be generated
-4 = Container parameter invalid or container block empty
-5 = Internal error (memory request rejected by Windows)
-6 = Internal error (problem in STEP 7 project)
-7 = Write error when generating series startup files (e.g. diskette full)

Use in script

If S7Ext.Magic("") < 0 Then


Wscript.Quit(1)
End If
Set Proj1 = s7.Projects("new")
set S7Prog = Nothing
Set s7prog = Proj1.Programs.Item(1) 'if there is only one program'
For Each cont In s7prog.Next
If (Cont.ConcreteType = S7BlockContainer) Then
' Check block container
Exit For
End if
Cont = Nothing
Next
Error = S7Ext.MakeSerienIB("f:\dh\arc.dir\PLC.arc", 0, Cont)
' Now error analysis

The For Each ... Next Block programmed above can be programmed in the Delphi
programming language as follows (the programming for C, C++ programming languages is
similar):

Var
EnumVar: IEnumVariant;
rgvar: OleVariant;
fetched: Cardinal;

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 911
Basic PLC Program (P3)
Starting up the PLC program

//For Each Next


EnumVar := (S7Prog.Next._NewEnum) as IEnumVariant;
While (EnumVar.Next(1,rgvar,fetched) = S_OK) Do Begin
Cont := IS7Container(IDispatch(rgvar)); // block container
Check sources
If (Cont.ConcreteType = S7BlockContainer) Then Break;
Cont := NIL;
End;

13.5.7 Software upgrade

Software upgrade
Whenever you update the PLC or NCK software, always reset the PLC to its initial state first.
This initial clear state can be achieved by means of a general PLC reset. In case of this
resetting all the available blocks are deleted.
In normal cases, the new basic program is to be linked for a new NCU software version. The
basic programs blocks must be loaded into the user project for this purpose. In this case no
OB 1, OB 40, OB 82, OB 86, OB 100, the FC 12 and also the DB 4 may not be transmitted, if
these blocks are already present in the user project. These blocks may have been modified
by the user. The new basic program must be linked with the user program.
To do this, proceed as follows:
1. Generate the text or source file of all user blocks before copying the basic program.
2. Then copy the new basic program blocks to this machine project (for a description, see
Subsection "Application of basic program")
3. All user programs "*.awl" must then be recompiled in the correct order! (see also:
"Machine program (Page 898)"):
4. This newly compiled machine program must then be loaded to the PLC CPU with STEP 7.
However, it is normally sufficient to recompile the organization blocks (OB) and the instance
data blocks of the machine program. This means you only need to generate sources for the
organization blocks and the instance data blocks (before upgrading).

Overall reset
A description of how to perform a general PLC reset appears in the Installation and Start-Up
Guide. However, a general reset does not delete the contents of the diagnostic buffer nor the
node address on the MPI bus. Another possible general reset method is described below.
This method must be used when the normal general reset process does not work.

Basic Functions
912 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Starting up the PLC program

Proceed as follows:

No. Action Effect


1 Control system is switched off
2 PLC switch setting 3 (MRES) and switch control on LED labeled PS flashes slowly.
again or perform hardware RESET.
3 Set PLC start-up switch to position 2 (STOP) and back The LED labeled PS starts to flash
to position 3 (MRES). faster.
4 Set PLC start-up switch to setting 2 or 0.

NC tags
The latest NC VAR selector can be used for each NC software version (even earlier
versions). For older NC software versions the variables can also be selected from the latest
complete list. The data cntent in DB 120 (default DB for variables) does not depend on the
software status. That is, variables selected in an older software version need not be
reselected when the software is upgraded.

13.5.8 I/O modules (FM, CP modules)


Special packages for STEP 7 are generally required for more complex I/O modules. Some of
these special packages include support blocks (FCs, FBs) stored in a STEP7 library. The
blocks contain functions for operating the relevant module which are parameterized and
called by the user program. In many cases, the FC numbers for the CP and FM module
handling blocks are also included in the number range of the basic program for the 840D.
What can one do in these conflicts?
The block number of the basic program must remain unchanged. The block numbers of
required handling blocks can be assigned to free numbers using STEP 7. These new blocks
(with new FC numbers) are then called in the user program with the parameter assignments
required by the function.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 913
Basic PLC Program (P3)
Starting up the PLC program

13.5.9 Troubleshooting
This section describes problems which may occur, their causes and remedies and should be
read carefully before hardware is replaced.

Errors, cause/description and remedy


Serial Errors Cause/description To correct or avoid errors
no.
error
informa-
tion
1 No connection The MPI cable is not plugged in Test: Create a link with the
via MPI to or is defective. Possibly, the programmer in the STEP 7 editor by
PLC. STEP 7 software is also not means of connection "Direct_PLC".
correctly configured for the MPI A number of node addresses must be
card. displayed here. If they do not appear,
the MPI cable is defective/not plugged
in.
2 PLC cannot A system data block SDB 0 has Disconnect all MPI cables to other
be accessed been loaded with a modified MPI components. Create the link
in spite of address. This has caused an "Direct_PLC" with the programmer.
PLC general MPI bus conflict due to dual Correct the MPI address.
reset. assignment of addresses.
3 All four LEDs A system error has occurred in Once the PLC program has been
on the PLC the PLC. RESET or reloaded, the system may
flash (DI Measures: return to normal operation. Even in this
disaster) case, the content of the diagnostic
The diagnostic buffer on the PLC
buffer should be sent to the
must be read to analyze the
Development Office.
system error in detail. To access
the buffer, the PLC must be
stopped (e.g. set "PLC" switch to
position 2). A hardware reset
must then be performed. The
diagnostic buffer can then be
read out with STEP 7. Relay the
information from the diagnostic
buffer to the Hotline/
Development Service. A general
reset must be carried out if
requested after the hardware
RESET. The diagnostic buffer
can then be read with the PLC in
the Stop state.

Basic Functions
914 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Linking PLC CPUs to 840D

13.6 Linking PLC CPUs to 840D

13.6.1 General
The AS 300 family is used as the PLC for all systems. On the SINUMERIK 840 D, the PLC
CPU is integrated into the NCU component as a sub-module. The relevant performance data
for PLC CPUs can be found in the above table or in the SIMATIC catalog.

13.6.2 Features of PLC CPUs


SINUMERIK 840D sl/840Di sl PLC CPUs are based on standard SIMATIC CPUs in the S7-
300 family. As a result, they generally possess the same functions. Functional deviations are
shown in the table above. Owing to differences in their memory system as compared to the
SIMATIC CPU, certain functions are not available (e.g. save blocks on memory card, save
project on memory card).

Note
With the current SIMATIC CPUs, the PLC is not automatically started after voltage failure
and recovery when a PLC Stop is initiated via software operation. In this instance, the PLC
remains in the Stop state with an appropriate diagnostic entry for safety reasons. You can
start the PLC only via software operation "Execute a restart" or by setting the switch to
"Stop" and then "Run". This behavior is also integrated in the current versions of the
SINUMERIK PLC.

13.6.3 Interface on 840D with integrated PLC

Physical interfaces
As the SINUMERIK 840D system has an integrated PLC, signals can be exchanged
between the NCK and PLC directly via a dual-port RAM.

Data exchange with the control panel


Data exchange with the operator panel (HMI, OP) usually takes place via the internal
software-based C bus. Alternatively, external HMI or OP systems can also be connected on
Ethernet or the MPI bus. In the event of connection to the Ethernet bus, the integrated CP
provides the link to the PLC.
On the SINUMERIK 840D, data exchange with the machine control panel (MCP) and
handheld unit (HHU) is determined by the interface setup of the MCP/HHU. Possible
connection paths include: MPI, PROFIBUS, Ethernet.
Programming devices should preferably be connected directly to the PLC on the Ethernet
bus via the internal CP or via the MPI (Multi-Point-Interface).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 915
Basic PLC Program (P3)
Linking PLC CPUs to 840D

230&3
(6 3*

(WKHUQHW
6WDUWXSSRUW

(WKHUQHW3RUW
(WKHUQHW7&3,3
ZRUNVEXV

LQWHUQDOEXVಯ&EXVUDFNರ 6SURWRFRO

& 6 6

&EXV
6 &
6XEVWFRPP

ಱ&3 'ULYH 3/&


' 1&. 9',
8QLW V
VOರ ,QWHUIDFH

'3'LUHFW &5LVF
$FFHVV

,QWHUQDOYLUWXDO352),%86
5HDOWLPHV\VWHP

6,180(5,.&RQWURO8QLW 1&8
352),%86 03,352),%86

([WHUQDO
'ULYH
(7
8QLW V

Figure 13-3 NCK/PLC coupling on SINUMERIK 840D (integrated PLC)

NCK/PLC interface
As illustrated in the figure, NCK/PLC data exchange is organized by the basic program in the
PLC. At the beginning of the cycle (OB1), the status information (e.g. "Program running")
written to the internal DPR (DPR = Dual Port RAM) by the NCK is copied to data blocks by
the basic program, which the user can then access (user interface). The control signals for
the NCK (e.g. NC start) entered in the interface data blocks by the user are also written to
the internal DPR and transmitted to the NCK at the start of the cycle.
Workpiece-program-specific auxiliary functions transferred to the PLC are first evaluated by
the basic program (interrupt-driven) and then transferred to the user interface at the start of
OB 1. If the relevant NC block contains auxiliary functions that require the interruption of the
NCK machining process (e.g. M06 for tool change), the basic program halts the decoding of
the NCK block initially for one PLC cycle. The user can then use the "read disable" interface
signal to halt the block execution until the tool change has been completed. If, on the other
hand, the relevant NC block does not contain auxiliary functions requiring the interruption of
the NC machining process (e.g. M08 for "Cooling on"), the transfer of these "rapid" auxiliary

Basic Functions
916 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Linking PLC CPUs to 840D

functions is enabled directly in OB 40, so that block execution is only marginally influenced
by the transfer to the PLC.
The evaluation and enabling of the G functions transferred from the NCK are also alarm-
driven, however they are transferred directly to the user interface. Where a G function is
evaluated at several points in the PLC program, differences in the information of the G
function within one PLC cycle may arise.
In the case of NC actions triggered and assigned with parameters by the PLC (e.g. traverse
concurrent axes), triggering and parameter assignment is performed using FCs and FBs, not
interface data blocks. The FCs and FBs belonging to the actions are supplied together with
the basic program. The FCs and FBs required must be loaded by the user and called in the
PLC program of the machine manufacturer (machine program). For an overview of FC, FB
and data blocks, sorted according to basic and extended functions, please refer to the
chapter "Start-up of PLC programs".

Interface HMI/PLC
HMI/PLC data exchange takes place via the software C bus or via the Ethernet, internal CP,
control-internal C bus link. The CP transfers the data intact from one bus segment to
another. The HMI is always the active partner (client) and the PLC is always the passive
partner (server). Data transmitted or requested by the HMI are read from and written to the
HMI/PLC interface area by the PLC operating system (timing: cycle control point). From the
viewpoint of the PLC application, the data are identical to I/O signals.

Interface MCP/PLC, interface HHU/PLC (Ethernet link)


MCP/PLC and HHU (HT2) /PLC data exchange takes place via the integrated CP's Ethernet
bus. The CP transfers the MCP/HHU signals to and fetches them from the PLC's internal
DPR (Dual-Port RAM). On the PLC side, the basic program handles communication with the
user interface. The basic program parameters define the operand areas (e.g. I/O) and the
start addresses via the parameters of the basic programs (FB 1, DB 7).
Interface MCP/PLC (PROFIBUS link)
MCP/PLC data exchange takes place via the PLC's PROFIBUS. The MCP's I/O addresses
are to be set in the PLC's process image area and via HW configuration in STEP 7. The
MCP*In, MCP*Out pointer variables must be set to the same addresses. The selected DP
slave number must be entered in MCP*BusAdr.
Interface MCP/PLC, interface HHU/PLC (MPI link)
is no longer supported

13.6.4 Diagnostic buffer on PLC


The diagnostic buffer of the PLC (readable using STEP 7) will enter diagnostic information
on the PLC operating system.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 917
Basic PLC Program (P3)
Interface structure

13.7 Interface structure

Interface DBs
Mapping in interface data blocks is necessary due to the large number of signals exchanged
between the NCK and PLC. These are global data blocks from the viewpoint of the PLC
program. During system start-up, the basic program creates these data blocks from current
NCK machine data (no. of channels, axes, etc.). The advantage of this approach is that the
minimum amount of PLC RAM required for the current machine configuration is used.

13.7.1 PLC/NCK interface

General
The PLC/NCK interface comprises a data interface on one side and a function interface on
the other. The data interface contains status and control signals, auxiliary functions and G
functions, while the function interface is used to transfer jobs from the PLC to the NCK.

Data interface
The data interface is subdivided into the following groups:
● NCK-specific signals
● Mode-group-specific signals
● Channel-specific signals
● Axis/spindle/drive-specific signals

Basic Functions
918 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Interface structure

Function interface
The function interface is formed by FBs and FCs. The figure below illustrates the general
structure of the interface between the PLC and the NCK.

'%
+0, 0HVVDJHV

'% 1&
6LJQDOVWR1&.FRPSLOHF\FOHV
1& 6LJQDOVIURP1&.FRPSLOHF\FOHV
'% 1&
6LJQDOVWR1&
6LJQDOVIURP1&
0RGHJURXS
'% 0RGHJURXS
%$* '% 0RGHJURXS
6LJQDOVWRPRGHJURXS
6LJQDOVIURPPRGHJURXS
'DWDLQWHUIDFH

'% +0,
+0, 6LJQDOVWR+0,
6LJQDOVIURP+0, 3/&XVHU
SURJUDP
'% &KDQQHO
'% &KDQQHO
'% &KDQQHO
6LJQDOVWRFKDQQHO
1&FKDQQHO 6LJQDOVIURPFKDQQHO
'% $[LVVSLQGOH
'% $[LVVSLQGOH
$[LV '% $[LVVSLQGOH
VSLQGOH 6LJQDOVWRD[LV
GULYH 6LJQDOVIURPD[LV

'% 7RROPDQDJHPHQW
7RRO -REIRUORDGLQJXQORDGLQJORFDWLRQV
PDQDJHPHQW -REIRUVSLQGOHDQGWXUUHW

)&
1&FKDQQHO 6WDUW$68%
$[LV 6WDUWFRQFXUUHQWD[LVVSLQGOH
VSLQGOH 3RVLWLRQLQJD[LVLQGH[LQJD[LV

7RRO $FNQRZOHGJPHQWIRUWRROPDQDJHPHQW
)XQFWLRQLQWHUIDFH

PDQDJHPHQW 'LUHFWLRQVHOHFWLRQIRUWRROPDJD]LQH

'ULYH 6WDUGHOWDVZLWFKRYHU

)%
5HDGZULWH1&.YDULDEOHV
1& 3,VHUYLFHV
5HDG*8'
+0, PQ

6DIHW\ 6,UHOD\%UDNHVWHVW
LQWHJUDWHG

Figure 13-4 PLC/NCK user interface

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 919
Basic PLC Program (P3)
Interface structure

Compile-cycle signals
In addition to the standard signals exchanged between the PLC and NCK, an interface data
block for compile cycles is also generated if required (DB 9). The associated signals, which
are dependent on the compile cycles, are transmitted cyclically at the start of OB 1. The
basic program starts transmission at the lowest address and works up to the highest. First,
signals are transferred from the PLC to the NCK, then from the NCK to the PLC. The user
must synchronize the NCK and PLC as necessary (e.g. using the semaphore technique).
Signal transmission is asynchronous between NCK and PLC. This means, for example, that
active NCK data transmission can be interrupted by the PLC. This can mean that data is not
always consistent.

PLC/NCK signals
The group of signals from the PLC to NCK includes:
● Signals for modifying the digital and analog I/O signals of the NCK
● Keyswitch and emergency stop signals

'%
%\WH &RQWURORIGLJLWDO1&.LQSXWV
RQERDUGLQSXWV
&RQWURORIGLJLWDO1&.RXWSXWV
 RQERDUGRXWSXWV
 $[LVWDEOHV
 .H\VZLWFKHPHUJHQF\6723
 $FWXDOYDOXHVIRUGLJLWDO1&.LQSXWV
RQERDUGLQSXWV
6HWSRLQWVIRUGLJLWDO1&.RXWSXWV

RQERDUGRXWSXWV
 9DULRXVVLJQDOV
1&.
+DQGZKHHOVHOHFWLRQ
 +0,VWDWXVVLJQDOV +0,
 %DVLFSURJUDPVWDWXVVLJQDOV %3
 6WDWXVVLJQDOV
 6RIWZDUHFDP
'HFRGLQJ  &RQWURORIGLJLWDO1&.LQSXWV
KDQGZKHHO H[WHUQDOLQSXWV
VHOHFWLRQ &RQWURORIGLJLWDO1&.RXWSXWV

H[WHUQDORXWSXWV
$[LVLQWHUIDFH &RQWURORIDQDORJ1&.LQSXWV
*HRD[LVLQWHUIDFHLQ  H[WHUQDOLQSXWV
FKDQQHO
 &RQWURORIDQDORJ1&.RXWSXWV
H[WHUQDORXWSXWV
 $FWXDOYDOXHVIRUGLJLWDO1&.LQSXWV
H[WHUQDOLQSXWV
 6HWSRLQWVIRUGLJLWDO1&.RXWSXWV
H[WHUQDORXWSXWV
 $FWXDOYDOXHVIRUDQDORJ1&.LQSXWV
H[WHUQDOLQSXWV
 6HWSRLQWVIRUDQDORJ1&.RXWSXWV
H[WHUQDORXWSXWV

Figure 13-5 PLC/NCK interface

Basic Functions
920 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Interface structure

NCK/PLC signals
The group of signals from the NCK to PLC includes:
● Actual values of the digital and analog I/O signals of the NCK
● Ready and status signals of the NCK
Also output in this group are the HMI handwheel selection signals and the status signals.
The signals for handwheel selection are decoded by the basic program and entered in the
machine-/axis-specific interface.

Digital/analog inputs/outputs of the NCK


The following must be noted with respect to the digital and analog inputs and outputs of the
NCK:
Inputs:
● All input signals or input values of the NCK are also transferred to the PLC.
● The transfer of signals to the NC part program can be suppressed by the PLC. Instead, a
signal or value can be specified by the PLC.
● The PLC can also transfer a signal or value to the NCK even if there is no hardware for
this channel on the NCK side.
Outputs:
● All signals or values to be output are also transferred to the PLC.
● The NCK can also transfer signals or values to the PLC even if there is no hardware for
this channel on the NCK side.
● The values transferred by the NCK can be overwritten by the PLC.
● Signals and values from the PLC can also be output directly via the NCK I/O devices.

Note
While realizing the digital and analog NCK I/Os the information contained in the following
documentation must be taken into account:
References:
Function Manual Extended Functions; Digital and analog NCK I/Os (A4)

Signals PLC/Mode group


The operating mode signals set by the machine control panel or the HMI are transferred to
the operating mode group (BAG) of the NCK. On the 840D, these are valid for all NCK
channels. On 840D systems, several mode groups can optionally be defined in the NCK.
The mode group reports its current status to the PLC.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 921
Basic PLC Program (P3)
Interface structure

'%
%\WH
%DVLFSURJUDP
 &RQWUROVLJQDOV
0RGHJURXS
0RGHVHOHFWLRQ
0RGH
VHOHFWLRQ  +0,
6HOHFWLRQVLJQDOVIURP+0,

 $FWLYHPRGH

0&3 1&.

Figure 13-6 PLC/Mode group interface

Signals PLC/NCK channels


The signal groups below must be considered on the interface:
● Control/status signals
● Auxiliary/G functions
● Tool management signals
● NCK functions
The control/status functions are transmitted cyclically at the start of OB1. The signals
entered in the channel-specific interface by the HMI (HMI signals are entered by the PLC
operating system) are also transferred at this time if they have been defined on the HMI
operator panel, not on the MCP.
Auxiliary functions and G functions are entered in the interface data blocks in two ways.
First, they are entered with the change signals.
● The M signals M00 - M99 (they are transferred from the NCK with extended address 0)
are also decoded and the associated interface bits set for the duration of one cycle.
● For G functions, only the groups selected via machine data are entered in the interface
data block.
● The S values are also entered together with the related M signals (M03, M04, M05) in the
spindle-specific interface. The axis-specific feedrates are also entered in the appropriate
axis-specific interface.
When the tool management (magazine management) function is activated in the NCK, the
assignment of spindle or revolver and the loading/unloading points are entered in separate
interface DBs (DB71 - 73)
The triggering and parameter assignment of NCK functions is performed by means of PLC
function calls.
The following function calls are available:
● Position a linear axis or rotary axis
● Position an indexing axis
● Start a prepared asynchronous subprogram (ASUB)
● Reading/writing of NC variables
● Update magazine and tool movement
Some of the above functions are described in their own function documentation.

Basic Functions
922 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Interface structure

0&3

+0,
'%
%\WHV 3URJUDPFRQWURO
&RQWUROVLJQDOV
$FWLYDWLQJSURWHFWLRQ

]RQHV
 7UDYHUVHVLJQDOV
%3 *(2D[HV
+0,VLJQDO  3URJUDPFRQWURO

URXWLQJ IURP+0,

 3URJUDPFKDQQHO
VWDWXV 6WDWXVVLJQDOV
 *HRD[HVVWDWXV

 $X[LOLDU\IXQFWLRQ
FKDQJHVLJQDOV $X[LOLDU\*IXQFWLRQV
 067''/+)
YDOXHV %3 1&FKDQQHO
 'HFRGHG0VLJQDOV 0GHFRGHU
00
 $FWLYH*IXQFWLRQV *JURXS
GHFRGHU
6WDWXVVLJQDOV

3URWHFWLRQ]RQHV

$[LVVSLQGOH 06)
LQWHUIDFH GLVWULEXWRU

Figure 13-7 PLC/NCK channel interface

PLC/axis, spindle, drive signals


The axis-specific and spindle-specific signals are divided into the following groups:
● Shared axis/spindle signals
● Axis signals
● Spindle signals
● Drive signals
The signals are transmitted cyclically at the start of OB 1 with the following exceptions:
Exceptions include:
● Axial F value
● M value
● S value
An axial F value is entered via the M, S, F distributor of the basic program if it is transferred
to the PLC during the NC machining process.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 923
Basic PLC Program (P3)
Interface structure

The M and S value are also entered via the M, S, F distributor of the basic program if one or
both values require processing.

'%
)HHGUDWHVSLQGOH
6KDUHG RYHUULGH
%\WHV D[LVVSLQGOH &RQWUROVLJQDOV
VLJQDOV 7UDYHUVHVLJQDOV

 $[LVVLJQDOV /LPLWVZLWFKHV


 6SLQGOHVLJQDOV &RQWUROVLJQDOV
 'ULYHVLJQDOV &RQWUROVLJQDOV
 7HFKQRORJ\ &RQWUROVLJQDOV
*ULQGLQJ $[LV
 5HVHUYH
VSLQGOH
6KDUHG 6WDWXVVLJQDOV
 D[LVVSLQGOH
$FWLYH,1&PRGH
GULYH
VLJQDOV

 $[LVVLJQDOV 6WDWXVVLJQDOV 


$[LDO)YDOXH
6HWJHDUVWHS
 6SLQGOH 6WDWXVVLJQDOV 
VLJQDOV 06YDOXH
 'ULYHVLJQDOV 6WDWXVVLJQDOV
7HFKQRORJ\
 6WDWXVVLJQDOV
*ULQGLQJ

1&.
 YDOXHVRI06DQG)GLVWULEXWRUVRIEDVLFSURJUDP

Figure 13-8 Interface between PLC and axes/spindles/drives

13.7.2 Interface PLC/HMI

General
The following groups of functions are required for the PLC/HMI interface:
● Control signals
● Machine operation
● PLC messages
● PLC status display

Control signals
Some control signals are signal inputs, for example, via the machine control panel, which
have to be taken into account by the HMI. This group of signals includes, for example,
display actual values in MCS or WCS, key disable, etc. These are exchanged with the HMI
via a separate interface data block (DB19).

Basic Functions
924 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Interface structure

Machine operation
All operator inputs, which lead to response actions on the machine, are monitored by the
PLC. Operator actions are usually performed on the machine control panel (MCP). However,
it is also possible to perform some operator actions on the HMI e.g. mode selection.
The PLC operating system enters the operating signals sent by the HMI directly into the
interface data blocks. As standard, the basic program routes these operating signals in such
a way that, provided equivalent operator actions are available, these can be performed either
on the HMI or on the MCP. If required, the user can switch off the operation via HMI through
a parameter "MMCToIF" of FB1.

PLC messages
The signaling functions are based on the system diagnostic functions integrated in the
operating system of the AS 300. These have the following characteristics:
● The PLC operating system enters all important system states and state transitions in a
diagnostics status list. Communication events and I/O module diagnostics data (for
modules with diagnostic functions) are also entered.
● Diagnostics events, which lead to a system stop, are also entered with a time stamp in a
diagnostic buffer (circular buffer) in the chronological order of their occurrence.
● The events entered in the diagnostic buffer are automatically transmitted to human
machine interface systems (OP or HMI) via the bus systems once these have issued a
ready signal (message service). Transfer to the node ready is a function of the PLC
operating system. Receipt and interpretation of the messages are executed by the HMI
software.
● The PLC user program can also use SFCs (System Function Calls) to enter messages in
the diagnostic buffer or ALARM S/ALARM SQ buffer.
● The events are entered in the interrupt buffer.
The associated message texts must be stored on the OP or HMI.
An FC (FC 10) for message acquisition is prepared in conjunction with the basic program.
This FC records events, subdivides them into signal groups and reports them to the HMI via
the interrupt buffer.
The message acquisition structure is shown in the figure "Acquisition and signaling of PLC
events". The features include:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 925
Basic PLC Program (P3)
Interface structure

● Bit fields for events related to the VDI interface are combined in a single data block (DB2)
with bit fields for user messages.
● Bit fields are evaluated at several levels by FC10.
– Evaluation 1; Acquisition of group signals
A group signal is generated for each group of signals if at least one bit signal is set to
"1". This signal is generally linked to the disable signal of the VDI interface (on
modules with diagnostic functions). The group signals are acquired completely in
cycles.
– Evaluation 2; Acquisition of interrupt messages
A fixed specification exists to define which signals in a group generate an interrupt
message when they change from "0" to "1".
– Evaluation 3; Acquisition of operating signals
A fixed specification exists to define which signals in a group generate an operational
message.
● The scope of the user bit fields (user area) is set by default to 10 areas with 8 bytes each,
but the number of areas can also be adjusted to suit the requirements of the machine
manufacturer via basic program parameters in FB 1.

Acknowledgment concept
The following acknowledgment procedures are implemented for error and operational
messages:
Operating messages are intended for the display of normal operating states as information
for the user. Acknowledgment signals are, therefore, not required for this type of message.
An entry is made in the diagnostic status list for incoming and outgoing messages. The HMI
maintains an up-to-date log of existing operating messages using the identifiers "operating
message arrived" and "operating message gone".
Interrupt messages are used to display error states on the machine, which will usually lead
to the machine being stopped. Where several errors occur in rapid succession, it is important
to be able to distinguish their order of occurrence for troubleshooting purposes. This is
indicated, on the one hand, by the order in which they are entered in the diagnostic buffer
and on the other, by the time stamp, which is assigned to every entry.
If the cause of the error disappears, the associated interrupt message is only deleted if the
user has acknowledged it (e.g. by pressing a key on the MCP). In response to this signal, the
"Message acquisition" FC examines which of the reported errors have disappeared and
enters these in the diagnostic buffer with the entry "Interrupt gone". This enables the HMI to
also maintain an up-to-date log of pending interrupt messages. The time of day indicating the
time at which the error occurred is maintained for messages, which are still pending (in
contrast to a received interrogation).

STEP 7
A tool can be started in the SIMATIC Manager via menu item "Target system" > "CPU
messages". Alarms and messages can be displayed by number using this tool. To do this,
acivate the "Alarm" tab and enter a check mark under "A" in the upper half of the screen.

Basic Functions
926 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Interface structure

User program
The user PLC program merely needs to call the basic program block FC 10 with appropriate
parameter settings in the cyclic program section and set or reset the bit fields in DB2. All
further necessary measures are implemented by the basic program and HMI.

&KDQJHVLJQDOV

%LWILHOGV
0HVVDJH
DFTXLVLWLRQ
&KDQQHO )HHGGLVDEOH
5HDGLQGLVDEOH
1&VWDUWGLVDEOH

&KDQQHOQ $/$50B6
6)&
$/$50B64
$[LVVSLQGOH )HHGUDWHVSLQG
OHGLVDEOH

$[LVVSLQGOHQ

8VHUDUHD ,QWHUUXSW
EXIIHU

$FTXLVLWLRQ 0HVVDJHVHUYLFH
*URXSVLJQDOV RIJURXSVLJQDOV
GLVDEOHVLJQDOV IRUFKDQQHODQG 3* +0,23
D[LV'%

Figure 13-9 Acquisition and signaling of PLC events

Extensions of the PLC alarms via the block FC 10


The FB 1-parameter "ExtendAlMsg" helps in making a selection of the PLC alarm
mechanism.
If "ExtendAlMsg:= FALSE" the earlier process of the FC 10 with the DB 2 is active as bit-field
data block. The known restrictions regarding the number of channels and axes are
applicable.
On the other hand, in case of "ExtendAlMsg:= TRUE" the extension of the FC 10 becomes
active. The DB 2 and DB 3 are created as usual. The user must set or reset the bits in DB 2.
The parameter setting via message and alarm and a parameter setting of the numeric value
of the 2nd decade of the user alarms are contained in DB 5.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 927
Basic PLC Program (P3)
Interface structure

The extensions are:


● Support for 10 channels, 31 axes.
● Areas for feed stop, read-in disable, etc. are available without messages. The information
from this area is stored on the interface in DB21, DB31 depending upon the FC 10-
parameter "ToUserIF" together with the related message bits as group signals. As such,
the previous cumbersome handling of the signals is omitted.
● The alarms/messages also get the 16-bit integer additional value (%Z parameter in the
alarm text) in addition to the alarm number for the user area 0. The user must write the
16-bit integer values in the DB 2 in the Array variable ZInfo0 parallel to setting an alarm
bit. An integer value is available for each bit in the user area 0, see UDT1002 in the basic
program.
● The user messages can be parameteized in the second decade of the message number
in the numerical range 0 to 9. The display value of the second decade must be written by
the user in the DB5 in the array variable UserDek2No. A number can be defined for each
user area, see DB 5 in the basic program.
The value 0 is set by default for second decade.
The structuring of the DB 2 in UDT1002 can be recoginzed (basic program). In case of new
alarm functions, the UDT1002 must be assigned symbolically to the DB2.
At the start of DB 2 there are bit fields for signals without alarm generation. This is followed
by an array of size 64 integer for additional info of the user area 0.
Thereafter follow the areas, which also trigger alams/messages (see Parameter Manual)
These areas are extended to 10 channels, 31 axes.

Simple implementation of a user program on the new alarms


The source container of the basic program contains the file "udt2_for_Convert.awl", which
has the following structural element from UDT1002:
● ChanA as array of 1 ... 8
● AxisA as array of 1 ... 18
● UserA as array of 1 ... 31
This UDT2 is to be compiled via the KOP/FUP/AWL - Editor. The UDT2 must be assigned to
the DB 2 in the symbol table.
Sources must be generated for components, which have assignments on DB 2. Alternatively,
sources can naturally be created for all blocks too. The UDT1002 must now be assigned to
the DB 2 in the symbol table. Thereafter, the sources must be recompiled.
Now all the alarm allocations are assigned to the new data areas in the DB 2 and now only
the parameter "ExtendAlMsg" at FB 1 must be set to True.
After a Power On RESET the alarm behavior is the same as earlier.

Basic Functions
928 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Interface structure

13.7.3 PLC/MCP/HHU interface

General
There are three different connection options for the machine control panel (MCP) and the
handheld unit (HHU). This is in part due to the history of the MCP and HHU. This description
focuses primarily on the connection of the Ethernet components.
On SINUMERIK 840 D sl, the machine control panel (MCP) or HT8 (MCP) and handheld unit
HT1, HT2 (HHU) are connected via the Ethernet bus, which also links the TCU to the NCU.
The advantage of this is that only one bus cable is required to connect the operator unit.

Topology SINUMERIK 840D sl


On the 840 D, the machine control panel and the handheld unit are connected to the CP
840D sl Ethernet bus (see Figure below). Where the connection of further keys and displays
is required for customized operator panels, an additional keyboard interface (machine control
panel without operating unit) can be used. For each keyboard interface, 64 pushbuttons,
switches, etc. and 64 display elements can be connected via ribbon cable.
The signals sent from the MCP are copied to the PLC's DPR (Dual Port RAM) by the
integrated Ethernet CP-840D sl. The basic program of the PLC enters the incoming signals
in the input image configured on FB1. The NC-related signals are generally distributed by the
basic program to the VDI interface. If required, the signals can be modified by the user.
The signals from the PLC to the MCP (displays) are transferred in the opposite direction.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 929
Basic PLC Program (P3)
Interface structure

++8
&XVWRPL]HG
7&8
NH\VGLVSOD\V 0&3

(WKHUQHWEXV

&3'VO 1&.
+0,
):

3*
(QJLQHHULQJ
(WKHUQHWEXV

'35
)%
0&3
VLJ

3/&

Figure 13-10 Connection of the machine control panel on 840D sl

Topology SINUMERIK 840Di sl


In case of 840Di sl the machine control panel, the handheld unit are connected via Ethernet
or PROFIBUS. The PLC operating system copies the incoming signals straight to the user
interface (e.g. input image) at the cycle control point. As on the SINUMERIK 840 D sl,
transfer to the VDI interface is performed by the user program or by standard blocks of the
basic program (e.g. FC19).

Bus addresses
On Ethernet components, MAC and IP addresses or logic names are determining factors in
respect of communication. The control system's system programs convert logic names into
MAC or IP addresses. On the PLC, the numeric component of the logic name is used for
communication. This numeric part is specified by the user to the FB 1 via the parameter
"MCPxBusAdr".
The logical name of an MCP or HHU always begins with "DIP". This is followed by a number
corresponding to the switch position of the MCP component (e.g. DIP 192, DIP 17).

Basic Functions
930 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Interface structure

MCP interface in the PLC


The signals from the machine control panel are routed by default via the I/O interface to the
PLC area. A distinction must be made between NC and machine-specific signals. NC-
specific key signals are distributed to the relevant mode-group-, NCK-, axis- and spindle-
specific interface by FC19 (or FC24, FC25, FC26, depending on the type of MCP) by default.
The reverse applies to the associated status signals, which are routed to the MCP interface.
For this purpose, FC 19 or the other blocks mentioned above must be called in the user
program.
Customized keys, which can be used to trigger a wide range of machine functions, must be
evaluated directly by the user program. The user program also routes the status signals to
the output area for the LEDs.

)&
2SHUDWLQJPRGHV 
,1&PRGH
,%Q .H\ )HHGUDWHVSLQGOHRYHUULGH
VLJQDOV 'LUHFWLRQNH\V
.H\ORFNVZLWFK
0RGH
8VHUNH\V JURXS
1&.D[LV
&XUUHQWPRGH VSLQGOH
/LJKW &XUUHQW,1&PRGH LQWHUIDFH
4%P HPLWWLQJ )HHGUDWHVSLQGOH1&VWDWXV
GLRGHV $FWLYHGLUHFWLRQNH\
/('V
6WDWXVRIFXVWRPL]HGNH\V

0RQLWRULQJRIWUDQVPLW
$'R
GDWD

$'S 5HFHLYHGDWD
PRQLWRULQJ

'HIDXOWVHWWLQJ
'!Q P R S 

Figure 13-11 Interface to and from machine control panel

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 931
Basic PLC Program (P3)
Structure and functions of the basic program

13.8 Structure and functions of the basic program

General
The program is modular in design, i.e. it is structured according to NCK functions.
In the operating system, a distinction is made between the following levels of execution:
● Start-up and synchronization (OB 100)
● Cyclic mode (OB 1)
● Process interrupt handling (OB 40)
● Diagnostic interrupt, module failure processing (OB 82, OB 86)
Each section of the basic program - as illustrated in the figure below - must be called by the
user in OBs 1, 40 and 100.

Basic Functions
932 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

)%
2%
6WDUWXS
5HVWDUW

8VHU
SURJUDP
2% 1&.
)& %$*
&\FOLF &KDQQHO
PDFKLQLQJ *32%
$[LVVSLQGOH
$X[LOLDU\IXQFWLRQV
6DIHW\

0&3++8

70

)&
0&3
8VHU 0&3B,)0
SURJUDP
)& 
0&3B,)7
$68%
FRQ
)& $[HVVSLQGOHV
70
70B7UDQV )%
70B'LU 5HDGZULWH
YDU
)& 3,VHUYLFHV
6WDUGHOWD )&
++8
)& 'LVSOD\
(UURUDQG FRQWURO
VWDWXV
PHVVDJHV
2% )&
3URFHVV *JURXSV
LQWHUUXSW *3B35$/
70
352),VDIH
8VHU $X[LOIXQFWLRQV
SURJUDP

Figure 13-12 Structure of the basic program

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 933
Basic PLC Program (P3)
Structure and functions of the basic program

13.8.1 Start-up and synchronization of NCK PLC

Loading the basic program


The basic program must be loaded with the S7 tool when the PLC is in the Stop state. This
ensures that all blocks in the basic program will be initiated correctly the next time they are
called. Otherwise, undefined states can occur in the PLC (e.g. blinking of all PLC LEDs).

Start-up
The synchronization of NCK and PLC is performed during startup. The system and user data
blocks are checked for integrity and the most important basic program parameters are
verified for plausibility. In cases of errors, the basic program produces an alarm (visible on
HMI) and switches the PLC to the Stop state.
A warm restart is not provided, i.e. following system initialization, the operating system runs
organization block OB 100 and always commences cyclic execution at the start of OB 1.

Synchronization
The PLC is synchronized with the HMI and NCK and CP during power-up.

Sign-of-life
After a correct initial start and the first complete OB1 cycle (initial setting cycle) the PLC and
NCK continuously exchange sign of life signals. If the sign of life from the NCK fails to
materialize, the PLC/NCK interface is initialized and the signal "NCK CPU ready" in DB 10 is
set to FALSE.

13.8.2 Cyclical mode (OB 1)

General
The NCK PLC interface is processed completely in cyclic mode. From a chronological
viewpoint, the basic program runs ahead of the user program. In order to minimize the
execution time of the basic program, only the control/status signals are transmitted cyclically;
transfer of the auxiliary functions and G functions only takes place on request.
The following functions are performed in the cyclic part of the basic program:
● Transmission of the control/status signals
● Distribution of the auxiliary functions
● M decoding (M00 - M99),
● M, S, F distribution
● Transmission of the MCP signals via the NCK (on the SINUMERIK 840D only)
● Acquisition and conditioning of the user errors and operating messages.

Basic Functions
934 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

Control/Status signals
A shared feature of the control and status signals is that they are bit fields. The basic
program updates them at the start of OB1.
The signals can be subdivided into the following groups:
● General signals
● Mode group-specific signals (such as mode types)
● Channel-specific signals (such as program and feed modifications)
● Axis- and spindle-specific signals (such as feed disable)

Auxiliary and G functions


The auxiliary and G functions have the following characteristics:
● Transfer to the PLC is block-synchronous (referred to a part program block)
● Transfer is acknowledge-driven.
● The acknowledgment times have an immediate effect on the execution time of NC blocks
containing auxiliary functions requiring acknowledgment.
The value range is presented in the table below:

Function Structure Range of values Data type


1st value 2nd value 1st value 2nd value 1st value 2nd value
G function G function 2551) Byte
M word M group M word 99 99.999.999 Word DWord
S word Spindle no. S word 6 Floating Word DWord
point2)
T word Magazine T word 99 65535 Word Word
no.
D word - D word 99 255 Byte Byte
H word H group H word 99 Floating Word DWord
point
F word Axis No. F word 18 Floating Word DWord
point
1) relative number, transferred for each G group

The M, S, T, H, D and F values sent by the NCK are output together with the accompanying
change signals to the CHANNEL DB interface via the auxiliary/G functions (see Parameter
Manual). The function value and the extended address are transferred to the appropriate
data word. The accompanying modification signal is activated to 1 for one PLC cycle. When
the modification signal is reset, the acknowledgment is passed to the NCK. The
acknowledgment of high-speed auxiliary functions is given by the basic program immediately
the basic program detects the auxiliary function.
In addition to distribution of the auxiliary and G functions, selected signals are processed as
described below.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 935
Basic PLC Program (P3)
Structure and functions of the basic program

M decoder
M functions can be used to transfer both switching commands and fixed point values.
Decoded dynamic signals are output to the CHANNEL DB interface for standard M functions
(range M00 - M99) signal length = 1 cycle time).

G group decoders
In the case of G functions sent by the NCK, the related groups are decoded and the current
G number is entered in the corresponding interface byte of the CHANNEL DB, i.e. all active
G functions are entered in the channel DBs. The entered G functions are retained even after
the NC program has terminated or aborted.

Note
During system startup, all G group bytes are initialized with the value "0".

M, S, F distributor
The M, S, F, distributor is used to enter spindle-specific M words M(1...6)=[3,4,5], S words
and F words for axial feeds in the appropriate spindle and axis data blocks. The criterion for
distribution is the extended address, which is passed to the PLC for M words, S words and
axial F words.

MCP signal transmission


On the SINUMERIK 840 D, depending on the bus connection, MCP signals are transmitted
to the parameterized I/O areas either directly to the PLC or indirectly via an internal
procedure using the basic program.

User messages
The acquisition and processing of the user error and operational messages is performed by
an FC in the basic program.

13.8.3 Time-interrupt processing (OB 35)


The user must program OB 35 for time-alarm processing. The default time base setting of
OB 35 is 100 ms. A different time base can be selected using the STEP7 "HW Config" tools.
However, the OB 35 time setting must be at least 3 ms in order to avoid a PLC CPU stop.
The stop is caused by reading of the HMI system state list during power-up of the HMI. This
reading process blocks priority class control for approx. 2 ms. The OB 35 with a time base
set to a rather lower value is then no longer processed correctly.

Basic Functions
936 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

13.8.4 Process interrupt processing (OB 40)


A process interrupt OB 40 (interrupt) can, for example, be triggered by appropriately
configured I/Os or by certain NC functions. Due to the different origin of the interrupt, the
PLC user program must first interpret the cause of the interrupt in OB 40. The cause of the
interrupt is contained in the local data of OB 40.
References:
SIMATIC STEP 7 Description or Online Help of STEP 7

13.8.5 Diagnostic interrupt, module failure processing (OB 82, OB 86)

General
A module diagnosis or module failure on an I/O module triggers OB 82/OB 86. These blocks
are supplied by the basic program. The basic program block FC5 is called in these OBs. This
is wired by default to trigger a PLC stop in the event of an error being detected.
A PLC Stop
● If the cause of the error is removed, a PLC stop will not be triggered.
● does not occur in case of the Profibus-MCPs specified as the FB 1 parameters.
The response can be changed by modifying the FC5 parameter setting.

PROFIBUS Diagnosis
The slaves of both the PROFIBUS connections MPI/DP or DP1 are registered by the basic
program as group message in the form of a ready signal in the interface signal
DB10 DBX92.0 (MPI/DP Bus Slaves OK) and
DB10 DBX92.1 (DP1 Bus Slaves OK)
The group message is derived from the LED status of the respective PROFIBUS (System
state list SZL 0x174).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 937
Basic PLC Program (P3)
Structure and functions of the basic program

If an error or a failure of a slave is detected, the alarm 400551 or 400552 is also reported.
The alarm is automatically deleted when the error is removed. Detailed information about the
error or the failure will be displayed in the alarm messages as exact cause of error in a future
HMI software version in the diagnostics. No FC 125, FB 125 is necessary for this diagnostic
display, because the information is called directly from the HMI via the corresponding SZL
functions of the PLC operating system via the communication channels to the PLC. This
saves the relatively large block in the PLC and reduces also the PLC cycle time. Since the
FB 125 works under interrupt disable during its processing, OBs with a higher priority can be
executed more quickly.

Note
Till the HMI software version with the diagnostic display for the PROFIBUS becomes
available, it is recommended to use FC 125 for PROFIBUS diagnostics. This block has
relatively less cycle time and the slave states can be updated via the DB 10 interface signal
mentioned earlier by activating the FC 125 block.

13.8.6 Response to NCK failure

General
During cyclic operation, the PLC basic program continuously monitors NCK availability by
polling the sign-of-life character. If the NCK is no longer reacting, the NCK PLC interface is
initialized, and the NCK CPU ready signal in the area of the signals from NC (DB 10.DBX
104.7) is reset. Furthermore, the signals sent from the NCK to the PLC and vice versa are
set to an initial state.
The PLC itself remains active so that it can continue to control machine functions. However,
it remains the responsibility of the user program to set the machine to a safe state.

NCK → PLC signals


The signals sent by the NCK to the PLC are divided into the following groups:
● Status signals from the NCK, channels, axes and spindles
● Modification signals of the auxiliary functions
● Values of the auxiliary functions
● Values of the G functions
Status signals:
The status signals from the NCK, channels, axes, and spindles are reset.
Auxiliary-function modification signals:
Auxiliary-function modification signals are also reset.

Basic Functions
938 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

Auxiliary-function values:
Auxiliary-function values are retained so that it is possible to trace the last functions triggered
by the NCK.
G-function values:
G function values are reset (i.e. initialized with the value 0 respectively).

PLC → NCK signals


The signals sent by the PLC to the NCK are divided into control signals and tasks that are
transferred by FCs to the NCK.
Control signals:
The control signals from the PLC to the NCK are frozen; cyclic updating by the basic
program is suspended.
Jobs from PLC to NCK:
The FCs and FBs, which are used to pass jobs to the NCK, must no longer be processed by
the PLC user program, as this could lead to incorrect checkback signals. During power-up of
the control, a job (e.g. read NCK data) must not be activated in the user program until the
NCK CPU ready signal is set.

13.8.7 Functions of the basic program called from the user program

General
In addition to the modules of the basic program, which are called at the start of OBs 1, 40
and 100, functions are also provided, which have to be called and supplied with parameters
at a suitable point in the user program.
These functions can be used, for example, to pass the following jobs from the PLC to the
NCK:
● Traversing concurrent axes (FC 18)
● Start asynchronous subprograms (ASUBs) (FC 9),
● Selecting NC programs (FB 4)
● Control of spindle (FC 18),
● Read/write variables (FB 2, FB 3).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 939
Basic PLC Program (P3)
Structure and functions of the basic program

Note
The following note will later help you to check and diagnose a function call (FCs, FBs of
basic program). These are FCs and FBs, which are controlled by a trigger signal (e.g. via
parameter Req, Start, etc.), and which supply an execution acknowledgment as an output
parameter (e.g. via parameter Done, NDR, Error, etc.). A variable compiled of other
signals, which produce the trigger for the function call should be set. Start conditions may
be reset only as a function of the states of parameters Done, NDR and Error.
This control mechanism may be positioned in front of or behind the function call. If the
mechanism is placed after the call, the output variables can be defined as local variables
(advantage: Reduction of global variables, flags, data variables and time-related
advantages over data variables).
The trigger parameter must be a global variable (e.g. flag, data variable).
In OB 100, jobs still activated by the user program (Parameter Req,
Start, etc.:= TRUE) must be set to zero at the named parameters. A POWER OFF/ON
could result in a state in which jobs are still active.

Concurrent axes
The distinguishing features of concurrent axes are as follows:
● They must be defined as such via the NC machine data.
● They can be traversed either from the PLC or from the NC by means of the JOG keys,
● Starting from the PLC is possible in the NC operating modes MDA and AUTOMATIK via
FC,
● The start is independent of NC block boundaries.
Function calls are available for positioning axes, indexing axes and spindles (FC 18).

)&
6SLQ&WUO
6WDUW ,Q3RV
6WRS (UURU
)XQFW 6WDWH
0RGH
$[LV1R
3RV
)5DWH
,QSXW 6WDUWLQJ
SDUDPHWHUV SDUDPHWHUV

Figure 13-13 FC 18 input/output parameters

ASUBs
Asynchronous subprograms (ASUBs) can be used to activate any function in the NCK.
Before an asynchronous subprogram can be started from the PLC, it must be ensured that it
is available and prepared by the NC program or by FB 4 PI services (ASUB).

Basic Functions
940 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

Once prepared in this way, it can be started at any time from the PLC. The NC program
running in one of the parameterized channels of FC 9 is interrupted by the asynchronous
subprogram. An ASUB is started by calling FC 9 from the user program by setting the start
parameter to 1.

)&
$683
6WDUW $FWLY
&KDQ1R 'RQH
,QW1R (UURU
6WDUW(UU
5HI

Note
If an asynchronous subprogram has not been prepared by an NC program or by FB 4
(ASUB) (e.g. if no interrupt no. has been assigned), a start error is output (StartErr = TRUE).

Read/Write NC variables
NCK variables can be read with FB GET while values can be entered in NCK variables with
FB PUT. The NCK variables are addressed via identifiers at inputs Addr1 to Addr8.
The identifiers (symbols) point to address data, which must be stored in a global DB.
To allow generation of this DB, PC software is supplied with the basic program with which
the required variables can be selected from a table, which is also supplied. The selected
variables are first collected in a second, project-related list. Command Generate DB creates
a "*.AWL" file, which must be linked to the program file for the machine concerned and
compiled together with the machine program.
1 to 8 values can be read or written with a read or write job. If necessary, the values are
converted [e.g. NCK floating point values (64 bits) are converted to PLC format (32 bits with
24-bit mantissa and 8-bit exponent) and vice versa]. A loss of accuracy results from the
conversion from 64-bit to 32-bit REAL. The maximum precision of 32-bit REAL numbers is
approximately 10 to the power of 7.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 941
Basic PLC Program (P3)
Structure and functions of the basic program

)% )%
*(7 387
5HT (UURU 5HT (UURU
1XP9DU 1'5 1XP9DU 'RQH
$GGU 6WDWH $GGU 6WDWH
8QLW 8QLW
&ROXPQ &ROXPQ
/LQH /LQH
5' 6'

Functions AG_SEND, AG_RECV


The named functions correspond to the functions of the library "SIMATIC_NET_CP" of the
S7-300 CPU in STEP 7. In general, these functions are valid for the online help of these
functions. The functions AG_SEND, AG_RECV can be used for data exchange with another
station via the integrated "CP 840D sl".
There are a total of 5 functions for the "AG Functions"
1. AG_SEND (SINUMERIK 840D sl)
2. AG_RECV (SINUMERIK 840D sl)
3. AG_LOCK (currently not implemented)
4. AG_UNLOCK (currently not implemented)
5. AG_CNTRL (currently not implemented)
The 3 functions mentioned last are currently not available for SINUMERIK 840D.

Note
For the function AG_SEND the signal sequence for the parameter ACT is currently displayed
wrongly. ACT must be TRUE as long as an event is reported in DONE or ERROR.

When using the functions AG_SEND, AG_RECV a data transport to the other point takes
place via the Ethernet Bus of the CP. The other point is configured normally in STEP 7 in
NetPro. The special feature in the call of the functions lies in the specification of the
parameter "LADDR" to the named blocks.
In case of SINUMERIK 840D sl the parameter "LADDR" must be filled with the value
W#16#8110. In the basic program, these functions are available under the FC numbers
1005, 1006, 1007, 1008, 1010.

Basic Functions
942 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

Table 13- 2 Allocation of the FC numbers to the corresponding FC in the library "SIMATIC_NET_CP"
FC number FC Blocks
1005 FC 5
1006 FC 6
1007 FC 7
1008 FC 8
1010 FC 10
These blocks can also be used in a SIMATIC-CPU 3xx with CP343-1.
The protocols TCP and UDP are supported. TCP is to be preferred.

Note
Other communication blocks, such as BSEND, USEND, which possess a CP343-1, are not
supported in SINUMERIK 840D sl.

13.8.8 Symbolic programming of user program with interface DB

General

Note
The basic program library on the CD supplied with the Toolbox for the 840D contains files
NST_UDTB.AWL and TM_UDTB.AWL.

The compiled UDT blocks from these two files are stored in the CPU program of the basic
program.
A UDT is a data type defined by the user that can, for example, be assigned to a data block
generated in the CPU.
Symbolic names of virtually all the interface signals are defined in these UDT blocks.
The UDT numbers 2, 10, 11, 19, 21, 31, 71, 72, 73 are used.
The assignments have been made as follows:

UDT assignments
UDT number Assignment to interface DB Significance
UDT 2 DB 2 Interrupts/Messages
UDT 10 DB 10 NCK signals
UDT 11 DB 11 Mode group signals
UDT 19 DB 19 HMI signals
UDT 21 DB 21 to DB 30 Channel signal
UDT 31 DB 31 to DB 61 Axis/spindle signals

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 943
Basic PLC Program (P3)
Structure and functions of the basic program

UDT assignments
UDT number Assignment to interface DB Significance
UDT 71 DB71 Tool management: Load/unload locations
UDT 72 DB 72 Tool management: Change in spindle
UDT 73 DB 73 Tool management: Change in revolver
UDT 77 DB 77 MCP and HHU signals with standard SDB 210
UDT 1002 DB 2 extended alarms/messages (FB 1-Parameter
"ExtendAlMsg:=TRUE"
To symbolically program the interface signals, the interface data blocks must first be
symbolically assigned using the symbol editor.
For example, symbol "AxisX" is assigned to operand DB31 with data type UDT 31 in the
symbol file.
After this input, the STEP 7 program can be programmed in symbols for this interface.

Note
Programs generated with an earlier software version that utilize the interface DBs described
above can also be converted into symbol programs. A fully qualified instruction for data
access e.g. "U DB31.DBX60.0" is then necessary here for (spindle/ no axis) in the program
created till now. This command is converted upon activation of the symbolics in the editor
"AxisX.E_SpKA".

Description
Abbreviated symbolic names of the interface signals are defined in the two STL files
NST_UDTB.AWL and TM_UDTB.AWL.
In order to create the reference to the names of the interface signals, the name is included in
the comment after each signal.
The names are based on the English language. The comments are in English.
The symbolic names, commands and absolute addresses can be viewed by means of a
STEP 7 editor command when the UDT block is opened.

Note
Unused bits and bytes are listed, for example, with the designation "f56_3".
• "56": Byte address of the relevant data block
• "3": Bit number in this byte

Basic Functions
944 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

13.8.9 M decoding according to list

Description of functions
When the M decoding according to list function is activated via the GP parameter of FB1
"ListMDecGrp" (number of M groups for decoding), up to 256 M functions with extended
address can be decoded by the basic program.
The assignment of the M function with extended address and the bit to be set in the signal
list is defined in the decoding list. The signals are grouped for this purpose.
The signal list contains 16 groups with 16 bits each as decoded signals.
There is only one decoding list and one signal list i.e. this is a cross-channel function.
The M functions are decoded. Once they are entered in the decoding list, then the
associated bit in the signal list is set.
When the bit is set in the signal list, the read-in disable in the associated NCK channel is set
simultaneously by the basic program.
The read-in disable in the channel is reset once the user has reset all the bits output by this
channel and thus acknowledged them.
The output of an M function decoded in the list as a high-speed auxiliary function does not
result in a read-in disable.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 945
Basic PLC Program (P3)
Structure and functions of the basic program

The figure below shows the structure of the M decoding according to list:

&KDQQHO '% 8VHUSURJUDP


1&SDUWSURJUDP 3/&EDVLFSURJUDP

'HFRGLQJOLVW )&;

0GHFRGLQJDFF
10  WROLVW

6LJQDOVWR1& '%

6LJQDOOLVW

5HDGLQ
GLVDEOH 3URFHVVLQJ
6WDWXVFRQWURO
&KDQQHO VLJQDOV
1&SDUWSURJUDP 5HDGLQ ฺ
GLVDEOH '% )&<
ฺ
5HDGLQGLVDEOH
10 

'%

5HDGLQGLVDEOH

Figure 13-14 M decoding acc. to list

Activation of the function


The number of groups to be evaluated/decoded is indicated in the basic program parameter
"ListMDecGrp" when FB 1 is called in OB 100 (see also "FB 1: RUN_UP Basic program,
start-up section (Page 898)"). M decoding is activated if this value is between 1 and 16.
Before the function is activated, the decoding list DB75 must be transferred to the PLC
followed by a restart.

Structure of decoding list


The source file for the decoding list (MDECLIST.AWL) is supplied with the basic program.
DB 75 is created when the STL source is compiled.
There must be an entry in decoding list DB 75 for every group of M functions to be decoded.
A maximum of 16 groups can be created.
16 bits are available in each group in the list of decoded signals.
The assignment between the M function with extended address and the bit to be set in the
signal list is specified via the first and last M functions in the decoding list.

Basic Functions
946 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

The bit address is generated correspondingly from the first M function ("MFirstAdr") to the
last M function ("MLastAdr") from bit 0 up to maximum bit 15 for each group.
Each entry in the decoding lists consists of 3 parameters, each of which is assigned to a
group.

Assignment of groups
Group Extended First M address in group Last M address in group
M address
1 MSigGrp[1].MExtAdr MSigGrp[1].MFirstAdr MSigGrp[1].MLastAdr
2 MSigGrp[2].MExtAdr MSigGrp[2].MFirstAdr MSigGrp[2].MLastAdr
... ... ... ...
16 MSigGrp[16].MExtAdr MSigGrp[16].MFirstAdr MSigGrp[16].MLastAdr

Type and value range for signals


Signal Type Value range Remark
MExtAdr Int 0 ... 99 Extended M address
MFirstAdr DInt 0 to 99.999.999 First M address in group
MLastAdr Dint 0 to 99.999.999 Last M address in group

Signal list
Data block DB 76 is set up when the function is activated.
A bit is set in the appropriate group in DB 76 for an M signal decoded in the list.
At the same time, a read-in disable is set in the channel in which the M function has been
output.

Example
Three groups of M commands are to be decoded in the following example:
● M2 = 1 to M2 = 5
● M3 = 12 to M3 = 23
● M40 = 55
Structure of the decoding list in DB 75:

Example parameters
Group Decoding list (DB 75) Signal list
Extended First Last DB 76
M address M address M address
in group in group
1 2 1 5 DBX 0.0 ... DBX 0.4
2 3 12 23 DBX 2.0 ... DBX 3.3
3 40 55 55 DBX 4.0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 947
Basic PLC Program (P3)
Structure and functions of the basic program

DATA_BLOCK DB 75
TITLE =
VERSION : 0.0
STRUCT
MSigGrp : ARRAY [1 .. 16 ] OF STRUCT
MExtAdr : INT ;
MFirstAdr : DINT;
MLastAdr : DINT;
END_STRUCT;
END_STRUCT;
BEGIN
MSigGrp[1].MExtAdr := 2;
MSigGrp[1].MFirstAdr := L#1;
MSigGrp[1].MLastAdr := L#5;
MSigGrp[2].MExtAdr := 3;
MSigGrp[2].MFirstAdr := L#12;
MSigGrp[2].MLastAdr := L#23;
MSigGrp[3].MExtAdr := 40;
MSigGrp[3].MFirstAdr := L#55;
MSigGrp[3].MLastAdr := L#55;
END_DATA_BLOCK

Structure of FB 1 in the OB 100


(enter the number of M groups to be decoded in order to activate the function):

Call FB 1, DB 7(
...
ListMDecGrp := 3, //M decoding of three groups
...
);

The appending of the entry in OB 100 and transfer of DB 75 (decoding list) to the AG must
be followed by a restart. During the restart, the basic program sets up DB76 (signal list).
If the NC program is started at this point and the expanded M function (e.g. M3=17) is
processed by the NCK, this M function will be decoded and bit 2.5 set in DB 76 (see
decoding list DB 75). At the same time, the basic program sets the read-in disable and the
processing of the NC program is halted (in the corresponding NC-channel DB the entry
"expanded address M function" and "M function no." is made).
The read-in disable in the channel is reset once the user has reset and, therefore,
acknowledged, all the bits output by this channel in the signal list (DB 76).

Basic Functions
948 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

13.8.10 PLC machine data

General
The user has the option of storing PLC-specific machine data in the NCK. The user can then
process these machine data after the power-up of the PLC (OB 100). This enables, for
example, user options, machine expansion levels, machine configurations, etc., to be
implemented.
The interface for reading these data lies in the DB 20. However, DB20 is set up by the basic
program during power-up only when user machine data are used i.e. sum of GP parameters
"UDInt", "UDHex" and "UDReal" is greater than zero.
The sizes of the individual areas, and hence the total length of the DB 20, is set by the
following PLC machine data:
MD14504 $MN_MAXNUM_USER_DATA_INT
MD14506 $MN_MAXNUM_USER_DATA_HEX
MD14508 $MN_MAXNUM_USER_DATA_FLOAT
These settings are specified to the user in the GP parameters "UDInt", "UDHex" and
"UDReal".
The data is stored in the DB 20 by the BP in the sequence:
1. Integer-MD
2. Hexa-fields MD
3. Real-MD
The integer and real values are stored in DB 20 in S7 format.
Hexadecimal data are stored in DB20 in the order in which they are input (use as bit fields).

'%

8VHUPDFKLQH 1RRI8',QW
GDWDW\SH,17

8VHUPDFKLQH 1RRI8'+H[
GDWDW\SH%<7(

8VHUPDFKLQH 1RRI8'5HDO
GDWDW\SH5($/

Figure 13-15 DB 20

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 949
Basic PLC Program (P3)
Structure and functions of the basic program

Note
If the number of PLC machine data used is increased later, then DB20 must be deleted
beforehand. To prevent such extensions in use having any effect on the existing user
program, the data in DB20 should be accessed in symbolic form wherever possible, e.g. by
means of a structure definition in the UDT.

Interrupts
400120 Delete DB 20 in PLC and restart
Explanation DB length is not the same as the required DB length
Response Interrupt display and PLC Stop
To correct or Delete DB 20 followed by RESET
avoid errors
Continuation After cold restart

Example
The project in the example requires 4 integer values, 2 hexadecimal fields with bit
information and 1 real value.
Machine data:
MD14510 $MN_USER_DATA_INT[0] 123
MD14510 $MN_USER_DATA_INT[1] 456
MD14510 $MN_USER_DATA_INT[2] 789
MD14510 $MN_USER_DATA_INT[3] 1011
...
MD14512 $MN_USER_DATA_HEX[0] 12
MD14512 $MN_USER_DATA_HEX[1] AC
...
MD14514 $MN_USER_DATA_FLOAT[0] 123.456

GP Parameter (OB 100):


CALL FB 1, DB 7 (
MCPNum := 1,
MCP1In := P#E0.0,
MCP1Out := P#A0.0,
MCP1StatSend := P#A8.0,
MCP1StatRec := P#A12.0,
MCP1BusAdr := 6,
MCP1Timeout := S5T#700MS,
MCP1Cycl := S5T#200MS,
NCCyclTimeout := S5T#200MS,
NCRunupTimeout := S5T#50S;

Basic Functions
950 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

BP parameters (to scan runtime):


l gp_par.UDInt; //=4,
l gp_par.UDHex; //=2,
l gp_par.UDReal; //=1 )

During PLC power-up, DB20 was generated with a length of 28 bytes:

DB 20
Address Data
0.0 123
2.0 456
4.0 789
6.0 1011
8.0 b#16#12
9.0 b#16#AC
10.0 1.234560e+02
The structure of the machine data used is specified in a UDT:

TYPE UDT 20
STRUCT
UDInt : ARRAY [0 .. 3 ] OF INT ;
UDHex0 : ARRAY [0 .. 15 ] OF BOOL ;
UDReal : ARRAY [0 .. 0 ] OF REAL ; //Description as field, for
// later expansions
END_STRUCT;
END_TYPE

Note
ARRAY OF BOOL are always sent to even-numbered addresses. For this reason, an array
range of 0 to 15 must generally be selected in the UDT definition or all Boolean variables
specified individually.

Although only a REAL value is used initially in the example, a field (with one element) has
been created for the variable. This ensures that extensions can be made easily in the future
without the symbolic address being modified.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 951
Basic PLC Program (P3)
Structure and functions of the basic program

Symbolic accesses
An entry is made in the symbol table to allow data access in symbolic form:

Symbol Operand Data type


UData DB 20 UDT 20
Access operations in user program (list includes only symbolic read access):

...
L "UData".UDInt[0];
L "UData".UDInt[1];
L "UData".UDInt[2];
L "UData".UDInt[3];

U "UData".UDHex0[0];
U "UData".UDHex0[1];
U "UData".UDHex0[2];
U "UData".UDHex0[3];
U "UData".UDHex0[4];
U "UData".UDHex0[5];
U "UData".UDHex0[6];
U "UData".UDHex0[7];
... ...
U "UData".UDHex0[15];

L "UData".UDReal[0];
...

13.8.11 Configuration machine control panel, handheld unit, direct keys

General
Up to two machine control panels and one handheld unit can be in operation at the same
time. For the machine control panel or HT8 (MCP) and hand-held unit HT2, HT1 (BHG) there
are various connection options (Ethernet, PROFIBUS). It is possible to connect two MCPs to
different bus systems (mixed operation is only possible on Ethernet and PROFIBUS). This
can be achieved using FB1 parameter "MCPBusType". In this parameter, the right-hand
decade is responsible for the first MCP and the left-hand decade for the second MCP.
The components are parameterized by calling basic-program block FB 1 in OB 100. FB 1
stores its parameters in the associated instance DB (DB 7, symbolic name "gp_par").
Separate parameter sets are provided for each machine control panel and the handheld unit.
The input/output addresses of the user must be defined in these parameter sets. These input
and output addresses are also used in FC 19, FC 24, FC 25, FC 26 and FC 13. Further, the
addresses for status information, Profibus or Ethernet are also to be defined. The default
time settings for timeout and cyclic forced retriggering should not be changed. Please refer

Basic Functions
952 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

to the Operator Components Manual for further information on MCPs and HHU(HT2)-
components.

Activation
Each component is activated either via the number of machine control panels (MCPNum
parameter) or, in the case of the handheld unit, via the HHU parameter. The MCP and HHU
connection settings are entered in FB1 parameters "MCPMPI", "MCPBusType" or "BHG",
"BHGMPI".

Handheld unit (HT2)


In the handheld unit the addressing is done via a parameter of the GD parameter set. This
was necessary for reasons of compatibility of the parameter names.

Configuration
Essentially, there are various communication mechanisms for transferring data between the
MCP/HHU and PLC. These mechanisms are characterized by the bus connection of the
MCP and HHU. In one case (Ethernet), data is transported via the "CP 840D sl".
The mechanism is parameterized completely via the MCP/HHU parameters in FB1.
In the other case the transmission is done through the PLC-operating system through the
Profibus configuration
The parameter setting is done via STEP 7 in HW-Config. To enable the basic program to
access these data and failure monitoring of MCP/HHU, the addresses set in FB 1-
parameters must be made available to the basic program.
An overview of the various coupling mechanisms appears below. Mixed operation can also
be configured.
If an error is detected due to a timeout monitor, an entry is made in the alarm buffer of the
PLC CPU (interrupts 400260 to 400262). In this case, the input signals from the MCP or from
the handheld unit (MCP1In/MCP2In or BHGIn) are reset to 0. If it is possible to
resynchronize the PLC and MCP/HHU, communication is resumed automatically and the
error message reset by the GP.

Note
In the following tables, "(n.r.)" indicates "not relevant".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 953
Basic PLC Program (P3)
Structure and functions of the basic program

840D: Ethernet connection


Without further configuration settings being made, communication takes place directly from
the PLC GP via the CP 840D sl. The FB 1 parameters listed below are used for
parameterization.
The numeric part of the logical name of the component must be entered in "MCP1 BusAdr",
"MCP2 BusAdr" or "BHGRecGDNo" (corresponds to the bus address of node). The logical
name is defined via switches on the MCP or terminal box.

(WKHUQHW

&3 1&
'VO 0&3 0&3 ++8
LQW '
3
3/& 5

03,'3
'3

Figure 13-16 840D sl: Ethernet connection

Relevant parameters (FB 1)


MCP HHU
MCPNum=1 or 2 (number of MCPs) HHU = 5 (via CP 840D sl)
MCP1In MCP2In BHGIn
MCP1Out MCP2Out BHGOut
MCP1StatSend MCP2StatSend BHGStatSend
MCP1StatRec MCP2StatRec BHGStatRec
MCP1BusAdr MCP2BusAdr BHGInLen (n.r.)
MCP1Timeout (n.r.) MCP2Timeout (n.r.) BHGOutLen (n.r.)
MCP1Cycl (n.r.) MCP2Cycl (n.r.) BHGTimeout (n.r.)
MCPMPI = FALSE BHGCycl (n.r.)
MCP1Stop MCP2Stop BHGRecGDNo
MCP1 NotSend MCP2 NotSend BHGRecGBZNo (n.r.)
BHGRecObjNo (n.r.)
MCPBusType = b#16#55 (via CP 840D sl) BHGSendGDNo (n.r.)
BHGSendGBZNo (n.r.)
MCPSDB210= FALSE BHGSendObjNo (n.r.)
MCPCopyDB77 = FALSE BHGMPI = FALSE
BHGStop
BHG NotSend

Basic Functions
954 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

An error entry is also made in the PLC alarm buffer for timeouts. resulting in the following
error messages on the HMI:
● 400260: MCP 1 failure
or
● 400261: MCP 2 failure
● 400262: HHU failure
An MCP or HHU failure is detected immediately after a cold restart even if no data have yet
been exchanged between the MCP/HHU and PLC.
The monitoring function is activated as soon as all components have signaled "Ready" after
power-up.

Example OPs: Direct control key


The direct control keys of the OPs at the Ethernet Bus should be transferred to the PLC. Till
now, the direct control keys have been transfered to the PLC via the PROFIBUS or via a
special cable connection between OP and MCP.
For connecting the direct control keys via the Ethernet, this concerns e.g. the "OP08T", there
is a parameterization in the basic program for activating the data transport. The related
parameters lie in the instance DB of the FB 1 (OpKeyNum to OpKeyBusType, see data
table). The parameters are provided by the user in the start OB 100 through the switching of
the parameter at the FB 1 call. The bus address and Op1/2KeyStop can also be modified in
the cyclic operation by writing the FB 1-Instance-DB DB 7.
The transport of the user data of the direct control keys runs in the same way as in the case
of Ethernet MCP. The data transport can also be stopped and restarted via writing the DB 7-
parameter "Op1/2KeyStop". During the Stop-phase the address of the direct control key
module (TCU-index or the MCP-address) can also be changed.
After resetting the Stop-signal a connection to the new address is established.
The status of the respective direct-key interfaces can be read in the interface signal:
DB10.DBX104.3 (OP1Key ready)
or
DB10.DBX104.4 (OP2Key ready)
Address Direct Control Keys
For the parameter Op1/2KeyBusAdr the TCU-index is normally to be used. This affects the
OPs, such as OP08T, OP12T, which for the direct control keys do not have special cable
connection to an Ethernet MCP.
If OPs with direct control keys have a special cable connection and these are connected to
an Ethernet-MCP, then for the parameter Op1/2KeyBusAdr the address of the MCP (DIP-
switch setting of the MCP) is to be used. Only the data stream of the direct control keys (2
bytes) is transferred via the direct control key interface.
Alarm direct control keys
An error entry is also made in the PLC alarm buffer for timeouts. resulting in the following
error messages on the HMI:
● 400274: Direct control key 1 failed
or
● 400275: Direct control key 2 failed

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 955
Basic PLC Program (P3)
Structure and functions of the basic program

Control unit switching for direct control keys


The user switches Op1/2KeyBusAdr with 0xFF and Stop = TRUE in the startup block OB
100. Via the M to N block FB 9 the direct control key address of the M to N-interface is
stored to the parameter "Op1KeyBusAdr".

Relevant parameters (FB 1)


Direct control key e.g. direct keys OP08T
OpKeyNum = 1 or 2 (Number of OP’s with direct control keys)
Op1KeyIn Op2KeyIn
Op1KeyOut Op2KeyOut
OpKey1BusAdr Op2KeyBusAdr Address: TCU Index:
Op1KeyStop Op2KeyStop
Op1KeyNotSend Op2KeyNotSend

OpKeyBusType = b#16#55 (via CP 840D sl)

MCP-Identification
Via the Identify interface in the DB 7 it is possible to query the type of the ethernet
component (MCP, HT2, HT8 or direct keys) with the relevant parameters at the input/output
in cyclic operation:
● Relevant parameters at the input:
"IdentMcpBusAdr", "IdentMcpProfilNo", "IdentMcpBusType", "IdentMcpStrobe"
● Relevant parameters at the output:
"IdentMcpType", "IdentMcpLengthIn", "IdentMcpLengthOut",
Here the DIP device address or the TCU index at the parameter "IdentMcpBusAdr" is
activated by the user program together with setting of the Strobe signal.
The input parameter "IdentMcpProfilNo" is normally to be set to the value 0. This parameter
is to be set to the value 1 only in the identification of the direct control keys. The parameter
"IdentMcpBusType" currently has no signifcance for a user program and is to be left in its
default value.
After resetting the Strobe signal by the basic program, valid output information becomes
available to the user. The resetting of the Strobe signals by the basic program can last for
several PLC cycles (up to 2 seconds).
The output parameters should show the user the size of the data areas for the addressed
device. Furthermore, it can be defined here, whether an HT2 or an HT8 or no device is
connected to the connection box. With this information the MCP channel or the HHU-channel
can be activated. In the cyclic operation the parameters can be written symbolically by the
user program and read via the symbol names of the DB 7 (gp_par).

Basic Functions
956 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

Relevant parameters (FB 1)


MCP-device identification Input parameters e.g. OP08T
Input Output Values in direct control keys

IdentMcpBusAdr IdentMcpType IdentMcpBusAdr = TCU-Index


IdentMcpBusProfilNo IdentMcpLengthIn IdentMcpBusProfilNo = Value 1
IdentMcpBusType IdentMcpLengthOut IdentMcpBusType = Default value
IdentMcpStrobe

IdentMcpBusProfilNo Value
MCP, BHG, HT8, HT2 B#16#0
Direct control keys, such as OP08T, OP12T B#16#1

IdentMcpType (Mcp-Type)
no device connected 0
MCP 483C IE (Compact) B#16#80
MCP 483C IE B#16#81
MCP 310 B#16#82
MCP OEM B#16#83
MCP DMG B#16#84
HT8 B#16#85
TCU_DT (Direct control keys) B#16#86
MCP_MPP B#16#87
HT2 B#16#88
OP08T (direct control keys) B#16#89

840D: PROFIBUS connection on the DP port


In case of PROFIBUS connection of the MCP, this component must be considered in the
hardware configuration setting of STEP 7. The MCP may only be interfaced with the
standard DP bus on the PLC (not on MPI/DP). The addresses must be stored in the input
and output log range. These start addresses must also be stored in the pointer parameters
of the FB1. The FB1 parameters listed below are used for further parameterization.
There is no PROFIBUS variant of the HHU. For this reason, an Ethernet connection is
shown for the HHU in this figure. The Profibus slave address must be stored in the
parameter "MCP1BusAdr" and "MCP2BusAdr". Enter the pointer to the configured diagnostic
address (e.g. P#A8190.0) in "MCPxStatRec".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 957
Basic PLC Program (P3)
Structure and functions of the basic program

(WKHUQHW

&3 1&.
'VO 0&3 0&3 ++8
LQW3/& '
3
5

03,'3
'3

3URILEXVFRQIIRU
0&3++8

Figure 13-17 840D sl: PROFIBUS connection

Relevant parameters (FB 1)


MCP HHU
MCPNum = 1 or 2 (number of MCPs) HHU = 5 (via CP 840D sl)
MCP1In MCP2In BHGIn
MCP1Out MCP2Out BHGOut
MCP1StatSend (n.r.) MCP2StatSend (n.r.) BHGStatSend
MCP1StatRec MCP2StatRec BHGStatRec
MCP1BusAdr MCP2BusAdr BHGInLen
MCP1Timeout MCP2Timeout BHGOutLen
MCP1Cycl (n.r.) MCP2Cycl BHGTimeout (n.r.)
MCPMPI = FALSE BHGCycl (n.r.)
MCP1Stop MCP2Stop BHGRecGDNo
MCPBusType = b#16#33 BHGRecGBZNo (n.r.)
BHGRecObjNo (n.r.)
MCPSDB210= FALSE BHGSendGDNo (n.r.)
MCPCopyDB77 = FALSE BHGSendGBZNo (n.r.)
BHGSendObjNo (n.r.)
BHGMPI = FALSE
BHGStop
MCP failure normally switches the PLC to the STOP state. If this is undesirable, OB 82, OB
86 can be used to avoid a stop. The basic program has by default the OB 82 and OB 86 call.
FC5 is called in these OBs. This FC5 checks whether the failed slave is an MCP. If this is the
case, no PLC stop is triggered. Setting "MCPxStop" := TRUE causes the basic program to
deactivate the MCP as a slave via SFC 12. If the PLC does not switch to the stop state
following the failure of or a fault on the MCP, an interrupt message will be generated via the
basic program. The interrupt is deleted when the station recovers.

Basic Functions
958 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

840D: PROFIBUS connection on the MPI/DP port


With the PROFIBUS connection, this component must be considered in the STEP 7
hardware configuration. The MCP is connected on the MPI/DP bus of the PLC.
The addresses must be stored in the input and output log range. These start addresses must
also be stored in the pointer parameters of the FB1. The FB1 parameters listed below are
used for further parameter assignment. There is no PROFIBUS variant of the HHU. For this
reason, an Ethernet connection is drawn for the HHU in this diagram. The PROFIBUS slave
address must be stored in MCP1BusAde and MCP2BusAdr. Enter the pointer to the
configured diagnostic address (e.g. P#A8190.0) in MCPxStatRec.

(WKHUQHW

&3 1&.
'VO 0&3 0&3 ++8
'
LQW3/& 3
5

03,'3
'3

3URILEXVFRQI
IRU0&3

Figure 13-18 840D sl: PROFIBUS connection on the MPI/DP port

Relevant parameters (FB 1)


MCP HHU
MCPNum = 1 or 2 (number of MCPs) HHU = 5 (via CP 840D sl)
MCP1In MCP2In BHGIn
MCP1Out MCP2Out BHGOut
MCP1StatSend (n.r.) MCP2StatSend (n.r.) BHGStatSend
MCP1StatRec MCP2StatRec BHGStatRec
MCP1BusAdr MCP2BusAdr BHGInLen
MCP1Timeout MCP2Timeout BHGOutLen
MCP1Cycl (n.r.) MCP2Cycl BHGTimeout (n.r.)
MCPMPI = FALSE BHGCycl (n.r.)
MCP1Stop MCP2Stop BHGRecGDNo
MCPBusType = b#16#44 BHGRecGBZNo (n.r.)
BHGRecObjNo (n.r.)
MCPSDB210= FALSE BHGSendGDNo (n.r.)
MCPCopyDB77 = FALSE BHGSendGBZNo (n.r.)
BHGSendObjNo (n.r.)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 959
Basic PLC Program (P3)
Structure and functions of the basic program

Relevant parameters (FB 1)


MCP HHU
BHGMPI = FALSE
BHGStop
MCP failure normally switches the PLC to the STOP state. If this is unwanted, OB 82, OB 86
can be used to avoid a PLC stop. The basic program has by default the OB 82 and OB 86
call. FC5 is called in these OBs. This FC5 checks whether the failed slave is an MCP. If this
is the case, no PLC stop is triggered. Setting MCPxStop := True causes the basic program to
deactivate the MCP as a slave via SFC 12. If the PLC does not switch to the stop state
following the failure of or a fault on the MCP, an interrupt message will be generated via the
basic program. The interrupt is deleted when the station recovers.

13.8.12 Switchover of handheld device


Only Ethernet variants support switchover/deactivation of the machine control panel (MCP)
or handheld unit (HHU) as standard. On MPI and PROFIBUS variants, this function is either
not supported at all or can only be implemented in restricted format requiring additional effort
on the part of the user. For example, with the PROFIBUS variant of the MCP, the DB77 data
area specified for MCP1, MCP2 or HHU can be used for the MCP pointer on FB1. The MCP
slave bus address must be set correctly under MCPxBusAdr as this is used as the basis for
monitoring. A user program copy routine to copy the signals of the active MCP from the I/O
area configured in HW Config to DB77. This enables a number of MCPs on the PROFIBUS
to be switched via signals. Set the MCPxStop parameter to True for the switchover phase
from one MCP to another.
One method will be outlined now with the Ethernet variants of MCP and HHU.

Control signals
Parameters MCP1Stop, MCP2Stop and BHGStop can be used to stop communication with
individual components (parameter setting = 1). This function is available only on Ethernet
variants. This stop or activation of communication can be applied in the current cycle.
However, the change in value must be implemented through the symbolic notation of the
parameters and not by means of another FB 1 call.
Example of stopping transfer from the first machine control panel:

SET;
S gp_par.MCP1Stop;
Setting parameters MCP1Stop, MCP2Stop, BHGStop also results in a suppression or
deletion of interrupts 400260 to 400262.
Switchover of Bus address
An existing connection with a machine control panel (MCPl) or handheld unit (HHU) can be
aborted. Another MCP or HHU component already connected to the bus (different address)
can then be activated. Proceed as follows to switch addresses:
1. Stop communication with component to be decoupled via parameter MCP1Stop or
MCP2Stop or BHGStop = 1.

Basic Functions
960 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Structure and functions of the basic program

2. Following checkback in DB10 byte 104 (relevant bits 0, 1 and 2 are set to 0), the bus
address (with MCP, this is the FB1 parameter "MCP1BusAdr" or "MCP2BusAdr") is
changed; With HHU Ethernet variant, the bus address is set at FB1 parameter
"BHGRecGDNo") of this unit is changed to the new component.
3. In this PLC cycle, communication with the new component can now be activated again by
means of parameter MCP1Stop or MCP2Stop or BHGStop = 0.
4. Communication with the new component is taking place when the checkback is in DB 10
byte 104 (relevant bits 0, 1, 2 are set to 1).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 961
Basic PLC Program (P3)
SPL for Safety Integrated

13.9 SPL for Safety Integrated


Rather than being a function of the basic program, SPL is a user function. The basic
program makes a data block (DB 18) available for Safety SPL signals and runs a data
comparison to ensure the consistency of SPL program data in the NCK.
References:
/FBSI/ Function Manual Safety Integrated

Basic Functions
962 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Assignment overview

13.10 Assignment overview

13.10.1 Assignment: NCK/PLC interface


The values of the NC/PLC interface for SINUMERK 840D sl are described in detail in:
References:
Lists sl (Book 2)

13.10.2 Assignment: FB/FC

Number Significance
FB 15 Basic program
FB 1, FC 2, FC 3, FC 5 Basic program
FC 0 ... 29 Reserved for Siemens
FB 0 ... 29 Reserved for Siemens
FC 30 ... 999 1) Free for user assignment
FB 30 ... 999 1) Free for user assignment
FC 1000 ... 1023 Reserved for Siemens
FB 1000 ... 1023 Reserved for Siemens
FC 1024 ... upper limit Free for user assignment
FB 1024 ... upper limit Free for user assignment
1) The actual upper limit of the block number (FB/FC) depends on the PLC CPU on which the
selected NCU is located.

Note
Values of FC, FB see " Memory requirements of basic PLC program for SINUMERIK 840D
(Page 898)".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 963
Basic PLC Program (P3)
Assignment overview

13.10.3 Assignment: DB

Note
Only as many data blocks as are required according to the NC machine data configuration
are set up.

Overview of data blocks


DB no. Name Name Package
1 Reserved for Siemens BP
2 ... 5 PLC-MELD PLC messages BP
6 ... 8 Basic program
9 NC-COMPILE Interface for NC compile cycles BP
10 NC INTERFACE Central NCK interface BP
11 Mode group 1 Interface mode group BP
12 Computer link and transport system interface
13 ... 14 Reserved for basic program
15 Basic program
16 PI Service definition
17 Version identifier
18 Reserved for basic program
19 HMI interface
20 PLC machine data
21 ... 30 CHANNEL 1 ... n Interface NC channels BP
31 ... 61 AXIS 1 ... m Interfaces for axes/spindles BP
or free for user assignment
62 ... 70 Free for user assignment
71 ... 74 Tool management BP
75 ... 76 M group decoding
77 Data block for MCP signals
78 ... 80 Reserved for Siemens
81 ... 999 1) see below: ShopMill, ManualTurn
1000 ... 1099 Reserved for Siemens
1100 ... High Free for user assignment
limit
1) The actual upper limit of the block number (DB) depends on the PLC CPU on which the selected
NCU is located. The data blocks of channels, axes/spindles and tool management functions that
are not activated may be assigned as desired by the user.

Note
The data blocks of channels, axes/spindles and tool management functions that are not
activated may be assigned as required by the user.

Basic Functions
964 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Assignment overview

13.10.4 Assignment: Timers

Timer No. Significance


T 0 ... T 512 1) User area
1) The actual upper limit of the timer number (DB) depends on the PLC CPU on which the selected
NCU is located.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 965
Basic PLC Program (P3)
Memory requirements of basic PLC program for SINUMERIK 840D

13.11 Memory requirements of basic PLC program for SINUMERIK 840D


The basic program consists of basic and optional functions. The basic functions include
cyclic signal exchange between the NC and PLC. The Options include e.g. the FCs, which
can be used, if needed.
The table below lists the memory requirements for the basic functions and the options. The
data quoted represent guide values, the actual values depend on the current software
version.

Memory requirements of blocks with SINUMERIK 840D


Block size (bytes)
Block Function Remark
Working
type no.
memory

Basic functions in basic program


FB 1, FB 15 must be loaded / 52182
on CF card
FC 2, 3, 5, 12 Must be loaded 470
DB 4, 5, 7, 8 Must be loaded 1006
DB 2, 3, 17 Are generated by the BP 632
OB 1, 40, 100, 82, 86 Must be loaded 398
Total 55698

PLC/NCK, PLC/HMI interface


DB 10 PLC/NCK signals Must be loaded 262
DB 11 Signals PLC/Mode group Is generated by BP 56
DB 19 PLC/HMI signals Is generated by BP 434
DB 21 to DB 30 PLC/channel signals Are generated by BP as a function of NC-MD: 416
for each DB
DB 31 to DB 61 PLC/axis or spindle Are generated by BP as a function of NC-MD: 148
signals for each DB

Basic program options


Machine control panel
FC 19 Transfer of MCP signals, Must be loaded when M variant of MCP is 92
M variant installed
FC 25 Transfer of MCP signals, Must be loaded when T variant of MCP is 92
T variant installed
FC 24 Transfer of MCP signals, Must be loaded when slim variant of MCP is 100
slim variant installed
FC 26 Transfer of MCP signals, Must be loaded for HT8 68
HT8 variant
Handheld unit
FC 13 Display control HHU Can be loaded for handheld units 144

Basic Functions
966 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Memory requirements of basic PLC program for SINUMERIK 840D

Basic program options


Error/operating messages
FC 10 Acquisition FM/BM Load when FM/BM is used 66
ASUB
FC 9 ASUB start Load when PLC ASUBs are used 128

Basic program options


Star/delta changeover
FC 17 Star/delta switchover of Load for star/delta switchover 114
MSD
Spindle control
FC 18 Spindle control Load for spindle control from PLC 132
PLC/NC communication
FB 2 Read NC variable Load for Read NC variable 76
DB n Read NC variable One instance DB per FB 2 call 270
FB 3 Write NC variable Load for Write NC variable 76
DB m Write NC variable One instance DB per FB3 call 270
FB 4 PI services Load for PI services 76
DB o PI services One instance DB per FB 4 call 130
DB 16 PI services description Load for PI services 618
FB 5 Read GUD variables Load for PI services 76
DB p Read GUD variables One instance DB per FB 5 call 166

DB 15 General communication Global data block for communication 146


FB 7 PI services 2 Load for PI services 76
DB o PI services 2 One instance DB per FB4 call: every 144
FC 21 Transfer Load with dual-port RAM, ... 164
m:n
FB 9 Switchover M to N Load with M to N 58
Safety Integrated
FB 10 Safety relay Load with Safety option 74
FB 11 Brake test Load with Safety option 76
DB 18 Safety data DB for Safety 226
Tool management
FC 7 Transfer function Load for tool management option 84
turret
FC 8 Transfer function Load for tool management option 132
FC 22 Direction selection Load, when direction selection is needed 138
DB 71 Loading locations Generated by BP as a function of NC MD 40+30*B
DB 72 Spindles Generated by BP as a function of NC MD 40+48*Sp
DB 73 Revolver Generated by BP as a function of NC MD 40+44*R

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 967
Basic PLC Program (P3)
Memory requirements of basic PLC program for SINUMERIK 840D

Basic program options


DB 74 Basic function Generated by BP as a function of NC MD 100+(B+
Sp+R)*22
Compile cycles
DB 9 Interface Is generated by BP as a function of NC option 436
PLC compile cycles

Example
Based on the memory requirements in the table above, the memory requirements have been
determined for two sample configurations (see table below).

Block size (bytes)


Block Function Remark
Working
type no.
memory

Minimum configuration (1 spindle, 2 axes and T MCP)


see above Basic program, base 54688
Interface DBs 1612
MCP 92
Total 56392

Block size (bytes)


Block Function Remark
Working
type no.
memory

Maximum configuration (2 channels, 4 spindles, 4 axes, T MCP)


see above Basic program, base 54688
see above Interface DBs 2768
see above MCP 92
see above Error/operating 66
messages
see above ASUBs 1 ASUB initiation 128
see above Concurrent axis For 2 turrets 132
see above PLC/NC 1 x read variable and 1 x write variable 838
communication
see above Tool management 2 turrets with one loading point each 674
see above Compile cycles 436
Total 59822

Basic Functions
968 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

13.12 Basic conditions and NC VAR selector

13.12.1 Supplementary conditions

13.12.1.1 Programming and parameterizing tools

Hardware
For the PLCs used in SINUMERIK 840D sl, the following equipment is required for the
programming devices or PCs:

Minimum Recommendation
Processor Pentium Pentium
RAM (MB) 256 512 or more
Hard disk, 500 > 500
free capacity (MB)
interfaces MPI, Ethernet incl. cable
Memory card
Graphic SVGA (1024*768)
Mouse Yes
Operating system Windows 2000 /XP Professional, STEP7 version 5.3 SP2 or
higher
The required version of STEP7 can be installed on equipment meeting the above
requirements in cases where the package has not already been supplied with the
programming device.
The following functions are possible with this package:
● Programming
– Editors and compilers for STL (complete scope of the language incl. SFB/SFC calls),
LAD, FBD
– Creation and editing of assignment lists (symbol editor)
– Data block editor
– Input and output of blocks ON/OFF line
– Insertion of modifications and additions ON and OFF line
– Transfer of blocks from programming device to the PLC and vice versa
● Configuring
– Parameterizing tool HW Config for CPU and I/O device parameterization
– NetPro parameterizing tool for setting the CPU communication parameters
– Output of system data such as hardware and software version, memory capacity, I/O
expansion/assignment

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 969
Basic PLC Program (P3)
Basic conditions and NC VAR selector

● Testing and diagnostics (ONLINE)


– Variable status/forcing (I/Os, flags, data block contents, etc.)
– Status of individual blocks
– Display of system states (ISTACK, BSTACK, system status list)
– Display of system messages
– PLC STOP/complete restart/overall reset triggering from the programming device
– Compress PLC
● Documentation
– Printout of individual or all blocks
– Allocation of symbolic names (also for variables in data blocks)
– Input and output of comments within each block
– Printout of test and diagnostics displays
– Hardcopy function
– Cross-reference list
– Program overview
– Assignment plan I/O/M/T/Z/D
● Archiving of utility routines
– Allocation of the output statuses of individual blocks
– Comparison of blocks
– Rewiring
– STEP 5 → STEP 7 converter
● Option packages
– Programming in S7–HIGRAPH, S7–GRAPH, SCL.
These packages can be ordered from the SIMATIC sales department.
– Additional packages for configuration modules (e.g. CP3425 → NCM package)

Note
More information about possible functions can be found in SIMATIC catalogs and
STEP 7 documentation.

Basic Functions
970 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

13.12.1.2 SIMATIC documentation required


References:
● System description SIMATIC S7
● S7-300 instruction list
● Programming with STEP 7
● User Manual STEP 7
● Programming Manual STEP 7; designing of user programs
● Reference Manual STEP 7; Instructions list AWL
● Reference Manual STEP 7; Ladder Diagram KOP
● Reference Manual STEP 7; Default and system functions
● Manual STEP 7; Conversion of STEP 5 programs
● STEP 7 overall index
● Manual CPU 317-2DP

13.12.1.3 Relevant SINUMERIK documents


References:
● Start-up Manual SINUMERIK 840D sl
● Device Manual Operator Components SINUMERIK 840D sl/840Di sl
● Function Manual Basic Functions
● Function Manual, Extended Functions:
● Function Manual, Special Functions
● Lists sl (Book 1)
● Lists sl (Book 2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 971
Basic PLC Program (P3)
Basic conditions and NC VAR selector

13.12.2 NC VAR selector

13.12.2.1 Overview

General
The PC application "NC VAR selector" fetches the addresses of required NC variables and
processes them for access in the PLC program (FB 2/FB 3). This enables the programmer to
select NC variables from the entire range of NC variables, to store this selection of variables,
to edit them by means of a code generator for the STEP7 compiler and finally to store them
as an ASCII file (*.AWL) in the machine CPU program. This process is shown in the figure
"NC VAR selector".
For storing the files created by NC-VAR-selector a catalog is to be implemented via the
Windows Explorer with any catalog name. The selected data of the NC-VAR selector
(data.VAR and data.AWL files) must be stored in this catalog. Therafter, the AWL file is to be
transferred and compiled via the menu option "Code" → "in STEP7 Project" The
"Daten.AWL" (STL data) file must then be inserted into the STEP 7 machine project via
"Insert", "External Source" in the STEP 7 Manager. The source container must be selected
in the manager for this purpose. This action stores this file in the project structure. Once the
file has been transferred, these AWL (STL) files must be compiled with STEP 7.

Note
The latest NC VAR selector can be used for each NC software version (even earlier
versions). For older NC software versions the variables can also be selected from the latest
complete list. The data cntent in DB 120 (default DB for variables) does not depend on the
software status. That is, variables selected in an older software version need not be
reselected when the software is upgraded.

Basic Functions
972 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

3URMHFW

)XOOOLVW 6HOHFWHG *HQHUDWH


OLVW FRGH
YDUB YDUB
6HOHFWHG
YDUB OLVW
YDUB 6DYH
YDUB

YDU DZO

PGE
+DUGGLVN

Figure 13-19 NC VAR selector

After the "NC VAR selector" application has been started, select a list of variables of an NC
variant (hard disk → file Ncv.mdb) to display all the variables contained in this list in a
window.
The variable list ncv*.mdb is separated on:

SINUMERIK 840D
NC variables including machine and setting data: ncv_NcData.mdb
Machine data for 611D drive: ncv_611d.mdb
Machine data for 611D linear drive: ncv_611dLinear.mdb
Machine data of the 611D drive, Performance 2: ncv_611d_P2.mdb
Machine data of the 611D linear drive, Performance 2: ncv_611d_P2Linear.mdb
Machine data of the hydraulic drive: ncv_Hydraulics.mdb

SINUMERIK 840D sl
NC variables including machine and setting data: ncv_NcData.mdb
Parameters of the Drive: ncv_SinamicsServo.mdb
The user can also transfer variables to a second list (separate window). This latter selection
of variables can then be stored in an ASCII file or edited as a STEP 7 source file (.awl) and
stored.
Once he has generated a PLC data block by means of the STEP 7 compiler, the
programmer is able to read or write NCK variables via the basic program function blocks
"PUT" and "GET" using the STEP 7 file.
The list of selected variables is also stored as an ASCII file (file extension .var).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 973
Basic PLC Program (P3)
Basic conditions and NC VAR selector

The variable list supplied with the "NC VAR selector" tool is adapted to the current NC
software version. This list does not contain any variables (GUD variables) defined by the
user. These variables are processed by the function block FB 5 in the basic program.

Note
The latest version of the "NC VAR selector" is capable of processing all previous NC
software versions. It is, therefore, not necessary to install different versions of the "NC VAR
selector" in parallel.

System features, supplementary conditions


The PC application "NC VAR selector" requires Windows 95 (or later operating system).
The assignment of names to variables is described in:
References:
/LIS1/ Lists (Book 1); Chapter: Variables,
or in the Variables Help file (integrated in NC VAR selector).

13.12.2.2 Description of functions

Overview
The figure below illustrates how the NC VAR selector is used within the STEP 7
environment.

1&9$5VHOHFWRU 67(3b

6HOHFWLRQ DZOILOH )LOH'%


1&YDULDEOHV OLVW YDU 9DULDEOHV 9DULDEOHV
OLVW PGE
1DPH 1DPHYDOXH! 1DPHYDOXH!
1DPH

8VHUGDWD

8, 9DU,'
&DOO)%9DU $UHDXQLW
9DU1DPH &ROXPQ


Figure 13-20 Application of NC VAR selector in the STEP 7 environment

Basic Functions
974 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

The NC VAR selector is used to generate a list of selected variables from a list of variables
and then to generate an .awl file that can be compiled by the STEP 7 compiler.
● A *.awl file contains the names and alias names of the NC variables, as well as
information about their address parameters. Any data block generated from this file will
only contain the address parameters (10 bytes per parameter).
● The generated data blocks must always be stored in the machine-specific file storage
according to STEP 7 specifications.
● To ensure that the parameterization of the GET/PUT (FB 2/3) blocks with respect to NC
addresses can be implemented with symbols, the freely assignable, symbolic name of the
generated data block must be included in the STEP 7 symbol table.

Basic display/Basic menu


After the NC VAR selector has been selected (started), the basic display with all input
options (upper menu bar) appears on the screen. All other displayed windows are placed
within the general window.

Figure 13-21 Basic display with basic menu

Project menu item


All operator actions associated with the project file (file of selected variables) are performed
under this menu item.

Terminating the application


The application can be terminated by selecting the "End" option under the "Project" menu
item.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 975
Basic PLC Program (P3)
Basic conditions and NC VAR selector

Creating a new project


A new project (new file for selected variables) can be set up under the "Project" menu item.
A window is displayed for the selected variables when "NEW" is selected. The file selection
for the NC variable list is then displayed after a prompt (applies only if the NC variable list is
not already open).

Figure 13-22 Window with selected variables for new project

The selected variables are displayed in a window.

Open an already existing project


Select "Open" under the "Project" menu item to open an existing project (variables already
selected). A file selection window is displayed allowing the appropriate project with extension
".var" to be selected.

Figure 13-23 Selection window for existing projects

If, after selection of the project, new variables are to be added, a complete list of NC
variables must be selected. No complete list need be called if the user only wishes to delete
variables from the project.

Basic Functions
976 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

Storing a project
The variable list is stored using the "Project" > "Save" or "Save As...." menu items.
"Save" stores the variable list under a path, which is already specified. If the project path is
not known, then the procedure is as for "Save As....".
"Save As..." displays a window in which the path for the project to be stored can be
specified.

Printing a project
The "Print" command under the "Project" menu item can be selected to print a project file.
The number of lines per page is selected under the "Print Setting" menu item. The default
setting is 77 lines.

Edit menu item


The following operator actions are examples of those, which can be carried out directly with
this menu item:
● Transfer variables
● Delete variables
● change alias names
● Find variables
These actions can also be canceled again under Edit.

Undoing actions
Operator actions relating to the creation of the project file (transfer variables, delete
variables, change alias names) can be undone in this menu.

NC variables menu item


The basic list of all variables is saved in NC Var Selector path Data\Swxy (xy stands for
software version no., e.g. SW 5.3:=xy=53). This list can be selected as an NC variables list.
In case of SINUMERIK 840D sl the basic lists are present in the path Data\Swxy_sl.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 977
Basic PLC Program (P3)
Basic conditions and NC VAR selector

Selecting an NC variable list


A list of all the NC variables for an NC version can now be selected and displayed via the
"NC Variable List", "Select" menu item.

Figure 13-24 Window with selected Complete List

The field variables (e.g. axis area, T area data, etc.) are indicated by means of brackets ([.]).
Additional information must be specified here. When the variables are transferred to the
project list, the additional information required is requested.

Displaying subsets
Double-click on any table field (with the exception of variable fields) to display a window in
which filter criteria can be preset.

Figure 13-25 Window with filter criteria for displaying list of variables

Basic Functions
978 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

There are three options:


● Display all data
● Input area, block and name (incl. combinations)
● Display MD/SE data number
The following wildcards can also be used:

* To extend the search criterion as required

Example search criteria

Name search criterion: Found: CHAN_NAME


CHAN*
chanAlarm
chanStatus
channelName
chanAssignment
● Select variable
A variable is selected by means of a simple mouse click and transferred to the window of
selected variables by double-clicking. This action can also be undone under the "Edit"
menu item.

Alias name
The variable names provided can be up to 32 characters in length. To make variables clearly
identifiable in the data block to be generated, several ASCII characters are added to the
selected name. However, the STEP 7 compiler recognizes only 24 ASCII characters as an
unambiguous STEP 7 variable. Since it cannot be precluded that variable names can only be
differentiated by the last 8 character positions, ALIAS names are used for names, which are
too long. When a variable is selected, the length of the STEP7 name to be used is, therefore,
checked. If the name is longer than 24 characters, the user must enter an additional name,
which is then used as the alias.
In this case, the user must ensure that the alias name is unambiguous.
Alias input can always be activated by the user in the "Options" menu.
An alias name can then be entered every time a variable is transferred.
It is also possible to edit alias names at a later point in time by double-clicking on the S7
variable name field. This action can also be undone under the "Edit" menu item.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 979
Basic PLC Program (P3)
Basic conditions and NC VAR selector

Figure 13-26 Screen with complete list and selected variables

Scrolling
A scroll bar is displayed if it is not possible to display all variables in the window. The
remaining variables can be reached by scrolling (page up/down).

Variables in multi-dimensional structures


If variables are selected from multi-dimensional structures, then the column and/or line
number as well as the area number must be entered so that the variables can be addressed.
The required numbers can be found in the NC variables documentation.
References:
Lists sl (Book 1); Variables
By entering a zero (0) as the block number or the line or column index, it is possible to use
the variable in the S7 PLC as a pointer to these data. When reading or writing these data via
the functions "PUT" and "GET", the optional parameters "UnitX", "ColumnX" and "LineX"
must be filled with the necessary information.

Figure 13-27 Entry field for line, column and block no.

Basic Functions
980 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

Delete variables
Variables are deleted in the window of selected variables by selecting the appropriate
variables (single mouse click) and pressing the "Delete" key. No deletion action is taken with
the double-click function. It is possible to select several variables for deletion (see "Selecting
variables").
This action can also be undone under the "Edit" menu item.

Note
Deleting of variables results in a change of the absolute addresses of the pointer structures
to the variables. When changing the variable selection, it is, therefore, absolutely necessary
to generate one or several text files of all user blocksprior to the change. This is the only way
to ensure that the assignment of the variables in FB "GET" or FB "PUT" remains correct,
even after recompilation.

Storing a selected list


Once variables have been selected, they can be stored under a project name. The files are
stored on a project-specific basis.
A window is displayed for the file to be stored. The project path and name for the file must be
selected in the window.

Figure 13-28 Window for project path and name of file to be stored

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 981
Basic PLC Program (P3)
Basic conditions and NC VAR selector

Code generation
This menu item contains three selection options:
1. Settings (input of data block number to be generated) and other settings
2. Generate (create data block)
3. In the STEP7 project (transferring the data block to a STEP7 project)

Settings
Under this menu item, the DB number and the symbol for this DB number for which the code
is created is entered.
Under the "Mass System" tab, a selection is made to determine how the unit system
variables are calculated in the PLC.
Under the "Generate" tab, the project creation is defined for the relevant target system.

Generate
Under this menu item, the STEP 7 file from the selected variable list with extension ".awl" is
set.
A file is generated when "Select" is clicked:
An .awl file that can be used as an input for the STEP 7 compiler.
A window opens, in which path and name for the .awl file to be generated must be specified
for the file to be saved.

In STEP 7 project
The generated AWL file is transferred to a selectable SIMATIC project (program path) and
compiled. Furthermore, the symbol can also be transferred. This function is available from
STEP 7 version 5.1 onwards. This process takes a longer time owing to the call of STEP 7.
Before transferring a new AWL file the file window of the AWL file is to be closed in the
KOP/FUP/AWL Editor.

Option menu item


The following can be selected under the "Option" menu item:
● The current language
● The mode for alias input (always/>24 characters)

Basic Functions
982 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Basic conditions and NC VAR selector

Help menu item


The information below can be viewed by selecting the corresponding submenu item:
● The Operating Manual
● The Description of Variables
The copyright and the version number can also be displayed.

13.12.2.3 Start-up, installation


The Windows application "NC Var selector" is installed using the SETUP program supplied
with the package.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 983
Basic PLC Program (P3)
Block descriptions

13.13 Block descriptions

13.13.1 FB 1: RUN_UP Basic program, start-up section

Function
The synchronization of NCK and PLC is performed during startup. The data blocks for the
NC/PLC user interface are created with reference to the NC configuration defined in the
machine data and the most important parameters verified for plausibility. In the event of an
error, FB 1 passes an error identifier to the diagnostics buffer and switches the PLC to the
STOP state.
To enable an orderly start-up of the control, it is vital to synchronize the NCK and PLC, as
these systems have their own types of power-up procedure. During startup routine,
therefore, the CPUs perform "subsidiary startup functions" and exchange ID information to
ensure that the procedure is functioning correctly.
Since the startup procedure is asynchronous, it is unavoidable that one CPU may have to
"wait" until the other has "caught up". This is automatically managed by the basic program.
The integrated PLC only supports cold starts. A warm restart is not provided, i.e. following
system initialization, the operating system runs organization block OB 100 and always
commences cyclic execution at the start of OB 1.
Users need only supply the FB 1 parameters that are relevant to their applications. The
preset values in the associated instance DB 7 do not need to be assigned. The block can
only be called in OB 100.

Output parameters
The output parameters in FB 1 provide the PLC user with information about the control
system configuration. These data can also be accessed in the cyclic program section.
There are two access options:
1. Direct access to the DB 7 data block (instance of the FB 1) in symbolic format (e.g. L
gp_par.MaxChan; in this case, gp_par is the symbolic name of the DB 7)
2. Assignment of a flag; during parameterization of the FB 1, the data element is assigned
to the relevant parameter (e.g. MaxChan:=MW 20) Information about the maximum
number of channels can then be polled in memory word 20 in the rest of the user
program.

Note
For the values of the parameters of MCP and HHU see "Configuration machine control
panel, handheld unit, direct keys (Page 898) ".

Basic Functions
984 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration SINUMERIK 840D

FUNCTION_BLOCK FB 1
VAR_INPUT
MCPNum: INT:=1; //0: No MCP
//1: 1 MCP (default)
//2: 2 MCPs
MCP1In: POINTER; //Start addr. input signals MCP 1
MCP1Out: POINTER; //Start addr. output signals MCP 1
MCP1StatSend: POINTER; //Status DW for sending MCP 1
MCP1StatRec: POINTER; //Status DW for receiving MCP 1
MCP1BusAdr: INT:=6; //Default
MCP1Timeout: S5TIME:= S5T#700MS;
MCP1Cycl: S5TIME:= S5T#200MS;
MCP2In: POINTER; //Start addr. input signals MCP 2
MCP2Out: POINTER; //Start addr. output signals MCP 2
MCP2StatSend: POINTER; //Status DW for sending MCP 2
MCP2StatRec: POINTER; //Status DW for receiving MCP 2
MCP2BusAdr: INT ;
MCP2Timeout: S5TIME:= S5T#700MS;
MCP2Cycl: S5TIME:= S5T#200MS;
MCPMPI: BOOL:= FALSE;
MCP1Stop: BOOL:= FALSE;
MCP2Stop: BOOL:= FALSE;
MCP1NotSend: BOOL:= FALSE;
MCP2NotSend: BOOL:= FALSE;
MCPSDB210: BOOL:= FALSE;
MCPCopyDB77: BOOL:= FALSE;
MCPBusType: BYTE=B#16#0;
HHU: INT:=0; //Handheld unit interface
//0: No HHU
//1: HHU on MPI
//2: HHU on OPI
BHGIn: POINTER; //Transmit data of the HHU
BHGOut: POINTER; //Receive data of the HHU
BHGStatSend: POINTER; //Status DW for sending HHU
BHGStatRec: POINTER; //Status DW for receiving HHU
BHGInLen: BYTE:= B#16#6; //Input 6 bytes
BHGOutLen: BYTE:= B#16#14; //Output 20 bytes
BHGTimeout: S5TIME:= S5T#700MS;
BHGCycl: S5TIME:= S5T#100MS;
BHGRecGDNo: INT:=2;
BHGRecGBZNo: INT:= 2;
BHGRecObjNo: INT:= 1;
BHGSendGDNo: INT:= 2;

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 985
Basic PLC Program (P3)
Block descriptions

BHGSendGBZNo: INT:= 1;
BHGSendObjNo: INT:= 1;
BHGMPI: BOOL:= FALSE;
BHGStop: BOOL:= FALSE;
BHGNotSend: BOOL:= FALSE;
NCCyclTimeout: S5TIME:= S5T#200MS;
NCRunupTimeout: S5TIME:= S5T#50S;
ListMDecGrp: INT:= 0;
NCKomm: BOOL:= FALSE;
MMCToIF: BOOL:= TRUE;
HWheelMMC: BOOL:= TRUE; //Handwheel selection via HMI
ExtendAlMsg : BOOL ;
MsgUser: INT:= 10; //Number of user areas in DB 2
UserIR: BOOL:= FALSE; //User programs in OB 40,
//Observe local data expansion!
IRAuxfuT: BOOL:= FALSE; //Evaluate T function in OB 40
IRAuxfuH: BOOL:= FALSE; //Evaluate H function in OB 40
IRAuxfuE: BOOL:= FALSE; //Evaluate DL function in OB 40
UserVersion: POINTER; //Pointer to string variable indicated in
//version screen display
OpKeyNum : INT;
Op1KeyIn POINTER;
Op1KeyOut : POINTER;
Op1KeyBusAdr : INT;
Op2KeyIn : POINTER;
Op2KeyOut : POINTER;
Op2KeyBusAdr : INT;
Op1KeyStop : BOOL ;
Op2KeyStop : BOOL ;
Op1KeyNotSend : BOOL ;
Op2KeyNotSend : BOOL ;
OpKeyBusType : BYTE ;
IdentMcpBusAdr : INT;
IdentMcpProfilNo : BYTE ;
IdentMcpBusType : BYTE ;
IdentMcpStrobe : BOOL ;
END_VAR

VAR_OUTPUT
MaxBAG: INT;
MaxChan: INT;
MaxAxis: INT;
ActivChan: ARRAY[1..10] OF BOOL;
ActivAxis: ARRAY[1..31] OF BOOL;
UDInt : INT;

Basic Functions
986 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

UDHex: INT;
UDReal : INT;
IdentMcpType : BYTE ;
IdentMcpLengthIn : BYTE ;
IdentMcpLengthOut : BYTE ;
END_VAR

Description of formal parameters of SINUMERIK 840D


The table below lists all formal parameters of the RUN_UP function for the 840D:

Signal Type Type Range of values Remark


MCPNum I INT Up to 2 Number of active MCP
0: No MCPs available
MCP1In I POINTER E0.0 to E120.0 Start address for input signals of relevant
MCP2In or machine control panel
M0.0 to M248.0
or
DBn DBX0.0 to DBXm.0
MCP1Out I POINTER A0.0 to A120.0 Start address for output signals of
MCP2Out or relevant machine control panel
M0.0 to M248.0
or
DBn DBX0.0 to DBXm.0
MCP1StatSend I POINTER A0.0 to A124.0 Currently no significance
MCP2StatSend or
M0.0 to M252.0
or
DBn DBX0.0 to DBXm.0
MCP1StatRec I POINTER A0.0 to A124.0 Currently no significance
MCP2StatRec or
M0.0 to M252.0
or
DBn DBX0.0 to DBXm.0
MCP1BusAdr I INT 1 ... 126 DP slave: PROFIBUS address
MCP2BusAdr 192 .. 223 Ethernet MCP: DIP-Setting
MCP1Timeout I S5time Recommendation: 700 ms Cyclic sign-of-life monitoring for machine
MCP2Timeout control panel
MCP1Cycl I S5time Recommendation: 200 ms Relevant only for PROFIBUS
MCP2Cycl
MCPMPI I BOOL false Available owing to compatibility
MCP1Stop I BOOL 0: Start transfer of machine control
MCP2Stop panel signals
1: Stop transfer of machine control
panel signals
DP slave: Slave deactivated

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 987
Basic PLC Program (P3)
Block descriptions

Signal Type Type Range of values Remark


MCP1NotSend I BOOL 0: Send and receive operation activated
MCP2NotSend 1: Receive machine control panel
signals only
MCPSDB210 I BOOL false Available owing to compatibility
MCPCopyDB77 I BOOL false Available owing to compatibility
MCPBusType I BYTE b#16#33: PROFIBUS
b#16#44: PROFIBUS on the MPI/DP port
b#16#55: Ethernet
Mixed mode possible, see Chapter "
Configuration machine control panel,
handheld unit, direct keys (Page 898) "
HHU I INT 0, 5 Handheld unit interface
0: No HHU
5: HHU on Ethernet
BHGIn I POINTER E0.0 to E124.0 Start address
or PLC receive data
M0.0 to M252.0 from HHU
or
DBn DBX0.0 to DBXm.0
BHGOut I POINTER A0.0 to A124.0 Start address
or PLC transmit data
M0.0 to M252.0 to HHU
or
DBn DBX0.0 to DBXm.0
BHGStatSend I POINTER A0.0 to A124.0 Available owing to compatibility
or
M0.0 to M252.0
or
DBn DBX0.0 to DBXm.0
BHGStatRec I POINTER A0.0 to A124.0 Available owing to compatibility
or
M0.0 to M252.0
or
DBn DBX0.0 to DBXm.0
BHGInLen I BYTE HHU default: Available owing to compatibility
B#16#6 (6 Byte)
BHGOutLen I BYTE HHU default: Available owing to compatibility
B#16#14 (20 Byte)
BHGTimeout I S5time Recommendation: 700 ms Available owing to compatibility
BHGCycl I S5time Recommendation: 100 ms Available owing to compatibility
BHGRecGDNo I INT HHU default: 2 Ethernet DIP switch
BHGRecGBZNo I INT HHU default: 2 Available owing to compatibility
BHGRecObjNo I INT HHU default: 1 Available owing to compatibility
BHGSendGDNo I INT HHU default: 2 Available owing to compatibility
BHGSendGBZNo I Int HHU default: 1 Available owing to compatibility

Basic Functions
988 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Signal Type Type Range of values Remark


BHGSendObjNo I INT HHU default: 1 Available owing to compatibility
BHGMPI I BOOL false Available owing to compatibility
BHGStop I BOOL 0: Start transmission
of handheld unit signals
1: Stop transmission
of handheld unit signals
BHGNotSend I BOOL 0: Send and receive operation activated
1: Receive handheld unit signals only
NCCyclTimeout I S5time Recommendation: 200 ms Cyclic sign-of-life monitoring NCK
NCRunupTimeout I S5time Recommendation: 50 s Power-up monitoring NCK
ListMDecGrp I INT 0 ... 16 Activation of expanded
M group decoding
0: Not active
1...16: Number of M groups
NCKomm I BOOL PLC NC communications services
(FB 2/3/4/5/7:
Put/Get/PI_SERV/GETGUD)
TRUE: active
MMCToIF I BOOL Transmission of HMI signals to interface
(modes, program control etc.)
TRUE: Active
HWheelMMC I BOOL TRUE: Handwheel selection via HMI
FALSE: Handwheel selection via user
program
ExtendAlMsg I BOOL Activation extension of the FC10 (see
Section "Structure and Functions of the
basic program")
MsgUser I INT 0 ... 32 Number of user areas for messages (DB
2)
UserIR I BOOL Local data expansion OB40 required for
processing of signals from user
IRAuxfuT I BOOL Evaluate T function in OB 40
IRAuxfuH I BOOL Evaluate H function in OB 40
IRAuxfuE I BOOL Evaluate DL function in OB 40
UserVersion I POINTER DBxx Pointer to string variable.
The associated string variable is indicated
in the version display
(max. 41 characters).
OpKeyNum I INT 0 ... 2 Number of active
Direct control key modules
0: no Ethernet direct control keys
available.
Op1KeyIn I POINTER P#Ex.0 Start address for the input signals of the
Op2KeyIn or affected direct control key modules
P#Mx.0
or
P#DBn.DBXx.0.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 989
Basic PLC Program (P3)
Block descriptions

Signal Type Type Range of values Remark


Op1KeyOut I POINTER P#Ax.0 Start address for the output signals of the
Op2KeyOut or affected direct control key modules
P#Mx.0
or
P#DBn.DBXx.0.
Op1KeyBusAdr I INT 1 ... 191 Direct control keys via
Op2KeyBusAdr Ethernet: TCU Index:
Op1KeyStop I BOOL 0: Start transmission
Op2KeyStop of direct control key signals
1: Stop transmission
of direct control key signals
Op1KeyNotSend I BOOL 0: Send and receive operation activated
Op2KeyNotSend 1: Receive
direct control key signals only
OpKeyBusType I BYTE b#16#55 b#16#55: Ethernet
IdentMcpBusAdr I INT 1 ... 254 only IE devices
IdentMcpProfilNo I BYTE 0, 1 Profile of a device
0: complete device
1: only direct control keys
IdentMcpBusType I BYTE b#16#5 only IE devices
IdentMcpStrobe I BOOL Activate query
MaxBAG O INT 1 ... 10 Number of mode groups
MaxChan O INT 1 ... 10 Number of channels
MaxAxis O INT 1 ... 31 Number of axes
ActivChan O ARRAY[1...10] Bit string for active channels
OF BOOL
ActivAxis O ARRAY[1..31] Bit string for active axes
OF BOOL
UDInt O INT Quantity of INTEGER machine data in
DB20
UDHex O INT Quantity of hexadecimal machine data in
DB20
UDReal O INT Quantity of REAL machine data
in DB 20
IdentMcpType O BYTE Type (HT2, HT8, ...)
IdentMcpLengthIn O BYTE Length info
input data in PLC
IdentMcpLengthOut O BYTE Length info
output data in PLC

Basic Functions
990 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

MCP/HHU monitoring (840D)


The following alarms are displayed at HMI in cases of errors for the communication with the
machine control panel (MCP):
● 400260: MCP 1 failure or
● 400261: MCP 2 failure
● 400262: HHU failure
In this case, the input signals from the MCP or from the handheld unit (MCP1In/MCP2In or
BHGIn) are reset to 0. If it is possible to resynchronize the PLC and MCP/HHU,
communication is resumed automatically and the error message reset by the GP.

840D example call


An example call for the FB 1 in OB 100 appears below. This example is part of the diskette
with basic program for 840D.

ORGANIZATION_BLOCK OB 100
VAR_TEMP
OB100_EV_CLASS : BYTE ;
OB100_STRTUP : BYTE ;
OB100_PRIORITY : BYTE ;
OB100_OB_NUMBR : BYTE ;
OB100_RESERVED_1 : BYTE ;
OB100_RESERVED_2 : BYTE ;
OB100_STOP : WORD ;
OB100_RESERVED_3 : WORD ;
OB100_RESERVED_4 : WORD ;
OB100_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FB 1, DB 7 (
MCPNum := 1,
MCP1In := P#E0.0,
MCP1Out := P#A0.0,
MCP1StatSend := P#A8.0,
MCP1StatRec := P#A12.0,
MCP1BusAdr := 6,
MCP1Timeout := S5T#700MS,
MCP1Cycl := S5T#200MS,
NC-CyclTimeout := S5T#200MS,
NC-RunupTimeout := S5T#50S);
//INSERT USER PROGRAM HERE
END_ORGANIZATION_BLOCK

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 991
Basic PLC Program (P3)
Block descriptions

13.13.2 FB 2: Read GET NC variable

Function
The PLC user program can read variables from the NCK area using FB GET. The FB is
multi-instance-capable.
FB 2 also includes an Instance DB from the user area.
When FB 2 is called with a positive signal edge change at control input "Req", a job is
started, which reads the NCK variables referenced by ADDR1-ADDR8 and then copies them
to the PLC operand areas referenced by RD1 to RD8. Successful completion of the read
process is indicated by a logical "1" in status parameter "NDR".
The read process lasts for several PLC cycles (normally 1 ... 2). The block can be called up
in cyclic mode only.
Any errors are indicated by Error and State.
In order to reference the NC variables, all required variables are first selected with the "NC
VAR selector" tool and generated as STL source in a data block. A name must then be
assigned to this DB in the symbol table.
"DB name.S7 name" is transferred as the actual parameter of the NCK variable address
(Addr1 to Addr8) when FB 2 is called.

Variable addressing
For some NC variables, it is necessary to select area no. and/or line or column from the NC-
VAR selector. For these variables it is possible to select a basic type,
i. e. area/column/row is filled with "0" by default.
The contents of the area number, line and column specified by the NC VAR selector are
checked for a "0" in the FB. If a "0" is present, the value is transferred to the input parameter.
The user must supply the required parameters (UnitX/ColumnX/LineX) before calling FB GET.

NOTICE
FB 2 can read NC variables only if basic program parameter NCKomm ="1" has been set
(in OB 100: FB 1, DB 7). The call is permitted only in cyclic program OB1. An assignment
for all parameters with Req = 0 is also permitted in OB 100.
When channel-specific variables are read, only variables from one and the same channel
may be addressed via Addr1 to Addr8 in a job (FB 2 call).
In areas V and H, different logic axis numbers must not be assigned in one job. (Failure to
observe this rule results in Error:= TRUE, State:= W#16#02).

Basic Functions
992 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

NCK variables within one group can be combined in a job:

Area
Group 1 C[1] N B A T
Group 2 C[2] N B A T
Group 3 V[.] H[.]
The same rules apply to channels 3 to 10 as illustrated as examples in the above table in
groups 1 and 2.

Note
Especially when reading several long strings, the number of usable variables can be less
than 8.

Declaration of the function

FUNCTION_BLOCK FB 2
VAR_INPUT
Req : BOOL;
NumVar : INT ;
Addr1 : ANY ;
Unit1 : BYTE ;
Column1 : WORD ;
Line1 : WORD ;
Addr2 : ANY ;
Unit2 : BYTE ;
Column2 : WORD ;
Line2 : WORD ;
Addr3 : ANY ;
Unit3 : BYTE ;
Column3 : WORD ;
Line3 : WORD ;
Addr4 : ANY ;
Unit4 : BYTE ;
Column4 : WORD ;
Line4 : WORD ;
Addr5 : ANY ;
Unit5 : BYTE ;
Column5 : WORD ;
Line5 : WORD ;
Addr6 : ANY ;
Unit6 : BYTE ;
Column6 : WORD ;
Line6 : WORD ;
Addr7 : ANY ;

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 993
Basic PLC Program (P3)
Block descriptions

Unit7 : BYTE ;
Column7 : WORD ;
Line7 : WORD ;
Addr8 : ANY ;
Unit8 : BYTE ;
Column8 : WORD ;
Line8 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL;
NDR : BOOL;
State : WORD ;
END_VAR

VAR_IN_OUT
RD1 : ANY ;
RD2 : ANY ;
RD3 : ANY ;
RD4 : ANY ;
RD5 : ANY ;
RD6 : ANY ;
RD7 : ANY ;
RD8 : ANY ;
END_VAR

Description of formal parameters


The table below list all formal parameters of the GET function.

Signal Type Type Range of values Remark


Req I BOOL Job start with positive signal edge
NumVar I INT 1 ... 8 Number of variables to be read
(corresponds to use of
Addr1 to Addr8)
Addr1 to Addr8 I ANY [DBName].[VarName] Variable identifiers from
NC Var selector
Unit1 to Unit8 I BYTE Area address, optional for variable
addressing
Column1 to I WORD Column address, optional for
Column8 variable addressing
Line1 to Line8 I WORD Line address, optional for variable
addressing
Error O BOOL Negative acknowledgment of job
or execution of job impossible

Basic Functions
994 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Signal Type Type Range of values Remark


NDR O BOOL Job successfully executed Data
are available
State O WORD See error identifiers
RD1 to RD8 I/O ANY P#Mm.n BYTE x... Target area for read data
P#DBnr.dbxm.n BYTE x

Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter
error. The error cause is coded at the block output State:

State Significance Note


WORD H WORD L
1 ... 8 1 Access error In high byte number of Var in which
error occurred
0 2 Error in job Incorrect compilation of Var. in a job
0 3 Negative acknowledgment, job Internal error, try:
not executable NC RESET
1 ... 8 4 Insufficient local user memory Read var. is longer than specified in
available RD1 to RD8; in high byte number of
var, in which error occurred
0 5 Format conversion error Error on conversion of var. type
double: Var. is not within S7 REAL
area
0 6 FIFO full Job must be repeated since queue is
full
0 7 Option not set BP parameter "NCKomm" is not set
1 ... 8 8 Incorrect target area (RD) RD1 to RD8 may not be local data
0 9 Transmission occupied Job must be repeated
1 ... 8 10 Error in variable addressing Unit or column/line contains value 0
0 11 Address of variable invalid Check Addr (or variable name), area,
unit
0 12 NumVar = 0 Check parameter NumVar
1 ... 8 13 (0x0d) ANY data reference incorrect NcVar date required has not been
parameterized

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 995
Basic PLC Program (P3)
Block descriptions

Configuration steps
Proceed as follows to read NC variables:
● Select variables with the NC VAR selector.
● Save selected variables in a *.VAR file
● Generate a STEP 7 *.STL source file.
● Generate a DB with the associated address data.
● Enter the symbol for the generated DB in the symbol table so that it is possible to access
the address parameters symbolically in the user program.
● Set FB2 parameters

Pulse diagram

     


5HT
 

1'5

(UURU

(1) Activation of function


(2) Positive acknowledgment: Receive new data
(3) Reset function activation after receipt of acknowledgment
(4) Signal change by means of FB
(5) Not permissible
(6) Negative acknowledgment: Error has occurred, error code in the output parameter State

Call example
Reading of three channel-specific machine data from channel 1, whose address
specifications are stored in DB120.
Select data with NC VAR selector and store in file DB120.VAR; then create file DB120.AWL:

Area Block Name Type No. Byte S7 Name


C[1] M MD20070 $MC_AXCONF_MACHAX_USED[1] char 20070 1 C1AxConfMachAx Used1
C[1] M MD20070 $MC_AXCONF_MACHAX_USED[2] char 20070 1 C1AxConfMachAx Used2
C[1] M MD20090 $MC_SPIND_DEF_MASTER_SPIND int 20090 1 C1SpindDefMaster Spind
S7 (ALIAS) names have been selected in order to:
● Incorporate the channel designation into the name
and
● Remove the characters [ ], which are not legal in a STEP 7 symbol.

Basic Functions
996 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Entry of the name in the S7 SYMBOL table (e.g. NCVAR for DB120):

Symbol Operand Data type


NCVAR DB 120 DB 120
File DB120.AWL must be compiled and transferred to the PLC.
Parameterization of FB 2 with instance DB 110:

DATA_BLOCK DB 110 //Unassigned user DB, as instance for FB 2


FB 2
BEGIN
END_DATA_BLOCK
Function FC "VariablenCall" : VOID
U I 7.7; //Unassigned machine control panel key
S M 100.0; //Activate req.
U M 100.1; //NDR completed message
R M 100.0; //Terminate job
U I 7.6; //Manual error acknowledgment
U M 102.0; //Error pending
R M 100.0; //Terminate job
CALL FB 2, DB 110 (
Req := M 100.0,
NumVar := 3, //Read 3 variables
Addr1 := NCVAR.C1AxConfMachAxUsed1,
Addr2 := NCVAR.C1AxConfMachAxUsed2,
Addr3 := NCVAR.C1SpindDefMasterSpind,
Error := M102.0,
NDR := M100.1,
State := MW104,
RD1 := P#DB99.DBX0.0 BYTE 1,
RD2 := P#DB99.DBX1.0 BYTE 1,
RD3 := P#M110.0 INT 1);

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 997
Basic PLC Program (P3)
Block descriptions

Example: Variable addressing


Reading of two R parameters of channel 1, whose address specifications are stored in
DB 120 as the basic type. The R parameter number is parameterized via parameter LineX.

DATA_BLOCK DB 120
VERSION : 0.0
STRUCT
C1_RP_rpa0_0:
STRUCT
SYNTAX_ID : BYTE := B#16#82;
area_and_unit : BYTE := B#16#41;
column : WORD := W#16#1;
line : WORD := W#16#0;
block type : BYTE := B#16#15;
NO. OF LINES : BYTE := B#16#1;
type : BYTE := B#16#F;
length : BYTE := B#16#8;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK
CALL FB 2, DB 110 (
Req := M 0.0,
NumVar := 2,
Addr1 := "NCVAR".C1_RP_rpa0_0,
Line1 := W#16#1,
Addr2 := "NCVAR".C1_RP_rpa0_0,
Line2 := W#16#2,
Error := M 1.0,
NDR := M 1.1,
State := MW 2,
RD1 := P#M 4.0 REAL 1,
RD2 := P#M 24.0 REAL 1);

Basic Functions
998 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Data types
The data types of the NCK are listed in the NC-VAR selector with the variables. The tables
below give the assignments to the S7 data types.

Classification of data types


NCK data type S7 data type
double REAL
double REAL2
float REAL
long DINT
integer DINT
uint_32 DWORD
int_16 INT
uint_16 WORD
unsigned WORD
char CHAR or BYTE
string STRING
bool BOOL
datetime DATE_AND_TIME
In order to read a double variable from the NCK without adapting the format, an ANY pointer
of the REAL 2 type must be specified in the target area for read data (e.g. P#M100.0 REAL
2). If the basic program recognizes REAL 2 as the target type when reading a double
variable, the data is applied to the PLC data area as a 64-bit floating point number.

13.13.3 FB 3: PUT write NC variables

Function
The PLC user program can write variables in the NCK area using FB PUT. The FB is multi-
instance-capable.
Every FB 3 call must be assigned a separate instance DB from the user area.
When FB 3 is called with a positive signal edge change at control input Req, a job is started
to overwrite the NC variables referenced by Addr1 to Addr8 with the data of the PLC
operand areas locally referenced by SD1 to SD8. Successful completion of the write process
is indicated by a logical "1" in status parameter "Done".
The write process lasts for several PLC cycles (normally 1-2). The block can be called up in
cyclic mode only.
Any errors are indicated by Error and State.
In order to reference the NC variables, all required variables are first selected with the "NC
VAR selector" tool and generated as STL source in a data block. A name must then be
assigned to this DB in the symbol table.
"DB name.S7 name" is transferred as the actual parameter of the NCK variable address
(Addr1 to Addr8) when FB 3 is called.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 999
Basic PLC Program (P3)
Block descriptions

Variable addressing
For some NC variables, it is necessary to select area no. and/or line or column in the NC
VAR selector. For these variables it is possible to select a basic type, i.e. area/column/row is
filled with "0" by default.
The contents of the area number, line and column specified by the NC VAR selector are
checked for a "0" in the FB. If a "0" is present, the value is transferred to the input parameter.
The user must supply the required parameters (UnitX/ColumnX/LineX) before calling Here
unit corresponds to area no., column to column and line to row.

Machine data, GUD


In order to define machine data and GUDs without a password, the protection levels of the
data you want to access must be redefined to the lowest level.
References:
● Commissioning Manual; Chapter: "Protection levels concept"
● Programming Manual, Job Planning; Chapter: "Define protection levels for user data"

NOTICE
FB 3 can only write NC variables if basic program parameter "NCKomm" has been set
to "1" (in OB 100: FB 1, DB 7). The call is permitted only in cyclic program OB1. An
assignment for all parameters with Req = 0 is also permitted in OB 100.
When channel-specific variables are written, only variables from one and the same
channel may be addressed via Addr1 to Addr8 in a job (FB 3 call).
In areas V and H, different logic axis numbers must not be assigned in a single job.
(Failure to observe this rule results in Error:= TRUE, State:= W#16#02).

NCK variables within one group can be combined in a job:

Area
Group 1 C[1] N B A T
Group 2 C[2] N B A T
Group 3 V[.] H[.]
The same rules apply to channels 3 to 10 as illustrated as examples in the above table in
groups 1 and 2.

Note
Especially when reading several long strings, the number of usable variables can be less
than 8.

Basic Functions
1000 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration of the function

FUNCTION_BLOCK FB 3
VAR_INPUT
Req : BOOL ;
NumVar : INT;
Addr1 : ANY ;
Unit1 : BYTE ;
Column1 : WORD ;
Line1 : WORD ;
Addr2 : ANY ;
Unit2 : BYTE ;
Column2 : WORD ;
Line2 : WORD ;
Addr3 : ANY ;
Unit3 : BYTE ;
Column3 : WORD ;
Line3 : WORD ;
Addr4 : ANY ;
Unit4 : BYTE ;
Column4 : WORD ;
Line4 : WORD ;
Addr5 : ANY ;
Unit5 : BYTE ;
Column5 : WORD ;
Line5 : WORD ;
Addr6 : ANY ;
Unit6 : BYTE ;
Column6 : WORD ;
Line6 : WORD ;
Addr7 : ANY ;
Unit7 : BYTE ;
Column7 : WORD ;
Line7 : WORD ;
Addr8 : ANY ;
Unit8 : BYTE ;
Column8 : WORD ;
Line8 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL ;
Done : BOOL ;
State : WORD ;
END_VAR
VAR_IN_OUT

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1001
Basic PLC Program (P3)
Block descriptions

SD1 : ANY ;
SD2 : ANY ;
SD3 : ANY ;
SD4 : ANY ;
SD5 : ANY ;
SD6 : ANY ;
SD7 : ANY ;
SD8 : ANY ;
END_VAR

Description of formal parameters


The table below lists all formal parameters of the PUT function.

Signal Type Type Range of values Remark


Req I BOOL Job start with positive signal edge
NumVar I INT 1 to 8 Number of variables to be written
(corresponds to use of
Addr1 to Addr8)
Addr1 to Addr8 I ANY [DBName].[VarName] Variable identifiers from
NC Var selector
Unit 1 to Unit 8 I BYTE Area address, optional for
variable addressing
Column 1 to I WORD Column address, optional for
Column 8 variable addressing
Line 1 to Line 8 I WORD Line address, optional for variable
addressing
Error O BOOL Negative acknowledgment of job
or execution of job impossible
Done O BOOL Job successfully executed
State O WORD See error identifiers
SD1 to SD8 I/O ANY P#Mm.n BYTE x... Data to be written
P#DBnr.dbxm.n BYTE x

Basic Functions
1002 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter
error. The error cause is coded at the block output State:

State Significance Note


WORD H WORD L
1 to 8 1 Access error In high byte number of Var in which
error occurred
0 2 Error in job Incorrect compilation of Var in a job
0 3 Negative acknowledgment, job Internal error,
not executable try: Check job,
NC RESET
1 ... 8 4 Data areas or data types do Check data to be written in SD1 to SD8;
not match or string is empty in high byte number of the Var in which
error occurred
0 6 FIFO full Job must be repeated since queue is
full
0 7 Option not set BP parameter "NCKomm" is not set
1 ... 8 8 Incorrect target area (SD) SD1 to SD8 may not be local data
0 9 Transmission occupied Job must be repeated
1 ... 8 10 Error in variable addressing Unit or column/line contains value 0
0 11 Variable addr. invalid or var. is Check Addr (or variable name), area,
read-only unit
0 12 NumVar = 0 Check parameter NumVar
1 to 8 13 (0x0d) ANY data reference incorrect NcVar date required has not been
parameterized
1 to 8 15 (0x0f) User data too long Remedy: Pack fewer variables in the job
or use shorter string variables

Configuration steps
To write NC variables, the same configuration steps are required as for reading NC
variables. It is useful to store the address data of all NC variables to be read or written in a
DB.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1003
Basic PLC Program (P3)
Block descriptions

Pulse diagram

     


5HT
 

'RQH

(UURU

(1) Activation of function


(2) Positive acknowledgment: variables have been written
(3) Reset function activation after receipt of acknowledgment
(4) Signal change by means of FB
(5) Not permissible
(6) Negative acknowledgment: Error has occurred, error code in output parameter state

Call example
Writing of three channel-specific machine data of channel 1:
Select the three data with NC VAR selector and store in the file DB120.VAR:

Area Block Name Type Byte S7 Name


C[1] RP rpa[5] DOUBLE 4 rpa_5C1RP
C[1] RP rpa[11] DOUBLE 4 rpa_11C1RP
C[1] RP rpa[14) DOUBLE 4 rpa_14C1RP
Entry NCVAR for DB 120 with the S7 SYMBOL Editor:

Symbol Operand Data type


NCVAR DB 120 DB 120
File DB120.AWL must be compiled and transferred to the PLC.
Call and parameterization of FB 3 with instance DB 111:

DATA_BLOCK DB 111 //Unassigned user DB, as instance for FB 3


FB 3
BEGIN
Function FC "VariablenCall": VOID
END_DATA_BLOCK
U I 7.7; //Unassigned machine control panel key
I M 100.0; //Activate req.
U M 100.1; //Done completed message
R M 100.0; //Terminate job
U I 7.6; //Manual error acknowledgment

Basic Functions
1004 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

U M 102.0; //Error pending


R M 100.0; //Terminate job
CALL FB 3, DB 111 (
Req := M 100.0,
NumVar := 3, //Write 3 variables
Addr1 := NCVAR.rpa_5C1RP,
Addr2 := NCVAR.rpa_11C1RP,
Addr3 := NCVAR.rpa_14C1RP,
Error := M102.0,
Done := M100.1,
State := MW104,
SD1 := P#DB99.DBX0.0 REAL 1,
SD2 := P#DB99.DBX4.0 REAL 1,
SD3 := P#M110.0 REAL 1);

Example: Variable addressing


Writing of two R parameters of channel 1, whose address specifications are stored in DB
120 as the basic type. The R parameter number is parameterized via parameter LineX.

DATA_BLOCK DB 120
VERSION : 0.0
STRUCT
C1_RP_rpa0_0:
STRUCT
SYNTAX_ID : BYTE := B#16#82;
area_and_unit : BYTE := B#16#41;
column : WORD := W#16#1;
line : WORD := W#16#0;
block type : BYTE := B#16#15;
NO. OF LINES : BYTE := B#16#1;
type : BYTE := B#16#F;
length : BYTE := B#16#8;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK
CALL FB 3, DB 122 (
Req := M 10.0,
NumVar := 2,
Addr1 := "NCVAR".C1_RP_rpa0_0,
Line1 := W#16#1,
Addr2 := "NCVAR".C1_RP_rpa0_0,
Line3 := W#16#2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1005
Basic PLC Program (P3)
Block descriptions

Error := M 11.0,
Done := M 11.1,
State := MW 12,
SD1 := P#M 4.0 REAL 1,
SD2 := P#M 24.0 REAL 1);

13.13.4 FB 4: PI_SERV PI services

Function
FB PI_SERV can be used to start program-instance services in the NCK area.

Note
Recommendation: Use the extended FB 7 in place of FB 4.

A program section, which carries out a particular function (e.g. with tool management, search
for empty location in a magazine), is executed in the NCK by making a request via the PI
service.
Every FB 4 call must be assigned an instance DB from the user area.
The specified service is referenced via the "PIService" parameter. The selected PI service is
supplied via the freely assignable additional input variables with varying data types (Addr1 to
Addr4 for strings, WVar1 to WVar 10 for INTEGER or WORD variables).
A job is started when FB 4 is called by means of a positive edge change at control input Req.
Successful execution of the job is displayed by means of a logical "1" in status parameter
"Done". Any errors are indicated by Error and State.
The "PI" data block (DB16) contains internal descriptions of the possible PI services. A name
must then be assigned to this DB in the signal list. On calling the FB 4, "DB-Name.PI-Name"
is transferred as the actual parameter for "PIService".
The execution of the PI service extends over several PLC cycles (generally 1 to 2).
The block can be called up in cyclic mode only.

Note
FB 4 can start PI services only if the basic program parameter "NCKomm" has been set to
"1" (in OB 100: FB 1, DB 7). The call is permitted only in cyclic program OB1. An assignment
for all parameters with Req = 0 is also permitted in OB 100.

Basic Functions
1006 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration of the function

FUNCTION_BLOCK FB 4
VAR_INPUT
Req : BOOL ;
PIService : ANY ;
Unit : INT ;
Addr1 : ANY ;
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
WVar1 : WORD ;
WVar2 : WORD ;
WVar3 : WORD ;
WVar4 : WORD ;
WVar5 : WORD ;
WVar6 : WORD ;
WVar7 : WORD ;
WVar8 : WORD ;
WVar9 : WORD ;
WVar10 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL ;
Done : BOOL ;
State : WORD ;
END_VAR

Description of formal parameters


The following table shows all formal parameters of the function PI_SERV.

Signal Type Type Range of values Remark


Req I BOOL Job request
PIService I ANY [DBName].[VarName] PI service description1)
Standard is:
"PI".[VarName]
Unit I INT 1... Area number
Addr1 to Addr4 I ANY [DBName].[VarName] Reference to strings specification
according to selected PI service
WVar1 to I WORD 1... INTEGER or WORD variables.
WVar10 Specification according to selected PI
service,
Error O BOOL Negative acknowledgment of job or
execution of job impossible

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1007
Basic PLC Program (P3)
Block descriptions

Signal Type Type Range of values Remark


Done O BOOL Job successfully executed
State O WORD See error identifiers
1) See README file on basic program diskette supplied

Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter
error. The error cause is coded at the block output State:

State Significance Note


3 Negative acknowledgment, job not Internal error, try:
executable NC RESET
6 FIFO full Job must be repeated since queue is
full
7 Option not set BP parameter "NCKomm" is not set
9 Transmission occupied Job must be repeated
13 (0x0d) ANY data reference incorrect String date required has not been
parameterized
14 (0x0e) PIService parameter reference incorrect No valid PI description
15 (0x0f) String too long Addr1.. Check Addr4 strings

Timing diagram

     


5HT
 

'RQH

(UURU

(1) Activation of function


(2) Positive acknowledgment: PI service has been executed
(3) Reset function activation after receipt of acknowledgment
(4) Signal change by means of FB
(5) Not permissible
(6) Negative acknowledgment: Error has occurred, error code in the output parameter State

Basic Functions
1008 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

13.13.4.1 Overview of available PI services


The following section provides an overview of the PI services that can be started from the
PLC.
The significance and application of the general FB 4 input variables (Unit, Addr ..., WVar ...)
depend on the individual PI service concerned.

Table 13- 3 General PI services

PI service Function
ASUB Assign interrupt
CANCEL Execute cancel
CONFIG Reconfiguration of tagged machine data
DIGION Digitizing on
DIGIOF Digitizing off
FINDBL Activate block search
LOGIN Activate password
LOGOUT Reset password
NCRES Trigger NC-RESET
SELECT Select program for processing for one channel
SETUDT Sets the current user data to active
SETUFR Activate user frame

Table 13- 4 PI services of tool management

PI service Function
CRCEDN Create new cutting edge
CREACE Create cutting edge
CREATO Generate tool
DELECE Delete a cutting edge
DELETO Delete tool
MMCSEM Semaphores for various PI services
TMCRTO Create tool
TMFDPL Empty location search for loading
TMFPBP Empty location search
TMGETT T-number for the specified tool identifier with duplo number
TMMVTL Prepare magazine location for loading, unload tool
TMPOSM Position magazine location or tool
TMPCIT Set increment value for workpiece counter
TMRASS Reset active status
TRESMO Reset monitoring values
TSEARC Complex search using search screen forms

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1009
Basic PLC Program (P3)
Block descriptions

13.13.4.2 General PI services

PI service: ASUB
Function: Assign interrupt
A program stored on the NCK is assigned an interrupt signal for a channel. This is possible
only when the program file may be executed. The path names and the program names are
to be written in correct notation.
For the correct notation of the path and the program names see:
References:
Programming Manual Job Planning; Chapter: "File and Program Management" > "Program
Memory".

Parameterization
Signal Type Value range Meaning
PIService ANY PI.ASUP Assign interrupt
Unit INT 1 ... 10 Channel
WVar1 WORD 1 ... 8 Interrupt number
WVar2 WORD 1 ... 8 Priority
WVar3 WORD 0/1 LIFTFAST
WVar4 WORD 0/1 BLSYNC
Addr1 STRING Path name
Addr2 STRING Program name

Note
The SETINT instruction is also used to make the assignment.
The ASUP PI service may only be executed when the channel to be activated is in RESET
state.
References:
Programming Manual, Job Planning; Chapter: "Flexible NC-Programming" > "Interrupt
routine (ASUB)"

PI service: CANCEL
Function: Execute Cancel
Has the effect that the function "Cancel" (corresponding to the key on HMI) is executed.

Parameterization
Signal Type Value range Meaning
PIService ANY PI.CANCEL Cancel

Basic Functions
1010 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

PI service: CONFIG
Function: Reconfiguration
The reconfiguration command activates machine data, which have been entered sequentially
by the operator or the PLC, almost in parallel.
The command can only be activated when the control is in RESET state or the program is
interrupted (NC stop at block limit). An FB 4 error checkback message is output if these
conditions are not fulfilled (state = 3).

Parameterization
Signal Type Value range Meaning
PIService ANY PI.CONFIG Reconfiguration
Unit INT 1
WVar1 INT 1 Classification

PI service: DIGION
Function: Digitizing on
Selecting digitizing in the specified channel.

Parameterization
Signal Type Value range Meaning
PIService ANY PI.DIGION Digitizing on
Unit INT 1 to 10 Channel

PI service: DIGIOF
Function: Digitizing off
Deactivating digitizing in the specified channel.

Parameterization
Signal Type Value range Meaning
PIService ANY PI.DIGIOF Digitizing off
Unit INT 1 to 10 Channel

PI service: FINDBL
Function: Activate block search
A channel is switched to block search mode and the appropriate acknowledgment then
transmitted. The block search is then executed immediately by the NCK. The search pointer
must already be in the NCK at this point in time. The search can be interrupted at any time
by an NC RESET. Once the search is successfully completed, the normal processing mode
is reactivated automatically. NC Start then takes effect from the located search target. The
operator is responsible for providing a collision-free approach path.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1011
Basic PLC Program (P3)
Block descriptions

Parameterization
Signal Type Value range Meaning
PIService ANY PI.FINDBL Block search
Unit INT 1 to 10 Channel
WVar1 WORD x Preprocessing mode

x Writes the preprocessing mode


Value: Meaning:
=1 Without calculation
=2 With calculation
=3 with main block consideration

PI service: LOGIN
Function: Create password
Transfers the parameterized password to the NCK. The passwords generally consist of
8 characters. If required, blanks must be added to the string of the password.
Example:
Password: STRING[8] := 'SUNRISE';

Parameterization
Signal Type Value range Meaning
PIService ANY PI.LOGIN Create password
Unit INT 1 NCK
Addr1 STRING 8 characters Password

PI service: LOGOUT
Function: Reset password
The password last transferred to the NCK is reset.

Parameterization
Signal Type Value range Meaning
PIService ANY PI.LOGOUT Reset password
Unit INT 1 NCK

Basic Functions
1012 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

PI service: NCRES
Function: Trigger NC-RESET
Initiates an NCK RESET. The Unit and WVar1 parameters must be assigned 0.

Parameterization
Signal Type Value range Meaning
PIService ANY PI.NCRES Trigger NC-RESET
Unit INT 0 0
WVar1 WORD 0 0

PI service: SELECT
Function: Select processing for a channel
A program stored on the NCK is selected for processing for one channel. This is possible
only if the file may be executed. The path name and program name must be entered as
described in the Programming Manual Job Planning, File and Program Management,
Section "Program Memory". Please also refer to example of FB 4 for notation of path and
program names.
Possible block types

Block types
Workpiece directory WPD
Main program MPF
Subroutine SPF
cycles CYC
Asynchronous subprograms ASP
Binary files BIN

Parameterization
Signal Type Value range Meaning
PIService ANY PI.SELECT Program selection
Unit INT 1 ... 10 Channel
Addr1 STRING Path name
Addr2 STRING Program name

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1013
Basic PLC Program (P3)
Block descriptions

PI service: SETUDT
Function: Set function current user data active
The current user data, such as tool offsets, basic frames and settable frames are set to
active in the next NC block (only in STOP state).

Parameterization
Signal Type Range of values Meaning

PIService ANY PI.SETUDT Activate user data


Unit INT 1 to 10 Channel
WVar1 WORD 1 to 5 User Data Type
1= Active tool offest
2= Active Basic frame
3= Active settable frame
4= Active global Basic frame
5= Active global settable frame
WVar2 WORD 0 Standby
WVar3 WORD 0 Standby

PI service: SETUFR
Function: Activate user frames
User frames are loaded to the NCK. All necessary frame values must be transferred to the
NCK beforehand by writing variables with FB 3.

Parameterization
Signal Type Value range Meaning
PIService ANY PI.SETUFR Activate
user frames
Unit INT 1 to 10 Channel

13.13.4.3 PI services of tool management

PI service: CRCEDN
Function: Create new cutting edge
If the T number of an existing tool is specified in parameter “T number” in the PI service, then
a cutting edge is set up for this particular tool (in this case, parameter “D number” (number of
cutting edge to be created) has a value range of 00001–00009). If a positive T number is
specified as a parameter and the tool for the T number entered does not exist, then the PI
service is aborted. If a value of 00000 is entered as the T number (model of absolute D
numbers), then the D number values can range from 00001-31999. The new cutting edge is
set up with the specified D number. If the specified cutting edge already exists, then the PI
service is aborted in both cases.

Basic Functions
1014 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Parameterization
Signal Type Range of values Significance
PIService ANY PI.CRCEDN Create new cutting edge
Unit INT 1 ... 10 TOA
WVar1 INT T number of tool for which cutting
edge must be created. A setting of
00000 states that the cutting edge
should not refer to any particular tool
(absolute D number).
WVar2 INT 1 ... 9 or Edge number of tool cutting edge
01 - 31999

PI service: CREACE
Function: Create cutting edge
Creation of the cutting edge with the next higher/next unassigned D number for the tool with
the transferred T number in TO, TS (if present). The cutting edge for the OEM cutting edge
data is set up simultaneously in the TUE block - if one is present.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.CREACE Create cutting edge
Unit INT 1 ... 10 TOA
WVar1 INT T number

PI service: CREATO
Function: Create tool
Creation of a tool with specification of a T number. The tool is entered as existing in the tool
directory area (TV). The first "cutting edge" D1 (with zero contents) is created for tool offsets
in the TO block. D1 (with zero contents) is also created for the OEM "cutting edge" data in
the TUE block - if one is present. If a TU block exists, it will contain the data set for the tool.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.CREATO Create tool
Unit INT 1 ... 10 TOA
WVar1 INT T number

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1015
Basic PLC Program (P3)
Block descriptions

PI service: DELECE
Function: Delete a tool cutting edge
If the T number of an existing tool is specified in parameter “T number” in the PI service, then
a cutting edge is deleted for this particular tool (in this case, parameter “D number” (number
of cutting edge to be created) has a value range of 00001–00009). If a positive T number is
specified as a parameter and the tool for the T number entered does not exist, then the PI
service is aborted. If a value of 00000 is entered as the T number (model of absolute D
numbers), then the D number values can range from 00001-31999. If the specified cutting
edge does not exist, then the PI service is aborted in both cases.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.DELECE Delete cutting edge
Unit INT 1 ... 10 TOA
WVar1 INT T number of tool for which cutting
edge must be created. A setting of
00000 states that the cutting edge
should not refer to any particular tool
(absolute D number).
WVar2 INT 1 ... 9 Edge number of cutting edge that must
or be deleted
01 ... 31999

PI service: DELETO
Function: Deleting a tool
Deletes the tool assigned to the transferred T number with all cutting edges (in TO, in some
cases TU, TUE and TG (type 4xx), TD and TS blocks).

Parameterization
Signal Type Range of values Significance
PIService ANY PI.DELETO Delete tool
Unit INT 1 ... 10 TOA
WVar1 INT T number

Basic Functions
1016 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

PI service: MMCSEM
Semaphores for various PI services
For use by HMI and PLC
10 semaphores are provided for each channel. These protect critical functions for the
HMI/PLC. By setting the semaphore for the corresponding function number, several
HMI/PLC units can be synchronized with it in cases where a function contains a critical
section with respect to data to be fetched by the NCK. Semaphores are managed by the
HMI/PLC. A semaphore value of 1stipulates a Test & Set operation for the semaphore of the
specified function number. The return value of the PI service represents the result of this
operation:
● Checkback value Done := TRUE: Semaphore has been set, critical function can be called
● Checkback value Error := TRUE with state = 3: Semaphore was already set, critical
function cannot be called at the present time. The operation must be repeated later.

Note
On completion of the operation (reading data of this PI service) it is essential that the
semaphore is enabled again.

Parameter:
WVar1 = FunctionNumber
This function number represents a PI service:

Function number PI service


1 TMCRTO (create tool)
2 TMFDPL (search for empty location for loading):
3 TMMVTL (prepare magazine location for loading, unload tool)
4 TMFPBP (search for location)
5 TMGETT (search for tool number)
6 TSEARC (search for tool)
7 ... 10 Reserved

WVar2=SemaphorValue

Value Description
0: Reset semaphore
1: Test and set semaphore

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1017
Basic PLC Program (P3)
Block descriptions

Parameterization
Signal Type Range of values Significance
PIService ANY PI.MMCSEM Set semaphore
Unit INT 1, 2 to 10 Channel
WVar1 INT 1 ... 10 FunctionNumber
WVar2 WORD 0, 1 SemaphoreValue

PI service: TMCRTO
Function Create tool:
Creating a tool with specification:
● of an identifier, a duplo number, e.g. with:
$TC_TP1[y] = duplo number;
$TC_TP2[y] = "tool identifier";
● optionally a T number, e.g. with:
y = T number
The tool is entered as existing in the tool directory area (TV). The first cutting edge "D1" (with
zero contents) is created for tool offsets in the TO block. "D1" (with zero contents) is also set
up for the monitoring data in the TS block, and simultaneously with zero contents for the
OEM cutting edge data in the TUE block - if one is present. The TD block contains the
identifier, duplo number and number of cutting edges (=1) for the T number that is entered
optionally or allocated by the NCK.
If a TU block exists, it will contain the data set for the tool. After execution of the PI, the T
number of the tool created is available in the TV block under TnumWZV.

Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See PI service MMCSEM for more
information.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.TMCRTO Create tool
Unit INT 1 - 10 TOA
WVar1 INT T number
WVar2 INT Duplo number
Addr1 STRING max. 32 characters Tool identifier
T number > 0 means a T number must be specified
T number = -1 means that the NCK should allocate a T number
The example shows T number = -1 ⇒ T number assigned by NCK

Basic Functions
1018 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

PI service: TMFDPL
Function: Empty location search for loading
(dependent on parameter assignment):
Location_number_to = -1, Magazine_number_to = -1:
Searches all magazines in the specified area (= channel) for an empty location for the tool
specified with a T number. After execution of the PI, the magazine and locations numbers
found during the search are listed in the configuration block of the channel (component
magCMCmdPar1 (magazine number) and magCMCmdPar2 (location number)).
Location_number_ID and magazine_number_ID can be set as search criteria or not (= -1).
The PI is acknowledged positively or negatively depending on the search result.
Location_number_to = -1, Magazine_number_to = Magazine_number:
An empty location for the tool specified with a T number is searched for in the specified
magazine. Location_number_ID and magazine_number_ID can be set as search criteria or
not (= -1). The PI is acknowledged positively or negatively depending on the search result.
Location_number_to = Location_number, Magazine_number_to = Magazine_number:
The specified location is checked, to confirm that it is free to be loaded with the specified
tool. Location_number_ID and magazine_number_ID can be set as search criteria or not
(= -1). The PI is acknowledged positively or negatively depending on the search result.
Command parameters 1 and 2 are located at source.

Loading: If source is an internal loading magazine, then the command parameters are
located at the target (a real magazine).
Unloading: Source is always a real magazine.

Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See PI service MMCSEM for more
information.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.TMFDPL Empty location
for loading
Unit INT 1 - 10 TOA
WVar1 INT T number
WVar2 INT Location_number
_to
WVar3 INT Magazine_number_to
WVar4 INT Location_number
_ID
WVar5 INT Magazine_number_ID

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1019
Basic PLC Program (P3)
Block descriptions

PI service: TMFPBP
Function: Empty location search
(dependent on parameter assignment):
For this see the description of FB 7: PI_SERV2 General PI services

PI service: TMGETT
Function: Determine T-number for the specified tool identifier with duplo number
Determining the T number for a specified tool identifier with duplo number. The PI-services
stores the T number determined for the tool as result in the variable TnumWZV in the block
TV. If the specified tool does not exist, then the T number "-0001" is returned. Since the PI-
service returns a result in the variable TnumWZV, the service is to be stored with the
semaphore mechanism (PI-service _N_MMCSEM) with the function number for
_N_TMGETT.

Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See PI service MMCSEM for more
information.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.TMGETT Determining the T
number
Unit INT 1 ... 10 TOA
Addr1 STRING max. 32 characters Name of the tool, for
which the T number is
searched
WVar2 INT Duplo number of the
tool, for which the T
number is searched

PI service: TMMVTL
Function: Prepare magazine location for loading, unload tool
This PI service is used both to load and unload tools. Whether the PI initiates a loading or
unloading operation depends on the assignment between the real locations and the "from"
parameters and "to" parameters: Loading ⇒ 'From' = Loading point/station, unloading ⇒ 'To'
= loading point/station
The TMMVTL PI service is used for all movements.
1. Loading and unloading (loading point ↔ magazine)
2. Loading and unloading (loading point ↔ buffer storage, e.g. spindle)
3. Relocation within a magazine
4. Relocation between different magazines

Basic Functions
1020 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

5. Relocation between magazine and buffer storage


6. Relocation within buffer storage
The following variables from the TM block are used to monitor case 1, 3, 4, 5:
magCmd (area no. = TO unit, line = magazine number)
magCmdState <- "acknowledgment"
The following variables from the TMC block are used to monitor case 2, 6):
magCBCmd (area no. = TO unit)
magCBCmdState <- "acknowledgment"
Load function
Prepares the specified real magazine for the specified channel for loading, i.e. traverses the
magazine to the selected location for loading at the specified loading point/station
(location_number_from, magazine_number_from) and inserts the tool.
When location_number_to = -1, an empty location for the tool specified by a T number is first
sought in the specified magazine and the magazine then traversed. After execution of the PI,
the number of the location found is listed in the TM area in component magCMCmdPar2 for
the real magazine of the channel.
With location_number_to = -2 and a valid magazine number, loading takes place into the
currently queued magazine position of the specified magazine. After execution of the PI, the
number of the location for tool loading is listed in the TM area in component
magCMCmdPar2 for the real magazine of the channel.
Unload function
The tool specified by the tool number is unloaded at the specified loading point/station
(location_number_to, magazine_number_to), i.e. the magazine is traversed to the position for
unloading and the tool is then removed. The magazine location for the tool is marked as
being free in the TP block. The tool can be specified either via a T number or by means of
the location and magazine numbers. The value -1 is entered at unused specification points.

Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See PI service MMCSEM for more
information.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.TMMVTL Make magazine
location ready for
loading, unload tool
Unit INT 1 ... 10 TOA
WVar1 INT T number
WVar2 INT Location_number_from
WVar3 INT Magazine_number_fro
m

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1021
Basic PLC Program (P3)
Block descriptions

Parameterization
Signal Type Range of values Significance
WVar4 INT Location_number_to
WVar5 INT Magazine_number_to

PI service: TMPOSM
Function: Position magazine location or tool
(dependent on parameter assignment):
A magazine location, which has either been specified directly or qualified via a tool located
on it, is traversed to a specified position (e.g. in front of a load location) via the PI service.
The PI service makes a magazine location, which can be qualified in various ways, traverse
in front of a specified load location. The load location must be specified in the PI parameters
"location number_from" and "magazine number_from" (compulsory!).
The magazine location to be traversed can be qualified by the following:
● T number of the tool
The location where the tool is positioned traverses;
the "tool identifier", "duplo number", "location number_from" and
"magazine number_from" parameters are irrelevant (i.e. values "" , "-0001", "-0001","-
0001").
or
● Tool identifier and duplo number
The location where the tool is positioned traverses;
the "T number", "location number_from" and "magazine number_from" parameters are
irrelevant (i.e. value "-0001" each).
or
● Direct specification of the location in the "location_number_from" and
"magazine_number_from" parameters
The tool-qualifying parameters T number, "tool identifier" and "duplo number" are
irrelevant (i.e. values "-0001", "", "-0001").

Parameterization
Signal Type Range of values Significance
PIService ANY PI.TMPOSM Position magazine
location or tool
Unit INT 1 ... 10 TOA
Addr1 STRING max. 32 characters Tool identifier
WVar1 INT T number
WVar2 INT Duplo number
WVar3 INT Location_number_from
WVar4 INT Magazine_number_fro
m

Basic Functions
1022 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Parameterization
Signal Type Range of values Significance
WVar5 INT Location number_ref
WVar6 INT Magazine number_ref

PI service: TMPCIT
Function: Set increment value for the workpiece counter
Incrementing the workpiece counter of the spindle tool

Parameterization
Signal Type Range of Significance
values
PIService ANY PI.TMPCIT Set increment value for workpiece counter
Unit INT 1 ... 10 TOA
WVar1 WORD 0 ... max. Spindle number; corresponds to the type index in the
location data with spindle location type of the buffer
magazine in channel.000 = main spindle
WVar2 WORD 0 ... max. Increment value; indicates the number of spindle
revolutions after which the workpiece counter is
incremented

PI service: TMRASS
Function: Reset the active status
Resetting the active status on worn tools
This PI service is used to search for all tools with the tool status active and disabled. The
active status is then canceled for these tools. Potentially appropriate times for this PI service
are the negative edge of VDI signal "tool disable ineffective", an end of program, or a
channel RESET. This PI service is intended mainly for the PLC, since it knows when the
disabled tool is finally no longer to be used.

Parameterization
Signal Type Range of Significance
values
PIService ANY PI. TMRASS Reset active status
Unit INT 1 ... 10 TO area

PI service: TRESMO
Function: Reset monitoring values
This PI service resets the monitoring values of the designated edges of the designated tools
to their setpoint (initial) values.
This only relates to tools with active monitoring.
Compare the NC-Speech Command RESETMON.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1023
Basic PLC Program (P3)
Block descriptions

Parameter assignment
Signal Type Value range Significance
PIService ANY PI. TRESMO Reset monitoring values
Unit INT 1 ... 10 TO area
WVar1 WORD - max ... max ToolNumber
0: Applies to all tools
> 0: Applies only to this tool
< 0: Applies to all sister tools of the specified T No.
WVar2 WORD 0 ... max. D number
< 0: Monitoring of specified edge of specified tools is
reset.
0: Monitoring of all edges of specified tools is reset.
WVar3 WORD 0 ...15 Monitoring types
Type of monitoring to be reset.
This parameter is binary-coded.
1: Tool-life monitoring is reset.
2: Count monitoring is reset.
4: Wear monitoring is reset.
8: Sum-offset monitoring is reset.
Combinations of monitoring types can be reset by
adding the values above.
0: All active tool-monitoring functions ($TC_TP9) are
reset.

PI service: TSEARC
Function: Complex search using search screen forms
(dependent on parameter assignment):
The PI service allows you to search for tools with specified properties within a search domain
(in one or more magazines starting and ending at a specific location). The specified
properties refer only to data of the tools and their cutting edges.
The PI service is only available if tool management is activated.
You can define a search direction and the number of hits for the PI service (e.g. one tool for
the next tool with matching properties or all tools with the specified properties).
As a result of this service, the user who made the call receives a list of the internal T
numbers of the tools found.
The search criteria can only be specified as AND operation. If an application needs to define
an OR operation for the search criteria, it must first execute a series of queries with AND
criteria and then combine/evaluate the results of the individual queries.

Basic Functions
1024 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

To assign the parameters of the PI service, the properties of the required tools are first
defined via variable service in the TF block. For this in the block TF in the operand masks
(parMaskT..) the relevant
● comparison criteria (which tool data is to be compared?) are highlighted,
● comparison operator-data (parDataT..) filled with the corresponding comparison types
(==, <, >, <=, >=, &&) to be executed
● and the comparison values are entered in the operand data.
The PI service is then initiated and, after its successful return, the variable service from the
TF block is used to read out the number of hits in the variable resultNrOfTools and the result
list in the variable resultToolNr (i.e. the list of internal T numbers of the tools found in the
search - resultNrOfTools quantity).
The PI service must be encapsulated with a semaphore from its preparation until the
successful return of the result. This is the only way to ensure exclusive access and the
exclusive use of the TF block in conjunction with the TSEARC PI service. The function
number provided for the semaphore feature (PI service MMCSEM) is the function number for
TSEARC.
If the service is configured incorrectly, a malfunction occurs. In all other cases, it will return a
result, even if no tools are found (resultNrOfTools = 0).
The search domain can be defined as follows in the parameters
"MagNrFrom", "PlaceNrFrom", "MagNrTo", "PlaceNrTo":

MagNr PlaceNr MagNr PlaceNr Search area


From From To To
WVar1 WVar2 WVar3 WVar4
#M1 #P1 #M2 #P2 Locations starting at magazine #M1, location
#P1 up to magazine #M2, location #P2 are
searched
#M1 -1 #M1 -1 All locations in magazine #M1 - and no others
- are searched
#M1 -1 -1 -1 All locations starting at magazine #M1 are
searched
#M1 #P1 -1 -1 All locations starting at magazine #M1 and
location #P1 are searched
#M1 #P1 #M1 -1 Locations in magazine #M1 starting at
magazine #M1 and location #P1 in this
magazine are searched
#M1 #P1 #M2 -1 Locations starting at magazine #M1, location
#P1 up to magazine #M2, location #P2 are
searched
#M1 -1 #M2 #P2 Locations starting at magazine #M1 up to
magazine #M2, location #P2 are searched
#M1 -1 #M2 -1 Locations starting at magazine #M1 up to and
including magazine #M2 are searched
-1 -1 -1 -1 All magazine locations are searched
For a symmetric search (see parameter "SearchDirection")

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1025
Basic PLC Program (P3)
Block descriptions

● the search area may stretch over only a single magazine (cases 2 and 5 from the above
table). If another search domain is specified, the service will malfunction.
● a reference location must be entered in the parameters "MagNrRef" and "PlaceNrRef",
with respect to which the symmetric search is done.
The reference location is a buffer location (a location from the magazine buffer, i.e. change
position, gripper, etc.) or a load point (a location from the internal loading magazine). The
search is executed symmetrically with reference to the magazine location in front of the
specified reference location. A multiple assignment to the magazine being searched must be
configured in the TPM block for the reference location. If this is not the case, a malfunction
occurs. If the magazine location in front of the reference location is outside the search
domain, the service responds as if it has not found a matching location.

Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See PI service MMCSEM for more
information.

Parameter assignment
Signal Type Value range Significance
PIService ANY PI.TSEARC Complex search using search screen forms
Unit INT 1 - 10 TOA
WVar1 INT MagNrFrom Magazine number of magazine from which
search must begin
WVar2 INT PlaceNrFrom Location number of location in magazine
MagNrFrom, at which search must begin
WVar3 INT MagNrTo Magazine number of magazine at which search
must end
WVar4 INT PlaceNrTo Location number of location in magazine
MagNrTo, at which search must end
WVar5 INT MagNrRef Magazine number of (internal) magazine, with
reference to which the symmetrical search is to be
performed. (this parameter is only relevant with a
"symmetrical" search direction)
WVar6 INT PlaceNrRef Location number of location in magazine
MagNrRef, with reference to which the symmetrical search
is to be performed. This parameter is only relevant with a
"symmetrical" search direction
WVar7 INT 1, 2, 3 SearchDirection specifies the required search direction.
1: Forwards from the first location of the search domain
2: Backwards from the last location of the search
domain
3: symmetric to the real magazine location, which is
before the location specified with Magazin-
Number_ID and Location-Number_ID
WVar8 INT 0, 1, 2, 3 KindofSearch
0: Find all tool with this property cutting edge
specifically

Basic Functions
1026 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Parameter assignment
Signal Type Value range Significance
1: Search for the first tool found with this property
(cutting edge specifically)
2: Browse all cutting edges to find all tool with this
property
3: Browse all tools to search for the first tool found with
this property

Call example
Program selection in channel 1 (main program and workpiece program)
Entry of PI for DB 16 and STR for DB 124 with the S7 SYMBOL editor:

Parameterization
Symbol Operand Data type
PI DB 16 DB 16
STR DB 124 DB 124

DATA_BLOCK DB 126 //Unassigned user DB, as instance for FB 4


FB 4
BEGIN
END_DATA_BLOCK

DATA_BLOCK DB 124
struct
PName: string[32]:= '_N_TEST_MPF ';
Path: string[32]:= '/_N_MPF_DIR/'; //Main program
PName_WST: string[32]:= '_N_ABC_MPF';
Path_WST: string[32]:= //Workpiece program
'/_N_WCS_DIR/_N_ZYL_WPD';
end_struct
BEGIN
END_DATA_BLOCK
Function FC "PICall" : VOID
U I 7.7; //Unassigned machine control panel key
S M 0.0; //Activate req.
U M 1.1; //Done completed message
R M 0.0; //Terminate job
U I 7.6; //Manual error acknowledgment
U M 1.0; //Error pending
R M 0.0; //Terminate job

CALL FB 4, DB 126 (

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1027
Basic PLC Program (P3)
Block descriptions

Req := M0.0,
PIService := PI.SELECT,
Unit := 1, // CHAN 1
Addr1 := STR.Path,
Addr2 := STR.PName, //Main-program selection
//Addr1:=STR.Path_WST,
//Addr2:=STR.PName_WST, //Workpiece-program selection
Error := M1.0,
Done := M1.1,
State := MW2);

13.13.5 FB 5: GETGUD read GUD variable

Function
The PLC user program can read a GUD variable (GUD = Global User Data) from the NCK or
channel area using the FB GETGUD.
The FB has multi-instance capability. The call is permitted only in cyclic program OB1. An
assignment for all parameters with Req = 0 is also permitted in OB 100. Capital letters must
be used for the names of GUD variables.
Every FB 5 call must be assigned a separate instance DB from the user area.
A job is started when FB 5 is called by means of a positive edge change at control input Req.
This job includes the name of the GUD variable to be read in parameter "Addr" with data
type "STRING". The pointer to the name of the GUD variables is assigned symbolically to
the "Addr" parameter with <DataBlockName>.<VariableName>. Additional information about
this variable is specified in parameters "Area", "Unit", "Index1" and "Index2" (see table of
block parameters).
When parameter "CnvtToken" is activated, a variable pointer (token) can be generated for
this GUD variable as an option. This pointer is generated via the NC-VAR selector for
system variables of the NC. Only this method of generating pointers is available for GUD
variables. Once a pointer has been generated for the GUD variable, then it is possible to
read and write via FB 2 and FB 3 (GET, PUT) with reference to this variable pointer. This is
the only method by which GUD variables can be read. When FB 2 or FB 3 is parameterized,
only parameter Addr1 ... Addr8 need to be parameterized for this GUD variable pointer. GUD
variable fields are an exception. In these fields Line1 to Line8 must also be parameterized
with the field device from these variables. The successful completion of the read process is
displayed by the status parameter "Done"=TRUE.
The read process extends over several PLC cycles (generally 1 to 2).

Basic Functions
1028 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Any errors are displayed via the output parameters "Error" and "State".

Note
In order to read a double variable from the NCK without adapting the format, an ANY pointer
of the REAL 2 type must be specified in the target area for read data (e.g. P#M100.0 REAL
2). If the basic program recognizes REAL 2 as the target type when reading a double
variable, the data is applied to the PLC data area as a 64-bit floating point number.
FB 5 can only write GUD variables if basic program parameter "NCKomm" has been set to
"TRUE" (in OB 100: FB 1, DB 7; see "FB 1: RUN_UP Basic program, start-up section
(Page 898)").

Declaration of the function

FUNCTION_BLOCK FB 5 //Server name


KNOW_HOW_PROTECT
VERSION : 3.0
VAR_INPUT
Req : BOOL ;
Addr: ANY ; //Variables name string
Area BYTE ; //Area: NCK = 0, channel = 2
Unit : BYTE ;
Index1: INT ; //Field index 1
Index2: INT ; //Field index 2
CnvtToken: BOOL; //Conversion into 10-byte token
VarToken ANY ; //Struct with 10 bytes for the variable token
END_VAR

VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD ;
END_VAR

VAR_IN_OUT
RD: ANY ;
END_VAR

BEGIN
END_FUNCTION_BLOCK

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1029
Basic PLC Program (P3)
Block descriptions

Description of formal parameters


The table below lists all formal parameters of the GETGUD function.

Signal Type Type Range of values Remark


Req I BOOL Job start with positive signal edge
Addr I ANY [DBName].[VarName] GUD variable name in a variable of
data type STRING
Area I BYTE Area address:
0: NCK variables
2: Channel variables
Unit I BYTE NCK area: Unit:=1
Channel area: Channel no.
Index1 I INT Field index 1 of variable
Variable has the value 0 if no field
index is used.
Index2 I INT Field index 2 of variable
Variable has the value 0 if no field
index is used.
CnvtToken I BOOL Activate generation of a 10 byte
variable token
VarToken I ANY [DBName].[VarName] Address to a 10-byte token (see
example)
Error O BOOL Negative acknowledgment of job or
execution of job impossible
Done O BOOL Job successfully executed
State O WORD See error identifiers
RD I/O ANY P#Mm.n BYTE x... data to be read
P#DBnr.dbxm.n BYTE x

Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter
error. The error cause is coded at the block output State:

State Significance Note


WORD H WORD L
0 1 Access error
0 2 Error in job Incorrect compilation of Var. in a job
0 3 Negative Internal error, try:
acknowledgment, job not NC RESET
executable
0 4 Data areas or datatypes Check data to be
do not tally read in RD

Basic Functions
1030 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

State Significance Note


WORD H WORD L
1 4 Insufficient local user read variable is longer than specified
memory available in RD
0 6 FIFO full Job must be repeated,
since queue is full
0 7 Option not set BP parameter "NCKomm" is not set
0 8 Incorrect target area (SD) RD may not be local data
0 9 Transmission occupied Job must be repeated
0 10 Error in addressing Unit contains value 0
0 11 Address of variable Address check (or variable name),
invalid area, unit
1 ... 8 13 (0x0d) ANY data reference String/NcVar data required has not
incorrect been parameterized
0 15 (0x0f) String more than 32 GUD variable name too long
characters

Configuration steps
To be able to read a GUD variable, its name must be stored in a string variable. The data
block with this string variable must be defined in the symbol table so that the "Addr"
parameter can be assigned symbolically for FB GETGUD. A structure variable can be
defined optionally in any data area of the PLC to receive the variable pointer (see
specification in following example).

Pulse diagram

     


5HT
 

'RQH

(UURU

(1) Activation of function


(2) Positive acknowledgment: variables have been written
(3) Reset function activation after receipt of acknowledgment
(4) Signal change by means of FB
(5) Not permissible
(6) Negative acknowledgment: Error has occurred, error code in the output parameter "State"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1031
Basic PLC Program (P3)
Block descriptions

Call example 1
Read a GUD variable from channel 1 with the name "GUDVAR1" (type definition of the
variables: INTEGER). The user-defined variable should be converted in a 10-byte variable
pointer for the subsequent writing with the F3 (see also the table "Assignment of the
datatypes" in "FB 2: Read GET NC variable (Page 898)").
Call and parameterization of FB 5 with instance DB 111:

// Data block for GUD variable


DATA_BLOCK DB_GUDVAR //Assignment to symbol table

STRUCT
GUDVar1 : STRING[32] := 'GUDVAR1'; //Name is defined by user
GUDVar1Token :
STRUCT
SYNTAX_ID : BYTE ;
area_and_unit : BYTE ;
column : WORD ;
line : WORD ;
block type : BYTE ;
NO. OF LINES : BYTE ;
type : BYTE ;
length : BYTE ;
END_STRUCT;
END_STRUCT;

BEGIN
END_DATA_BLOCK

//Unassigned user DB, as instance for FB 5


DATA_BLOCK DB 111

FB 5
BEGIN
END_DATA_BLOCK

//Unassigned user DB, as instance for FB 3


DATA_BLOCK DB 112

FB 3
BEGIN
END_DATA_BLOCK

//A user-defined channel variable from channel 1 must be read


//with conversion into a variable pointer to allow subsequent
//writing of this variable.

Basic Functions
1032 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Function FC "VariablenCall" : VOID


U I 7.7; //Unassigned machine control panel key
S M 100.0; //Activate req.
U M 100.1; //Done completed message
R M 100.0; //Terminate job
U I 7.6; //Manual error acknowledgment
U M 102.0; //Error pending
R M 100.0; //Terminate job

CALL FB 5, DB 111 (
Req := M 100.0, //Starting edge for reading
Area := B#16#2, //Channel variable
Unit := B#16#1, //Channel 1
Index1 := 0, //No field index
Index2 := 0, //No field index
CnvtToken := TRUE, //Conversion into 10-byte token
VarToken := DB_GUDVAR.GUDVar1Token,
Error := M 102.0,
Done := M 100.1,
State := MW 104
RD := P#DB99.DBX0.0 DINT 1 // free memory area
);

After a successful FB-5 call the writing can be done via the returned address of the FB 5
parameter ("VarToken") with the help of FB3.

CALL FB 3, DB 112 (
Req := M 200.0,
NumVar := 1, //Write 1 GUD variable
Addr1 := DB_GUDVAR.GUDVar1Token,
Error := M 102.0,
Done := M 100.1,
State := MW 104
SD1 := P#DB99.DBX0.0 DINT 1);

Call example 2
Read a GUD variable from channel 1 with the name "GUD_STRING" (type definition of the
variables: STRING with length 30 bytes). The user-defined variable should be converted in a
10-byte variable pointer for subsequent writing with the FB 3.
Call and parameterization of FB 5 with instance DB 111:

// Data block for GUD variable


DATA_BLOCK DB_GUDVAR //Assignment to symbol table

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1033
Basic PLC Program (P3)
Block descriptions

STRUCT
GUDVarS : STRING[32] := 'GUD_STRING'; //Name is defined by user
GUDVarSToken :
STRUCT
SYNTAX_ID : BYTE ;
area_and_unit : BYTE ;
column : WORD ;
line : WORD ;
block type : BYTE ;
NO. OF LINES : BYTE ;
type : BYTE ;
length : BYTE ;
END_STRUCT;

string_of_GUD : STRING[30]; // must at least be so long as


// the definition of 'GUD_STRING'!
new_name : STRING[30] := 'GUD_123';
END_STRUCT;

BEGIN
END_DATA_BLOCK

//Unassigned user DB, as instance for FB 5


DATA_BLOCK DB 111

FB 5
BEGIN
END_DATA_BLOCK

//Unassigned user DB, as instance for FB 3


DATA_BLOCK DB 112

FB 3
BEGIN
END_DATA_BLOCK

//A user-defined channel variable from channel 1 must be read


//with conversion into a variable pointer to allow subsequent
//writing of this variable.

Function FC "VariablenCall" : VOID


U I 7.7; //Unassigned machine control panel key
S M 100.0; //Activate req.
U M 100.1; //Done completed message
R M 100.0; //Terminate job

Basic Functions
1034 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

U I 7.6; //Manual error acknowledgment


U M 102.0; //Error pending
R M 100.0; //Terminate job

CALL FB 5, DB 111 (
Req := M 100.0, //Starting edge for reading
Addr := DB_GUDVAR.GUDVarS,
Area := B#16#2, //Channel variable
Unit := B#16#1, //Channel 1
Index1 := 0, //No field index
Index2 := 0, //No field index
CnvtToken := TRUE, //Conversion into 10-byte token
VarToken := DB_GUDVAR.GUDVar1Token,
Error := M 102.0,
Done := M 100.1,
State := MW 104
RD := DB_GUDVAR.string_of_GUD);

After a successful FB-5 call the writing can be done via the returned address of the FB 5
parameter ("VarToken") with the help of FB3.

CALL FB 3, DB 112 (
Req := M 200.0,
NumVar := 1, //Write 1 GUD variable
Addr1 := DB_GUDVAR.GUDVar1Token,
Error := M 102.0,
Done := M 100.1
State := MW 104
SD1 := DB_GUDVAR.new_name);

13.13.6 FB 7: PI_SERV2 PI-services

Function
A detailed description of the FB 7 is contained in the description of FB 4.
The FB is multi-instance-capable. The call is permitted only in cyclic program OB1.
An assignment for all parameters with Req = 0 is also permitted in OB 100.
The only difference to FB 4 is the number of WVar1 and subsequent parameters. These are
defined in FB 7 from WVar1 to WVar16 (FB 4 in the VAR_INPUT from WVar1 to WVar10).
All the other parameters are identical to FB 4.
This PI server can be used for all PI services that have been implemented with FB 4.
In addition, the PI services listed below can only be executed with FB 7.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1035
Basic PLC Program (P3)
Block descriptions

Declaration of the function

FUNCTION_BLOCK FB 7
Var_INPUT
Req : BOOL ;
PIService : ANY ;
Unit : INT ;
Addr1 : ANY ;
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
WVar1 : WORD ;
WVar2 : WORD ;
WVar3 : WORD ;
WVar4 : WORD ;
WVar5 : WORD ;
WVar6 : WORD ;
WVar7 : WORD ;
WVar8 : WORD ;
WVar9 : WORD ;
WVar10 : WORD ;
WVar11 : WORD ;
WVar12 : WORD ;
WVar13 : WORD ;
WVar14 : WORD ;
WVar15 : WORD ;
WVar16 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL ;
Done : BOOL ;
State : WORD ;
END_VAR

Description of formal parameters


The following table shows all formal parameters of the function PI_SERV2.

Signal Type Type Range of values Remark


Req I BOOL Job request
PIService I ANY [DBName].[VarName] PI service description
Standard is:
"PI".[VarName]
Unit I INT 1... Area number

Basic Functions
1036 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Signal Type Type Range of values Remark


Addr1 to I ANY [DBName].[VarName] Reference to strings specification
Addr4 according to selected PI service
WVar1 to I WORD 1... Integer or word variables.
WVar16 Specification according to
selected PI service,
Error O BOOL Negative acknowledgment of job
or execution of job impossible
Done O BOOL Job successfully executed
State O WORD See error identifiers

Overview: Additional PI-services supplementary to the FB 4 PI-services


The following section provides an overview of the PI services that can be started from the
PLC. The significance and application of the general FB 7 input variables (Unit, Addr ...,
WVar ...) depend on the individual PI service concerned.

PI service Function Available in


TMFPBP Empty location search SINUMERIK 840D

PI service: TMFPBP
Function: Empty location search
(dependent on parameter assignment)
This service searches the magazine(s) named in the relevant parameters for an empty
location, which meets the specified criteria such as tool size and location type. The result of
the empty location search can be fetched from variables magCMCmdPar1 (magazine
number) and magCMCmdPar2 (location number) in block TMC when the service has
functioned correctly. As the PI service stores a result in variables magCMCmdPar1 and
magCMCmdPar2, the service must be protected by the semaphore mechanism (PI service
MMCSEM) with the function number for _N_TMFDPL in cases where several control units or
PLCs are operating on one NC. The search area can be predefined in the following way by
setting parameters "MagazineNumber_From", "LocationNumber_From",
"MagazineNumber_To", "LocationNumber_To":

Magazine Location Magazine Number Location Search area


Number Number _To Number
_From _From _To
WVar1 WVar2 WVar3 WVar4
#M1 #P1 #M1 #P1 Only location #P1 in magazine #M1 is
checked
#M1 #P1 #M2 #P2 Locations starting at magazine #M1, location
#P1 up to magazine #M2, location #P2 are
searched
#M1 -1 #M1 -1 All locations in magazine #M1 - and no
others - are searched

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1037
Basic PLC Program (P3)
Block descriptions

Magazine Location Magazine Number Location Search area


Number Number _To Number
_From _From _To
#M1 -1 -1 -1 All locations starting at magazine #M1 are
searched
#M1 #P1 -1 -1 All locations starting at magazine #M1 and
location #P1 are searched
#M1 #P1 #M1 -1 Locations in magazine #M1 starting at
magazine #M1 and location #P1 in this
magazine are searched
#M1 #P1 #M2 -1 Locations starting at magazine #M1, location
#P1 up to magazine #M2, location #P2 are
searched
#M1 -1 #M2 #P2 Locations starting at magazine #M1 up to
magazine #M2, location #P2 are searched
#M1 -1 #M2 -1 Locations starting at magazine #M1 up to
and including magazine #M2 are searched
-1 -1 -1 -1 All magazine locations are searched

Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See PI service MMCSEM for more
information.

Parameterization
Signal Type Range of values Significance
PIService ANY PI.TMFPBP Empty location search
Unit INT 1 ... 10 TOA
WVar1 INT MagazinNumber_From
Magazine number of magazine, from which
search must begin
WVar2 INT LocationNumber_From:
Location number of location in magazine
MagazineNumber_From, at which search must
begin
WVar3 INT MagazineNumber_To:
Magazine number of magazine, at which
search must end
WVar4 INT LocationNumber_To:
Location number of location in magazine
MagazineNumber_To, at which search must
end
WVar5 INT MagazineNumber_Ref:
WVar6 INT LocationNumber_Ref:
WVar7 INT 0, 1 ... 7 Number of required half locations to left
WVar8 INT 0, 1 ... 7 Number of required half locations to right

Basic Functions
1038 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Parameterization
Signal Type Range of values Significance
WVar9 INT 0, 1 ... 7 Number of required half locations in upward
direction
WVar10 INT 0, 1 ... 7 Number of required half locations in downward
direction
WVar11 INT Number of required location type
WVar12 INT 0 ... 4 Specifies the required search direction
0: Empty location search strategy is set in
$TC_MAMP2
1: Upwards
2: Down
3: Symmetrical

13.13.7 FB 9: MtoN Control unit switchover

Function
This block allows switchover between several control units (HMI operator panel fronts and/or
MCP machine control panels), which are connected to one or more NCU control modules via
a bus system.
References:
Function Manual, Extended Functions; Several Control Panels on Multiple NCUs,
Decentralized Systems (B3)
The Interface between the individual control units and the NCU (PLC) is the M : N interface
in the data block DB 19. The FB 9 works with the signals of these interfaces.
Apart from initialization, sign-of-life monitoring and error routines, the following basic
functions are also performed by the block for control unit switchover:

Tabulated overview of functions:


Basic function Significance
HMI queuing HMI wants to go online with an NCU
HMI coming HMI is connecting to an NCU
HMI going HMI is disconnecting from an NCU
Forced break HMI must break connection with an NCU
Operating focus changeover to Change operating focus from one NCU to the other
server mode
Active/passive operating mode: Operator control and monitoring/monitoring only
MCP switchover As an option, MCP can be switched over with the HMI

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1039
Basic PLC Program (P3)
Block descriptions

Brief description of a few important functions


Active/passive operating mode:
An online HMI can operate in two different modes:

Active mode: Operator can control and monitor


Passive mode: Operator can monitor (HMI header only)
After switchover to an NCU, this initially requests active operating mode in the PLC of the
online NCU. If two control units are linked online simultaneously to an NCU, one of the two is
always in active mode and the other in passive mode. The operator can request active mode
on the passive HMI at the press of a button.

MCP switchover
As an option, an MCP assigned to the HMI can be switched over at the same time. To
achieve this, the MCP address must be entered in the "mstt_adress" parameter of the
NETNAMES.INI configuration file on the HMI and "MCPEnable" must be set to TRUE. The
MCP of the passive HMI is deactivated so that there is only ever one active MCP on an NCU
at one time.

Boot condition
To prevent the previously selected MCP being reactivated when the NCU is restarted, input
parameters MCP1BusAdr = 255 (address of 1st MCP) and "MCP1STOP" =TRUE
(deactivate 1st MCP) must be set when FB1 is called in OB100.

Approvals
When one MCP is switched over to another, any active feed or axis enables will be retained.

Note
Keys actuated at the moment of switchover remain operative until the new MCP is activated
(by the HMI, which is subsequently activated). The override settings for feedrate and spindle
also remain valid. To deactivate actuated keys, the input image of the machine control
signals must be switched to non-actuated signal level on a falling edge of DB10.DBX104.0.
The override settings should remain unchanged. Measures for deactivating keys must be
implemented in the PLC user program (see example "Override Changeover").
The call is permitted only in cyclic program OB1.

Basic Functions
1040 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration of the function

FUNCTION_BLOCK FB 9
VAR_INPUT
Ack : BOOL ; //Acknowledge interrupts
OPMixedMode: BOOL:= FALSE; //Mixed operation with non-M-to-N-enabled
//OP deactivated
ActivEnable: BOOL:= TRUE; //Not supported
MCPEnable : BOOL:= TRUE; //Activate MCP switchover
END_VAR
VAR_OUTPUT
Alarm1 : BOOL ; //Interrupt: Error in HMI bus address, bus type!
Alarm2 : BOOL ; //Interrupt: No confirmation HMI 1 offline!
Alarm3 : BOOL ; //Interrupt: HMI 1 is not going offline!
Alarm4 : BOOL ; //Interrupt: No confirmation HMI 2 offline!
Alarm5 : BOOL ; //Interrupt: HMI 2 is not going offline!
Alarm6 : BOOL ; //Interrupt: Queuing HMI is not going online!
Report : BOOL ; //Message: Sign-of-life monitoring
ErrorMMC : BOOL ; //Error detection HMI
END_VAR

Description of formal parameters


The table below lists all formal parameters of the M:N function.

Formal parameters of M:N function


Signal Type Type Remark
Ack I BOOL Acknowledge interrupts
OPMixedMode I BOOL Mixed operation deactivated for OP without M:N capability
ActivEnable I BOOL Function is not supported. Control panel switchover
Interlocking via MMCx_SHIFT_LOCK in DB 19
MCPEnable I BOOL Activate MCP switchover:
TRUE: MCP is switched over with operator panel.
FALSE: MCP is not switched over with operator panel.
This can be used to permanently link an MCP.
See also MMCx_MSTT_SHIFT_LOCK in DB 19.
Alarm1 O BOOL Interrupt: Error in HMI bus address, bus type!
Alarm2 O BOOL Interrupt: No confirmation HMI 1 offline!
Alarm3 O BOOL Interrupt: HMI 1 is not going offline!
Alarm4 O BOOL Interrupt: No confirmation HMI 2 offline!
Alarm5 O BOOL Interrupt: HMI 2 is not going offline!
Alarm6 O BOOL Interrupt: Queuing HMI is not going online!
Report O BOOL Message: Sign-of-life monitoring HMI
ErrorMMC O BOOL Error detection HMI

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1041
Basic PLC Program (P3)
Block descriptions

Note
The block must be called by the user program. The user must provide an instance DB with
any number for this purpose. The call is multi-instance-capable.

Example of a call for FB 9

CALL FB 9, DB 109 (
Ack := Error_ack, //e.g. MCP RESET
OPMixedMode := FALSE,
ActivEnable := TRUE,
MCPEnable := TRUE); // Enable for MCP switchover

Note
Input parameter “MCPEnable” must be set to TRUE to enable the MCP switchover. The
default value of these parameters is set in this way and need not be specially assigned when
the function is called.

Interrupts, errors
The output parameters "Alarm1" to "Alarm6" and "Report" exist as information in the PLC
and are output in the event of M:N errors visualized on the HMI by the appearance of alarms
410900 - 410906.
If execution of an HMI function has failed (and an appropriate error message cannot be
displayed), status parameter "ErrorMMC" is set to 'logical 1' (e.g. booting error, when no
connection is made).

Call example for FB 1 (Call in OB 100)

CALL "RUN_UP", "gp_par" (


MCPNum := 1,
MCP1In := P#I 0.0,
MCP1Out := P#Q 0.0,
MCP1StatSend := P#Q 8.0,
MCP1StatRec := P#Q 12.0,
MCP1BusAdr := 255, // Address of 1st MCP
MCP1Timeout := S5T#700MS,
MCP1Cycl := S5T#200MS,
MCP1Stop := TRUE, // MCP switched off
NCCyclTimeout := S5T#200MS,
NCRunupTimeout := S5T#50S);

Basic Functions
1042 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Example: Override switchover

// Auxiliary flags used M100.0, M100.1, M100.2, M100.3


//Edge positive of MCP1Ready must check the override
//and measures for activation
// Initiate MCP block
//This example applies to the feedrate override.
//The interface and input bytes must be exchanged for spindle override.
U DB10.DBX 104.0; //MCP1Ready
EN M 100.0; //Edge trigger flag 1
JCN smth1;
S M 100.2; //Set auxiliary flag 1
R M 100.3; //Reset auxiliary flag 2

// Save override
L DB21.DBB 4; //Feed override interface
T EB 28; //Buffer storage (freely input
// or flag byte)

wei1:
U M 100.2; //Switchover takes place
O DB10.DBX 104.0; //MCP1Ready
JCN smth2;
U DB10.DBX 104.0; //MCP1Ready
FP M 100.1; //Edge trigger flag 2
JC smth2;
U M 100.2; //Switchover takes place
R M 100.2; //Reset auxiliary flag 1
JC smth2;
U M 100.3; //Comparison has taken place
SPB MCP; //Call MCP program
// Route the stored override to the interface of the switched MCP
// until the override values match
L EB 28; //Buffer storage open
T DB21.DBB 4; //Route override interface
L EB 3; //Override input byte for feed
<>i; //Match?
JC smth2; //No, jump
S M 100.3; //Yes, set auxiliary flag 2
// When override values match, call the MCP program again
MCP: CALL "MCP_IFM"( //FC 19
BAGNo := B#16#1,
ChanNo := B#16#1,
SpindleIFNo := B#16#0,

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1043
Basic PLC Program (P3)
Block descriptions

FeedHold := M 101.0,
SpindleHold := M 101.1);
wei2: NOP 0;

13.13.8 FB 10: Safety relay (SI relay)

Function
The SPL block "Safety relay" for "Safety Integrated" is the PLC equivalent of the NC function
of the same name. The standard SPL "Safety relay" block is designed to support the
implementation of an emergency stop function with safe programmable logic. However, it
can also be used to implement other similar safety functions, e.g. control of a protective
door. The function contains 3 input parameters (In1, In2, In3). On switchover of one of these
parameters to the value 0, the output Out0 is deactivated without delay and outputs Out1,
Out2 and Out3 deactivated via the parameterized timer values (parameters TimeValue1,
TimeValue2, TimeValue3). The outputs are activated again without delay, if inputs In1 to In3
take the value 1 and a positive edge change is detected at one of the acknowledgement
inputs Ack1, Ack2. To bring the outputs to their basic setting (values = 0) after booting, the
parameter "FirstRun" must be configured as follows. The parameter "FirstRun" must be
switched to the value TRUE via a retentive data (memory bit, bit in data block) on the first
run after control booting. This data can be preset, e.g. in OB 100. The parameter is reset to
FALSE when FB 10 is executed for the first time. Separate data must be used for parameter
"FirstRun" for each call with its own instance.
The corresponding NCK-SPL-component is described in:
References:
Function Manual Safety Integrated

Basic Functions
1044 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Simplified block diagram in CSF


The figure below shows only one acknowledgment input Ack1 and one delayed deactivation
output Out1. The circuit for Ack2 and the other delayed outputs are identical. The parameter
FirstRun is also missing in the function diagram. The mode of operation is described above.

Declaration of the function

FUNCTION_BLOCK FB 10
VAR_INPUT
In1 : BOOL := TRUE; //Input 1
In2 : BOOL := TRUE; //Input 2
In3 : BOOL := TRUE; //Input 3
Ackn1 : : BOOL ; //Ack 1 signal
Ackn2 : :BOOL; //Ack 2 signal
TimeValue1 : TIME := T#0ms ; //TimeValue for output 1
TimeValue2 : TIME := T#0ms ; //TimeValue for output 2
TimeValue3 : TIME := T#0ms ; //TimeValue for output 3
END_VAR
VAR_OUTPUT
Out0 : BOOL ; //Output without delay

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1045
Basic PLC Program (P3)
Block descriptions

Out1 : BOOL ; //Delayed output to false by timer 1


Out2 : BOOL ; //Delayed output to false by timer 2
Out3 : BOOL ; //Delayed output to false by timer 3
END_VAR
VAR_INOUT
FirstRun : BOOL ; //TRUE by user after initial start of SPL
END_VAR

Description of formal parameters


The following table shows all formal parameters of the SI relay function:

Formal parameters of SI relay function


Signal Type Type Remark
In1 I BOOL Input 1
In2 I BOOL Input 2
In3 I BOOL Input 3
Ackn1 I BOOL Acknowledge input 1
Ackn2 I BOOL Acknowledge input 2
TimeValue1 I TIME Time value 1 for OFF delay
TimeValue2 I TIME Time value 2 for OFF delay
TimeValue3 I TIME Time value 3 for OFF delay
Out0 O BOOL Output, instantaneous (no delay)
Out1 O BOOL Output, delayed by TimeValue1
Out2 O BOOL Output, delayed by TimeValue2
Out3 O BOOL Output, delayed by TimeValue3
FirstRun I/O BOOL Activation of initial state

Note
The block must be called cyclically by the user program once following SPL program startup.
The user must provide an instance DB with any number for this purpose. The call is multi-
instance-capable.

Basic Functions
1046 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

13.13.9 FB 11: Brake test

Function
The braking operation check should be used for all axes, which must be prevented from
moving in an uncontrolled manner by a holding brake. This check function is primarily
intended for the so-called "vertical axes".
The machine manufacturer can use his PLC user program to close the brake at a suitable
moment in time (guide value every 8 hours, similar to the SI test stop) and allow the drive to
produce an additional torque/additional force equivalent to the weight of the axis. In error-
free operation, the brake can produce the necessary braking torque/braking force and keep
the axis at a virtual standstill. When an error occurs, the actual position value exits the
parameterizable monitoring window. In this instance, the position controller prevents the axis
from sagging and negatively acknowledges the mechanical brake test.
The necessary parameterization of NC and Drive is described in:
References:
Function Manual Safety Integrated
The brake test must always be started when the axis is at a standstill. For the entire duration
of the brake test, the enable signals of the parameterized axis must be set to enable (e.g. the
controller inhibit, feed enable signals). Furthermore, the signal at the axis/spindle
DB31, ... .DBX28.7 (PLC-controlled axis) is to be set to status 1 by the user program for the
complete duration of the test.
Before activating the signal DB31, ... .DBX28.7 (PLC-controlled axis) the axis is to be
switched as "neutral axis", e.g. DB31, ... .DBX8.0 - 8.3 (assign NC axis to channel) is to be
set to channel 0 as well as DB31, ... .DBX8.4 (activation signal when using this byte) is to be
set.
The return message:
● about the current status can be queried in DB31, ... DBB68.
● the Nc via the signal DB31, ... .DBX63.1 (PLC controls axis) is to be awaited before the
block is started. The direction in which the drive must produce its torque/force is specified
by the PLC in the form of a "traversing motion" (e.g. via FC 18).
The axis must be able to reach the destination of this movement without risk of collision if the
brake is unable to produce the necessary torque/force.

Note
Instructions for FC 18
If FC18 is called for the same axis in the remainder of the user program, the calls must be
mutually interlocked. For example, this can be achieved via a common call of this function
with an interlocked common data interface for the FC 18 parameters. A second option is to
call the FC18 repeatedly, in which case the inactive FC18 will not be processed by the
program. A multiple-use interlock must be provided.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1047
Basic PLC Program (P3)
Block descriptions

The brake test is divided into the following steps:

Brake test sequence


Step Expected feedback Monitoring time value
Start brake test DBX 71.0 = 1 TV_BTactiv
Close brake Bclosed = 1 TV_Bclose
Output traversing command DBX 64.6 Or DBX 64.7 TV_FeedCommand
Issue test travel command DBX 62.5 = 1 TV_FXSreached
Wait for the holding time DBX 62.5 = 1 TV_FXShold
Deselect brake test/ DBX 71.0 = 0 TV_BTactiv
open brake
Output test ok

Declaration of the function

Function_BLOCK FB 11
VAR_INPUT
Start : BOOL ; //Start of brake test
Ackn : BOOL ; //Acknowledge error
Bclosed : BOOL ; //Brake closed input (single channel - PLC)
Axis : INT; //Testing axis no.
TimerNo : TIMER ; //Timer from user
TV_BTactiv : S5TIME ; //TimeValue -> brake test active
TV_Bclose : S5TIM; //TimeValue -> close brake
TV_FeedCommand : S5TIME ; //TimeValue -> force FeedCommand
TV_FXSreached : S5TIME ; //TimeValue -> fixed stop reached
TV_FXShold : S5TIME ; //TimeValue -> test brake
END_VAR
VAR_OUTPUT
CloseBrake : BOOL ; //Signal close brake
MoveAxis : BOOL ; //Do move axis
Done : BOOL ;
Error : BOOL ;
State : BYTE ; //Error byte
END_VAR

Description of formal parameters


The following table lists all of the formal parameters of the brake test function

Formal parameters of brake test function


Signal Type Type Remark
Start I BOOL Starts the brake test
Ack I BOOL Acknowledge fault

Basic Functions
1048 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Formal parameters of brake test function


Signal Type Type Remark
Bclosed I BOOL Checkback input whether Close Brake is activated
(single-channel - PLC)
Axis I INT Axis number of axis to be tested
TimerNo I TIMER Timer from user program
TV_BTactiv I S5TIME Monitoring time value → brake test active, checking
of axis signal DBX 71.0
TV_Bclose I S5TIME Monitoring time value → close brake Check of input
signal Bclosed after output CloseBrake has been
set.
TV_FeedCommand I S5TIME Monitoring time value → Travel command given
Check travel command after MoveAxis has been set
TV_FXSreched I S5TIME Monitoring time value → fixed stop reached
TV_FXShold I S5TIME Monitoring time value → test brake
CloseBrake O BOOL Request, close brake
MoveAxis O BOOL Request, initiate traversing motion
Done O BOOL Test successfully completed
Error O BOOL Error has occurred
State O BYTE Error status

Fault IDs

State Significance
0 No error
1 Start conditions not fulfilled, e.g. the axis is not in closed-loop control/brake closed/axis
inhibited
2 No NC checkback in "Brake test active" signal on selection of brake test
3 No "Brake applied" checkback by input signal Bclosed
4 No travel command output (e.g. axis motion has not been started)
5 Fixed end stop will not be reached → axis RESET was initiated.
6 Traversing inhibit/Approach too slow → fixed stop cannot be reached. TV FXSreached
monitoring timeout
7 Brake is not holding at all (the end position is reached)/approach speed is too high
8 Brake opens during the holding time
9 Error when deselecting the brake test
10 Internal error
11 "PLC-controlled axis" signal not enabled in the user program

Note
The block must be called by the user program. The user must provide an instance DB with
any number for this purpose. The call is multi-instance-capable.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1049
Basic PLC Program (P3)
Block descriptions

Example of a call for FB 11

AN M 111.1; //Request to close brake, Z axis of FB


= A 85.0; //Brake control, Z axis
OPEN Axis3"; //Brake test, Z axis
O I 73.0; //Brake test trigger, Z axis
O M 110.7; //Brake test running
FP M 110.0;
UN M 111.4; //Error has occurred
S M 110.7; //Brake test running
S M 110.6; //Next step
JCN m001
L DBB 68;
AW W#16#F;
T MB 115; //flag channel state
L B#16#10
T DBB 8; //Request neutral axis

m001: U DBX 68.6; //Checkback signal, axis is neutral


U M 110.6;
FP M 110.1;
R M 110.6;
S M 110.5; //Next step
S DBX 28.7; //Request PLC-monitored axis

U DBX 63.1; //Checkback signal, axis monitored by PLC


U M 110.5;
FP M 110.2;
R M 110.5;
S M 111.0; //Start brake test for FB

CALL FB 11, DB 211 (//Brake test block


Start :=M 111.0, //Start brake test
Ackn := I 3.7, //Acknowledge error with RESET key
Bclosed := I 54.0, //Return message close brakes
//controlled
Axis := 3, //Axis number of axis to be tested
//Z axis
TimerNo := T 110, //Timer number
TV_BTactiv := S5T#200MS, //Monitoring time value:
//Brake test active DBX71.0
TV_Bclose := S5T#1S, //Monitoring time value:
//Brake closed
TV_FeedCommand := S5T#1S, //Monitoring time value:
//Traversing command output

Basic Functions
1050 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

TV_FXSreache := S5T#1S, //Monitoring time value:


//Fixed stop reached
TV_FXShold := S5T#2S, //Monitoring time value:
//Brake test time
CloseBrake :=M 111.1, //Request to close brake
MoveAxis :=M 111.2, Initiate //Request traversing motion //
Done :=M 111.3, //Test successfully completed
Error :=M 111.4, //Error has occurred
State := MB 112); //Error status

OPEN "Axis3"; //Brake test, Z axis

U M 111.2; //Moveaxis
FP M 111.5; //FC18 Start
S M 111.7; //Start FC18

O M 111.3; //Test successfully completed


O M 111.4; //Error has occurred
FP M 110.3;
R DBX 28.7; //Request, PLC-monitored axis

UN DBX 63.1; //Checkback signal, axis monitored by PLC


U M 111.0; //Start brake test for FB
U M 110.7; //Brake test running
FP M 110.4;
R M 111.0; //Start brake test for FB
R M 110.7; //Brake test running

//optional begin
JCN m002:
L MB 115; //old channel status
OW W#16#10;
T DBB 8; //Request channel axis
m002: NOP 0;
//optional end

CALL "SpinCtrl" (//Traverse Z axis


Start :=M 111.2, //Start traversing motion
Stop := FALSE,
Funct := B#16#5, //Mode: Axis mode
Mode := B#16#1, //Procedure: Incremental
AxisNo := 3, //Axis number of axis to be traversed
//axis Z-axis
Pos := -5.000000e+000, //Traversing distance: Minus 5 mm
FRate := 1.000000e+003, //Feedrate: 1000 mm/min

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1051
Basic PLC Program (P3)
Block descriptions

InPos :=M 113.0, //Position reached


Error :=M 113.1, //Error has occurred
State := MB 114); //Error status

OPEN "Axis3"; //Brake test, Z axis


U M 113.0; //Position reached
O M 113.1; //Error has occurred
FP M 113.2;
R M 111.7; //Start FC18

13.13.10 FB 29: Signal recorder and data trigger diagnostics

Function
Signal recorder
The diagnostics FB allows various diagnostic routines to be performed on the PLC user
program. A diagnostic routine logs signal states and signal changes. In this diagnostic
routine, function number 1 is assigned to the "Func" parameter. Up to 8 signals of the
parameters "Signal_1" to "Signal_8" are recorded in a ring buffer each time one of the
signals changes. The current information of parameters "Var1" as BYTE value, and "Var2"
and "Var3" as INTEGER values are also stored in the ring buffer.
The number of past OB 1 cycles is also stored in the buffer as additional information. This
information enables the graphical evaluation of signals and values in OB 1 cycle grid. The
first time the diagnostics FB is called in a new PLC cycle, the "NewCycle" parameter must be
set to TRUE. If the diagnostics FB is called several times in the same OB 1 cycle, the
"NewCycle" parameter must be set to FALSE for the second and subsequent calls. This
prevents a new number of OB 1 cycles from being calculated.
The ring buffer, specified by the user, must have an ARRAY structure specified as in the
source code. The array can have any number of elements. A size of 250 elements is
recommended. The "ClearBuf" parameter is used to clear the ring buffer and set the BufAddr
pointer (I/O parameter) to the start. The instance DB related to the FB is a DB from the user
area and is to be transferred to the FB Diagnostics with the parameter "BufDB".
Data trigger
The data trigger function is intended to allow triggering on specific values (or bits) at any
permissible memory cell. The cell to be triggered is "rounded" with a bit mask ("AndMask"
parameter) before the "TestVal" parameter is compared in the diagnostic block.

Basic Functions
1052 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Note
The source code for the function is available in the source container of the basic-program
library under the name "Diagnose.awl". The instance DB and the ring buffer DB are also
defined in this source block. The function call is also described in the function. The DB
numbers and the call must be modified.

Declaration of the function

FUNCTION_BLOCK FB 29
VAR_INPUT
Func : INT ; //Function number: 0 = No function,
//1 = Signal recorder, 2 = Data trigger
Signal_1 : BOOL ; //Start of brake test
Signal_2 : BOOL ;
Signal_3 : BOOL ;
Signal_4 : BOOL ;
Signal_5 : BOOL ;
Signal_6 : BOOL ;
Signal_7 : BOOL ;
Signal_8 : BOOL ;
NewCycle : BOOL ;
Var1 : BYTE ;
Var2 : INT;
Var3 : INT;
BufDB : INT;
ClearBuf : BOOL ;
DataAdr : POINTER; //Area pointer to testing word
TestVal : WORD ; //Value for triggering
AndMask : WORD ; //AND mask to the testing word
END_VAR
VAR_OUTPUT
TestIsTrue : BOOL ;
END_VAR
VAR_IN_OUT
BufAddr : INT;
END_VAR

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1053
Basic PLC Program (P3)
Block descriptions

Structure for ring buffer

TITLE =
//Ring buffer DB for FB 29
VERSION : 1.0

STRUCT
Field: ARRAY [0 .. 249 ] OF STRUCT //can be any size of this struct

Cycle : INT ; //Delta cycle to last storage in buffer


Signal_1 : BOOL ; //Signal names same as FB 29
Signal_2 : BOOL ;
Signal_3 : BOOL ;
Signal_4 : BOOL ;
Signal_5 : BOOL ;
Signal_6 : BOOL ;
Signal_7 : BOOL ;
Signal_8 : BOOL ;
Var1 : BYTE ;
Var2 : WORD ;
Var3 : WORD ;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK

Description of formal parameters


The table below lists all formal parameters of the Diagnostics function:

Formal parameters of diagnostics function


Signal Type Type Value range Remark
Func I INT 0, 1, 2 Function
0: Switch off
1: Signal recorder
2: Data trigger
Parameters for function 1
Signal_1 to I BOOL Bit signals checked for change
Signal_8
NewCycle I BOOL See the "Signal recorder" description above
Var1 I BYTE Additional value
Var2 I INT Additional value
Var3 I INT Additional value
BufDB I INT Ring buffer DB no.

Basic Functions
1054 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Formal parameters of diagnostics function


Signal Type Type Value range Remark
ClearBuf I BOOL Delete ring buffer DB and reset pointer
BufAddr
BufAddr I/O INT Target area for read data
Parameters for function 2
DataAdr I POINTER Pointer to word to be tested
TestVal I WORD Comparison value
AndMask I WORD See description
TestIsTrue O BOOL Result of comparison

Configuration steps
● Select function of diagnostics block.
● Define suitable data for the recording as signal recorder or data triggering.
● Find a suitable point or points in the user program for calling the diagnostics FB.
● Create a data block for the ring buffer, see call example.
● Call the diagnostics FB with parameters in the user program.
In function 1, it is advisable to clear the ring buffer with the "ClearBuf" parameter. When the
recording phase with function 1 is completed, read out the ring buffer DB in STEP7 with the
function "opening the data block in the data view". The content of the ring buffer DB can now
be analyzed.

Call example

FUNCTION FC 99: VOID


TITLE =
VERSION : 0.0

BEGIN
NETWORK
TITLE = NETWORK

CALL FB 29, DB 80 (
Func := 1,
Signal_1 :=M 100.0,
Signal_2 :=M 100.1,
Signal_3 :=M 100.2,
Signal_4 :=M 100.3,
Signal_5 :=M 10.4,
Signal_6 :=M 100.5,
Signal_7 :=M 100.6,
Signal_8 :=M 100.7,

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1055
Basic PLC Program (P3)
Block descriptions

NewCycle := TRUE,
Var1 := MB 100,
BufDB := 81,
ClearBuf :=M 50.0);
END_FUNCTION

13.13.11 FC 2: GP_HP Basic program, cyclic section

Function
The complete processing of the NCK-PLC interface is carried out in cyclic mode. In order to
minimize the execution time of the basic program, only the control/status signals are
transmitted cyclically; transfer of the auxiliary functions and G functions only takes place
when requested by the NCK.

Declaration

FUNCTION FC 2: VOID
// no parameters

Call example
As far as the time is concerned, the basic program must be executed before the user
program. It is, therefore, called first in OB 1.
The following example contains the standard declarations for OB 1 and the calls for the basic
program (FC2), the transfer of the MCP signals (FC19), and the acquisition of error and
operating messages (FC10).

ORGANIZATION_BLOCK OB 1
VAR_TEMP
OB1_EV_CLASS : BYTE ;
OB1_SCAN_1 : BYTE ;
OB1_PRIORITY : BYTE ;
OB1_OB_NUMBR : BYTE ;
OB1_RESERVED_1 : BYTE ;
OB1_RESERVED_2 : BYTE ;
OB1_PREV_CYCLE : INT;
OB1_MIN_CYCLE : INT;
OB1_MAX_CYCLE : INT;
OB1_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FC 2; //Call basic program as first FC

Basic Functions
1056 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

//INSERT USER PROGRAM HERE


CALL FC 19 ( //MCP signals to interface
BAGNo := B#16#1, //Mode group no. 1
ChanNo := B#16#1, //Channel no. 1
SpindleIFNo := B#16#4, //Spindle interface number = 4
FeedHold := m22.0, //Feed stop signal
//modal
SpindleHold := db2.dbx151.0); //Spindle stop modal
//in message DB
CALL FC 10 ( //Error and operational messages
ToUserIF := TRUE, //Signals transferred from DB2 to interface
//to interface
Ack := I6.1); //Acknowledgment of error messages
//via I 6.1
END_ORGANIZATION_BLOCK

13.13.12 FC 3: GP_PRAL Basic program, interrupt-driven section

Function
Block-synchronized transfers from the NCK to the PLC (auxiliary and G functions) are
carried out in the interrupt-driven part of the basic program. Auxiliary functions are
subdivided into normal and high-speed auxiliary functions.
The high-speed functions of an NC block are buffered and the transfer acknowledged to the
NC. These are passed to the application interface at the start of the next OB1 cycle.
High-speed auxiliary functions programmed immediately one after the other, are not lost for
the user program. This is ensured by a mechanism in the basic program.
Normal auxiliary functions are acknowledged to the NC only after one completed cycle
duration. This allows the application to issue a read disable to the NC.
The G Functions are evaluated immediately and passed to the application interface.

NC process interrupts
If the interrupt is triggered by the NC (possible in each IPO cycle), a bit in the local data of
OB 40 ("GP_IRFromNCK") is set by the basic program, when the FB 1 parameter "UserIR":
= TRUE"). This data is not set on other events (process interrupts through I/Os). This
information makes it possible to branch into the associated interrupt routine in the user
program in order to initiate the necessary action.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1057
Basic PLC Program (P3)
Block descriptions

To be able to implement high-speed, job-driven processing of the user program for the
machine, the following NC functions are available in the interrupt processing routine (OB 40
program section) for the PLC user program:
● Selected auxiliary functions
● Tool-change function for tool-management option
● Position reached for positioning axes, indexing axes and spindles with activation via PLC
The functions listed above can or must be evaluated by the user program in OB 40 in order
to initiate reactions on the machine. As an example, the revolver switching mechanism can
be activated when a T command is programmed on a turning machine.
For further details on programming hardware interrupts (time delay, interruptibility, etc.) refer
to the corresponding SIMATIC documentation.

Auxiliary functions
Generally, high-speed or acknowledging auxiliary functions are processed with or without
interrupt control independently of any assignment.
Basic-program parameters in FB 1 can be set to define which auxiliary functions (T, H, DL)
must be processed solely on an interrupt-driven basis by the user program.
Functions which are not assigned via interrupts are only made available by the cyclic basic
program as in earlier versions. The change signals of these functions are available in a PLC
cycle.
Even if the selection for the auxiliary function groups (T, H, DL) is made using interrupt
control, only one interrupt can be processed by the user program for the selected functions.
A bit is set channel-specifically in the local data "GP_AuxFunction" for the user program (if
"GP_AuxFunction[1]" is set, then an auxiliary function is available for the 1st channel).
In the related channel-DB the change signal and the function value are available for the user.
Das Änderungssignal dieser interrupt driven function is reset to zero in the cyclic basic
program section after the execution of at least one full OB1 cycle (max. approx. two OB1
cycles).

Tool change
With the tool-management option, the tool-change command for revolver and the tool
change in the spindle is supported by an interrupt. The local data bit "GP_TM" in OB 40 is
set for this purpose. The PLC user program can thus check the tool management DB (DB 72
or DB 73) for the tool change function and initiate the tool change operation.

Position reached
In the bit structure, "GP_InPosition" of the local data of OB 40 is specific to the machine axis
(each bit corresponds to an axis/spindle, e.g. GP_InPosition[5] corresponds to axis 5).
If a function has been activated via FC 18 (spindle control, positioning axis, indexing axis) for
an axis or spindle, the associated "GP_InPosition" bit can be used to implement
instantaneous evaluation of the "InPos" signal of the FCs listed above. This feature can be
used, for example, to obtain immediate activation of clamps for an indexing axis.

Basic Functions
1058 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration

FUNCTION FC 3 : VOID
// no parameters

Call example
As far as the time is concerned, the basic program must be executed before other interrupt-
driven user programs. It is, therefore, called first in OB 40.
The following example contains the standard declarations for OB 40 and the call for the
basic program.

ORGANIZATION_BLOCK OB 40
VAR_TEMP
OB40_EV_CLASS : BYTE ;
OB40_STRT_INF : BYTE ;
OB40_PRIORITY : BYTE ;
OB40_OB_NUMBR : BYTE ;
OB40_RESERVED_1 : BYTE ;
OB40_MDL_ID : BYTE ;
OB40_MDL_ADDR : INT;
OB40_POINT_ADDR : DWORD;
OB40_DATE_TIME : DATE_AND_TIME;

//Assigned to basic program


GP_IRFromNCK : BOOL ; //Interrupt by NCK for user
GP_TM : BOOL ; //Tool management
GP_InPosition : ARRAY [1..3] OF BOOL; //Axis-oriented for positioning,
//Indexing axes, spindles
GP_AuxFunction : ARRAY [1..10] OF BOOL; //Channel-oriented for auxiliary functions
GP_FMBlock : ARRAY [1..10] OF BOOL; //Currently not used
//Further local user data may be defined from this point onwards
END_VAR
BEGIN
CALL FC 3;
//INSERT USER PROGRAM HERE
END_ORGANIZATION_BLOCK

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1059
Basic PLC Program (P3)
Block descriptions

13.13.13 FC 5: GP_DIAG Basic program, diagnostic alarm, and module failure

Function
Module defects and module failures are detected in this section of the basic program.
The FC5 block parameter can be used to define whether the PLC is to be placed in Stop
mode. The PLC is placed in STOP mode only for incoming events. Exceptions of the
parameter "PLC-Stop" are the Profibus-MCPs parameterized at FB 1 (must be connected to
the DP1 Bus).

Declaration

FUNCTION FC 5: VOID
VAR_INPUT
PlcStop: BOOL:= TRUE;
END_VAR

Call example
As far as timing is concerned, the basic program can be executed after other user programs.
This is advisable since the FC5 circuitry will place the PLC in Stop mode.
This example contains the standard declarations for OB 82 and OB 86 and the call of the
basic program block.

ORGANIZATION_BLOCK OB 82
VAR_TEMP
OB82_EV_CLASS : BYTE ;
OB82_FLT_ID : BYTE ;
OB82_PRIORITY : BYTE ;
OB82_OB_NUMBR : BYTE ;
OB82_RESERVED_1 : BYTE ;
OB82_IO_FLAG : BYTE ;
OB82_MDL_ADDR : INT ;
OB82_MDL_DEFECT : BOOL ;
OB82_INT_FAULT : BOOL ;
OB82_EXT_FAULT : BOOL ;
OB82_PNT_INFO : BOOL ;
OB82_EXT_VOLTAGE : BOOL ;
OB82_FLD_CONNCTR : BOOL ;
OB82_NO_CONFIG : BOOL ;
OB82_CONFIG_ERR : BOOL ;
OB82_MDL_TYPE : BYTE ;
OB82_SUB_NDL_ERR : BOOL ;
OB82_COMM_FAULT : BOOL ;
OB82_MDL_STOP : BOOL ;
OB82_WTCH_DOG_FLT : BOOL ;
OB82_INT_PS_FLT : BOOL ;
OB82_PRIM_BATT_FLT : BOOL ;

Basic Functions
1060 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

OB82_BCKUP_BATT_FLT : BOOL ;
OB82_RESERVED_2 : BOOL ;
OB82_RACK_FLT : BOOL ;
OB82_PROC_FLT : BOOL ;
OB82_EPROM_FLT : BOOL ;
OB82_RAM_FLT : BOOL ;
OB82_ADU_FLT : BOOL ;
OB82_FUSE_FLT : BOOL ;
OB82_HW_INTR_FLT : BOOL ;
OB82_RESERVED_3 : BOOL ;
OB82_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FC 5
(PlcStop := FALSE) ;
END_ORGANIZATION_BLOCK

ORGANIZATION_BLOCK OB 86
VAR_TEMP
OB86_EV_CLASS : BYTE ;
OB86_FLT_ID : BYTE ;
OB86_PRIORITY : BYTE ;
OB86_OB_NUMBR : BYTE ;
OB86_RESERVED_1 : BYTE ;
OB86_RESERVED_2 : BYTE ;
OB86_MDL_ADDR : WORD ;
OB86_RACKS_FLTD : ARRAY [0 .. 31]OF BOOL;
OB86_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FC 5
(PlcStop := TRUE) ;
END_ORGANIZATION_BLOCK

13.13.14 FC 7: TM_REV Transfer block for tool change with revolver

Function
After a revolver has been changed, the user will call this block FC TM_REV. The revolver
number (corresponding to interface number in DB 73) must be specified in parameter
"ChgdRevNo" for this purpose. As this block is called, the associated "Interface active" bit in
data block DB 73, word 0 of FC 7 is reset after parameter "Ready" := TRUE is returned.
Block FC TM_REV may be started (with "Start" parameter = "TRUE") only if an activation
signal for the appropriate interface (DB 73, word 0) for this transfer has been supplied by the
tool management function.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1061
Basic PLC Program (P3)
Block descriptions

When this job is executed correctly, the output parameter "Ready" contains the value TRUE.
The user must then set the"Start" parameter to FALSE or not call the block again.
If the "Ready" parameter is set to FALSE, the error code in the"Error" parameter must be
interpreted.
If the error code = 0, then this job must be repeated in the next PLC cycle (e.g. "Start"
remains set to "TRUE"). This means that the transfer job has not yet been completed (see
example FC 7 call and timing diagram).
The "Start" parameter does not need a signal edge for a subsequent job.

WARNING
A cancellation of a transfer (e.g. through an external signal RESET) is not permitted. The
"Start" parameter must always retain the 1 signal until the "Ready" and/or "Error"
parameters <> 0.

An error code <> 0 indicates incorrect parameterization.

Note
For further details on tool management (also with regard to PLC) refer to the Function
Manual Tool Management. In addition, PI services for tool management via FB 4, FC 8 and
FC 22 are available.

Manual revolver switching


If a manual action is used to rotate the revolver, this information must be forwarded to the
tool management. The asynchronous transfer function of FC 8 must be used to transfer the
modified positions of the revolver. This must only occur once on the first manual rotation in
the sequence. In this case, the following parameterization of the asynchronous transfer is
needed via FC 8:

TaskIdent = 4
TaskIdentNo = channel
NewToolMag = Magazine number of the revolver
NewToolLoc = Original location of the tool
OldToolMag = Magazine no. buffer storage (spindle) = 9998
OldToolLoc = Buffer storage number of the spindle
Status = 1

This action also causes the same T command to be resent to the tool-management interface
if the previous T is programmed again.

Basic Functions
1062 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration of the function


STL representation

FUNCTION FC 7 : VOID
//NAME :TM_REV
VAR_INPUT
Start: BOOL ;
ChgdRevNo: BYTE ;
END_VAR
VAR_OUTPUT
Ready: BOOL ;
Error : INT;
END_VAR
BEGIN
END_FUNCTION

Description of formal parameters


The table below lists all formal parameters of the TM_REV function.

Signal Type Type Value range Comment


Start I BOOL 1 = Start of transfer
ChgdRevNo I BYTE 1... Number of revolver interface
Ready O BOOL 1 = Transfer complete
Error O INT 0 ... 3 Error checkback
0: No error has occurred
1: No revolver present
2: Illegal revolver number in parameter
"ChgdRevNo"
3: Illegal job ("interface active" signal for
selected revolver = "FALSE")

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1063
Basic PLC Program (P3)
Block descriptions

Pulse diagram

     


6WDUW
 

5HDG\

(UURU !

(1) Activation of function by means of a positive edge


(2) Positive acknowledgment: Tool management has been transferred
(3) Reset function activation after receipt of acknowledgment
(4) Signal change using FC
(5) This signal chart is not permissible. The job must generally be terminated since the new tool
positions must be conveyed to the tool management in the NCK.
(6) Negative acknowledgment: Error has occurred, error code in the output parameter Error

Call example

CALL FC 7 ( //Tool-management transfer block


//for Revolver
Start := m 20.5, //Start := "1 " => transfer trigger
ChgdRevNo := DB61.DBB 1,
Ready := m 20.6,
Error := DB61.DBW 12);
u m 20.6; //Poll ready
r m 20.5; //Reset start
spb m001; //Jumps, if everything OK
l db61.dbw 12; //Error information
ow w#16#0; //Evaluate error
JC error; //Jumps to troubleshooting, if <> 0
m001: // Start of another program
error:
r m 20.5; //Reset start, if an error has occurred

Basic Functions
1064 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

13.13.15 FC 8: TM_TRANS transfer block for tool management

Function
The user calls this block FC TM-TRANS when the position of the tool or the status of the
transfer operation changes. The parameter "TaskIdent" specifies the transfer job for the
block FC 8 at the tool management interface:
● For loading/unloading positions,
● For spindle change positions,
● For revolver change positions as transfer identifier
● Asynchronous transfer
● Asynchronous transfer with location reservation
The interface number is indicated in parameter "TaskIdentNo".
Example for loading point 5:
Parameter "TaskIdent":= 1 and "TaskIdentNo":= 5.
Furthermore, the current tool positions and status data (list of "Status" parameter in the
following text) are also transmitted for this transfer function.

Note
FC8 informs the NCK of the current positions of the old tool.
The NCK knows where the old and the new tool have been located until the position change.

In the case of a transfer without a so-called "old tool" (e.g. on loading), the value 0 is
assigned to parameters "OldToolMag", "OldToolLoc".
Block FC TM_TRANS may be started only with "Start" parameter = "TRUE" if an activation
signal for the appropriate interface (DB 71, DB 72, DB 73 in word 0) for this transfer has
been supplied by the tool management function.
When this job is executed correctly, the output parameter "Ready" contains the value TRUE.
The user must then set the"Start" parameter to FALSE or not call the block again.
If the "Ready" parameter = FALSE, the error code in the "Error" parameter must be
interpreted (see Call example FC 8 and timing diagram).
If the error code = 0, then this job must be repeated in the next PLC cycle (e.g. "Start"
remains set to "TRUE"). This means that the transfer operation has not yet been completed.
If the user assigns a value of less than 100 to the Parameter "Status", then the associated
interface in data block DB 71 or DB 72 or DB 73, word 0 is deactivated (process completed).
The appropriate bit for the interface is set to 0 by FC 8.
The "Start" parameter does not need a signal edge for a subsequent job. This means that
new parameters can be assigned with "Start = TRUE" immediately when "Ready = TRUE" is
received.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1065
Basic PLC Program (P3)
Block descriptions

Asynchronous transfer
To ensure that changes in the position of a tool are automatically signaled from PLC to tool
management (e.g. power failure during an active command or independent changes in the
position by the PLC), block FC 8 TM_TRANS with "TaskIdent": = 4 or 5 is called. This call
does not require interface activation by tool management.
If parameter "TaskIdent" = 5 the tool management reserves the location in addition to
changing the position. The location is only reserved if the tool has been transported from a
real magazine to a buffer storage.
A relevant NC channel must be parameterized in the "TaskIdentNo" parameter.
The previous position of the tool is specified in parameters "OldToolMag", "OldToolLoc"; the
current position of the tool is specified in parameters "NewToolMag", "NewToolLoc". Status =
1 must be specified.
With status 5, the specified tool remains at location "OldToolMag", "OldToolLoc". This
location must be a buffer (e.g. spindle). The real magazine and location must be specified in
the parameters "NewToolMag", "NewToolLoc"; the location is at the position of the buffer.
This procedure must always be used if the tool management is to be informed of the position
of a specific magazine location. This procedure is used for alignment in search strategies.

Note
A cancellation of a transfer (e.g. through an external signal RESET) is not permitted. The
"Start" parameter must always retain the 1 signal until the "Ready" and/or "Error" parameters
<> 0.

An error code <> 0 indicates incorrect parameterization.

Note
For further details on tool management (also with regard to PLC) refer to the Function
Manual Tool Management. In addition, PI services for tool management via FB 4, FC 7 and
FC 22 are available.

Basic Functions
1066 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration of the function


STL Representation

FUNCTION FC 8 : VOID
//NAME :TM_TRANS
VAR_INPUT
Start: BOOL ;
TaskIdent: BYTE ;
TaskIdentNo: BYTE ;
NewToolMag: INT;
NewToolLoc: INT;
OldToolMag: INT;
OldToolLoc: INT;
Status: INT;
END_VAR
VAR_OUTPUT
Ready BOOL ;
Error : INT;
END_VAR
BEGIN
END_FUNCTION

Description of formal parameters


The table below lists all formal parameters of the TM_TRANS function:

Signal Type Type Value range Comment


Start I BOOL 1 = Start of transfer
TaskIdent I BYTE 1 ... 5 Interface or tank identifier
1: Loading/unloading location
2: Spindle change position
3: Revolver change position
4: Asynchronous transfer
5: Asynchronous transfer with location
reservation
TaskIdentNo I BYTE 1 ... Number of associated interface or channel
number. The upper nibble can specify the
interface number for asynchronous transfer
(e.g. B#16#12, 1st interface, 2nd channel).
NewToolMag I INT 1, 0 ... Current magazine number of tool to be replaced
-1: Tool remains at its location
NewToolLoc = any value
Only permissible if TaskIdent = 2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1067
Basic PLC Program (P3)
Block descriptions

Signal Type Type Value range Comment


NewToolLoc I INT 0 ... max. Current location number of new tool
location number
OldToolMag I INT -1, 0 ... Current magazine number of tool to be replaced
-1: Tool remains at its location
OldToolLoc = any value.
Only permissible if TaskIdent = 2
OldToolLoc I INT Max. location Current location number of tool to be replaced
number
Status I INT 1 ... 7, Status information about transfer operation
103 ... 105
Ready O BOOL 1= transfer completed
Error O INT 0 ... 65535 Error checkback
0: No error has occurred
1: Unknown "TaskIdent"
2: Unknown "TaskIdentNo"
3: Illegal task
("signal "Interface (SS) active" of selected
revolver = "FALSE")
Other values: The number corresponds to
the error message of the tool
management function in the
NCK caused by this transfer.

Timing diagram

     


6WDUW
 

5HDG\

(UURU !

(1) Activation of function by means of a positive edge


(2) Positive acknowledgment: Tool management has been transferred
(3) Reset function activation after receipt of acknowledgment
(4) Signal change using FC
(5) This signal chart is not permissible. The job must generally be terminated since the new tool
positions must be conveyed to the tool management in the NCK.
(6) Negative acknowledgment: Error occured, error code in the output parameter Error

Basic Functions
1068 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Status list
Status = 1:
The WZV operation is completed (loading/unloading/reloading, prepare change, change).
The parameters "NewToolMag", "NewToolLoc", "OldToolMag", "OldToolLoc" of the FC 8
block are to be parameterized to the actual positions of the tools involved. Except in the case
of preparing change these are normally the specified target position of the tools of the
associated WZV interface, see also "Explanations of the formal parameters".
1. In the case of loading/unloading/reloading, the tool has arrived at the required target
address. If the bit in the interface in DB 71.DBX (n+0).3 "position at loading point" is
enabled, status 1 cannot be used for the function termination. Status 5 must be used for
correct termination.
2. In the case of "Prepare change", the new tool is now available. The tool may, for
example, be positioned in a buffer (gripper). In some cases, the target (magazine,
location) of the old tool has been moved to the tool-change position after placement of
the new tool in a buffer. However, the old tool still remains in the spindle. The
preparations for a tool change are thus complete. After this acknowledgment, the
"Change" command can be received. The positions in parameters "NewToolMag",
"NewToolLoc", "OldToolMag" and "OldToolLoc" correspond to the current tool positions.
3. In the case of "Change" (spindle or revolver), the tools addressed in the interface have
now reached the required target addresses.
The tool-change operation is thus completed.
Status = 2: The "new" tool cannot be made available.
This status is only admissible in conjunction with the "Prepare Change" command. When this
status is applied, the PLC must be prevented from making a change with the proposed tool.
The proposed (new) tool is disabled by the tool management function in the NCK. A new
command is then output by the tool management with a duplo tool. The positions in
parameters "NewToolMag", "NewToolLoc", "OldToolMag", and "OldToolLoc" correspond to
the original tool positions.
Status = 3: An error occurred.
The tool positions must not have been changed. Any changes to the magazine positions
which have taken place in the meantime must be notified beforehand, for example, with
status = 105 via FC 8 transfer block Only then will the tool positions be taken into account by
the tool management function.
Status = 4: It would be better to position the "old" tool in the magazine position specified in
parameters "OldToolMag" and "OldToolLoc".
This status is permissible only in conjunction with preparation for tool change (change into
spindle). After this status has been transferred to the tool management in the NCK, the tool
management tries to consider the specified magazine position in the next command. But this
is done only when this position is free. Parameters "NewToolMag" and "NewToolLoc" are not
taken into account.
Status = 5: The operation is complete.
The "new" tool is in the position specified in parameters "NewToolMag", "NewToolLoc".
In this case, the specified tool is not really in this position, but is still in the same magazine
location. However, this magazine location has been moved to the position set in the
parameters (e.g. tool change position). This status may be used only for revolvers, chain-
type magazines and disk magazines. Status 5 enables the tool management function to
adjust the current position of a magazine and to improve the search strategy for subsequent

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1069
Basic PLC Program (P3)
Block descriptions

commands. This status is permissible only in conjunction with loading, unloading, and
reloading operations and with preparations for a tool change.
The "OldToolMag" and "OldToolLoc" parameters must be parameterized with the data of a
buffer.
● Loading, reloading:
On loading or reloading, a location for the tool is already reserved in the NCK.
The machine operator must then insert the tool at the target location. Note: The location
reservation is canceled when the control system is switched on again.
● Tool-change preparation:
Tool motions still to be executed are not carried out until after the tool has been changed.
● Positioning to load point:
If the bit in the interface in DB 71.DBX (n+0).3 "position at loading point" is enabled,
status 1 cannot be used for the function termination.
Status = 6: The WZV job has been completed.
This status has the same function as status 1, but, in addition, a reservation of the source
location is carried out. This status is only permitted when reloading. The command is ended
and the source location of the tool is reserved if the target location is in a buffer magazine.
Status = 7: Initiate repetition of the command "Prepare Tool".
This status is only admissible in conjunction with the "Change tool" command. This status is
intended for use when the "new" tool has changed its position (e.g. via an asynchronous
command of the "new" tool). After "Ready = 1" has been provided by FC 8, the "Prepare
Change" command is repeated automatically with the same tool. For the automatic
repetition, a new tool search is carried out. The positions in parameters "NewToolMag",
"NewToolLoc", "OldToolMag", and "OldToolLoc" correspond to the original tool positions.
Status = 103: The "new" tool can be inserted.
This status is permitted only in the tool change preparation, when the PLC may reject the
new tool (e.g. in case of MD20310 $MC_TOOL_MANAGEMENT_MASK, bit 4=1 for the
possibility, request changed parameter from PLC once again). The tool positions have
remained unchanged. This status is thus necessary, when the processing is to be continued
in the NCK without an unnecessary stop.
References:
Function Manual Tool Management
Status = 104: The "new" tool is in the position specified in parameters "NewToolMag",
"NewToolLoc".
This status is only permissible if the tool is still in the magazine in the same location. The
"old" tool is in the position (buffer) specified in parameters "OldToolMag", "OldToolLoc". In
this case, however, the new tool is not really in this position, but is still in the same magazine
location. However, this magazine location has been moved to the position set in the
parameters (e.g. tool change position). This status may be used only in conjunction with
revolvers, chain-type magazines and disk magazines for the "Tool change preparation"
phase. Status enables the tool management to adjust the current position of a magazine and
to improve the search strategy for subsequent commands.

Basic Functions
1070 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Status = 105: The specified buffer has been reached by all tools involved
(standard case if the operation has not yet been completed).
The tools are in the specified tool positions (parameters "NewToolMag", "NewToolLoc",
"OldToolMag", "OldToolLoc").

Status definition
A general rule for the acknowledgment status is that the state information 1 to 7 leads to the
termination of the command. If FC 8 receives one of the statuses, the "Interface active bit" of
the interface specified in FC 8 is reset to "0" (see also interface lists DB 71 to DB 73), thus
completing the operation. The response if different in the case of status information 103 to
105. When the FC 8 receives one of these items of status information, the “Interface active
bit” of this interface remains at “1”. Further processing is required by the user program in the
PLC (e.g. continuation of magazine positioning). This item of status information is generally
used to transfer changes in position of one or both tools while the operation is still in
progress.

Call example

CALL FC 8 ( //Tool-management transfer block


Start := m 20.5, //Start := "1 " => transfer trigger
TaskIdent := DB61.DBB 0,
TaskIdentNo := DB61.DBB 1,
NewToolMag := DB61.DBW 2, //Current position of new tool
NewToolLoc := DB61.DBW 4,
OldToolMag := DB61.DBW 6, //Current position of old tool
OldToolLoc := DB61.DBW 8,
Status := DB61.DBW 10, //Status
Ready := m 20.6,
Error := DB61.DBW 12);
u m 20.6; //Poll ready
r m 20.5; //Reset start
spb m001; //Jumps, if everything OK
l DB61.dbw 12; //Error information
ow w#16#0; //Evaluate error
JC error; //Jumps to troubleshooting

m001: //Normal branch

error: //Troubleshooting
r m 20.5: //Reset start

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1071
Basic PLC Program (P3)
Block descriptions

13.13.16 FC 9: ASUB startup of asynchronous subprograms

Function
The FC ASUB can be used to trigger any functions in the NC. Before an ASUB can be
started from the PLC, it must have been selected and parameterized by an NC program or
by FB 4 (PI service ASUB). The channel and the interrupt numbers for the parameters in FC
9 must match here.
Once prepared in this way, it can be started at any time from the PLC. The NC program
running on the channel in question is interrupted by the asynchronous subprogram. Only one
ASUB can be started in the same channel at a time. If the start parameter is set to logical 1
for two FC 9s within one PLC cycle, the ASUBs are started in the sequence in which they
are called.
The start parameter must be set to logic 0 by the user once the ASUB has been terminated
(Done) or if an error has occurred.
For the purpose of job processing, every FC ASUB requires its own WORD parameter "Ref"
from the global user memory area. This parameter is for internal use only and must not be
changed by the user. The parameter "Ref" is initialized with the value 0 in the first OB 1 cycle
and, for this reason, every FC 9 must be called absolutely. Alternatively, the user can
initialize parameter "Ref" with a value of 0 during startup. This option makes conditional calls
possible. When a conditional call is activated by parameter "Start" = 1, it must remain active
until parameter "Done" has made the transition from 1 to 0.

Note
The FB 4 call must be terminated before the FC 9 can be started. FC 9 cannot be started if
"Emergency off" is set. Neither can FC 9 be started if the channel reset is active.

Declaration of the function

FUNCTION FC 9 : VOID
//NAME :ASUP
VAR_INPUT
Start: BOOL ;
ChanNo: INT;
IntNo: INT;
END_VAR
VAR_OUTPUT
Active: BOOL ;
Done : BOOL ;
Error : BOOL ;
StartErr: BOOL ;
END_VAR
VAR_IN_OUT
Ref: WORD ;
END_VAR

Basic Functions
1072 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Description of formal parameters


The table below lists all formal parameters of the ASUB function.

Signal Type Type Value range Remark


Start I BOOL
ChanNo I INT 1 ... 10 No. of the NC channel
IntNo I INT 1 ... 8 Interrupt No.
Active O BOOL 1 = Active
Done O BOOL 1 = ASUB completed
Error O BOOL 1 = Interrupt switched off
StartErr O BOOL 1 = Interrupt number not assigned or
deleted
Ref I/O WORD Global variable 1 word per FC 9 (for internal use)
(MW, DBW,..)

Timing diagram

     

6WDUW


$FWLY
   
'RQH

(UURU

(1) Activation of function


(2) ASUP active
(3) Positive acknowledgment: ASUB ended
(4) Reset function activation after receipt of acknowledgment
(5) Signal change using FC
(6) Not permitted If function activation is reset prior to receipt of acknowledgment, the output
signals are not updated without the operational sequence of the activated function being
affected.
(7) Negative acknowledgment: Error has occurred

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1073
Basic PLC Program (P3)
Block descriptions

Call example

CALL FC 9 ( //Start an asynchronous subprogram


//in channel 1 interrupt number 1
Start := I 45.7,
ChanNo := 1,
IntNo := 1,
Active := M 204.0,
Done := M204.1,
Error := M 204.4,
StartErr := M 204.5,
Ref := MW 200);

13.13.17 FC 10: AL_MSG error and operating messages

Function
FC AL_MSG evaluates the signals entered in DB 2 and displays them as incoming and
outgoing error and operational messages on the HMI.
The incoming signals (positive edge) are displayed immediately in the case of both error and
operational messages.
Outgoing signals (negative edge) are only canceled immediately in the case of operating
messages. Error messages remain stored on the HMI - even if the signals no longer exist -
until the "acknowledge" parameter is issued, WCS.e. until the user acknowledges the
messages.
The "ToUserIF" parameter can be used to transfer the group signals for the feed, read and
NC start disabling signals and feed stop signal to the existing axis, spindle and channel
interfaces. The group signals are transferred to the user interface directly from the status
information in DB 2 irrespective of an interrupt acknowledgment.
1. If parameter "ToUserIF": is set to FALSE, signals are not transferred to the user interface.
In this case, the user must take measures in his PLC program to ensure that these
signals are influenced in the interface.
2. If parameter "ToUserIF": is set to TRUE, all signals listed above are sent to the user
interface as a group signal in each case. The user PLC program can, therefore, influence
these signals only via DB 2 in connection with a message or interrupt output. The
appropriate information is overwritten in the user interface.
As an alternative to the procedure described under paragraph 2, the user can influence the
disable and stop signals without a message output by applying a disable or stop signal state
to the interface signals after FC AL_MSG has been called.

Basic Functions
1074 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

The following program illustrates this method:

CALL FC 10 (
ToUserIF := TRUE,
Ack := I 6.1);

u m 50.0; //Feed disable for channel 1


to DB 21;
s dbx 6.0; //Setting the blocking condition,
//Resetting is done via FC AL_MSG,
//if M 50.0 outputs the signal "0".

FB 1-Parameter "ExtendAlMsg"
With the activation of the parameter a new structuring of the DB 2 becomes effective (see
"Interface PLC/HMI (Page 898)"). Upon activation the bit fields are available to the user for
the disable and halt signals, which do not generate any alarms, messages. As a result, the
user need not implement the aforesaid measures. The desired functionality is given
automatically by a simple setting, resetting of signals in the new DB 2 areas.
The error and the operating messages are stored by the user in data block DB 2 (see
description of DB 2 in the lists of interface signals).

Note
In DB 2, a "1" signal must be present for several OB1 cycles to ensure that a message can
also be displayed on the HMI. There is an upper limit for the number of interrupts and
messages that can be pending at the same time. This upper limit is dependent on the PLC
CPU. On PLC 317-2DP, the upper limit for messages pending simultaneously is 60.
See also Parameter Manual (Lists, Manual 2), chapter on PLC Alarms/Messages

Declaration of the function


STL Representation

FUNCTION FC 10 : VOID
// NAME: AL_MSG
VAR_INPUT
ToUserIF : BOOL ;
Ack : BOOL ;
END_VAR
END_FUNCTION

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1075
Basic PLC Program (P3)
Block descriptions

Description of formal parameters


The table below lists all formal parameters of the AL-MSG function.

Signal Type Type Range of values Remark


ToUserIF I BOOL 1 = Transfer the signals to user interface
every cycle
Ack I BOOL 1 = Acknowledge error messages.

Call example

CALL FC 10 ( //Error and operational messages


ToUserIF := TRUE, //Signals from DB 2 are transferred to
//interface
Ack := I6.1); //Acknowledgement of the error message done via
//Input E6.1.

13.13.18 FC 12: AUXFU call interface for user with auxiliary functions

Function
FC AUXFU is generally called on an event-driven basis in the basic program if the channel
transferred in the input parameter contains new auxiliary functions. The PLC user can extend
FC AUXFU with program instructions for processing his auxiliary function to avoid cyclic
polling of the channel DBs. This mechanism permits auxiliary functions to be processed on a
job-driven basis. FC AUXFU is supplied as a compiled empty block in the basic program. In
this case, the basic program supplies parameter "Chan" with the channel number. The PLC
user knows which channel has new auxiliary functions available. The new auxiliary functions
can be determined by the auxiliary-function change signals in the channel concerned.

Declaration of the function

FUNCTION FC 12: VOID //Event control of auxiliary functions


VAR_INPUT
Chan: BYTE ;
END_VAR
BEGIN
BE;
END_FUNCTION

Basic Functions
1076 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Explanation of formal parameters


The table below lists all formal parameters of the AUXFU function:

Signal Type Type Value range Remark


Chan I BYTE 0 ... 9 No. of NC channel -1

Example

FUNCTION FC 12: VOID //Event control of auxiliary functions


VAR_INPUT
Chan: BYTE ; //Parameter is supplied by basic program
END_VAR
VAR_TEMP
ChanDB: INT;
END_VAR

BEGIN
L Chan; //Channel index no., (0,1,2,..)
+ 21; //Channel DB offset
T ChanDB; //Save channel DB no.
TO DB[ChanDB]; //Channel DB is opened indirectly
// Auxiliary-function change signals are now scanned, etc.
BE;
END_FUNCTION

13.13.19 FC 13: BHGDisp Display control for handheld unit

Function
This block carries out the display control for the handheld unit (HHU or HT2).
The information to be output on the display is stored as 32 characters in string data ChrArray
(these are 64 characters when using an HT2). A fixed text assignment of 32 or 64 characters
is, therefore, required for this string when the data block is created.
16 characters are sent to BHG/HT2 for each job, which lasts for several OB 1-cycle.
The assignment of the characters in ChrArray to each line is unique. For line 1 the
characters 1 to 16 and for the line 2 the characters 17 to 32 of the string data ChrArray are
transferred. In addition, for HT2 the line 3 with the characters 33 to 48 and line 4 made of
characters 49 to 64 are shown.
The block checks, whether the minimum length of the ChrArray is available for operating the
BHG or the HT2. If less characters are present in the string data than are to be displayed,
then the line is filled with blanks.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1077
Basic PLC Program (P3)
Block descriptions

By setting parameter Row to 0, it is possible to suppress the display (e.g. if several variables
in one or several PLC cycles need to be entered in the string without any display output). If
several lines are to be updated "simultaneously" (transfer of the characters to the lines lasts
for several OB 1 cycles) (Parameter Row > 1), then the lines are updated one by one each
with 16 characters per line.
Variable portions within the string can be inserted by means of the numerical converter
functionality (optional). For the numeric converter the parameter "Convert" must be set to
TRUE. The variable to be displayed is referenced via the pointer Addr. Parameter
"DataType" contains the format description of this parameter (see parameter table). The
number of bytes of the variable is linked to the format description. The address justified to
the right within the string is specified by parameter "StringAddr". The number of written
characters is shown in the parameter table.

Signals
Byte 1 is supplied by the output signals of the HHU and the character specifications are
supplied by the block. These may not be written by the PLC user program.

Additional parameters
HHU
The pointer parameters for the input and output data of the handheld unit must be
parameterized in the start OB 100 in FB 1, DB 7. Parameter "BHGIn" corresponds to the
input data of the PLC from the handheld unit (data received by PLC). Parameter "BHGOut"
corresponds to the output data of the PLC to the handheld unit (data transmitted by PLC).
These two pointers must be set to the starting point of the relevant data area (which is also
parameterized in SDB 210 with an MPI link).
For operating a BHG a "2" is to be entered at FB 1 parameter BHG.
HT2
For using a HT2 a "5" is to be entered at FB 1 parameter BHG. The pointer parameter of the
input and output data are also to be supplied, as described above.

Basic Functions
1078 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

In the parameters BHGRecGDNo and BHGRecGBZNo the value is to be entered, which is


configured at the S2 of the DIP-Fix-switch (rotary coding switch) of the connection module of
the HT2.

Note
Numerical conversion
If the numerical converter is used to display information, then it is better to avoid performing
a conversion in every PLC cycle for the sake of reducing the PLC cycle time.
The conversion routine can be used independently of the display control. This is to be
queried in parameter row "0", although the convert parameter should be set. Consequently,
only the string is processed, and the converter routine is executed.
High display resolution
If, for example, the actual axis value is to be displayed with a higher resolution, the following
should be noted:
Variables will continue to be read with FB 2 or FB 5. REAL 2 is used instead of ANY pointer
BYTE 8 as the criterion for output as a 64-bit floating point number (e.g.
When specifying the 64-bit floating point number on the HHU/HT2, an output format of up to
14 places, split freely between places before and after the decimal point, can be selected
instead of fixed formats.

Declaration of the function


STL representation

DATA_BLOCK "strdat" // DB-Number defined in the symbol file

STRUCT //32 characters are defined


disp: STRING [32]:= 'character_line1 character_line2';
END_STRUCT;
BEGIN
END_DATA_BLOCK

FUNCTION FC 13 : VOID
VAR INPUT
Row : BYTE ; //Display line (see table)
ChrArray : STRING ; //Transfer at least string[32/64]
Convert : BOOL ; //Activate numerical conversion
Addr: POINTER; //Points to the variable being converted
DataType : BYTE ; //Data type of the variables
StringAddr : INT ; //right-justified string address (1...32/64)
Digits : BYTE ; //Number of decimal places (1 to 3)
END VAR
VAR OUTPUT
Error : BOOL ; //Conversion or string error
END VAR

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1079
Basic PLC Program (P3)
Block descriptions

Description of formal parameters


The table below lists all formal parameters of the BHGDisp function:

Signal Type Type Value range Remark


Row I BYTE 0 ... B#16#F Display-line
"binary" evaluation:
0: no display output
1: Line 1
2: Line 2
3: Line 1 and line 2 to be
changed
4: Line 3
5: Line 1 and line 3 to be
changed
8: Line 4
B#16#F automatic change of
all 4 lines
ChrArray I STRING >= string[32] This string contains the
[DBName].[VarName] entire display content
For HT2 the string with 64
characters must be created.
Convert I BOOL Activation of numerical
conversion
Addr I Pointer Points to the variable
to be converted
DataType I BYTE 1 ... 8, B#16#13 Data type of the tag
1: BOOL, 1 character
2: BYTE, 3 characters
3: CHAR, 1 character
4: WORD, 5 characters
5: INT, 6 characters
6: DWORD, 7 characters
7: DINT, 8 characters
8: REAL, 9 characters
(7 digits plus a sign and a
decimal point; for places
after the decimal point,
refer to the Digits
Parameter)
B#16#13: String, up to 32/64
characters, Addr
must be a pointer to
a STRING.

Basic Functions
1080 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Signal Type Type Value range Remark


B#16#30 REAL64,
(12 characters: 10
digits plus a sign
and a decimal point;
for places after the
decimal point, refer
to the Digits
Parameter)
StringAddr I INT 1 ... 32/64 Right-justified address within
variable ChrArray
Digits I BYTE with a REAL data type Number of places after the
1 ... 4 decimal point:

with a REAL data type


1 ... 9
Error O BOOL Error:
• created chr/array too small,
• conversion error,
• numerical overflow,
• StringAddr faulty

Ranges of values

Ranges of values of data types


Data type Representable numerical range
BOOL 0, 1
BYTE 0 ... 255
WORD 0 ... 65535
INT - 32768 to + 32767
DWORD 0 ... 9999999
DINT - 9999999 to + 9999999
REAL (Digits := 1) - 999999.9 to + 999999.9
REAL (Digits := 2) - 99999.99 to + 99999.99
REAL (Digits := 3) - 9999.999 to + 9999.999
REAL (Digits := 4) - 999.9999 to + 999.9999
... ...
REAL (Digits := 9) - 0.9999999 to + 0.9999999

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1081
Basic PLC Program (P3)
Block descriptions

Call example
//DB with the name strdat is declared in symbol table, data element disp is declared as
String[32] (in HT2:
//String[64]) and completely assigned with characters

CALL FC 13 (
Row := MB 26,
ChrArray := "strdat".disp,
Convert := M 90.1,
Addr := P#M 20.0, //Number to be converted
DataType := MB 28, //Data type of the variables
StringAddr := MW 30,
Digits := B#16#3, //3 decimal places
Error := M 90.2);

13.13.20 FC 17: YDelta star/delta changeover

Function
The block for star/delta changeover controls the timing of the defined switching logic such
that the changeover can be performed in either direction even when the spindle is running.
This block may be used only for digital main spindle drives and must be called separately for
each spindle.
The changeover operation is implemented via 2 separate contactors in a sequence involving
4 steps:

Step 1: Deleting the interface signal DB31, ... .DBX21.5 (motor selection done) in the related
axis-DB and registering the changeover process via A with DB31, ... .DBX21.3 (motor
selection).
Step 2: As soon as the checkback message NST DB31, ... DBX93.7 (Pulse enabled) and the
acknowledgment of the announced motor selection from the drive have appeared, the
currently energized contactor drops out.
Step 3: The other contactor is energized after the time period set by the user in parameter
"TimeVal" has elapsed.
Step 4: After a further delay, the changeover is signaled to the drive with NST DB31, ...
.DBX21.5 (motor selection done):

Basic Functions
1082 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Figure 13-29 Star/delta changeover

For more information on motor speed adjustments see:


References:
Function Manual Basic Functions; Spindles (S1); Chapter "Configurable gear adjustments"
Function Manual Basic Functions; Speeds, Reference/Actual value syst., Regulation (G2)

Error message
If the parameter "SpindleIFNo" is not in the permissible range, the PLC is stopped with
output of interrupt message number 401702.

Special features
When parameterizing "TimeVal" with the value 0, a default value of 100 ms is used. With a
value of less than 50 ms, the minimum setting of 50 ms is applied.
The block must be called unconditionally.

Note
Switchover does not take place if the spindle is in an axis mode such as M70, SPOS.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1083
Basic PLC Program (P3)
Block descriptions

Restrictions
Star/delta changeover on digital main spindle drives initiates a process, which contains
closed-loop control sequences. Since the closed-loop control system supports automatic
star/delta changeover, certain restrictions should be noted:
● Due to the automatic deactivation of the pulse on the drive, the NST DB31, ... .DBX93.7
(Pulse enabled) deactivates simultaneously the IS DB31, ... .DBX61.7 (current controller
active) and DB31, ... .DBX61.6 (speed controller active).
● If a changeover from star to delta takes place while the spindle is rotating and the spindle
position controller is switched on, IS "Position controller active" (DB31, ... DBX61.5), this
triggers alarm 25050 "Contour monitoring".
● Once the star/delta changeover has been initiated with FC17, it cannot be delayed by the
user, e.g. by waiting until the star/delta contactors change over during the course of
operation. The user can implement this signal interaction with PLC logic.

Declaration of the function


STL Representation

VAR_INPUT
YDelta: BOOL ; //Star = 0, delta = 1
SpindleIFNo: INT; //Machine axis number
TimeVal: S5TIME ; //Time value
TimerNo : INT; //User timer for changeover time
END_VAR
VAR_OUTPUT
Y: BOOL ; //Star contactor
Delta: BOOL ; //Delta contactor
END_VAR
VAR_IN_OUT
Ref: WORD ; //Block status word (instance)
END_VAR

Description of formal parameters


The table below lists all formal parameters of the YDelta function:

Signal Type Type Value range Remark


YDelta I BOOL = Star
= Triangle
The changeover edge of the signal
initiates the changeover operation.
SpindleIFNo I INT 1 ... Number of the axis interface
declared as a spindle
TimeVal I S5time 0 ... Switchover time
TimerNo I INT 10 ... Timer for programming the wait
time
Y O BOOL Energizing of star contactor

Basic Functions
1084 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Signal Type Type Value range Remark


Delta O BOOL Energizing of delta contactor
Ref I/O WORD Instance for status information
Internal use

Call example

CALL FC 17 (
YDelta := I 45.7, //Star delta
SpindleIFNo := 4,
TimeVal := S5T#150ms,
TimerNo := 10, //Timer 10
Y := a 52.3, //Star contactor
Delta := a 52.4, //Delta contactor
Ref := mw 50); //Instance

13.13.21 FC 18: SpinCtrl spindle control

Function
FC SpinCtrl can be used to control spindles and axes from the PLC.
References:
/FB1/ Function Manual, Basic Functions; Spindles (S1)
Function Manual, Extended Functions; Positioning Axes (P2)
Function Manual, Extended Functions; Indexing Axes (T1)
This block supports the following functions:
● Position spindle
● Rotate spindle
● Oscillate spindle
● Indexing axes
● Positioning axes
Each function is activated by the positive edge of the appropriate initiation signal (start, stop).
This signal must remain in the logic "1" state until the function has been acknowledged
positively or negatively by InPos="1" or Error = "1". The output parameters are deleted when
the relevant trigger signal is reset and the function terminated.
To be able to control an axis or spindle via the PLC, it must be activated for the PLC.
This can, for example, be achieved by calling the FC "SpinCtrl" with activation of the "Start"
or "Stop" parameter. In this case, the FC "SpinCtrl" requests control over the spindle/axis
from the NC.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1085
Basic PLC Program (P3)
Block descriptions

The NC feeds back the status of this spindle/axis in byte 68 in the associated spindle/axis
interface (DB31, ...) (see interface lists). Once the axis/spindle is operating under PLC
control, the travel command for the active state can be evaluated via the relevant axis
interface.
On completion ("InPos" is TRUE, "Start" changes to zero), the axis/spindle check function is
switched to a neutral status by FC "SpinCtrl".
Alternatively, the PLC user program can also request the check for the PLC prior to calling
FC "SpinCtrl".
By calling this function several times in succession, a better response reaction by the
spindle/axis can be obtained as the changeover process in the FC can be omitted.
Activation through the PLC user program is executed in the corresponding spindle interface
in byte 8.
After return of the check, the spindle can again be programmed by the NC program.

Note
Please note:
FC 18 must be called cyclically until signal "InPos" or, in the case of an error "Error",
produces an edge transition of 1 to 0. Only when the "InPos"/"Error" signal has a 0 state can
the axis/spindle concerned be "started" or "stopped" again (the next "start" must be delayed
by at least one PLC cycle). This also applies when the assignment in data byte 8 on the axial
interface has been changed.
Abort:
The function cannot be aborted by means of parameter "Start" or "Stop", but only by means
of the axial interface signals (e.g. delete distance-to-go). The axial interface also returns
status signals of the axis that may need to be evaluated (e.g. exact stop, traverse
command).
InPos on spindle - rotation/oscillation:
For the function "Rotate spindle" and also for "Oscillate spindle" the significance of the
parameter "InPos" is defined as follows:
Setpoint speed is output → unction started without errors.
Reaching the desired spindle speed must be evaluated via the spindle interface.
Simultaneity:
Several axes can be traversed simultaneously or subject to a delay by FC 18 blocks. The
upper limit is defined by the maximum number of axes. The NCK handles the PLC function
request (FC 18) via independent interfaces for each axis/spindle.
Axis disable:
With the axis disabled, an axis controlled via FC 18 will not move. Only a simulated actual
value is generated. (Behavior as with NC programming).

Basic Functions
1086 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

WARNING
If several block calls (FC 18) have been programmed for the same axis/spindle in the PLC
user program, then the functions concerned must be interlocked by conditional calls in the
user program. The conditional call of a started block (parameter Start or Stop = TRUE)
must be called cyclically until the signal state of output parameter "Active" or "InPos"
changes from 1 to 0.

Functions
1. Position spindle:
The following signals are relevant:

Start: Initiation signal


Funct: "1" = Position spindle
Mode: Positioning mode 1, 2, 3, 4
AxisNo: Number of machine axis
Pos: Position
FRate: Positioning speed, if FRate = 0, the value from MD35300
$MA_SPIND_POSCTRL_VELO (position control activation
speed) is taken
InPos: Is set to "1" when position is reached with "Exact stop
fine".
Error: With positioning error = "1"
State: Error code

2. Rotate spindle:
The following signals are relevant:

Start: Initiation signal for start rotation


Stop: Initiation signal for stop rotation
Funct: "2" = Rotate spindle
Mode: Positioning mode 5 (direction of rotation M4)
Positioning mode < >5 (direction of rotation M3)
AxisNo: Number of machine axis
FRate: Spindle speed
InPos: Function has started without an error
Error: With positioning error = "1"
State: Error code

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1087
Basic PLC Program (P3)
Block descriptions

3. Oscillate spindle:
The following signals are relevant:

Start: Initiation signal for start oscillation


Stop: Initiation signal for stop oscillation
Funct: "3" = Oscillate spindle
AxisNo: Number of machine axis
Pos: Set gear step
InPos: Setpoint speed is output
Error: With positioning error = "1"
State: Error code
The oscillation speed is taken from machine data:
MD35400 $MA_SPIND_OSCILL_DES_VELO

MD35010 Function MD35010 Function


$MA_GEAR_STEP_ $MA_GEAR_STEP_
CHANGE_ENABLE = 0 CHANGE_ENABLE = 1
Pos = 0 Oscillation Pos = 0
Pos = 1 Oscillation Pos = 1 Oscillation with gear stage
change M41
Pos = 2 Oscillation Pos = 2 Oscillation with gear stage
change M42
Pos = 3 Oscillation Pos = 3 Oscillation with gear stage
change M43
Pos = 4 Oscillation Pos = 4 Oscillation with gear stage
change M44
Pos = 5 Oscillation Pos = 5 Oscillation with gear stage
change M45

4. Traverse indexing axis:


The following signals are relevant:

Start: Initiation signal


Funct: "4" = Indexing axis

Note
With Funct: "4" = Indexing axis
The modulo conversion can be compared with approaching the indexing position via
POS[AX] = CIC (value) in the part program.

Basic Functions
1088 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Mode: Positioning mode 0, 1, 2, 3, 4


AxisNo: Number of machine axis
Pos: Indexing position
FRate: Positioning speed; if FRate = 0,
the value is taken from machine data POS_AX_VELO
(unit as set in machine data).
InPos: Is set to "1" when position is reached with "Exact stop
fine".
Error: With positioning error = "1"
State: Error code

5 to 8. Position axes:
The following signals are relevant:

Start: Initiation signal


Funct: "5 to 8" = Position axes
Mode: Positioning mode 0, 1, 2, 3, 4
AxisNo: Number of machine axis
Pos: Position
FRate: Positioning speed; if FRate = 0,
the value is taken from machine data POS_AX_VELO
(unit as set in machine data).
InPos: Is set to "1" when position is reached with "Exact stop
fine".
Error: With positioning error = "1"
State: Error code

9. Rotate spindle with automatic gear stage selection:


The following signals are relevant:

Start: Initiation signal for start rotation


Stop: Initiation signal for stop rotation
Funct: "9" = Rotate spindle with gear stage selection
Mode: Positioning mode 5 (direction of rotation M4)
Positioning mode < >5 (direction of rotation M3)
AxisNo: Number of machine axis
FRate: Spindle speed
InPos: Setpoint speed is output
Error: With positioning error = "1"
State: Error code

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1089
Basic PLC Program (P3)
Block descriptions

10./11. Rotate spindle with constant cutting rate:


The "Constant cutting rate" function must be activated by the NC program in order for this to
be executed.
The following signals are relevant:

Start: Initiation signal for start rotation


Stop: Initiation signal for stop rotation
Funct: "B#16#0A = Rotate spindle with constant cutting rate
(m/min)
Funct: "B#16#0B = Rotate spindle with constant
cutting rate (feet/min)
Mode: Positioning mode 5 (direction of rotation M4)
Positioning mode < >5 (direction of rotation M3)
AxisNo: Number of machine axis
FRate: cutting rate
InPos: Setpoint speed is output
Error: With position error = "1"
State: Error code

Declaration of the function

FUNCTION FC 18: VOID //SpinCtrl


VAR_INPUT
Start: BOOL ;
Stop: BOOL ;
Funct: BYTE ;
Mode: BYTE ;
AxisNo: INT;
Pos: REAL;
FRate: REAL;
END_VAR
VAR_OUTPUT
InPos: BOOL ;
Error: BOOL ;
State: BYTE ;
END_VAR

Description of formal parameters


The table below lists all formal parameters of the SpinCtrl function.

Signal Type Type Range of values Remark


Start I BOOL Start spindle control from PLC
Stop I BOOL Stop spindle control from PLC

Basic Functions
1090 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Signal Type Type Range of values Remark


Funct I BYTE 1 to B#16#0B 1: Position spindle
2: Rotate spindle
3: Oscillate spindle
4: Indexing axis
5: Positioning axis metric
6: Positioning axis inch
7: PosAxis metric with handwheel override
8: PosAxis inch with handwheel override
9: Rotate spindle with
automatic gear stage selection
A: Rotate spindle with constant cutting rate
(m/min)
B: Rotate spindle with constant cutting rate
(feet/min)
Mode I BYTE 0 to 5 0: Pos to absolute pos
1: Pos incrementally
2: Pos shortest path
3: Pos absolute, positive approach direction
4: Pos absolute, negative approach direction
5: Rotational direction as for M4
AxisNo I INT 1 - 31 No. of axis/spindle to be traversed
Pos I REAL ∓ 0.1469368 I -38 Rotary axis: Degrees
to Indexing axis: Indexing position
∓ 0.1701412 I +39 Linear axis: mm or inches
FRate I REAL ∓ 0.1469368 I -38 Rotary axis and spindle: rev/min
to See under table containing info about FRate
∓ 0.1701412 I +39
InPos O BOOL 1 = Position reached,
or function executed
Error O BOOL 1 = error
State O BYTE 0 to 255 Error code

FRate
The feed rate in FC 18 can also be specified as:
● Cutting rate with unit m/min or feet/min
● Constant grinding wheel surface speed in m/s or feet/s
These alternative velocity settings can be used only if this function is activated by the NC
program. Checkback signals for successful activation can be found in byte 84 on the axis
interface.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1091
Basic PLC Program (P3)
Block descriptions

Error identifiers
If a function could not be executed, this is indicated by the "Error" status parameter being set
to 'logic 1'. The error cause is coded at block output "State":

State Significance
Errors caused by PLC handling:
1 B#16#1 Several axis/spindle functions have been activated
simultaneously
20 B#16#14 A function has been started without the position being reached
30 B#16#1e The axis/spindle has been transferred to the NC while still in
motion
40 B#16#28 The axis is programmed by the NC program, NCK internal error
50 B#16#32 permanently assigned PLC axis traverses (JOG) or refers
60 B#16#3C permanently assigned PLC axis Channel status does not permit a
start
Errors that occur due to handling of the NCK.
The alarm numbers are described in the Diagnostics Manual SINUMERIK 840D sl/ 840Di
sl:
100 B#16#64 False position programmed for axis/spindle
(corresponds to alarm number 16830)
101 B#16#65 Programmed speed is too high
102 B#16#66 False value range constant cutting speed
(corresponds to \MMC-Alarm 14840)
104 B#16#68 Following spindle: illegal programming
(corresponds to alarm number 22030)
105 B#16#69 No measuring system available
(corresponds to alarm number 16770)
106 B#16#6a Positioning process of the axis still active
(corresponds to alarm number 22052)
107 B#16#6b Reference mark not found
(corresponds to alarm number 22051)
108 B#16#6c No transition from speed control to position control
(corresponds to alarm number 22050)
109 B#16#6d Reference mark not found
(corresponds to alarm number 22051)
110 B#16#6e Velocity/speed is negative
111 B#16#6f Setpoint speed is zero
112 B#16#70 Invalid gear stage
115 B#16#73 Programmed position has not been reached
117 B#16#75 G96/G961 is not active in the NC
118 B#16#76 G96/G961 is still active in the NC
120 B#16#78 Axis is indexing axis
(corresponds to MMC-alarm 20072)
121 B#16#79 Indexing position error (corresponds to MMC-alarm 17510)
125 B#16#7d DC (shortest path) not possible (corresponds to MMC-alarm
16800)
126 B#16#7e Absolute value Minus not possible (corresponds to MMC-alarm
16820)

Basic Functions
1092 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

State Significance
127 B#16#7f Absolute value Plus not possible (corresponds to MMC-alarm
16810)
128 B#16#80 No transverse axis available for diameter programming
(corresponds to MMC-alarm 16510)
130 B#16#82 Software end switch Plus (corresponds to MMC-alarm 20070)
131 B#16#83 Software end switch Minus (corresponds to MMC-alarm 20070)
132 B#16#84 Working area limit Plus (corresponds to MMC-alarm 20071)
133 B#16#85 Working area limit Minus (corresponds to MMC-alarm 20071)
134 B#16#85 Frame not permitted for indexing axis
135 B#16#87 Indexing axis with "Hirth-toothing" is active
(corresponds to MMC-alarm 17501)
136 B#16#88 Indexing axis with "Hirth-toothing" is active and axis not
referenced
(corresponds to MMC-alarm 17503)
137 B#16#89 Spindle operation not possible for transformed spindle/axis
(corresponds to MMC-alarm 22290)
138 B#16#8A for the axis the corresponding effective coordinate-system-
specific working area limit Plus violated
(corresponds to MMC-alarm 20082)
139 B#16#8B for the axis the corresponding effective coordinate-system-
specific working area limit Minus violated
(corresponds to MMC-alarm 20082)
System or other serious interrupts:
200 B#16#c8 Corresponds to system interrupt number 450007

Pulse diagram

 

6WDUW
 

,Q3RV

(UURU
6WDUW(UU

(1) Activation of function by means of a positive signal edge with start or stop
(2) Positive acknowledgment: Function executed/Position reached
(3) Reset function activation after receipt of acknowledgment
(4) Signal change using FC

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1093
Basic PLC Program (P3)
Block descriptions

Timing diagram (fault scenario)

 

6WDUW
 
,Q3RV

(UURU
6WDUW(UU

(1) Activation of function by means of a positive signal edge with start or stop
(2) Negative acknowledgment: Error has occurred
(3) Reset function activation after receipt of acknowledgment
(4) Signal change using FC

Call examples
1. Position spindle:

//Positive acknowledgment resets Start:


U M112.0; //InPos
R M 100.0; //Start
//Negative acknowledgment, after error evaluation (state: MB114) reset with T12
start
U M113.0; // Error
U I 6.4; //Key T12
R M 100.0; //Start
//Start with T13
U I 6.3; //Key T13
AN F 112.0; //Restart only when InPos or Error = 0
AN F 113.0;
S M 100..0;

CALL FC 18 (
Start := M100.0,
Stop := FALSE,
Funct := B#16#1, //Position spindle
Mode := B#16#2, //Shortest path
AxisNo := 5,
Pos := MD104,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);

Basic Functions
1094 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

2. Start spindle rotation:

CALL FC 18 (
Start := M100.0,
Stop := FALSE,
Funct := B#16q#, //Rotate spindle
Mode := B#16#5, //Rotational direction as for M4
AxisNo := 5,
Pos := 0.0,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);

3. Start spindle oscillation

CALL FC 18 (
Start := M100.0,
Stop := FALSE,
Funct := B#16#3, //Oscillate spindle
Mode := B#16#0,
AxisNo := 5,
Pos := 0.0,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);

4. Traverse indexing axis

CALL FC 18 (
Start := M100.0,
Stop := FALSE, //Not used
Funct := B#16#4, //Traverse indexing axis
Mode := B#16#0, //Position absolutely
AxisNo := 4,
Pos := MD104, //Default setting in REAL: 1.0;2.0;..
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1095
Basic PLC Program (P3)
Block descriptions

5. Position axes

CALL FC 18 (
Start := M100.0,
Stop := FALSE, //Not used
Funct := B#16#5, //Position axes
Mode := B#16#1, //Position incrementally
AxisNo := 6,
Pos := MD104,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);

13.13.22 FC 19: MCP_IFM transmission of MCP signals to interface

Function
With the FC MCP_IFM (M-variant) from the machine control panel a range of 19 inch e.g.
MCP 483 are transferred to the corresponding signals of the NCK-/PLC-interface:
● Mode groups
● Axis selections
● WCS/MCS switchover commands
● Traversing keys
● Overrides
● Key-operated switch
In the basic program (FC 2) handwheel selections, modes and other operating signals are
transferred from the operator panel front (HMI) to the NCK/PLC interface so that the modes
support selection from the MCP or HMI.
Transfer of MMC signals to the interface can be deactivated by setting the value of the
parameter "MMCToIF" to "FALSE" in FB 1 (DB 7).
The following specifications apply to the feed override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:

Basic Functions
1096 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

● Feed override:
– The feed override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feed override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feed override for rapid traverse
effective" HMI signal is set (exception: Switch setting "Zero"). "Rapid traverse override
effective" is also set with this HMI signal.
● Machine functions for INC and axis travel keys:
– When the MCS is selected, the signals are transferred to the interface of the selected
machine axis.
– When the WCS is selected, the signals are transferred to the geo-axis interface of the
parameterized channel.
– When the system is switched between MCS and WCS, the active axes are generally
deselected.
The handwheel selection signals from the HMI are decoded and activated in the machine-
axis or the Geo-axis interface of the handwheel selected (only if parameter "HWheelMMC :=
TRUE" in FB 1).
The LEDs on the machine control panel derived from the selections in the acknowledgment.
Feedrate and spindle Start/Stop are not transferred to the interface, but output modally as a
"FeedHold" or "SpindleHold" signal. The user can link these signals to other signals leading
to a feed or spindle stop (this can be implemented, e.g. using the appropriate input signals in
FC 10: AL_MSG). The associated LEDs are activated at the same time.
If the machine control panel fails, the signals it outputs are preset to zero; this also applies to
"FeedHold" and "SpindleHold" output signals.
Multiple calls of FC 19 or FC 24, FC 25, FC 26 are permitted in a single PLC cycle. In this
case, the first call in the cycle drives the LED displays. Furthermore, all actions of the
parameterized block are carried out in the first call. In the following calls, only a reduced level
of processing of the channel and mode group interface takes place. The geometry axes are
supplied with directional data only in the first block call in the cycle.
Single block processing can be selected/deselected only in the first call in the cycle.
The second machine control panel can be processed if parameter "ModeGroupNo" has been
increased by B#16#10. When parameterizing, the HHU number is contained in the lower
nibble (lower 4 bits).
"BAGNo" = 0 or B#16#10 means that the mode group signals are not processed.
"ChanNo" = 0 means that the channel signals are not processed.
The INC selections are transferred to the mode group interface. The activation for this
specification is done via the DB10.DBX57.0 (INC-inputs in BAG-area active) through this
block once after power up.
Machine control panels can still be handled in parallel by this module. The module 2 call for
the 2nd machine control panel in OB1 cycle must come after the call of the 1st MCP Support
for two MCPs is provided in the control panel blocks up to certain limits (support is not
provided as standard for mutual interlocking of axis selections with identical assignments on
two MCPs).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1097
Basic PLC Program (P3)
Block descriptions

Flexible axis configuration


It is possible to be flexible in the assignment of axis selections or direction keys for machine
axis numbers.
Better support is now provided by the MCP blocks for the use of two MCPs, which are to run
in parallel, in particular for an application using two channels and two mode groups. Note
that the axis-numbers are also specified in the parameterized mode group number of the
MCP block in the axis tables of the relevant MCP.
To afford this flexibility, tables for axis numbers are stored in DB 10.
For the first machine control panel (MCP) the table starts from the byte 8 (symbolic name:
MCP1AxisTbl[1..22]) and for the second Machine control panel (MCP) starting from the byte
32 (symbolic name: MCP2AxisTbl[1..22]) for the second MCP. Here the machine axis
numbers are to be entered byte-wise.
It is permissible to enter a value of 0 in the axis table. Checks are not made to find illegal
axis numbers, meaning that false entries can lead to a PLC Stop.
For FC 19, the maximum possible number of axis selections can also be restricted.
This upper limit is set for the first Machine control panel in DB10.DBW30 (symbolic name:
MCP1MaxAxis) or for the second Machine control panel in DB10.DBW54 (symbolic name:
MCP2MaxAxis) set.
The default setting is 0, corresponding to the maximum number of configured axes. The axis
numbers and the limit can also be adapted dynamically. Afterwards, a new axis must be
selected on FC 19. Axis numbers may not be switched over while the axes are traversing the
relevant direction keys.
The compatibility mode is preset with axis numbers 1 to 9 for both MCPs and restricted to
the configured number of axes.

Example
More than nine axes are to be controlled with FC19 using a special application. We
recommend that you proceed as follows:
● Reserve free key on MCP
● Evaluate this key as a flipflop
● Evaluate the flipflop output as pos. and neg. edge
● For pos. edge write one set of axis numbers in the axis table (DB10) and switch on LED
via this key.
● For neg. edge write one set of axis numbers in the axis table (DB10) and switch on LED
via this key.

Basic Functions
1098 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration of the function

FUNCTION FC 19 : VOID //symbolic name: MCP_IFM

VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR

VAR_OUTPUT
FeedHold : BOOL ;
SpindleHold : BOOL ;
END_VAR

BEGIN
END_FUNCTION

Description of formal parameters


The table below shows all formal parameters of the "MCP_IFM" function:

Signal Type Type Range of values Remark


BAGNo I BYTE 0 - b#16#0A and No. of mode group to which the mode signals are
b#16#10 - transferred.
b#16#1A BAGNo >= b#16#10 means access to the
second machine control panel.
ChanNo I BYTE 0 - B#16#0A Channel no. for the channel signals
SpindleIFNo I BYTE 0 - 31 Number of the axis interface declared as a spindle
(B#16#1F)
FeedHold O BOOL Feed stop from MCP, modal
SpindleHold O BOOL Spindle stop from MCP, modal

MCP selection signals to the user interface

Key-operated switch

Source: Destination:
MCP - Switch Interface DB
Position 0 DB10.DBX56.4
Position 1 DB10.DBX56.5
Position 2 DB10.DBX56.6
Position 3 DB10.DBX56.7

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1099
Basic PLC Program (P3)
Block descriptions

Operating modes and machine functions

Source: Destination:
MCP - Key Interface DB (parameter BAGNo)
Display for BAG 1
AUTOMATIC DB11.DBX0.0
MDI DB11.DBX0.1
JOG DB11.DBX0.2
REPOS DB11.DBX1.1
REF DB11.DBX1.2
TEACH IN DB11.DBX1.0
INC 1 ... 10 000, INC Var. DB11.DBX2.0 - 2.5

Direction keys rapid traverse override


The transfer is dependent upon the selected axis. The associated interface bits are deleted
for axes, which are not selected.

Source: Destination:
MCP - Key Interface DB (parameter ChanNo)
Direction key + DB21, ... .DBX12.7
Direction key - DB21, ... .DBX12.6
Rapid traverse override DB21, ... .DBX12.5
Direction key + DB21, ... .DBX16.7
Direction key - DB21, ... .DBX16.6
Rapid traverse override DB21, ... .DBX16.5
Direction key + DB21, ... .DBX20.7
Direction key - DB21, ... .DBX20.6
Rapid traverse override DB21, ... .DBX20.5

Source: Destination:
MCP - Key Interface DB (all axis DBs)
Direction key + DB31, ... .DBX4.7
Direction key - DB31, ... .DBX4.6
Rapid traverse override DB31, ... .DBX4.5

Override

Source: Destination:
MCP - Switch Interface DB (parameter ChanNo)
Feedrate override DB21, ... .DBB4

Basic Functions
1100 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Source: Destination:
MCP - Switch Interface DB (all axis DBs)
Feedrate override DB31, ... .DBB0 (selected axis number) The feed
override of the 1st MCP is applied to all axes.
Spindle override DB31, ... .DBB19 (parameter SpindleIFNo)

Channel signals

Source: Destination:
MCP - Keys Interface DB (parameter ChanNo)
NC start DB21, ... .DBX7.1
NC stop DB21, ... .DBX7.3
RESET DB21, ... .DBX7.7
Single BLock DB21, ... .DBX0.4

Feedrate, spindle signals

Source: Destination:
MCP - Keys FC output parameters
Feed stop Parameter: "FeedHold" linked with memory, LED
Feed enable are controlled
Spindle stop Parameter: "SpindleHold" linked with memory,
Spindle enable LED are controlled

Checkback signals from user interface for controlling displays

Operating modes and machine functions

Destination: Source:
MCP - LED Interface DB (parameter BAGNo)
Display for BAG 1
AUTOMATIC DB11.DBX6.0
MDA DB11.DBX6.1
JOG DB11.DBX6.2
REPOS DB11.DBX7.1
REF DB11.DBX7.2
TEACH IN DB11.DBX7.0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1101
Basic PLC Program (P3)
Block descriptions

Aim: Source:
MCP - LED Interface DB (parameter BAGNo)
Display for BAG 1
INC 1 ... 10 000, INC Var. DB11.DBX2.0 - 8.5

Channel signals

Destination: Source:
MCP - LED Interface DB (parameter ChanNo)
NC start DB21, ... .DBX35.0
NC stop DB21, ... .DBX35.2 or DB21, ... .DBX35.3
Single Block DB21, ... .DBX0.4

Note
Direction key LEDs are controlled by operating the direction keys.
Axis selection and WCS/MCS LEDs are controlled by operating the relevant pushbutton
switch.

Call example

CALL FC 19 ( //Machine control panel M variants Signals to interface


BAGNo := B#16#1, //Mode group no. 1
ChanNo := B#16#1, //Channel no. 1
SpindleIFNo := B#16#4, //Spindle interface number = 4
FeedHold := m22.0, //Feed stop signal modal
SpindleHold := db2.dbx151.0); //Spindle stop modal in
//message DB

With these parameter settings, the signals are sent to the 1st mode group, the 1st channel
and all axes. In addition, the spindle override is transferred in the 4th axis/spindle interface.
The feed hold signal is passed to bit memory 22.0 and the spindle stop signal to data block
DB2, data bit 151.0.

Reconnecting the axis selections


To ensure a flexible assignment of the axis selection keys to the appropriate axis or spindle,
FC 19 needs not be modified or reprogrammed. The axis number simply has to be entered in
axis table DB10.DBB8 and followed as required: The axis number simply has to be entered
in axis table DB10.DBB8 and followed as required:
Example:
The spindle is defined as the 4th axis and must be selected via axis key 9.

Basic Functions
1102 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Solution:
The value 4 must be entered in DB10 byte (8+(9-1)) for the 4th axis.

CALL FC 19 ( //signals to interface


BAGNo := B#16#1, //Mode group no. 1
ChanNo := B#16#1, //Channel no. 1
SpindleIFNo := B#16#4, //Spindle interface number = 4

FeedHold := m30.0, //Feed stop signal modal


SpindleHold := m30.1); //Spindle stop modal

13.13.23 FC 21: transfer PLC NCK data exchange

Function
When the Transfer block is called, data are exchanged between the PLC and NCK according
to the selected function code. Data are transferred as soon as FC 21 is called, not only at the
start of the cycle.
The "Enable" signal activates the block.
FC 21 is processed only when "Enable" = "1".
The following functions for the data exchange between PLC and NCK are supported:
1. Signal synchronized actions at the NCK - channel
2. Signals synchronized actions from NCK - channel
3. Fast data exchange PLC-NCK (Read function in NCK)
4. Fast data exchange PLC-NCK (Write function in NCK)
5. Update control signals to NCK - channel
6. Update control signals to axes (data byte 2 of the user interface)
7. Update control signals to axes (data byte 4 of the user interface)

Declaration of the function


STL Representation

VAR_INPUT
Enable: BOOL ;
Funct: BYTE ;
S7Var: ANY ;
IVar1: INT;
IVar2: INT;
END_VAR
VAR_OUTPUT

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1103
Basic PLC Program (P3)
Block descriptions

Error: BOOL ;
ErrCode: INT;
END_VAR

Explanation of formal parameters


The table below shows all formal parameters of the "Transfer" function.

Signal Type Type Value range Comment


Enable I BOOL 1 = FC 21 active
Funct I BYTE 1 ... 7 1: Synchronized actions at
channel
2: Synchronized actions from
channel
3: Read data
4: Write data
5: Control signals to channel
6, 7: Control signals to axis
S7Var I ANY S7 data storage area Depends on "Funct"
IVAR1 I INT 0 ... Depends on "Funct"
IVAR2 I INT 1 ... Depends on "Funct"
Error O BOOL
ErrCode O INT Depends on "Funct"

Function 1, 2: Signals synchronized actions to/from Channel


Synchronized actions can be disabled or enabled by the PLC.
The data area is stored on the user interface in DB21, ... .DBB 300..307 (to channel) and DB
21, ... .DBB 308 ...315 (from channel). The parameter "S7Var" is not evaluated for this
function, but must be assigned an actual parameter (see call example). The data are
transferred to/from the NC as soon as FC 21 is processed.
The following signals are relevant:

Signal Type Type Value range Comment


Enable I BOOL 1 = FC 21 active
Funct I BYTE 1, 2 1: Synchronized actions at
channel
2: Synchronized actions from
channel
S7Var I ANY S7 data storage area Not used
IVAR1 I INT 1..MaxChannel Channel number
Error O BOOL
ErrCode O INT 1: "Funct" invalid
10: Channel no. invalid

Basic Functions
1104 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Call example:

FUNCTION FC 100: VOID


VAR_TEMP
myAny: ANY ;
END_VAR
BEGIN
NETWORK
...
// Deactivate synchronized actions with ID3, ID10 and ID31 in NC channel 1:
SYAK: TO DB21;
SET;
S DBX300.2; //ID3
S DBX301.1; //ID10
S DBX303.6; //ID31
L B#16#1;
T MB11;
SPA TRAN;

// Synchronized actions from NCK channel:


SYVK: L B#16#2;
T MB11;
TRAN: CALL FC 21 (
Enable := M 10.0, // if TRUE, FC 21 active
Funct := MB 11,
S7Var := #myAny, //Not used
IVAR1 := 1, //Channel no.
IVAR2 := 0,
Error := M 10.1,
ErrCode := MW 12);
...
END_FUNCTION

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1105
Basic PLC Program (P3)
Block descriptions

Function 3, 4: Rapid data exchange PLC-NCK


General
A separate, internal data area is provided to allow the high-speed exchange of data between
the PLC and NCK. The size of the internal data field is preset to 1024 bytes. The accesses
(read/write) from PLC take place via the FC 21. The occupation of this range (structure) must
be defined identically in the NC part program and the PLC user program.
These data can be accessed from the NC part program by commands $A_DBB[x],
$A_DBW[x], $A_DBD[x], $A_DBR[x] (see Parameter Manual System variables).
The concrete address is the data field is specified by a byte offset (0 to 1023) in parameter
IVAR1. In this case, the alignment must be selected according to the data format, i.e. a
Dword starts at a 4-byte limit and a word at a 2-byte limit. Bytes can be positioned on any
chosen offset within the data field, single-bit access operations are not supported and
converted to a byte access operation by FC 21. Data type information and quantity of data
are taken from the ANY parameter, transferred via S7Var.
Without additional programming actions, data consistency is only ensured for 1 and 2 byte
access in the NCK and in the PLC. For the 2-byte consistency this is true only for the data
type WORD or INT, but not for the data type BYTE.
In the case of longer data types or transfer of fields, which should be transferred
consistently, a semaphore byte must be programmed in parameter IVAR2 that can be used
by FC 21 to determine the validity or consistency of a block. This handling must be
supported by the NC, i.e. in the part program, by writing or deleting the semaphore byte. The
semaphore byte is stored in the same data field as the actual user data.
The semaphore byte is identified by a value between 0 and 1023 in IVAR2.
The PLC reads and describes the semaphore byte via FC 21 in the same call, which should
transfer the user data. The PLC programmer only needs to set up a semaphore variable. For
access from the NC via the part program, the semaphore feature must be programmed using
individual instructions according to the flow chart shown below. The sequence is different for
reading and writing variables.
Only individual variables or ARRAYs can be supported directly by the semaphore technique.
Structure transfers must be subdivided into individual jobs. The user must ensure data
consistency of this structure by programming a semaphore system.
If IVAR2 is set to -1, data are transferred without a semaphore.

Basic Functions
1106 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Data exchange with semaphore in PLC (schematic of FC 21)

)XQFW  )XQFW 
UHDG ZULWH

QR QR
6HPDSKRUH " 6HPDSKRUH "

\HV \HV

7UDQVIHU 7UDQVIHU
(UURU  (UURU 
GDWDIURP GDWDIURP
(UU&RGH  (UU&RGH 
1&WR3/& 3/&WR1&

6HPDSKRUH  6HPDSKRUH 
(UURU  (UURU 
(UU&RGH  (UU&RGH 

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1107
Basic PLC Program (P3)
Block descriptions

Basic structure in NCK:

5HDGLQ :ULWHLQ
1&. 1&.

QR QR
6HPDSKRUH " 6HPDSKRUH "

\HV \HV

5HDGGDWD 7UDQVIHU
IURP3/& GDWDIURPWR
3/&

6HPDSKRUH  6HPDSKRUH 

Variable value ranges


The following signals are relevant:

Signal Type Type Value range Comment


Enable I BOOL = FC 21 active
Funct I BYTE 3, 4 3: Read data
4: Write data
S7Var I ANY S7 data area, except Source/destination data storage area
local data
IVAR1 I INT 0 ... 1023 Position offset
IVAR2 I INT -1 ... 1023 Semaphore byte
Transfer without semaphore: -1
Error O BOOL
ErrCode O INT 20: Alignment error
21: illegal position offset
22: Illegal semaphore byte
23: No new data to be read
24: Cannot write data
25: Local data parameterized for
S7Var

Basic Functions
1108 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Call example:
1. Read double word of position offset 4 with semaphore in byte 0 and store in MD100:
Data type Dword (4 bytes)
Position offset 4

 6HPDSKRUH

 'ZRUG 'DWDW\SH'ZRUG E\WHV


3RVLWLRQRIIVHW



CALL FC 21 (
Enable := M 10.0, // if TRUE, FC 21 active
Funct := B#16#3, //Read data
S7Var := P#M 100.0 DWORD 1,
IVAR1 := 4,
IVAR2 := 0,
Error := M 10.1,
ErrCode := MW12);
UN M10.1; //Enable as long as 1,
//till value is read
R F10.0;

Examples: Examples of NCK programming from synchronized actions:


Data transfer from NC to PLC, with data written via synchronized actions;
Byte 0 serves as the semaphore
ID=1 WHENEVER $A_DBB[0] == 0 DO $A_DBR[4] = $AA_IM[X] $A_DBB[0] = 1
Data transfer from PLC to NC, with data read via synchronized actions;
Byte 1 serves as the Semaphore:
ID=2 WHENEVER $A_DBB[1] == 1 DO $R1 = $A_DBR[12] $A_DBB[1] = 0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1109
Basic PLC Program (P3)
Block descriptions

2. Read word of position offset 8 without semaphore and store in MW 104:

CALL FC 21 (
Enable := M 10.0, // if TRUE, FC 21 active
Funct := B#16#3, //Read data
S7Var := P#M 104.0 WORD 1,
IVAR1 := 8,
IVAR2 := -1,
Error := M 10.1,
ErrCode := MW12);

Function 5: Update control signals to channel


The purpose of function 5 is to transmit important control signals at high speed in between
cyclic data transfers. Data bytes 6 and 7 of user interfaces DB21, ... are transferred to the
NC. The channel is specified in parameter "IVAR1". This enable, for example, the feed
disable, read-in disable to be transferred outside of the PLC cycle.
The following signals are relevant:

Signal Type Type Value range Comment


Enable I BOOL 1= FC 21 active
Funct I BYTE 5 5: Control signals to channel
S7Var I ANY S7 data storage area Not used
IVAR1 I INT 1st max. channel Channel number
Error O BOOL
ErrCode O INT 1: "Funct" invalid
10: Channel no. invalid

Function 6: Update control signals to axes


The purpose of function 6 is to transmit important control signals at high speed in between
cyclic data transfers. The data byte 2 of application interface DB31, ... is transferred to the
NC. The transfer is performed for all activated axes. This allows the servo enable to be
transferred outside the PLC cycle, for example.
The following signals are relevant:

Signal Type Type Value range Comment


Enable I BOOL 1= FC 21 active
Funct I BYTE 6 6: Control signals to axes
S7Var I ANY S7 data storage area Not used
IVAR1 I INT 0
Error O BOOL
ErrCode O INT 1: "Funct" invalid

Basic Functions
1110 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Function 7: Update control signals to axes


The purpose of function 7 is to transmit important control signals at high speed in between
cyclic data transfers. The data byte 4 of application interface DB31, ... is transferred to the
NC. The transfer is performed for all activated axes. This enables, for example, the feed stop
to be transferred outside the PLC cycle.
The following signals are relevant:

Signal Type Type Value range Comment


Enable I BOOL 1= FC 21 active
Funct I BYTE 7 7: Control signals to axes
S7Var I ANY S7 data storage area Not used
IVAR1 I INT 0
Error O BOOL
ErrCode O INT 1: "Funct" invalid

13.13.24 FC 22: TM_DIR Direction selection for tool management

Function
The block TM_DIR provides the shortest path for positioning a magazine or a revolver based
on the actual and setpoint position.
As long as a 1 signal is applied to the Start input, all output parameters are updated
cyclically. Changes can be made to input parameters (e.g. position values) in subsequent
PLC cycles.
The output signals are undefined when the start signal is at 0 level.
In the case of direction selection with special positioning input "Offset" > 0, a new setpoint
position is calculated from the setpoint and special positions and the number of magazine
locations according to the following formula:
New setpoint position = (setpoint pos. - (special pos. -1)) neg. modulo # locations
The new setpoint position corresponds to the location number at which the magazine must
be positioned so that the setpoint position requested by the user corresponds to the location
number of the special position. The directional optimization is active both with and without
special positioning.
The block must be called once with the appropriate parameter settings for each magazine.

WARNING
The block may only be called in conjunction with the tool management.

Note
For further details on tool management (also with regard to PLC) refer to the Function
Manual Tool Management. Furthermore, PI services are provided for tool management via
the FB 4, FC 7 and FC 8 (see also the corresponding Sections in this documentation).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1111
Basic PLC Program (P3)
Block descriptions

Declaration of the function


STL representation

FUNCTION FC 22: VOID


// NAME: TM_DIR
VAR_INPUT
MagNo: INT ;
ReqPos: INT;
ActPos: INT;
Offset: BYTE ;
Start: BOOL ;
END_VAR

VAR_OUTPUT
Cw: BOOL ;
Ccw: BOOL ;
InPos: BOOL ;
Diff: INT;
Error: BOOL ;
END_VAR
BEGIN
END_FUNCTION

Description of formal parameters


The table below shows all formal parameters of the "TM_DIR" function.

Signal Type Type Range of values Remark


MagNo I INT 1 ... Magazine number
ReqPos I INT 1 ... Setpoint location
ActPos I INT 1 ... Actual location
Offset I BYTE 0 ... Offset for special positioning
Start I BOOL Start of calculation
Cw O BOOL 1 = Move magazine clockwise
Ccw O BOOL 1 = Move magazine
counterclockwise
InPos O BOOL 1 = In position
Diff O INT 0 ... Differential path (shortest path)
Error O BOOL 1 = error

Basic Functions
1112 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Call example

CALL FC 22 ( //Tool management direction selection


MagNo := 2, //Magazine number
ReqPos := mw 20, //Target position
ActPos := mw 22, //Current position
Offset := b#16#0, //Offset for special positioning
Start := m 30.4, //Start trigger
//Return parameters
Cw := m 30.0, //Move magazine
//in anticlockwise direction
Ccw := m 30.1, //Move magazine
//in anticlockwise direction
InPos := m 30.2, //Magazine in position
Diff := mw 32, //Differential path
Error := m30.3 //Error has occurred
);

13.13.25 FC 24: MCP_IFM2 transmission of MCP signals to interface

Function
With FC MCP_IFM2 (M variant slim machine control panel e.g. MCP 310), the following are
transferred from the machine control panel (MCP) to the corresponding signals of the
NCK/PLC interface:
● Mode groups
● Axis selections
● WCS/MCS switchover
● Traversing keys
● Overrides or override simulation signals
In the basic program (FC 2), handwheel selections, modes and other operating signals
continue to be transferred from the operator panel front or HMI to the NCK/PLC interface so
that the modes support selection from the MCP or HMI.
Transfer of HMI signals to the interface can be deactivated by setting the value of the
parameter "MMCToIF" to "FALSE" in FB 1 (DB 7). "MMCToIF" can also be
activated/deactivated in the cyclic program by setting and resetting (e.g. R
gp_par.MMCToIF).
The following specifications apply to the feed override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1113
Basic PLC Program (P3)
Block descriptions

● Feed override:
– The feed override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feed override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feed override for rapid traverse
effective" HMI signal is set (exception: Switch setting "Zero"). "Rapid traverse override
effective" is also set with this HMI signal.
● Machine functions for INC and axis travel keys:
– When the MCS is selected, the signals are transferred to the interface of the selected
machine axis.
– When the WCS is selected, the signals are transferred to the geo-axis interface of the
parameterized channel.
– When the system is switched between MCS and WCS, the active axes are generally
deselected.
The handwheel selection signals from HMI are decoded and activated in the machine-axis or
the Geo-axis interface of the handwheel selected (only if parameter "HWheelMMC := TRUE"
in FB 1).
The associated LEDs of the machine control panel are derived from the acknowledgments
from the relevant selections.
Feedrate and spindle Start/Stop are not transferred to the interface, but output modally as a
"FeedHold" or "SpindleHold" signal. The user can link these signals to other signals leading
to a feed or spindle stop (this can be implemented, e.g. using the appropriate input signals in
FC 10: AL_MSG). The associated LEDs are activated at the same time.
The spindle direction (+, -) is not switched directly either, but made available as output
parameter "SpindleDir". permitting, for example, FC 18 to be parameterized. A spindle
enable signal is also switched via parameter "SpindleHold". One possible method of moving
a spindle directly is to preselect it as an axis so that it can be traversed via (axis) direction
keys.
If the machine control panel fails, the signals it outputs are preset to zero; this also applies to
"FeedHold" and "SpindleHold" output signals.
Multiple calls of FC 24 or FC 19, FC 25, FC 26 are permitted in a single PLC cycle. In this
case, the first call in the cycle drives the LED displays. Furthermore, all actions of the
parameterized block are carried out in the first call. In the following calls, only a reduced level
of processing of the channel and mode group interface takes place. The geometry axes are
supplied with directional data only in the first block call in the cycle.
Single block processing can be selected/deselected only in the first call in the cycle.
The second machine control panel can be processed if parameter "ModeGroupNo" has been
increased by B#16#10. When parameterizing, the HHU number is contained in the lower
nibble (lower 4 bits).
"BAGNo" = 0 or B#16#10 means that the mode group signals are not processed.
ChanNo = 0 means that the channel signals are not processed.

Basic Functions
1114 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

The INC selections are transferred to the mode group interface. The activation for this
specification is done via the DB10.DBX57.0 (INC-inputs in BAG-area active) through this
block once after power up.
Furthermore, two machine control panels can be handled in parallel by this block. The
module 2 call for the 2nd machine control panel in OB1 cycle must come after the call of the
1st MCP Support for two MCPs is provided in the control panel blocks up to certain limits
(support is not provided as standard for mutual interlocking of axis selections with identical
assignments on two MCPs).

Flexible axis configuration


It is possible to be flexible in the assignment of axis selections or direction keys for machine
axis numbers.
Better support is now provided by the MCP blocks for the use of two MCPs, which are to run
in parallel, in particular for an application using two channels and two mode groups. Note
that the axis-numbers are also specified in the parameterized mode group number of the
MCP block in the axis tables of the relevant MCP.
To afford this flexibility, tables for axis numbers are stored in DB 10.
For the first machine control panel (MCP), the table starts at byte 8 (symbolic name:
MCP1AxisTbl[1..22]) and for the second Machine control panel (MCP) starting from the byte
32 (symbolic name: MCP2AxisTbl[1..22]) for the second MCP. The machine axis numbers
must be entered byte by byte here. It is permissible to enter a value of 0 in the axis table.
Checks are not made to find impermissible axis numbers, meaning that false entries can
lead to a PLC Stop.
For FC 24, the maximum possible number of axis selections can also be restricted.
This upper limit is set for the 1st machine control panel in DB10.DBW30 (symbolic name:
MCP1MaxAxis) or for the 2nd machine control panel in DB10.DBW54 (symbolic name:
MCP2MaxAxis) for the respective MCP.
The default setting is 0, corresponding to the maximum number of configured axes. The axis
numbers and the limit can also be adapted dynamically. Afterwards, a new axis must be
selected on FC 24. Axis numbers may not be switched over while the axes are traversing the
relevant direction keys. The compatibility mode is preset with axis numbers 1 to 6 for both
MCPs and restricted to the configured number of axes.

Declaration of the function

FUNCTION FC 24: VOID


// NAME: MCP_IFM2

VAR_INPUT
BAGNo: BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1115
Basic PLC Program (P3)
Block descriptions

VAR_OUTPUT
FeedHold: BOOL ;
SpindleHold: BOOL ;
SpindleDir: BOOL ;
END_VAR

BEGIN
END_FUNCTION

Description of formal parameters


The table below shows all formal parameters of the "MCP_IFM2" function:

Signal Type Type Range of values Remark


BAGNo I BYTE 0 - b#16#0A No. of mode group to which the mode signals
and are transferred.
b#16#10 - b#16#1A BAGNo >= b#16#10 means access to the
second machine control panel.
ChanNo I BYTE 0 - B#16#0A Channel no. for the channel signals
SpindleIFNo I BYTE 0 - 31 Number of the axis interface declared as a
(B#16#1F) spindle
FeedHold O BOOL Feed stop from MCP, modal
SpindleHold O BOOL Spindle stop from MCP, modal
SpindleDir O BOOL Direction of spindle rotation
0: corresponds to + (left)
1: corresponds to - (right)

Call example

CALL FC 24 ( //Slim machine control panel M variants


//signals to interface
BAGNo := B#16#1, //Mode group no. 1
ChanNo := B#16#1, //Channel no. 1
SpindleIFNo := B#16#4, //Spindle interface number = 4
FeedHold := m22.0, //Feed stop signal modal
SpindleHold := db2.dbx151.0); //Spindle stop modal in message data block
SpindleDir:= m22.1); //Spindle direction return

With these parameter settings, the signals are sent to the 1st mode group, the 1st channel
and all axes. In addition, the spindle override is transferred in the 4th axis/spindle interface.
The feed hold signal is passed to bit memory 22.0 and the spindle stop signal to data block
DB2, data bit 151.0. The spindle direction feedback signal supplied via parameter
"SpindleDir" can be used as a direction input for an additional FC 18 call.

Basic Functions
1116 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

13.13.26 FC 25: MCP_IFT transfer of MCP/OP signals to interface

Function
With the FC MCP_IFM (M-variant) from the machine control panel a range of 19 inch e.g.
MCP 483 are transferred to the corresponding signals of the NCK-/PLC interface:
● Mode groups
● Direction keys of four axes
● WCS/MCS switchover commands
● Overrides
● Key-operated switch
In the basic program (FC 2), handwheel selections, modes and other operating signals
continue to be transferred from the operator panel front or HMI to the NCK/PLC interface so
that the modes support selection from the MCP or BT.
Transfer of HMI signals to the interface can be deactivated by setting the value of the
parameter "MMCToIF" to "FALSE" in FB 1 (DB 7).
The following specifications apply to the feed override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:
● Feed override:
– The feed override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feed override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feed override for rapid traverse
effective" HMI signal is set (exception: Switch setting "Zero"). "Rapid traverse override
effective" is also set with this HMI signal.
● Machine functions for INC and axis travel keys:
– When the MCS is selected, the signals are transferred to the interface of the selected
machine axis.
– When the WCS is selected, the signals are transferred to the geo-axis interface of the
parameterized channel.
The handwheel selection signals from the MMC are decoded and activated in the machine-
axis or the Geo-axis interface of the handwheel selected (only if parameter "HWheelMMC :=
TRUE" in FB 1). = TRUE").
The LEDs on the machine control panel derived from the selections in the acknowledgment.
Feedrate and spindle Start/Stop are not transferred to the interface, but output modally as a
"FeedHold" or "SpindleHold" signal. The user can link these signals to other signals leading
to a feed or spindle stop (this can be implemented, e.g. using the appropriate input signals in
FC 10: AL_MSG). The associated LEDs are activated at the same time.
If the machine control panel fails, the signals it outputs are preset to zero; this also applies to
"FeedHold" and "SpindleHold" output signals.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1117
Basic PLC Program (P3)
Block descriptions

Multiple calls of FC 25 or FC 19, FC 24, FC 26 are permitted in a single PLC cycle. In this
case, the first call in the cycle drives the LED displays. Furthermore, all actions of the
parameterized block are carried out in the first call. In the following calls, only a reduced level
of processing of the channel and mode group interface takes place. The geometry axes are
supplied with directional data only in the first block call in the cycle.
Single block processing can be selected/deselected only in the first cycle.
The second machine control panel can be processed if parameter "ModeGroupNo" has been
increased by B#16#10. When parameterizing, the HHU number is contained in the lower
nibble (lower 4 bits).
"BAGNo" = 0 or B#16#10 means that the mode group signals are not processed.
ChanNo = 0 means that the channel signals are not processed.

Flexible axis configuration


It is possible to be flexible in the assignment of axis selections or direction keys for machine
axis numbers.
Better support is now provided by the MCP blocks for the use of two MCPs, which are to run
in parallel, in particular for an application using two channels and two mode groups. The
module 2 call for the 2nd machine control panel in OB1 cycle must come after the call of the
1st MCP Note that the axis-numbers are also specified in the parameterized mode group
number of the MCP block in the axis tables of the relevant MCP.
To afford this flexibility, tables for axis numbers are stored in DB 10.
For the first machine control panel (MCP), the table starts at byte 8 (symbolic name:
MCP1AxisTbl[1..22]) and for the second Machine control panel (MCP) starting from the byte
32 (symbolic name: MCP2AxisTbl[1..22]) for the second MCP. The machine axis numbers
are entered here bytewise. It is permissible to enter a value of 0 in the axis table. Checks are
not made to find impermissible axis numbers, meaning that false entries can lead to a PLC
Stop.
The restriction of the possible number of axes at FC 25 is done via the 0-values in the axis
table. The axis numbers can also be adapted dynamically. Axis numbers may not be
switched over while the axes are being traversed via the relevant direction keys. The
compatibility mode is preset with axis numbers 1 to 4 for both MCPs and restricted to the
configured number of axes.

Note
For further information see "FC 19: MCP_IFM transmission of MCP signals to interface
(Page 898) ".

Basic Functions
1118 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Declaration of the function

FUNCTION FC 25: VOID


// NAME: MCP_IFT

VAR_INPUT
BAGNo: BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR

VAR_OUTPUT
FeedHold: BOOL ;
SpindleHold: BOOL ;
END_VAR

BEGIN
END_FUNCTION

Description of formal parameters


The table below shows all formal parameters of the "MCP_IFT" function:

Signal Type Type Value range Comment


BAGNo I BYTE 0 - b#16#0A No. of mode group to which the mode signals
and are transferred.
b#16#10 - b#16#1A BAGNo >= b#16#10 means access to the
second machine control panel.
ChanNo I BYTE 0 - B#16#0A Channel no. for the channel signals
SpindleIFNo I BYTE 0 - 31 Number of the axis interface declared as a
(B#16#1F) spindle
FeedHold O BOOL Feed stop from MCP, modal
SpindleHold O BOOL Spindle stop from MCP, modal

Call example

CALL FC 25 ( //Machine control panel T variants


//signals to interface
BAGNo := B#16#1, //Mode group no. 1
ChanNo := B#16#1, //Channel no. 1
SpindleIFNo := B#16#4, //Spindle interface number = 4
FeedHold := m22.0, //Feed stop signal modal
SpindleHold := db2.dbx151.0); //Spindle stop modal in message data block

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1119
Basic PLC Program (P3)
Block descriptions

With these parameter settings, the signals are sent to the 1st mode group, the 1st channel
and all axes. In addition, the spindle override is transferred in the 4th axis/spindle interface.
The feed hold signal is passed to bit memory 22.0 and the spindle stop signal to data block
DB2, data bit 151.0.

13.13.27 FC 26: HPU_MCP transmission of HT8 signals to interface

Function declaration

FUNCTION FC 26: VOID


// NAME: HPU_MCP

VAR_INPUT
BAGNo: BYTE ;
ChanNo: BYTE ;
END_VAR

BEGIN
END_FUNCTION

Parameter

Parameter Type Type Value range Comment


BAGNo I BYTE 1st MCP: Upper nibble: Number of the MCP whose
B#16#00 - B#16#0A signals are to be transferred.
2nd MCP: 0 = 1st MCP, 1 = 2nd MCP
B#16#10 - B#16#1A Lower nibble: Number of the mode group, in
which the mode group-specific interface signals
are to be transferred. The mode group-specific
signals are not processed, if the mode-group
number is 0.
ChanNo I BYTE B#16#00 - B#16#0A Number of the channel, in which the channel-
specific interface signals are to be transferred.
The channel-specific signals are not processed,
if the channel number is 0.
Type: I = input parameter, O = output parameter

Basic Functions
1120 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Call examples
Call of the FC 26 for the first MCP, the first mode group and the first channel of the NC.

CALL FC 26 ( //Machine control panel of HT8


BAGNo := B#16#01, //1.MCP, 1.BAG
ChanNo := B#16#01); //Channel 1

Call of the FC 26 for the second MCP, the second mode group and the third channel of the
NC.

CALL FC 26( //Machine control panel of HT8


BAGNo := B#16#12, //2.MCP, 2.BAG
ChanNo := B#16#03 ); //Channel 3

General function description


The function FC 26 "HPU_MCP (nachine control panel-signals of the hand-held unit HT8"
transfers the HT8-specific signals of the following functions between the HT8-input/output
data areas parameterized in the function block FB 1 (Parameter: MCPxIn and MCPxOut)
and the NC/PLC-interface:
● Mode groups
● Machine function INC
● Coordinate system WCS or MCS
● Axial traverse key
● Axis selection
● Feed override
● Rapid traverse override
● Keyswitch information

Note
Mode switchover through HT 8 and/or HMI
The function FC 2 "GP_HP Basic program, cyclic part" transfers the signals of the block-
switchover in such a way that an alternative selection of MCP of HT 8 and of the HMI is
possible. The transfer of the HMI signals to the NC/PLC interface can also be switched
off in the function block FB 1 with the parameter "MMCToIF" = FALSE.
Active axes:
Using HT 8 a maximum of 6 axes can be addressed at the same time. The selection of
the axes is to be realized by the user/machine manufacturer in the PLC user program.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1121
Basic PLC Program (P3)
Block descriptions

Flexible axis configuration


The function FC 26 enables a flexible assignment of the machine axes to the traversing keys
or to the axis selection. 2 tables are available in DB 10 for this purpose:
● Machine axis table 1st MCP: DB10.DBB8 to DBB13 (Table of the machine axis number)
Symbolic name: MCP1AxisTbl[1..22]
● Machine axis table 2nd MCP: DB10.DBB32 to DBB37 (Table of the machine axis
number)
symbolic name: MCP2AxisTbl[1..22]
In the tables the axis numbers n (with n = 1, 2, ...) of the active machine axis are to be
entered byte-wise. The value 0 must be entered in the unused table locations.
The table length can be specified to the FC 26:
● 1st MCP: DB10.DBB30 (upper limit of the machine axis table)
● 2nd MCP: DB10.DBB54 (upper limit of the machine axis table)
A value of 4, for example, means that FC 26 takes into account only the first 4 table entries
or machine axes. The maximum value for the FC 26 is 6. For value 0 or values greater than
6 the maximum value is taken implicitly.

Note
Please note the following constraints:
• A check of the permissible machine axis numbers is not done. Invalid machine axis
numbers can lead to a PLC Stop.
• The machine axis numbers can be changed dynamically. The table may not be written, if
currently a machine axis is being moved via a traversing key.

Transfer of the traversing key signals depending upon the active coordinate system
The traversing key signals for 6 axes lie in the HT 8 input data area below:
● EB n + 2, Bit 0 - Bit 5 (positive traversing direction)
● EB n + 3, Bit 0 - Bit 5 (negative traversing direction)
The switchover of the coordinate system is done via the input signal:
● EB n + 0, Bit 0 (MCS/WCS)
The input signal is evaluated in FC 26 with the help of the edge trigger flag. The active
coordinate system is shown in the following output signal:
● AB n + 0, Bit 0 (MCS/WCKS) with 0 = MCS, 1 = WCS
In case of active MCS the traversing key signals of the axes 1 - 6 are transferred in the axis-
specific interfaces (DB31, ... .DBX4.6 and DBX4.7 (traversing key +/-)) of the axes specified
in the machine axis tables (DB10.DBB8 to DBB13 or DBB32 to DBB37).
In case of active WCS it is assumed that the axes 1 - 3 of the machine axis table are
geometric axes. For this reason the traversing key signals:
● of the axes 1 - 3 (EB n + 2 / 3, Bit 0 - Bit 2) are transferred in the interface of the
geometric axes in DB21, ... .DBB 12 + (n * 4), with n = 0, 1, 2), Bit 6 and Bit 7 (traversing
keys +/-) of the channel specified with the parameter "ChanNo" .

Basic Functions
1122 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

The assignment of the traversing key signals of the axes 1, 2 and 3 to the geometric axes
1, 2 and 3 of the channel is permanent and may not be changed.
● of the axes 4 - 6 (EB n + 2 / 3, Bit 3 - Bit 5) are transferred in the axis-specific interface
(DB31, ... .DBX4.6 and DBX4.7 (traversing keys +/-)) of the axes 4 - 6 entered in the
machine axis table (DB10.DBB11 to DBB13 or DBB35 to DBB37).

No traversing of machine axes in WCS


In case of active WCS (AB n + 0, Bit 0 = 1) the traversing of the machine axes can be
locked. For this, the following output signals are to be set in the PLC user program:
● AB n + 3, Bit 7 = 1 (For WCS: no machine axes)
Requirement to the FC 26, not to transfer any traversing key signals for the machine
axes. The traversing key signals for the axes 1 - 3 of the machine axis table are
transferred to the geometric axes 1 - 3 of the specified channel. The traversing key
signals for the axes 4 - 6 of the machine axis table are not transferred.
● AB n + 2, Bit 6 (axes 7 - n selected)
Requirement at the FC 26 not to transfer any traversing key signals, since the axes 1 - 6
of the machine axis table are switched over. The axes 1 - 3 are thus not geometric axes,
but instead also machine axes.

Feed override
The value of the HT8 override switch is transferred as feed override in the chanel-specific
interface DB 21, ... .DBB4 (feedrate override) of the programmed channel (parameter:
"ChanNo") and in the axis-specific interfaces DB31, ... .DBB0 (feedrate override) of the axes
programmed in the table DB10.DBB8 to DBB13 (machine axis number).

Rapid traverse override


Is for the programmed channel (parameter: "ChanNo") the signal DB21, ... .DBX25.3 = 1
(feedrate override for rapid traverse) set, the value of the HT8 override switch is set as rapid
traverse override in this channel-specific. Interface in DB 21, ... .DBB5 (rapid traverse
override) and in addition the signal DB21, ... .DBX6.6 = 1 (rapid traverse override active) is
set.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1123
Basic PLC Program (P3)
Block descriptions

Machine function INC


The HT8 signals of the machine functions INC are transferred differently depending upon the
active coordinate system MCS or WCS:
● Active coordinate system: MCS
The selected machine function INC is transferred for all 6 axes in the axis-specific
interfaces in DB31, ... .DBX5.0 to DBX5.5 (machine function) of the axes programmed in
the table in DB10.DBB8 to DBB13 (machine axis numbers).
● Active coordinate system: WCS
For the axes 1 to 3 the signals of the machine function INC are transferred in the
channel-specific. Interface in DB21, ... .DBX13.0 to DBX13.5 (machine function) of the
programmed channel (Parameter: "ChanNo").
For the axes 4 to 6 the signals of the machine function INC are transferred in the
channel-specific. interfaces in DB31, ... .DBX5.0 to DBX5.5 (machine function) of the
axes programmed in the table in DB10.DBB11 to DBB13 (machine axis numbers).
The selection signals of the INC machine functions are transferred in the mode group-
specific interface DB11 DBB 2 + (n * 20), Bit 0 to Bit 5 (with n = 0, 1, 2, ...). The FC 26
informs the NCK about the activation of the mode group-interface for the INC machine
function once after the power-up with DB10.DBX57.0 (INC inputs active in the mode group
area).

Handwheel selection
The hand-wheel selection signals are evaluated by HMI and transferred to the corresponding
NC/PLC interface signals of the machine or geometric axes:
● Geometry axes: DB21, ... DBB 12 + (n * 4), Bit 0 to Bit 2 (with n = 0, 1, 2)
● Machine axes: DB31, ... .DBX4.0 to DBX4.2
Requirement: FB 1-Parameter: "HWheelMMC" = TRUE

Multiple call in one PLC cycle


Multiple calls of FC 26 are permitted in a single PLC cycle. Upon the first call in the PLC
cycle:
● all actions of the parameterized blocks are executed
● the LED signals are written in the output area
● in case of selected WCS, the traversing key signals of the geometric axes are written
● the signals for the selection and deselection of the individual block are processed
Upon further calls of the FC 26 only a reduced processing of the channel and mode group-
interface is done.

Basic Functions
1124 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Processing of two MCP


If the function FC 26 is called twice for two MCP in the cyclic sequence of the PLC program
(organization block OB 1), the call for the second MCP must be made after the call for the
first MCP.

Note
If an axis can be traversed from two MCP, then the implementation of a mutual interlocking
is the responsibility of the user (machine manufacturer).

Failure of the MCP of HT8


In case of failure of the MCP of HT8 all the input signals are set to the value 0.

13.13.27.1 Overview of the NC/PLC interface signals of HT 8

Operating modes and machine functions

Source: MCP Destination: Programmed mode group (Parameter BAGNo)


Display for BAG 1
AUTOMATIC DB11.DBX0.0
MDI DB11.DBX0.1
JOG DB11.DBX0.2
REPOS DB11.DBX1.1
REF DB11.DBX1.2
TEACH IN DB11.DBX1.0
INC 1 ... 10 000, INC Var. DB11.DBX2.0 - DBX 2.5

Traversing keys and rapid traverse override

Source: MCP Aim: Geometry axis of the prog. channel (Parameter: ChanNo)
Traversing key + DB21, ... .DBX12.7
Traversing key - DB21, ... .DBX12.6
Rapid traverse override DB21, ... .DBX12.5
Traversing key + DB21, ... .DBX16.7
Traversing key - DB21, ... .DBX16.6
Rapid traverse override DB21, ... .DBX16.5
Traversing key + DB21, ... .DBX20.7
Traversing key - DB21, ... .DBX20.6
Rapid traverse override DB21, ... .DBX20.5

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1125
Basic PLC Program (P3)
Block descriptions

Source: MCP Aim: Prog. axes corresponding to the table in DB 10, DBB 8 - 13
(1st MCP) or DBB 32 - 37 (2nd MCP)
Traversing key + DB31, ... .DBX4.7
Traversing key - DB31, ... .DBX4.6
Rapid traverse override DB31, ... .DBX4.5

Override

Source: MCP Aim: Programmed channel (Parameter: ChanNo)


Feed override DB21, ... .DBB4

Source: MCP Aim: Prog. axes corresponding to the table in DB 10, DBB 8 - 13
(1st MCP) or DBB 32 - 37 (2nd MCP)
Feed override DB31, ... .DBB0

Channel signals

Source: MCP Aim: Programmed channel (Parameter: ChanNo)


NC start DB21, ... .DBX7.1
NC stop DB21, ... .DBX7.3
RESET DB21, ... .DBX7.7
Single BLock DB21, ... .DBX0.4

13.13.27.2 Overview of the NC/PLC interface signals of HT 8

Operating modes and machine functions

Destination: MCP Source: Interface-DB (Parameter BAGNo)


Display for BAG 1
AUTOMATIC DB11.DBX6.0
MDA DB11.DBX6.1
JOG DB11.DBX6.2
REPOS DB11.DBX7.1
REF DB11.DBX7.2
TEACH IN DB11.DBX7.0

Basic Functions
1126 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

13.13.28 FC 19, FC 24, FC 25, FC 26 source code description

Task
Machine control panel to application interface (FC 19 M variant, FC 24 slim variant, FC 25 T
variant, FC 26 HT8 variant)

Associated blocks
DB 7, no. of MOGs, channels, axes
DB 7, pointer of machine control panel
DB 8, storage for the next cycle

Resources used
None.

General
The blocks FC 19 (M version), FC 24 (slim-line version), FC 25 (T version) and FC 26 (HT8
version) transfer the signals of the machine control panel to and from the application
interface. In the input parameters, "ModeGroupNo" selects the mode group to be processed
by the block. The "ModeGroupNo" parameter also selects the number of the machine control
panel (Bit 4). "ChanNo" selects the channel to be processed.
Not FC 26:
The "SpindleIFNo" parameter defines the axis interface of the spindle. The spindle override
is transferred to this spindle interface. The parameters are checked for incorrect
parameterization.
Not FC 26:
Output parameters "FeedHold" and "SpindleHold" are generated from the 4 feed/spindle
disable and feed/spindle enable keys and are returned with "logical 1" for disable.
Information for the next cycle is stored in DB8, bytes 0 to 3 or bytes 62 to 65, depending on
the machine control panel number. This information is the edge trigger flag, feed value and
selected axis number. The blocks are provided with user data via the pointer parameters in
DB 7 "MCP1In" and "MCP1Out" ("MCP2In" and "MCP2Out"). The pointers are addressed
indirectly via a further pointer from the VAR section of DB7 in order to avoid absolute
addressing. This additional pointer is determined symbolically in FB1.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1127
Basic PLC Program (P3)
Block descriptions

Block description
All 4 components have a similar structure and are classified for the individual subtasks:
In the Input network, various parameters are copied to local variables. The machine control
signals (user data for input/output area) are also copied between locations using the various
pointers in DB 7 (gp_par). These local variables are handled in the block for reasons of
efficiency. Some values are initialized for the start-up.
MCS/WCS switchover with edge evaluation, axis selections, direction keys and rapid
traverse overlay is determined in the Global_IN network for further processing in the block
User-specific changes must take place in this part of the program, which are mainly oriented
at the axis selection.
Only the keyswitch information is copied in Network NC.
The mode group network transfers the modes of the keys as dynamic signals to the NCK.
The INC checkback signals from the NC are stored temporarily for the corresponding LEDs.
If the mode group number is 0, this network is not processed. A too large number generates
the message 401901 or 402501 and changes over after stop.
In the Channel network the NC Start, Stop, Reset and Single Block functions are activated
by corresponding checkback signals. The direction keys of the geometry axes are supplied if
a corresponding preselection is made, otherwise they are cleared. If the channel number is
0, this network is not processed. A too large number generates the message 401902 or
402502 and changes over after stop.
The Spindle network transfers the spindle override to the interface configured via
"SpindleIFNo".
The Network Axes transfers the feed override to the selected axis interface. The direction
keys are assigned to the selected axis/spindle. If an axis has been selected previously, the
direction information is set to 0.
The output parameters are prepared and the LED signals of the INC machine function are
generated in the Global_OUT network.
The Output network transfers the output signals of the machine control panel from the
VAR_TEMP image to the logical address. The data for the next cycle are also saved.

Basic Functions
1128 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Block descriptions

Axis selection extension


The Global_IN network must be modified if more than nine axes are selected. If other keys
and LEDs are to be used on the machine control panel here, proceed as follows:
1. The command UD DW#16#Value (comment: Clear all axis LEDs for display) deletes all
defined LEDs for axis selections. The bit mask is currently processing the nine axis
selection LEDs.
2. The command UW W#16# (comment: ”Masking all the axis selection buttons” ) checks
whether the direction has changed. The bit string must be adjusted here.
3. The branch destination list (SPL) must be expanded with new jump labels. The new jump
labels should be inserted in descending order before label m009. The selection
information should be extended for the new jump labels, as described for labels m009
and m008.

Note
The blocks are made available as STL sources if required. But they do not match the
current status of the block. Some details of the actual implementation in C have been
developed further. For this reason we recommend that you specify your additional
requirements for the blocks and that you pass these onto project management via the
sales department.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1129
Basic PLC Program (P3)
Signal/data descriptions

13.14 Signal/data descriptions

13.14.1 Interface signals NCK/PLC, HMI/PLC, MCP/PLC

References
The NCK/PLC, HMI/PLC and MCP/PLC interface signals are contained in the Lists
document.
Lists sl (Book 2)
The reference code contained therein (according to the signal names) refer to the respective
function description, in which the signal is described.
The NCK signals that are evaluated by the basic program and transferred in conditioned
form to the user interface are presented in the following sections.

13.14.2 Decoded M signals


The M functions programmed in the part program, ASUB or synchronized actions are
channel specifically transferred from the NC to the PLC:
● M functions from channel 1: DB 21
● M functions from channel 2: DB 22
● etc.
The signal length is one PLC cycle.

Note
The spindle-specific M functions below are not decoded: M3, M4, M5, and M70.

Address in DB 21, ... Variable Type Comment


DBX 194.0 ... 7 M_Fkt_M0 ... M7 BOOL M signals M0 ... M7
DBX 195.0 ... 7 M_Fkt_M8 ... M15 BOOL M signals M8 ... M15
DBX 196.0 ... 7 M_Fkt_M16 ... M23 BOOL M signals M16 ... M23
DBX 197.0 ... 7 M_Fkt_M24 ... M31 BOOL M signals M24 ... M31
DBX 198.0 ... 7 M_Fkt_M32 ... M39 BOOL M signals M32 ... M39
DBX 199.0 ... 7 M_Fkt_M40 ... M47 BOOL M signals M40 ... M47
DBX 200.0 ... 7 M_Fkt_M48 ... M55 BOOL M signals M48 ... M55
DBX 201.0 ... 7 M_Fkt_M56 ... M63 BOOL M signals M56 ... M63
DBX 202.0 ... 7 M_Fkt_M64 ... M71 BOOL M signals M64 ... M71
DBX 203.0 ... 7 M_Fkt_M72 ... M79 BOOL M signals M72 ... M79
DBX 204.0 ... 7 M_Fkt_M80 ... M87 BOOL M signals M80 ... M87

Basic Functions
1130 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Signal/data descriptions

Address in DB 21, ... Variable Type Comment


DBX 205.0 ... 7 M_Fkt_M88 ... M95 BOOL M signals M88 ... M95
DBX 206.0 ... 3 M_Fkt_M96 ... M99 BOOL M signals M96 ... M99

Note
The M02/M30 auxiliary function output to the PLC does not state that the part program has
been terminated. To determine definitely the end of a part program in the channel, the
following interface signal must be evaluated:
DB21, ... .DBX33.5 (M02/M30 active)
The channel status must be RESET. The auxiliary function output could arise from an
asynchronous subroutine (ASUB) or a synchronized action and has nothing to do with the
real end of the part program in this case.

13.14.3 G Functions
The M functions programmed in the part program, ASUB or synchronized actions are
channel specifically transferred from the NC to the PLC:
● G functions from channel 1: DB 21
● G functions from channel 2: DB 22
● etc.
The signal length is one PLC cycle.
POWER ON
After POWER ON, the value zero, i.e. active G groups undefined, is specified in the NC/PLC
interface for all G groups.
Part program end or abort
After part program end or abort, the last state of the G group is retained.
NC START
After NC-START the values of the 8 G-groups specified in the machine data:
MD22510 $NC_ GCODE_GROUPS_TO_PLC
are overwritten according to the default setting set via the machine data as well as the
values programmed in the part program.

Address in DB 21, ... Variables Type Basic position Comment


DBB 208 G_FKT_GR_1 BYTE 0 Active G function of group 1
DBB 209 G_FKT_GR_2 BYTE 0 Active G function of group 2
DBB 210 G_FKT_GR_3 BYTE 0 Active G function of group 3
DBB 211 G_FKT_GR_4 BYTE 0 Active G function of group 4
DBB 212 G_FKT_GR_5 BYTE 0 Active G function of group 5
DBB 213 G_FKT_GR_6 BYTE 0 Active G function of group 6
DBB 214 G_FKT_GR_7 BYTE 0 Active G function of group 7

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1131
Basic PLC Program (P3)
Signal/data descriptions

Address in DB 21, ... Variables Type Basic position Comment


DBB 215 G_FKT_GR_8 BYTE 0 Active G function of group 8
DBB 216 G_FKT_GR_9 BYTE 0 Active G function of group 9
DBB 217 G_FKT_GR_10 BYTE 0 Active G function of group 10
DBB 218 G_FKT_GR_11 BYTE 0 Active G function of group 11
DBB 219 G_FKT_GR_12 BYTE 0 Active G function of group 12
DBB 220 G_FKT_GR_13 BYTE 0 Active G function of group 13
DBB 221 G_FKT_GR_14 BYTE 0 Active G function of group 14
DBB 222 G_FKT_GR_15 BYTE 0 Active G function of group 15
DBB 223 G_FKT_GR_16 BYTE 0 Active G function of group 16
DBB 224 G_FKT_GR_17 BYTE 0 Active G function of group 17
DBB 225 G_FKT_GR_18 BYTE 0 Active G function of group 18
DBB 226 G_FKT_GR_19 BYTE 0 Active G function of group 19
DBB 227 G_FKT_GR_20 BYTE 0 Active G function of group 20
DBB 228 G_FKT_GR_21 BYTE 0 Active G function of group 21
DBB 229 G_FKT_GR_22 BYTE 0 Active G function of group 22
DBB 230 G_FKT_GR_23 BYTE 0 Active G function of group 23
DBB 231 G_FKT_GR_24 BYTE 0 Active G function of group 24
DBB 232 G_FKT_GR_25 BYTE 0 Active G function of group 25
DBB 233 G_FKT_GR_26 BYTE 0 Active G function of group 26
DBB 234 G_FKT_GR_27 BYTE 0 Active G function of group 27
DBB 235 G_FKT_GR_28 BYTE 0 Active G function of group 28
DBB 236 G_FKT_GR_29 BYTE 0 Active G function of group 29
DBB 237 G_FKT_GR_30 BYTE 0 Active G function of group 30
DBB 238 G_FKT_GR_31 BYTE 0 Active G function of group 31
DBB 239 G_FKT_GR_32 BYTE 0 Active G function of group 32
DBB 240 G_FKT_GR_33 BYTE 0 Active G function of group 33
DBB 241 G_FKT_GR_34 BYTE 0 Active G function of group 34
DBB 242 G_FKT_GR_35 BYTE 0 Active G function of group 35
DBB 243 G_FKT_GR_36 BYTE 0 Active G function of group 36
DBB 244 G_FKT_GR_37 BYTE 0 Active G function of group 37
DBB 245 G_FKT_GR_38 BYTE 0 Active G function of group 38
DBB 246 G_FKT_GR_39 BYTE 0 Active G function of group 39
... ... ... ... ...
DBB 271 G_FKT_GR_64 BYTE 0 Active G function of group 64

A complete listing of all the G functions is given in:


References:
Programming Manual Fundamentals; Chapter: "List of G-Functions/Preparatory functions"

Basic Functions
1132 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Signal/data descriptions

13.14.4 Message signals in DB 2


DB 2 allows the user to display the messages for individual signals on the operator panel. As
the lists of interface signals show, signals are divided into predefined groups. When a
message occurs, disappears or is acknowledged, the number entered in the message
number column is transferred to the HMI. Text can be stored in the HMI for each message
number.
References:
● Lists sl (Book 2), see Section "PLC-Messages (DB 2)".
● Startup Manual; Chapter "Alarm and message texts"

Note
The number of user areas can be parameterized via FB 1.
After the configuration has been modified (FB 1: MsgUser), DB 2/3 must be deleted.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1133
Basic PLC Program (P3)
Programming tips with STEP 7

13.15 Programming tips with STEP 7


Some useful tips on programming complex machining sequences in STEP7 are given below.
This is essentially handling of the data type POINTER or ANY.
Fundamental tips on the structure of the data type POINTER and ANY see:
References:
STEP 7 Manual; Chapter: "Designing user programs" > "Register of CPU and saving of data"

13.15.1 Copying data

Copying variants
For the high-speed copying of data from one DB into another it is recommended
● for larger data quantities to use the system function SFC BLKMOV or SFC FILL, because
here a high-speed copying takes place.
● the routine given below is for smaller data quantities, because the supply of ANY
parameter to the SFCs consumes additional time.

Example

Code Comment
// DB xx.[AR1] is the source
// DI yy.[AR2] is the destination
OPEN DB 100; //Source DB
LAR1 P#20.0; //Source start address on data byte 20
OPEN DI 101; //Destination DB
LAR2 P#50.0; //Destination start address on data byte 50
//AR1, AR2, DB, DI loaded beforehand
L 4; //Transfer 8 bytes
M001:
L DBW [AR1,P#0.0]; //Copy word-oriented
T DIW [AR2,P#0.0];
+AR1 P#2.0;
+AR2 P#2.0;
TAK;
LOOP M001;

Basic Functions
1134 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Programming tips with STEP 7

13.15.2 ANY and POINTER


The following programming examples show the programming mechanism. They demonstrate
how input/output and transit variables (VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT) are
accessed by data types "POINTER" or "ANY" within an FC or FB. The access operations are
described in such a way that a part symbolic method of programming can be used.

13.15.2.1 Use of POINTER and ANY in FC

Function
FC 99 has inputs parameters that are defined as POINTER or ANY.
The example shows a body program via which the subcomponents of the POINTER or ANY
can be accessed. In this case, the DB parameterized with POINTER or ANY is opened and
the address offset stored as a cross-area pointer in address register AR1, Thus allowing
access to data elements of variables (generally structures and arrays) that are addressed via
the POINTER, ANY.
This access operation is described at the end of the relevant program sequence in the
example. With data type ANY, it is also possible to execute a check or branch when the
variable is accessed based on the data type and the number of elements involved.

Example

Code Comment
FUNCTION FC 99: VOID
VAR_INPUT
Row: BYTE ;
Convert: BOOL ; //Activate numerical conversion
Addr: POINTER; //Points to variable
Addr1: ANY ;
END_VAR
VAR_TEMP
dbchr: WORD ;
Number: WORD ;
type: BYTE ;
END_VAR
BEGIN
NETWORK
TITLE =
//POINTER
L P##Addr;
LAR1 ; //Retrieve pointer
L W [AR1,P#0.0]; //Retrieve DB number
T #dbchr;

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1135
Basic PLC Program (P3)
Programming tips with STEP 7

Code Comment
L D [AR1,P#2.0]; //Offset part of pointer
LAR1 ;
AUF DB [#dbchr]; //Open DB of variables
L B [AR1,P#40.0]; //Retrieve byte value using pointer with
//address offset 40
//ANY
L P##Addr1;
LAR1 ; //Retrieve ANY
L B [AR1,P#1.0]; //Retrieve type
T #typ;
L W [AR1,P#2.0]; //Retrieve amount
T #Amount;
L W [AR1,P#4.0]; //Retrieve DB number
T #dbchr;
L D [AR1,P#6.0]; //Offset part of pointer
LAR1 ;
OPEN DB [#dbchr]; //Open DB of variables
L B [AR1,P#0.0]; //Retrieve byte value using ANY

13.15.2.2 Use of POINTER and ANY in FB

Function
FB 99 has inputs parameters that are defined as POINTER or ANY.
The example shows a body program via which the subcomponents of the POINTER or ANY
can be accessed. In this case, the DB parameterized with POINTER or ANY is opened and
the address offset stored as a cross-area pointer in address register AR1, thus allowing
access to data elements of variables (generally structures and arrays) that are addressed via
the POINTER, ANY.
This access operation is described at the end of the relevant program sequence in the
example. With data type ANY, it is also possible to execute a check or branch when the
variable is accessed based on the data type and the number of elements involved.

Example

Code Comment
FUNCTIONBLOCK FB 99
VAR_INPUT
Row: BYTE ;
Convert: BOOL ; //Activate numerical conversion
Addr: POINTER; //Points to variable
Addr1: ANY ;
END_VAR

Basic Functions
1136 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Programming tips with STEP 7

Code Comment
VAR_TEMP
dbchr: WORD ;
Number: WORD ;
type: BYTE ;
END_VAR
BEGIN
NETWORK
TITLE =
//POINTER
L P##Addr;
LAR1 ; //Retrieve pointer from instance DB
L DIW [AR1,P#0.0]; //Retrieve DB number
T #dbchr;
L DID [AR1,P#2.0]; //Offset part of pointer
LAR1 ;
OPEN DB [#dbchr]; //Open DB of variables
L B [AR1,P#40.0]; //Retrieve byte value using pointer with
//address offset 40
//ANY
L P##Addr1;
LAR1 ; //Retrieve ANY from instance DB
L DIB [AR1,P#1.0]; //Retrieve type
T #typ;
L DIW [AR1,P#2.0]; //Retrieve amount
T #Amount;
L DIW [AR1,P#4.0]; //Retrieve DB number
T #dbchr;
L DID [AR1,P#6.0]; //Offset part of pointer
LAR1 ;
OPEN DB [#dbchr]; //Open DB of variables
L B [AR1,P#0.0]; //Retrieve byte value using ANY

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1137
Basic PLC Program (P3)
Programming tips with STEP 7

13.15.2.3 POINTER or ANY variable for transfer to FC or FB

POINTER or ANY variable


With version 1 or later of STEP 7 it is possible to define a pointer or ANY in VAR_TEMP.
The following two examples show how an ANY can be supplied.

Example 1: Transfer ANY parameter via a selection list to another FB (FC)


Several ANY parameters are defined in an FB (FC). A specific ANY parameter must now be
chosen from a selection list for transfer to another FB (FC). This can only be done by means
of an ANY in VAR_TEMP. 1 to 4 can be set in parameter "WhichAny" in order to select
Addr1 to Addr4.

Note
Address register AR2 is used in the block. However, this address register AR2 is also used
for multi-instance DBs. For this reason, this FB should not be declared as multi-instance DB.

Code Comment
FUNCTIONBLOCK FB 100
CODE_VERSION1 //starting from STEP 7 Version 2 for deactivating the
//multi-instance DB
VAR_INPUT
WhichAny : INT ;
Addr1 : ANY ; //Observe predetermined order
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Number: WORD ;
type : BYTE ;
Temp_addr : ANY ;
END_VAR
BEGIN
NETWORK
TITLE =
L WhichAny;
DEC 1;
L P#10.0; //10 bytes per ANY
*I;

Basic Functions
1138 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Programming tips with STEP 7

Code Comment
LAR2;
L P##Addr1;
+AR2; //Add ANY start addresses
L P##Temp_addr;
LAR1 ; //Retrieve pointer from VAR_TEMP
L DID [AR2,P#0.0]; //Transfer pointer value to VAR_TEM
T LD [AR1,P#0.0];
L DID [AR2,P#4.0];
T LD [AR1,P#4.0];
L DIW [AR2,P#8.0];
T LW [AR1,P#8.0];

CALL FB 101, DB 100


(ANYPAR := #Temp_addr); //ANYPAR is data type ANY

Example 2: Transfer an ANY parameter constructed earlier to another FB (FC)


An ANY parameter that has already been compiled must be transferred to another FB (FC).
This can be done only by means of an ANY stored in VAR_TEMP.

Code Comment
FUNCTIONBLOCK FB 100
VAR_INPUT
DBNumber: INT ;
DBOffset : INT ;
Data type: INT ;
Number: INT ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Temp_addr : ANY ;
END_VAR
BEGIN
NETWORK
TITLE =
L P##Temp_addr;
LAR1 ; //Retrieve pointer from VAR_TEMP
L B#16#10; //ANY identifier
T LB [AR1,P#0.0];
L Data type;
T LB [AR1,P#1.0];
L Amount;
T LW [AR1,P#2.0];
L DBNumber;

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1139
Basic PLC Program (P3)
Programming tips with STEP 7

Code Comment
T LW [AR1,P#4.0];
L DBOffset;
SLD 3; //Offset is a bit offset
T LD [AR1,P#6.0];
CALL FB 101, DB 100
(ANYPAR := #Temp_addr); //ANYPAR is data type ANY

13.15.3 Multi-instance DB

Function
From Version 2 in STEP 7, you can provide multi-instance enabled FBs, i.e. with multi-
instance DBs. The primary characteristic of multi-instance DBs is that a data module can be
used for various instances of FBs (see STEP 7 documentation), The quantity structure of the
DBs can be optimized this way.
Multi-instance DBs should be activated only when they are actually going to be used since
they increase the runtime and code size of the FBs.

Note
When complex programs are implemented in multi-instance enabled FBs that use a pointer
and address register, it is important for the programmer to observe certain rules.
With multi-instance DBs, the start address of the variable (VAR_INPUT, VAR_OUTPUT,
VAR_IN_OUT, VAR) is transferred with the DI data block register and address register AR2.
When variables are accessed within the multi-instance enabled FB, the compiler
independently controls the access operation via address register AR2. However, when
complex program sections also have to work with address registers in the same FB (e.g. to
copy data), then the old contents of AR2 must be saved before the register is changed. The
contents of AR2 must be restored to their original state before an instance variable
(VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR) is accessed. The AR2 register of the
instance is to be saved most usefully in a local variable (VAR_TEMP).
The command "Load pointer to an instance variable" returns a pointer value from the start of
the instance data. To be able to access this variable via a pointer, the offset stored in AR2
must be added.

Basic Functions
1140 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Programming tips with STEP 7

Example

Code Comment
FUNCTION_BLOCK FB 99
VAR_INPUT
varin: INT ;
END_VAR
VAR
variable1: ARRAY[[0..9] of INT;
variable2: INT ;
END_VAR
BEGIN
L P##variable1; //Pointer at start of ARRAY
//The value 8500 0010 is now in the accumulator
//and a cross-area pointer is in the AR2
//Pointer. If one is to work across areas
//then, during the addition of these
//two pointers, an area is to be disabled.
AD DW#16#00FF_FFFF, //Skipping of an area
LAR1 //Load into AR1
TAR2;
+AR1 AR2; //AR2 instance offset to be added
//You can now indirectly access the ARRAY
//of variable 1 via AR1.
L DIW [AR1, P#0.0]; //E.g. access to the first element
END_FUNCTION_BLOCK

13.15.4 Strings
The STRING data type is required by certain services of the basic program. For this reason,
some additional facts about the string structure and general handling procedures for
parameter assignments are given below.

Structure of strings
A data of type STRING is generally stored (defined) in a data block. There are two methods
of defining a string:
1. Only the data type STRING is assigned to a variable. The STEP7 compiler automatically
generates a length of 254 characters.
2. Data type STRING is assigned to a variable together with a string length in square
parenthesis (e.g. [32]). With this method, the STEP7 compiler generates a string length
corresponding to the input.
Two bytes more than prescribed by the definition are always stored for variables of the
STRING data type. The STEP 7 compiler stores the maximum possible number of
characters in the 1st byte. The 2nd byte contains the number of characters actually used.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1141
Basic PLC Program (P3)
Programming tips with STEP 7

Normally, the useful length of the assigned strings is stored by the STEP 7 compiler.
The characters (1 byte per character) are then stored from the 3rd byte onwards.
String parameters are generally assigned to blocks of the basic program by means of a
POINTER or ANY. Such assignments must generally by made using symbolic programming
methods. The data block, which contains the parameterizing string, must be stored in the
symbol list. The assignment to the basic program block is then made by means of the
symbolic data block name followed by a full stop and the symbolic name of the string
variable.

13.15.5 Determining offset addresses for data block structures

Function
Another task, which occurs frequently, is symbolic determination of an offset address within
a structured DB, e.g. an ARRAY or STRUCTURE is stored somewhere within the DB. After
loading the address register symbolically with the start address, you might like to access the
individual elements of the ARRAY or STRUCTURE via an address register. One way of
loading the address register symbolically is to use an FC whose input parameter is a pointer.
The address of the ARRAY or STRUCTURE is then assigned symbolically to the input
parameter of this FC in the program. The program code in the FC now determines the offset
address from the input parameter, and passes the offset address in the address register
(AR1) to the calling function. Symbolic addressing is thus possible even with indirect access.

Example

Code Comment
FUNCTION FC 99: VOID
VAR_INPUT
Addr: POINTER; //Points to variable
END_VAR
BEGIN
NETWORK
TITLE =
L P##Addr;
LAR1 ; //Retrieve pointer from Addr
L D [AR1,P#2.0]; //Offset part of pointer of variable
LAR1 ;
END_FUNCTION

Basic Functions
1142 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Programming tips with STEP 7

13.15.6 FB calls

Function
For optimizing the flow speeds, it is useful to call all function block calls with many static
parameters, such as the blocks FB 2, 3, 4, 5, and 7 provided by the basic program in start-up
with the related instance parameters. In the start-up (OB 100), the preassignment of the
parameters must be done, which can then no longer be changed in the cyclic part (OB 1).
These fixed parameter values are no longer parameterized in the cyclic call, because they
have already been written in the Instance DB.

Example: Parameterization of FB 2 with instance DB 110


The following example shows how a useful distribution in OB 100 and OB 1 portion is to be
implemented.
First, the usual call in the cyclic program is displayed.

CALL FB 2, DB 110 (
Req := M 100.0,
NumVar := 2, //Read 2 variables
Addr1 := NCVAR.C1_RP_rpa0_0
Line1 : W#16#1
Addr2 := NCVAR.C1_RP_rpa0_0
Line2 . W#16#2
Error := M1.0,
NDR := M1.1,
State := MW 2,
RD1 := P#M 4.0 REAL 1,
RD2 := P#M 24.0 REAL 1,

The modified version of the program call starts from here.


Here the call in OB 100 is displayed:

CALL FB 2, DB 110 (
Req := FALSE,
NumVar := 2, //Read 2 variables
Addr1 := NCVAR.C1_RP_rpa0_0
Line1 : W#16#1
Addr2 := NCVAR.C1_RP_rpa0_0
Line2 . W#16#2
RD1 := P#M 4.0 REAL 1,
RD2 := P#M 24.0 REAL 1,

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1143
Basic PLC Program (P3)
Programming tips with STEP 7

Here the call still remaining in OB 1 is displayed:

CALL FB 2, DB 110 (
Req := M0.0,
Error := M1.0,
NDR := M1.1,
State := MW 2,

Note
Owing to this measure, a shorter cycle time is achieved in OB 1, because the static
parameter values need not be copied in the instance DB in each OB-1 cycle.

The savings of this variant:


The cyclic copying effort of 3 integer values and 4 ANY parameters with respect to the
instance DB, which results from 3 time loading of a constant in the instance data block. In
case of each ANY transfer, constants are loaded in the data block 4 times with subsequent
transfer.

Basic Functions
1144 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Basic PLC Program (P3)
Data lists

13.16 Data lists

13.16.1 Machine data

13.16.1.1 NC-specific machine data

Number Identifier: $MN_ Description


10100 PLC_CYCLIC_TIMEOUT Cyclic PLC monitoring time
14504 MAXNUM_USER_DATA_INT Number of user data (INT)
14506 MAXNUM_USER_DATA_HEX Number of user data (HEX)
14508 MAXNUM_USER_DATA_FLOAT Number of user data (FLOAT)
14510 USER_DATA_INT User data (INT)
14512 USER_DATA_HEX User data (HEX)
14514 USER_DATA_FLOAT[n] User data (FLOAT)

Note
Machine data in integer/hex format is operated in the NC as DWORD. A machine data in
floating point format is managed in the NC as FLOAT (8-Byte IEEE) They are stored only in
the NC/PLC interface and can be read by the PLC user program from DB 20 even during
PLC booting.

13.16.1.2 Channel-specific machine data

Number Identifier: $MC_ Description


28150 MM_NUM_VDIVAR_ELEMENTS Number of elements for writing PLC variables

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1145
Basic PLC Program (P3)
Data lists

Basic Functions
1146 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1) 14
14.1 Brief description

Function
The "Reference Point Approach" function is used to synchronize the measuring system of a
machine axis with machine zero. The machine axis is traversed to machine zero and the
measuring system set to zero.
If it is not possible to approach machine zero directly, a reference point within the traversing
range of the machine axis is used whose position with reference to machine zero precisely
known.
After the reference point approach, the measuring system of the machine axis is not set to
zero but to the corresponding reference point value.

Measuring systems and referencing methods


The "Reference point approach" function enables machine axes to be referenced using the
following measuring systems and referencing methods:
● Measuring systems
– Incremental rotary measuring system with at least one zero mark
– Incremental linear measuring system
– Rotary measuring system with distance-coded reference marks (supplied by
Heidenhain)
– Linear measuring system with distance-coded reference marks (supplied by
Heidenhain)
– Absolute rotary measuring system
– Absolute linear measuring system
● Referencing methods
– Referencing with incremental measuring systems with BERO and one-edge and two-
edge detection
– Referencing with incremental measuring systems with replacement of homing cam
with BERO
– Referencing with incremental measuring systems with BERO with configured
approach velocity for spindle applications
– Referencing with measuring systems with distance-coded reference marks by
overtravelling 2 or 4 zero marks
– Referencing of passive measuring systems using measuring system adjustment
– Referencing in follow-up mode
– Referencing with cam switch at the drive

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1147
Reference Point Approach (R1)
Brief description

Start
The reference point approach of a machine axis can be started manually or via the part
program:
● Manual: Operation mode JOG and MDA, machine function REF
● Part program: Part program command G74

Basic Functions
1148 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Axis-specific referencing

14.2 Axis-specific referencing


In axis-specific reference point approach, reference point approach must be initiated
individually for each machine axis that is to be referenced.

Selecting mode and machine function


Before starting reference point approach of the machine axes, you must first place the
relevant mode group in JOG or MDA mode:
DB11, ... DBX0.2 (active JOG mode)
DB11, ... DBX0.1 (active JOG mode)
Then machine function REF (reference point approach) must be selected:
DB11, ... DBX1.2 (REF machine function)

Start of reference point approach


In axis-specific reference point approach, each machine axis must be started individually.
Reference point approach is started with the axis-specific traversing keys:
DB31, ... DBX4.6 (Traversing key minus)
DB31, ... DBX4.7 (Traversing key minus)

Direction enable
To avoid faulty operation, the direction release must be parameterized:
MD34010 $MA_REFP_CAM_DIR_IS_MINUS (approach reference point in minus direction)
The direction enable specifies which traversing key starts the reference point approach:

Value Description
0 Reference point approach in plus direction
1 Reference point approach in minus direction

Jog mode
The following machine data element can be used to specify whether reference point
approach is completed when the direction key is pressed once or whether the operator is
required to keep the direction key pressed (jogging) for safety reasons:
MD11300 $MN_JOG_INC_MODE_LEVELTRIGGRD (INC and REF in jog mode)
If the machine operator releases the direction key, the machine axis is decelerated to zero
speed. Reference point approach is not aborted. Reference point approach is continued the
next time the direction key is pressed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1149
Reference Point Approach (R1)
Axis-specific referencing

Referencing status
The referencing status of the machine axis is reset with the start of the reference point
approach:
DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)
DB21, ... DBX36.2 (all axes with obligatory reference point are referenced)

Distance-coded measuring systems


In distance-coded measuring systems, reference point approach can be started with any
traversing key.

Sequence
The machine operator or machine manufacturer (via the PLC user program) is responsible
for ensuring that the machine axes are referenced in the proper order.
● Machine operator
The machine axes must be started by the machine operator in the specified order.
● Machine manufacturer
The PLC user program of the machine manufacturer allows machine axes to be started
only in the proper order.

Simultaneous reference point approach of several machine axes


Several machine axes can be referenced simultaneously, depending on the control:

SINUMERIK 840D: max. 8 machine axes

Completion of reference point approach


Acknowledgment that reference point approach of a machine axis has been successfully
completed is given by setting the referencing status:
DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

Cancellation of reference point approach


In axis-specific reference point approach, the machine axis is traversed in the channel that
was assigned as the master channel of the machine axis.
MD30550 $MA_ AXCONF_ASSIGN_MASTER_CHAN

Basic Functions
1150 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Axis-specific referencing

For aborting the reference point approach, either mode group reset or channel reset for the
master channel of the machine axis must be activated:
DB11, ... DBX0.7 (mode group reset)
DB21, ... DBX7.7 (channel reset)
All machine axes that have not yet successfully completed reference point approach when
the action is cancelled remain in status "Not referenced":
DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1151
Reference Point Approach (R1)
Channel-specific referencing

14.3 Channel-specific referencing


In channel-specific reference point approach, all machine axes of the channel are referenced
in the parameterized sequence when reference point appraoch is initiated.

Selecting mode and machine function


Before starting reference point approach of the machine axes, you must first set the mode
group to JOG or MDA mode:
DB11, ... DBX0.2 (active JOG mode)
DB11, ... DBX0.1 (active MDA mode)
Then machine function REF (reference point approach) must be selected:
DB11, ... DBX1.2 (REF machine function)

Parameterizing the axis sequence


The following machine data element is used to specify the sequence in which the machine
axes of the channel are referenced:
MD34110 $MA_REFP_CYCLE_NR = Number

Number Description
-1 The machine axis does not have to be referenced for NC START in the channel.
0 The machine axis does not participate in channel-specific reference point approach.
1 - 15 Sequence number in channel-specific reference point approach.

The machine axes are referenced in ascending order of numbers.


Machine axes with the same number will be referenced simultaneously.

Simultaneous reference point approach of several machine axes


Several machine axes can be referenced simultaneously, depending on the control:

SINUMERIK 840D: Max. 8 machine axes


SINUMERIK 810D: Max. 5 machine axes

Start of reference point approach


Channel-specific reference point approach is started with:
DB21, ... DBX1.0 (activate referencing)
The status of channel-specific reference point approach is indicated by the channel with:
DB21, ... DBX33.0 (activate referencing)

Basic Functions
1152 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Channel-specific referencing

Referencing status
The referencing status of the machine axis is reset with the start of the reference point
approach:
DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

Completion of reference point approach


As soon as channel-specific reference approach has been successfully completed for all
machine axes involved, this is acknowleged with:
DB21, ... DBX36.2 (all axes with obligatory reference point are referenced)

Cancellation of reference point approach


In channel-specific reference point approach the machine axis is traversed in the channel to
which that axis is currently assigned as channel axis.
For aborting the reference point approach either mode group reset or channel reset for the
corresponding channel must be activated:
DB11, ... DBX0.7 (mode group reset)
DB21, ... DBX7.7 (channel reset)
All machine axes for which the reference point approach is not yet successfully completed
when the action is cancelled remain in status "Not referenced":
DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1153
Reference Point Approach (R1)
Reference point appraoch from part program (G74)

14.4 Reference point appraoch from part program (G74)


Referencing of machine axes can be activated for the first time or repeated from the part
program
Referencing must be repeated, for example, after:
● converting the actual value of the machine axis: PRESETON function
● Machine axis is parked:
DB31, ... DBX1.5 (position measuring system 1) = 0
DB31, ... DBX1.6 (position measuring system 2) = 0
● DB31, ... DBX2.1 (servo enable) = 0
● Exceeding the encoder limit frequency of the position measuring system

Programming
Syntax
G74Machine axis { Machine axis }
Function
Machine axes can be referenced from a part program with part program instruction G74
Parameter: Machine axes
The name of the machine axis must be specified. The machine axis must be a channel axis
of the channel in which the part program is processed.
Effective:
G74 is non-modal.
Special features
G74 must be programmed in a separate part program block.

Reset response
Mode group reset or channel reset aborts the reference point approach for all programmed
machine axes:
DB11, ... DBX0.7 (mode group reset)
DB21, ... DBX7.7 (channel reset)
All machine axes for which the reference point approach is not yet successfully completed
when the action is cancelled remain in status "Not referenced":
DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

Basic Functions
1154 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

14.5 Referencing with incremental measurement systems

14.5.1 Zero mark selection with BERO

Function
Referencing of incremental measuring systems is based on the unique position of the
encoder zero mark relative to the overall traversing range of the machine axis. If several
encoder zero marks are detected in the traversing range of the machine axis due to
machine-specific factors, e.g. reduction gear between encoder and load, a BERO must be
mounted on the machine and connected to the relevant drive module (SIMODRIVE 611D)
via a BERO input in order to uniquely specify the reference point. The position of the
reference point is then derived from the combination of BERO signal and encoder zero mark.

%(52 

/RDG 
'ULYH  0RWRU  *HDU 
6SLQGOH


0HDVXULQJV\VWHP 
3RVLWLRQ

=HURPDUN 

Figure 14-1 Zero mark selection with BERO

Zero mark evaluation with BERO must be parameterized as the referencing mode:
MD34200 $MA_ENC_REFP_MODE = 5
Negative edge evaluation
In the case of a referencing operation with a negative edge evaluation of the BERO signal:
MD34120 $MA_REFP_BERO_LOW_ACTIVE = FALSE
synchronization is with the next encoder zero mark encountered after the BERO is exited.
Positive edge evaluation
In the case of a referencing operation with a positive edge evaluation of the BERO signal:
MD34120 $MA_REFP_BERO_LOW_ACTIVE = TRUE
synchronization is with the next encoder zero mark encountered after the BERO is
approached.
If, mechanically, the BERO is sized in such a way that the positive BERO signal covers the
entire width of the encoder zero mark, the encoder zero mark will be reliably detected in both
traversing directions.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1155
Reference Point Approach (R1)
Referencing with incremental measurement systems

14.5.2 Chronological sequence


Reference point approach with incremental measuring systems can be divided into three
phases:
● Phase 1: Traversing to the reference cam
● Phase 2: Synchronization with the zero mark of the position measuring system (encoder
zero mark)
● Phase 3: Traversing to the reference point

'%'%; GHFHOHUDWLRQRIUHIHUHQFHSRLQWDSSURDFK

'%'%; 0RWLRQFRPPDQGSOXV

'%'%; 0RWLRQFRPPDQGPLQXV

'%'%;DQG WUDYHUVLQJNH\SOXVPLQXV

'%'%;DQG UHIHUHQFHGV\QFKURQL]HG

=HURPDUNSRVLWLRQPHDVXULQJV\VWHP
9HORFLW\
0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B326
5HIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
5HIHUHQFHSRLQWFUHHSYHORFLW\
W

3KDVH 3KDVH 3KDVH

Figure 14-2 Time sequence when referencing with incremental measuring systems (example)

Basic Functions
1156 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

14.5.3 Phase 1: Traversing to the reference cam

Phase 1: Graphic representation

'%'%; GHFHOHUDWLRQRIUHIHUHQFHSRLQWDSSURDFK

'%'%; 0RWLRQFRPPDQGSOXV

'%'%; 0RWLRQFRPPDQGPLQXV

'%'%;DQG WUDYHUVLQJNH\SOXVPLQXV

'%'%;DQG UHIHUHQFHGV\QFKURQL]HG

=HURPDUNSRVLWLRQPHDVXULQJV\VWHP

9HORFLW\

0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
5HIHUHQFHSRLQWFUHHSYHORFLW\
0'0$B5()3B9(/2B326
5HIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\

3KDVH W

Figure 14-3 Phase 1: Traversing to the reference cam

Phase 1: Start
For information on starting reference point approach, refer to "Axis-specific referencing" and
"Channel-specific referencing."

Phase 1: Sequence
In phase 1, depending on the position of the machine axis with reference to the homing cam,
we distinguish between three cases:
1. The machine axis is positioned before the reference cam
2. The machine axis is positioned on the reference cam
3. The machine axis has no reference cam

Case 1: The machine axis is positioned before the reference cam


After the start of reference point approach, the machine axis is accelerated in the
parameterized direction and to the parameterized reference point approach velocity:
MD34010 $MA_REFP_CAM_DIR_IS_MINUS (Reference point approach in minus direction)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1157
Reference Point Approach (R1)
Referencing with incremental measurement systems

MD34020 $MA_REFP_VELO_SEARCH_CAM (Reference point approach velocity)


The PLC user program communicates to the NC that the reference cam has been reached
via the following interface signal:
DB31, ... DBX12.7 (reference point approach deceleration)
As a result the NC decelerates to zero speed. The following distance smin is still minimally
back tracked:

0'0$B5()3B9(/2B6($5&+B0$5.(5 
60,1
 0'0$B0$;B$;B$&&(/

This minimum distance is required to ensure that the machine axis exits the reference cam in
Phase 2 at the parameterized reference point creep velocity.
Phase 1 is now complete. Reference point approach is continued with Phase 2.

0'0$B5()3B0$;B&$0B',67
0D[LPXPGLVWDQFHWRUHIHUHQFHFDP
9HORFLW\

0LQLPXPGLVWDQFH

0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFKYHORFLW\

 'LVWDQFH

6WDUWLQJSRVLWLRQ =HURPDUN 5HIHUHQFHSRLQWFDP


RID[LV

Figure 14-4 Minimum distance for deceleration

Case 2: The machine axis is positioned on the reference cam


The machine axis remains at its starting position.
Phase 1 is now complete. Reference point approach is continued with Phase 2.
Case 3: The machine axis has no reference cam
Machine axes without reference point cams remain at their starting position.
These include, for example:
● Machine axes that only have one zero mark along their entire traversing range
● Rotary axes that only have one zero mark per revolution

Basic Functions
1158 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

Zero must be entered in the following machine data for machine axes without a reference
point cam:
MD34000 $MA_REFP_CAM_IS_ACTIVE (Axis with reference cam) = 0
Phase 1 is now complete. Reference point approach is continued with Phase 2.

Phase 1: Features
● Feed override active.
● Feed stop (channel-specific and axis-specific) is active.
● NC-STOP and NC-START are active.
● The machine axis is stopped if the reference cam does not arrive within the
parameterized distance:
MD34030 $MA_REFP_MAX_CAM_DIST (max. distance to reference cam)
DB31, ... DBX12.7 (reference point approach delay) = 1

14.5.4 Phase 2: Synchronization with the zero mark

Phase 2: Graphic representation

'%'%; GHFHOHUDWLRQRIUHIHUHQFHSRLQW
DSSURDFK

'%'%; 0RWLRQFRPPDQGSOXV

'%'%; 0RWLRQFRPPDQGPLQXV

'%'%;DQG WUDYHUVLQJNH\SOXVPLQXV

'%'%;DQG UHIHUHQFHGV\QFKURQL]HG

=HURPDUNSRVLWLRQPHDVXULQJV\VWHP
9HORFLW\
0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B326
5HIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
5HIHUHQFHSRLQWFUHHSYHORFLW\

3KDVH

Figure 14-5 Phase 2: Synchronization with the zero mark

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1159
Reference Point Approach (R1)
Referencing with incremental measurement systems

Phase 2: Start
Phase 2 is automatically started when phase 1 has been completed without an alarm.
Initial situation:
The machine axis is positioned on the reference cam.
Zero mark search direction:
The zero mark is searched for in the parameterized direction and approached:
MD34050 $MA_REFP_SEARCH_MARKER_REVERSE (direction reversal on reference cam)

Phase 2: Sequence
Synchronization in Phase 2 can occur in two ways:
● Synchronization with falling reference cam signal edge
● Synchronization with rising reference cam signal edge
The type of synchronization is determined with the machine data:
MD34050 $MA_REFP_SEARCH_MARKER_REVERSE (direction reversal on reference cam)

Value Meaning
0 Synchronization with falling reference cam signal edge
1 Synchronization with rising reference cam signal edge

Note
If the actual velocity of the machine axis at appraoch of the reference cam has not yet
reached the target velocity of Phase 2 within the parameterized tolerence limits, Phase 1 will
be re-started:
MD35150 $MA_SPIND_DES_VELO_TOL (spindle speed tolerance)
This will be the case, for example, if the machine axes are positioned at the reference cam
when reference point approach starts.

Case 1: Synchronization with falling reference cam signal edge


During synchronization with falling reference cam signal edge, the machine axis accelerates
to the parameterized reference point creep velocity against the parameterized reference
point approach direction (traversing direction of Phase 1):
MD34040 $MA_REFP_VELO_SEARCH_MARKER (reference point creep velocity)
MD34010 $MA_REFP_CAM_DIR_IS_MINUS (Reference point approach in minus direction)
After the reference cam is exited (DB31, ... DBX12.7 = 0), the next encoder zero mark is
awaited.

Basic Functions
1160 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

As soon as the encoder zero mark is detected, Phase 2 comes to an end. The machine axis
continues at constant velocity and reference point approach is continued with phase 3.

9HORFLW\
0'0$B5()3B0$;B0$5.(5B',67
0D['LVWDQFHWRUHIHUHQFHPDUN

0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFKYHORFLW\

0'0$B5()3B9(/2B6($5&+B0$5.(5
5HIHUHQFHSRLQWFUHHSYHORFLW\

'LVWDQFH
6WDUWLQJSRVLWLRQ 5HIHUHQFH
=HUR SRLQWFDP
RID[LV
0DUN
'HFHOHUDWLRQ
5HIHUHQFHSRLQW
DSSURDFK

Figure 14-6 Synchronization with falling reference cam signal edge

Case 2: Synchronization with rising reference cam edge


During synchronization with rising reference cam signal edge, the machine axis accelerates
to the parameterized reference point approach velocity against the parameterized reference
point approach direction (traversing direction of the phase 1):
MD34020 $MA_REFP_VELO_SEARCH_CAM (Reference point approach velocity)
MD34010 $MA_REFP_CAM_DIR_IS_MINUS (Reference point approach in minus direction)
After the reference cam is exited (DB31, ... DBX12.7 = 0), the machine axis is decelerated to
stillstand.
The machine axis then travels back to the reference cam at the parameterized reference
point creep velocity:
MD34040 $MA_REFP_VELO_SEARCH_MARKER (reference point creep velocity)
After the reference cam is reached (DB31, ... DBX12.7 = 1), the next encoder zero mark is
awaited.
As soon as the encoder zero mark is detected, Phase 2 comes to an end. The machine axis
continues at constant velocity and reference point approach is continued with phase 3.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1161
Reference Point Approach (R1)
Referencing with incremental measurement systems

9HORFLW\ 0'0$B5()3B0$;B0$5.(5B',67
0D[GLVWDQFHWRUHIHUHQFHPDUN

0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFKYHORFLW\

0'0$B5()3B9(/2B6($5&+B0$5.(5
5HIHUHQFHSRLQWFUHHSYHORFLW\

'LVWDQFH
'(/$<
6WDUWLQJSRVLWLRQ RIUHIHUHQFHSRLQW
RID[LV =HUR
DSSURDFK
0DUN

Figure 14-7 Synchronization with rising reference cam signal edge

Electronic reference cam offset


Electronic reference cam offset is used for compensating reference cam length increases
caused by temperature:
MD34092 $MA_ REFP_CAM_SHIFT (electronic reference cam offset for incremental
measuring systems with equidistant zero marks)
After a rising or falling reference cam edge is detected the axis is synchronized for the next
encoder zero mark only after the cyclically calculated offset path has been covered.
Because the offset path sshift is calculated by the NC in IPO cycles, the following minimum
and maximum offset paths sshift_min and sshift_max will result:

sshift_min = MD34092 $MA_ REFP_CAM_SHIFT

sshift_max = MD34092 $MA_ REFP_CAM_SHIFT +


MD34040 $MA_REFP_VELO_SEARCH_MARKER * interpolation cycle

The reference cam offset acts in the direction of zero mark search.
Prerequisite
The reference cam offset is only active for machine axes for which a reference cam has
been parameterized:
MD34000 $MA_REFP_CAM_IS_ACTIVE = 1

Basic Functions
1162 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

7KHUPDOH[SDQVLRQ

&DPVLJQDO

=HURPDUNVHDUFK

=HURPDUN

 
&DPVLJQDOZLWK
RIIVHW

0'0$B5()3B&$0B6+,)7

Figure 14-8 Electronic reference cam offset

Reference cam adjustment


Encoder with equidistant zero marks
Always ensure that the reference cam of encoders that supply zero marks at equidistances
is accurately adjusted so that the correct zero mark is always detected during reference point
approach.
Dynamic response
The following factors influence the dynamic response from the arrival of the reference cam to
the machine up to the detection of reference cam signals transferred from the PLC user
program to the NC:
● Switching accuracy of the reference cam switch
● Delay of the reference cam switch (NC contact)
● Delay at the PLC input
● PLC cycle time
● Cycle time for updating the VDI interface
● Interpolation cycle
● Position control cycle

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1163
Reference Point Approach (R1)
Referencing with incremental measurement systems

Setting notes
● reference cam
Aligning the signal edge of the reference cam directly between two zero marks has
proven to be the most practical method.
● Electronic reference cam offset
Information needed for parameterizing the electronic reference cam offset is to be found
in the read-only machine data:
MD34093 $MA_REFP_CAM_MARKER_DIST (distance between reference cam/reference
mark)
The indicated value is equivalent to the distance between departure from the reference
cam and detection of the reference mark. If the values are too small, there is a risk that
the determination of the reference point will be non-deterministic, due to temperature
effects or fluctuations in the operating time of the cam signal.

WARNING
If the reference cam adjustment is faulty or inaccurate, an incorrect zero mark can be
evaluated. The control then calculates an incorrect machine zero. As a result, the
machine axis will approach the wrong positions. Software limit switches, protected areas
and working area limitations act on incorrect positions and are therefore incapable of
protecting the machine. The path difference is +/- of the path covered by the machine
axis between 2 zero marks.

Phase 2: Features
● Feedrate override is not active.
Internal motion with feedrate override = 100%.
If a feedrate override of 0% is specified, motion is aborted.
● Feed stop (channel-specific and axis-specific) is active.
● NC-STOP and NC-START are not active.
● If the machine axis does not arrive at Phase 2 within the parameterized distance of the
reference mark (encoder zero mark), the machine axis will be stopped:
MD34060 $MA_REFP_MAX_MARKER_DIST (max. distance to the reference mark)

Basic Functions
1164 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

14.5.5 Phase 3: Traversing to the reference point

Phase 3: Graphic representation

'%'%; UHIHUHQFHSRLQWDSSURDFKGHFHOHUDWLRQ

'%'%; 0RWLRQFRPPDQGSOXV

'%'%; 0RWLRQFRPPDQGPLQXV

'%'%;DQG WUDYHUVLQJNH\SOXVPLQXV

'%'%;DQG UHIHUHQFHGV\QFKURQL]HG

=HURPDUNSRVLWLRQPHDVXULQJV\VWHP

9HORFLW\
0'0$B5()3B9(/2B6($5&+B&$0
5()(5(1&(32,17$3352$&+9(/2&,7<

0'0$B5()3B9(/2B326
5()(5(1&(32,17326,7,219(/2&,7<

0'0$B5()3B9(/2B6($5&+B0$5.(5
5()(5(1&(32,17&5((39(/2&,7<

3KDVH

Figure 14-9 Phase 3: Traversing to the reference point

Phase 3: Start
At the end of phase 2 the machine axis travels at reference point creep velocity. Therefore,
as soon as phase 2 is completed successfully without an alarm, phase 3 is started without
interruption.

Initial situation
The encoder zero mark has been detected.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1165
Reference Point Approach (R1)
Referencing with incremental measurement systems

Phase 3: Sequence
The machine axis moves at the assigned reference point positioning velocity:
MD34070 $MA_REFP_VELO_POS (reference point positioning velocity)
from the encoder zero mark detected in Phase 2 to the reference point.
The path sref to be covered is calculated from the sum of the reference point distance plus
reference point offset:
MD34080 $MA_REFP_MOVE_DIST (reference point distance)
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point offset)

Velocity

MD34100 $MA_REFP_SET_POS [0/1/2 OR 3]

MD34080 $MA_REFP_MOV_DIST +
MD34090 $MA_REFP_MOVE_DIST_CORR

MD34020 $MA_ REFP_VELO_SEARCH_CAM


(Reference point approach velocity)
MD34070 $MA_REFP_VELO_POS
(Reference point positioning velocity)
MD34040 $MA_REFP_VELO_SEARCH_MARKER
(Reference point creep velocity)

Distance
Zero Mark of reference
DELAY point cam
of reference
point approach

Figure 14-10 Reference point position

When the reference point is reached the machine axis is stopped and the actual value
system of the machine axis is synchronized with the reference point value specified by the
PLC user program.
MD34100 $MA_ REFP_SET_POS [ n] (Reference point value)
The reference point value is specified by the PLC user program via:
DB31, ... DBX2.4/.5/.6/.7 (reference point value 1/2/3/4)
The reference point value, which was selected by the PLC user program at the time of the
arrival of the reference cam in Phase 1 (DB31, ... DBX12.7 = 1), is taken over by the NC.
The machine axis is now referenced. As identification, the NC sets the appropriate interface
signal depending on the active measuring system:
DB31, ... DBX60.4/.5 (Referenced/Synchronized 1/2) = 1

Basic Functions
1166 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

Features of phase 3
● Feed override active.
● Feed stop (channel-specific and axis-specific) is active.
● NC STOP and NC START are active.

Special feature of phase 3


If the parameterized distance from the encoder zero mark to the reference point, i.e. the sum
of reference point distance and reference point offset (MD34080 + MD34090) is smaller than
the required breaking distance for stopping from the reference point positioning
velocity(MD34070), the machine axis initially stops "behind" the reference point and then
travels back to it.

([DPSOH 0'0$B5()3B029(B',670'0$B5()3B6(7B326B&255 

0'0$B5()3B6(7B326>RU@
9HORFLW\ UHIHUHQFHSRLQWYDOXH

0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFK
YHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
5HIHUHQFHSRLQWFUHHSYHORFLW\

'LVWDQFH
=HUR0DUN RIUHIHUHQFH
'(/$< SRLQWFDP
RIUHIHUHQFH
SRLQWDSSURDFK

Figure 14-11 Reference point distance plus reference point offset smaller than braking distance

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1167
Reference Point Approach (R1)
Referencing with incremental measurement systems

14.5.6 Restoration of position after POWER OFF

General information
In the case of incremental encoders, actual values can be buffered even after POWER OFF.
This gives rise to the following functionalities:
● "Buffered actual value" followed by automatic referencing.
● "Position restoration with POWER ON":
The buffered actual values are adopted as automatic reference values.

WARNING
During the time in which the measuring system (encoder) of the machine axis is switched
off (POWER OFF, "parking" the axis, etc.), the machine axis may not be moved any further
by mechanical means (e.g. "coasting" axes). This must be supported by the machine
manufacturer with such measures as holding brakes, etc., and ensured by the user.
Otherwise the actual value system of the machine axis will no longer be synchronized
resulting in danger to personnel and machine. If this situation cannot be prevented
mechanically, it would be better to use absolute encoders.

14.5.6.1 Buffered actual value

Automatic referencing
By buffering the actual value, "automatic referencing" is enabled, which does not require
machine axes with incremental measuring systems, after situations in which they are in the
"Not referenced" condition, to traverse back to the reference point for referencing of the
measuring system. For example, this is the case after:
● POWER OFF/ON
● "Parking" selected:
DB31, ... DBX1.5/1.6 (position measuring system 1/2) = 0
DB31, ... DBX2.1 (servo enable) = 0
If the function is active, referencing is performed without axis motion by synchronizing the
actual value system of the machine axis to the last valid actual value. The actual value is
buffered in a retentive memory area of the control even after POWER OFF.

Basic Functions
1168 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

Precondition for automatic referencing


At the time of automatic referencing (e.g. after POWER ON, "Parking" of the machine axis is
again deselected, etc.), the encoder status of the active measuring system of the machine
axis must have the value 2.
MD34210 $MA_ENC_REFP_STATE = 2
That is, the encoder is referenced, an exact stop is reached, and automatic referencing is
active the next time the encoder is activated.
The following conditions must be fulfilled:
● "Automatic referencing" is assigned for the measuring system (encoder):
MD34210 $MA_ENC_REFP_STATE = 1 (Encoder status = 1)
Automatic referencing enabled, but encoder not yet referenced or exact stop not reached.
● The measuring system has already been successfully referenced with reference point
approach.
This is identified by the NC by changing the encoder status from 1 to 2:
MD34210 $MA_ENC_REFP_STATE = 2 (Encoder status = 2)
Encoder is referenced, an exact stop is reached, and automatic referencing is active the
next time the encoder is activated.
● The machine axis was disabled in "Exact stop fine" status.

Note
Within the scope of actual value buffering, the following axis-specific interface signal is
evaluated:
DB31, ... DBX60.7 (Position reached with fine exact stop)
The actual values of machine axes that do not use the signal cannot be buffered.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1169
Reference Point Approach (R1)
Referencing with incremental measurement systems

Functional sequence
Two different cases apply for automatic referencing, which depend on the encoder status:
● Case 1: Encoder status = 2
Automatic referencing in parameterized, the measuring system has been referenced and
the machine axis was switched off in status "exact stop fine".
As a result:
– The actual value system of the machine axis is synchronized with the buffered actual
value.
– The status of the machine axis is set to "Referenced".
DB31, ... DBX60.4/60.5 (Referenced/Synchronized 1/2) = 1
● Case 2: Encoder status = 1
Automatic referencing in parameterized but the measuring system has either not yet been
referenced or the machine axis was not switched off in status "exact stop fine".
As a result:
– The actual value system of the machine axis is synchronized with zero.
– The status of the machine axis is set to "Not referenced":
DB31, ... DBX60.4/60.5 (Referenced/Synchronized 1/2) = 0

14.5.6.2 Position restoration with POWER ON

Function
In addition to the axis position, incremental encoder buffering also sets the referenced
status. However, the restored incremental encoder position is actually not the same as "real"
re-referencing. In order to assess the quality of the restored position, a "restored" status is
delivered instead of the "referenced" status.

Parameter assignment
In order to restore the last axis position buffered before switching off, the machine data must
be set:
MD34210 $MA_ENC_REFP_STATE = 3.
Referencing does not take place automatically. The encoder state is "Position restored".
Monitoring for the software limit switches is already activated in this state.
This state is indicated by signals in the NCK PLC interface:
NST DB31, ... DBX71.4 ("Restored 1") for encoder 1
NST DB31, ... DBX71.5 ("Restored 2") for encoder 2

Basic Functions
1170 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with incremental measurement systems

The "Position restored" state can only be exited by referencing the axis. NST DB31, ...
DBX71.4/5 ("Restored 1/2") are deleted and
NST DB31, ... DBX60.4/5 ("Referenced/Synchronized 1/2") are set.

Note
In the case of spindles, the states "Position restored" and "Referenced/Synchronized" can
also be deleted by exceeding the encoder limit frequency.

Retracting the tool in JOG mode


Once the tool has been retracted in JOG mode, axes whose positions have been restored
are referenced; see machine data:
● MD20700 $MC_REFP_NC_START_LOCK (NC start lock without a home position).
● MD34110 $MA_REFP_CYCLE_NR (Axis sequence for channel-specific referencing)
The PLC prompts the display of this state with the output of a corresponding PLC message
by evaluating the above NCK PLC interface signals.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1171
Reference Point Approach (R1)
Referencing with distance-coded reference marks

14.6 Referencing with distance-coded reference marks

14.6.1 General overview

Distance-coded reference marks


Measuring systems with distance-coded reference marks consist of two parallel scale tracks:
● Incremental grating
● Reference mark track
The distance between any two consecutive reference marks is defined. This makes it
possible to determine the absolute position of the machine axis when two consecutive
reference marks are crossed. For example, if the distance between the reference marks is
approx. 10 mm, a traverse path of approx. 20 mm is all that is required to reference the
machine axis.
Referencing can be performed from any axis position in the positive or negative direction
(exception: end of travel range).

Basic Functions
1172 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with distance-coded reference marks

14.6.2 Basic parameter assignment

Linear measuring systems.


The following data must be set to parameterize linear measuring systems:
● The absolute offset between the machine zero point and the position of the first reference
mark of the linear measuring system:
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point/absolute offset)
See also below: Determining the absolute offset
● Orientation of the length measuring system (equidirectional or inverse) relative to the
machine system coordinate system:
MD34320 $MA_ENC_INVERS (length measuring system inverse to the machine system)

5HIHUHQFHPDUN    
    

   

    

Figure 14-12 DIADUR graduated glass scale with distance-coded reference marks
(dimensions in mm for 20 mm scale division)

Rotary measuring system


For rotary measuring systems, the same applies as for linear measuring systems (see
above).

Determining the absolute offset


The following procedure is recommended for the determination of the absolute offset
between the machine zero point and the position of the first reference mark of a machine
axis:
1. Enter the value zero for the absolute offset:
MD34090 $MA_REFP_MOVE_DIST_CORR = 0
2. Perform reference point approach.
Note: Reference point approach should be performed at a point in the machine where the
exact position of the machine axis relative to machine zero can be determined easily with
a laser interferometer, for example.
3. Determine the actual position of the machine axis via the operator interface screen.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1173
Reference Point Approach (R1)
Referencing with distance-coded reference marks

4. Measure the current position of the machine axis with reference to the machine zero
point.
5. Calculate absolute offset and enter in MD34090.
The absolute offset is calculated with respect to the machine coordinate system and
depending on the orientation of the measuring system (equidirectional or inverse) as:

Orientation of the measuring system Absolute offset


equidirectional Measured position + displayed actual position
Opposite direction Measured position - displayed actual position

WARNING
After determining the absolute offset and the entry in MD34090, the reference point
traversing for the machine axis must be carried out once more.

Referencing methods
Referencing with distance-coded reference marks can be performed in one of two ways:
● Evaluation of two consecutive reference marks:
MD34200 $MA_ENC_REFP_MODE (referencing mode) = 3
Advantage:
– Short travel path
● Evaluation of four consecutive reference marks:
MD34200 $MA_ENC_REFP_MODE = 8
Advantage:
– Plausibility check by NC is possible
– Increase in reliability of referencing result

Basic Functions
1174 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with distance-coded reference marks

14.6.3 Chronological sequence

Chronological sequence
Referencing with distance-coded reference marks can be divided into two phases:
● Phase 1: Travel across the reference marks with synchronization
● Phase 2: Traveling to a fixed destination point

'%'%; GHFHOHUDWLRQRIUHIHUHQFHSRLQWDSSURDFK

'%'%; 0RWLRQFRPPDQGPLQXV

'%'%;DQG WUDYHUVLQJNH\SOXVPLQXV

'%'%; UHIHUHQFHGV\QFKURQL]HG

5HIHUHQFHPDUNVOLQHDUPHDVXULQJV\VWHP

9HORFLW\

0'0$B5()3B9(/2B326
5HIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\

0'0$B5()3B9(/2B6($5&+B0$5.(5
 5HIHUHQFHSRLQWFUHHSYHORFLW\

3KDVH 3KDVH

Figure 14-13 Distance-coded reference marks

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1175
Reference Point Approach (R1)
Referencing with distance-coded reference marks

14.6.4 Phase 1: Travel across the reference marks with synchronization

Phase 1: Start
For information on starting reference point approach, refer to "Axis-specific referencing" and
"Channel-specific referencing."

Reference cam
In measuring systems with distance-coded reference marks, reference cams are not
required for the actual referencing action. For functional reasons, however, a reference cam
is required for channel-specific reference point approach and reference point approach from
the part program (G74) before the traversing range end of the machine axis.

Phase 1: Sequence
Sequence without touching a reference cam
Once reference point approach is started, the machine axis accelerates to the assigned
reference point creep velocity:
MD34040 $MA_REFP_VELO_SEARCH_MARKER (reference point creep velocity)
Once the parameterized number of reference marks has been crossed, the machine axis is
stopped again and the actual value system of the machine axis is synchronized to the
absolute position calculated by the NC.
Sequence when starting from the reference cam
If the machine axis is at the reference cam at the start of the reference point traversing, it
accelerates to the parameterized reference point creep velocity against the parameterized
reference point approach direction:
MD34040 $MA_REFP_VELO_SEARCH_MARKER (reference point creep velocity)
MD34010 $MA_CAM_DIR_IS_MINUS (Reference point approach in minus direction)
That ensures that the machine axis does not reach the travel range limit before it has
crossed the parameterized number of reference marks.
Once the parameterized number of reference marks has been crossed, the machine axis is
stopped again and the actual value system of the machine axis is synchronized to the
absolute position calculated by the NC.

Basic Functions
1176 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with distance-coded reference marks

Sequence when contact is made with reference cam during referencing


Once reference point approach is started, the machine axis accelerates to the assigned
reference point creep velocity:
MD34040 $MA_REFP_VELO_SEARCH_MARKER (reference point creep velocity)
Before the machine axis travels over the parameterized number of reference marks, it
touches the reference cam. It is then reversed and reference mark search is restarted in the
opposite direction.
Once the parameterized number of reference marks has been crossed, the machine axis is
stopped again and the actual value system of the machine axis is synchronized to the
absolute position calculated by the NC.

Plausiblity check of the reference mark distance


An error occurs if, during reference point traversing for two subsequent reference marks, the
NC determines a distance greater than twice the parameterized reference mark distance.
MD34300 $MA_ENC_REFP_MARKER_DIST (Reference mark distance)
The machine axis will then traverse in opposite direction at half the parameterized reference
point creep velocity (MD34040) and the search for reference mark is restarted.
If a faulty reference mark distance is detected again, the machine axis is stopped and the
reference point traversing is aborted (alarm 20003 "fault in the measuring system").

Abort criterion
If the parameterized number of reference marks is not detected within the parameterized
distance, the machine axis is stopped and reference point traversing is aborted.
MD34060 $MA_REFP_MAX_ MARKER_DIST (max. distance to the reference mark)

Features of phase 1
After phase 1 is successfully completed, the actual value system of the machine axis is
synchronized.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1177
Reference Point Approach (R1)
Referencing with distance-coded reference marks

14.6.5 Phase 2: Travel to fixed stop

Phase 2: Start
Phase 2 is automatically started when phase 1 has been completed without an alarm.
Initial situation:
● The machine axis is positioned directly behind the last of the parameterized number of
reference marks.
● The actual value system of the machine axis is synchronized.

Phase 2: Sequence
In Phase 2, the machine axis completes reference point approach by traversing to a defined
target position (reference point). This action can be suppressed in order to shorten the
reference point approach:
MD34330 $MA_STOP_AT_ABS_MARKER

Value Meaning
0 Travel to target position
1 No travel to target position

Travel to target position (normal case)


The machine axis accelerates to the parameterized reference point position velocity and
travels to the parameterized target point (reference point):
MD34070 $MA_REFP_VELO_POS (Reference point positioning velocity)
MD34100 $MA_REFP_SET_POS (reference point value)
The machine axis is referenced. To identify this, the NC sets an interface signal for the
measuring system that is currently active:
DB31, ... DBX60.4/60.5 (Referenced/Synchronized 1/2) = 1
No travel to target position
The machine axis is now referenced. To identify this, the NC sets an interface signal for the
measuring system that is currently active:
DB31, ... DBX60.4/60.5 (Referenced/Synchronized 1/2) = 1

Basic Functions
1178 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with distance-coded reference marks

Features of phase 2
Phase 2 will display different characteristics, depending on whether a reference point cam is
parameterized for the machine axis.
Machine axis without reference point cam
MD34000 $MA_REFP_CAM_IS_ACTIVE (Axis with reference point cam) = 0
Properties:
● Feed override active.
● The feed stop (channel-specific and axis-specific) is active.
● NC STOP and NC START are active.

Machine axis with reference point cam


MD34000 $MA_REFP_CAM_IS_ACTIVE (Axis with reference point cam) = 1
Properties:
● Feedrate override is not active.
Machine axis moves internally when feedrate override = 100%.
If a feedrate override of 0% is specified, an abort occurs.
● The feed stop (channel-specific and axis-specific) is active.
● NC-STOP and NC-START are not active.
● If the parameterized number of reference marks is not detected within the parameterized
distance after the exit of the reference cam, the machine axis will be stopped.
MD34060 $MA_REFP_MAX_ MARKER_DIST (max. distance to the reference mark)

Special features of rotary measuring systems


On rotary distance-coded measuring systems, the absolute position can only be determined
uniquely within one revolution. Depending on the mechanical mounting of the encoder, the
overtravel of the absolute position in the hardware does not always coincide with the
traversing range of the rotary axis.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1179
Reference Point Approach (R1)
Referencing with distance-coded reference marks

Special features of modulo rotary axes


With module rotary axes, the reference point position is mapped on the parameterized
modulo range:
MD30330 $MA_MODULO_RANGE (extent of modulo range)
MD30340 $MA_MODULO_RANGE_START (starting position of modulo range)

Note
The reference point position is mapped onto the assigned (ghost) modulo range even with
axis function "Determination of reference point position rotary, distance-coded encoder within
the configured modulo range":
MD30455 $MA_MISC_FUNCTION_MASK (axis functions), BIT1 = 1

Basic Functions
1180 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing by means of actual value adjustment

14.7 Referencing by means of actual value adjustment

14.7.1 Actual value adjustment to the referencing measurement system

Function
When actual value adjustment to the referencing measuring system is performed, the
resulting absolute actual position after successful referencing of the measuring system of a
machine axis is transferred directly to all other measuring systems of the machine axis, and
the machine axis is designated as referenced:
DB31, ... DBB60.4/60.5 (referenced/synchronized 1/2) = 1
Advantage
When the machine axis switches from an explicitly referenced measuring system to the
measuring system referenced by actual value adjustment, continuous servo control is
assured (servo enable active) because the matched actual position prevents a sudden
change in actual value.

Note
In order to improve positioning precision by determining the measuring-system-specific
encoder fine information, we recommend explicitly re-referencing the measuring system
previously referenced by actual value adjustment after switching over.

Activation
The activation of the actual value adjustment to the referencing measuring system is
machine-specifically carried out via:
MD34102 $MA_REFP_SYNC_ENCS = 1

14.7.2 Actual value adjustment to the referenced measurement system

Function
If a machine axis has several measuring systems and one of them is referenced, the
remaining measuring systems can be referenced by actual value adjustment to the
measuring system already referenced.
Advantage
Referencing does not take as long because the path to be traversed only has to be
sufficiently along to allow elimination of the backlash in both measuring systems.
If the distance to the traversing range limits is large enough, referencing can be started at
any point along the traversing range of the machine axis in any direction because no zero
mark, reference point cam, etc., is required.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1181
Reference Point Approach (R1)
Referencing by means of actual value adjustment

Parameter assignment
The following machine data must be parameterized for actual value adjustment to a
referenced measuring system:
● Homing mode: Actual value adjustment to a referenced measuring system
MD34200 $MA_ENC_REFP_MODE[measuring system] = 6
● Traverse path for backlash recovery:
MD34080 $MA_REFP_MOVE_DIST[measuring system] (reference point distance)

Note
Reference point distance greater than zero
To ensure reliable backlash recovery, the assigned value for the reference point distance
must be greater than the maximum backlash of both measuring systems.
Reference point distance equal to zero
The reference point distance can also equal zero. In this case, actual value adjustment is
performed without a traversing movement as soon as reference point approach starts. In
this case, the active backlash should be less than half the increment of the measuring
system whose actual value is taken.

14.7.3 Actual value adjustment for measuring systems with distance-coded reference
marks

Function
In order to improve positioning precision by determining the measuring-system-specific
encoder fine information, we recommend explicitly re-referencing the measuring system
previously referenced by actual value adjustment after switching over the measuring system.
If an encoder with distance-coded reference marks is used for the passive measuring
system, referencing can be avoided if the following conditions are met:
1. Active measuring system: indirect measuring system (motor measuring system) with
absolute encoder, for example
2. Passive measuring system: Direct measuring system with distance-coded reference
marks
3. Travel movement of the machine axis with the referenced indirect measuring system
before measuring system switchover in which the number of reference marks required for
referencing are crossed. This automatically references the passive direct measuring
system.

Basic Functions
1182 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing by means of actual value adjustment

Parameterization
In addition to the specific machine data required to reference the individual measuring
systems, the following machine data must be set:
● Enable actual value adjustment:
MD34102 $MA_REFP_SYNC_ENCS = 1
● Direct measuring system with distance-coded reference marks:
– MD34200 $MA_ENC_REFP_MODE[measuring system] = 3
Distance-coded reference marks
– MD30242 $MA_ENC_IS_INDEPENDENT[measuring system] = 2
During actual value adjustment, the passive direct measuring system is adjusted to
the actual position of the active indirect measuring system, but is not marked as
referenced. After the parameterized number of reference marks have been crossed,
the passive direct measuring system is automatically referenced. Referencing is
performed in every operating mode.

Sequence
1. Initial situation: Neither of the measuring systems are referenced:
DB31, ... DBX60.4 = 0 (referenced/synchronized 1)
DB31, ... DBX60.5 = 0 (referenced/synchronized 2)
2. Reference the indirect measuring system according to the measuring system type:
DB31, ... DBX60.4 = 1 (referenced/synchronized 1)
DB31, ... DBX60.5 = 0 (referenced/synchronized 2)
3. Traverse the machine axis across the parameterized number of reference marks.
This automatically references the direct measuring system:
DB31, ... DBX60.4 = 1 (referenced/synchronized 1)
DB31, ... DBX60.5 = 1 (referenced/synchronized 2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1183
Reference Point Approach (R1)
Referencing in follow-up mode

14.8 Referencing in follow-up mode

Function
Incremental measuring systems and measuring systems with distance-coded reference
marks can be referenced even when the machine axis is in follow-up mode. This requires
that reference point approach be properly parameterized according to the measuring system
in use (see "Referencing with incremental measuring systems" and "Referencing with
distance-coded reference marks").
When referencing in follow-up mode the machine axis is moved not by the NC but by means
of an external travel movement over the encoder zero mark and the parameterized number
of distance-coded reference marks. The measuring system is referenced when the encoder
zero mark or parameterized number of distance-coded reference marks are detected.

Note
Reproducibility of the referencing result
In NC-guided reference point approach, reproducibility of the referencing result is ensured
through adherence to the assigned traverse velocities during the referencing operation.
During referencing in follow-up mode, responsibility for achieving reproducibility of the
referencing results lies with the machine manufacturer/user.

Unique zero mark


Referencing of an incremental measuring system is based on the explicit position of the
encoder zero mark relative to the overall traversing range of the machine axis.
Because the reference cam signal is not evaluated by the NC during referencing in follow-up
mode, unique identification of the reference point when referencing in follow-up mode will
only result with:
● Only one encoder zero mark in the traversing range of the machine axis
● Linear measuring systems with distance-coded reference marks
● Modulo rotary axes (absolute position within one revolution)

Basic Functions
1184 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing in follow-up mode

Zero mark selection when several zero marker signals occur


If several encoder zero marks are detected in the traversing range of the machine axis due
to machine-specific factors, e.g. reduction gear between encoder and load, a BERO must be
mounted on the machine and connected to the relevant drive module (SIMODRIVE 611D)
via a BERO input in order to uniquely specify the reference point. The position of the
reference point is then derived from the combination of BERO signal and encoder zero mark.
Zero mark evaluation with BERO must be parameterized as the referencing mode:
MD34200 $MA_ENC_REFP_MODE = 5
Negative edge evaluation
In the case of a referencing operation with a negative edge evaluation of the BERO signal:
MD34120 $MA_REFP_BERO_LOW_ACTIVE = FALSE
synchronization is with the next encoder zero mark encountered after the BERO is exited.
Positive edge evaluation
In the case of a referencing operation with a positive edge evaluation of the BERO signal:
MD34120 $MA_REFP_BERO_LOW_ACTIVE = TRUE
synchronization is with the next encoder zero mark encountered after the BERO is
approached.
Mechanically, the BERO must be sized in such a way that the positive BERO signal covers
the entire width of the encoder zero mark.

Enable
The "Referencing in follow-up mode" function is enabled with:
MD34104 $MA_REFP_PERMITTED_IN_FOLLOWUP = TRUE

Starting the referencing operation


If the machine axis is operating in the follow-up mode at the start of reference point
traversing, (DB31,... DBX61.3 == TRUE) the measuring system will be referenced in the
follow-up mode.
If the machine axis is not operating in the follow-up mode at the start of reference point
traversing, the "normal" from the NC controlled reference point travels is carried out.
Referencing in follow-up mode can be started in the following modes:
● JOG-REF: Traversing keys
● AUTOMATIC: Part program command G74

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1185
Reference Point Approach (R1)
Referencing in follow-up mode

Sequence of referencing operation (JOG-REF mode)


1. Activate follow-up mode of machine axis:
DB31, ... DBX1.4 (follow-up mode) = 0
DB31, ... DBX2.1 (servo enable) = 0
2. Take into account activation of follow-up mode:
DB31, ... DBX61.3 (follow-up mode active) = 1
3. Switch to JOG-REF mode.
4. External movement of machine axis across encoder zero mark or parameterized number
of distance-coded reference marks. The referencing operation is started internally in the
NC as soon as the machine axis is moved:
DB31, ... DBX61.4 (axis/spindle stationary) = 0
5. The measuring system is referenced after the encoder zero mark or the assigned number
of distance-coded reference marks have been successfully detected:
DB31, ... DBX60.4/60.5 (referenced/synchronized 1/2) = 1

Aborting the reference operation


An active referencing operation can be aborted by:
● Deselecting follow-up mode
● NCK Reset

Response when measuring systems are already referenced


A measuring system that has already been referenced can only be re-referenced in
AUTOMATIC mode using part program instruction G74.

Sequence of referencing operation (AUTOMATIC mode)


1. Switch to AUTOMATIC mode.
2. Start the part program.
3. Activate follow-up mode of machine axis:
DB31, ... DBX1.4 (follow-up mode) = 0
DB31, ... DBX2.1 (servo enable) = 0
4. Take into account activation of follow-up mode:
DB31, ... DBX61.3 (follow-up mode active) = 1
5. The referencing operation is started internally in the NC as soon as part program
instruction G74 is processed.
6. External movement of machine axis across encoder zero mark or parameterized number
of distance-coded reference marks.

Basic Functions
1186 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing in follow-up mode

7. The measuring system is referenced after the encoder zero mark or the assigned number
of distance-coded reference marks have been successfully detected:
DB31, ... DBX60.4/60.5 (referenced/synchronized 1/2) = 1
8. The block change occurs after the referencing operation has been successfully
completed.

Aborting the reference operation


An active referencing operation can be aborted by:
● Deselecting follow-up mode
● NCK Reset

Response when measuring systems are already referenced


A measuring system that you have already referenced can be referenced again.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1187
Reference Point Approach (R1)
Referencing with absolute value encoders

14.9 Referencing with absolute value encoders

14.9.1 Information about calibration

Machine axes with absolute encoder


The advantage of machine axes with absolute value encoder is that after a one time
adjustment procedure, the necessary reference point traversing with incremental measuring
systems (e.g. build-up of control, de-selection of "Parking" of machine axes etc.) can be
skipped and the actual value system of the machine axis can be immediately synchronized
to the determined absolute position.

Adjustment
Adjustment of an absolute encoder involves matching the actual value of the encoder with
the machine zero once and then setting it to valid.
The current adjustment status of an absolute value encoder is displayed in the following
axis-specific machine data of the machine axis, to which it is connected:
MD34210 $MA_ENC_REFP_STATE (status of absolute encoder)

Value Meaning
0 Encoder not calibrated
1 Encoder adjustment enabled
2 Encoder is calibrated

Adjustment methods
The following adjustment methods are supported:
● Adjustment by entering a reference point offset
● Adjustment by entering a reference point value
● Automatic adjustment with probe
● Adjustment with BERO

Basic Functions
1188 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with absolute value encoders

Readjustment
Readjustment of the absolute encoder is required after:
● Gear change between load and absolute encoder
● Removal/installation of the absolute value encoder
● Removal/installation of the motor with the absolute value encoder
● Data loss in the static NC memory
● Battery failure
● Setting actual value (PRESETON)

NOTICE
The NCK can only detect a required readjustment during the following events:
• Gear change with change of gear ratio
• Addressing the zero-mark monitoring
• New encoder serial number after change of the absolute value encoder
Thereupon, the status of the absolute encoder is automatically reset by NCK to 0
(encoder not calibrated) (MD34210 = 0) and the following alarm is displayed:
Alarm 25022 "Axis <Axis identifier> Encoder <Number> Warning 0"
or when addressing the zero-mark monitoring (only systems with SIMODRIVE 611D):
Alarm 25020 "Axis <Axis identifier> Zero-mark monitoring of the active encoder"
In all other cases (e.g. PRESETON) it is the sole responsibility of the user, by resetting
the status to 0 (encoder not adjusted), to show the misalignment of the absolute value
encoder and to carry out a readjustment.

WARNING
Data backup
During the back-up of machine data of a machine A, the encoder status of the machine
axis (MD34210) is also backed up.
During loading of this data record into a machine B of the same type, e.g. in the context
of a serial start-up or after a case of maintenance, the referenced machine axes will be
automatically regarded as adjusted/referenced by the NC. It is the special responsibility
of the machine manufacturer/user to undertake a readjustment in such cases.
See also explanations regarding machine data:
MD30250 $MA_ACT_POS_ABS (Absolute encoder position at the time of switch-off)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1189
Reference Point Approach (R1)
Referencing with absolute value encoders

14.9.2 Calibration by entering a reference point offset

Function
During adjustment by entering the reference point offset, the difference between the position
displayed on the operator interface and the true actual position in the machine is determined
and made known to the NC as reference point offset.

Procedure
1. Determining the position of the machine axis with reference to the machine zero point via
e.g.:
– position measurement (e.g. laser interferometer)
– Moving the machine axis to a known position (e.g. fixed stop)
2. Reading the displayed actual position of the machine axis on the operator interface.
3. Calculating the reference point offset (difference between the actual positions determined
under point 1 and 2) and entering in machine data:
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point offset)
4. Marking the absolute value encoder as adjusted:
MD34210 $MA_ENC_REFP_STATE = 2

Note
The encoder adjustment does not become active until the next time the encoder is
activated (e.g. when the controller is powered up).

5. Initiate POWER ON reset.


6. Controlling the position of the machine axis displayed on the operator interface.

Note
Backlash compensation
If backlash compensation is parameterized for a measuring system with absolute value
encoder, the following must be observed:
No backlash is permitted during machine axis travel to the adjusted machine position.
Activate reference point offset permanently
The entered reference point offset (MD34090) will be permanently active only after initial
POWER ON - Reset. If the machine axis is moved after the absolute encoder adjustment
without an interim POWER ON - Reset, the reference point offset entered in the machine
data can be overwritten, for example, as part of internal overrun offset.
Checking the actual position
Following adjustment of the absolute encoder, we recommend that you verify the actual
position of the machine axis the next time you power up the controller (POWER ON).

Basic Functions
1190 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with absolute value encoders

14.9.3 Adjustment by entering a reference point value

Function
During adjustment by entering the reference point value, the absolute position of the
machine axis with reference to the machine zero point is determined by e.g.:
● Position measurement (e.g. laser interferometer)
● Moving the machine axis to a known position (e.g. fixed stop)
This determined position value will be made known to the NC as the reference point value.
The NC then calculates the reference point offset from the difference between the encoder
absolute value and the reference point value.

Procedure
1. Set reference mode to "Take over of the reference point value"
MD34200 $MA_ENC_REFP_MODE = 0
2. Traversing machine axis in the JOG mode to the (e.g. Laser interferometer) position to be
measured or already known (e.g. fixed stop).

Note
The machine axis can only be traversed in the direction enabled for referencing with the
travel keys:
MD34010 $MA_REFP_CAM_DIR_IS_MINUS (approach reference point in minus
direction)
To avoid an invalid position because of backlash in the drive train, the known position
must be approached at low velocity.

3. Communicate the position of the machine axis relative to machine zero to the NC as the
reference point value:
MD34100 $MA_REFP_SET_POS = Position
4. Releasing encoder adjustment:
MD34210 $MA_ENC_REFP_STATE = 1
5. Activate NCK-Reset for acceptance of the entered machine data values.
6. Switch to JOG-REF mode.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1191
Reference Point Approach (R1)
Referencing with absolute value encoders

7. Operate the travel key used for referencing in step 2.


The machine axis does not move when the traversing key is actuated!
The NC calculates the reference point offset from the entered reference point value and
that given by the absolute value encoder. The result is entered into the machine data:
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point offset)
The status of the absolute value encoder is set to "Encoder is adjusted":
MD34210 $MA_ ENC_REFP_STATE = 2
The actual value system of the machine axis is synchronized.
The machine axis is now referenced. As identification, the NC sets the appropriate
interface signal based on which measuring system is currently active:
DB31, ... DBB60.4/60.5 (referenced/synchronized 1/2) = 1
8. Initiate POWER ON reset.

Note
Activate reference point offset permanently
The entered reference point offset (MD34090) will only be permanently active after
POWER ON - Reset.
If the machine axis is moved after the absolute encoder adjustment without an interim
POWER ON - Reset, the reference point offset entered in the machine data can be
overwritten, for example, within internal overrun corrections.
Checking the actual position
Following adjustment of the absolute encoder, we recommend that you verify the actual
position of the machine axis the next time you power up the controller (POWER ON).

Basic Functions
1192 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with absolute value encoders

14.9.4 Automatic calibration with probe

Function
In automatic adjustment with a probe, a known position in the machine is approached with
the machine axis from a part program. The position value is stored in the NC as a reference
point value. The position is reached when the probe switches, and the NC then calculates
the reference point offset from the difference between the encoder value and reference point
value.

Note
Part program for automatic adjustment
The part program for automatic adjustment using a probe must be created by the machine
manufacturer/user for the specific requirements of the machine.
Freedom from collision
Because actual-value-related monitoring is not active for the machine axes being referenced,
the machine operator must take special care to ensure that collisions do not occur in the
machine while the machine axes are being moved!

Part program
The part program for automatic adjustment of absolute encoders with probe must perform
the points listed below for each axis in the order indicated:
1. Approach the adjustment position of machine axis, which is detected from the probe
response.
The position must be approached several times from the same direction, but at a velocity
which is gradually reduced on each approach, to ensure that the measured value
obtained is as accurate as possible. The measured value is stored in system variable
$AA_IM.
2. Calculating and writing the reference point offset:

0'0$B5()3B029(B',67B&255 0'0$B5()3B6(7B326ದ$$B,0

3. Set the absolute encoder status to "Encoder is adjusted":


MD34210 $MA_ ENC_REFP_STATE = 2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1193
Reference Point Approach (R1)
Referencing with absolute value encoders

Sequence
Proceed as follows for automatic adjustment with probe:
1. Enable part program start even for non-referenced machine axes:
MD20700 $MC_REFP_NC_START_LOCK = 0
2. Enter the machine axis position relative to machine zero when probe is switched as the
reference point value for all relevant machine axes:
MD34100 $MA_REFP_SET_POS = reference point value
3. Activate NCK-Reset for the acceptance of the entered machine data values.
4. Start part program.
5. After completion of the part program, re-secure the partial program start for machine axes
which are not referenced:
MD20700 $MC_REFP_NC_START_LOCK = 1
6. Initiate POWER ON - Reset so that the reference point offset written by the part program
is permanently active:
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point offset)

Note
Activate reference point offset permanently
The entered reference point offset (MD34090) will only be permanently active after
POWER ON - Reset.
If the machine axis is moved after the absolute encoder adjustment without an interim
POWER ON - Reset, the reference point offset entered in the machine data can be
overwritten, for example, as part of internal overrun offset.
Checking the actual position
Following adjustment of the absolute encoder, we recommend that you verify the actual
position of the machine axis the next time you power up the controller (POWER ON).

Basic Functions
1194 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with absolute value encoders

14.9.5 Calibration with BERO

Function
For adjustment using BERO, a reference point approach to a defined machine position is
performed the same as for incremental measuring systems. In this case the BERO replaces
the encoder zero mark that the absolute encoder does not have. After successful completion
of reference point approach, the NC automatically calculates the reference point offset from
the difference between the encoder absolute value and the parameterized reference point
value.

Procedure
Proceed as follows for adjustment with BERO:
1. Set referencing mode to "Referencing with BERO":
MD34200 $MA_ENC_REFP_MODE = 2
2. Assign reference point value:
MD34100 $MA_REFP_SET_POS = Reference point value
3. Start reference point approach.
Reference point approach can be started manually in JOG-REF mode or in AUTOMATIC
or MDA mode from a part program (G74).
After a successful reference point approach, the absolute encoder is calibrated, the
actual value system of the machine axis is synchronized, and the machine axis is
referenced.
To identify this, the NC sets an interface signal for the measuring system that is currently
active:
DB31, ... DBB60.4/60.5 (referenced/synchronized 1/2) = 1

Note
If the BERO is removed after adjustment of the absolute encoder, the referencing mode
must be assigned to "Referencing with absolute encoder".
MD34200 $MA_ENC_REFP_MODE = 0

Signal propagation delay compensation


The signal propagation time can cause corruption of the absolute position detected by the
NC. The signal propagation time can be compensated for in any direction:
MD31122 $MA_BERO_DELAY_TIME_PLUS (BERO delay time plus)
MD31123 $MA_BERO_DELAY_TIME_MINUS (BERO delay time minus)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1195
Reference Point Approach (R1)
Referencing with absolute value encoders

Note
Prerequisite for a correct compensation of signal propagation time is drives of type
SIMODRIVE 611 digital. The compensation times are pre-set in delivery condition in such a
way that changes are usually not required.

Creep velocity
If with the approach of BERO, it is to be proceeded with the parameterized reference point
creep velocity (MD34040 $MA_REFP_VELO_SEARCH_MARKER) then "BERO with
projected start velocity with spindles" must be parameterized as reference mode:
MD34200 $MA_ENC_REFP_MODE = 7

14.9.6 Reference point approach with absolute encoders

Traversing movement release


If for a mchine axis with adjusted absolute value encoder as active measuring system,
reference point traversing is activated (manual in the mode JOG-REF or automatic according
to part program instruction G74), the machine axis travels depending on the parameterized
release traversing movement.
MD34330 $MA_REFP_STOP_AT_ABS_MARKER = <Value>

Value Meaning
0 Traversing is enabled.
When reference point approach is initiated, the machine axis moves to the reference point
position. Reference point approach is completed when the reference point position is
reached.
1 Traversing is not enabled.
After the activation of the reference point travel, the machine axis does not travel and the
reference point travel is immediately completed.

Basic Functions
1196 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with absolute value encoders

14.9.7 Reference point approach in rotary absolute encoders with external zero mark

Function
To be able to use the reference point approach with a zero mark, as is usual in incremental
encoders (refer to Chapter "Referencing in incremental measuring systems") even with
absolute encoders, the missing HW zero marks are created in software form once every
encoder revolution, always at the same position within the rotation.

Difference compared to referencing with incremental encoders


An absolute encoder with replacement zero mark should not be considerd as a complete
equivalent of an incremental encoder. All the properties of the absolute encoder are retained.
The following table lists the different properties of incremental and absolute encoders:

Table 14- 1 Properties of incremental and absolute encoders

Feature Incremental encoder Absolute encoders


Encoder type MD30240 $MA_ENC_TYPE
=1 =4
Internal encoder position MD30250 $MA_ACT_POS_ABS
Value is updated only in MD34210 ≥ 1 Value is updated only in MD30270 = 0
Traversing range extension MD30270 $MA_ENC_ABS_BUFFERING
No effect = 0 (default): Active
Reference point offset MD34090 $MA_REFP_MOVE_DIST_CORR
Value input allowed Value is updated exclusively via control
Supported referencing types MD34200 $MA_ENC_REFP_MODE
= 1, 2, 3, 4, 5, 6, 7 = 0, 1, 2
Adjustment status MD34210 $MA_ENC_REFP_STATE = 0, 1, 2
Automatic encoder misalignment during Automatic encoder misalignment during
shut down while in motion. parameter set change with position jump or
during serial number change.
Absolute position modulo range MD34220 $MA_ENC_ABS_TURNS_MODULO
=0 = 1 - 4096
Encoder Serial No. MD34230 $MA_ENC_SERIAL_NUMBER
=0 The value must be updated from the PLC
during each encoder change, otherwise loss
of adjustment plus alarm.
Transfer of series startup files Without any restrictions. Due to encoder properties
MD30250, MD30270, MD34090, MD34210,
MD34220, MD34230
only possible with limitations.
Cam activation time 0 seconds several seconds
Zero mark 1 per encoder revolution none

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1197
Reference Point Approach (R1)
Referencing with absolute value encoders

Feature Incremental encoder Absolute encoders


Zero mark monitoring Hardware Software
Position after POWER ON without 0.0 Last position within MD34220.
actual value buffering MD34210 = 0 MD30270 = 1
Position after POWER ON with Last standstill position before Last position including small movements
actual value buffering deactivation. during POWER OFF.
MD34210 = 1 MD30270 = 0
Referenced after POWER ON depends on adjustment status

Requirement
The function can be used only with rotary absolute encoders:
● MD31000 $MA_ENC_IS_LINEAR = 0
● MD30240 $MA_ENC_TYPE = 4

Parameter assignment
● Reference point approach with zero marks:
MD34200 $MA_ENC_REFP_MODE = 1
● A reference point offset should not be input in the following MD:
MD34090 $MA_REFP_MOVE_DIST_CORR
This MD describes, in connection with absolute encoders, the offset between machine
and absolute encoder zero, and it therefore has a different meaning.
● The load-side zero mark search rate MD34040 $MA_REFP_VELO_SEARCH_MARKER
should not exceed the limiting frequency of the absolute trace of the encoder
MD36302 $MA_ENC_FREQ_LIMIT_LOW.
If the speed is too high, absolute information cannot be read any more, and thus, no
equivalent zero marks are generated.
● If no zero marks are found within:
MD34060 $MA_REFP_MAX_MARKER_DIST
otherwise, an alarm will be triggered.
● A start of the zero mark search with the override of a BERO (MD34200 = 5) is not
supported. MD34200 = 0 is to be used as a equivalent.
● The following MD must be set if the absolute encoder retains even the referenced status
through POWER OFF, besides the last position:
MD34210 $MA_ENC_REFP_STATE = 2

Basic Functions
1198 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with absolute value encoders

Data backup and standard commissioning


Some properties of an absolute encoder restrict the transfer of series startup files to other
machines. The following machine data must be checked and corrected if necessary after
loading the series startup:
● MD30250 $MA_ACT_POS_ABS (internal encoder position)
● MD30270 $MA_ENC_ABS_BUFFERING (traversing range extension)
● MD34090 $MA_REFP_MOVE_DIST_CORR (absolute offset)
● MD34210 $MA_ENC_REFP_STATE (adjustment status)
● MD34220 $MA_ENC_ABS_TURNS_MODULO (Modulo range)
● MD34230 $MA_ENC_SERIAL_NUMBER (encoder serial number)

14.9.8 Automatic encoder replacement detection

Function
Automatic encoder replacement detection is required for absolute encoders in order to detect
if the encoder has been replaced and therefore needs to be readjusted.
The NC reads the encoder-specific serial number of the encoder from the drive every time
the control is powered up. If the serial number has changed the NC resets the encoder
status to "Encoder not calibrated".
MD34210 $MA_ENC_REFP_STATE = 0
The status of the measuring system is indicated as "Not referenced":
DB31, ... DBB60.4/60.5 (referenced/synchronized 1/2) = 0

Serial number display


The NC stores the serial numbers read in the build-up specific to the machine in the machine
data:
MD34230 $MA_ENC_SERIAL_NUMBER (encoder serial number)

Note
Currently, only the serial numbers of absolute encoders with an EnDat interface can be read.
For all other encoders the display shows that no serial number has been read.
Automatic encoder replacement detection can therefore only be used with the specified
encoder types.

Avoiding readjustments
In some special cases, for example, when a machine axis (built-on rotary axes) is removed
and then mounted again, readjustment is not necessary/desirable.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1199
Reference Point Approach (R1)
Referencing with absolute value encoders

To avoid readjustment, zero must be parameterized as a serial number to be ignored for the
measuring system of the machine axis in question.
MD34232 $MA_EVERY_ENC_SERIAL_NUMBER = 0
If the NC now reads zero as the serial number, the encoder status is not reset and the serial
number indicated in the machine data is kept.
Example sequence of operation:
1. The NC reads the serial number of the absolute encoder for the measuring system of the
machine axis in question and the serial number is not equal to zero.
2. The absolute encoder is calibrated in the correct manner.
3. When the controller is powered up subsequently, the NC reads "zero" as the serial
number of the absolute encoder.
Serial number "zero" is ignored and the encoder status remains the same, that is
"calibrated".
4. When the controller is powered up, the NC again reads the serial number it read under
Item 1 and that is still indicated in the machine data. The encoder status continues to be
"Adjusted".

Note
PROFIBUS drives
As not every drive connected via PROFIBUS-DP is able to deliver the encoder serial
number in time for build-up of control or at all, the range of the encoder serial number
with PROFIBUS drives is pre-set with zero to avoid unnecessary new NC internal
adjustments:
MD34232 $MA_EVERY_ENC_SERIAL_NUMBER = 0
A manual parameterizing to 1 is ineffective.

14.9.9 Enabling the measurement system


The measuring system of a machine axis is activated in the following cases:
● Power up of the control (POWER ON)
● Activation of the measuring system via interface signal (deselection of "parking"):
DB31, ... DBB1.5/1.6 (position measuring system 1/2)
DB31, ... DBB2.1 (servo enable)
● Violation of the assigned encoder limit frequency (spindles):
MD36300 $MA_ENC_FREQ_LIMIT
When the measuring system is activated, the NC synchronizes the actual value system of
the machine axis with the current absolute value. Traversing is disabled during
synchronization for axes but not for spindles.

Basic Functions
1200 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Referencing with absolute value encoders

Parameterizing the encoder limit frequency (spindles)


The EQN 1325 absolute encoder made by Heidenhain has an incremental track and an
absolute track.
If a spindle is driven at a speed above the encoder limit frequency of the incremental track,
the substantially lower limit frequency of absolute track must be parameterized as the
encoder limit frequency.
MD36300 $MA_ENC_FREQ_LIMIT
Otherwise an incorrect absolute position would be read because the parameterized encoder
limit frequency is not reached when the measuring system is activated. This would cause a
position offset in the actual value system of the machine axis.
Determining the encoder limit frequency
The encoder limit frequency to be parameterized is derived from the smaller of the two
following limit speeds:
● Encoder
The limit speed or encoder limit frequency is listed in the data sheet of the encoder (e.g.
limit speed = 2000 [rpm])
● NC
Due to the NC-internal evaluation process, the maximum limit speed for which error-free
calculation of the absolute value by the NC is possible is 4 encoder revolutions per
interpolation cycle.
For an interpolation cycle of, for example, 12 ms: Limit speed = 4 / 12 ms = 20,000 rpm
The limiting frequency corresponding to the limiting speed is calculated to be:

 0'
0'
0' 0'

MD31020 $MA_ENC_RESOL (Encoder lines per revolution)


MD10050 $MN_SYSCLOCK_CYCLE_TIME (System clock cycle)
MD10070 $MN_IPO_SYSCLOCK_TIME_RATIO (Factor for interpolator cycle)

Note
The position control switching speed relevant for spindles is set according to the encoder
limiting frequency of the absolute value encoder of the spindle:
MD35300 $MA_SPIND_POSCTRL_VELO (position control switching speed)
MD36300 $MA_ENC_FREQ_LIMIT (Encoder limit frequency)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1201
Reference Point Approach (R1)
Referencing with absolute value encoders

14.9.10 Referencing variants that are not supported

The following referencing variants are not supported when used with absolute encoders:
● Referencing/calibrating with encoder zero mark
● Distance-coded reference marks
● BERO with two-edge evaluation

Basic Functions
1202 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Supplementary conditions

14.10 Supplementary conditions

14.10.1 Large traverse range

Notes on uniqueness of encoder position


Linear absolute encoder
The absolute value of linear position encoders, e.g. Heidenhain LC181, is always unique for
the scale lengths available.
Rotary absolute encoder
The absolute value of rotary absolute encoders is only unique within the range of the specific
maximum encoder revolutions.
For example, the EQN 1325 rotary absolute encoder by Heidenhain supplies a unique
absolute value in the range of 0 to 4,096 encoder revolutions.
Depending on how the encoder is connected that will result in:
● Rotary axis with encoder on load: 4096 load revolutions
● Rotary axis with encoder on motor: 4096 motor revolutions
● Linear axis with encoder on motor: 4096 motor revolutions

Example:
An EQN 1325 rotary absolute encoder is connected to the motor of a linear axis. For an
effective leadscrew pitch of 10 mm this will result in a unique absolute value within the travel
range -20.48 to +20.48 m.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1203
Reference Point Approach (R1)
Supplementary conditions

Supplementary conditions
● Linear axes with a traversing range > 4096 encoder revolutions, rotatory absolute value
encoder EQN 1325 and a parameterized absolute value encoder range of
MD34220 $MA_ENC_ABS_TURNS_MODULO = 4096:
– The maximum possible travel range corresponds to that of incremental encoders.
● Endlessly turning rotary axes with absolute encoders:
– Any number of integer transmission ratios are permitted.
– We recommend that you parameterize endlessly turning rotary axes with absolute
encoders as modulo rotary axes (traversing range 0...360 degrees).
MD34220 $MA_ENC_ABS_TURNS_MODULO
Otherwise, the machine axis may require a very long traverse path to reach absolute
zero when the measuring system is activated.
● Machine axes with absolute encoders:
– To ensure that the NC correctly determines the current actual position when the
measuring system is reactivated, the machine manufacturer/user must ensure that the
machine axis is moved less than half the assigned traversing range when the
measuring system is deactivated (POWER OFF, "parking" selected).
MD34220 $MA_ENC_ABS_TURNS_MODULO

Basic Functions
1204 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Data lists

14.11 Data lists

14.11.1 Machine data

14.11.1.1 NC-specific machine data

Number Identifier: $MN_ Description


11300 JOG_INC_MODE_LEVELTRIGGRD INC/REF in jog/continuous mode

14.11.1.2 Channel-specific machine data

Number Identifier: $MC_ Description


20700 REFP_NC_START_LOCK NC start disable without reference point

14.11.1.3 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


30200 NUM_ENCS Number of encoders
30240 ENC_TYP Actual value encoder type
30242 ENC_IS_INDEPENDENT Encoder is independent
30250 ACT_POS_ABS Absolute encoder position at time of deactivation.
30270 ENC_ABS_BUFFERING Absolute encoder: Traversing range extension
30300 IS_ROT_AX Rotary axis/spindle
30310 ROT_IS_MODULO Modulo conversion for rotary axis/spindle
30330 MODULO_RANGE Magnitude of the modulo range
30340 MODULO_RANGE_START Starting position of modulo range
30355 MISC_FUNCTION_MASK Axis functions
31122 BERO_DELAY_TIME_PLUS BERO delay time in plus direction
31123 BERO_DELAY_TIME_MINUS BERO delay time in minus direction
34000 REFP_CAM_IS_ACTIVE Axis with reference cam
34010 REFP_CAM_DIR_IS_MINUS Reference point approach in minus direction
34020 REFP_VELO_SEARCH_CAM Homing approach velocity
34030 REFP_MAX_CAM_DIST Maximum distance to reference cam
34040 REFP_VELO_SEARCH_MARKER Reference point creep velocity
34050 REFP_SEARCH_MARKER_REVERSE Direction reversal to reference cam
34060 REFP_MAX_MARKER_DIST Maximum distance to reference mark;
Max. distance to 2 reference mark for distance-coded
scales
34070 REFP_VELO_POS Reference point positioning velocity

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1205
Reference Point Approach (R1)
Data lists

Number Identifier: $MA_ Description


34080 REFP_MOVE_DIST Reference point distance/destination point for
distance-coded system
34090 REFP_MOVE_DIST_CORR Reference point/absolute offset, distance-coded
34092 REFP_CAM_SHIFT Electronic reference cam shift for incremental
measurement systems with equidistant zero marks.
34093 REFP_CAM_MARKER_DIST Reference cam/reference mark distance
34100 REFP_SET_POS Reference point value
34102 REFP_SYNC_ENCS Actual value adjustment to the referencing
measurement system
34104 REFP_PERMITTED_IN_FOLLOWUP Enable referencing in follow-up mode
34110 REFP_CYCLE_NR Axis sequence for channel-specific Homing
34120 REFP_BERO_LOW_ACTIVE Polarity change of the BERO cam
34200 ENC_REFP_MODE Referencing mode
34210 ENC_REFP_STATE Status of absolute encoder
34220 ENC_ABS_TURNS_MODULO Absolute encoder range for rotary encoders
34230 ENC_SERIAL_NUMBER Encoder serial number
34232 EVERY_ENC_SERIAL_NUMBER Expansion of encoder serial number
34300 ENC_REFP_MARKER_DIST Basic distance of reference marks for distance-coded
encoders
34310 ENC_MARKER_INC Interval between two reference marks with distance-
coded scales
34320 ENC_INVERS Linear measuring system inverse to machine system:
34330 REFP_STOP_AT_ABS_MARKER Distance-coded linear measuring system without
destination point
35150 SPIND_DES_VELO_TOL Spindle speed tolerance
36302 ENC_FREQ_LIMIT_LOW Encoder limit frequency re-synchronization
36310 ENC_ZERO_MONITORING Zero mark monitoring

14.11.2 Signals

14.11.2.1 Signals to mode group

DB number Byte.Bit Name


11 0.7 Mode group RESET
11 1.2 Machine function REF

Basic Functions
1206 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Reference Point Approach (R1)
Data lists

14.11.2.2 Signals from mode group

DB number Byte.Bit Name


11 5.2 Active machine function REF

14.11.2.3 Signals to channel

DB number Byte.Bit Name


21, ... 1.0 Activate referencing
21, ... 28.7 OEM channel signal (HMI → PLC) REF

14.11.2.4 Signals from channel

DB number Byte.Bit Name


21, ... 33.0 Referencing active
21, ... 35.7 Reset
21, ... 36.2 All axes referenced

14.11.2.5 Signals to axis/spindle

DB number Byte.Bit Name


31, ... 1.4 Follow-up mode (request)
31, ... 1.5/1.6 Position measuring system 1/position measuring system 2
31, ... 2.4 - 2.7 Reference point value 1 to 4
31, ... 4.6/4.7 Traversing keys minus/plus
31, ... 12.7 Decelertion of reference point approach

14.11.2.6 Signals from axis/spindle

DB number Byte.Bit Name


31, ... 60.4/60.5 Referenced, synchronized 1/Referenced, synchronized 2
31, ... 61.3 Follow-up mode active
31, ... 64.6/64.7 Traverse command minus/plus
31, ... 71.4/71.5 Restored 1/Restored 2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1207
Reference Point Approach (R1)
Data lists

Basic Functions
1208 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1) 15
15.1 Brief description
The primary function of a spindle is to set a tool or workpiece in rotary motion in order to
facilitate machining.
Depending on the type of machine, the spindle must support the following functions in order
to achieve this:
● Input of a direction of rotation for the spindle (M3, M4)
● Input of a spindle speed (S, SVC)
● Spindle stop, without orientation (M5)
● Spindle stop with orientation/Spindle positioning
(SPOS, M19 and SPOSA)
● Gear change (M40 to M45)
● Spindle-axis functionality (spindle becomes rotary axis and vice versa)
● Thread cutting (G33, G34, G35)
● Tapping with and without compensating chuck (G331, G33)
● Revolutional feedrate (G95)
● Constant cutting speed (G96, G961, G97, G971)
● Programmable spindle speed limits (G25, G26, LIMS=)
● Position encoder assembly on the spindle or on the spindle motor
● Spindle monitoring for min. and max. speed as well as
max. encoder limit frequency and end point monitoring of spindle
● Switching the position control (SPCON, SPCOF, M70) on/off
● Programming of spindle functions:
– From the part program
– Via synchronized actions
– Via PLC with FC18 or via special spindle interfaces for simple spindle activation

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1209
Spindles (S1)
Operating modes

15.2 Operating modes

15.2.1 Overview

Spindle modes
The spindle can have the following modes:
● Control mode
● Oscillation mode
● Positioning mode
● Synchronous mode, synchronous spindle
References:
Function Manual, Extension Functions, Synchronous Spindle (S3)
● Rigid tapping
References:
Programming Manual, Fundamentals; Chapter: Motion commands

Axis mode
The spindle can be switched from spindle mode to axis mode (rotary axis) if the same motor
is used for spindle and axis operation.

Basic Functions
1210 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

15.2.2 Mode change


Switching between spindle and axis operation can be done as follows:

2VFLOODWLRQPRGH 6\QFKURQRXVPRGH

&KDQJH *HDU
JHDU FKDQJHG &28321 &2832)
632606326$
&RQWUROPRGH 3RVLWLRQLQJPRGH
63&2)
000
0
0
63&2) 63260
000 6326$ $[LVQDPH
0

$[LVPRGH

* *

7DSSLQJ
ZLWKRXW
FRPSHQVDWLQJ
FKXFN

● Control mode → Oscillation mode


The spindle changes to oscillation mode if a new gear stage has been specified using
automatic gear step selection (M40) in conjunction with a new S value or by M41 to M45.
The spindle only changes to oscillation mode if the new gear step is not equal to the
current actual gear step.
● Oscillation mode → Control mode
When the new gear is engaged, the interface signal:
DB31, ... DBX84.6 (Oscillation mode)
is reset and the interface signal:
DB31, ... DBX16.3 (Gear changed)
is used to go to control mode.
The last programmed spindle speed (S value) is reactivated.
● Control mode → Positioning mode
To stop the spindle from rotation (M3 or M4) with orientation or to reorient it from standstill
(M5), SPOS, M19 or SPOSA are used to switch to positioning mode.
● Positioning mode → Control mode
M3, M4 or M5 are used to change to control mode if the orientation of the spindle is to be
terminated. The last programmed spindle speed (S value) is reactivated.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1211
Spindles (S1)
Operating modes

● Positioning mode → Oscillation mode


If the orientation of the spindle is to be terminated, M41 to M45 can be used to change to
oscillation mode. When the gear change is complete, the last programmed spindle speed
(S value) and M5 (control mode) are reactivated.
● Positioning mode → Axis mode
If a spindle was stopped with orientation, the assigned axis name is used to program a
change to axis mode. The gear step is retained.
● Control mode → Axis mode
Switching from control mode to axis mode can be also achieved by the programming of
M70. In this case, a rotating spindle is decelerated in the same way as for M5, position
control activated and the zero parameter set selected.
● Axis mode → Control mode
To terminate axis mode, M3, M4 or M5 can be used to change to control mode. The last
programmed spindle speed (S value) is reactivated.
● Axis mode → Oscillation mode
To terminate axis mode, M41 to M45 can be used to change to oscillation mode (only if
the programmed gear step is not the same as the actual gear step). When the gear
change is complete, the last programmed spindle speed (S value) and M5 (control mode)
are reactivated.

15.2.3 Control mode

When open-loop control mode?


The spindle is in control mode with the following functions:
● Constant spindle speed:
– S... M3/M4/M5 and G93, G94, G95, G97, G971
– S... M3/M4/M5 and G33, G34, G35
– S... M3/M4/M5 and G63
● Constant cutting speed:
– G96/G961 S... M3/M4/M5
The spindle need not be synchronized.

Preconditions
A spindle position actual-value sensor is absolutely essential for M3/M4/M5 in connection with:
● Revolutional feedrate (G95)
● Constant cutting speed (G96, G961, G97, G971)
● Thread cutting (G33, G34, G35)

Basic Functions
1212 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

● Tapping (G331, G332)


● Activate position control (SPCON, M70)
A spindle position actual-value sensor is not required for M3/M4/M5 in connection with:
● Inverse-time feedrate coding (G93)
● Feedrate in mm/min or inch/min (G94)
● Tapping with compensating chuck (G63)

Speed control mode


Speed control mode is particularly suitable if a constant spindle speed is required, but the
position of the spindle is not important (e.g. constant milling speed for even appearance of
the workpiece surface).
● Speed control mode is activated in the part program with M3, M4, M5 or with SPCOF.
● The following NC/PLC interface signal is set:
DB31, ... DBX84.7 (control mode)
● NC/PLC IS:
DB31, ... DBX61.5 (Position controller active)
is reset if position control is not used.
● Acceleration in speed control mode is defined independently of the gear step in the
machine data:
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL
The value should reflect the physical circumstances, if possible.

Position control mode


Position control is particularly suitable if the position of the spindle needs to be tracked over
a longer period or if synchronous spindle setpoint value linkage is to be activated.
● Position control mode is switched on in the part program with: SPCON(<spindle
number>)
● The following NC/PLC interface signal is set:
DB31, ... DBX61.5 (position controller active)
● Acceleration in position control mode is defined independent of the gear step in the
machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1213
Spindles (S1)
Operating modes

Independent spindle reset


The spindle response after a reset or the end of the program (M2, M30) is set with the
machine data:
MD35040 $MA_SPIND_ACTIVE_AFTER_RESET (individual spindle reset)

Value Description
0 When the spindle is reset or at the end of the program, the spindle immediately decelerates
to a stop at the active acceleration rate. The last programmed spindle speed and direction of
rotation are deleted.
1 Upon reset or at the end of the program, the last programmed spindle speed (S-value) and
the last programmed direction of spindle rotation (M3, M4, M5) are retained. The spindle is
not braked.
If prior to reset or end of program the constant cutting speed (G96) is active, the current
spindle speed (in relation to 100% spindle override) is internally accepted as the spindle
speed last programmed.
The spindle can only be stopped with the NC/PLC interface signal:
DB31, ... DBX2.2 (Delete distance-to-go/Spindle reset)
The direction of rotation is deleted in the event of all alarms generating a spindle quick stop.
The last programmed spindle speed (S value) is retained. Once the source of the alarm has
been eliminated, the spindle must be restarted.

Spindle actual speed display and spindle behavior with G96, G961
DB31, ... DBX61.4 (axis/spindle stationary)
The speed at which the spindle is deemed to be "stationary" is set with the machine data:
MD36060 $MA_STANDSTILL_VELO_TOL
The value should be measured in such a way that the following NC/PLC interface signal is
reliably present at a standstill:
DB31,... DBX61.4 (axis/spindle stationary)
If DB31,... DBX61.4 (axis/spindle stationary) is signaled and there is no closed-loop position
control active for the spindle, an actual speed of zero is displayed at the operator interface,
and zero is read with the system variable $AA_S[n].
References:
Function Manual, Basic Functions; Various Interface Signals and Functions (A2)
Spindle response at constant cutting speed G96, G961
● At the start of machining (transition from G0 to Gx) and after NC stop, G60 (exact stop,
modal) and G09 (exact stop, non-modal) the system waits until the actual speed has
reached the speed setpoint tolerance range before starting the path.
DB31, ... DBX83.5 (n_act = n_set)
● NC/PLC interface signals:
DB31, ... DBX83.5 (n_act = n_set)
and
DB31 to DBX83.1 (Setpoint speed limited)
are also set to defined values even if severe speed changes are specified (transverse
axis travels towards position 0).

Basic Functions
1214 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

● If the speed drops below the minimum speed


or upon detection of the NC/PLC interface signal:
DB31 to DBX61.4 (axis/spindle stationary),
the NC/PLC interface signal:
DB31, ... DBX83.5 (n_act = n_set)
is reset (e.g. for an emergency machine strategy).
● A path operation which has started (G64, rounding), is not interrupted.
In addition, the spindle response is influenced by the following machine data:
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START (feed enable with spindle in setpoint
range).
Spindle behavior at the end of gear step change
● NC/PLC IS:
DB31, ... DBX16.3 (Gear changed)
tells the NC that the new gear step
(NC/PLC IS DB31, ... DBX16.0-16.2 (Actual gear step A to C))
applies and oscillation mode is terminated.
In this case, it does not matter whether NC/PLC IS:
DB31, ... DBX18.5 (oscillation mode)
is still set.
The actual gear step should correspond to the set gear step.
The actual gear step signaled is relevant for selection of the parameter set.
● Once the gear step change (GSW) has been acknowledged via the PLC (DB31, ...
DBX16.3), the spindle is in speed control mode (DB31, ... DBX84.7 = 1).
If a direction of rotation (M3, M4, M5 or FC18: "Start spindle rotation") or a spindle speed
(S value) was programmed before the gear step change, then the last speed and
direction of rotation will be reactivated after the gear step change.

15.2.4 Oscillation mode


Oscillation mode is activated for the spindle during the gear step change.
The mode of operation is described in detail in the topic "Gear step change with oscillation
mode (Page 1258)".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1215
Spindles (S1)
Operating modes

15.2.5 Positioning mode

15.2.5.1 General functionality

When is positioning mode used?


The spindle positioning mode stops the spindle at the defined position and activates the
position control, which remains active until it is de-activated.
For the following functions the spindle is in positioning mode:
● SPOS[<n>]=...
● SPOS[n]=ACP(...)
● SPOS[<n>]=ACN(...)
● SPOS[<n>]=AC(...)
● SPOS[n]=IC(...)
● SPOS[<n>]=DC(...)
● SPOSA[<n>]=ACP(...)
● SPOSA[<n>]=ACN(...)
● SPOSA[<n>]=AC(...)
● SPOSA[<n>]=IC(...)
● SPOSA[<n>]=DC(...) equal to SPOSA[<n>]=...
● M19 or M[<n>]=19
The address extension [<n>] with <n> = spindle number may not apply for the main spindle.

SPOS[<n>]=AC(...)
Spindle positioning to an absolute position (0 to 359.999 degrees). The positioning direction
is determined either by the current direction of spindle rotation (spindle rotating) or the
distance-to-go.

SPOS[<n>]=IC(...)
Spindle positioning to an incremental position (+/- 999999.99 degrees) in relation to the last
programmed position. The positioning direction is defined by the sign of the path to be
traversed.

SPOS[<n>]=DC(...)
Spindle positioning across the shortest path to an absolute position (0 to 359.999 degrees).
The positioning direction is determined either by the current direction of spindle rotation
(spindle rotating) or automatically by the control (spindle stationary).

Basic Functions
1216 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

SPOS[<n>]=...
Same functional sequence as SPOS [<n>]=DC(...).

SPOS[<n>]=ACP(...)
Approaches the position from the positive direction.
When positioning from a negative direction of rotation, the speed is decelerated to zero and
accelerated in the opposite direction to execute the positive approach.

SPOS[<n>]=ACN(...)
Approaches the position from the negative direction.
When positioning from a positive direction of rotation, the speed is decelerated to zero and
accelerated in the opposite direction to execute the negative approach.

M19 (DIN 66025)


M19 can be used to position the spindle. The position and the position approach mode are
read here from the following setting data:
SD43240 $SA_M19_SPOS[<n>] (spindle position for spindle positioning with M19)
SD43250 $SA_M19_SPOSMODE[<n>] (spindle position for spindle positioning with M19)
The positioning options of M19 are identical to those of:
SPOS = <approach mode> <position/path>
M19 is output as an auxiliary function to the NC/PLC interface as an alternative to M3, M4,
M5, and M70. The M19 block remains active in the interpolator for the duration of positioning
(like SPOS).
Part programs using M19 as a macro (e.g. DEFINE M19 AS SPOS = 0) or as a subroutine,
continue to remain executable. For the sake of compatibility with previous controls, the
internal processing of M19 (NCK positions the spindle) can be disabled as shown in the
following example:

MD22000 $MC_AUXFU_ASSIGN_GROUP[0] = 4 ; Auxiliary function group: 4


MD22010 $MC_AUXFU_ASSIGN_TYPE[0] = "M" ; Auxiliary function type: "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[0] = 0 ; Auxiliary functions expansion: 0
MD22030 $MC_AUXFU_ASSIGN_VALUE[0] = 19 ; Auxiliary function value: 19

Implicitly generated auxiliary function M19


To achieve uniformity in terms of how M19 and SPOS or SPOSA behave at the NC/PLC
interface, auxiliary function M19 can be output to the NC/PLC interface in the event of SPOS
and SPOSA.
The two following options are available for activating this function:
● Channel-specific activation for all the spindles in the channel via the machine data:
MD20850 $MC_SPOS_TO_VDI (Output of M19 to the PLC with SPOS/SPOSA)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1217
Spindles (S1)
Operating modes

Bit Value Meaning


0 0 If bit 19 is also set to "0" in the MD35035
$MA_SPIND_FUNCTION_MASK, no auxiliary function M19 is
generated in SPOS and SPOSA. This does away with the
acknowledgement time for the auxiliary function.
1 The auxiliary function M19 is generated and output to the PLC
during the programming of SPOS and SPOSA in the part
program. The address extension corresponds to the spindle
number.
● Spindle-specific and cross-channel activation via the machine data:
MD35035 $MA_SPIND_FUNCTION_MASK (spindle functions)

Bit Value Meaning


19 0 If bit 0 is also set to "0" in the MD20850 $MC_SPOS_TO_VDI,
no auxiliary function M19 is generated in SPOS and SPOSA.
This does away with the acknowledgement time for the auxiliary
function.
1 The implicit auxiliary function M19 is generated and output to the
PLC during the programming of SPOS and SPOSA. The
address extension corresponds to the spindle number.

Note
Activation via MD35035 should be preferred when using a spindle in multiple channels
(axis/spindle exchange).

The auxiliary function M19 is implicitly generated if either of the MD configurations = 1.


After activation, the minimum duration of an SPOS/SPOSA block is increased to the time for
output and acknowledgment of the auxiliary functions by the PLC.
The properties of the implicitly generated auxiliary function output M19 are "Quick" and
"Output during motion". These properties are fixed settings and are independent of the M19
configuration in the auxiliary function-specific machine data (MD..._$M..._AUXFU_...).
There is no auxiliary function M19 implicitly generated in the case of spindle positioning
instructions.

Basic Functions
1218 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

End of positioning
The positioning can be programmed with:

FINEA[S<n>]: End of motion on reaching "Exact stop fine" (DB31, ...


DBX60.7)
COARSEA[S<n>]: End of motion on reaching "Exact stop coarse" (DB31, ...
DBX60.6)
IPOENDA[S<n>]: End of motion on reaching "IPO stop"
In addition, an end-of-motion criterion for block changes can be set in the braking ramp (100-
0%) with IPOBRKA for single-axis interpolation.
References:
Function Manual, Extension Functions; Positioning Axes (P2)

Block change
The program advances to the next block if the end-of-motion criteria for all spindles or axes
programmed in the current block, plus the block change criterion for path interpolation, are
fulfilled. This applies to both part-program and technology-cycle blocks.
SPOS, M19 and SPOSA have the same functionality but differ in their block change
behavior:
● SPOS and M19
The block change is carried out if all functions programmed in the block have reached
their end-of-block criterion (e.g. all auxiliary functions acknowledged by the PLC, all axes
have reached their end points) and the spindle has completed its positioning motion.
● SPOSA
The program moves to the next block if all the functions (except for spindle) programmed
in the current block have reached their end-of-block criterion. If SPOSA is the only entry in
the block, block change is performed immediately. The spindle positioning operation may
be programmed over several blocks (see WAITS).

Coordination
A coordination of the sequence of motions can be achieved with:
● PLC
● MD configuration
● Programming in the part program

PLC
If the NC/PLC interface signal:
DB31, ... DBX83.5 (spindle in setpoint range)
is not available, the channel-specific NC/PLC interface signal:
DB21, ...to DBX 6.1 (read-in disable)
can be set to wait for a certain spindle position.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1219
Spindles (S1)
Operating modes

MD configuration
Setting:
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START = 1
is used to perform path interpolation taking the tolerance:
MD35150 $MA_SPIND_DES_VELO_TOL
into account only if the spindle has rotated up to the preselected speed.
The setting
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START = 2
is used to stop traveling path axes before the start of machining at the last G0.
Machining continues:
● On the next traversing command
● If the spindle speed is reached
● When MD35510 $MA_SPIND_STOPPED_AT_IPO_START = 1
(path feed enable, if spindle stationary)

Programming in the part program


Coordination actions in the part program have the following advantages:
● The part program author can decide at what point in the program the spindle needs to be
up to speed, e.g. in order to start machining a workpiece.
● This avoids unnecessary delays.
Coordination in the part program involves programming the WAITS instruction:

WAITS: for main spindle (master spindle)


WAITS[<n>]: for spindles with number <n>
WAITS[<n>,<m>,...]: for several spindles up to the maximum number of
spindles

CAUTION
The part program author must ensure that one of the following maintenance conditions
occurs for WAITS.
• Position reached
• Spindle stationary
• Spindle up to programmed speed
In cases where one spindle is used in several channels, the part program author must
ensure that WAITS starts at the earliest in the phase in which the spindle from another
channel has already started to accelerate or decelerate towards the required new speed or
direction of rotation.

Basic Functions
1220 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

The control waits before executing subsequent blocks until:


● position(s) programmed with SPOSA are reached.
● spindle standstill is reached with M5:
DB31, ..., DBX 61.4 (spindle stationary)
taking the tolerance:
MD36060 $MA_STANDSTILL_VELO_TOL into account.
WAITS is terminated and the next block loaded when the first occurrence of the signal is
detected.
● In M3/M4 (speed control mode), the speed in the setpoint range is:
DB31, ..., DBX83.5 (spindle in setpoint range)
taking the tolerance:
MD35150 $MA_SPIND_DES_VELO_TOL into account.
WAITS is terminated and the next block loaded when the first occurrence of the signal is
detected.
This WAITS function applies in the programmed channel.
WAITS can be used to wait for all spindles known to this channel, although spindles may
also have been started in other channels.

Special cases
● Tolerance for spindle speed:
With machine data setting:
MD35150 $MA_SPIND_DES_VELO_TOL = 0,
the NC/PLC interface signal:
DB31, ... DBX83.5 (spindle in the setpoint range)
is always set to 1.
WAITS is terminated as soon as the spindle has reached the setpoint-side target after a
change in speed or direction (M3/M4).
● Missing enable signals:
If the WAITS function waits for the "Spindle in setpoint range" signal in speed control
mode and the spindle stops or fails to rotate because an enable signal (axial feed enable,
controller, pulse enable, etc.) is missing, the block is not terminated until the "Spindle in
setpoint range" signal is active, once enable signals are being received again.
● Response to NC and mode-group stop:
If an NC or mode-group stop is triggered during WAITS, the wait operation is resumed
after the NC start with all the above conditions.

Note
In particular when using spindles across different channels, care should be taken when
programming not to start WAITS too early in one channel, i.e. at a time when the spindle
in the other channel is still rotating at its "old" speed.
In such cases, the "Spindle in setpoint range" signal is activated and WAITS is stopped
too soon.
To prevent this happening, it is strongly recommended to set a WAITM before WAITS.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1221
Spindles (S1)
Operating modes

Feed
The positioning speed is configured in the machine data:
MD35300 $MA_SPIND_POSCTRL_VELO (position control switching speed)
The configured positioning speed can be modified by programming or by synchronized
actions:
FA[S<n>]=<value>

where: <n>: Spindle number


<value>: Positioning speed in degrees/min
With FA[S<n>]=0, the configured speed takes effect.

Acceleration
The accelerations are configured in the machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL(acceleration in position control mode)
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL(Acceleration in the speed control
mode)
The configured dynamic response during positioning can be modified by programming or by
synchronized actions:
ACC[S<n>]=<value>

where: <n>: Spindle number


<value>: Acceleration as a percentage of the configured acceleration
With ACC[S<n>]=0, the configured acceleration takes effect.

Aborting the positioning process


The positioning action is aborted:
● By the NC/PLC interface signal:
DB31, ... DBX2.2 (Delete distance-to-go/Spindle reset)
● With every reset (e.g. operator panel front reset)
● by NC-STOP.
The abort response in independent of the machine data:
MD35040 $MA_SPIND_ACTIVE_AFTER_RESET (individual spindle reset)

Special features
The spindle override switch is active.

Basic Functions
1222 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

15.2.5.2 Positioning from rotation

Initial situation
The spindle can be in speed control mode or in position control mode when positioning starts
(SPOS, M19 or SPOSA command in the program).
One must distinguish between the following cases:

Case 1: Spindle in speed control mode, encoder limit frequency exceeded


Case 2: Spindle in speed control mode, encoder limit frequency not exceeded
Case 3: Spindle in position control mode
Case 4: Spindle speed ‹ Position-control activation speed

Procedure

6SLQGOHVSHHG
UHYPLQ
3KDVHD VSHFLDOFDVH

FRQWUROUHVHUYH

0'(1&B)5(4B/,0,7
(QFRGHUOLPLWIUHTXHQF\
3KDVHE
3KDVH
0'(1&B)5(4B/,0,7B/2:
(QFRGHUOLPLWIUHTXHQF\
5HV\QFKURQL]DWLRQ

3KDVH
0'63,1'B326&75/B9(/2
3KDVHF 3RVLWLRQFRQWURODFWLYDWLRQVSHHG
3KDVHD
3KDVH

3KDVHD 3KDVH 7LPH W


6326>@ 

Figure 15-1 Positioning from rotation

Note
The speed arising from the configuration of the encoder limit frequency for the
resynchronization of the encoder (MD36302 $MA_ENC_FREQ_LOW) must be greater than
the position-control activation speed (MD35300 $MA_SPIND_POSCTRL_VELO).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1223
Spindles (S1)
Operating modes

Phase 1
Positioning from phase 1a:
The spindle is rotating at a higher speed than the encoder limit frequency. The spindle is not
synchronized.
Positioning from phase 1b:
The spindle is rotating at a lower speed than the encoder limit frequency. The spindle is
synchronized.

Note
If the position control is active, the speed can only amount to 90% of the maximum speed of
the spindle or the encoder limit frequency (10% control reserve required).

Positioning from phase 1c:


The spindle rotates at the programmed spindle speed whereby the speed is lower than the
configured position-control activation speed:
MD35300 $MA_SPIND_POSCTRL_VELO
The spindle is synchronized.

Phase 2
Spindle speed > Position-control activation speed
When the SPOS, M19 or SPOSA command is activated, the spindle begins to slow down to
the position-control activation speed with the configured acceleration:
MD35200 $MA_GEAR_STEP_SPEEDCTL_ACCEL
The spindle is synchronized once the encoder limit frequency threshold is crossed.
Spindle speed < Position-control activation speed
SPOS, M19 or SPOSA are programmed to switch the spindle to position control mode (if it is
not already in that mode).
The configured acceleration in position control mode is activated:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
The travel path to the target point is calculated.
The spindle travels to the programmed end point optimally in terms of time. This means that
the end point is approached at the highest possible speed (maximum MD35300
$MA_SPIND_POSCTRL_VELO). Depending on the appropriate secondary conditions,
phases 2 - 3 - 4 - 5 or 4a - 5a are executed.

Basic Functions
1224 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

Phase 3
Spindle speed > Position-control activation speed
When the configured position-control activation speed
(MD35300 $MA_SPIND_POSCTRL_VELO) is reached:
● Position control is activated (if not already active).
● The distance-to-go (to the target point) is calculated.
● There is a switch to the configured configured acceleration in position control mode (or
this acceleration is retained):
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
Spindle speed < Position-control activation speed
The spindle was accelerated up to the configured position-control activation speed
(MD35300 $MA_SPIND_POSCTRL_VELO) to reach the end point. This is not exceeded.
The braking start point calculation detects when the programmed spindle position can be
approached accurately at the acceleration configured in position control mode (MD35210
$MA_GEAR_STEP_POSCTRL_ACCEL).

Phase 4
Spindle speed > Position-control activation speed
The spindle brakes from the calculated "braking point" with machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
to the target position.
Spindle speed < Position-control activation speed
At the time identified by the braking start point calculation in phase 3, the spindle brakes to a
standstill with the acceleration configured in position control mode (MD35210
$MA_GEAR_STEP_POSCTRL_ACCEL).
Phase 4a:
When the SPOS command is activated the proximity of the end point is such that the spindle
can no longer be accelerated to the configured position-control activation speed (MD35300
$MA_SPIND_POSCTRL_VELO).
The spindle brakes to a standstill with the acceleration configured in position control mode
(MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1225
Spindles (S1)
Operating modes

Phase 5
Spindle speed > Position-control activation speed
Position control remains active and holds the spindle in the programmed position.

Note
The maximum encoder limit frequency of the spindle position actual-value encoder is
monitored by the control (it may be exceeded); in position control mode, the setpoint speed
is reduced to 90% of the measuring system limit speed.
The following NC/PLC interface signal is set:
DB31, ... DBX83.1 (programmed speed too high)
If "MS limit frequency exceeded" is still pending following a reduction in the setpoint speed,
an alarm is output.

Spindle speed < Position-control activation speed (Phase 5, 5a)


The spindle is stationary and it has reached the position. The position control is active and
stops the spindle in the programmed position.
If the distance between the spindle actual position and the programmed position (spindle
setpoint position) is less than the configured exact stop fine and coarse limits, the following
NC/PLC interface signals are set:
DB31, ... DBX60.7 (Position reached with coarse exact stop)
DB31, ... DBX60.7 (Position reached with fine exact stop)
The exact stop limits are defined with the machine data:
MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)
MD36000 $MA_STOP_LIMIT_COARSE (exact stop coarse)

Note
The positioning procedure is considered complete when the end-of-positioning criterion is
reached and signaled.
The condition is "Exact stop fine". This applies to SPOS, M19 or SPOSA from the part
program, synchronized actions and spindle positioning by the PLC using FC 18.

Basic Functions
1226 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

15.2.5.3 Positioning from standstill

Procedure
A distinction is made between two cases with regard to positioning from standstill:
● Case 1: The spindle is not synchronized.
This is the case if the spindle is to be positioned after switching on the control and drive
or after a gear step change (e.g. for a tool change).
MD31040 $MA_ENC_IS_DIRECT = 0
● Case 2: The spindle is synchronized.
This is the case if, after switching on the control and drive, the spindle is to be rotated
through a minimum of one revolution with M3 or M4 and then stopped with M5
(synchronization with the zero mark) before the first positioning action.

&DVH6SLQGOHQRWV\QFKURQL]HG

6SLQGOHVSHHG
UHYPLQ

6326>@ 


0'63,1'B326&75/B9(/2
3RVLWLRQFRQWURODFWLYDWLRQVSHHG



 7LPH V
=HURPDUN

&DVH6SLQGOHV\QFKURQL]HG

UHYPLQ
6SLQGOHVSHHG


D  0'63,1'B326&75/B9(/2
3RVLWLRQFRQWURODFWLYDWLRQVSHHG

D  7LPH V

6326>@ 

Figure 15-2 Positioning with stationary spindle

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1227
Spindles (S1)
Operating modes

Phase 1
Case 1: Spindle not synchronized
With the programming of SPOS, M19 or SPOSA the spindle accelerates with the acceleration
from the machine data:
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL (Acceleration in the speed control
mode)
This direction of rotation is defined by the machine data:
MD35350 $MA_SPIND_POSITIONING_DIR (Direction of rotation while positioning to
standstill)
Exception:
If ACN, ACP, IC is used for positioning, the programmed direction of travel is activated.
The spindle is synchronized at the next zero mark of the spindle position actual-value
encoder and switches to the position control mode.
Whether the zero mark is found in the traversed path (except for IC), is monitored:
MD34060 $MA_REFP_MAX_MARKER_DIST (maximum distance to the reference mark)
If the speed defined in machine data:
MD35300 $MA_SPIND_POSCTRL_VELO (Positioning speed)
is reached before the spindle is synchronized, the spindle will continue to rotate at the
positioning activation speed (it is not accelerated further).
Case 2: Spindle synchronized
SPOS, M19 or SPOSA will switch the spindle to position control mode.
The acceleration from the following machine data is active:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL (acceleration in position control mode)
The direction of rotation is defined by the programmed motion (ACP, ACN, IC, DC) or via the
pending distance-to-go.
The speed entered in
MD35300 $MA_SPIND_POSCTRL_VELO (position control activation speed)
is not exceeded in the machine data.
The travel path to the end position is calculated.
The spindle travels to the programmed end point optimally in terms of time. This means that
the end point is approached at the highest possible speed (maximum MD35300
$MA_SPIND_POSCTRL_VELO). Depending on the appropriate secondary conditions, the
phases 1 - 2 - 3 - 4 or 1- 3a - 4a are executed.

Phase 2
Case 1: Spindle not synchronized
When the spindle is synchronized, position control is activated.
The spindle rotates at the maximum speed stored in machine data:
MD35300 $MA_SPIND_POSCTRL_VELO
until the braking start point calculation identifies the point at which the programmed spindle
position can be approached accurately with the defined acceleration.

Basic Functions
1228 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

Case 2: Spindle synchronized


To reach the end point, the spindle is accelerated up to the speed defined in machine data:
MD35300 $MA_SPIND_POSCTRL_VELO.

This is not exceeded.


The braking start point calculation identifies when the programmed spindle position can be
approached accurately at the acceleration defined in machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL.
At the point, which is determined by the braking start point calculation in Phase 1, the spindle
decelerates to a standstill with the acceleration given in the following machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL

Phase 3
At the point, which is determined by the braking start point calculation in Phase 2, the spindle
decelerates to a standstill with the acceleration given in the following machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
Phase 3a:
When the SPOS command is activated the proximity of the end point is such that the spindle
can no longer be accelerated up to machine data:
MD35300 $MA_SPIND_POSCTRL_VELO.
The spindle is braked to a standstill with the acceleration given in the following machine
data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL

Phase 4, 4a
The spindle is stationary and it has reached the position. The position control is active and
stops the spindle in the programmed position.
NC/PLC IS:
DB31, ... DBX60.6 (Position reached with exact stop coarse)
and
DB31, ... DBX60.7 (Position reached with exact stop fine)
are set if the distance between the spindle actual position and the programmed position
(spindle setpoint position) is less than the settings for the exact stop fine and coarse limits.
This is defined in the machine data:
MD36010 $MA_STOP_LIMIT_FINE
MD36000 $MA_STOP_LIMIT_COARSE
Phase 3:
At the point, which is determined by the braking start point calculation in Phase 2, the spindle
decelerates to a standstill with the acceleration given in the following machine data:
MD35210 $MA_GEAR_STEP_ POSCTRL_ACCEL

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1229
Spindles (S1)
Operating modes

Phase 4:
The spindle is stationary and it has reached the position. The position control is active and
stops the spindle in the programmed position.
NC/PLC IS:
DB31, ... DBX60.6 (Position reached with exact stop coarse)
and
DB31, ... DBX60.7 (Position reached with exact stop fine)
are set if the distance between the spindle actual position and the programmed position
(spindle setpoint position) is less than the settings for the exact stop fine and coarse limits.
This is defined in the machine data:
MD36010 $MA_STOP_LIMIT_FINE
MD36000 $MA_STOP_LIMIT_COARSE

15.2.6 Axis mode

15.2.6.1 General functionality

Why axis mode?


For certain machining tasks (e.g. on lathes with end-face machining), the spindle not only
has to be rotated with M3, M4 and M5 and positioned with SPOS, M19 and SPOSA, but also
addressed as an axis with its axis identifier (e.g. "C").

Prerequisites
● The same spindle motor is used for spindle mode and axis mode.
● The same position measurement system or separate position measurement systems can
be used for spindle mode and axis mode.
● A position actual-value encoder is a mandatory requirement for axis mode.
● If the axis is not synchronized, e.g. M70 is programmed after POWER ON, the axis must
first be referenced with G74. Only then does the mechanical position match the
programmed one.
Example:

M70
G74 C1=0 Z100
G0 C180 X50

Basic Functions
1230 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

Configurable M function
The M function used to switch the spindle to axis mode can be configured in the machine
data:
MD20094 $MC_SPIND_RIGID_TAPPING_M_NR
The value on delivery is 70.

Note
From software version 2.6, the control system detects the transition to axis mode
automatically from the program sequence (see "Implicit transition to axis mode
(Page 1234)"). Therefore, there is no need at all for the explicit programming in the part
program of the configured M function for switching the spindle to axis mode (default: M70).
However, the M function can continue to be programmed, e.g. to increase the readability of
the part program.

Functionality
If the axis mode is active and the rotary axis homed, all axis functions can be used.
The most important functions are:
● Programming with axis name
● Use of zero offsets (G54, G55, TRANS, etc.)
● G90, G91, IC, AC, DC, ACP, ACN
● Use of kinematic transformations (e.g. TRANSMIT)
● Interpolation with other axes (path interpolation)
● Programming as a positioning axis
References:
Function Manual, Extension Functions; Rotary Axes (R2)

Special points to be noted


● The feed override switch is active.
● NC/PLC IS:
DB21, ... DBX7.7 (Reset)
does not terminate axis mode as standard.
● The NC/PLC interface signals:
DB31, ... DBB16 to DBB19 and DBB82 to DBB91
are not important if:
DB31, ... DBX60.0 (axis/no spindle) = 0
● Axis mode can be activated in all gear steps.
If the position actual value encoder is installed on the motor (indirect measuring system),
the positioning and contouring accuracy can vary for the different gear steps.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1231
Spindles (S1)
Operating modes

● The gear step cannot be changed when the axis mode is active.
The spindle must be switched to control mode.
This is done with M41 ... M45 or M5, SPCOF.
● In axis mode, the machine data from the servo parameter set with index zero are
effective in order to carry out adaptations in this mode.

Servo parameter set


The relevant machine data from the servo parameter set are:

Machine data Meaning


MD31050 $MA_DRIVE_AX_RATIO_DENOM Measuring gear denominator
MD31060 $MA_DRIVE_AX_RATIO_NUMERA Numerator load gearbox
MD32200 $MA_POSCTRL_GAIN KV factor
MD32452 $MA_BACKLASH_FACTOR Weighting factor for backlash
MD32610 $MA_VELO_FFW_WEIGHT Weighting factor for feedforward control
MD32800 $MA_EQUIV_CURRCTRL_TIME Equivalent time constant current control
loop for feedforward control
MD32810 $MA_EQUIV_SPEEDCTRL_TIME Equivalent time constant speed control
loop for feedforward control
MD32910 $MA_DYN_MATCH_TIME Time constant for dynamic matching
MD36012 $MA_STOP_LIMIT_FACTOR Factor for exact stop coarse/fine and zero
speed control
MD36200 $MA_AX_VELO_LIMIT Velocity monitoring threshold value
Other notes on the servo parameter set:
References:
Function Manual, Basic Functions; Velocities, Setpoint/Actual-Value System, Closed-Loop
Control (G2)

Dynamic response
The dynamic limits of the axis stored in the machine data are applicable in axis operation.
The axis switches to the current feedforward control mode as designated by the MD and the
commands FFWON and FFWOF.

Use of resolution changes


When using resolution changes in (analog) drive actuators, the following NC program steps
are required:
1. Changeover to axis mode

Programming Comment
SPOS=...
M5 ; Controller enable off (by PLC)
→ is output on PLC

Basic Functions
1232 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

Programming Comment
M70 ; Switch actuator (by PLC on account of M70)
Controller enable on (by PLC)
C=... ; NC traverses with axis parameter set

2. Switch back to spindle mode

Programming Comment
C=...
M71 ; → Output to PLC
Closed-loop controller enable off (by PLC)
Switch actuator (by PLC)
Switched to spindle parameter set (1-5) internally in
the NC, controller enable on (by PLC)
M3/4/5 or SPOS=... ; NC traverses with spindle parameter set

Change to spindle mode


The interpolation parameter (set 1 ... 5) is selected according to the currently valid gear step.
The feedforward control function is always activated, except for tapping with compensating
chuck.
Machine data:
MD32620 $MA_FFW_MODE (feedforward control type)
must always be not equal to 0.
Feedforward control should always be operated with the value 100% to avoid alarms being
output during positioning.

3DUDPHWHUVHW $[LVPRGH 6SLQGOHPRGH

 9DOLG

 9DOLG

 9DOLG

 9DOLG 'HSHQGLQJRQJHDUVWHS

 9DOLG

 9DOLG

Figure 15-3 Validity of parameter sets for axis and spindle modes

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1233
Spindles (S1)
Operating modes

15.2.6.2 Implicit transition to axis mode

Function
The control system detects the transition to axis mode automatically from the program
sequence and generates the requisite M70 sequence within the control system. The situation
will dictate which steps are performed. At most, these will include:
1. Stopping the spindle
2. Switching on of the position control, treatment of feedforward control, and parameter
block changeover
3. Position synchronization of the block preparation (internal preprocessing stop, if
necessary)
This function is always active. Explicit programming of M70 in the part program is, therefore,
essentially not necessary.

Procedure
Sequence of the implicit transition to axis mode (M70 is not programmed in the part program):
● Transition from speed control mode (M3, M4, M5, SPCOF, ...) to axis mode:
The transition is detected internally by the control, and an intermediate block is inserted in
front of the block which requests the axis mode. The block created contains the M70
functionality. The execution duration for this block is more or less the same as the time
required to execute a programmed M70 block. Differences may arise in the event of short
switchovers when the spindle is stationary (no braking time) if the implicit generation and
output of the auxiliary function M70 to the PLC is dispensed with (see MD35035).
● Transition from positioning mode (M19, SPOS, SPOSA) to axis mode:
The transition is executed immediately and without the generation of an intermediate
block. Configured accordingly (see MD35035), the auxiliary function M70, which is
generated implicitly, is output to the PLC when the block in which the spindle has its axis
mode is loaded.

Output of auxiliary functions to PLC


The implicit transition to axis mode can be notified to the PLC in the form of an auxiliary
function output.
Activation/Deactivation
The activation/deactivation of this functionality is done using machine data:
MD35035 $MA_SPIND_FUNCTION_MASK (spindle functions)

Bit Value Meaning


20 0 No auxiliary function output to the PLC in the case of M70 functionality which is
generated inside the control.
1 In the case of M70 functionality which is generated inside the control, the auxiliary
function M70 is generated and output to the PLC. The address extension
corresponds to the spindle number.

Basic Functions
1234 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

Note
An auxiliary function M70 which is programmed in the part program is always output to the
PLC.

Properties
The properties of the implicitly generated auxiliary function output M70 are "Quick" and
"Output during motion". These properties are fixed settings and are independent of the M70
configuration in the auxiliary-function-specific machine data (MD..._$M..._AUXFU_...).
M70 is only generated once during transition to axis mode. No further M70 auxiliary functions
are generated and output in adjacent blocks in which the spindle is operated as an axis. M70
is not implicitly generated and output again until axis mode is exited via, for example, SPOS,
M3, M4, M5, SPCOF, etc. and following a renewed transition to axis mode.

Constraints
Synchronized actions
When the spindle is programmed as an axis in synchronized actions, it is essential to
continue making provisions in the application to ensure there are criteria for the transition to
axis mode.
If the spindle is in speed control mode, the instruction M70 or SPOS must be programmed
prior to programming as an axis. Otherwise alarm signals occur during axis programming.
FC 18
As with synchronized actions, transition to axis mode must also be undertaken on the
application side in FC 18, e.g. through preparatory positioning instructions. Otherwise, the
FC 18 call is acknowledged with an error bit in the FC 18 status word.
No auxiliary function M70 is implicitly generated in the event of transition to axis mode
through programming via FC 18.

Examples
Example 1:
Part program: Transition from rotating spindle to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1

Program code Comment


N05 M3 S1000
N10 ...
N15 POS[C]=77 ; Before loading N15, an M70 intermediate block is generated
in which the spindle is stopped, and M70 is output to the
PLC.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1235
Spindles (S1)
Operating modes

Example 2:
Part program: Transition from positioning mode to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1

Program code Comment


N05 SPOS=0
N10 ...
N15 C77 ; Output of the implicit M70 to the PLC, no intermediate
block.

Example 3:
Synchronized actions: Transition from spindle positioning mode to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1

Program code Comment


WHEN COND1==TRUE DO SPOS=180
WHEN COND2==TRUE DO POS[C]=270 ; Output of the implicit M70 to the PLC.

Example 4:
Synchronized actions: Transition from speed control mode to axis mode with M70
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1

Program code Comment


WHEN COND11==TRUE DO M3 S1000
WHEN COND12==TRUE DO M70 ; Output of M70 to the PLC.
WHEN COND13==TRUE DO POS[C]=270 ; No generation of an implicit M70 because
axis mode already exists.

Example 5:
Synchronized actions: Invalid transition from speed control mode to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1

Program code Comment


WHEN COND21==TRUE DO M3 S1000
WHEN COND22==TRUE DO POS[C]=270 ; Alarm 20141!

Basic Functions
1236 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Operating modes

15.2.7 Initial spindle state

Initial spindle state


The following machine data is used to specify a spindle mode as initial state:
MD35020 $MA_SPIND_DEFAULT_MODE

Value Initial spindle state


0 Speed control mode, position control deselected
1 Speed control mode, position control activated
2 Positioning mode
3 Axis mode

Time when the initial spindle state takes effect


The time when the initial spindle state takes effect is set in the machine data:
MD35030 $MA_SPIND_DEFAULT_ACT_MASK

Value Effective time


0 POWER ON
1 POWER ON and program start
2 POWER ON and RESET (M2/M30)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1237
Spindles (S1)
Reference/synchronize

15.3 Reference/synchronize

Why synchronize?
In order to ensure that the control detects the exact position of the spindle when it is
switched on, the control must be synchronized with the position measuring system of the
spindle.
The following functions are possible only with a synchronized spindle:
● Thread cutting
● Rigid tapping
● Axis programming
References:
For further explanations about synchronization of the spindle, refer to Function Manual,
Searching for reference (R1).

Why reference?
In order to ensure that the control detects the exact machine zero when it is switched on, the
control must be synchronized with the position measurement system of the rotary axis. This
process is known as referencing. The sequence of operations required to home an axis is
known as homing.
Only a homed axis can approach a programmed position accurately on the machine.
References:
For further explanations about referencing the rotary axis, refer to Function Manual,
Searching for reference (R1).

Installation position of the position measurement system


The position measurement systems can be installed as follows:
● Direct on the motor in combination with a Bero proximity switch on the spindle as a zero-
mark encoder
● On the motor via a measuring gearbox in combination with a Bero proximity switch on the
spindle as a zero-mark encoder
● Directly on the spindle
● On the spindle via a measuring gearbox in combination with a Bero proximity switch on
the spindle as a zero-mark encoder (only with ratios not equal to 1:1)
Where two position measuring systems are provided, they can be installed either in the
same location or separately.

Basic Functions
1238 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Reference/synchronize

Synchronization procedure
When the spindle is switched on, the spindle can be synchronized as follows:
● The spindle is started with a spindle speed (S value) and a spindle rotation (M3 or M4) and
synchronized with the next zero mark of the position measurement system or with the
next Bero signal.
● The spindle is to be positioned from standstill using SPOS, M19 or SPOSA. The spindle
synchronizes with the next zero mark of the position measurement system or with the
next Bero signal. It is then positioned to the programmed position.
● The spindle can be synchronized from the movement (after M3 or M4) using SPOS, M19 or
SPOSA.
The responses are as follows:
– With SPOS=<Pos>, SPOS=DC(<Pos>) and SPOS=AC(<Pos>), the direction of motion
is retained and the position is approached.
– With SPOS = ACN(<Pos>) or SPOS = ACP(<Pos>), the position is always
approached with a negative or positive direction of motion. If necessary, the direction
of motion is inverted prior to positioning.
● Crossing the zero mark in JOG mode by means of direction keys in speed control mode.

Note
If does not make any difference whether the synchronization procedure is initiated from
the part program, FC 18 or synchronized actions.

Note
During synchronization of the spindle, all four possible home position values are effective
depending on the measuring system selected. The measurement system offset has the
same effect.
The following machine data must be observed:
• MD34080 $MA_REFP_MOVE_DIST
(Reference point distance/destination point for a distance-coded system)
• MD34090 $MA_REFP_MOVE_DIST_CORR
(Reference point offset/absolute offset, distance-coded)
• MD34100 $MA_REFP_SET_POS
(Reference point value, with distance-coded system without any significance)
If a non-homed spindle with SPOS=IC(...) and a path < 360 degrees is positioned, it
may be the case that the zero mark is not crossed and the spindle position is still not
synchronized with the zero mark. This can happen:
• after POWER ON
• by setting the axial NC/PLC interface signals:
DB31, ... DBX17.5 (Resynchronize spindle during positioning 2)
DB31, ... DBX17.4 (Resynchronize spindle during positioning 1)

Special features for synchronization with BERO


The position falsification caused by the signal delay with BERO can be corrected internally in
the NC by entering a signal runtime compensation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1239
Spindles (S1)
Reference/synchronize

The signal runtime compensation is set by means of the machine data:


● MD31122 $MA_BERO_DELAY_TIME_PLUS
(BERO delay time for a positive direction of motion)
● MD31123 $MA_BERO_DELAY_TIME_MINUS
(BERO delay time for a negative direction of motion)
The effect depends on the setting in machine data:
MD34200 $MA_ENC_REFP_MODE (referencing mode)

MD34200 = 7 The setting MD34200 $MA_ENC_REFP_MODE = 7 only executes


position synchronization at a velocity/speed which is fixed in machine
data:
MD34040 $MA_REFP_VELO_SEARCH_MARKER (reduced velocity)
The zero mark is not automatically sought, it has to be requested
explicitly with the 0-1 edge of the NC/PLC interface signal:
DB31, ... DBX16.4/5 (Resynchronize spindle 1/2*)
*) 1/2 stands for the selected measuring system.
The velocity defined in MD34040 is also effective when referencing in
JOG-REF mode and through the part program with G74.
MD34200 = 2 Setting MD34200 $MA_ENC_REFP_MODE = 2 executes position
synchronization without specifying a specific velocity/speed.

Note
Compensating the signal runtime via the NC requires the use of SIMODRIVE 611D drives.
Signal propagation delays are preset on delivery so that the content generally does not have
to be changed.

Homing sequence
If the spindle is to be programmed in axis mode directly after control power up, it must be
ensured that the axis is homed.
When the control is switched on, the spindle can be homed (condition is one zero mark per
revolution).
References:
For information about the referencing procedure, refer to Function Manual, Searching for
reference (R1).
The rotary axis is referenced at the same time as the spindle is synchronized (see
"Synchronization procedure") if the position measuring system used for the spindle is also
used for the rotary axis.

Basic Functions
1240 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Reference/synchronize

Position measurement systems, spindle


The spindle can be switched from spindle mode to axis mode (rotary axis) if a single motor is
used for spindle mode and axis mode.
The spindle (spindle mode and axis mode) can be equipped with one or two position
measurement systems. With two position measurement systems, it is possible to assign one
position measurement system to the spindle and the other to the rotary axis, or to assign two
position measurement systems to the spindle. Where two position measurement systems
are provided, both are updated by the control, but only one can be active.
The active position measuring system is selected with the NC/PLC interface signal:
DB31, ... DBX1.5 (position measuring system 1)
or
DB31, ... DBX1.6 (position measuring system 2).
The active position measurement system is required for the following functions:
● Position control of the spindle (SPCON)
● Spindle positioning (SPOS, M19 and SPOSA)
● Thread cutting (G33, G34, G35)
● Tapping without a compensating chuck (G331, G332)
● Revolutional feedrate (G95)
● Constant cutting rate (G96, G961, G97, G971)
● Spindle actual speed display
● Axis mode
● Synchronous spindle setpoint value linkage.

Resynchronizing the position measuring system for the spindle


In the following cases, the spindle position measurement system must be resynchronized:
● The position encoder is on the motor, a Bero proximity switch is mounted on the spindle
and a gear step change is performed. Synchronization is triggered internally once the
spindle is rotating in the new gear step (see Synchronization procedure).
● The machine has a selector switch for a vertical and horizontal spindle. Two different
position encoders are used (one for the vertical spindle and one for the horizontal
spindle), but only one actual value input is used on the control. When the system
switches from the vertical to the horizontal spindle, the spindle must be resynchronized.
This synchronization is initiated with the NC/PLC interface signal:
DB31, ... DBX16.4 (Resynchronize spindle 1)
or
DB31, ... DBX16.5 (Resynchronize spindle 2)
The spindle must be in open-loop control mode.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1241
Spindles (S1)
Configurable gear adaptation

15.4 Configurable gear adaptation

15.4.1 Gear steps for spindles and gear step change

Why do we need gear steps?


gear steps are used on spindles to step down the speed of revolution of the motor in order to
generate a high torque at low spindle speeds or to step up in order to maintain a high speed.

No. of gear steps


5 gear steps can be configured for each spindle.
The number of used gear steps is defined in machine data:
MD35090 $MA_NUM_GEAR_STEPS

Parameterization of the gear steps


The gear steps 1 to 5 can be parameterized via the following machine data:

Machine data Description


MD35012 $MA_GEAR_STEP_CHANGE_POSITION[n] Gear step change position
MD35110 $MA_GEAR_STEP_MAX_VELO[n] Maximum speed for automatic
gear step change
MD35120 $MA_GEAR_STEP_MIN_VELO[n] Minimum speed for automatic
gear step change
MD35130 $MA_GEAR_STEP_MAX_VELO_LIMIT[n] Maximum speed of gear step
MD35135 $MA_GEAR_STEP_PC_MAX_VELO_LIMIT[n] Maximum speed of gear step in
position control
MD35140 $MA_GEAR_STEP_MIN_VELO_LIMIT[n] Minimum speed of gear step
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL[n] Acceleration in speed control
mode
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL[n] Acceleration in position control
mode
MD35300 $MA_SPIND_POSCTRL_VELO[n] Position control activation speed
MD35310 $MA_SPIND_POSIT_DELAY_TIME[n] Positioning delay time
MD35550 $MA_DRILL_VELO_LIMIT[n] Maximum speed for tapping
without compensating chuck

Basic Functions
1242 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Type of gear step change


The type of gear step change is set in machine data:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE

Bit Value Description


0 0 The spindle motor is attached to the spindle directly (1:) or with a non-variable
transmission ratio (basic setting).
The machine data of the first gear step are effective.
1 Spindle motor with up to 5 gear steps.
The gear step change takes place:
• in oscillation mode
• at indefinite change position
1 0 Meaning as in Bit 0 = 0.
1 Meaning as in Bit 0 = 1, however, the gear step change takes place at the configured
spindle position.
The change position is set in machine data:
MD35012 $MA_GEAR_STEP_CHANGE_POSITION
The position is approached in the current gear step before the gear step change.
If Bit 1 is set, the Bit 0 is ignored!
3 1 The gear step change dialog between NCK and PLC is simulated.
5 1 The second gear step data set is used while tapping with G331/G332 (see the
following paragraph "Second gear step data set"). The bit must be set for the master
spindle used during the tapping.

Requirement for a gear step change


In principle, the gear step change is only performed if the requested gear step is not the
same as the active gear step.

Parameter set selection during gear step change


The servo parameter set is also changed over with the gear step if:
MD35590 $MA_PARAMSET_CHANGE_ENABLE = 0 or 1
For further information. please refer to Chapter "Parameter set selection during gear step
change (Page 1253)".

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1243
Spindles (S1)
Configurable gear adaptation

Request gear step change


A gear step change can be requested:
● in the part program:
– automatically through the programmed spindle speed in M40
or
– through direct programming with M41 to M45
● through the PLC using the FC18 function block
● through synchronized actions with M40 and S or M41 to M45
● in the reset state through description of NC/PLC interface:
DB31, ... DBX16.0-16.2 (actual gear step A to C)
The mechanically active gear step can be communicated to the NC especially after a
POWER ON.

Note
If the spindle motor is attached to the spindle directly (1:1) or with a non-variable
transmission ratio (MD35010 = 0), then the M40 and M41...M45 auxiliary functions are not
relevant to this spindle.

Basic Functions
1244 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Gear step change


Gear step selection between two gear steps with specification of a maximum spindle speed
is shown in the example below:

0RWRUVSHHG
UHYPLQ
,QWKHFDVHRIDXWRPDWLFJHDUVWHSVHOHFWLRQ
WKLVVSHHGUDQJHLVQRWXWLOL]HGWRIXOODGYDQ
WDJHLQJHDUVWHS
0D[PRWRUVSHHG
*HDU
VWHS
*HDU
VWHS

6SLQGOHVSHHG UHYPLQ

Q PD[ Q PD[

J PD[

J PLQ J PLQ J PD[

6SHFLILDEOHXVLQJ0'*($5B67(3B0$;B9(/2

Q PD[  0D[LPXPVSLQGOHVSHHGIRUJHDUVWHS


J PLQ  0LQLPXPVSLQGOHVSHHGIRUJHDUVWHS
DXWRPDWLFJHDUVWHSVHOHFWLRQ
J PD[  0D[LPXPVSLQGOHVSHHGIRUJHDUVWHS
DXWRPDWLFJHDUVWHSVHOHFWLRQ
Q PD[  0D[LPXPVSLQGOHVSHHGIRUJHDUVWHS

J PLQ  0LQLPXPVSLQGOHVSHHGIRUJHDUVWHS


DXWRPDWLFJHDUVWHSVHOHFWLRQ
J PD[  0D[LPXPVSLQGOHVSHHGIRUJHDUVWHS
DXWRPDWLFJHDUVWHSVHOHFWLRQ

Figure 15-4 gear step change with selection between two gear steps

Process sequence of the gear step change


If the new gear step is preselected, the following sequence is implemented:
1. Changeover sequence
The two following NC/PLC interface signals are set:
DB31, ... DBX82.0-82.2 (actual gear step A to C)
DB31, ... DBX82.3 (change over gear step)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1245
Spindles (S1)
Configurable gear adaptation

In accordance with the point at which NC/PLC IS:


DB31, ... DBX18.5 (Oscillation speed)
is set, the spindle decelerates to a standstill at the acceleration for oscillation or at the
acceleration for speed control/position control.
Oscillation can be activated at the latest when the spindle reaches a standstill:
DB31, ... DBX61.4 (Axis/Spindle stationary)
with NC/PLC IS:
DB31, ... DBX18.5 (Oscillation speed).
In principle, the new gear step can also be engaged without oscillation
When the new gear step is engaged, the following NC/PLC interface signals are set by
the PLC program:
DB31, ... DBX16.0-16.2 (actual gear step A to C)
DB31, ... DBX16.3 (gear is changed)
2. End of gear step change
The gear step change is treated as completed (spindle operation type "oscillation mode"
is deselected), if the NC/PLC interface signal:
DB31, ... DBX16.3 (gear is changed)
is set.
The new actual gear step is changed to the servo and interpolation parameter set when
the motor is stationary.
With NC/PLC interface signal:
DB31, ... DBX16.3 (gear is changed)
is used to communicate to the NC that the new gear step is valid and the oscillation mode
can be completed.
NC/PLC IS:
DB31, ... DBX82.3 (Change gear)
is reset by the NCK,
which causes the PLC program to reset NC/PLC IS:
DB31, ... DBX16.3 (Gear changed).
In this case, it does not matter whether NC/PLC IS:
DB31, ... DBX18.5 (oscillation mode)
is still set.
The actual gear step, which should correspond to the set gear step, is relevant
for selecting the parameter set.
If this is not the case, then Alarm 22010:
MD11410 $MN_SUPPRESS_ALARM_MASK, Bit 3 = 0
is output.
Following acknowledgment of gear step change via the PLC
with NC/PLC IS:
DB31, ... DBX16.3 (Gear changed)
the spindle is in speed control mode (DB31, ... DBX84.7).
For further instructions on signal exchange between PLC and NC, see:
References:
/FB1/ Function Manual - Basic Functions; Diverse NC/PLC Interface Signals and
Functions (A2)

Basic Functions
1246 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Second gear step data set


The automatic gear step change M40 can be extended by a second configurable gear step
data set.
The second gear step data set is used exclusively in connection with tapping without
compensation chuck (G331, G332) so that an effective adjustment of spindle speed and
motor torque can be achieved.
The activation is undertaken by setting the following bit for the master spindle:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE, Bit 5 = 1
The number of used gear steps of the two gear step datasets is defined with the machine
data:
MD35092 $MA_NUM_GEAR_STEPS2
The second gear step block dataset is deactivated if:
MD35092 $MA_NUM_GEAR_STEPS2 = 0 (basic setting)
The first gear step dataset then selects the gear step when M40 is active.

Note
The number of gear steps in the second data set can vary from the first. If no appropriate
gear step is found for a programmed speed for M40, then - as before - no gear step change
is carried out.
For more information about a typical program sequence in thread cutting without
compensating chuck G331/G332 refer to:
References:
/PG/ Programming Manual - Fundamentals; Chapter: Programming motion commands

The gear steps 1 to 5 of the second gear step dataset can be parameterized via the following
machine data:

Machine data Description


MD35112 $MA_GEAR_STEP_MAX_VELO2[n] Maximum speed for automatic gear step
change
MD35122 $MA_GEAR_STEP_MIN_VELO2[n] Minimum speed for automatic gear step
change
MD35212 $MA_GEAR_STEP_POSCTRL_ACCEL2[n] Acceleration in position control mode

Note
The number of servo parameter sets concerning the mechanical factors remain unchanged.
Furthermore, five mechanical gear steps for the spindle and one for the axis operation can
be configured.

The speed limitations are configured only once for each gear step with the following machine
data, independently of the different switching thresholds:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1247
Spindles (S1)
Configurable gear adaptation

Machine data Description


MD35130 $MA_GEAR_STEP_MAX_VELO_LIMIT[n] Maximum speed of gear step
MD35140 $MA_GEAR_STEP_MIN_VELO_LIMIT[n] Minimum speed of gear step
For tapping without compensating chuck (G331, G332) the speed can be limited to the linear
acceleration range of the motor additionally. For this, the maximum speed of the linear motor
characteristics range is specified in the following machine data as a function of the gear step:
MD35550 $MA_DRILL_VELO_LIMIT[n]

Specify gear step in the part program


Automatic selection with active M40
The gear step is automatically selected by the control. The gear step in which the
programmed spindle speed (S value) is possible is checked in this context. If a gear step
results from this that is not equal to the current (actual) gear step, then the following NC/PLC
interface signals are set:
DB31, ... DBX82.3 (change over gear step)
DB31, ... DBX82.0-82.2 (actual gear step A to C)
While the appropriate gear step is being determined, a gear step change is only requested if
the new speed is not within the permissible speed range of the active gear step.
The speed is limited to the maximum speed of the current gear step or raised to the
minimum speed of the current gear step and the appropriate NC/PLC interface signal is set:
DB31, ... DBX83.1 (Setpoint speed restricted)
DB31, ... DBX83.2 (Setpoint speed restricted)

Basic Functions
1248 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

6SHHG
UHYPLQ

0D[LPXPVSLQGOHVSHHG
0D[LPXPVSHHGRIJHDUVWHS
0D[LPXPVSHHGIRUWKHDXWRPDWLF
JHDUVWHSFKDQJHRIJHDUVWHS

0D[LPXPVSHHGRIJHDUVWHS
0D[LPXPVSHHGIRUWKHDXWRPDWLF
JHDUVWHSFKDQJHRIJHDUVWHS

0LQLPXPVSHHGIRUWKHDXWRPDWLF
JHDUVWHSFKDQJHRIJHDUVWHS
0LQLPXPVSHHGIRUWKHDXWRPDWLF 0LQLPXPVSHHGRIJHDUVWHS
JHDUVWHSFKDQJHRIJHDUVWHS
0LQLPXPVSHHGRIJHDUVWHS


7UDQVPLVVLRQ
VWDJH

7UDQVPLVVLRQ
VWDJH

Figure 15-5 Example for two gear steps with overlapping speed ranges for automatic gear step
change (M40)

Note
In the case of M40, the spindle must be in open-loop control mode for automatic gear step
selection with an S value. Otherwise the gear step change is rejected and the following alarm
is set:
Alarm 22000 "gear step change is not possible"

Note
An active reduction gear is not considered in the selection for the automatic gear step
change.

Permanently defining the gear step with M41 to M45


The gear step can be permanently defined in the part program with M41 to M45.
If a gear step is specified via M41 to M45 that is not equal to the current (actual) gear step,
then the following NC/PLC interface signals are set:
DB31, ... DBX82.3 (change over gear step)
DB31, ... DBX82.0-82.2 (actual gear step A to C)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1249
Spindles (S1)
Configurable gear adaptation

The programmed spindle speed (S value) then refers to this permanently defined gear step:
● If a spindle speed is programmed and it is more than the maximum speed of the
permanently defined gear step (MD35130 $MA_GEAR_STEP_MAX_VELO_LIMIT), then
the speed is decreased to this limit and the following NC/PLC interface signal is set:
DB31, ... DBX83.1 (Setpoint speed restricted)
● If a spindle speed is programmed and it is less than the minimum speed of the
permanently defined gear step (MD35140 $MA_GEAR_STEP_MIN_VELO_LIMIT), then
the speed is increased to this minimum and the following NC/PLC interface signal is set:
DB31, ... DBX83.2 (Setpoint speed restricted)
Block change
When programming the gear step change in the part program, the gear step change set
remains active until the gear step change is aborted by PLC.
This corresponds to the effect as if the following NC/PLC interface signal were set:
DB21, ... DBX6.1 (read-in disable)

Specification of gear step via PLC with FC18


The gear step change can also be performed by function block FC18 during a part program,
in the reset state or in all operating modes.
If the speed and direction of rotation is specified with FC18, the NC can be requested to
select the gear step as appropriate for the speed. This corresponds to an automatic gear
step change with M40.
The gear step is not changed if:
● the spindle is positioned via FC18.
● the spindle is traversed in the axis mode.
Further instructions on function block FC18 can be found under:
References:
/FB1/ Function Manual Basic Functions; PLC Basic Program (P3)

Specification of a gear step in synchronized actions


The gear step change can be requested by synchronized actions:
● through the automatic gear step change for M40 with S.
or
● through specification of gear steps 1 to 5 with M41 to M45.

Basic Functions
1250 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

The gear step is not changed if:


● the spindle is positioned via synchronized actions.
● the spindle is traversed in the axis mode.

Note
For further details, please refer to the section "Specification of a gear step in part
program".
Exception:
The block change is not affected by the specification of a gear step in synchronized
actions.

Manual specification of a gear step


Outside a part program that is running, the gear step can also be changed without a request
from the NC or the machine. This is the case, for example, when a gear step is changed
directly by hand.
To select the appropriate parameter set, the NC must be informed of the current gear step.
For this to work, the control or the part program must be in the reset state.
Constraints
Transfer of the gear step to the NC is initiated when
NC/PLC IS:
DB31, ... DBX16.0-16.2 (Actual gear step A to C) changes.
These three bits must be set continuously during operation.
Successful transfer is acknowledged with NC/PLC IS:
DB31, ... DBX82.0-82.2 (Set gear step A to C)
to the PLC.
NC/PLC IS:
DB31, ... DBX16.3 (Gear changed)
must not be set.
If position control is active when a new gear step is specified by PLC with
DB31, ... DBX16.0-16.2, then it is switched off for the duration of this changeover sequence.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1251
Spindles (S1)
Configurable gear adaptation

NC stop during gear step change


The spindle cannot be stopped with NC/PLC IS:
DB21, ... DBX7.4 (NC stop)
if:
● the spindle is not yet in oscillation mode for the gear step change.
● NC/PLC IS:
DB31, ... DBX16.3 (Gear changed)
is not set.

Note
Options for aborting:
DB31, ... DBX2.2 (Delete distance-to-go/Spindle reset)
or
DB31, ... DBX16.3 (Gear changed)
with corresponding acknowledgment from actual gear step:
DB31, ... DBX16.0-16.2 (Actual gear step).

Spindle response after a gear step change


How the spindle behaves once the gear step has been changed depends on the following
initial conditions:
● If the spindle was in the stop state before the gear step change (M5, FC18: "Stop rotate
spindle"), in positioning or axis mode, M5 (spindle stop) is active after completion of the
gear step change.
● If a direction of rotation
(M3, M4, or FC18: "Start spindle rotation"), then the last speed and direction of rotation will
become active again after the gear step change. In the new gear step, the spindle
accelerates to the last spindle speed programmed (S value).
● If position control was active before the gear step change (SPCON), then it is reactivated
after the gear step change.
The next block in the part program can be executed.

Basic Functions
1252 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Special points to be noted


The following points must be observed on gear step change:
● The gear step change is not terminated by selecting
NC/PLC IS:
DB31, ... DBX20.1 (Ramp-up switchover to V/f mode).

Setpoint 0 is output.
The gear step change is acknowledged as usual
via the NC/PLC interface signal:
DB31, ... DBX16.3 (gear is changed)
● The "Ramp-function generator rapid stop" signal must be reset by the PLC before the
gear step change is completed by the PLC.
● The process sequence of the gear step change is ended during NC reset without any
alarm output.
The gear step output with NC/PLC IS:
DB31, ... DBX16.0-16.2 (Actual gear step A to C)
is applied by the NC.

Star-/Delta switchover with FC17


Digital main spindle drives can be switched in both directions between star and delta using
FC17, even when the spindle is running. This automatic switchover is controlled by a defined
logic circuit in FC17, which provides the user with a configurable switchover time for the
relevant spindle.
Further instructions on function block FC17 can be found under:
References:
/FB1/ Function Manual Basic Functions; PLC Basic Program (P3)

15.4.2 Parameter set selection during gear step change

Servo parameter sets


The servo parameter sets 1 to 6 adapt the position controller to the changed properties of
the machine during a gear change of the spindle.

Parameter set selection during gear step change


The gear step parameter set (interpolation parameters) and, depending on the setting in the
following machine data, the servo parameter set are also modified during gear step change.
MD35590 $MA_PARAMSET_CHANGE_ENABLE (parameter set change possible)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1253
Spindles (S1)
Configurable gear adaptation

Value Description
0 In-system parameter set selection
The parameter sets of the servo are assigned permanently.
The following applies:
• For axes and spindles in the axis mode, the first parameter set is active in principle.
Exception:
In G33, G34, G35, G331 and G332 the parameter set for the involved axes is activated
with the following number:
Master spindle gear step + 1 (corresponds to parameter set No. 2 ... 6)
• For spindles in the spindle mode, the parameter set is set matching the gear step.
1 Besides the in-system parameter set selection, there is also the option of an "external"
parameter set selection.
• by the PLC (DB31, ... DBX 9.0 - 9.2)
• via programming of SCPARA in the part program or in synchronized actions
However, the in-system parameter set selection has priority.
Note: Value 1 is relevant only to axes.
2 The servo parameter set is specified exclusively by the PLC (DB31, ... DBX 9.0 - 9.2) or
through the programming of SCPARA in the part program or in synchronized actions (for axes
and spindles).
The 1st parameter set is selected after POWER ON.

Spindle mode
MD35590 $MA_PARAMSET_CHANGE_ENABLE = 0 or 1
The parameter set is selected according to the gear step + 1.
The active gear step is located in:
DB31, ... DBX16.0-16.2 (actual gear step A to C)
The active parameter set is output in:
DB31, ... DBX69.0-69.2 (controller parameter set A to C)
One set of parameters, with the following assignment, is provided by the NC for each of the
5 gear steps:

Dataset for ... NC/PLC interface Parameter set Parameter set


DBX 69.2/69.1/69.0 Number Index [n]
Axis mode last active gear step 1 0
gear step 1 001 2 1
gear step 2 010 3 2
gear step 3 011 4 3
gear step 4 100 5 4
gear step 5 101 6 5
110
111

Basic Functions
1254 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Spindle in axis mode


If the spindle is in axis mode, the parameter set index "0" is selected in the servo (note
MD35590 $MA_PARAMSET_CHANGE_ENABLE!).
The gear step change behavior depends on the setting in the machine data:
MD35014 $MA_GEAR_STEP_USED_IN_AXISMODE (gear step for axis mode in M70)
If there is no gear step configured for axis mode (MD35014 = 0), no implicit gear step
change takes place in M70 (default setting!). The last gear step is saved internally and is
reactivated with the associated parameter set during the next spindle programming.
If, however, a gear step is configured for axis mode (MD35014 = 1 ... 5), a gear step change
to gears 1 ... 5 takes place during the execution of M70. When changing from axis mode to
spindle mode, the gear step loaded with M70 remains activated. The gear step which is
activated in spindle mode prior to M70 is not automatically loaded again.
See also "Configurable gear step in M70 (Page 1270)".

Load gearbox transmission ratio


It is possible to configure positive or negative load gearbox factors for each gear step and in
axis mode.
The setting is undertaken separately for numerator and denominator via the machine data:
MD31050 $MA_DRIVE_AX_RATIO_DENOM[n] (load gearbox denominator)
MD31050 $MA_DRIVE_AX_RATIO_DENOM[n] (load gearbox numerator)
The setting range is the same size for positive and negative load gearbox factors.
It is not possible to enter the value 0.

Note
If an indirect encoder is configured, and the load gearbox transmission ratio changes, then
the reference is lost and the NC/PLC interface signal:
DB31, ... DBX60.4/60.5 (referenced/synchronized 1 or 2)
is reset for the relevant measuring system.

References
For further information about control and servo parameter set, please refer to:
Function Manual - Basic Functions; Velocities, Setpoint-Actual Value Systems, Closed-Loop
Control (G2)
Programming Manual, Job Planning; Chapter: Programmable servo parameter set

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1255
Spindles (S1)
Configurable gear adaptation

15.4.3 Intermediate gear

Application and functions


A configured intermediate gear can be used to adapt a variety of rotating tools. The
intermediate gear on the tool side has a multiplicative effect on the motor/load gearbox.
It is set via machine data:
MD31066 $MA_DRIVE_AX_RATIO2_NUMERA (Intermediate gear numerator)
MD31064 $MA_DRIVE_AX_RATIO2_DENOM (Intermediate gear denominator)
An encoder on the tool for the intermediate gear
is configured with machine data:
MD31044 $MA_ENC_IS_DIRECT2 (Encoder on intermediate gear).
Change parameters for these machine data can be activated with "NewConfig" either using
the SinuCOM-NC commissioning software or via a softkey on the operator panel (HMI). The
existing motor/load gearboxes, on the other hand, are active after POWER ON.

Tool change
If the intermediate gear is changed at the same time as the tool, the user must also
reconfigure the transmission ratio of the numerator and denominator via the machine data of
the intermediate gear.
Example:
In the case of an installed tool with a transmission ratio of 2:1, a suitable intermediate gear is
configured and is activated immediately in the part program with the command NEWCONF.

N05 $MA_DRIVE_AX_RATIO2-NUMERA[AX5] = 2
M10 $MA_DRIVE_AX_RATIO2-DENOM[AX5] = 1
N15 NEWCONF

CAUTION
It remains the task of the user to stop within the appropriate period in order to make
changes to the machine data when required and then activate a "NewConfig".

Basic Functions
1256 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Switchover
Switchover to a new transmission ratio is performed immediately by means of NewConfig.
From a technological viewpoint, the associated mechanical switchover process takes some
time, since, in mechanical terms, a different intermediate gear with rotating tool is being
installed.

Note
At zero speed, switchover is jerk-free. The user is therefore responsible for taking
appropriate precautions.
Applications in which switchover takes place during motion and which require smoothed or
soft speed transition can be handled using existing setpoint speed filters.

For further instructions for control technical dependencies see:


References:
/FB1/ Function Manual, Basic Functions; Speeds, Setpoint/Actual Value System, Control (G2)

15.4.4 Non-acknowledged gear step change

Mode change
A gear step change that has not been acknowledged cannot be interrupted by a change in
operating mode (e.g. switchover to JOG).
The switchover is delayed by the maximum period entered in machine data:
MD10192 $MN_GEAR_CHANGE_WAIT_TIME.
If the gear step change is not acknowledged within this time, the NC will output an alarm:

Further events
Events that initiate reorganization will also wait until a gear step change is completed.
The time entered in machine data:
MD10192 $MN_GEAR_CHANGE_WAIT_TIME
determines how long the control waits before executing the gear step change.
If this time elapses without the gear step change being completed, the NC responds with an
alarm.
The following events have an analog response:
● User ASUB
● Mode change
● Delete distance-to-go
● Axis replacement

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1257
Spindles (S1)
Configurable gear adaptation

● Activate PI user data


● Enable PI service machine data
● Switch over skip block, switch over Dry Run
● Editing in the modes
● Compensation block alarms
● Overstore
● Rapid retraction with G33, G34, G35
● Subroutine level abort, subroutine abort

Response after POWER ON


The active gear step on the machine can be specified by the PLC control after POWER ON
and in the RESET state.
The NCK will then select the appropriate parameter set
and check back the NC/PLC interface signals:
DB31, ... DBX82.0-82.2 (Set gear step A to C)
to the PLC.

15.4.5 Gear step change with oscillation mode

What is oscillation?
Oscillation in this context means that the spindle motor rotates alternately in the clockwise
and counterclockwise directions. This oscillation movement makes it easy to engage a new
gear step.

Oscillation mode
NC/PLC IS:
DB31, ... DBX82.3 (Change gear)
displays that a gear step change is required.
In principle, the new gear step can also be engaged without oscillation
1. MD35010 $MA_GEAR_STEP_CHANGE_ENABLE must be set to 1.
2. NC/PLC interface signals DB31, ... DBX84.6 (oscillation mode) is set.
3. The acceleration is set in the machine data:
MD35410 $MA_SPIND_OSCILL_ACCEL

DB31, ... DBX18.5 (oscillation speed)


The spindle is in oscillation mode if a new gear step was defined using automatic gear step
selection (M40) or M41 to M45 (DB31, ... DBX82.3 (Change gear) is set).

Basic Functions
1258 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

NC/PLC IS:
DB31, ... DBX82.3 (Change gear)
is only enabled when a new gear step is defined
that is not the same as the current actual gear step.
If NC/PLC IS:
DB31, ... DBX18.5 (Oscillation speed)
is simply set by the PLC without a new gear step being defined by the NC,
the spindle does not change to oscillation mode.
Oscillation mode is activated with NC/PLC IS:
DB31, ... DBX18.5 (Oscillation speed).
Depending on NC/PLC IS:
DB31, ... DBX18.4 (Oscillation via PLC)
while the function is in operation, a distinction is made between:
● Oscillation via NCK
● Oscillation via PLC
● Oscillation with FC 18
References:
Function Manual, Basic Functions; PLC Basic Program (P3)

Oscillation time
The oscillation time for oscillation mode can be defined in a machine date for each direction
of rotation:

Oscillation time in M3 direction


(referred to as t1 in the following): MD35440 $MA_SPIND_OSCILL_TIME_CW
Oscillation time in M4 direction
(referred to as t2 in the following): MD35450 $MA_SPIND_OSCILL_TIME_CCW

Oscillation via NCK


Phase 1:
NC/PLC IS:
DB31, ... DBX18.5 (Oscillation speed)
accelerates the spindle motor to the speed (with oscillation acceleration) defined in machine
data:
MD35400 $MA_SPIND_OSCILL_DES_VELO (oscillation speed).
Start direction is defined through the following machine data:
MD35430 $MA_SPIND_OSCILL_START_DIR (Start direction with oscillation)
The time t1 (or t2) is started,
according to which start direction is given in the machine data:
MD35430 $MA_SPIND_OSCILL_START_DIR
The time - and not the fact that the oscillation speed is reached - is always decisive.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1259
Spindles (S1)
Configurable gear adaptation

Phase 2:
If time t1 (t2) has passed, the spindle motor
accelerates in the opposite direction to the speed defined in machine data:
MD35400 $MA_SPIND_OSCILL_DES_VELO.
Time t2 (t1) starts.
Phase 3:
If time t2 (t1) has passed, the spindle motor accelerates in the opposite direction (same
direction as in Phase 1) to the speed defined in machine data:
MD35400 $MA_SPIND_OSCILL_DES_VELO.
Time t1 (t2) starts. The process continues with Phase 2.

Oscillation via PLC


NC/PLC IS:
DB31, ... DBX18.4 (Oscillation via PLC)
and
DB31, ... DBX18.5 (oscillation speed)
accelerates the spindle motor to the speed (with oscillation acceleration) defined in machine
data:
MD35400 $MA_SPIND_OSCILL_DES_VELO (oscillation speed).
The direction of rotation is defined by NC/PLC IS:
DB31, ... DBX18.7 (Set direction of rotation CCW)
and
DB31, ... DBX18.6 (Set direction of rotation CW).
The oscillation movement and the two times t1 and t2 (for clockwise and counterclockwise
rotation) must be simulated on the PLC.

Special points to be noted


Setting/Resetting the NC/PLC IS and machine data in oscillation mode:
● To decelerate the spindle, the PLC user need not set NC/PLC IS:
DB31, ... DBX4.3 (Spindle stop).
The spindle is brought to a standstill internally by the control when a gear step change is
requested.
● The gear step change should always be terminated with NC/PLC IS:
DB31, ... DBX16.3 (Gear changed).
● NC/PLC IS:
DB31, ... DBX18.5 (Oscillation speed)
should be used to support mechanical engagement of the gear.
It has no effect on the internal control mechanism for the gear step change procedure
and should therefore only be set as necessary.

Basic Functions
1260 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

● If NC/PLC IS:
DB31, ... DBX18.5 (Oscillation speed)
is reset, oscillation mode stops.
However, the spindle remains in "oscillation mode".
● The acceleration is defined in the following machine data:
MD35410 $MA_SPIND_OSCILL_ACCEL
● The spindle will cease to be synchronized if an indirect measuring system (motor
encoder) is used.
If the machine data is set to:
MD31050 $MA_ENC_IS_DIRECT = 0,
NC/PLC IS:
DB31, ... DBX60.4/5 = 0 (Homed/Synchronized)
is automatically deleted.
The zero mark is synchronized the next time it is crossed.

End of oscillation mode


On termination of oscillation mode, the spindle returns to open-loop control mode and
automatically changes to the mode defined by SPCON or SPCOF.
All gear-specific limit values (min./max. speed, etc.) correspond to the set values of the
actual gear step.

Functionality
Machine tools of conventional design require a gear step change of the spindle in oscillation
mode.
If the machine data configuration is:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE = 1
the following sequence is implemented:
● Deceleration of the spindle.
The braking action corresponds to an M5 movement.
● Output of VDI interface signals:
DB31, ... DBX84.6 (Oscillation mode)
DB31, ... DBX82.3 (Change gear)
DB31, ... DBX82.0-82.2 (Set gear step A to C).
If position control has been enabled, it is disabled:
DB31, ... DBX61.5 = 0.
● The load gearbox can now "disengage".
● NC/PLC IS:
DB31, ... DBX18.5 (Oscillation enable)
can be set by the PLC.
The spindle motor then performs an oscillation motion with preset values.
The oscillation motion is designed to facilitate and accelerate the re-engaging of the gear
wheels.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1261
Spindles (S1)
Configurable gear adaptation

● Writing of NC/PLC IS:


DB31, ... DBX16.0-16.2 (Actual gear step A to C)
by the PLC.
● Once the PLC has sent:
DB31, ... DBX16.3 (Gear changed)
to the NCK, the last movement to be active is continued, if available.
For indirect encoders (motor encoders), the homing status is cleared:
DB31, ... DBX60.4/5 = 0.

Block change
If the spindle is switched to oscillation mode
with NC/PLC IS:
DB31, ... DBX82.3 (Change gear),
the processing of the part program remains suspended.
A new block is not executed.
If oscillation mode is terminated with NC/PLC IS:
DB31, ... DBX16.3 (Gear changed),
the processing of the part program is resumed.
A new block is executed.

6SLQGOHVSHHG
UHYPLQ

7LPH V

,6*HDUFKDQJHG

%ORFNFKDQJHRFFXUVKHUH

Figure 15-6 Block change following oscillation mode

Basic Functions
1262 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Oscillation mode
Typical time sequence for the gear step change with a spindle:

'%'%; FRQWUROPRGH

'%'%; RVFLOODWLRQPRGH

3URJUDPPHG6YDOXH  

'%'%; JHDULVFKDQJHG

'%'%; FKDQJHJHDUVWDJH

'%'%; VHWJHDUVWDJH$&  

'%'%; VSLQGOHLQVHWSRLQWUDQJH

'%'%; VSLQGOHVWDWLRQDU\

'%'%; DFWXDOJHDUVWDJH$&  

'%'%; RVFLOODWLRQVSHHG

)LUVWJHDUVWDJHHQJDJHG PHFKDQLFDO

6HFRQGJHDUVWDJHHQJDJHG PHFKDQLFDO

,QWHUQDOIHHGGLVDEOH

7 7

6SLQGOHVSHHG

W W W W

t1: With the programming of S1300, NCK detects a new gear step (second gear step), sets NST
DB31, ... DBX82.3 (change gear) and blocks processing for the next part program block (=
internal feed disable*).
t2: The spindle is stationary, and oscillation starts (oscillation via the NCK). NST DB31, ... DBX18.5
(oscillation speed) must be set at the latest by t2.
t3: The new gear step is engaged. The PLC user transmits the new (actual) gear step to the NCK
and sets NST DB31, ... DBX16.3 (gear is changed).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1263
Spindles (S1)
Configurable gear adaptation

t4: NCK then retracts NST DB31, ... DBX82.3 (change gear), ends the oscillation, releases the next
part program block for processing, and accelerates the spindle to the new S value (S1300).
*: The internal feed disable is set if:
• The spindle gear step change has been programmed via the part program and
• A processing block is activated (i.e. G0 is not active)
The internal feed disable is not set during a gear step change from synchronized actions or in
the case of specifications via the PLC with FC 18.
Figure 15-7 Gear step change with stationary spindle

15.4.6 Gear step change at fixed position

Application and advantages


Machine tools increasingly use standardized spindle drives, firstly to save technological dead
time on a gear step change and secondly to gain the cost benefits of using standardized
components.
The gear step change at fixed position function supports the "directed gear step change" of
load gearboxes that need to be activated in a different way than the NC. The gear step
change can in this case only be performed at a defined spindle position. An oscillation
motion as required by conventional load gearboxes is thus no longer necessary.

Sequence for gear step change at fixed position


Gear step change at fixed position
Machine data configuration:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE = 2
runs the following sequence:
● Positioning of the spindle from standstill or movement to the position configured in
machine data:
MD35012 $MA_GEAR_STEP_CHANGE_POSITION.
If the gear step change is performed out of a movement, then the current direction of
rotation is maintained. The spindle is in positioning mode during the positioning action.
NC/PLC IS:
DB31, ... DBX84.5 (positioning mode)
is output.
If no reference is available:
DB31, ... DBX60.4/5 = 0
or NC/PLC IS:
DB 31, ... DBX17.4/5 (Resynchronize on positioning MS 1/2)
is set, the positioning action is extended by the time it takes to find the zero mark.

Basic Functions
1264 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

● After reaching the gear step change position configured in machine data:
MD35012$MA_GEAR_STEP_CHANGE_POSITION
the machine waits for the time in machine data:
MD35310 $MA_SPIND_POSIT_DELAY_TIME
before switching to oscillation mode,
and the known gear step change dialog starts.
● Output of VDI interface signals:
DB31, ... DBX84.6 (Oscillation mode)
DB31, ... DBX82.3 (Change gear)
DB31, ... DBX82.0-82.2 (Set gear step A to C).
● Position control is not disabled when an active measuring system with indirect encoder
(motor encoder) is used:
MD31040 $MA_ENC_IS_DIRECT = 0
If a measuring system with a direct encoder (load encoder) is active, position control is
deactivated:
DB31, ... DBX61.5 = 0,
because the induction flux to the load is interrupted and closed-loop position control is no
longer possible.
● If position-controlled operation is not possible, it can be disabled by
resetting "Servo enable":
DB31, ... DBX2.1 = 0.
● Mechanical switchover of the gear step on the machine.
No oscillation motion is required from the drive.
NC/PLC IS:
DB31, ... DBX18.5 (Oscillation enable)
and
DB31, ... DBX18.4 (Oscillation via PLC)
should not be set.
In principle, oscillation movement is still possible at this point.
● Writing of NC/PLC IS:
DB31, ... DBX16.0-16.2 (Actual gear step A to C)
by the PLC.
● After signal:
DB31, ... DBX16.3 (gear step changed),
the last movement to be active is continued, if available.
For indirect encoders (motor encoders), the homing status is cleared:
DB31, ... DBX60.4/5 = 0.
The spindle is in speed control mode and NC/PLC IS:
DB311, ... DBX84.7 (Open-loop control mode)
is output.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1265
Spindles (S1)
Configurable gear adaptation

Gear step change at fixed position


Typical time sequence for the gear step change at fixed position:

'%'%; SRVLWLRQLQJPRGH

'%'%; FRQWUROPRGH

'%'%; RVFLOODWLRQPRGH

3URJUDPPHG6YDOXH  

'%'%; JHDULVFKDQJHG

'%'%; FKDQJHJHDUV

'%'%; VHWJHDUVWDJH$&  

'%'%; VSLQGOHLQVHWUDQJH

'%'%; VSLQGOHVWDWLRQDU\

'%'%; DFWXDOJHDUVWDJH$&  

'%'%; RVFLOODWLRQVSHHG

)LUVWJHDUVWDJHHQJDJHG PHFKDQLFDO

6HFRQGJHDUVWDJHHQJDJHG PHFKDQLFDO

,QWHUQDOIHHGGLVDEOH

6SLQGOHVSHHG

'%'%; H[DFWVWRSILQH

W W W W W

t1: With the programming of S1300, NCK detects a new gear step (second gear stage), NCK sets
NST DB31, ... DBX84.5 (positioning mode) and blocks processing for the next part program
block (= internal feed disable*).
t2: The spindle is stationary, and exact stop is signaled.
t3: Gear step change - wait time

Basic Functions
1266 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

t4: The new gear step is engaged. The PLC user transmits the new (actual) gear step to the NCK
and sets NST DB31, ... DBX16.3 (gear is changed).
t5: NCK then retracts NST DB31, ... DBX82.3 (change gear), releases the next part program block
for processing, and accelerates the spindle to the new S value (S1300).
*: The internal feed disable is set if:
• The spindle gear step change has been programmed via the part program and
• A processing block is activated (i.e. G0 is not active)
The internal feed disable is not set during a gear step change from synchronized actions or in
the case of specifications via the PLC with FC 18.
Figure 15-8 Gear step change with stationary spindle

Gear step change position MD35012


The gear step change position is defined in machine data:
MD35012 $MA_GEAR_STEP_CHANGE_POSITION
for each gear step.

Gear step change wait time MD35310


After the positioning action the machine waits for the time configured in machine data:
MD35310 $MA_SPIND_POSIT_DELAY_TIME
until gear change request:
DB31, ... DBX84.6 (Oscillation mode)
DB31, ... DBX82.3 (Change gear)
and
DB31, ... DBX82.0-82.2 (Set gear step A to C)
are output.

Position identifiers/position
The position is always approached via the shortest path (corresponds to DC).
If no reference is available and the spindle is in stillstand
(e.g. after Power On), then the direction of travel is determined by the following machine
data:
MD35350 $MA_SPIND_POSITIONING_DIR
If an adjustable gear step change position is required, then this can be achieved by writing
the machine data and by a subsequent NewConfig.
The change of the MD value can be achieved by the part program or HMI.
If the system is unable to reach the preset position, then alarm 22020 is signaled and the
gear step change dialog between NCK and PLC does not take place in order not to destroy
the gears. As this alarm is serious, the part program cannot continue and the cause must be
eliminated under all circumstances Experience has shown that the abortion of positioning is
usually due to incorrect MD settings or incompatible PLC signals.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1267
Spindles (S1)
Configurable gear adaptation

Velocity
The positioning speed is taken from the machine data which is configured depending on the
gear step:
MD35300 $MA_SPIND_POSCTRL_VELO
NC/PLC IS "Spindle speed override"/"Feedrate override" at
DB31, ... DBX17.0=0: DB31, ... DBB19)
as well as:
DB31, ... DBX17.0=1: DB31, ... DBB0
are effective as normal for positioning.
The positioning speed can be changed proportionally through the program instruction
OVRA[Sn].

Note
OVRA[Sn] is valid modally. After the gear step change, a value appropriate for the
machining should be reset.

The part-program instruction FA[Sn] does not change the positioning speed during gear
step change.

Acceleration
The acceleration values are determined by the machine data which is configured depending
on the gear step:
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL
and
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
The acceleration can be changed proportionally by programming ACC[Sn].

Note
ACC[Sn] is valid modally. After the gear step change, a value appropriate for the machining
should be reset.

Speed-dependent acceleration
The "knee-shaped acceleration characteristic" is effective as in positioning with SPOS or
FC18.

Jerk
It is currently not possible to limit the change in acceleration.

Basic Functions
1268 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

End of positioning
The transition between the end of the positioning action (DB31, ... DBX84.5)
and the start of oscillation mode (DB31, ... DBX84.6) is defined on
reaching "Exact stop fine" (DB31, ... DB60.7) and the time value entered in machine data:
MD3510 $MA_SPIND_POSIT_DELAY_TIME.
The determination of the transition condition has an effect firstly on the gear step change
time and secondly on the accuracy of the approach to the preset gear step change position.

Block change
The block change is stopped and the machining blocks are not started until the gear step
has been changed by the PLC (DB31, ... DBX16.3).

End of gear step change


Once the gear step change has been completed, the spindle returns to open-loop control
mode and will automatically change to the controller mode defined by SPCON or SPCOF.
All gear-specific limit values (min./max. speed of gear step, etc.) correspond to the check-
back values of the actual gear step.

Boundary conditions
● The spindle must have at least one measuring system.
● Position-controlled operation must be possible and must have been activated.
● Generally, it must be possible to execute SPOS from the part program, from a
synchronized action or via FC18: “Start spindle positioning” without errors.
Unless all requirements can be met, the function described cannot be used successfully.

Activation
The function of gear step change at fixed position
is activated by the configuration:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE = 2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1269
Spindles (S1)
Configurable gear adaptation

15.4.7 Configurable gear step in M70

Technical background
In some machines the spindle needs to be in a particular gear step during axis mode.
Possible reasons:
● Only one optimization (Kv, feedforward control, filter) to suit a gear step can be found in
the servo parameter set for axis mode (index 0). The machine data for this parameter set
should not be rewritten.
● There is only one mechanical transmission ratio which, unlike the others, possesses little
or no backlash compensation. The spindle can only follow a path motion or
transformations (e.g. TRANSMIT) together with other axes in this gear step.

Function
If the function is activated, a predefined gear step is loaded automatically during transition to
axis mode.
The gear step change is integrated into the M70 process and occurs after spindle
deceleration and before the loading of the servo parameter set with index 0 (note
MD35590 $MA_PARAMSET_CHANGE_ENABLE!).
The typical dialog between NC and PLC which occurs during gear step changes is executed
in a similar way to programmed gear step changes (M41 ... M45).

Requirements
Gear step changes during transition to axis mode require general enabling of the gear step
change via the machine data:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE (assign parameters to the gear step
change).
MD35090 $MA_NUM_GEAR_STEPS (number of gear steps set up)

Activation/Deactivation
The function is activated/deactivated via the machine data:
MD35014 $MA_GEAR_STEP_USED_IN_AXISMODE (gear step for axis mode in M70)

Value Meaning
0 No implicit gear step change occurs in M70. The current gear step is retained (default
setting!).
1 ... 5 A gear step change to gears 1 ... 5 occurs during the processing of M70.

Basic Functions
1270 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Configurable gear adaptation

Boundary conditions
Gear step change at fixed position (MD35010 $MA_GEAR_STEP_CHANGE_ENABLE = 2)
The "gear step change at fixed position" function is supported. The sequence in M70 is then
extended by the time it takes to position the spindle. The position is approached at the
current gear step.
Transition to axis mode without programming M70
The control system detects the transition to axis mode automatically from the program
sequence (see "Implicit transition to axis mode (Page 1234)") and generates the requisite
M70 sequence, including the gear step change, within the control system.
Transition to axis mode with FC 18
Implicit gear step change is not supported in transition to axis mode with the FC 18 ("Start
axis"). This requires the right gear step to be engaged by the PLC application before
switching to axis mode. The gear step change is also possible with the FC 18 ("Start gear
step change").
Change from axis mode to spindle mode
When changing from axis mode to spindle mode, the gear step loaded with M70 remains
activated. The gear stage which is activated in spindle mode prior to M70 is not automatically
loaded again. The servo parameter set is changed from parameter set 1 (index 0) to
parameter sets 2 ... 6 (index 1 ... 5) to suit the gear step (with
MD35590 $MA_PARAMSET_CHANGE_ENABLE < 2).

Example
Gear step 4 should be loaded in the case of spindle transition to axis mode.
Configuration: MD35014 $MA_GEAR_STEP_USED_IN_AXISMODE[<spindle identifier>] = 4

Program code Comment


N05 M3 S1000
N10 G1 X100 F1000
N15 M70 ; Gear step 4 is loaded.
N20 POS[C]=77
N25 ...

Note
MD35014 can be changed in the NewConfig. Thus, the gear step being loaded can still be
changed in the part program before transition to axis mode, if necessary.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1271
Spindles (S1)
Selectable spindles

15.5 Selectable spindles

Application
The "selectable spindles" function allows you to write part programs with reference to the
spindles used ("channel spindle, logical spindle") regardless of the actual assignment of
configured spindles ("physical spindles") to a channel.
The physical spindles loaded or unloaded by "axis replacement" no longer have to be
specified explicitly in the part program.

Functionality
Each spindle is clearly mapped to a machine axis through a configurable number with the
machine data:
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX[AX...].
This number is always valid for a spindle whereby it is irrespective in which channel the
spindle is actively handled.
The channel spindles can be switched over because an intermediate level is introduced
between the logical spindle numbers used in the part program and the physical spindles
existing in the channel.
The setting data table
(SD42800 $SC_SPIND_ASSIGN_TAB[...]; Spindle number converter)
assigns each logical spindle used in the part program a physical spindle.
The spindle number converter is effective in spindle programming by means of:
● The part program
● Synchronized actions
The spindle number converter has no effect with PLC commands, which use function block
FC18. The physical spindle must always be addressed there within the context of the axis.
The logical spindles can be switched by changing the setting data:
SD42800 $SC_SPIND_ASSIGN_TAB[...]
The change can be achieved by the part program, by the PLC and/or HMI.

Note
In setting data:
SD42800 $SC_SPIND_ASSIGN_TAB[0]
contains the logical master spindle.
It is only used for display purposes.
This setting data is defined in the part program by SETMS (logical spindle).
Unused spindles are assigned the value 0 in SD42800.
System variables affected by the spindle mapping table are:
$P_S, $P_SDIR, $P_SMODE, $P_GWPS, $AC_SDIR, §AC_SMODE, $AC_MSNUM, $AA_S.

Basic Functions
1272 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Selectable spindles

References:
/PGA/ Programming Manual, Work Preparation
The converted, physical spindle number is always output as the address extension in the
auxiliary function output.

Constraints
● Switchable channel spindles are not a substitute for the Axis replacement function.
● You can only switch spindles, which have been assigned to the channel by means of
configuration.
● If spindles, which are presently active in another channel, are designated for switchover,
either the "Auto-Get" function is triggered for the physical spindle or alarm 16105
"Assigned spindles do not exist" is output, depending on the configuration variant.
● If the setting data:
SD42800 $SC_SPIND_ASSIGN_TAB[...]
is specified by the PLC or from HMI, then the channel whose table is changed should be
in Reset status or the spindle to be changed should not be used in the running part
program respectively.
A synchronized response can be achieved by means of a STOPRE preprocessor stop.
● The multiple mapping of logical to physical spindles is not prevented in the NC. However,
with the display of logical spindle in the operator interface, there are ambiguities
corresponding to the change table.
● Spindle conversion operates on spindles via FC 18.

Activation
Setting data:
SD42800 $SC_SPIND_ASSIGN_TAB[...]
is enabled by activating machine data:
MD20092 $MC_SPIND_ASSIGN_TAB_ENABLE=1.

Basic position SD42800


After switching on the NC in installation switch position 1 (Delete SRAM)
the setting data:
SD42800 $SC_SPIND_ASSIGN_TAB[...]
is in the basic position.
The numbers of the logical and physical spindles are identical.
SD42800 $SC_SPIND_ASSIGN_TAB[1] = 1
SD42800 $SC_SPIND_ASSIGN_TAB[2] = 2
SD42800 $SC_SPIND_ASSIGN_TAB[3] = 3
SD42800 $SC_SPIND_ASSIGN_TAB[4] = 4
SD42800 $SC_SPIND_ASSIGN_TAB[5] = 5
...

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1273
Spindles (S1)
Selectable spindles

Example
Assumptions: Spindle configurations:
Specifying the spindle number and machine axis

MD35000 $MA_SPIND_ASSIGN_TO_MACHAX [AX4] = 1


MD35000 $MA_SPIND_ASSIGN_TO_MACHAX [AX5] = 2
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX [AX6] = 3
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX [AX7] = 5

Applying a machine axis in the channel

MD20070 $MC_AXCONF_MACHAX_USED[0] = 4
MD20070 $MC_AXCONF_MACHAX_USED[1] = 5
MD20070 $MC_AXCONF_MACHAX_USED[2] = 6
MD20070 $MC_AXCONF_MACHAX_USED[3] = 7

Specifying the master spindle

MD20090 $MC_SPIND_DEF_MASTER_SPIND = 1

Spindle number converter

MD20092 $MC_SPIND_ASSIGN_TAB_ENABLE = 1 Activate spindle number converter


SD42800 $SC_SPIND_ASSIGN_TAB[0] = 1 Master spindle as configured
SD42800 $SC_SPIND_ASSIGN_TAB[1] = 1 Basic table setting
SD42800 $SC_SPIND_ASSIGN_TAB[2] = 2
SD42800 $SC_SPIND_ASSIGN_TAB[3] = 3
SD42800 $SC_SPIND_ASSIGN_TAB[4] = 0 Logical spindle not assigned
M3 S1000 Address extension = 1, M1=3 S1=1000 is output. The spindle with the
configured No. "1" (No. of physical master spindle) rotates.
...
...
SD42800 $SC_SPIND_ASSIGN_TAB[1] = 5 Assignment of logical spindle 1 to
physical spindle 5
SD42800 $SC_SPIND_ASSIGN_TAB[2] = 3 Assignment of logical spindle 2 to
physical spindle 3.
Caution: physical spindle 3 has now been
assigned twice. When programming logical
spindles 2 and 3, physical spindle 3 is
always addressed. In the basic machine
displays, both spindles rotate.
SETMS (2) SD42800 $SC_SPIND_ASSIGN_TAB[0] = 2 defined internally by NCK.
...
M5 Master spindle = address extension = 2, spindle number M3=5
The physical spindle configured with number "3" stops.
...

Basic Functions
1274 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Selectable spindles

GET (S4) Alarm 16105, as logical spindle "4" cannot be switched.


...
RELEASE (S1) Channel spindle "1" = physical. Spindle "5" is enabled.
...
M30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1275
Spindles (S1)
Programming

15.6 Programming

15.6.1 Programming from the part program

Programming statements

Statement Description
SETMS: Master spindle is the spindle specified in the following machine data:
MD20090 $MC_SPIND_DEF_MASTER_SPIND (master spindle reset position in the
channel)
SETMS(<n>): The spindle with the number <n> is the master spindle
(may differ from the reset position:
MD20090 $MC_SPIND_DEF_MASTER_SPIND).
The master spindle must be defined for the following functions:
• G95: Rev. feedrate
• G96 S.../G961 Constant cutting rate in m/min or feet/min
S...:
• G97/G971: CancelG96/G961 and freeze last spindle speed
• G63: Tapping with compensating chuck
• G33/G34/G35: Thread cutting
• G331/G332: Rigid tapping
• G4 S...: Dwell time in spindle revolutions
• Programming M3, M4, M5, S, SVC, SPOS, M19, SPOSA, M40, M41 to M45, and WAITS
without entering the spindle number
The current master spindle setting can be retained via RESET/part program end and part
program start. The setting is done via the machine data:
• MD20110 $MC_RESET_MODE_MASK
• MD20112 $MC_START_MODE_MASK
M3: Clockwise spindle rotation for the master spindle
M<n>=3: Clockwise spindle rotation for spindle number <n>
M4: Counterclockwise spindle rotation for the master spindle
M<n>=4: Counterclockwise spindle rotation for spindle number <n>
M5: Spindle stop without orientation for the master spindle
M<n>=5: Spindle stop without orientation for spindle number <n>
S...: Spindle speed in rpm for the master spindle.
S<n>=...: Spindle speed in rpm for spindle number <n>
SVC=...: Cutting rate in m/min or feet/min for the master spindle
SVC[<n>]=...: Cutting rate in m/min or feet/min for the spindle <n>
SPOS=...: Spindle positioning for the master spindle
SPOS[<n>]=...: Spindle positioning for spindle number <n>
The block change is only performed when the spindle is in position.

Basic Functions
1276 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Programming

Statement Description
SPOSA=...: Spindle positioning for the master spindle
SPOSA[<n>]=...: Spindle positioning for spindle number <n>
The block change is executed immediately. Spindle positioning continues, regardless of
further part program processing, until the spindle has reached its position.
SPOS=DC(...): The direction of motion is retained for positioning while in motion and the position
SPOS[<n>]=DC(...): approached. When positioning from standstill, the position is approached via the shortest
path.
SPOSA=DC(...):
SPOSA[<n>]=DC(...):
SPOS=ACN(...): The position is always approached with negative direction of motion. If necessary, the
SPOS[<n>]=ACN(...): direction of motion is inverted prior to positioning.
SPOSA=ACN(...):
SPOSA[<n>]=ACN(...):
SPOS=ACP(...): The position is always approached with positive direction of motion.
SPOS[<n>]=ACP(...): If necessary, the direction of motion is inverted prior to positioning.
SPOSA=ACP(...):
SPOSA[<n>]=ACP(...):
SPOS=IC(...): The travel path is specified. The direction of travel is determined from the sign in front of
SPOS[<n>]=IC(...): the travel path. If the spindle is in motion, the direction of travel is inverted as necessary to
allow traversing in the programmed direction.
SPOSA=IC(...):
If the zero mark is crossed during traversing, the spindle is automatically synchronized
SPOSA[<n>]=IC(...):
with the zero mark if no reference is available or if a new one has been requested via an
interface signal.
M19: Positioning the master spindle to the position in SD43240
M[<n>]=19: Positioning spindle number <n> to the position in SD43240
The block change is only performed when the spindle is in position.
Bring spindle to standstill and activate position control, select zero parameter set, activate
axis mode
M70: for the master spindle.
M<n>=70: for spindle number <n>
Spindle position control ON
SPCON: for the master spindle
SPCON(<n>): for spindle number <n>
SPCON(<n>,<m>): for spindle numbers <n> and <m>
Spindle position control OFF, activate speed control mode
PCOF: for the master spindle
SPCOF(<n>): for spindle number <n>
SPCOF(<n>,<m>): for spindle numbers <n> and <m>
FPRAON(S<n>): Revolutional feedrate for spindle <n> ON, derived from the master spindle
FPRAON(S<n>,S<m>): Revolutional feedrate for spindle <n> ON, derived from spindle <m>
The revolutional feedrate value must be specified with FA[S<m>].
FPRAOF(S<n>): Revolutional feedrate for spindle <n> OFF
C30 G90 G1 F3600 Rotary axis C (spindle in axis mode) travels to the position 30 degrees at a speed of 3600
degrees/min = 10 rpm

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1277
Spindles (S1)
Programming

Statement Description
Programmable minimum spindle speed limitation
G25 S...: for the master spindle
G25 S<n>: for spindle number <n>
Programmable maximum spindle speed limitation
G26 S...: for the master spindle
G26 S<n>: for spindle number <n>
Programmable maximum spindle speed limitation with G96, G961, G97
LIMS=...: for the master spindle
LIMS[<n>]=...: for spindle number <n>
WAITS: Synchronization command for master spindle
The subsequent blocks are not processed until the spindle programmed in a previous NC
block with SPOSA has reached its position (with exact stop fine).
WAITS after M5: Wait until the spindle is stationary.
WAITS after M3/M4: Wait for the spindle to reach its setpoint speed.
WAITS(<n>): Synchronization command for spindle number <n>
WAITS(<n>,<m>): Synchronization command for spindle numbers <n> and <m>
FA[S<n>]: Programming of positioning speed (axial feed) for spindle <n> in [deg/min]
With FA[S<n>]=0, the configured value takes effect once more:
MD35300 $MA_SPIND_POSCTRL_VELO
OVRA[S<n>]: Programming of the axial override value for spindle <n> in [%]
ACC[S<n>]: Programming of the axial acceleration capacity of spindle <n> in [%]

Basic Functions
1278 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Programming

Statement Description
SPI(<n>): With SPI(<n>) a spindle number is converted into the data type AXIS according to
machine data
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX[ ].
SPI is used if axis functions are to be programmed with the spindle.
The following instructions are possible with SPI:
• Frame instructions:
– CTRANS()
– CFINE()
– CMIRROR()
– CSCALE()
• Velocity and acceleration values for following spindles:
– FA[SPI(<n>)]
– ACC[SPI(<n>)]
– OVRA[SPI(<n>)]
• System variables:
– $P_PFRAME[SPI(<n>),TR]=<value>
– $P_PFRAME=
CTRANS(X,<axis value>,Y,<axis value>,SPI(<n>),<axis value>)
– $P_PFRAME=
CSCALE(X,<scale>,Y,<scale>,SPI(<n>),<scale>)
– $P_PFRAME=CMIRROR(S<n>,Y,Z)
– $P_UBFR=CTRANS(A,10) : CFINE (19,0.1)
For further explanations about the programming of SPI, see:
References:
Programming Manual, Work Preparation.
M40: Automatic gear step selection for the master spindle
M<n>=40: Automatic gear step selection for spindle number <n>
M41 to M45: Select gear step 1 to 5 for the master spindle.
M<n>=41 to M<n>=45: Select gear step 1 to 5 for spindle number <n>.

Note
M functions M3, M4, M5, and M70 are not output in DB21, ... DBB194 and DBB202 if a
spindle is configured in a channel. These M functions are offered as extended M functions in
DB21, ... DBB68 ff. and in the respective axis DB, DB31, ... DBB86 ff.

References
More detailed explanations for programming the spindle can be found in:
● Programming Manual, Fundamentals

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1279
Spindles (S1)
Programming

15.6.2 Programming via synchronized actions


M functions M40 to M45 can also be programmed in synchronized actions.
Please note:
● The programming of M40 ... M45 in the part program has no effect on the current status
of the automatic gear step change of synchronized actions, and vice versa.
● When programming S values with M40, automatic gear step change is effective
separately for synchronized actions and the part program.
● M40 is deactivated after POWER ON.
The gear step is not adjusted if an S value is specified from a synchronized action.
● An M40 command programmed using synchronized actions always remains active for
synchronized actions (modal) and is not reset on reset.
● M41 ... M45 selects first to fifth gear steps in accordance with the programming in the part
program.
An axis replacement is necessary in order to run the function.
Once the gear step change has been performed, the spindle status is neutral (same
response to M3, M4, M5 programming).

References
For further explanations regarding the programming of the spindle as well as spindle
movements from synchronized actions, refer to:
● Programming Manual, Job Planning
● Function Manual, Synchronized Actions

15.6.3 Programming spindle controls via the PLC with FC18


When the PLC specifies the direction of rotation and speed using FC18, the NCK can
determine and select a gear step to match the speed. This is equivalent to the M40
functionality when programming via the part program.
The correct start code must be set when FC18 is called in a PLC user program, in order to
activate gear step selection.

References
More detailed explanations regarding the programming of spindle controls by PLC with FC18
can be found in:
● Function Manual, Basic Functions, Basic PLC Program (P3)

Basic Functions
1280 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Programming

15.6.4 Gear step change with DryRun, program testing and SERUPRO

Part program, synchronized actions and FC18


The behavior of the gear stage change from the part program, FC18 and synchronized
actions for the functions DryRun, Programmtest and SERUPRO
(SearchRunByProgrammtest) can be configured with the following, already available
machine data:
MD35035 $MA_SPIND_FUNCTION_MASK.
These functions do not generally require a gear step change and can therefore be
suppressed in machine data:
MD35035 $MA_SPIND_FUNCTION_MASK
with bits 0 to 2 as follows:

Dry run feedrate (DryRun)


Bit 0 = 0 Gear steps are activated even with the DryRun function active for part program
blocks with M40, M41 to M45 or via FC18 and synchronized action programming.
response).
Bit 0 = 1 Gear step change for blocks with M40, M41 to M45 or via FC18 and synchronized
actions are suppressed with DryRun.
Program test and SERUPRO
Bit 1 = 0 Gear steps are activated even with the Program Test function active for part
program blocks with M40, M41 to M45 or via FC18 and synchronized action
programming. response).
Bit 1 = 1 Gear step change for blocks with M40, M41 to M45 or via FC18 and synchronized
actions are suppressed with Program Test and SERUPRO.
DryRun, program testing and SERUPRO
Bit 2 = 0 Gear step change for programmed gear step is not performed subsequently on
REPOS after deselection of functions DryRun, Program Test and SERUPRO.
Bit 2 = 1 Gear step change for programmed gear step is performed after deselection of
functions DryRun and SERUPRO if possible.

Gear step change suppression


If a gear step change is suppressed, if necessary, the interpolator will limit the programmed
spindle speed to the permissible speed range of the active gear step.
NC/PLC IS:
DB31,... DBX83.2 (Setpoint speed increased)
and
DB31,...DBX83.1 (Setpoint speed limited) generated as a result of this limit
are suppressed.
Monitoring by the PLC program is not necessary during DryRun and in dry run feedrate.
When the gear step change is suppressed, no new gear step setpoint is output to the PLC
with NC/PLC IS:
DB31,...DBX82.0-82.2 (Gear step setpoint).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1281
Spindles (S1)
Programming

The gear step change request:


DB31,...DBX82.3 (Change gear)
is also suppressed.
This ensures that no gear step change information has to be processed by the PLC program.

Determining the last active gear step


System variable:
$P_GEAR
returns the gear step programmed in the part program (which may not have been output to
the PLC).
System variable:
$AC_SGEAR
can be used to read the last active gear step from the part program, synchronized actions
and operator panel interface.
The DryRun function can be deselected within a running part program. Once it has been
deselected, the correct gear step requested by the part program must be identified and
selected.
It cannot be assured that the remainder of the part program will run without errors until the
correct gear step has been activated. Any necessary gear step change is performed in the
system REPOS started on deselection if the spindle is in speed control mode. A complete
gear step change dialog takes place with the PLC and the last programmed gear step is
activated.
If there is a mismatch between the gear step programmed in the part program and the actual
gear step returned via the VDI interface with REPOS, no gear step change takes place.
The same applies to the SERUPRO function.
Further explanations regarding set search execution SERUPRO can be found under:
References:
/FB1/ Function Manual, Basic Functions; Mode group, Channel,
Program Mode (K1)

Boundary conditions
If the gear step change is suppressed, the output spindle speed moves within the speed
range specified by the current gear step.
The following restrictions apply to the subsequent activation of a gear step change with
REPOS:
● The gear step change is not activated subsequently if the spindle in the deselection or
target block is a command spindle (synchronized action) or PLC spindle (FC18).
● If the gear step cannot be activated because the spindle is in position or axis mode or a
link is active, alarm 22011"Channel%1 block%3 spindle% Change to programmed gear
step not possible" is signaled.

Basic Functions
1282 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Programming

Example
Gear step change in DryRun

1. Activate 1st gear step (GS) for output state;


N00 M3 S1000 M41 ; 1. GS is selected
M0 ; Part program stops

PI service: Activate dry run feedrate (DryRun);


; (Configuring)
N10 M42 ; 2nd GS requested, no gear step change takes
place
N11 G0 X0 Y0 Z0 ; Positioning axes
N12 M0 ; Part program stops

PI service: Deactivate dry run feedrate (DryRun);


; REORG and REPOS are performed
; now the gear step change to the 2nd gear step
takes place
N20 G1 Z100 F1000 ;
... ;
N99 M30 ; Part program end

15.6.5 External programming (PLC, HMI)

SD43300 and SD42600


The revolutional feedrate behaviour can be selected externally via the axial setting data:
SD43300 $SA_ASSIGN_FEED_PER_REV_SOURCE (Rotational feedrate for spindles)
in JOG operating mode using the channel-specific setting data
SD42600 $SC_JOG_FEED_PER_REV_SOURCE (Revolutional fedrate control in JOG
mode).
The following settings can be made via the setting data:

>0: The machine axis number of the rotary axis/spindle from which the revolutional feedrate
shall be derived.
-1: The revolutional feedrate is derived from the master spindle of the channel in which the
axis/spindle is active in each case.
0: Function is deselected.

FPRAON (S2)
Revolutional feedrate for spindle S2 ON, derived from the master spindle

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1283
Spindles (S1)
Programming

FPRAON (S2, A)
Revolutional feedrate for spindle S2 ON, derived from axis A.
The revolutional feedrate value must be specified with FA[Sn].

FPRAOF (S2)
Revolutional feedrate for spindle S2 OFF.

SPI(n)
It is also possible to program SPI(n) instead of SPI(Sn).

Basic Functions
1284 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Spindle monitoring

15.7 Spindle monitoring

15.7.1 Speed ranges

Permissible speed ranges for the spindle


The spindle monitoring functions and the currently active functions (G94, G95, G96,
G961, G97, G971, G33, G34, G35, G331, G332, etc.) define the permissible speed
ranges of the spindle.

6SLQGOHVSHHG

0D[LPXPHQFRGHUOLPLWIUHTXHQF\
0D[LPXPVSLQGOHVSHHG

0D[LPXPVSLQGOHVSHHGIRUFXUUHQWJHDUVWHS

3URJUDPPDEOHVSLQGOHVSHHGOLPLW*
3URJUDPPDEOHVSLQGOHVSHHGOLPLW/,06

3URJUDPPDEOHPLQLPXPVSLQGOHVSHHG*

0LQLPXPVSLQGOHVSHHGIRUFXUUHQWJHDUVWHS

6SLQGOHLVVWDWLRQDU\
FRQVWDQWFXWWLQJUDWH**DQG*
,6$[LV6SLQGOHVWDWLRQDU\ QQPLQ

6SHHGUDQJHRIFXUUHQWJHDUVWHSDW
6SHHGUDQJHRIFXUUHQWJHDUVWHS

6SHHGUDQJHRIFXUUHQWJHDUVWHS

,6+RPHG6\QFKURQL]HG
OLPLWHGE\*DQG*
6SHHGUDQJHRIVSLQGOH
RUVSLQGOHFKXFN

Figure 15-9 Ranges of spindle monitoring functions/speeds

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1285
Spindles (S1)
Spindle monitoring

15.7.2 Axis/spindle stationary (n < n min)

Spindle monitoring with stationary axis/spindle


Only if the axis/spindle is stationary, i.e. the actual spindle speed falls below a specifiable
value in machie data:
MD36060 $MA_STANDSTILL_VELO_TOL (maximum velocity/speed "Axis/spindle
stationary")
and no longer generates any setpoints, is it possible to perform certain functions on the
machine, such as tool change, open machine doors, path feed enable, etc.
If the spindle is stationary,
● NC/PLC IS:
DB31, ... DBX61.4 axis/spindle stationary)
is set to 1.
● The next machining block is released
and machine data:
MD35510 $MA_SPIND_STOPPED_AT_IPO_START
is set to 0.
Exception:
MD35510 $MA_SPIND_STOPPED_AT_IPO_START =1
Path interpolation is not influenced, the traveled path axis is not stopped.
Monitoring is effective in all spindle modes and in axis mode.

15.7.3 Spindle in setpoint range

Function
"Spindle in setpoint range" spindle monitoring checks whether:
● The programmed spindle speed is reached.
● The spindle is stationary (NC/PLC IS:
DB31, ... DBX61.4 (axis/spindle stationary)).
● The spindle is still in the acceleration or deceleration phase.
In spindle control mode, the setpoint speed
(programmed speed ∗ spindle offset including active limitations)
is compared with the actual speed.

Basic Functions
1286 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Spindle monitoring

If the actual speed deviates from machine data:


MD35150 $MA_SPIND_DES_VELO_TOL
by more than the spindle speed tolerance:
● Axial NC/PLC IS:
DB31, ... DBX83.5 (Spindle in setpoint range)
is set to 0.
● The next machining block is not enabled.
● Machine data:
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START
is set to 1.
Exception:
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START = 0
Path interpolation is not influenced, the traveled path axis is not stopped.

Tolerance range for setpoint speed


MD35150 $MA_SPIND_DES_VELO_TOL = 0.1
The spindle actual speed may deviate +/- 10% from the setpoint speed.
The spindle setpoint speed is derived from the programmed speed taking the current limits
into account.
Any limitation or increase of the programmed speed
is indicated either by axial NC/PLC IS:
DB31, ... DBX83.1 (Set speed limited)
or
DB31, ... DBX83.2 S (Set speed increased)
and does not prevent the axis reaching the speed tolerance range.
If the spindle lies inside the tolerance range,
axial NC/PLC IS:
DB31, ... DBX83.5 (Spindle in setpoint range)
is set to 1 at the VDI interface.
Special case:
If the speed tolerance is set to 0, axial NC/PLC IS:
DB31, ... DBX83.5 (Spindle in setpoint range)
is permanently set to 1 and no path control is performed.

Speed change
Path control only takes place at the start of the traverse block and only if a speed change
has been programmed. If the speed tolerance range is violated, e.g. due to an overload, the
path movement is not automatically brought to a standstill.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1287
Spindles (S1)
Spindle monitoring

15.7.4 Diagnosis of spindle speed limitation


The restriction of increase of spindle speed is reported via the output of the following
NC/PLC interface signals (refer to Chapter "Spindle in setpoint range (Page 1286)"):
● DB31, ... DBX83.1 (Setpoint speed restricted)
● DB31, ... DBX83.2 (Setpoint speed restricted)
To diagnose the effective/limiting spindle parameters, one can have read access to the most
important parameters of spindle motion via system variables. The system variables are
indexed with the spindle number and they return only values that are relevant to the speed
control and spindle position modes.

Function
The following system variables are available in the spindle mode:

System variable Description


$AC_SMAXVELO[n] Maximum possible spindle speed [rpm] resulting from the active
limiting data.
$AC_SMAXVELO_INFO[n] Specification of the speed limiting data as numerical value. *)
$AC_SMINVELO[n] Minimum possible spindle speed [rpm], corresponds to the minimum
speed in the speed control mode.
$AC_SMINVELO_INFO[n] Specification of the speed increasing data as numerical value. *)
$AC_SMAXACC[n] Acceleration value of spindle [r/s2].
$AC_SMAXACC_INFO[n] Acceleration limiting cause in the form of a numerical value. *)
$AC_SPIND_STATE[n] Status bits of the spindle.
n: Spindle no. (n= 0: the variables are related to the current master spindle)
*) The text of the numerical value is to be taken from the description of the system variables.
Evaluation of diagnosis data:
The system variables for each spindle can be read via synchronized actions and in the part
program, giving due consideration to the preprocessing stop in the NCK.

Basic Functions
1288 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Spindle monitoring

Boundary conditions
The values delivered by the system variables depend on the spindle mode:
● Speed control mode:
All system variables deliver current values.
● Positioning mode:
The system variables $AC_SMAXVELO, $AC_SMAXACC and $AC_SPIND_STATE
deliver valid values. The system variables $AC_SMINVELO and $AC_SMINVELO_INFO
deliver the data that becomes effective on changing to the speed control mode.
● Axis mode (e.g. if the spindle is used by a transformation TRANSMIT, TRACYL,... or
follows a path motionas a special axis):
The system variable $AC_SPIND_STATE can also be used in the axis mode. Separate
system variables are available in the axis mode for dynamic data:
$AA_VMAXM, $AA_VMAXB and $AA_VLFCT.
The following control system response results in block-search response, type SERUPRO:
● The system variable $AC_SMAXVELO/$AC_SMAXACC delivers the maximum
representable speed/acceleration.
● $AC_SMAXVELO_INFO and $AC_SMAXACC_INFO deliver the VALUE "0" (no limitation
is active).
● $AC_SMINVELO and $AC_SMINVELO_INFO deliver data as in case of normal part
program processing.
● $AC_SPIND_STATE returns the states as they are set for SERUPRO.

Sample programming
Example of the visualization of the content of the system variables for Spindle 1. The
variables are written to the R parameters cyclically. These can be displayed on HMI in the R
Parameters area.

Program code
N05 IDS=1 WHENEVER TRUE DO $R10=$AC_SMAXVELO[1]
N10 IDS=2 WHENEVER TRUE DO $R11=$AC_SMAXVELO_INFO[1]
N15 IDS=3 WHENEVER TRUE DO $R12=$AC_SMINVELO[1]
N20 IDS=4 WHENEVER TRUE DO $R13=$AC_SMINVELO_INFO[1]
N25 IDS=5 WHENEVER TRUE DO $R14=$AC_SPIND_STATE[1]

15.7.5 Minimum/maximum speed of gear step

Minimum speed
The minimum gear step speed is entered in machine data:
MD35140 $MA_GEAR_STEP_MIN_VELO_LIMIT.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1289
Spindles (S1)
Spindle monitoring

This setpoint speed cannot be undershot by programming an S value, which is too small.
NC/PLC IS:
DB31, ... DBX83.2 (Setpoint speed increased) (Programmed speed too low) is set.
The minimum gear step speed is effective only in speed mode and can only be undershot
by:
● Spindle override 0%
● M5
● S0
● NC/PLC IS DB31, ... DBX4.3 )Spindle stop)
● Withdraw NC/PLC IS:
DB31, ... DBX2.1 (Controller enable).

● NC/PLC IS DB21, ... DBX7.7 (Reset)


● NC/PLC IS DB31, ... DBX2.2 (Delete distance-to-go/Spindle reset)
● NC/PLC IS DB31, ... DBX18.5 (Oscillation speed)
● NC/PLC IS DB21, ... DBX7.4 (NC STOP axes plus spindles)
● NC/PLC IS DB31, ... DBX1.3 (Axis/Spindle disable)
● NC/PLC IS DB31, ... DBX16.7 (Delete S value)

Maximum speed
The maximum gear step speed is entered in machine data:
MD35130 $MA_GEAR_STEP_MAX_VELO_LIMIT.
When the gear step is engaged, this setpoint speed cannot be exceeded.
When the programmed spindle speed is limited, NC/PLC IS:
DB31, ... DBX83.1 (Setpoint speed limited) (programmed speed too high)
is set.

15.7.6 Maximum encoder limit frequency

CAUTION
The maximum encoder frequency limit of the actual spindle position encoder is monitored
by the control (the limit can be exceeded). It is the responsibility of the machine tool
manufacturer to ensure that the configuration of the spindle motor, gearbox, measuring
gearbox, encoder and machine data prevents the maximum speed of the actual spindle
position encoder being exceeded.

Basic Functions
1290 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Spindle monitoring

Maximum encoder frequency exceeded.


If the spindle speed reaches a speed (large S value programmed), which exceeds the
maximum encoder limit frequency (the maximum mechanical speed limit of the encoder must
not be exceeded), the synchronization is lost. The spindle continues to rotate, but with
reduced functionality.
With the following functions, the spindle speed is reduced until the active measurement
system is operating below the encoder limit frequency again:
● Thread cutting (G33, G34, G35)
● Tapping without compensating chuck (G331, G332)
● Revolutional feedrate (G95)
● Constant cutting rate (G96, G961, G97, G971)
● SPCON (position-controlled spindle operation)
When the encoder limit frequency is exceeded
NC/PLC IS:
DB31, ... DBX60.4 (Homed/Synchronized 1)
or
DB31, ... DBX60.5 (Homed/Synchronized 2)
are reset for the measurement system in question and NC/PLC IS:
DB31, ... DBX60.2 (encoder limit frequency 1 exceeded)
or
DB31, ... DBX60.3 (encoder limit frequency 2 exceeded)
are set.
If the spindle is in axis mode, the maximum encoder limit frequency must not be exceeded.
The maximum velocity (MD32000 $MA_MAX_AX_VELO) must lie below the maximum
encoder limit frequency; otherwise, alarm 21610 is output and the axis is brought to a
standstill.

Maximum encoder limit frequency unudershot


If the maximum encoder frequency limit has been exceeded and the speed subsequently
falls below the maximum encoder limit frequency (smaller S value programmed, spindle
offset switch changed, etc.), the spindle is automatically synchronized with the next zero
mark or the next Bero signal. The new synchronization will always be carried out for the
active position measuring system that has lost its synchronization and whose max. encoder
limit frequency is currently undershot.

Special points to be noted


If the following functions are active, the maximum encoder frequency cannot be exceeded:
● Spindle positioning mode, axis mode
● Thread cutting (G33, G34, G35)
● Tapping without compensating chuck G331, G332 (does not apply to G63)
● Revolutional feedrate (G95)
● Constant cutting rate (G96, G961, G97, G971)
● SPCON

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1291
Spindles (S1)
Spindle monitoring

15.7.7 End point monitoring

End point monitoring


During positioning (the spindle is in positioning mode), the system monitors the distance
from the spindle (with reference to the actual position) to the programmed spindle position
setpoint (end point).
For this to work, in machine data:
MD36000 $MA_STOP_LIMIT_COARSE (Exact stop limit coarse)
and
MD36010 $MA_STOP_LIMIT_FINE (Exact stop limit fine)
two limit values can be defined as an incremental path starting from the spindle position
setpoint.
Regardless of the two limit values, the positioning of the spindle is always as accurate as
defined by the connected spindle measurement encoder, the backlash, the transmission
ratio, etc.

Exact stop window dependent on parameter set


Various parameter-set-dependent exact stop windows can be configured.
This makes it possible to work to different levels of accuracy in axis mode and spindle
positioning. The exact stop window can be configured separately for each gear step for
spindle positioning.

6SLQGOHVSHHG

3RVLWLRQVHWSRLQW

3RVLWLRQ
([DFWVWRSOLPLWILQH
([DFWVWRSOLPLWFRDUVH

Figure 15-10 Exact stop zones of a spindle

Basic Functions
1292 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Spindle monitoring

DB31, ... DBX60.7 and DB31, ... DBX60.6 (position reached with exact stop coarse/fine)
The two limit values defined by machine data:
MD36000 $MA_STOP_LIMIT_COARSE (Exact stop limit coarse)
and
MD36010 $MA_STOP_LIMIT_FINE (Exact stop limit fine)
are output to the PLC using NC/PLC IS:
DB31, ... DBX60.7 (Position reached with exact stop coarse)
and
DB31, ... DBX60.6 (Position reached with exact stop fine).

Block change for SPOS and M19


When positioning the spindle with SPOS or M19 the block is changed
dependent on end point monitoring with NC/PLC IS:
DB31, ... DBX60.6 (Position reached with exact stop fine).
All other functions programmed in the block must have achieved their end criterion (e.g. all
auxiliary functions acknowledged by the PLC).
With SPOSA, the block change does not depend on the monitoring of the end point.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1293
Spindles (S1)
Examples

15.8 Examples

15.8.1 Automatic gear step selection (M40)

Example
To illustrate the contents of the new block search variables:
Assumptions about automatic gear step selection (M40):

S0...500 1st gear step


S501..1000 2nd gear step
S1001..2000 3rd gear step

Content of system variables:


$P_SEARCH_S ; Collected S value
$P_SEARCH_DIR ; Collected direction of rotation
$P_SEARCH_GEAR ; Collected gear step

Collected S value: Direction of Gear step:


rotation:
; 0/last speed -5 40/last GS
N05 G94 M40 M3 S1000 ; 1000 3 40
N10 G96 S222 : 222 3 40
N20 G97 ; f (PlanAxPosPCS)* 3 40
N30 S1500 ; 1500 3 40
N40 SPOS=0** ; 1500 -19 40
N50 M19** ; 1500 -19 40
N60 G94 G331 Z10 S300 ; 300 -19 40
N70 M42 ; 300 -19 42
N80 M4 ; 300 4 42
N90 M70 ; 300 70 42
N100 M3 M40 ; 300 3 40
N999 M30

* f (PlanAxPosPCS): The speed depends on the current position of the transverse axis in the
workpiece coordinate system.
** ($P_SEARCH_SPOS and $P_SEARCH_SPOSMODE are programmed)

Basic Functions
1294 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Data lists

15.9 Data lists

15.9.1 Machine data

15.9.1.1 NC-specific machine data

Number Identifier: $MN_ Description


10192 GEAR_CHANGE_WAIT_TIME Wait time for acknowledgment of a gear stage change
during reorganization
10714 M_NO_FCT_EOP M function for spindle active after RESET
12060 OVR_SPIND_IS_GRAY_CODE Spindle override with Gray coding
12070 OVR_FACTOR_SPIND_SPEED Evaluation of spindle speed override switch
12080 OVR_REFERENCE_IS_PROG_FEED Override reference velocity
12082 OVR_REFERENCE_IS_MIN_FEED Defining the reference of the path override
12090 OVR_FUNCTION_MASK Selection of override specifications

15.9.1.2 Channel-specific machine data

Number Identifier: $MC_ Description


20090 SPIND_DEF_MASTER_SPIND Initial setting for master spindle on channel
20092 SPIND_ASSIGN_TAB_ENABLE Enabling/disabling of spindle converter
20850 SPOS_TO_VDI Output of M19 to the PLC with SPOS/SPOSA
22400 S_VALUES_ACTIVE_AFTER_RESET S function active after RESET

15.9.1.3 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


30300 IS_ROT_AX Rotary axis
30310 ROT_IS_MODULO Modulo conversion
31044 ENC_IS_DIRECT2 Encoder on intermediate gear
31050 DRIVE_AX_RATIO_DENOM Denominator load gearbox
31060 DRIVE_AX_RATIO_NUMERA Numerator load gearbox
31064 DRIVE_AX_RATIO2_DENOM Intermediate gear denominator
31066 DRIVE_AX_RATIO2_NUMERA Intermediate gear numerator
31070 DRIVE_ENC_RATIO_DENOM Measuring gear denominator
31080 DRIVE_ENC_RATIO_NUMERA Measuring gear numerator
31122 BERO_DELAY_TIME_PLUS BERO delay time in plus direction
31123 BERO_DELAY_TIME_MINUS BERO delay time in minus direction
32200 POSCTRL_GAIN KV factor

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1295
Spindles (S1)
Data lists

Number Identifier: $MA_ Description


32800 EQUIV_CURRCTRL_TIME Equivalent time constant current control circuit for
feedforward control
32810 EQUIV_SPEEDCTRL_TIME Equivalent time constant speed control circuit for
feedforward control
32910 DYN_MATCH_TIME Time constant for dynamic matching
34040 REFP_VELO_SEARCH_MARKER Reference point creep speed
34060 REFP_MAX_MARKER_DIST Monitoring of zero mark distance
34080 REFP_MOVE_DIST Reference point distance/destination point for
distance-coded system
34090 REFP_MOVE_DIST_CORR Reference point offset/absolute offset, distance-coded
34100 REFP_SET_POS Reference point value
34200 ENC_REFP_MODE Homing mode
35000 SPIND_ASSIGN_TO_MACHAX Assignment of spindle to machine axis
35010 GEAR_STEP_CHANGE_ENABLE Type of gear step change
35012 GEAR_STEP_CHANGE_POSITION Gear step change position
35014 GEAR_STEP_USED_IN_AXISMODE Gear step for axis mode with M70
35020 SPIND_DEFAULT_MODE Basic spindle setting
35030 SPIND_DEFAULT_ACT_MASK Activate initial spindle setting
35035 SPIND_FUNCTION_MASK Setting of spindle-specific functions
35040 SPIND_ACTIVE_AFTER_RESET Spindle active after reset
35090 NUM_GEAR_STEPS Number of installed gear steps
35092 NUM_GEAR_STEPS2 2nd gear step data set: Number of installed gear
steps
35100 SPIND_VELO_LIMIT Maximum spindle speed
35110 GEAR_STEP_MAX_VELO[n] Maximum speed for automatic gear stage change
35112 GEAR_STEP_MAX_VELO2[n] 2nd gear step data set: Maximum speed for automatic
gear stage change
35120 GEAR_STEP_MIN_VELO[n] Minimum speed for automatic gear stage change
35122 GEAR_STEP_MIN_VELO2[n] 2nd gear step data set: Minimum speed for automatic
gear stage change
35130 GEAR_STEP_MAX_VELO_LIMIT[n] Maximum speed of gear step
35135 GEAR_STEP_PC_MAX_VELO_LIMIT[n] Maximum speed of gear step in position control
35140 GEAR_STEP_MIN_VELO_LIMIT[n] Minimum speed of gear step
35150 SPIND_DES_VELO_TOL Spindle speed tolerance
35160 SPIND_EXTERN_VELO_LIMIT Spindle speed limitation via PLC
35200 GEAR_STEP_SPEEDCTRL_ACCEL[n] Acceleration in speed control mode
35210 GEAR_STEP_POSCTRL_ACCEL[n] Acceleration in position control mode
35212 GEAR_STEP_POSCTRL_ACCEL2[n] 2nd gear step data set: Acceleration in position
control mode
35220 ACCEL_REDUCTION_SPEED_POINT Speed limit for reduced acceleration

Basic Functions
1296 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Data lists

Number Identifier: $MA_ Description


35230 ACCEL_REDUCTION_FACTOR Reduced acceleration
35300 SPIND_POSCTRL_VELO Position control activation speed
35350 SPIND_POSITIONING_DIR Positioning direction of rotation for a non-
synchronized spindle
35400 SPIND_OSCILL_DES_VELO Oscillation speed
35410 SPIND_OSCILL_ACCEL Oscillation acceleration
35430 SPIND_OSCILL_START_DIR Oscillation start direction
35440 SPIND_OSCILL_TIME_CW Oscillation time for M3 direction
35450 SPIND_OSCILL_TIME_CCW Oscillation time for M4 direction
35500 SPIND_ON_SPEED_AT_IPO_START Feed enable with spindle in setpoint range
35510 SPIND_STOPPED_AT_IPO_START Feed enable with stationary spindle
35550 DRILL_VELO_LIMIT[n] Maximum speeds for tapping
35590 PARAMSET_CHANGE_ENABLE Parameter set definition possible from PLC
36060 STANDSTILL_VELO_TOL Threshold velocity "Axis/spindle stationary"
36200 AX_VELO_LIMIT Threshold value for velocity monitoring.

15.9.2 Setting data

15.9.2.1 Channel-specific setting data

Number Identifier: $SC_ Description


42600 JOG_FEED_PER_REF_SOURCE Revolutional feedrate control in JOG mode
42800 SPIND_ASSIGN_TAB Spindle number converter
42900 MIRROR_TOOL_LENGTH Mirror tool length offset
42910 MIRROR_TOOL_WEAR Mirror wear values of tool length compensation
42920 WEAR_SIGN_CUTPOS Mirror wear values of machining plane
42930 WEAR_SIGN Invert sign of all wear values
42940 TOOL_LENGTH_CONST Retain the assignment of tool length components
when changing the machining plane (G17 to G19)

15.9.2.2 Axis/spindle-specific setting data

Number Identifier: $SA_ Description


43200 SPIND_S Specification of the spindle speed
43202 SPIND_CONSTCUT_S Specification of the constant cutting rate for the
master spindle
43210 SPIND_MIN_VELO_G25 Progr. Spindle speed limitation G25

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1297
Spindles (S1)
Data lists

Number Identifier: $SA_ Description


43220 SPIND_MAX_VELO_G26 Progr. spindle speed limitation G26
43230 SPIND_MAX_VELO_LIMS Progr. spindle speed limitation G96/G961
43240 M19_SPOS Spindle position for spindle positioning
with M19
43250 M19_SPOSMODE Spindle positioning approach mode for
spindle positioning with M19
43300 ASSIGN_FEED_PER_REF_SOURCE Rotational feedrate for positioning axes/spindles

15.9.3 Signals

15.9.3.1 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 0.7 - 0.0 Feedrate override H to A
31, ... 1.3 Axis/spindle disable
31, ... 1.4 Follow-up mode
31, ... 1.5 Position measuring system 1
31, ... 1.6 Position measuring system 2
31, ... 1.7 Override active
31, ... 2.1 Servo enable
31, ... 2.2 Spindle reset/delete distance-to-go
31, ... 3.6 Velocity/spindle speed limitation
31, ... 3.7 Program test Axis/Spindle Enable
31, ... 16.2-16.0 Actual gear step A to C
31, ... 16.3 Gear changed
31, ... 16.4 Resynchronize spindle 1
31, ... 16.5 Resynchronize spindle 2
31, ... 16.6 No n-monitoring with gear change
31, ... 16.7 Delete S value
31, ... 17.0 Feedrate override for spindle valid
31, ... 17.4 Resynchronize spindle during positioning 1
31, ... 17.5 Resynchronize spindle during positioning 2
31, ... 17.6 Invert M3/M4
31, ... 18.4 Oscillation via PLC
31, ... 18.5 Oscillation enable (oscillation speed)
31, ... 18.6 Oscillation rotation direction clockwise (Set rotation direction clockwise)
31, ... 18.7 Oscillation rotation direction counterclockwise (Set rotation direction counterclockwise)
31, ... 19.7 - 19.0 Spindle offset H to A

Basic Functions
1298 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Spindles (S1)
Data lists

15.9.3.2 Signals from axis/spindle

DB number Byte.Bit Description


31, ... 60.0 Spindle/No Axis
31, ... 60.2 Encoder limit frequency exceeded 1
31, ... 60.3 Encoder limit frequency exceeded 2
31, ... 60.4 Homed/synchronized 1
31, ... 60.5 Homed/synchronized 2
31, ... 60.6 Position reached with exact stop coarse
31, ... 60.7 Position reached with exact stop fine
31, ... 61.4 Axis/spindle stationary (n < nmin)
31, ... 61.5 Position controller active
31, ... 61.6 Speed control loop active
31, ... 61.7 Current controller active
31, ... 82.2-82.0 Set gear step A to C
31, ... 82.3 Change gear
31, ... 83.0 Speed limit exceeded
31, ... 83.1 Setpoint speed limited
31, ... 83.2 Setpoint speed increased
31, ... 83.5 Spindle in setpoint range
31, ... 83.7 Actual direction of rotation clockwise
31, ... 84.3 Rigid tapping active
31, ... 84.4 active spindle mode synchronous mode
31, ... 84.5 Active spindle positioning mode
31, ... 84.6 Active spindle mode oscillation mode
31, ... 84.7 Active spindle control mode
31, ... 85.5 Spindle actually reached in position
31, ... 86 and 87 M function for spindle
31, ... 88-91 S function for spindle

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1299
Spindles (S1)
Data lists

Basic Functions
1300 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1) 16
16.1 Brief description

Types of feedrate
The feedrate determines the machining speed (axis or path velocity) and is observed in
every type of interpolation, even where allowance is made for tool offsets on the contour or
on the tool center point path (depending on G commands).
The following types of feedrate allow optimum adaptation to the various technological
applications (turning, milling, drilling, etc.):
● Rapid traverse feedrate (G0)
● Inverse-time feedrate (G93)
● Linear feedrate (G94)
● Revolutional feedrate (G95)
● Constant cutting rate (G96, G961)
● Constant speed (G97, G971)
● Feed rate for thread cutting (G33, G34, G35)
● Feedrate for tapping with compensating chuck (G63)
● Feedrate for tapping without compensating chuck (G331, G332)
● Feedrate for chamfer/rounding FRC, FRCM
● Non-modal feedrate FB

Programmable run-in, run-out path for G33


The thread run-in and run-out path can be programmed. The thread axis is accelerated or
braked inside the specified path.

Note
The axis can be overloaded if the specified path is too short.

Axis assignment of the feedrates


Feedrates can be assigned to the axes variably to adjust to the different technological
requirements.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1301
Feeds (V1)
Brief description

The following versions are possible:


● Separate feedrates for the working plane and the infeed axis
● Variable axis assignment for path feedrate
● Feedrate for positioning axes

Feedrate control
The programmed feedrate can be changed during the machining or for test purposes to
enable adjustment to the changed technological conditions.
● via the machine control panel
● via the operator panel front
● via the PLC
● per program command

Feedrate interpolation
To permit flexible definition of the feed characteristic, the feed programming according to
DIN 66205 has been extended by linear and cubic characteristics.
The cubic profiles can be programmed directly or as an interpolating spline.
You can program the following feedrate profiles:
● FNORM
Response as per DIN 66025 (default setting).
An F-value programmed in the block is applied over the entire path of the block, and is
subsequently regarded as a fixed modal value.
● FLIN
An Fvalue programmed in the block is traversed linearly over the path from the current
value at the beginning of the block to the end of the block, and is subsequently regarded
as modal value.
● FCUB
The blockwise programmed Fvalues are - relative to the end of the block - connected by a
spline. The spline starts and ends tangentially to the previous or following feedrate
setting. If the F address is missing in one block, then the last programmed F value is used
for it.
● FPO
The F address [Syntax: F=FPO (...,...,...)] designates the course of the feedrate via a
polynomial from the current value to the end of the block in which it was programmed.
The end value is treated as modal from there onwards.
The machine data:
MD20172 $MC_COMPRESS_VELO_TOL
allows a tolerance to be defined for the path feedrate if FLIN and FCUB are used in
connection with compression COMPON.
Explanations on programmable course of the feedrate are available in:
References:
/PGA/ Programming Manual - Work Preparation

Basic Functions
1302 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Brief description

Feedrate for chamfer/rounding FRC, FRCM


The machining conditions can change significantly during surface transitions to
chamfer/rounding. The chamfer/rounding contour elements therefore need their own
optimized feedrate values in order to achieve the required surface finish.
You can program the feedrate for the chamfer/rounding with FRC (non-modal) or FRCM
(modal).

Non-modal feedrate FB
A separate feedrate can be specified for an individual block with the FB command. The
earlier active path feedrate is overwritten for this block; the earlier effective modal path
feedrate is active again after this block.

Programmable single-axis dynamic response


The dynamic response of individual axes can be changed in a targeted manner via
programming.
● Percentage acceleration override (ACC) in part program and synchronized actions
● Programmable end of motion criterion: FINEA (exact stop fine), COARSEA (exact stop
coarse), IPOENDA (Interpolator stop) in the part program and in synchronized actions
● Programmable servo parameter set (SCPARA) in the part program and in synchronized
actions

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1303
Feeds (V1)
Path feedrate F

16.2 Path feedrate F

16.2.1 General

Path feedrate F
The path feedrate represents the geometrical total of the velocity components in the
participating axes. It is therefore generated from the individual motions of the interpolating
axes.
The default uses the axial velocities of the geometry axes which have been programmed.
The FGROUP command can be used to include other geometry and/or synchronized axes in
the calculation of the path feedrate.
The path feedrate F determines the machining speed and is observed in every type of
interpolation even where allowance is made for tool offsets. The value programmed under
the address F remains in a program until a new F value or a new type of feedrate is
programmed.

Value range for path feedrate F


References:
Programming Manual, Fundamentals
Function Manual, Basic Functions; Velocities, Setpoint/ Actual Value Systems, Closed-Loop
Control (G2)

F value at PLC interface


The F value of the current path feedrate is always entered in the channel-specific PLC
interface for auxiliary functions (DB21, ... DBB158 to 193).
You can find explanations about the corresponding interface signals (change signal, F value)
in:
References:
Function Manual, Basic Functions; Auxiliary Function Output to PLC (H2)

Feedrate with transition circle


References:
Programming Manual, Fundamentals

Feedrate for internal radius and external radius path sections


For circular blocks or spline blocks with curvature in the same direction and tool radius offset
activated (G41/G42), the programmed feedrate can act on the center point path or on the
contour (depending on the internal radius or external radius path sections).

Basic Functions
1304 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

A group of G commands is provided for this purpose:


● CFTCP
Programmed feedrate acting on the center point path.
● CFC
Programmed feedrate acting on the contour.
● CFCIN
Programmed feedrate acting only on the contour with a concave spline.
References:
Programming Manual, Fundamentals

Maximum tool path velocity


The maximum path velocity results from the maximum velocities of the linear or rotary axes
involved (MD32000 $MA_MAX_AX_VELO), i.e. the axis with the lowest maximum velocity
determines the maximum path velocity. This cannot be exceeded.
If G0 is programmed, traversing is at the path velocity resulting from the MD32000
$MA_MAX_AX_VELO limitation.

Limit velocity for path axes


In addition, the FL[<axis>] command can be used to program a limit velocity for path axes
(geometry and synchronized axes).
This enables separate feedrates to be programmed for the working plane and infeed axis.
This means that a feedrate is specified for both path-related interpolation and for the infeed
axis. The axis perpendicular to the selected machining plane is designated as the infeed
axis. The infeed axis-specific feedrate can be programmed to limit the axis velocity and
therefore the path velocity. No coordinate rotations through frames should be included, i.e.
the infeed axis must be an axis of the standard coordinate system. This function can be used
to compensate for the fact that a cutter has a lower cutting performance on the face side
than across the cutter circumference.
Programming example:

Program code Comment


... G94... ; Selection of feedrate type (mm/min)
X30 Y20 F200 ; Path feedrate = 200 mm/s
FL[Z]=50 Z-30 ; Max. feedrate for Z axis: 50 mm/s

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1305
Feeds (V1)
Path feedrate F

16.2.2 Type of feedrate G93, G94, G95

Effectivity
The feedrate types G93, G94, G95 are active for the G functions of group 1 (except G0) in
the automatic modes.
G94 or G95 can be used for traversing in JOG mode.
References:
Function Manual, Extension Functions; Jog With/Without Handwheel (H1)

Inverse-time feedrate (G93)


The inverse-time feedrate is used when it is easier to program the duration, rather than the
feedrate, for retraction of a block.
The inverse-time feedrate is calculated from the following formula:

Y
) 
V

Where F: Inverse-time feedrate in rpm


v: Required path velocity in mm/min or inch/min
s: Path length in mm/inch
Programming example:

Program code Comment


N10 G1 G93 X100 Y200 F2 ; The programmed path is traversed in 0.5 min.
...

Note
G93 may not be used when G41/G42 is active. If the block length varies greatly from block
to block, a new F value should be programmed in each block for G93.

Linear feedrate (G94)


The linear feedrate is programmed in the following units relative to a linear or rotary axis:
● [mm/min, degrees/min] on standard metric systems
● [inch/min, degrees/min] on standard imperial systems

Basic Functions
1306 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

Revolutional feedrate (G95)


The revolutional feedrate is programmed in the following units relative to a master spindle:
● [mm/rev] on standard metric systems
● [inch/rev] on standard imperial systems
● [degrees/rev] on a rotary axis
The path velocity is calculated from the actual speed of the spindle according to the following
formula:

9 Q )

and V: Path velocity in mm/min or inch/min


n: Speed of the master spindle in rpm
F: Programmed revolutional feedrate in mm/rev or inch/rev

Note
The programmed F value is deleted when the system switches between the feedrate types
G93, G94 and G95.

Tooth feedrate
Primarily for milling operations, the tooth feedrate FZ..., which is more commonly used in
practice, can be programmed instead of the revolutional feedrate F...: (feed distance per
tooth).
The control uses the $TC_DPNT (number of teeth per revolution) tool parameter associated
with the active tool offset data record to calculate the effective revolutional feedrate for each
traversing block from the programmed tooth feedrate.

) )= 7&B'317

with F: Revolutional feedrate in mm/rev or inch/rev


FZ: Tooth feedrate in mm/tooth or inch/tooth
$TC_DPNT: Tool parameter: Number of teeth/rev
Example: Milling cutter with 5 teeth ($TC_DPNE = 5)

Program code Comment


N10 G0 X100 Y50
N20 G1 G95 FZ=0.02 ; Tooth feedrate 0.02 mm/tooth
N30 T3 D1 ; Load tool and activate tool offset data record.
M40 M3 S200 ; Spindle speed 200 rpm

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1307
Feeds (V1)
Path feedrate F

Program code Comment


N50 X20 ; Milling with:
FZ = 0.02 mm/tooth
effective revolutional feedrate:
F = 0.02 mm/tooth * 5 teeth/rev = 0.1 mm/rev
or:
F = 0.1 mm/rev * 200 rpm = 20 mm/min

Revolutional feedrate in JOG mode


In JOG mode, the response of the axis/spindle also depends on the following setting data:
SD41100 $SN_JOG_REV_IS_ACTIVE (revolutional feed rate for JOG active)
If this setting data is active, an axis/spindle is always moved with revolutional feedrate:
MD32050 $MA_JOG_REV_VELO (revolutional feedrate with JOG)
or
MD32040 $MA_JOG_REV_VELO_RAPID (revolutional feedrate with JOG with rapid traverse
overlay)
depending on the master spindle.
If the setting data is inactive:
● the response of the axis/spindle depends on the setting data:
SD43300 $SA_ASSIGN_FEED_PER_REV_SOURCE (revolutional feedrate for position
axes/spindles)
● the response of a geometry axis on which a frame acts is to rotate, depending on the
channel-specific setting data:
SD42600 $SC_JOG_FEED_PER_REV_SOURCE
DB31, ... DBX62.2 (revolutional feedrate active)
A programmed, active revolutional feedrate (G95) is displayed using the following NC/PLC
interface signal.
DB31, ... DBX62.2 (revolutional feedrate active)

16.2.3 Type of feedrate G96, G961, G962, G97, G971

Constant cutting rate (G96, G961)


The constant cutting rate is used on turning machines to keep the cutting conditions
constant, independently of the work diameter of the workpiece. This allows the tool to be
operated in the optimum cutting performance range and therefore increases its service life.
Selection of G96, G961:
When programming G96, G961, the corresponding S value is interpreted as the cutting rate
in m/min or ft/min along the transverse axis. If the workpiece diameter decreases during
machining, the speed is increased until the constant cutting speed is reached.

Basic Functions
1308 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

When G96, G961 is first selected in the part program, a constant cutting rate must be
entered in mm/min or ft/min.
With G96, the control system will automatically switch to revolutional feedrate (as with G95),
i.e. the programmed feedrate F is interpreted in mm/rev or inch/rev.
When programming G961, linear feedrate is selected automatically (as with G94). A
programmed feedrate F is interpreted in mm/min or inch/min.
Determining the spindle speed
Based on the programmed cutting rate (either SG96 or SG961) and the AZS position of the
transverse axis (radius), the control system calculates the spindle speed on the basis of the
following formula:

6 6SHHG
Q 
   U

n: Spindle speed
SSpeed: Programmed cutting rate
π Circle constant
r: Radius (AZS)
Frames between WCS and AZS (e.g. programmable frames such as SCALE, TRANS or
ROT) are taken into account in the calculation of the spindle speed and can bring about a
change in speed (for example, if there is a change in the effective diameter in the case of
SCALE).

Note
Prior to version 1.5/2.5 of the software, the WCS position of the transverse axis was used to
calculate the spindle speed. Therefore, no account was taken of programmable frames and
they had no bearing on the spindle speed. If continued use is to be made of this response for
reasons of compatibility, the frames used must be somewhere between AZS and BCS.

Diameter programming and reference axis for several transverse axes in one channel:
One or more transverse axes are permitted and can be activated simultaneously or
separately:
● Programming and displaying in the HMI operator interface in the diameter
● Assignment of the specified reference axis with SCC[AX] for a constant cutting rate G96,
G961, G962
References:
Function Manual Basic Functions; Transverse Axes (P1), example

Example
SG96 = 230 m/min
● where r = 0.2 m → n = 183.12 rpm
● where r = 0.1 m → n = 366.24 rpm
⇒ The smaller the workpiece diameter, the higher the speed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1309
Feeds (V1)
Path feedrate F

For G96, G961 or G962 a geometry axis must be defined as the transverse axis.
The transverse axis, whose position affects the speed of the mater spindle, is defined using
channel-specific machine data:
MD20100 $MC_DIAMETER_AX_DEF (geometry axis with transverse axis function)
The function G96, G961 or G962 requires the machine zero and the workpiece zero of the
transverse axis to be in the turning center of the spindle.

Constant speed (G97, G971)


G97, G971 deactivates the "Constant cutting rate function" (G96, G961) and saves the last
calculated spindle speed. With G97, the feedrate is interpreted as a revolutional feedrate (as
with G95).
When programming G971, linear feedrate is selected (as with G94). The feedrate F is
interpreted in mm/min or inch/min.
When G97, G971 is active, an S value can be reprogrammed to define a new spindle speed.
This will not modify the cutting rate programmed in G96, G961.
G97, G971 can be used to avoid speed variations in movements along the transverse axis
without machining (e.g. cutting tool).

Note
G96, G961 is only active during workpiece machining (G1, G2, G3, spline interpolation, etc.,
where feedrate F is active).
The response of the spindle speed for active G96, G961 and G0blocks can be defined in the
channel-specific machine data:
MD20750 ALLOW_G0_IN_G96 (G0 logic for G96, G961)
When constant cutting rate G96, G961 is selected, no gear stage change can take place.
The spindle speed override switch acts on the spindle speed calculated.
A DRF offset in the transverse axis does not affect the spindle speed setpoint calculation.
At the start of machining (after G0) and after NC Stop, G60, G09, ... the path start waits for
"nAct= nSet".
The interface signals "nAct = nSet" and "Set speed limited" are not modified by internal
speed settings.
When the speed falls below the minimum speed or if the signal "Axis/spindle stationary" is
recognized, "nAct =nSet" is reset.
A path operation, which has started (G64, rounding), is not interrupted.

Basic Functions
1310 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

Spindle speed limitation with G96, G961


For the function "Constant cutting rate", in setting data:
SD43230 $SA_SPIND_MAX_VELO_LIMS
(spindle speed limitation with G96/G961)
and in the part program (for the master spindle) with the programming command LIMS, a
maximum spindle speed can be set.
The most recently changed value (LIMS or SD) is active.
LIMS is effective with G96, G961, G97 and can be specified on up to four speed limitations in
the part program in one block. Spindle number Sn=1, 2, 3, or 4 of the master spindle that is
possible in the particular instance can be programmed in part progam instruction LM[Sn].

Note
When the block is loaded in the main run, all programmed values are transferred to to setting
data SD43230 $SA_SPIND_MAX_VELO_LIMS.

The speed limit set with LIMS remains stored after the control is switched off, depending on
the machine data:
MD10710 PROG_SD_RESET_SAVE_TAB[n] (setting data to be updated).
When G96, G961, G97 are reactivated, this spindle speed limitation is also activated.
The maximum permissible spindle speed defined by means of G26 or setting data:
SD43220 $SA_SPIND_MAX_VELO_G26 (maximum spindle speed) ,
cannot be exceeded.
In the event of incorrect programming that would cause one of the speed limits (G26 or
SD43220 $SA_SPIND_MAX_VELO_G26) to be exceeded, the "Programmed speed too
high" interface signal (DB31, ... DBX83.1) is set.
In order to ensure smooth rotation with large part diameters, the spindle speed is not
permitted to fall below a minimum level.
This speed can be set via the setting data:
SD43210 $SA_SPIND_MIN_VELO_G25 (minimum spindle speed)
and, depending on the gear step, with the machine data:
MD35140 $MA_GEAR_STEP_MIN_VELO_LIMIT (minimum speed of the gear step).
The minimum spindle speed can be changed in the part program with G25. In the event of
programming that would mean one of the spindle limits (G25 or SD43220
$SA_SPIND_MAX_VELO_G25) is not reached, the "Set speed too low" interface signal
(DB31, ... DBX83.2) is set.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1311
Feeds (V1)
Path feedrate F

6SLQGOHZRUNLQJDUHD DIWHU**VSHHGFDOFXODWLRQDQGIHHGUDWHRYHUULGH

$EVROXWH 0'63,1'B9(/2B/,0,7
VSHHGOLPLW 0D[LPXPVSLQGOHVSHHG
0'*($5B67(3B0$;B9(/2B/,0,7>Q@
0D[LPXPVSHHGRIJHDUVWDJH>@
6'63,1'B0$;B9(/2B*
3URJUDPPHGVSLQGOHVSHHGOLPLWDWLRQ*

6'63,1'B0$;B9(/2B/,06
RQO\RSHUDWLYHZLWK***

,66SLQGOHVSHHGOLPLWDWLRQIURP3/& '%'%;
0'63,1'B(;7(51B9(/2B/,0,7
6SLQGOHVSHHGOLPLWDWLRQYLD3/&

6'63,1'B0,1B9(/2B*
3URJUDPPHGVSLQGOHVSHHGOLPLWDWLRQ*

0'*($5B67(3B0,1B9(/2B/,0,7>Q@
 0LQLPXPVSHHGRIJHDUVWDJH>@

Figure 16-1 Spindle speed limitations

The various spindle speed limits are illustrated in the figure above. For more information and
for information on the effect of the setting data see:
References:
/FB1/ Function Manual Basic Functions; Spindles (S1);
Section: Spindle Monitoring Functions, Setting Data

Master spindle switchover with G96, G961


If the master spindle is switched over when G96, G961 are active, the speed of the former
master spindle is retained. This corresponds to a transition from G96 to G97. The master
spindle newly defined with SETMS executes the "Constant cutting rate" function generated in
this way.

Interrupts
Constant cutting rate G96, G961, G962
● If no F value is programmed, alarm 10860 "No feedrate programmed" is output.
The alarm is not generated with G0 blocks.
● Alarm 14800 "Programmed path velocity smaller than or equal to zero" is output while
programming a negative path velocity.

Basic Functions
1312 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

● If, with an active G96, G961 or G962, no transverse axis is defined in the machine data:
MD20100 $MC_DIAMETER_AX_DEF (geometry axis with transverse axis function) ,
alarm 10870 "No transverse axis defined" is issued.
● If a negative maximum spindle speed is programmed with the LIMS program command
when G96, G961 are active, alarm 14820 "Negative maximum spindle speed
programmed for G96, G961" is output.
● If no constant cutting rate is programmed when G96, G961 is selected for the first time,
alarm 10900 "No S value programmed for constant cutting rate" is output.

16.2.4 Feedrate with G33, G34, G35 (thread cutting)

16.2.4.1 General

Application of G33
The function G33 can be used to machine threads with constant lead of the following type:
References:
/PA/ Programming Manual, Fundamentals
/PAZ/ Programming Manual, Cycles

Speed S, feedrate F, thread lead


A revolutional feedrate [mm/revolution] is used for G33 threads. The revolutional feedrate is
defined by programming the thread lead increase [mm/revolution].
The speed of the axes for the thread length is calculated from the programmed spindle
speed S and the thread lead.
Feedrate F [mm/min] = speed S [rev/min] * thread lead [mm/rev]
At the end of the acceleration ramp, the position coupling between the spindle actual value
(spindle setpoint with SPCON on master spindle) and the axis setpoint is established. At this
moment, the position of the axis in relation to the zero mark of the spindle (including zero
mark offsets) is as if the axis had accelerated abruptly at the start of the block when the
thread start position (zero mark plus SF) was crossed. Compensation is made for the
following error of the axis.

Minimum spindle speed


In order to ensure smooth rotation at low speeds, the spindle speed is not permitted to fall
below a minimum level.
This speed is defined using setting data:
SD43210 $SA_SPIND_MIN_VELO_G25 (minimum spindle speed)
and can be set for each gear step with the machine data:
MD35140 $MA_GEAR _STEP_MIN_VELO_LIMIT (minimum velocity for gear step change) .
The minimum spindle speed can be changed in the part program with G25.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1313
Feeds (V1)
Path feedrate F

NC STOP, single block


NC STOP and single block (even at the block boundary) are only active after completion of
thread chaining. All subsequent G33 blocks and the first subsequent non-G33 block are
traversed like a single block.

Premature abortion without destruction


Thread cutting can be aborted without destruction before the end point is reached. This can
be done by activating a retraction motion.

Thread cutting with ROT frame


With ROT frame and G33, G34, G35, alarm 10607 "Thread with frame not executable" is
activated if the rotation causes a change in the thread length and thus the lead. Rotation
around the thread axis is permissible.
Alarm 10607 "Thread with frame not executable" can be suppressed by setting bit 12 in
machine data:
MD11410 $MN_SUPPRESS_ALARM_MASK ,
if the ROT statement is used intentionally in the application.
All other frames are accepted by the NC without alarm. Attention is drawn to the lead-
changing effect of SCALE.

16.2.4.2 Programmable run-in and run-out path for G33, G34 and G35

Application

5XQLQRUUXQRXWSDWKDFFWRGLUHFWLRQRIPDFKLQLQJ

Figure 16-2 Run-in or run-out path too short

Basic Functions
1314 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

● Short run-in path


Due to the collar on the thread run-in, little room is left for the tool (T) start ramp.
This must therefore be set shorter via DITS.
● Short run-out path
Due to the collar on the thread run-out, little room is left for the tool deceleration ramp,
leading to the risk of collision between the workpiece and the tool edge. The tool braking
ramp can be set shorter via DITE. Due to the inertia of the mechanical system, however,
a collision can nevertheless occur.
Remedy: Program a shorter thread, reduce the spindle speed.
The programmed run-in and run-out path only increases the rate of acceleration on the path.
If one of the two paths is set larger than the thread axis needs with active acceleration, the
thread axis is accelerated or decelerated with maximum acceleration.

Activation
The DITS and DITE functions are always active during thread cutting.
Example:

N...
N59 G90 G0 Z100 X10 SOFT M3 S500
N60 G33 Z50 K5 SF=180 DITS=1 DITE=3 ; Start of corner rounding with Z=53
N61 G0 X20

SD42010
Only paths, and not positions, are programmed with DITS and DITE.
The part program instructions are related to the setting data:
SD42010 $SC_THREAD_RAMP_DISP[0,1], ,
which defines the following acceleration response of the axis on thread cutting:
● SD42010 ≤ 0 to –1
Identical with previous response.
Starting/braking of the feedrate axis at configured acceleration rate.
Jerk according to current BRISK/SOFT programming.
● SD42010 = 0
Abrupt starting/braking of the feedrate axis on thread cutting.
● SD42010 ≥ 0
The thread run-up/deceleration distance is specified.
To avoid technology alarm 22280, the acceleration limits of the axis must be observed in
case of very small run-in and run-out paths.

Note
DITE acts at the end of the thread as a rounding clearance. This achieves a smooth
change in the axis movement.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1315
Feeds (V1)
Path feedrate F

Compatibility
Machine data:
MD20650 $MC_THREAD_START_IS_HARD
is dispensed with and is replaced by:
SD42010 $SC_THREAD_RAMP_DISP[0]
or
SD42010 $SC_THREAD_RAMP_DISP[1] .
The response of the new setting data with:
SD42010 $SC_THREAD_RAMP_DISP[0] = 0
or
SD42010 $SC_THREAD_RAMP_DISP[1] = 0
is identical to the previous machine data setting:
MD20650 $MC_THREAD_START_IS_HARD = 1.
The response with:
SD42010 $SC_THREAD_RAMP_DISP[0] = -1
or
SD42010 $SC_THREAD_RAMP_DISP[1] = -1
is identical to the previous machine data setting:
MD20650 $MC_THREAD_START_IS_HARD = 0 (default).

Constraints
When a block containing command DITS and/ or DITE is loaded in the interpolator, the path
programmed in DITS is transferred to setting data:
SD42010 $SC_THREAD_RAMP_DISP[0]
and the path programmed in DITE is transferred to setting data:
SD42010 $SC_THREAD_RAMP_DISP[1] .
The programmed run-in path is handled according to the current setting (inches, metric).
If no run-in/deceleration path is programmed before or in the first thread block, the value is
determined by the current value in setting data:
SD42010 $SC_THREAD_RAMP_DISP[0,1 ].
In the event of RESET, the setting data:
SD42010 $SC_THREAD_RAMP_DISP[0,1]
is set to "-1".

Basic Functions
1316 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

16.2.4.3 Linear progressive/degressive thread-lead change with G34 and G35

Application G34, G35


The functions can be used to produce self-shearing threads.

Functionality
The thread lead increase (G34) defines the numerical increase in the lead value. A larger
pitch results in a larger distance between the threads on the workpieces. The velocity of the
thread axis thus increases assuming that the spindle speed is constant.
The opposite naturally applies to decreasing thread lead (G35).
The following definitions have been made for the thread-lead changes with respect to the
new G codes:
● G34: Increase in thread lead corresponds to progressive change.
● G35: Decrease in thread lead corresponds to degressive change.
Both functions G34 and G35 imply the functionality of G33 and additionally provide the option
of programming an absolute lead change value for the thread under F. If the start and end
lead of a thread is known, the thread-lead change can be determined using the following
equation:

_NH ದN D _
) 
 O*

The identifiers have the following meanings:


F: The thread-lead change to be programmed [mm/rev2
ke: Thread lead of axis target point coordinate, thread axis [mm/rev]
ka: Initial thread lead (programmed under I, J or K) [mm/rev]
lG: Thread length [mm]
The absolute value of F must be applied to G34 or G35 according to the desired lead
increase or lead decrease.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1317
Feeds (V1)
Path feedrate F

When the thread length lG, lead change F and initial lead ka are known, the lead increase at
the end of block ke can be determined as follows by modifying the formula:
● G34 (progressive lead):

NH N D )  O *

● G35 (degressive lead):


NH N D )  O *

Note
If the formula results in a negative root expression, the thread cannot be machined!
In this case, the NC signals alarm 10605 or alarm 22275.

Sample program
Thread cutting G33 with degressive thread lead G35

N1608 M3 S10 ; Spindle speed


N1609 G0 G64 Z40 X216 ; Approach starting point
N1610 G33 Z0 K100 SF=R14 ; Thread with constant pitch 100 mm/rev

N1611 G35 Z-220 K100 F17.045455 ; Thread lead decrease 17.045455 mm/rev2

; Thread lead at end of block 50 mm/rev

N1612 G33 Z-240 K50 ; Traverse thread block without jerk


N1613 G0 X218 ;
N1614 G0 Z40 ;
N1616 M17 ;

Suppress special alarms


Any lead changes that would overload the thread axis when G34 is active or would result in
an axis standstill when G35 is active are detected in advance during block preparation.
Alarm 10604 "Thread lead increase too high" or alarm 10605 "Thread lead decrease too
high" are output if bit 10 in machine data:
MD11410 SUPPRESS_ALARM_MASK
is not set.
During thread cutting, certain practical applications require a correction of the spindle speed.
In this case, the operator will base his correction on the permissible velocity of the thread
axis.

Basic Functions
1318 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

The output of the alarm generated during monitoring (10604 or 10605) can be suppressed
by setting bit 10 in machine data:
MD11410 SUPPRESS_ALARM_MASK.
Block preparation continues as normal when alarms are suppressed.
The following situations are monitored cyclically when the thread is machined (interpolation):
● Exceeding of maximum velocity of thread axis
● Reaching of axis standstill with G35.
In these cases,
alarm 22270 "Maximum velocity of thread axis reached"
or
alarm 22275 "Zero velocity of thread axis reached"
is output.

Alarms
Thread cutting G33, G34, G35
● The following alarms are output when programming is incorrect:

Alarm 10604 "Thread lead increase too high"


Alarm 10605 "Thread lead decrease too high"
Alarm 10607 "Thread with frame (ROT) cannot be executed"
Alarm 16005 "Illegal lift-off path"
Alarm 16710 "Master spindle not programmed"
Alarm 16720 "Thread lead is zero"
Alarm 16730 "Incorrect parameters"
Alarm 16740 "No geometry axis programmed"
● If the spindle speed is too high when G33, G34, G35 are active, e.g. spindle override set
to 200%, alarm 22270 "Spindle speed for thread cutting too high" is output.
Alarm 22270 is output when the rapid traverse speed of the thread axis is exceeded. It is
possible to reduce the spindle speed using the spindle override switch to prevent serious
alarms.
References:
/FB1/ Function Manual, Basic Functions; Diagnostic Tools (D1);
Chapter: General Machine Data
/DA/ Diagnostics Manual

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1319
Feeds (V1)
Path feedrate F

16.2.4.4 Stop for thread cutting

Stop for thread cutting

Note
The non-destructive interrupt function should only be used for thread cutting, not for tapping
with G33.

Retraction movement
The retraction motion (liftfast) for thread cutting is controlled by the following keywords:
● LFON
⇒ Enable liftfast for thread cutting.
● LFOF
⇒ Disable liftfast for thread cutting.
These G functions can always be programmed.
The default setting for NC Reset and/or NC Start is specified in machine data:
MD20150 GCODE_RESET_VALUES.

Basic Functions
1320 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

The following sources can initiate a retraction motion during thread cutting:
● Fast inputs (programming with SETINTLIFTFAST for "LIFTFAST" option)
● NC Stop
● Alarms that implicitly initiate the NC stop.

5HWUDFWLRQFRPSOHWHGWKUHDG
FXWWLQJVWRSSHG

$[LVVWDQGVWLOO
',/)

6WDUWSRVLWLRQ ]1&BVWRSBVWDUWBUHWU 7DUJHWSRVLWLRQ


7KUHDGFXWWLQJ DFWLRQBPRWLRQ 7KUHDGFXWWLQJ

Figure 16-3 Interruption of G33 through retraction motion

Retraction path
The retraction path can be configured in machine data:
MD21200 LIFTFAST_DIST.

If required, this path in the part program can be changed by writing DILF at any point.
Following an NC reset, the value entered in machine data:
MD21200 LIFTFAST_DIST
(default value) is always active.

Retraction direction
The method for defining the retraction direction is controlled in conjunction with the variable
ALF using the following keywords:
● LFTXT
The plane of the retraction movement is determined by the path tangent and the tool
direction. This G code (default setting) is used to program the response on a fast lift.
For information about ALF programming, refer to:
References:
/PGA/ Programming Manual, Operations Planning

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1321
Feeds (V1)
Path feedrate F

/FB1/ Function Manual, Basic Function; Mode Group, Channel, Program Operation (K1);
Chapter: Asynchronous Subroutines (ASUBs), Interrupt Routines
● LFWP
The plane of the retraction movement is the active working plane selected with G codes
G17, G18 or G19. The direction of the retraction plane is independent of the path tangent.
This allows a fast lift to be programmed parallel to the axis.
These G functions can always be programmed.
The default setting for NC Reset and/or NC Start is specified in machine data:
MD20150 GCODE_RESET_VALUES.

In the plane of the retraction movement, ALF is used, as before, to program the direction in
discrete steps of 45 degrees. With LFTXT, retraction in the tool direction was defined for
ALF=1.
With LFWP the direction in the working plane is derived from the following assignment:

G17: X/Y plane ALF=1 Retraction in X direction


ALF=3 Retraction in Y direction
G18: Z/X plane ALF=1 Retraction in Z direction
ALF=3 Retraction in X direction
G19: Y/Z plane ALF=1 Retraction in Y direction
ALF=3 Retraction in Z direction

Note
The extension for programming the plane of the retraction movement can be used
independently of thread cutting.

Retraction speed
Retraction is performed at maximum axis velocity.
This can be configured in machine data:
MD32000 MAX_AX_VELO.

Retraction acceleration, jerk


Acceleration is performed at maximum possible values.
This can be configured in machine data:
MD32300 MAX_AX_ACCEL.

Example

N55 M3 S500 G90 G18 ; Set active machining plane


...

Basic Functions
1322 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

N65 MSG ("thread cutting")


MM_THREAD:
N67 $AC_LIFTFAST=0 ; Reset before beginning of
thread
N68 G0 Z5
N69 X10
N70 G33 Z30 K5 LFON DILF=10 LFWP ALF=7 ; Enable fast retraction for
thread cutting
; Retraction path = 10 mm
; Retraction plane Z/X
(due to G18)
; Retraction direction -X
(with ALF=3; retraction
direction +X)
N71 G33 Z55 X15
N72 G1 ; Deactivate thread cutting
N69 IF $AC_LIFTFAST GOTOB MM_THREAD ; If thread cutting
; was aborted
N90 MSG ("")
...
N70 M30
N55 M3 S500 G90 G0 X0 Z0
...
N87 MSG ("tapping")
N88 LFOF ; Deactivate fast retraction
before tapping
N89 CYCLE... ; Thread drilling cycle with G33
N90 MSG ("")
...
N99 M3012.97

Control system response


At POWER ON and RESET, the retraction path is set as configured (MD), as is the state of
LFON or LFOF and LFTXT or LFWP using machine data:
MD20150 GCODE_RESET_VALUES
from the corresponding G group.

Smoothed actual values


If low-resolution encoders are being used, smoothed actual values can be applied for
constant coupled path and axis motions.
Machine data:
MD34990 ENC_ACTVAL_SMOOTH_TIME
can be used to change the time constant for more effectively smoothed actual values for:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1323
Feeds (V1)
Path feedrate F

● Thread cutting with feedrate for G33, G34, G35


● Revolutional feedrate for G95, G96, G97, FRAPON
● Display of actual positions and actual speed/velocity
The larger the time constant, the better the smoothing of the actual values and the longer the
overtravel.

16.2.5 Feedrate for G331/G332, rigid tapping


G331 (tapping) and G332 (tapping retraction) can be used to tap a thread without a
compensating chuck (rigid tapping) if the spindle is technically capable of operating in
position control mode.

Speed S, feedrate F, thread lead


A revolutional feedrate [mm/rev.] is used for G331 and G332. The revolutional feedrate is
defined by programming the thread lead increase [mm/rev.].
The speed of the axes for the thread length is calculated from the programmed spindle
speed S and the thread lead.
Feedrate F [mm/min] = speed S [rev/min] * thread lead [mm/rev]

Note
For further information about programming G63/G331/G332, please see:
References:
Programming Manual, Fundamentals
Programming Manual, Cycles

Override
The revolutional feedrate in G331 and G332 can be influenced by an override.
Depending on the configuration, the override affects either the spindle speed or the path
feedrate:
MD12090 $MN_OVR_FUNCTION_MASK

Basic Functions
1324 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Path feedrate F

Bit Value Significance


0 0 The override influences the spindle speed (initial setting).
Depending on the setting in the machine data:
MD12080 $MN_OVR_REFERENCE_IS_PROG_FEED
the override is related either to the programmed spindle speed or to the configured
spindle speed limitation.
1 The override influences the path feedrate
Depending on the setting in machine data:
MD12082 $MN_OVR_REFERENCE_IS_MIN_FEED
the override is related either to the programmed path feedrate or to the configured
path feedrate limitation.

Note
The following overrides are not effective in G331 and G332:
• Programmable path feedrate override OVR
• Rapid traverse override

Inhibiting stop events for G331/G332


During tapping, a stop can be prevented if the block contains a path movement or a G4.
For this purpose, bit 0 must be set to 0 in machine data:
MD11550 $MN_STOP_MODE_MASK.
The stop, which was activated previously, is possible again after G331/G332 has been
executed.

16.2.6 Feedrate for G63, tapping with compensation chuck

Application
G63 is a subfunction for tapping threads using a tap with compensating chuck. An encoder
(position encoder) is not required.
Speed S, feedrate F, thread lead
With G63, a speed S must be programmed for the spindle and a feedrate F for the infeed
axis (axis for thread length).
The feedrate F must be calculated by the programmer on the basis of the speed S and the
thread lead.
Feedrate F [mm/min] = speed S [rev/min] * thread lead [mm/rev]

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1325
Feeds (V1)
Feedrate FA for positioning axes

16.3 Feedrate FA for positioning axes

Syntax
FA[<positioning axis>] = <feedrate value>

Functionality
The velocity of a positioning axis is programmed with axis-specific feedrate FA.
● Effectiveness: Modal
● Special points to be noted
– No more than 5 axis-specific feedreates can be programmed in each part program
block.
– The feedrate is always G94.
– If no axial feedrate FA is programmed, the axial default:
MD32060 $MA_POS_AX_VELO (initial setting for positioning axis velocity) takes
effect.
Parameter: Positioning axis
● Value range: Identifier of channel axes
MD20080 $MC_AXCONF_CHANAX_NAME_TAB

Basic Functions
1326 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate FA for positioning axes

Parameter: Feed value


● Value range
0.001...999,999.999 mm/min, degrees/min or 0.001, ...39,999.9999 inch/min
For more information about the value range of the axial feedrate see:
References:
/PG/ Fundamentals Programming Manual
/FB1/ Function Manual Basic Functions; Velocities, Setpoint/Actual Value Systems,
Closed-Loop Control (G2)
● NC/PLC interface (channel-specific)
The feedrate is output at the channel-specific NC/PLC interface:
DB21, ... DBB158 - DBB193
For a description of the channel-specific NC/PLC interface signals (modification signal,
machine axis number of positioning axis, etc.) see:
References:
/FB1/ Function Manual, Basic Functions; Various Interface Signals and Functions (A2)
● NC/PLC interface (axis-specific)
The feed value is output at the axis-specific NC/PLC interface:
DB31, ... DBB78 - DBB81

Note
Maximum axis velocity
The maximum axis velocity is not exceeded:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
F function output to the NC/PLC interface
Output of the F functions to the NC/PLC interface is not recommended. Activating the
output of F functions to the NC/PLC interface can cause a drop in velocity in continuous-
path mode. The output of F functions to the NC/PLC interface can be suppressed:
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time of the F functions)
For a detailed description please refer to:
References:
/FB1/ Function Manual, Basic Functions; Auxiliary Functions (H2)

RESET response
After end of program or NC-RESET, the feedrate value takes effect depending on machine
data:
MD22410 $MC_F_VALUES_ACTIVE_AFTER_RESET = <value>

Value Meaning
0 After NC RESET the default values are effective.
1 After NC RESET the last FA values to be programmed are effective.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1327
Feeds (V1)
Feedrate control

16.4 Feedrate control

16.4.1 General

Programming and controlling the feedrate


The figure below shows the options for feedrate programming and control.

3URJUDPPHG) 3URJUDPPHG6
6''5<B581B)((' YDOXH YDOXH
,6B$FWLYDWHGU\
'U\UXQIHHGUDWH
UXQIHHGUDWH 6WRUHG6
)YDOXH ** YDOXH
*
*
*** 6 6SHHG *
* ** *
 3L U
*
(TXDO 0LQLPXP 0D[LPXP 3DWKOHQJWK )
WR

6SLQGOHRYHUULGH
   6''5<B581B)(('B02'( 3/&
$FWXDOVSLQGOH PDFKLQHFRQWUROSDQHO
,6DFWLYDWHGU\UXQIHHGUDWH
VSHHG
3URJUDPPHG
33 IHHGUDWHRYHUULGH 6SLQGOHVSHHGVHWSRLQW
295  63&21
295$ 6SLQGOHSRVLWLRQFRQWURO 33 63&2)
**
*


)HHGUDWHRYHUULGH 3/&
PDFKLQHFRQWUROSDQHO
B
,6UDSLGRYHUULGHDFWLYH
3RVLWLRQLQJRUSDWKYHORFLW\ ,6IHHGUDWHRYHUULGHDFWLYH
6 6SHHG 6 * ,6RYHUULGHDFWLYH
RU6 *

Figure 16-4 Programming and controlling the feedrate

Basic Functions
1328 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

16.4.2 Feedrate disable and feedrate/spindle stop

General
The feedrate disable or feedrate/spindle stop brings the axes to a standstill with adherence
to the braking characteristics and the path contour (exception: G33 block).
References:
/FB1/ Function Manual, Basic Function; Continuous-Path Mode, Exact Stop and
Look Ahead (B1)

"Feedrate disable" DB21, ... DBX6.0


Interface signal "Feedrate disable" (DB21, ... DBX6.0) shuts down all axes (geometry and
auxiliary axes) of a channel in all modes.

Activation of channel-specific feedrate disable


If G33, G34, G35 active: Not effective
If G63 active: Effective
If G331, G332 active: Effective

"Feed stop" DB21, ...DBX12.3 geometry axes


Interface signals "Feed stop" (DB21, ... DBX12..3 and the following signals) for geometry
axes 1, 2, and 3 stop the geometry axes of a channel in JOG mode.

"Feed stop" DB31, ...DBX4.3 axis-specific


The axis-specific "Feed stop" interface signal (DB31, ... DBX4.3) is used to stop the relevant
machine axis.
In automatic mode:
● If the "Feed stop" is performed for a path axis, all the axes traversed in the current block
and all axes participating in the axis group are stopped.
● If the "Feed stop" is performed for a positioning axis, only this axis is stopped.
Only the current axis is stopped in JOG mode.

Activation of axis-specific function "Feed stop"


Active in G33, G34, G35 Effective
(causes contour deviations)
For active G63 Effective
In active G331, G332 Effective

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1329
Feeds (V1)
Feedrate control

Axis/spindle disable" DB31, ... DBX1.3


Activating "Axis/spindle disable" (DB31, ...DBX1.3) disables the axial PLC interlocks "No
controller enable" and "Feed stop".
The axial and channel-specific override, however, is active.

"Spindle stop" DB31, ... DBX4.3


IS "Spindle stop" (DB31, ... DBX4.3) is used to stop the relevant spindle.

Activation of the "Spindle stop" function


Active in G33, G34, G35 Effective
(may cause contour deviations depending on
dynamic characteristics)
For active G63 Effective
In active G331, G332 not functional

16.4.3 Feedrate override on machine control panel

General
The operator can use the feedrate override switch to increase or decrease the path feedrate
relative to the programmed percentage with immediate effect. The feedrates are multiplied
by the override values.
An override between 0 and 200% can be programmed for the path feedrate.
The rapid traverse override switch is used to reduce the traversing velocity when testing a
part program.
An override between 0 and 100% can be programmed for the rapid traverse.
The feedrate can be changed axis-specifically for positioning axes. The override can be
between 0 and 200%.
The spindle override can be used to modify the spindle speed and the cutting rate (with G96,
G961). The override can be between 0 and 200%.
The override is not permitted to exceed the machine-specific acceleration and speed limits or
generate a contour error.
The feedrate override can be changed separately for path and position axes.
The overrides influence the programmed values or the limiting (e.g. G26, LIMS in spindle
speed).
A sequence of G63 blocks is traversed regardless of the feedrate override. A sequence of
G63 blocks consists of directly following blocks having the G code G63. It starts with the first
G63 block and ends with the first path motion block that does not have G63.

Basic Functions
1330 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

Channel-specific "Feedrate override" DB21, ...DBB4/"rapid traverse override" DB21, ...DBB5


One enable signal and one byte are provided on the PLC interface for the override factor, for
the two feedrate types.
IS "Feed override" (DB21, ... DBB4)
IS "Feed override active" (DB21, ... ... DBB4)
IS "Rapid traverse override" (DB21, ... DBB5)
IS "Rapid traverse override active" (DB21, ... DBX6.6)
The interface for the override can be provided by the PLC in binary-coded or gray-coded
form.
Whether binary or gray-coded is valid is defined via machine data:
MD12020 OVR_FEED_IS_GRAY_CODE (path feedrate override switch, gray-coded)
and
MD12040 OVR_RAPID_IS_GRAY_CODE (rapid traverse override switch, gray coded.
The following permanent assignment applies to binary code:

Code Override factor


00000000 0.00 ≙ 0%
00000001 0.01 ≙ 1%
00000010 0.02 ≙ 2%
00000011 0.03 ≙ 3%
00000100 0.04 ≙ 4%
. .
. .
. .
01100100 1.00 ≙ 100%
. .
. .
. .
11001000 2.00 ≙ 200%
In gray coding, the override factors corresponding to the switch position is entered in
machine data:
MD12030 OVR_FACTOR_FEEDRATE [n]
(evaluation of path feedrate override switch)
or
MD12050 OVR_FACTOR_RAPID_TRA [n] (evaluation of rapid traverse override switch).
An active feedrate override has an effect on all path axes that are assigned to the current
channel.
An active rapid traverse override has an effect on all the axes that are traversed with rapid
traverse and that are assigned to the current channel.
If there is no dedicated rapid traverse override switch, you can switch between effective
rapid traverse override and feedrate override. In this case, feedrate overrides above 100%
are limited to 100% for rapid traverse override.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1331
Feeds (V1)
Feedrate control

The override to be active can be selected via the PLC or operator panel front. On activating
the rapid traverse override via the operator panel front, the "feedrate override for rapid
traverse" is selected (DB21, ... DBX25.3) is transferred via the PLC basic program to the
"rapid traverse override effective" interface signal (DB21, ... DBX6.6) and the IS "feedrate
override" (DB21, ... DBB4) is copied to the IS "Rapid traverse override" (DB21, ... DBB5).
On selecting via PLC, the "rapid traverse override active" interface signal (DB21, ... DBX6.6)
is to be set by the PLC user program and the interface signal of the feedrate override (DB21,
... DBB4) is to be copied to the Rapid traverse override (DB21, ... DBB5).

Effectiveness of the channel-specific feedrate and rapid traverse override


Active in G33, G34, G35 not functional
For active G63 not functional
In active G331, G332 not functional

Reference speed for path feedrate override


The reference speed for the path feedrate override specified via machine control panel can
be set as different from the standard or default.
The machine data:
MD12082 OVR_REFERENCE_IS_MIN_FEED
enables the corresponding selection.

Axis-specific "Feedrate override" DB31, ...DBB0


One enable signal and one byte for the feedrate override are available on the PLC interface
for each positioning axis:
IS "Feed override" (DB21, ... DBB0)
IS "Override active" (DB31, ... DBX1.7)
The interface for the feedrate override can be provided by the PLC in binary-coded or gray-
coded form.
Machine data:
MD12000 OVR_AX_IS_GRAY_CODE (gray-coded axis feedrate override switch)
is used to define whether binary or gray code is valid.
The following permanent assignment applies to binary code:

Code Override factor


00000000 0.00 ≙ 0%
00000001 0.01 ≙ 1%
00000010 0.02 ≙ 2%
00000011 0.03 ≙ 3%
00000100 0.04 ≙ 4%
. .
. .
. .

Basic Functions
1332 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

Code Override factor


01100100 1.00 ≙ 100%
. .
. .
. .
11001000 2.00 ≙ 200%
In gray coding, the override factors corresponding to the switch position are entered in
machine data:
MD12010 OVR_ FACTOR_AX_ SPEED [n] (evaluation of axis feedrate override switch).

Effectiveness of the axis-specific feedrate override


Active in G33, G34, G35 not functional
For active G63 not active
(the override is set in the NC permanently to
100%)
In active G331, G332 not active
(the override is set in the NC permanently to
100%)

Spindle override" DB31, ... DBB0"


One enable signal and one byte for the spindle override factor are available on the PLC
interface for each spindle.
IS "Spindle override" (DB31, ... DBB19)
IS "Override active" (DB31, ... DBX1.7)
The interface for the spindle override can be provided from the PLC in binary-coded or gray-
coded form.
Machine data:
MD12060 OVR_SPIND_IS_GRAY_CODE (spindle override switch is gray-coded)
is used to define whether binary or gray code is valid.
The following permanent assignment applies to binary code:

Code Override factor


00000000 0.00 ≙ 0%
00000001 0.01 ≙ 1%
00000010 0.02 ≙ 2%
00000011 0.03 ≙ 3%
00000100 0.04 ≙ 4%
. .
. .
. .
01100100 1.00 ≙ 100%
. .

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1333
Feeds (V1)
Feedrate control

Code Override factor


. .
. .
11001000 2.00 ≙ 200%
In gray coding, the override factors corresponding to the switch position are entered in
machine data:
MD12070 OVR_FACTOR_SPIND_SPEED [n] (evaluation of spindle override switch).

Effectiveness of the spindle override


Active in G33, G34, G35 active
(if the spindle is in position control, then the
override switch can be actuated)
For active G63 not active
(the override is set in the NC permanently to
100%)
In active G331, G332 Effective

Limiting the override factor


In a binary-coded interface, the maximum possible override factors for path, axis feedrate
and spindle speed can be limited further with machine data:
MD12100 OVR_FACTOR_LIMIT_BIN (limiting in binary-coded override switch).

Override active DB21, ...DBX6.6/DB21, ... DBX6.7/DB31, ... DBX1.7


The override values set with the selector switch on the machine control panel are
immediately active for all modes and machine functions, provided that IS "Rapid traverse
override active", (DB21, ... DBX6.6) "Feedrate override active" (DB21, ... DBX6.7) or
"Override active" (DB31, ... DBX1.7) are set.
An override factor of 0% acts as a feedrate disable.

Override inactive
If override is inactive (above IS signals are set to 0), the override factor 1 is used internally in
the NC, i.e. the override is 100%. The value that is entered in the PLC interface is not
relevant.
An exception is the zero setting for a binary interface and the 1st switch setting for a gray-
coded interface. In these cases, the override factors entered at the PLC interface are used.
With a binary interface, the override factor = 0. With a Gray-coded interface, the value
entered in the machine data for the 1st switch setting is output as the override value. It
should be populated with 0.
An override factor of 0% acts as a feedrate disable.

Reference to spindle override


Whether the spindle override is related to the speed limited by MD or SD, or to the
programmed speed is specified in machine data:
MD12080 OVR_REFERENCE_IS_PROG_FEED (override reference speed).

Basic Functions
1334 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

16.4.4 Programmable feedrate override

Function
The programmable feedrate override can be used to change the velocity level of path and
positioning axes by means of a command in the part program.
A separate feedrate override can be programmed for positioning axes.

Programming
The feedrate override can be changed with the following commands:

OVR= .... Feedrate change for path feedrate F


OVRA[X1]= ... Feedrate change for positioning feedrate FA
The programmable range is between 0 and 200%.
The default setting is 100%.

Effectivity
Interface signals "Rapid traverse and feedrate override" (DB21, ... DBB6) and "Axis-specific
override active" (DB31, ... DBX1.7) do not apply to the programmable feedrate override. The
programmable feedrate override remains active when these signals are deactivated.
The active override is calculated from the product of the programmable feedrate override
and the feedrate override from the machine control panel.
The default setting is 100%. It is active if no feedrate override has been programmed or
following a RESET, if machine data:
MD22410 F_VALUES_ACTIVE_AFTER_RESET (F function active via RESET)
is not set.
OVR is not active with G33,G34,G35.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1335
Feeds (V1)
Feedrate control

16.4.5 Dry run feedrate

Application
The dry run feedrate is used when testing part programs without machining the workpiece in
order to allow the program or program sections to execute with an increased path feedrate,
for example.

"Dry run feedrate selected" DB21, .... DBX24.6


The dry run feedrate can be activated from the PLC or the operator panel.
When activated from the operator panel, interface signal "Dry run feedrate selected" (DB21,
... DBX24.6) is set and transferred by the PLC basic program to interface signal "Activate dry
run feedrate" (DB21, ... DBX0.6).
When selected on the PLC, the "Activate dry run feedrate" interface signal is required to be
set by the PLC user program.
The execution of the program is triggered with G94.
The dry run feedrate also takes precedence over the feedrates for G93,G95 and
G33,G34,G35.
In this case, the programmed feedrate is compared to the dry run feedrate in:
SD42100 DRY_RUN_FEED
and the axis is then traversed at the higher of the two feedrates.

Dry run feedrate change "Dry run feedrate active" DB21, .... DBX318.6.
The dry run feedrate (SD42100 DRY_RUN_FEED = 1) can be changed via the operator
panel in the operating area "Parameters".
The interface signal "Dry run feedrate active" (DB21, ... DBX318.6) is set if the selection has
been accepted by the NCK. DRY is displayed in the operator panel status bar to indicate an
active dry run feedrate if
● selection takes place when the program stops at the end of a block or if the machine data
● MD10704 DRY_RUN_MASK = 1 has been set during execution of the program.
If MD10704 DRYRUN_MASK = 0 has been set a dry run feedrate may only be activated/
deactivated at the end of a block.
If the dry run feedrate is no longer selected, the interface signal "Dry run feedrate active"
(DB21, ... DBX318.6) is reset.

Basic Functions
1336 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

Evaluation
The effect of:
SD42100 DRY_RUN_FEED
can be controlled via another setting data:
SD42101 DRY_RUN_FEED_MODE .

SD42101 Effectivity
DRY_RUN_FEED_MODE
As long as the "Activate dry run feedrate" interface signal is set, instead
of the programmed feedrates, the feedrate value set in
SD42100 DRY_RUN_FEED
is effective as follows:
0 The maximum value from SD42100 DRY_RUN_FEED and the
programmed velocity is effective. This is the same as the default setting.
1 The minimum value from SD42100 DRY_RUN_FEED and the
programmed velocity is effective.
2 Setting data SD42100 DRY_RUN_FEED is effective directly, regardless
of the programmed velocity.
3 -9 reserved
10 As for configured value 0 except for thread cutting (G33,G34,G35) and
tapping (G33,G34,G35). These functions are executed as
programmed.
11 As for configured value 1 except for thread cutting (G33,G34,G35) and
tapping (G33,G34,G35). These functions are executed as
programmed.
12 As for configured value 2 except for thread cutting (G33,G34,G35) and
tapping (G33,G34,G35). These functions are executed as
programmed.
A dry run feedrate can be selected in the automatic modes and activated on interruption of
an automatic mode or end of a block. Using machine data:
MD10704 DRYRUN_MASK = 1 ,
the dry run feedrate can also be activated during execution of the program (in the part
program block).

Note
Activation during machining triggers an internal reorganization task on the control which
causes the axes to be stopped for a short time. This can affect the surface finish of the
workpiece being machined.

With MD10704 DRYRUN_MASK = 2 ,


the dry run feedrate can be activated/ deactivated at any time without the axes stopping. The
function only becomes effective with a block which comes later in the program run.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1337
Feeds (V1)
Feedrate control

16.4.6 Multiple feedrate values in one block

Application
The functionality described in the following is used primarily for grinding, but is not restricted
to it.
References:
/FB2/ Function Manual, Extended Functions; Grinding (W4)
/FB2/ Function Manual, Extended Functions; Oscillation (P5)

Functionality
The function "Multiple feedrates in one block" can be used to activate 6 different feedrate
values of an NC block, a dwell time or a retraction motion synchronously, depending on the
external digital and/or analog inputs.

Retraction
Retraction by the programmed amount is initiated in the IPO cycle.

Signals
The HW input signals are combined in one input byte for the function "Multiple feedrate in
one block". A permanent functional assignment applies within the byte:

Table 16- 1 Input byte for "Multiple feedrates in one block"

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Input no. I7 I6 I5 I4 I3 I2 I1 I0
Feedrate address F7 F6 F5 F4 F3 F2 ST SR

I7 to I2 Activation of feedrates F7 to F2
E1 Activation of dwell time ST (in seconds)
I0 Activation of retraction motion SR

Priorities
The signals are scanned in ascending order starting at I0.
Therefore, the retraction motion (SR) has the highest priority and the feedrate F7 the lowest
priority.
SR and ST end the feedrate motions that were activated with F2 - F7.
SR also ends ST, i.e. the complete function.
The highest-priority signal determines the current feedrate.

Basic Functions
1338 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

Machine data:
MD21230 MULTFEED_STORE_MASK
(store input signals for the "Multiple feedrates in one block" function)
can be used to define the response on loss of the highest-priority input in each case (F2 -
F7).
The end-of-block criterion is satisfied when:
● The programmed end position is reached
● The retraction motion ends (SR)
● The dwell time elapses (ST)

Delete distance-to-go
A retraction motion or dwell time causes the distance-to-go to be deleted.

Hardware assignment
The channel-specific machine data:
MD21220 MULTFEED_ASSIGN_FASTIN
(assignment of the input byte of the NCK I/Os for "Multiple feedrates in one block")
can be used to assign up to two digital input bytes or comparator input bytes to the NCK I/O.
Machine data:
MD21220 MULTFEED_ASSIGN_FASTIN
can also be used to invert the input bits.
If a 2nd byte is entered, the contents of the 1st and 2nd byte are ORed before being used.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1339
Feeds (V1)
Feedrate control

VWE\WH QGE\WH
0' 'LJLWDOLQSXWE\WH 'LJLWDOLQSXWE\WH 0'
08/7)(('B$66,*1B)$67,1 RU RU 08/7)(('B$66,*1B)$67,1
ELW FRPSDUDWRULQSXWE\WH FRPSDUDWRULQSXWE\WH ELW
%LW   %LW  
0' 0'
08/7)(('B$66,*1B)$67,1 ,QYHUVLRQPDVN ,QYHUVLRQPDVN 08/7)(('B$66,*1B)$67,1
ELW ELW
%LW   %LW  

B  B

,QSXWELW  
,QSXWE\WHIRU
6HYHUDOIHHGUDWHVLQ
RQHEORFN

Figure 16-5 Signal routing for "Multiple feeds in one block"


The assignment of the digital input bytes and parameterization of the comparators are
described in:
References:
/FB1/ Function Manual, Basic Functions; Various Interface Signals (A2)

Programming path motion


The path feedrate is programmed under the address F and remains valid until an input signal
is present. This value acts modally.
F2=... to F7=... can be used in addition to the path feedrate to program up to 6 further
feedrates in the block.
The numerical expansion indicates the bit number of the input that activates the feedrate
when changed:
e.g. F7=1000 ; 7 corresponds to input bit 7.
Bits 2 to 7 are permissible for numerical expansion of the feedrate. The programmed values
act non-modally. The path feedrate programmed under F applies in the next block.
Dwell (sparking out time) and retraction path are programmed under separate addresses in
the block:

ST=... dwell (for grinding sparking out time)


SR=... Retraction path
These addresses apply non-modally.

Basic Functions
1340 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

Programming axial motion


The axial feedrates are programmed under address FA and remain valid until an input signal
is present. They act modally.
FMA[2,x]=... to FMA[7,x]=... can be used to program up to 6 further feedrates per
axis in the block.
The first expression in square brackets indicates the bit number of the input that activates
the feedrate when changed. The second expression indicates the axis to which the feedrate
applies.
Example:

FMA[3,Y]=1000 ;axial feedrate for Y axis,


;corresponds to input bit 3

Bits 2 to 7 are permissible for the numerical expansion of the axial feedrate. The values
programmed under FMA are active non-modally. The feedrate programmed under FA applies
to the next block.
Dwell (sparking out time) and retraction path can also be defined for a single axis:

STA[x]=... ;dwell (sparking out time), axis-specific


SRA[x]=... ;retraction path, axis-specific
The expression in square brackets indicates the axis for which the sparking out time and
retraction path apply.

STA[X]=2.5 ;sparking out time 2.5 seconds


SRA[X]=3.5 ;retraction path 3.5 (unit e.g.: mm)

These addresses apply non-modally.


If feedrates, a sparking out time (dwell) or retraction path are programmed for an axis on
account of an external input, this axis must not be programmed as a POSA axis in this block
(positioning axis beyond end of block).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1341
Feeds (V1)
Feedrate control

When the input for the sparking out time or retraction path is activated, the distance-to-go for
the path axes or the particular single axis is deleted and the dwell or retraction is started.

Note
The unit for the retraction path refers to the current valid unit of measurement (mm or inch).
The reverse stroke is always made in the opposite direction to the current motion. SR/SRA
always programs the value for the reverse stroke. No sign is programmed.
It is also possible to poll the status of an input for synchronous commands of various axes.
Look Ahead is also active for multiple feedrates in one block. In this way, the current
feedrate is restricted by the Look Ahead value.

Application
Typical applications include:
● Analog or digital calipers
Depending on whether the external inputs are analog or digital, various feedrate values, a
dwell and a retraction path can be activated. The limit values are defined via the setting
data.
● Switching from infeed to working feedrate via proximity switch

Example
Internal grinding of a conical ring, where the actual diameter is determined using calipers
and, depending on the limits, the feedrate value required for roughing, finishing or fine
finishing is activated. The position of the calipers also provides the end position. Thus, the
block end criterion is determined not only by the programmed axis position of the infeed axis
but also by the calipers.

&DOLSHUV

5LQJ

*ULQGLQJGLVF

Figure 16-6 Calipers

Basic Functions
1342 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

Part program

*;)  ,QLWLDOVHWWLQJ


*;) ) ) ) 67 65 

5HWUDFWLRQ
6SDUNLQJRXWWLPH
)HHGUDWHILQHILQLVKLQJ
)HHGUDWHILQLVKLQJ
)HHGUDWHURXJKLQJ
)HHGUDWHDLUJULQGLQJ

Note
The axial feedrate/path feedrate (F value) is the 100% feedrate.
Feedrates smaller than or equal to the axial feedrate/path feedrate can be implemented with
"Multiple feedrate values in one block" (F2 to F7 values).
The "Multiple feedrate values in one block" functionality is only available in conjunction with
the "Synchronized actions" function.
References:
/FB1/ Function Manual, Basic Functions; Various Interface Signals and Functions (A2)

16.4.7 Fixed feedrate values

Function
The machine data can be used to define 4 fixed feedrate values, which can be activated via
the interface signal. The function is possible in AUTOMATIC and JOG modes.

Behavior in AUTOMATIC mode


The fixed feedrate, which has been selected, is used instead of the programmed feedrate.
The following MDs and interface signals can be used to select fixed feedrates for
path/geometry axes:
● MD12202 $MN_PERMANENT_FEED[n] (fixed feedrates for linear axes)
● MD12204 $MN_PERMANENT_ROT_AX_FEED[n] (fixed feedrates for rotary axes)
● IS "Activate fixed feedrate x for path/geometry axes" (DB21, ... DBX29.0- 29.3)
The contour travels at the activated fixed feedrate, instead of using the programmed
feedrate.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1343
Feeds (V1)
Feedrate control

Behavior in JOG mode


The fixed feedrate selected via the interface signal is applied during travel instead of the
JOG velocities set.
The travel direction is specified via the interface signal.
The following MDs and interface signals can be used to select fixed feedrates for
path/geometry axes and for machine data:
● MD12202 $MN_PERMANENT_FEED[n] (fixed feedrates for linear axes)
● MD12202 $MN_PERMANENT_ROT_AX_FEED[n] (fixed feedrates for rotary axes)
● IS "Activate fixed feedrate x for machine axes" (DB31, ... DBX3.2-3.5)
The axis travels at the activated fixed feedrate, instead of at the JOG velocity/JOG-rapid
traverse velocity set in MD.

Constraints
● Fixed feedrate does not influence spindles, positioning axes and tapping.
● While traversing with fixed feedrate, the override depends on machine data:
MD12200 $MN_RUN_OVERRIDE_0 (traveling with override 0)
● The DRF offset cannot be activated for a selected fixed feedrate.
● The fixed feedrates are always linear feedrate values. Switchover to linear feedrate is
conducted internally even in case of revolutional feedrate.

Interface signals

6LJQDOVWRFKDQQHO '% &KDQQHO


&KDQQHO
$FWLYDWHIL[HGIHHGUDWHIRUSDWKJHRPHWU\D[HV )L[HG
'%; IHHGUDWH

6LJQDOVWRD[LV '% $[LV


$[LV
$FWLYDWHIL[HGIHHGUDWHIRUPDFKLQHD[HV )L[HG
'%; IHHGUDWH

Figure 16-7 Overview of interface signals for fixed feedrate

Basic Functions
1344 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

16.4.8 Feedrate for chamfer/rounding FRC, FRCM

General
The machining conditions can change significantly during surface transitions to
chamfer/rounding. Hence, the chamfer/rounding contour elements require dedicated,
optimized feedrate values to achieve the desired surface quality.

Function
You can program the feedrate for the chamfer/rounding with FRC (non-modal) or FRCM
(modal).
The feedrate value is interpreted according to the type of feedrate active:

G94, G961, G971: Feedrate in mm/min, inch/min or o/min


G95, G96, G97: Revolutional feedrate in mm/rev or inch/rev
The FRC/FRCMvalue is applied depending upon the machine data:
MD20201 CHFRND_MODE_MASK

Bit 0 = 0: FRC/FRCM from following block (default setting)


Bit 1 = 0: FRC/FRCM from preceding block (recommended setting)
Reason: The feedrate type (G94,G95,G96,G961 etc.) and thus the conversion to the
internal format must be consistent within the block for F and FRC/FRCM.

Empty blocks
When chamfer or rounding is active, the possible number of blocks containing no traversing
information is limited.
The maximum number is defined in machine data:
MD20200 CHFRND_MAXNUM_DUMMY_BLOCKS.

The possible blocks without traversing information in the compensation plane are pure
dummy commands and are called empty blocks. For this reason, they may only be written
between two blocks with traversing information.

Boundary conditions
● Feedrate interpolation FLIN and FCUB is not possible for chamfer/rounding.
● FRC/FRCM has no effect if a chamfer is being machined with G0; the command can be
programmed according to the F value without error message.
● FRC is only effective if a chamfer/rounding is programmed in the same block or if RNDM
has been activated.
● FRC overwrites the F or FRCM value for chamfer/rounding in the current block.
● FRC/FRCM must be set to a value greater than zero.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1345
Feeds (V1)
Feedrate control

● FRCM=0 activates the feedrate programmed in F for the chamfer/rounding.


● If FRCM is programmed, the FRCM value must be reprogrammed, equivalent to F, on a
G94 ↔ G95 change, etc. If only F is reprogrammed and FRCM > 0 before the feedrate type
is changed, error message 10860 (no feedrate programmed) appears.

16.4.9 Non-modal feedrate FB

General
A separate feedrate can be specified for a single block with the command FB (Feed Block).
The previously active path feedrate is overwritten for this block. After this block, the previous
modal path feedrate is active again.

Function
The non-modal feedrate is programmed with FB=<value>.
The feedrate is interpreted according to the active feedrate type:

G94, G961, G971: Feedrate in mm/min or inches/min or o/min


G95, G96, G97: Revolutional feedrate in mm/rev or inch/rev

Boundary conditions
● The programmed value of FB=<value> must be greater than zero.
● If no traversing motion is programmed in the block (e.g.: Computational block), the FB
has no effect.
● If no explicit feed for chamfering/rounding is programmed, then the value of FB also
applies for any contour element chamfering/rounding in this block.
● The path speed profile programmed with FLIN or FCUB is not active together with
revolutional feedrate for G95 as well as with constant cutting speed for G96/G961 and
G97/G971.
● Feedrate interpolations FLIN, FCUB, .. are also possible without restriction.
● Simultaneous programming of FB and FD (handwheel travel with feed overlay) or F
(modal path feedrate) is not possible.

Basic Functions
1346 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

16.4.10 Programmable single-axis dynamic response

Single axes
Single axes can be programmed:

In the part program POS[Axis]=...


POSA[Axis]=...
SPOS[Axis]=...
SPOSA[Axis]=...
OS[Axis]=...
OSCILL[Axis]=...
In synchronized actions (command axes) EVERY ... DO
POS[Axis]=...
SPOS [Spindle] = .....
MOV[Axis]=...
In the PLC FC15/FC16 and FC18

Dynamic response of an axis/spindle


The dynamic response of an axis is dependent on:
● the preset feed value (MD32060 POS_AX_VELO)
Can be programmed in the part program with FA[axis]= ..., or a feed
overrideOVRA[axis]= ... in percent.
Programmable in synchronized actions using FA[Axis]= ....
Modifiable from the PLC by entering FRate, or overwriting the axial override.
● The acceleration value (MD32300 MAX_AX_ACCEL)
Programmable indirectly in the part program by overwriting the machine data with
subsequent NewConfig, or directly using a percentage acceleration override
ACC[Axis]= ....
Modifiable indirectly in synchronized actions by overwriting the MD (no NewConfig
possible) or by executing an ASUB, or programmable directly using a percentage
acceleration override ACC[Axis]= ... (cannot be preset by the PLC).
The PLC has the same options as synchronized actions.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1347
Feeds (V1)
Feedrate control

● The acceleration characteristics


Programmable in the part program using BRISKA(axis), SOFTA(axis), DRIVEA(axis) and
JERKA(axis).
Not programmable in synchronized actions (only directly using an ASUB).
Cannot be preset by the PLC (only indirectly using an ASUB).
● The selected servo parameter set
A parameter set describes the most important setting options for control purpose in the
servo.
It comprises, e.g. the following axis-specific/spindle-specific machine data:

31050 DRIVE_AX_RATIO_DENOM[n] Parameter set n for 0 to 5


31060 DRIVE_AX_RATIO_NUMERA[n] Parameter set n for 0 to 5
32200 POSCTRL_GAIN[n] Parameter set n for 0 to 5
32452 BACKLASH_FACTOR[n] Parameter set n for 0 to 5
32610 VELO_FFW_WEIGHT[n] Parameter set n for 0 to 5
32800 EQUIV_CURRCTRL_TIME[n] Parameter set n for 0 to 5
32810 EQUIV_SPEEDCTRL_TIME[n] Parameter set n for 0 to 5
32910 DYN_MATCH_TIME[n] Parameter set n for 0 to 5
36012 STOP_LIMIT_FACTOR[n] Parameter set n for 0 to 5
36200 AX_VELO_LIMIT[n] Parameter set n for 0 to 5
For more information about parameter sets and programming, please refer to:
References:
/FB1/ Function Manual, Basic Functions; Velocities, Setpoint/Actual Value Systems, Closed-
Loop Control (G2)
/PG/ Programming Manual, Fundamentals; Path Response and Feedrate Control

Dynamic criteria and feedforward control


With dynamic response criteria, it must be distinguished from where they were set:
● In the part program
or
● From a main-run interpolation (synchronized action or PLC default)

Note
Changes in the dynamic response made in a part program do not affect command axis or
PLC axis movements.
Changes from synchronized actions do not affect the movements from a part program.

Basic Functions
1348 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

Travel with feedforward control ON/OFF


The type of feedforward control and the path axes to which feedforward is to be applied are
determined:
● Programmable in the part program with FFWON/ FFWOF for axes selected using machine
data.
● Only indirectly programmable in synchronized actions (ASUB).
● Only indirectly programmable from the PLC (ASUB).

Percentage acceleration override


ACC[Axis]
ACC[Axis]= 0 .. 200 can be used to modify the acceleration set in machine data:
MD32300 MAX_AX_ACCEL
in a range between 0% and 200% in part programs and synchronized actions.

ACC[Axis]= <value> Where Axis = Channel axis name (X, Y ....), spindle (S1, ...)
Value = Percent of MD32300 MAX_AX_ACCEL
(0 <= value <= 200)
The current acceleration value can be called with the system variables $AA_ACC[Axis]. It is
determined by:
$AA_ACC[Axis]= Content(MD32300 MAX_AX_ACCEL[Axis]) * ACC[Axis]/100
MD32320 DYN_LIMIT_RESET_MASK can be used to control maintaining the ACC value in
the event of channel RESET/M30.

Note
The acceleration offset programmed with ACC[...] is always considered as specified
above for the output in $AA_ACC. However, $AA_ACC is not output in the part program at
the same time as in a synchronized action.
The value described in the part program is only considered in the system variable $AA_ACC
as described in the part program, if ACC has not been changed in the meantime by a
synchronized action.
The value described in the synchronized action is only considered in the system variable
$AA_ACC as described in the synchronized action, if ACC has not been changed in the
meantime by a part program.

Main run axes


Main run axes (MR axes) are axes that are interpolated by the main run and can be:
● Command axes (activated by synchronized actions)
● PLC axes (started by PLC via function block)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1349
Feeds (V1)
Feedrate control

● Asynchronous oscillating axes (setting data or from part program)


● Neutral axes

Note
Depending on whether $AA_ACC is programmed in a part program or in a synchronized
action, the ACC value is output for the NC axes or the main run axes.
Variable $AA_ACC must always be queried in the mode in which the acceleration was
written (either part program or synchronized action).

Examples

In the part program


...
N80 G01 POS[X]=100 FA[X]=1000 ACC[X]=90 IPOENDA[X]
...

Or via a synchronized action


...
N100 EVERY $A_IN[1] DO POS[X]=50 FA[X]=2000 ACC[X]=140 IPOENDA[X]
...

Acceleration factor written in part program:


...
ACC[X]=50
RO $AA_ACC[X]

IF (RO <> $MA_ MAX_AX_ACCEL[X] * 0.5


SETAL(61000)
ENDIF

Acceleration factor is set by the synchronized action:


WHEN TRUE DO ACC[X]=25 $R1 = $AA_ACC[X]
G4 F1

IF (RO <> $MA_ MAX_AX_ACCEL[X] * 0.25


SETAL(61001)
ENDIF

M30

Basic Functions
1350 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

End-of-motion criterion for single axes


Similar to the block change criterion for path interpolation (G601, G602 and G603) it is also
possible to program the movement end criterion for single-axis interpolation in a part
program or in synchronized actions for main run axes: command/PLC axes.

Programmable criterion end-of-motion on reaching


FINEA[Axis] "Exact stop fine"
COARSEA[Axis] "Exact stop coarse"
IPOENDA[Axis] "Interpolator stop" (IPO stop)
Axis: Channel axis name (X, Y ....), spindle (S1, ...)
The end-of-motion criterion set will affect how quickly or slowly part program blocks and
technology cycle blocks with single-axis movements are completed.
The same applies for PLC positioning instructions via FC15/16/18.
The set end-of-motion criterion can be scanned with system variable $AA_MOTEND[Axis].

$AA_MOTEND[Axis] = 1 end-of-motion with "Exact stop fine"


$AA_MOTEND[Axis] = 2 end-of-motion with "Exact stop coarse"
$AA_MOTEND[Axis] = 3 end-of-motion with "IPO stop"

Note
Depending on whether $AA_MOTEND is programmed in a part program or a synchronized
action, the MOTEND value is output for the NC axes or the main-run axes.

The last programmed value is retained following a RESET.


Example:

...
N80 G01 POS[X]=100 FA[X]=1000 ACC[X]=90 IPOENDA[X]
...

Or via a synchronized action


...
N100 EVERY $A_IN[1] DO POS[X]=50 FA[X]=2000 ACC[X]=140 IPOENDA[X]
For more information about block changes and end-of-motion criteria for FINEA, COARSEA
and IPOENDA, please refer to:
References:
/FB2/ Function Manual, Extended Functions; Positioning Axes (P2);
Chapter: Block change

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1351
Feeds (V1)
Feedrate control

Programmable servo parameter set


SCPARA[Axis] = ...
SCPARA[axis]= ... can be used to program the parameter set (consisting of MDs) in the
part program and in synchronized actions (previously, this could only be done via the PLC).

SCPARA[Axis]= Where Axis = Channel axis name (X, Y ....), spindle (S1, ...)
<value>
Value = Desired parameter set (1≤ value ≤ 6)
DB3n DBB9 bit3
To prevent conflicts between the PLC user request and NC user request, a further bit is
defined on the PLC→NCK interface:
DB3n DBB9 bit3 "Parameter set selection by SCPARA disabled".
The PLC user is thereby able to set up a structured sequence when using PLC parameter
switchover and entries from synchronized actions or part programs simultaneously.
On a change of bit 3 (0 ⇒ 1 or 1 ⇒ 0), the entry is written to bits 0 - 2.

Note
If parameter set selection via SCPARA is disabled, there is no error message if the latter is
programmed nevertheless.

The current parameter set can be scanned by system variable $AA_SCPAR[Axis].


Example:

...
N100 SCPARA[X]=3 ; The 3rd parameter set is selected for axis X.
...

Constraints
● Different end-of-motion criteria will affect how quickly or slowly part program blocks are
completed. This can have side effects for technology cycles and PLC user parts.
● The PLC user program must be expanded if the servo parameter set is to be changed
both inside a part program or synchronous action and the PLC.
● After POWER ON, the following initial settings are made:

Percentage acceleration override for all single-axis 100%


interpolations
end-of-motion criterion for all single-axis interpolations FINEA
Servo parameter set defined by the NC 1

Basic Functions
1352 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Feedrate control

● When the operating mode is changed from AUTO ⇒ JOG, the programmed dynamic
response changes remain valid.
● In the event of a RESET, the last programmed value remains for the part program
specifications. The settings for main-run interpolations do not change.
● Block search:
The last end-of-motion criterion programmed for an axis is collected and output in an
action block. The last block with a programmed end-of-motion criterion that was
processed in the search run serves as a container for all programmed end-of-motion
criteria for all axes.
Example:

N01 G01 POS[X]=20 POS[Y]=30 IPOENDA[X] IPOENDA[Y]


N02 POS[Z]=55 FINEA[Z]
N03 $A_OUT[1]=1
N04 POS[X]=100 COARSEA[X]
N05 ......
TARGET: ; Block search target

● In this example, N04 serves as a container for all programmed end-of-motion criteria.
Two action blocks are saved. The digital output (N03) is issued in the first action block
and in the second, COARSEA is set for the X axis, IPOENDA for the Y axis and FINEA for
the Z axis.
The same applies to the programmed servo parameter set. The last programmed
acceleration override is effective from the first approach block.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1353
Feeds (V1)
Supplementary conditions

16.5 Supplementary conditions

16.5.1 General boundary conditions

Several feeds in one block


The "Several feeds in one block" function is only available in conjunction with the:
"Synchronized Actions" function.
References:
/FBSY/ Function Manual Synchronized Actions

16.5.2 Supplementary conditions for feedrate programming

Unit of measurement
The applicable unit of measurement for feedrates is based on the value entered in machine
data:
MD12240 SCALING_SYSTEM_IS_METRIC
(standard control system metric/imperial)
and the type of axis entered in machine data:
MD30300 IS_ROT_AX
(rotary or linear axis).

Standard setting for feedrate type


G94 is displayed on the screen as the standard setting.
The initial setting (standard programming setting) for the feedrate type is only displayed
when the part program starts up.
The initial setting is set in machine data:
MD20150 GCODE_RESET_VALUES (initial setting for G groups).

Activation of the F values


Machine data:
MD22140 F_VALUES_ACTIVE_AFTER_RESET (F function active via RESET)
can be used to define whether the following most recently programmed F values are to
remain active following a RESET.
● Programmed path feedrate: F=...
● Programmed feedrate change for path feedrate: OVR=...
● Programmed positioning feedrate: FA=...
● Programmed feedrate change for positioning feedrate: OVRA[U]=...

Basic Functions
1354 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Supplementary conditions

For more detailed information about syntax, please see:


References:
/PG/ Programming Manual, Fundamentals

Position spindle
If G95,G96,G961,G97,G971,G33,G34,G35 is active, spindle positioning should not be
performed, because the derived path feedrate following spindle positioning = 0.
⇒ If the programmed axis position has not yet been reached, the block cannot be completed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1355
Feeds (V1)
Examples

16.6 Examples

16.6.1 Feedrate programming for chamfer/rounding FRC, FRCM

Example 1: Following block feedrate


MD20201 CHFRND_MODE_MASK Bit0 = 0
(apply feedrate from following block; default setting)

N10 G0 X0 Y0 G17 F100 G94


N20 G1 X10 CHF=2 ; Chamfer N20-N30 with F=100 mm/min
N30 Y10 CHF=4 ; Chamfer N30-N40 with FRC=200 mm/min
N40 X20 CHF=3 FRC=200 ; Chamfer N40-N60 with FRCM=50 mm/min
N50 RNDM=2 FRCM=50
N60 Y20 ; Modal rounding N60-N70 with
FRCM=50 mm/min
N70 X30 ; Modal rounding N70-N80 with
FRC=100 mm/min
N80 Y30 CHF=3 FRC=100 ; Chamfer N80-N90 with
FRCM=50 mm/min (modal)
N90 X40 ; Modal rounding N90-N100 with
F=100 mm/min (deselection of FRCM)
N100 Y40 FRCM=0 ; Modal rounding N100-N120 with G95
FRC=1 mm/rev
N110 S1000 M3
N120 X50 G95 F3 FRC=1
...
M02

Example 2: Feedrate of previous block


MD20201 CHFRND_MODE_MASK Bit0 = 1
(accept feedrate of previous block; recommended setting)

N10 G0 X0 Y0 G17 F100 G94


N20 G1 X10 CHF=2 ; Chamfer N20-N30 with F=100 mm/min
N30 Y10 CHF=4 FRC=120 ; Chamfer N30-N40 with FRC=120 mm/min
N40 X20 CHF=3 FRC=200 ; Chamfer N40-N60 with FRC=200 mm/min
N50 RNDM=2 FRCM=50
N60 Y20 ; Modal rounding N60-N70 with
FRCM=50 mm/min
N70 X30 ; Modal rounding N70-N80 with
FRCM=50 mm/min
N80 Y30 CHF=3 FRC=100 ; Chamfer N80-N90 with
FRC=100 mm/min (modal)

Basic Functions
1356 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Examples

N90 X40 ; Modal rounding N90-N100 with


FRCM=50 mm/min
N100 Y40 FRCM=0 ; Modal rounding N100-N120 with
F=100 mm/min
N110 S1000 M3
N120 X50 CHF=4 G95 F3 FRC=1 Chamfer N120-N130 with G95
FRC=1 mm/rev
N130 Y50 Modal rounding N130-N140
with F=3 mm/rev
N140 X60
...
M02

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1357
Feeds (V1)
Data lists

16.7 Data lists

16.7.1 Machine data

16.7.1.1 NC-specific machine data

Number Identifier: $MN_ Description


10704 DRYRUN_MASK Activation of dry run feedrate
10710 PROG_SD_RESET_SAVE_TAB Setting data to be updated
11410 SUPPRESS_ALARM_MASK Mask for suppressing special alarms
11550 STOP_MODE_MASK Preventing stop events in the program section
12000 OVR_AX_IS_GRAY_CODE Axis feedrate override switch Gray-coded
12010 OVR_FACTOR_AX_SPEED Evaluation of the axis feed override switch
12020 OVR_FEED_IS_GRAY_CODE Path feed override switch Gray-coded
12030 OVR_FACTOR_FEEDRATE Evaluation of the path feed override switch
12040 OVR_RAPID_IS_GRAY_CODE Rapid traverse override switch Gray-coded
12050 OVR_FACTOR_RAPID_TRA Evaluation of the rapid traverse override switch
12060 OVR_SPIND_IS_GRAY_CODE Spindle override switch Gray-coded
12070 OVR_FACTOR_SPIND_SPEED Evaluation of the spindle override switch
12080 OVR_REFERENCE_IS_PROG_FEED Override reference velocity
12082 OVR_REFERENCE_IS_MIN_FEED Defining the reference of the path override
12090 OVR_FUNCTION_MASK Selection of override specifications
12100 OVR_FACTOR_LIMIT_BIN Limit for binary-coded override switch
12200 RUN_OVERRIDE_0 Traversing with override 0
12202 PERMANENT_FEED Fixed feedrates for linear axes
12204 PERMANENT_ROT_AX_FEED Fixed feedrates for rotary axes
12240 SCALING_SYSTEM_IS_METRIC Basic system metric

16.7.1.2 Channel-specific machine data

Number Identifier: $MC_ Description


20100 DIAMETER_AX_DEF Geometry axes with transverse axis functions
20172 COMPRESS_VELO_TOL Maximum permissible deviation from path feed for
compression
20150 GCODE_RESET_VALUES Reset G groups
20200 CHFRND_MAXNUM_DUMMY_BLOCKS Maximal number of dummy blocks for chamfer/radii
20201 CHFRND_MODE_MASK Feed for chamfer/rounding

Basic Functions
1358 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Data lists

Number Identifier: $MC_ Description


20660 THREAD_AUTO_LIFTFASTANGLE Determination of retraction angle (thread cutting)
20750 ALLOW_GO_IN_G96 G0 logic in G96
21200 LIFTFAST_DIST Traversing path for fast retraction from the contour
21220 MULTFEED_ASSIGN_FASTIN Assignment of input bytes of NCK I/Os for "Multiple
feeds in one block"
21230 MULTFEED_STORE_MASK Store input signals for the "Multiple feeds in one
block" function
22240 AUXFU_F_SYNC_TYPE Output timing of F functions
22410 F_VALUES_ACTIVE_AFTER_RESET F function active after RESET

16.7.1.3 Axis/Spindle-specific machine data

Number Identifier: $MA_ Description


30300 IS_ROT_AX Rotary axis
32000 MAX_AX_VELO Maximum axis velocity
32060 POS_AX_VELO Initial setting for positioning-axis velocity
32300 MAX_AX_ACCEL Axis acceleration
32320 DYN_LIMIT_RESET_MASK Reset behavior of dynamic limits
34990 ENC_ACTIVAL_SMOOTH_TIME Smoothing time constant for actual values
35100 SPIND_VELO_LIMIT Maximum spindle speed
35130 GEAR_STEP_MAX_VELO_LIMIT Maximum speed of gear step
35140 GEAR_STEP_MIN_VELO_LIMIT Minimum speed of gear step
35160 SPIND_EXTERN_VELO_LIMIT Spindle-speed limitation via PLC

16.7.2 Setting data

16.7.2.1 Channel-specific setting data

Number Identifier: $SC_ Description


42000 THREAD_START_ANGLE Start angle for thread
42010 THREAD_RAMP_DISP Run-in and run-out path of feed axis with thread
cutting
42100 DRY_RUN_FEED Dry run feed
42101 DRY_RUN_FEED_MODE Dry run feed mode
42110 DEFAULT_FEED Default value for path feed
42600 JOG_FEED_PER_REV_SOURCE In the JOG mode, revolutional feedrate for geometry
axes on which a frame with rotation acts
43300 ASSIGN_FEED_PER_RES_SOURCE Revolutional feedrate for positioning axes

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1359
Feeds (V1)
Data lists

16.7.2.2 Axis/spindle-specific setting data

Number Identifier: $SA_ Description


43210 SPIND_MIN_VELO_G25 Minimum spindle speed
43220 SPIND_MAX_VELO_G26 Maximum spindle speed
43230 SPIND_MAX_VELO_LIMS Spindle-speed limitation with G96

16.7.3 Signals

16.7.3.1 Signals to channel

DB number Byte.Bit Description


21, ... 0.6 Activate dry run feed
21, ... 4 Feed override
21, ... 5 Rapid traverse override
21, ... 6.0 Feed disable
21, ... 6.6 Rapid traverse override active
21, ... 6.7 Feed override active
21, ... 12.3 Feed stop, geometry axis 1
21, ... 16.3 Feed stop, geometry axis 2
21, ... 20.3 Feed stop, geometry axis 3

Basic Functions
1360 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Feeds (V1)
Data lists

16.7.3.2 Signals from channel

DB number Byte.Bit Description


21, ... 24.6 Dry run feed selected
21, ... 25.3 Feed override for rapid traverse selected
21, ... 29.0 Activate fixed feedrate 1 for path/geometry axes
29.1 Activate fixed feedrate 2 for path/geometry axes
29.2 Activate fixed feedrate 3 for path/geometry axes
29.3 Activate fixed feedrate 4 for path/geometry axes
21, ... 318.6 Dry run feedrate active

16.7.3.3 Signals to axis/spindle

DB number Byte.Bit Description


31, ... 0 Feed/spindle override
31, ... 1.7 Override active
31, ... 3.2 Activate fixed feedrate 1 for machine axis
3.3 Activate fixed feedrate 2 for machine axis
3.4 Activate fixed feedrate 3 for machine axis
3.5 Activate fixed feedrate 4 for machine axis
31, ... 4.3 Feed stop/spindle stop
31, ... 62.2 Revolutional feedrate active
31, ... 81 F function for positioning axis
31, ... 83.1 Programmed speed too high

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1361
Feeds (V1)
Data lists

Basic Functions
1362 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1) 17
17.1 Brief description

Calculating tool compensation data


The SINUMERIK 840D control can be used to calculate the following tool compensation
data:
● Length compensation
● Radius compensation
● Storage of tool data in a flexible tool offset memory:
– Tool identification with T numbers from 0 to 32000
– Definition of a tool with a maximum of 9 cutting edges
– Cutting edge described by up to 25 tool parameters
● Tool selection selectable: Immediate or via selectable M function
● Tool radius compensation:
– Selection and deselection strategy configurable: Normal or contour-related
– Compensation active for all interpolation types:
Linear
Circle
Helical
Spline
Polynomial
Involute
– Compensation at outer corners selectable:
Transition circle/ellipse (G450) or equidistant intersection (G451)
– Parameter-driven adaptation of G450/G451 functions to the contour
– Free traversing on outer corners with G450 and DISC parameter
– Number of dummy blocks without axis motion selectable in the compensation plane
– Collision detection selectable:
Possible contour violations are detected predictively, if:
- Path is shorter than tool radius
- Width of an inside corner is shorter than the tool diameter
– Keep tool radius compensation constant
– Intersection procedure for polynomials

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1363
Tool Offset (W1)
Brief description

Toolholder with orientation capability


This function permits the machining of inclined surfaces with allowance for tool length
compensation, provided that the kinematics of the toolholder (without NC axes) permits a
static orientation of the tool. The more complex 5-Axis transformation is not required for this
case.
References:
/FB3/ Function Manual, Special Functions; 3- to 5-Axis Transformation (F2)
Appropriate selection of the tool data and toolholder data describes the kinematics for the
control such that it can make allowance for the tool length compensation. The control can
take some of the description data direct from the current frame.

Note
Please refer to the following documentation for further information on tools and tool
compensations and a full technical description of the general and specific programming
features for tool compensation (TLC and TRC):
References:
/PG/ Programming Manual Fundamentals

Flat/Unique D number structure


Compensations can be selected via unique D numbers with management function.

Special handling of tool compensations


The evaluation of signs can be controlled for tool length and wear by the setting data:
SD42900 $SC_MIRROR_TOOL_LENGTH (Sign change tool length when mirroring)
SD42960 $SC_TOOL_TEMP_COMP (Temperature compens. regarding tool).
The same applies to the response of the wear components when mirroring geometry axes or
changing the machining plane via setting data.
References:
/PG/ Programming Manual Fundamentals; Tool compensations

Basic Functions
1364 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Brief description

G461/G462
In order to enable the solid machining of inside corners in certain situations with the
activation and deactivation of tool radius compensation, commands G461 und G462 have
been introduced and the approach/retraction strategy has thus been extended for tool radius
compensation.
● G461
If no intersection is possible between the last TRC block and a previous block, the control
calculates an intersection by extending the offset curve of this block with a circle whose
center point coincides with the end point of the non-corrected block, and whose radius is
equal to the tool radius.
● G462
If no intersection is possible between the last TRC block and a previous block, the control
calculates an intersection by inserting a straight line at the end point of the last block with
tool radius compensation (the block is extended by its end tangent).

Changing from G40 to G41/42


The change from G40 to G41/G42 and vice versa is no longer treated as a tool change for
tools with relevant tool point direction (turning and grinding tools).

Tool compensation environments


Functions, which enable the following actions in relation to the current states of tool data, are
available in SW 7.1:
● Save
● Deletion
● Read
● Modify
Some of the functions were previously implemented in measuring cycles. They are now
universally available.
A further function can be used to determine information about the assignment of the tool
lengths of the active tool to the abscissa, ordinate and applicate.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1365
Tool Offset (W1)
Tool

17.2 Tool

17.2.1 General

Select tool
A tool is selected in the program with the T function.
Whether the new tool will be loaded immediately by means of the T function depends on the
setting in the machine data:
$MC_TOOL_CHANGE_MODE (new tool compensation with M function) determines whether
the new tool is loaded immediately on execution of the T function.

Change tool immediately


MD22550 $MC_TOOL_CHANGE_MODE = 0 (new tool compensation with M function).
The new tool is changed immediately with the T function.
This setting is used mainly for turning machines with tool revolver.

Change tool with M06


MD22550 $MC_TOOL_CHANGE_MODE = 1 (new tool compensation with M function).
The new tool is prepared for changing with the T function.
This setting is used mainly on milling machines with a tool magazine, in order to bring the
new tool into the tool change position without interrupting the machining process.
The old tool is removed from the spindle and the new tool is loaded into the spindle with the
entered M function in the machine data:
MD22560 $MC_TOOL_CHANGE_M_CODE (M function for tool change)
This tool change must be programmed with the M function M06, in accordance with DIN
66025.
The next tool is preselected with the machine data:
MD20121 $MC_TOOL_PRESEL_RESET_VALUE (Preselected tool at RESET)
Its tool length compensation values must be considered at RESET and powerup according to
machine data:
MD20110 $MC_RESET_MODE_MASK (Determination of control default settings after
RESET/TP end).

Value range of T
The T function accepts the following whole numbers:
● From T0 (no tool)
● To T32000 (tool number 32000).

Basic Functions
1366 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

Tool cutting edge


Each tool can have up to 9 cutting edges. The 9 tool cutting edges are assigned to the
D functions D1 to D9.

7

'

'

'









'

Figure 17-1 Example of a tool T... with 9 cutting edges (D1 to D9)

D function
The tool cutting edge is programmed with D1 (edge 1) to D9 (edge 9). The tool cutting edge
always refers to the currently active tool. An active tool cutting edge (D1 to D9) without an
active tool (T0) is inactive. Tool cutting edge D0 deselects all tool compensations of the
active tool.

Selection of the cutting edge when changing tool


When a new tool (new T number) has been programmed and the old one replaced, the
following options are available for selecting the cutting edge:
● The cutting edge number is programmed.
● The cutting edge number is defined by the machine data:
MD20270 $MC_CUTTING_EDGE_DEFAULT (Basic setting of tool cutting edge without
programming)

Value Significance
=0 No automatic cutting edge selection in accordance with M06
<>0 Number of the cutting edge, which is selected in accordance with M06
= -1 The cutting edge number of the old tool is retained and is also selected for the new tool, in
accordance with M06.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1367
Tool Offset (W1)
Tool

Activating the tool compensations


D1 to D9 activate the tool compensation for a cutting edge on the active tool. Tool length
compensation and tool radius compensation can be activated at different times:
● Tool length compensation (TLC) is performed on the first traversing motion of the axis, on
which the TLC is to act.
This traversing motion must be a linear interpolation (G0,G1, POS,POSA) or polynomial
interpolation (POLY). If the POS/POSA axis is one of the active geometry axes, the tool
length compensation is applied with the first axis motion in which the WLK is supposed to
act.
● Tool radius compensation (TRC) becomes active when G41/G42 is programmed in the
active plane (G17, G18 or G19).
The selection of tool radius compensation with G41/G42 is only permitted in a program
block with G0 (rapid traverse) or G1 (linear interpolation).

17.2.2 Compensation memory structure

Tool compensation memory size


Each channel can have a dedicated tool compensation memory (TO unit).
Which tool compensation memory exists for the relevant channel is set with the machine
data:
MD28085 $MC_MM_LINK_TOA_UNIT (Assignment of TO unit to a channel).
The maximum number of tool cutting edges for all tools managed by the NCK is set with the
machine data:
MD18100 $MN_MM_NUM_CUTTING_EDGES_IN_TOA (number of tool cutting edges in NCK).

Tools
The TO memory consists of tools numbered T1 to T32000.
Each tool can be set up via TOA files or individually, using the "New tool" soft key.
Compensation values not required must be assigned the value zero. (this is the default
setting when the offset memory is created): The individual values in the offset memory (tool
parameters) can be read and written from the program using system variables.

Note
The tools (T1 to T32000) do not have to be stored in ascending order or contiguously in the
tool compensation memory, and the first tool does not have to be assigned number T1.

Basic Functions
1368 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

Tool cutting edges


Each tool can have up to 9 cutting edges (D1 to D9). The first cutting edge (D1) is set up
automatically when a new tool is loaded in the tool compensation memory. Other cutting
edges (up to 8) are set up consecutively and contiguously using the "New cutting edge" soft
key. A different number of tool cutting edges can assigned to each tool in this way.

&KDQQHO  HWF &KDQQHO  HWF


 
 

7 7

7 7

7 7

7 7

' '

' '

' '

 
 
 
 

' '

Figure 17-2 Example of a tool compensation memory structure for 2 channels

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1369
Tool Offset (W1)
Tool

17.2.3 Calculating the tool compensation

D No.
The D no. is sufficient for calculating the tool compensations (can be set via MD).

'1R '3 '3 '3   '3

'

'

'Q

2IIVHWYDOXH

Programming
The above compensation block is to be calculated in the NC.
Part program call:

...
Dn

17.2.4 Address extension for NC addresses T and M

MD20096
Whether also with tool management not activated, the address extension of T and M is to be
interpreted as spindle number, can be set through the machine data:
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO (spindle number as address extension).
The same rules then apply to the reference between the D number and T number as when
the "Tool management" function is active.

Effect on the D number


A compensation data set is determined by the D number.
The D address cannot be programmed with an address extension.
The evaluation of the D address always refers to the currently active tool.

Basic Functions
1370 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

The programmed D address refers to the active tool in relation to the master spindle (same
as for tool management function), when machine data is set:
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO = TRUE (spindle number as address
extension).

Effect on the T number


If the "Tool management" function is active, the values programmed with reference to the
master spindle (or master toolholder) are displayed as programmed/active T numbers.
If tool management is not active, all programmed T values are displayed as
programmed/active, regardless of the programmed address extension.
Only the T value programmed in relation to the master spindle is shown as
programmed/active, when:
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO = TRUE (spindle number as address
extension).

Example
The example below shows the effect of MD20096.
Two spindles are considered. Spindle 1 is the master spindle. M6 was defined as the tool
change signal.

T1 = 5
M1 = 6
T2 = 50
M2 = 6
D4

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1371
Tool Offset (W1)
Tool

● If tool management is active, D4 refers to tool "5".


T2=50 defines the tool for the secondary spindle, whose tool does not influence the path
compensation. The path is determined exclusively by the tool programmed for the master
spindle.
● D4 relates to tool "50" without active tool management and with the machine data:
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO = FALSE (significance of address
extension on T, M tool change).
The address extensions of neither T nor M are evaluated in the NCK.
Each tool change command defines a new path compensation.
● D4 relates to tool "5" (as when tool management is active) without active tool
management and with the machine data:
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO = TRUE.
Address extension 1 (T1= ..., M1= ...) addresses the master spindle.

Note
Previously, when tool management was not activated, each tool change command
(programmed with T or M) caused the tool compensation to be recalculated in the path.
The address extension is not defined further by this operation. The significance of the
extension is defined by the user (in the PLC user program).

17.2.5 Free assignment of D numbers

"Relative" D numbers
In the NCK, it is possible to manage the D numbers as "relative" D numbers for the tool
compensation data sets. The corresponding D numbers are assigned to each T number.
The maximum number of D numbers was previously limited to 9.

Basic Functions
1372 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

Functions
Expansions to functions when assigning D numbers:
● The maximum permitted D numbers are defined via the machine data:
MD18105 $MN_MM_MAX_CUTTING_EDGE_NO (Max. value of the D-numbers (DRAM))
The default value is 9, in order to maintain compatibility with existing applications.
● The number of cuts (or the offset data sets) for each tool can be defined via the machine
data:
MD18106 $MN_MM_MAX_CUTTING_EDGE_PERTOOL (Max. number of the D numbers
per tool (DRAM))
This allows you to customize the number of cutting edges to be configured for each tool
to the actual number of real cutting edges for monitoring purposes.
● It is also possible to rename D numbers in the NCK and thus to allocate any D numbers
to the cutting edges.

Note
In addition to relative D number allocation, the D numbers can also be assigned as "flat"
or "absolute" D numbers (1-32000) without a reference to a T number (within the "Flat D
number structure" function).

Cutting edge number CE


When you rename D numbers, the information in the tool Catalog detailing the numbers
defined for these cutting edges is lost. It is, therefore, impossible to determine, following
renaming, which cutting edge of the Catalog is being referenced.
Since this information is required for retooling procedures, a cutting edge number CE has
been introduced for each cutting edge. This number remains stored when the D number is
renamed.
The D number identifies the cutting edge compensation in the part program.
This compensation number D is administered separately from the cutting edge number CE
(the number in the tool Catalog). Any number can be used. The number is used to identify a
compensation in the part program and on the display.
The CE number identifies the actual physical cutting edge during retooling. The cutting edge
number CE is not evaluated by the NCK on compensation selection during a tool change
(only available via the OPI).
The cutting edge number CE is defined with system variable $TC_DPCE[t,d]:
● t stands for the internal T number.
● d stands for the D number.
Write accesses are monitored for collisions, i.e. all cutting edge numbers of a tool must be
different. The variable $TC_DPCE is a component of the cutting edge parameter data set
$TC_DP1 to $TC_DP25.
It is only practical to parameterize $TC_DPCE if the maximum cutting edge number
(MD18105) is greater than the maximum number of cutting edges per tool (MD18106).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1373
Tool Offset (W1)
Tool

In this case, the default cutting edge number is the same as the classification number of the
cutting edge. Compensations of a tool are created starting at number 1 and are incremented
up to the maximum number of cutting edges per tool (MD18106).
The cutting edge number CE is the same as the D number (in compatibility with the behavior
till now) if:
MD18105 ≤ MD18106.
A read operation returns CE=D. A write operation is ignored without an alarm message.

Note
The compensation values $TC_DP1 to $TC_DP25 of the active tool compensation can be
read with system variable $P_AD[n], where n=1 to 25. The CE cutting edge number of the
active compensation is returned with n=26.

Commands
When the maximum cutting edge number:
MD18105 $MN_MM_MAX_CUTTING_EDGE_NO (Max. value of the D numbers (DRAM))
is greater than the maximum number of cutting edges per tool:
MD18106 $MN_MM_MAX_CUTTING_EDGE_PERTOOL (Max. number of D numbers per
tool (DRAM))
the following commands are available:

Command Significance
CHKDNO Checks the uniqueness of the available D numbers.
The D numbers of all tools defined within a TO unit may not occur more than once.
No allowance is made for replacement tools.
GETDNO Determines the D number for the cutting edge of a tool.
If no D number matching the input parameters exists, d=0.
If the D number is invalid, a value greater than 32000 is returned.
SETDNO Sets or changes the D number of the CE cutting edge of tool T.
If there is no data block for the specified parameter, the value FALSE is returned.
Syntax errors generate an alarm. The D number cannot be set explicitly to 0.
GETACTTD Determines the associated T number for an absolute D number.
There is not check for uniqueness. If several D numbers within a TO unit are the
same, the T number of the first tool found in the search is returned.
This command is not suitable for use with "flat" D numbers, because the value 1 is
always returned in this case (no T numbers in database).
DZERO Marks all D numbers of the TO unit as invalid.
This command is used for support during retooling.
Compensation data sets tagged with this command are no longer verified by the
CHKDNO language command. These data sets can be accessed again by setting
the D number once more with SETDNO.

Basic Functions
1374 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

Note
If the maximum cutting edge number is smaller than the maximum number of cutting edges
per tool (MD18105 < MD18106), the language commands described do not affect the
system.
This relation is preset in the NCK as standard, in order to maintain compatibility with existing
applications.
The individual commands are described in detail in:
References:
/PG/ Programming Manual Fundamentals

Activation
In order to work with unique D numbers and, therefore, with the defined language
commands, it must be possible to name D numbers freely for the tools.
The following conditions must be fulfilled for this purpose:
● MD18105 > MD18106
● The 'flat D number' function is not activated.
MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE (type of D number programming
(SRAM)).

Examples
MD18105 $MN_MM_MAX_CUTTING_EDGE_NO (Max. value of the D numbers (DRAM))
A maximum of one compensation can be defined per tool (with D number = 1).

Note
When the "Flat D numbers" function is active, only one D compensation can be defined in
the TO unit.

MD18105 $MN_MM_MAX_CUTTING_EDGE_NO = 9999


Tools can be assigned unique D numbers.
For example:
● D numbers 1, 2, 3 are assigned to T number 1
● D numbers 10, 20, 30, 40, 50 are assigned to T number 2
● D numbers 100, 200 are assigned to T number 3
● etc.
CHKDNO; MD18105 $MN_MM_MAX_CUTTING_EDGE_NO = 9999
The following data are to be checked for unique D numbers:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1375
Tool Offset (W1)
Tool

● T number 1 with D numbers 1, 2, 3


● T number 2 with D numbers 10, 20, 30, 40, 50
● T number 3 with D numbers 100, 200, 30
(typing error during definition: 30 was entered instead of 300)

CHKDNO The FALSE state is returned when the above constellation is checked
because D=30 has been entered twice.
CHKDNO (2, 3, 30) The FALSE state is returned when the specified D number 30 is
checked because D=30 has been entered twice.
CHKDNO (2, 3, 100) The TRUE state indicates that D=100 has been entered just once.
CHKDNO (1, 3) The TRUE state is returned although there is a conflict between the
D=30 of the third tool and D=30 of the second tool.

MD18106 $MN_MM_MAX_CUTTING_EDGE_PERTOOL = 1 (Max. number of the D


numbers per tool (DRAM))
Only tools with just one cutting edge are used. The value 1 of the machine data inhibits the
definition of a second cutting edge for a tool.
MD18106 $MN_MM_MAX_CUTTING_EDGE_PERTOOL = 12
A maximum of 12 cutting edges can be defined per tool.

Programming examples
Renaming a D number
The D number of cutting edge CE = 3 is to be renamed from 2 to 17. The following
specifications apply:
● Internal T number T = 1
● D number = 2
● Tool with one cutting edge with:

$TC_DP2[ 1, 2 ] = 120
$TC_DP3[ 1, 2 ] = 5.5
$TC_DPCE[ 1, 2 ] = 3 ;Cutting edge number CE

● MD18105 $MN_MM_MAX_CUTTING_EDGE_NO = 20 (Max. value of the D numbers


(DRAM))
Within the part program, this compensation is programmed as standard with T1, ....D2.
You assign the current D number of cutting edge 3 to a variable (DNoOld) and define the
variable DNoNew for the new D number:

def int DNoOld, DNoNew = 17


DNoOld = GETDNO( 1, 3 )
SETDNO( 1, 3, DNoNew )

Basic Functions
1376 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

The new D value 17 is then assigned to cutting edge CE=3.


Now the data for the cutting edge are addressed via D number 17, both via the system
variable and in programming with the NC address D.
This compensation is now programmed in the part program with T1, ....D17 and the data
are addressed as follows:

$TC_DP2[ 1, 17 ] = 120
$TC_DP3[ 1, 17 ] = 5.5
$TC_DPCE[ 1, 17 ] = 3 ;Cutting edge number CE

Note
If a further cutting edge has been defined for the tool, e.g. $TC_DPCE[ 1, 2 ] = 1 ; = CE, the
D-number 2 of the cutting edge 1 cannot have the same name as the D-number of the
cutting edge 3 i.e.: SETDNO( 1, 1, 17) returns the status = FALSE as return value.

DZERO - Invalidate D numbers


The activation of this command invalidates all D numbers of the tools in the TO unit. It is no
longer possible to activate a compensation until valid D numbers are again available in the
NCK. The D numbers must be reassigned using the SETDNO command.
The following tools must be defined (all with cutting edge number 1):

T1, D1 D no. of cutting edge CE=1


T2, D10 D no. of cutting edge CE=1
T3, D100 D no. of cutting edge CE=1

The following command is then programmed:

DZERO

If one of the compensations is now activated (e.g. with T3 D100), an alarm is generated,
because D100 is not currently defined.
The D numbers are redefined with:

SETDNO( 1, 1, 100 ) ;T=1, cutting edge 1 receives the (new) D number 100
SETDNO( 2, 1, 10 ) ;T=2, cutting edge 1 receives the (old) D number 10
SETDNO( 3, 1, 1 ) ;T=3, cutting edge 1 receives the (new) D number 1

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1377
Tool Offset (W1)
Tool

Note
In the event of a power failure, the DZERO command can leave the NCK in an undefined
state with reference to the D numbers. If this happens, repeat the DZERO command when the
power is restored.

Operating principle of a retooling program


Let us assume you want to ensure that the required tools and cutting edges are available.
The status of the tool-holding magazine of the NCK is arbitrary. The D numbers in the part
programs for the new machining operation generally do not match the D numbers of the
actual cutting edges. The retooling program can have the following appearance:

DZERO ; All D numbers of the TO unit are tagged as invalid.


.... ; One or more loops over the locations of the magazine(s)
to check the tools and their cutting edge numbers.
If a tool is found, which is still enabled ($TC_TP8) and
has the required cutting edge number CE (GETDNO), the new
D number is allocated to the cutting edge (SETDNO).
.... ; Loading and unloading operations are performed.
It is possible to work with the tool status "to be
unloaded" and "to be loaded".
CHKDNO ; Loading/unloading and the operation for renaming D
numbers are complete.
Individual tools and/or D numbers can be checked, and
collisions can be handled automatically according to the
return value.

17.2.6 Compensation block in case of error during tool change

MD22550
If a tool preparation has been programmed in the part program and the NCK detects an error
(e.g. the data set for the programmed T number does not exist in the NCK), the user can
assess the error situation and perform appropriate tasks, in order to subsequently resume
machining.
The tool change may be programmed independently, depending on the machine data:
MD22550 $MC_TOOL_CHANGE_MODE (new tool compensation with M function).
MD22550 $MC_TOOL_CHANGE_MODE = 0

T= "T no." ; Tool preparation + tool change in one NC block,


; i.e. when T is programmed a new D compensation becomes
; active in the NCK (see
; machine data MD20270 $MC_CUTTING_EDGE_DEFAULT)

Basic Functions
1378 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

MD22550 $MC_TOOL_CHANGE_MODE = 1

T= "T no." ; Tool preparation


M06 ;Change tool
; (the number of the tool-change M code can be changed),
; i.e. when M06 is programmed a new D compensation becomes
; active in the NCK (see
; machine data MD20270 $MC_CUTTING_EDGE_DEFAULT)

The following problems can occur if tool management is not active:


● D compensation data set missing
● Error in part program

Note
The "tool not in magazine" problem cannot be detected since the NCK did not have
access to any magazine information during tool compensation.

D compensation data set missing


Program execution is interrupted at the block containing the invalid D value (regardless of
the value of machine data MD22550). The operator must either correct the program or
reload the missing data set.
To do this, he needs the D number for the flat D number function, or otherwise the T number
as well. These parameters are transferred when the alarm is triggered.

Error in part program


The options for intervention in the event of an error depend on how the tool change was
programmed, defined via the machine data:
MD22550 $MC_TOOL_CHANGE_MODE (new tool compensation with M function).
Tool change with T programming (MD22550 = 0)
In this case, the "Compensation block" function available in the NCK is used. The NC
program stops at the NC block in which a programmed T value error was detected. The
"Compensation block" is executed again when the program is resumed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1379
Tool Offset (W1)
Tool

The operator can intervene as follows:


● Correct the part program.
● Reload the missing cutting edge compensation data from the HMI.
● Include the missing cutting edge compensation data in the NCK using "Overstore".
Following operator intervention, the START key is pressed and the block, which caused the
error, is executed again. If the error was corrected, the program is continued. Otherwise, an
alarm is output again.
Tool change with T and M06 programming (MD22550 = 1)
In this case, an error is detected in the NC block containing the tool preparation (T
programming), however this error is to be ignored initially. Processing continues until the tool
change request (usually M06) is executed. The program is to stop at this point.
The programmed T address can contain any number of program lines ahead of the M06
command, or the two instructions can appear in different (sub)programs. For this reason, it is
not usually possible to modify a block or a compensation block, which has already been
executed.
The operator has the same options for intervention as with = 0.
Reloading of missing data is possible. In this case, however, T must be programmed with
"Overstore".
If a program error has occurred, the line with the error cannot be corrected (Txx); only the
line at which the program stopped and which generated the alarm can be edited. Only when
machine data:
MD22562 $MC_TOOL_CHANGE_ERROR_MODE Bit0 = 1 (response on errors in tool
change).
The sequence is as follows:

Txx ; Error! Data set with xx does not exist.


; Detect state; detect xx;
; continue in program
....
M06 ; Detect bit memory "xx missing" → output alarm,
; stop program
; Correct block with, e.g. Tyy M06, start,
; block Tyy M06 interpreted and OK.
; Machining continues.

The following occurs when this part of the program is executed again:

Txx ; Error! Data set with xx does not exist,


; Detect state; detect xx;
; continue in program
....
Tyy M06 ; Detect bit memory "xx missing" → cancel without further
response,
; as Tyy M06 is correct → program does not stop (correct).

Basic Functions
1380 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool

If necessary, the original point of the T call can be corrected after the end of the program. If
the tool change logic on the machine cannot process this, the program must be aborted and
the point of the error corrected.
If only one data set is missing, it is transferred to the NCK, Txx is programmed in "Overstore"
and the program is subsequently resumed.
As in the case of "missing D number", the required parameter (T number) can be accessed
by the user for "missing T number" via the appropriate alarm (17191).

Note
In order to enable program correction, it stops immediately at the faulty Txx block.
The program text operation is also stopped when machine data:
MD22562 $MC_TOOL_CHANGE_ERROR_MODE Bit0=1 (response on errors in tool
change).

17.2.7 Definition of the effect of the tool parameters

MD20360
The effect of the tool parameters on the transverse axis in connection with diameter
programming can be controlled selectively with the machine data:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK (definition of tool parameters).
Details are described with the mentioned MD

DRF handwheel traversal with half distance


During DRF handwheel traversal, it is possible to move a transverse axis through only half
the distance of the specified increment as follows:
Specify the distance with handwheel via the machine data:
MD11346 $MN_HANDWHEEL_TRUE_DISTANCE = 1 (handwheel path or speed
specification).
Define the DRF offset in the transverse axis as a diameter offset with the machine data:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK Bit 9 = 1 (definition of tool parameters).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1381
Tool Offset (W1)
Tool

Deselecting an axial DRF compensation (DRFOF) also deletes an existing tool compensation
(handwheel override in tool direction).

Note
For further information about superimposed movements with the handwheel, please refer to:
References:
/FB2/ Function Manual, Extended Functions; Jog With/Without Handwheel (H1)
/PG/ Programming Manual Fundamentals (The Programming Manual describes the
complete technical descriptions in order to deselect the DRF offset by axis.)

Basic Functions
1382 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Flat D number structure

17.3 Flat D number structure

17.3.1 General

Simple tool management


Simple tool management (no replacement tools, no magazines) using D numbers is possible
for turning machines.
The function is available in the basic level of tool management (without tool management
function activated). Grinding tools cannot be defined using this function.

Activation
Which type of D number management is valid may be set via the machine data:
MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE (type of D number programming).

Value Significance
0 As previously = default setting
1 Flat D number structure with absolute direct D programming
Cutting edges can be deleted individually via PI command or NC programming command.
Cutting edges with a specific number can also be created selectively using HMI.

17.3.2 Creating a new D number (compensation block)

Programming
Tool compensations can be programmed with system variables $TC_DP1 to $TC_DP25.
The contents have the same meaning as before.
The syntax changes: no T number is specified.
● "Flat D number" function active:
$TC_DPx[d] = value ;where x=parameter no., d=D number
i.e. data with this syntax can only be loaded to the NCK if the "Flat D number" function is
activated.
● "Flat D number" function inactive:
$TC_DPx[t][d] = value ;where t=T number, d=D number
A D number can only be assigned once for each tool, i.e. each D number stands for exactly
one compensation data block.
A new data block is stored in the NCK memory when a D number that does not exist is
created for the first time.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1383
Tool Offset (W1)
Flat D number structure

The maximum number of D or offset data blocks (max. 600) is set via the machine data:
MD18100 $MN_MM_NUM_CUTTING_EDGES_IN_TOA (tool compensations in TO area).

Data backup
Data backup is carried out in the same format, i.e. a backup file created with the "Flat D
number" function cannot be loaded on the NCK of a control that has not activated the
function.
This also applies in reverse for transfer.

D range
1 - 99 999 999

17.3.3 D number programming

MD18102 = 1
If MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE = 1, then D compensation is activated
without reference to a certain tool.
D0 still contains the previous significance, "Deselection of active compensation in NCK".

Address extension of D
It is not possible to extend the address of D. Only one active compensation data block is
possible for the tool path at a given time.

Programming
Programming in the part program is carried out as before. Only the value range of the
programmed D number is increased.
Example 1:

MD parameterization Meaning
MD22550 $MC_TOOL_CHANGE_MODE =0 Tool change with programming of T.
MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE =1 D number programming without
reference to a certain tool.
MD20270 $MC_CUTTING_EDGE_DEFAULT = -1 D compensation remains unchanged
if tool is changed.

Basic Functions
1384 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Flat D number structure

Program code Comment


...
D92
X0 ; Traverse with compensations from D92.
T17 ; Outputs T=17 to the PLC
X1 ; Traverse with compensations from D92.
D16
X2 ; Traverse with compensations from D16.
D32000
X3 ; Traverse with compensations from D32000.
T29000 ; Outputs T=29000 to the PLC.
X4 ; Traverse with compensations from D32000.
D1
X5 ; Traverse with compensations from D1.
...

Example 2:
MD22550 = 0

Program code Comment


T1
T2
T3
D777 ; No waiting, D777 is activated, T3= programmed and
active tool in the display, D777= programmed and
active compensation.

Note
The tool change and the assignment of a D compensation to an actual tool are the
responsibility of the NC program and of the PLC program, if applicable.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1385
Tool Offset (W1)
Flat D number structure

Delete D no. via part program


● With flat D number:
$TC_DP1[d] = 0
Compensation data block with the number D in the TO unit is deleted.
The memory is then free for the definition of another D number.
● Without flat D number:
$TC_DP1[t][d] = 0
Cutting edge d of tool t is deleted.
● $TC_DP1[0] = 0
All D compensations of the TO unit are deleted.
Active compensation data blocks (D numbers) cannot be deleted. This means, that it may be
necessary to program D0 before deleting.

Tool MDs
The following machine data affect the way tools and cutting edges (D numbers) work in the
NCK:

Machine data Meaning


MD20270 $MC_CUTTING_EDGE_DEFAULT Standard tool cutting edge after tool
change
MD20130 $MC_CUTTING_EDGE_RESET_VALUE Tool cutting edge - Length
compensation on power-up (RESET/
TP end)
MD20120 $MC_TOOL_RESET_VALUE Tool - Length compensation on power-
up (RESET/TP end)
MD20121 $MC_TOOL_PRESEL_RESET_VALUE Preselect tool on RESET
MD22550 $MC_TOOL_CHANGE_MODE Tool change with M function instead of
T function
MD22560 $MC_TOOL_CHANGE_M_CODE M function for tool change
MD20110 $MC_RESET_MODE_MASK Definition of basic control settings after
RESET/TP end)
MD20112 $MC_START_MODE_MASK Determination of basic control settings
after NC start

Basic Functions
1386 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Flat D number structure

17.3.4 Programming the T number


When the "Flat D number structure" function is active, NC address T continues to be
evaluated, i.e. the programmed T number and the active T number are displayed. However,
the NC determines the D number without reference to the programmed T value.
The NC detects 1 master spindle per channel (via the spindle number, which can be set
using MD). Compensations and the M6 command (tool change) are only calculated in
reference to the master spindle.
An address extension T is interpreted as a spindle number (e.g. T2 = 1; tool 1 to be selected
on spindle 2); a tool change is only detected if spindle 2 is the master spindle.

17.3.5 Programming M6

MD22550 and MD22560


The NC detects 1 master spindle per channel (via the spindle number, which can be set
using MD). Compensations and the M6 command (tool change) are only calculated in
reference to the master spindle.
Whether the tool change command is performed with an M function is defined via the
machine data:
MD22550 $MC_TOOL_CHANGE_MODE (new tool compensation with M function).
T is used as the tool preparation command.
The name of the M function for the tool change is defined via the machine data:
MD22560 $MC_TOOL_CHANGE_M_CODE (M function for tool change).
The default is M6. An address extension of M6 is interpreted as a spindle number.

Example
Two spindles are defined, spindle 1 and spindle 2, and the following applies:

MD20090 = 2 ; Spindle no. 2 is the master spindle.


M6 ; Tool change desired, command refers implicitly to the master
spindle
M1 = 6 ; No tool change, since spindle no. 2 is the master spindle
M2 = 6 ; Tool is changed, since spindle no. 2 is the master spindle

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1387
Tool Offset (W1)
Flat D number structure

17.3.6 Program test

MD20110
To have the active tool and the tool compensation included as follows, can be defined via the
machine data:
MD20110 $MC_RESET_MODE_MASK, Bit 3 (Definition of control default settings after
RESET/TP end).

Value Significance
Bit 3 =1 From the last test program to finish in test mode
=0 From the last program to finish before activation of the program test

Prerequisite
The bits 0 and 6 must be set by the machine data:
MD20110 $MC_RESET_MODE_MASK, Bit 3 (Definition of control default settings after
RESET/TP end).

17.3.7 Tool management or "Flat D numbers"

Tool management
NCK active tool management works on the basis of the following assumptions:
1. Tools are managed in magazines.
2. Cutting edges are monitored; limits reached cause the tool to be disabled.
3. Idea behind replacement tools: Tools are programmed for selection only the on the basis
of their identifier. NCK then selects the concrete tool according to the strategy.
This means that it only makes sense to employ tool management when specific tools have
been defined and these are to be utilized by the NCK.

Flat D number
Flat D number means that tool management is carried out outside the NCK and there is no
reference made to T numbers.

Basic Functions
1388 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Flat D number structure

No mixture of tool management and flat D no.


It does not make sense to mix or distribute the tool management functions over the NCK and
PLC, since the main reason for tool management on the NCK is to save time.
This only works if the tasks that are time-critical are carried out on the NCK. This is not the
case for "Flat D number", however.

Note
Activation of both of the functions "Flat D number structure" and "Tool management" is
monitored. If both are activated at the same time, "Tool management" takes priority.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1389
Tool Offset (W1)
Tool cutting edge

17.4 Tool cutting edge

17.4.1 General

Tool cutting edge


The following data are used to describe a tool cutting edge uniquely:
● Tool type (end mill, drill, etc.)
● Geometrical description
● Technological description

Tool parameter
The geometrical description, the technological description and the tool type are mapped to
tool parameters for each tool cutting edge.
The following tool parameters are available for the relevant tool types:

Tool parameter Significance Note


1 Tool type
2 Cutting edge position for turning tools or for milling/grinding tools
with 2D TRC contour tool

Geometry - tool lengths


3 Length 1
4 Length 2
5 Length 3

Geometry - tool shape


6 Radius 1/Length 1 for 3D face milling
7 Length 2 for 3D face milling
8 Radius 1 for 3D face milling
9 Radius 2 for 3D face milling
10 Angle 1/minimum threshold angle for 3D face milling
with 2D TRC contour tool
11 Angle 2/minimum threshold angle for 3D face milling
with 2D TRC contour tool

Wear - tool length


12 Length 1
13 Length 2
14 Length 3

Wear - tool shape

Basic Functions
1390 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool cutting edge

Tool parameter Significance Note


15 Radius 1/Length 1 for 3D face milling
16 Length 2 for 3D face milling
17 Radius 1 for 3D face milling
18 Radius 2 for 3D face milling
19 Angle 1 / for 3D face milling
minimum limit angle with 2D TRC contour tool.
20 Angle 2 / for 3D face milling
maximum limit angle with 2D TRC contour tool.

Tool base dimension/adapter dimension


21 Basic length 1
22 Basic length 2
23 Basic length 3

Technology
24 Undercut angle only for turning tools
25 Reserved*

* "Reserved" means that this tool parameter is not used and is reserved for expansions.

3D-face milling
Milling cutter types 111, 120, 121, 130, 155, 156 and 157 are given special treatment for
3D-face milling by evaluating tool parameters (1 -23).

References
For more information about various tool types, see:
● Function Manual - Basic Functions; Tool Offset (W1), Chapter "Tool type (tool
parameters)"
● Programming Manual Fundamentals; Chapter: "Tool compensations" > "List of tool types"
● Function Manual - Special Functions; 3D-tool radius compensation (W5)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1391
Tool Offset (W1)
Tool cutting edge

17.4.2 Tool parameter 1: Tool type

Description
The tool type (3-digit number) defines the tool in question. The selection of this tool type
determines further components such as geometry, wear and tool base dimensions in
advance.

Conditions
The following is applicable to the "Tool type" parameter:
● The tool type must be specified for each tool cutting edge.
● Only the values specified can be used for the tool type.
● Tool type "0" (zero) means that no valid tool has been defined.

Basic Functions
1392 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool cutting edge

Tool types and tool parameters


Different tool types and the most important tool parameters are listed in the following table.
The tool parameters available for a certain tool type are designated with "x".

7DEOHRIWKHPRVWLPSRUWDQWDYDLODEOHWRROSDUDPDWHUV RQO\WRROW\SHQHFHVVDU\

DGDSEDVHPHDVXUHOHQJWK 


73*

73*
73*

73*
73*




WRROSDUDPHWHU7&B'3










FRPSHQVDWLRQE\1&.

ದSHULSKHUDOVSHHGPD[
SURMHFWLRQOHQJWK
ದOHQJWK
ದOHQJWK
FXWWLQJHGJHSRVLWLRQ

ದDQJOHJUDGLHQWGLVF
VORWZLGWKUDGLXV

WRROFOHDUDQFHDQJOH

ದGLVFZLGWKPLQDFW
JHRPHWU\OHQJWK

JHRPHWU\UDGLXV

ZHDUOHQJWK
ZHDUUDGLXV

ದGLVFUDGLXVPLQ

ದVSHHGPD[
WRROW\SH

0LOOLQJWRROVDQGGULOOLQJWRROV DOORWKHUV
 0LOOLQJWRROVDFFRUGLQJWR&/'$7$  [ [ [ [ [ [ [
 EDOOHQGPLOO [ [ [ [ [ [ [
 HQGPLOO [ [ [ [ [ [ [
 HQGPLOOZLWKFRUQHUURXQGLQJ [ [ [ [ [ [ [ [
 DQJOHKHDGFXWWHU [ [ [ [ [ [ [
 DQJOHKHDGFXWWHUZLWKFRUQHUURXQGLQJ [ [ [ [ [ [ [ [
 IDFHPLOO [ [ [ [ [ [ [
 WKUHDGPLOO [ [ [ [ [ [ [
 VLGHPLOO [ [ [ [ [ [ [
 WUXQFDWHGFRQHPLOO [ [ [ [ [ [ [
 WZLVWGULOO [ [ [ [ [ [
 VROLGELW [ [ [ [ [ [
 GULOOLQJURG [ [ [ [ [ [
 FHQWHUGULOO [ [ [ [ [ [
 FRXQWHUVLQN [ [ [ [ [ [
 SLORWHGFRXQWHUERUH [ [ [ [ [ [
 WDSGULOOUHJXODUWKUHDG [ [ [ [ [ [
 WDSGULOOILQHWKUHDG [ [ [ [ [ [
 WDSGULOO:KLWZRUWKWKUHDG [ [ [ [ [ [
 UHDPHU [ [ [ [ [ [
JULQGLQJWRROVDQGWXUQLQJWRROV 
 SHULSKHUDOJULQGLQJZKHHO [ [ [ [ [ [ [ [ [ [
 SHULSKHUDOJULQGLQJZKHHOZLWKPRQLWRULQJ [ [ [ [ [ [ [ [ [ [ [ [ [
 ZLHDEHURKQH%DVLVPD¡I¾U68*  [ [ [ [ [ [ [ [ [ [ [ [
 3ODQVFKOHLEH [ [ [ [ [ [ [ [ [
 3ODQVFKOHLEHPLWžEHUZDFKXQJ [ [ [ [ [ [ [ [ [ [ [ [
 DVEXWZLWKRXWEDVHPHDVXUHPHQWIRU68*  [ [ [ [ [ [ [ [ [ [ [
 GUHVVHU [ [ [ [ [ [ [ [
 URXJKLQJWRRO [ [ [ [ [ [ [ [ [
 VPRRWKLQJWRRO [ [ [ [ [ [ [ [ [
 UHFHVVLQJWRRO [ [ [ [ [ [ [ [ [
 FXWWLQJRIIWRRO [ [ [ [ [ [ [ [ [
 WKUHDGLQJWRRO [ [ [ [ [ [ [ [ [
VSHFLDOWRROV 
 VORWWLQJVDZ [ [ [ [ [ [ [ [ [
&/'$7$ FXWWHU/RFDWLRQ'DWD ಧ WRROSRVLWLRQGDWDDFFRUGLQJWR',1
%O68*  ಧ JULQGLQJZKHHOSHULSKHUDOVSHHG

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1393
Tool Offset (W1)
Tool cutting edge

Note
The tool type has no significance in the turning tool groups.
Non-listed numbers are also permitted, in particular with grinding tools (400-499).

Tool offset data


Tool offset data (TOA data) is stored in the system variables.
Example: Slotting saw tool type (Type 700)

Geometry Wear Base Unit


Length compensation
Length 1 $TC_DP3 $TC_DP12 $TC_DP21 mm
Length 2 $TC_DP4 $TC_DP13 $TC_DP22 mm
Length 3 $TC_DP5 $TC_DP14 $TC_DP23 mm
Saw blade compensation
Diameter d $TC_DP6 $TC_DP15 mm
Slot width b $TC_DP7 $TC_DP16 mm
Projection k $TC_DP8 $TC_DP17 mm

Basic Functions
1394 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool cutting edge

/

7RRODGDSWHU UHIHUHQFH /
SRLQW

G /
EN /

Figure 17-3 Geometry of slotting saw (analogous to angle head cutter)

The width of the saw blade is accounted for with tool radius compensation (G40 to G42 as
follows:

Command Significance
G40 No saw blade compensation
G41 Saw blade compensation left
G42 Saw blade compensation right

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1395
Tool Offset (W1)
Tool cutting edge

17.4.3 Tool parameter 2: Cutting edge position

Description
The cutting edge position describes the position of the tool tip P in relation to the cutting
edge center point S. It is entered in tool parameter 2.
The cutting edge position is required together with the cutting edge radius (tool parameter 8)
for the calculation of the tool radius compensation for turning tools (tool type 5xx).

6
5
/HQJWK

/HQJWK )7RROKROGHUUHIHUHQFHSRLQW
5&XWWLQJHGJHUDGLXV WRROUDGLXV
6&XWWLQJHGJHFHQWHUSRLQW
= 37RROWLS

Figure 17-4 Dimensions for turning tools: Turning tool

Cutting edge position parameter values

; 3  3  3  3  3  3  3  3  3 


3 3 6

6 =

Figure 17-5 Tool parameter 2 (P2): Machining behind the turning center

Basic Functions
1396 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool cutting edge

6
=
3
3 6
3  3  3  3  3  3  3  3  3 
;

Figure 17-6 Tool parameter 2 (P2): Machining in front of the turning center

= = = = =

3  3  3  3 


3 
3 3 6
3  3  3  3 
6

; ; ; ; ;

Figure 17-7 Tool parameter 2 (P2): Cutting edge position for vertical boring and turning mills

Special points to be noted


● If the cutting edge center point S is used instead of point P as a reference point to
calculate the tool length compensation, the identifier 9 must be entered for the cutting
edge position.
● The identifier 0 (zero) is not permitted as a cutting edge position.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1397
Tool Offset (W1)
Tool cutting edge

17.4.4 Tool parameters 3 - 5: Geometry - tool lengths

Description
The lengths of the tools are required for the geometry tool length compensation. They are
input as tool lengths 1 to 3 in the tool parameters 3 to 5. The following length specifications
must be entered as a minimum for each tool type:

Tool type Required tool lengths


Tool type 12x, 140, 145, 150: Tool length 1
Tool type 13x: Tool length 1 to 3 (depending on plane G17-G19)
Tool type 2xx: Tool length 1
Tool type 5xx: Tool length 1 to 3

Example: Twist drill (tool type 200) with tool length (tool parameter 3)

) WRROKROGHUUHIHUHQFHSRLQW

/HQJWK WRROSDUDPHWHU

Note
All three tool parameters 3 to 5 (tool length 1 to 3) are always calculated in the three
geometry axes, irrespective of the tool type.
If more tool lengths are input in the tool parameters 3 to 5 for a tool type than is required as
the minimum, then these extra tool lengths are settled in the geometry axes without any
alarm.

Basic Functions
1398 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool cutting edge

Special points to be noted


The active size of the tool is only defined when the geometry tool length compensation (tool
parameters 3 to 5) and the wear tool length compensation (tool parameters 12 to 14) are
added together. The base-dimension/adapter-dimension tool length compensation is also
added in order to calculate the total tool length compensation in the geometry axes.

References
For information about entering tool dimensions (lengths) in tool parameters 3 to 5 (tool
lengths 1 to 3) and how these are calculated in the three geometry axes, please refer to
→ Operating Manual.

17.4.5 Tool parameters 6 - 11: Geometry - tool shape

Description
The shape of the tool is defined with the help of tool parameters 6 to 11. The data is required
for the geometry tool radius compensation.
In most cases, only tool parameter 6 (tool radius 1) is used.

Tool parameter Description Application


6 Tool length 1 Not used
7 Tool length 2 Not used
8 Tool radius 1 The tool radius must be entered for the following tool types
in tool parameter 6 (tool radius 1):
Tool type 1xx Milling tools
Tool type 5xx Turning tools
A tool radius does not have to be entered for drilling tools
(tool type 2xx).
The cutting edge position (tool parameter 2) also has to be
entered for turning tools (tool type 5xx).
9 Tool radius 2 Not used
10 Tool angle 1 Not used
11 Tool angle 2 Not used

2D TRC with contour tools


For the definition of contour tools with multiple tool cutting edges, the minimum and
maximum limit angle can be entered. Both limit angles each relate to the vector of the cutting
edge center point to the cutting edge reference point and are counted clockwise.

Tool angle 1 Minimum limit angle per tool cutting edge


Tool angle 2 Maximum limit angle per tool cutting edge

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1399
Tool Offset (W1)
Tool cutting edge

3D-face milling
All the tool parameters 6 to 11 are required for tool description of 3D-face milling.

U K
KWRROOHQJWK H
7RRO3IOHQJWK I
7RRO3HOHQJWK
7RRO3GUDGLXV
7RRO3UUDGLXV D
7RRO3DDQJOH
7RRO3EDQJOH
G

References
Please refer to the following documentation for information about entering tool shapes
(radius for tool radius compensation) in tool parameters 6 to 11 and how these are
calculated by geometry tool radius compensation in the three geometry axes:
● Programming Manual Fundamentals; Chapter: "Tool compensations" > "2½ D-tool
compensation"
● Function Manual - Special Functions; 3D-tool radius compensation (W5)
For 3D-face milling, please refer to:
● Programming Manual, Job Planning; Chapter: "Transformations" > "Three, Four and Five
axis Transformation (TRAORI)"

Basic Functions
1400 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool cutting edge

17.4.6 Tool parameters 12 - 14: Wear - tool lengths

Description
While geometry tool length compensation (tool parameters 3 to 5) is used to define the size
of the tool, wear tool length compensation can be used to correct the change in the active
tool size.
The active tool dimensions can change due to:
● Differences between the tool fixture on the tool measurement machine and the tool fixture
on the machine tool
● Tool wear caused during service life by machining
● Definition of the finishing allowances

Active tool size


The geometry tool compensation (tool parameters 3 to 5) and the wear tool length
compensation (tool parameters 12 to 14) are added together (geometry tool length 1 is
added to wear tool length 1, etc.) to arrive at the size of the active tool.

17.4.7 Tool parameters 15 - 20: Wear - tool shape

Description
While geometry tool radius compensation (tool parameters 6 to 11) is used to define the
shape of the tool, wear tool radius compensation can be used to correct the change in the
active tool shape.
The active tool dimensions can change due to:
● Tool wear caused during service life by machining
● Definition of the finishing allowances

Active tool shape


The geometry tool radius compensation (tool parameters 6 to 11) and the wear tool radius
compensation (tool parameters 15 to 20) are added together (geometry tool radius 1 is
added to wear tool radius 1, etc.) to arrive at the shape of the active tool.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1401
Tool Offset (W1)
Tool cutting edge

17.4.8 Tool parameters 21 - 23: Tool base dimension/adapter dimension

Description
Tool base dimension/adapter dimension can be used when the reference point of the
toolholder (tool size) differs from the reference point of the toolholder.
This is the case when:
● The tool and the tool adapter are measured separately but are installed on the machine in
one unit (the tool size and adapter size are entered separately in a cutting edge).
● The tool is used in a second tool fixture located in another position (e.g. vertical and
horizontal spindle).
● The tool fixtures of a tool turret are located at different positions.

;
=
0LOOLQJPDFKLQH < 7XUQLQJPDFKLQH

=
; /HQJWK
7RROEDVH
GLPHQVLRQ )
OHQJWK /HQJWK

7XUQLQJFHQWHU
7RROEDVH
7RROEDVH GLPHQVLRQ
GLPHQVLRQ OHQJWK 7RROEDVH
OHQJWK ) GLPHQVLRQ
5DGLXV OHQJWK
) )

/HQJWK /HQJWK

)7RROKROGHUUHIHUHQFHSRLQWV /HQJWK
) 7RROKROGHUUHIHUHQFHSRLQWV

Figure 17-8 Application examples for base-dimension/adapter-dimension TLC

Basic Functions
1402 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool cutting edge

Tool basic length 1 to 3 (tool parameters 21 to 23)


In order that the discrepancy between the toolholder reference point F and the toolholder
reference point F' can be corrected on the three geometry axes (three dimensional), all 3
basic lengths are active irrespective of the tool type. In other words, a twist drill (tool type
200) with a tool length compensation (length 1) can also have a tool base dimension/adapter
dimension in 3 axes.

References
Please refer to the following documentation for more information about base-
dimension/adapter-dimension tool length compensation:
● Programming Manual, Fundamentals

17.4.9 Tool parameter 24: Undercut angle

Meaning
Certain turning cycles, in which traversing motions with tool clearance are generated,
monitor the tool clearance angle of the active tool for possible contour violations.

Value range
The angle (0 to 90° with no leading sign) is entered in tool parameter 24 as the tool
clearance angle.

VWFRQWRXUWREHPDFKLQHG QGFRQWRXUWREHPDFKLQHG
LVQRWYLRODWHG FRXOGEHYLRODWHG

7RROFOHDUDQFH
; 7RROFOHDUDQFH
DQJOH
DQJOH

Figure 17-9 Tool clearance angle of the turning tool during relief cutting

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1403
Tool Offset (W1)
Tool cutting edge

Machining type, longitudinal or transverse


The tool clearance angle is entered in different ways according to the type of machining
(longitudinal or face). If a tool is to be used for both longitudinal and face machining, two
cutting edges must be entered for different tool clearance angles.

7RROFOHDUDQFH
DQJOHIRU
7RROFOHDUDQFH IDFHPDFKLQLQJ
DQJOHIRU
; ORQJLWXGLQDO
PDFKLQLQJ

Figure 17-10 Tool clearance angle for longitudinal and face machining

Note
If a tool clearance angle (tool parameter 24) of zero is entered, relief cutting is not monitored
in the turning cycles.

References
Please refer to the following documentation for a detailed description of the tool clearance
angle:
● Programming Manual Cycles

Basic Functions
1404 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

17.4.10 Tools with a relevant tool point direction


The following must be observed for tools with relevant cutting edge position:
● The straight line between the tool edge center points at the block start and block end is
used to calculate intersection points with the approach and retraction block. The
difference between the tool edge reference point and the tool edge center point is
superimposed on this movement.
For approach and/or retraction with KONT, the movement is superimposed in the linear
subblock of the approach or retraction movement. Therefore, the geometric conditions for
tools with or without relevant cutting edge position are identical.
● In circle blocks and in motion blocks containing rational polynomials with a denominator
degree > 4, it is not permitted to change a tool with active tool radius compensation in
cases where the distance between the tool edge center point and the tool edge reference
point changes. With other types of interpolation, it is now possible to change when a
transformation is active (e.g. TRANSMIT).
● For tool radius compensation with variable tool orientation, the transformation from the
tool edge reference point to the tool edge center point can no longer be performed by
means of a simple zero offset. Tools with a relevant cutting edge position are therefore
not permitted for 3D peripheral milling (an alarm is output).

Note
The subject is irrelevant with respect to face milling as only defined tool types without
relevant cutting edge position are permitted for this operation anyway. (A tool with a type,
which has not been explicitly approved, is treated as a ball end mill with the specified
radius. A cutting edge position parameter is ignored).

17.5 Tool radius compensation 2D (TRC)

17.5.1 General

Note
For tool radius compensation (WRK) see:
References:
/PG/ Programming Manual Fundamentals
Only the Programming Manual contains a complete technical description of the tool radius
compensation (TRC) and its special aspects.

Why TRC?
The contour (geometry) of the workpiece programmed in the part program should be
independent of the tools used in production. This makes it necessary to draw the values for
the tool length and tool radius from a current offset memory.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1405
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Tool radius compensation can be used to calculate the equidistant path to the programmed
contour from the current tool radius.

7RRO

:RUNSLHFH
FRQWRXU
3DWKRIWKHWRROFHQWHUSRLQW
DWHTXDOGLVWDQFHWRWKH
FRQWRXU HTXLGLVWDQWSDWK

Figure 17-11 Workpiece contour (geometry) with equidistant path

TRC on the plane


TRC is active on the current plane (G17 to G19) for the following types of interpolation:

• Linear interpolation ... G0,G1

• Circular interpolation ... G2, G3, CIP

• Helical interpolation ... G2,G3

• Spline interpolation ... ASPLINE, BSPLINE, CSPLINE

• Polynomial interpolation ... POLY

17.5.2 Selecting the TRC (G41/G42)

Direction of compensation
TRC calculates a path, which is equidistant to the programmed contour. Compensation can
be performed on the left- or right-hand side of the programmed contour in the direction of
motion.

Command Significance
G41 TRC on the left-hand side of the contour in the direction of motion
G42 TRC on the right-hand side of the contour in the direction of motion
G40 Deselection of TRC

Basic Functions
1406 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Intermediate blocks
In general, only program blocks with positions on geometry axes in the current plane are
programmed when TRC is active. However, dummy blocks can still also be programmed
with active TRC. Dummy blocks are program blocks, which do not contain any positions on a
geometry axis in the current plane:
● Positions on the infeed axis
● Auxiliary functions,
● etc.
The maximum number of dummy blocks can be defined in the machine data:
MD20250 $MC_CUTCOM_MAXNUM_DUMMY_BLOCKS (Max no. of dummy blocks with no
traversing movements for TRC).

Special points to be noted


● TRC can only be selected in a program block with G0 (rapid traverse) or G1 (linear
interpolation).
● A tool must be loaded (T function) and the tool cutting edge (tool compensation) (D1 to
D9) activated no later than in the program block with the tool radius compensation
selection.
● Tool radius compensation is not selected with a tool cutting edge/tool compensation of
D0.
● If only one geometry axis is programmed on the plane when tool radius compensation is
selected, the second axis is automatically added on the plane (last programmed position).
● If no geometry axis is programmed for the current plane in the block with the tool radius
compensation selection, no selection takes place.
● If tool radius compensation is deselected (G40) in the block following tool radius
compensation selection, no selection takes place.
● If tool radius compensation is selected, the approach behavior is determined by the
NORM/KONT instructions.

17.5.3 Approach and retraction behavior (NORM/KONT/KONTC/KONTT)

NORM and KONT


The NORM and KONT instructions can be used to control approach behavior (selection of tool
radius compensation with G41/42) and retraction behavior (deselection of tool radius
compensation with G40):

Command Significance
NORM Normal setting at start point/end point (initial setting)
KONT Follow contour at start point/end point
KONTC Approach/retraction with constant curvature
KONTT Approach/retraction with constant tangent

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1407
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Special points to be noted


● KONT only differs from NORM when the tool start position is behind the contour.

&RQWRXU VWUDLJKWOLQH

3
%HKLQG
FRQWRXU 5 7RROUDGLXV

,QIURQWRI
FRQWRXU 3

*FRUUHFWHG

3

([DPSOHRIVHOHFWLQJ75&ZLWK1250 ([DPSOHRIVHOHFWLQJ75&ZLWK.217
EHKLQGWKHFRQWRXU EHKLQGWKHFRQWRXUDQG*

3 3

3
&RQWRXUYLRODWLRQ &RQWRXU2.
* *
3 5
5 5

3 3
3

Figure 17-12 Example for selecting TRC with KONT or NORM in front of and behind the contour

● KONT and G450/G451 (corner behavior at outer corners) has a general effect and
determines the approach and retraction behavior with TRC.
● When tool radius compensation is deselected, the retraction behavior is determined by
the NORM/KONT instructions.

Supplementary conditions
The approach and retraction blocks are polynomials in the following two variants. Therefore,
they are only available for control variants, which support polynomial interpolation.
● KONTT
With KONTT, approach and retraction to/from the contour is with a constant tangent.
The curvature at the block transition is not usually constant.
● KONTC
With KONTC, not only the tangent but also the curvature is constant at the transition, with
the result that a jump in acceleration can no longer occur on activation/deactivation.
Although KONTC includes the KONTT property, the constant tangent version KONTT is
available on its own, because the constant curvature required by KONTC can produce
undesired contours.

Basic Functions
1408 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Axes
The continuity condition is observed in all three axes. It is thus possible to program a
simultaneous path component perpendicular to the compensation plane for
approach/retraction.
Only linear blocks are permitted for the original approach and retraction blocks with
KONTT/KONTC. These programmed linear blocks are replaced in the control by the
corresponding polynomial curves.

Exception
KONTT and KONTC are not available in 3D variants of tool radius compensation (CUT3DC,
CUT3DCC, CUT3DF).
If they are programmed, the control switches internally to NORM without an error message.

Example for KONTC


The two figures below show a typical application for approach and retraction with constant
curvature:
The full circle is approached beginning at the circle center point. The direction and curvature
radius of the approach circle at the block end point are identical to the values of the next
circle. Infeed takes place in the Z direction in both approach/retraction blocks
simultaneously.
The associated NC program segment is as follows:

$TC_DP1[1,1]=121 ; Milling tool


$TC_DP6 [1,1]=10 ; Radius 10 mm
N10 G1 X0 Y0 Z60 G64 T1 D1 F10000
N20 G41 KONTC X70 Y0 Z0
N30 G2 I-70 ; Full circle
N40 G40 G1 X0 Y0 Z60
N50 M30

Explanation:
In this example, a full circle with a radius of 70 mm is machined in the X/Y plane. Since the
tool has a radius of 10 mm, the resulting tool center point path describes a circle with a
radius of 60 mm. The start/end points are at X0 Y0 Z60, with the result that a movement
takes place in the Z direction at the same time as the approach/retraction movement in the
compensation plane.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1409
Tool Offset (W1)
Tool radius compensation 2D (TRC)





1


1


1




      

Figure 17-13 Approach and retraction with constant curvature during inside machining of a full circle:
Projection in the X-Y plane.

Basic Functions
1410 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)
















Figure 17-14 Approach and retraction with constant curvature during inside machining of a full circle:
3D representation.

KONTT and KONTC compared


The figure below shows the differences in approach/retraction behavior between KONTT and
KONTC. A circle with a radius of 20 mm about the center point at X0 Y-40 is compensated
with a tool with an external radius of 20 mm. The tool center point therefore moves along a
circular path with radius 40 mm. The end point of the approach blocks is at X40 Y30.
The transition between the circular block and the retraction block is at the zero point.
Due to the extended continuity of curvature associated with KONTC, the retraction block
first executes a movement with a negative Y component. This will often be undesired.
This response does not occur with the KONTT retraction block. However, with this block,
an acceleration step change occurs at the block transition.
If the KONTT or KONTC block is the approach block rather than the retraction block, the
contour is exactly the same, but is simply machined in the opposite direction, i.e. the
approach and retraction behavior are symmetrical.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1411
Tool Offset (W1)
Tool radius compensation 2D (TRC)






.2177

.217&







    

Figure 17-15 Differences between KONTT and KONTC

Note
The figure shows that a straight line bordering on the contour quadrant, e.g. to X20 Y-20,
would be violated with KONTC on retraction/approach to X0, Y0.

Basic Functions
1412 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

17.5.4 Smooth approach and retraction

17.5.4.1 Function

Description
The SAR (Smooth Approach and Retraction) function is used to achieve a tangential
approach to the start point of a contour, regardless of the position of the start point.
The approach behavior can be varied and adapted to special needs using a range of
additional parameters.
The two functions, smooth approach and smooth retraction, are largely symmetrical.
The following section is, therefore, restricted to a detailed description of approach; special
reference is made to differences affecting retraction.

Sub-movements
There are maximum 4 sub-movements in case of soft retraction and approach with the
following positions:
● Start point of the movement P0
● Intermediate points P1, P2 and P3
● End point P4
Points P0, P3 and P4 are always defined. Intermediate points P1 and P2 can be omitted,
according to the parameters defined and the geometrical conditions.
On retraction, the points are traversed in the reverse direction, i.e. starting at P4 and ending
at P0.

17.5.4.2 Parameters
The response of the smooth approach and retraction function is determined by up to 9
parameters:

Non-modal G code for defining the approach and retraction contour


This G code cannot be omitted.
● G147: Approach with a straight line
● G148: Retraction with a straight line
● G247: Approach with a quadrant
● G248: Retraction with a quadrant

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1413
Tool Offset (W1)
Tool radius compensation 2D (TRC)

● G347: Approach with a semicircle


● G348: Retraction with a semicircle

3 3
3ZKHQDSSURDFKLQJ 3ZKHQDSSURDFKLQJ 3ZKHQDSSURDFKLQJ
ZLWKDVWUDLJKWOLQH ZLWKDTXDGUDQW ZLWKDVHPLFLUFOH
* * *
3
7RRO 7RROFHQWHUSRLQW 7RROFHQWHUSDWK 7RROFHQWHUSDWK
SDWK 7RRO 7RRO
',65 ',65
3 &RQWRXU 3 &RQWRXU 3 &RQWRXU

',65

Figure 17-16 Approach behavior depending on G147 to G347 and DISR (with simultaneous activation
of tool radius compensation)

Modal G code for defining the approach and retraction contour


This G code is only relevant if the approach contour is a quadrant or semicircle.
The approach and retraction direction can be determined as follows:
● G140:
Defining the approach and retraction direction using active tool radius compensation.
((G140 is the initial setting.)
With positive tool radius:
– G41 active → approach from left
– G42 active → approach from right
If no tool radius compensation is active (G40), the response is identical to G143. In
this case, an alarm is not output. If the radius of the active tool is 0, the approach and
retraction side is determined as if the tool radius were positive.
● G141:
Approach contour from left, or retract to the left.

Basic Functions
1414 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

● G142:
Approach contour from right, or retract to the right.
● G143:
Automatic determination of the approach direction, i.e. the contour is approached from
the side where the start point is located, relative to the tangent at the start point of the
following block (P4).

Note
The tangent at the end point of the preceding block is used accordingly on retraction.
If the end point is not programmed explicitly on retraction, i.e. if it is to be determined
implicitly, G143 is not permitted on retraction, since there is a mutual dependency
between the approach side and the position of the end point. If G143 is programmed in
this case, an alarm is output. The same applies if, when G140 is active, an automatic
switchover to G143 takes place as a result of an inactive tool radius compensation.

Modal G code (G340, G341), which defines the subdivision of the movement into individual blocks
from the start point to the end point

3 3 3 3

,QIHHGPRYHPHQW

6WUDLJKWOLQH 6WUDLJKWOLQH
FLUFOHRUKHOL[ RUFLUFOH
33 3

',6&/ 3 ',6&/ 3 3

* *
0DFKLQLQJSODQH

Figure 17-17 Sequence of the approach movement depending on G340/G341

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1415
Tool Offset (W1)
Tool radius compensation 2D (TRC)

G340: The approach characteristic from P0 to P4 is shown in the figure.


If G247 or G347 is active (quadrant or semicircle) and start point P3 is outside the
machining plane defined by the end point P4, a helix is inserted instead of a circle.
Point P2 is not defined or coincides with P3.
The circle plane or the helix axis is determined by the plane, which is active in the
SAR block (G17 - G19), i.e. the projection of the start tangent is used by the
following block, instead of the tangent itself, to define the circle.
The movement from point P0 to point P3 takes place along two straight lines at the
velocity valid before the SAR block.
G341: The approach characteristic from P0 to P4 is shown in the figure.
P3 and P4 are located within the machining plane, with the result that a circle is
always inserted instead of a helix with G247 or G347.

Note
Active, rotating frames are included in all cases where the position of the active plane G17 -
G19 (circle plane, helix axis, infeed movements perpendicular to the active plane) is relevant.

DISR
DISRSpecifies the length of a straight approach line or the radius of an approach arc.
Retraction/approach with straight lines
On approach/retraction along a straight line, DISR specifies the distance from the cutter
edge to the start point of the contour, i.e. the length of the straight line with active TRC is
calculated as the total of the tool radius and the programmed value of DISR.
An alarm is displayed:
● If DISR is negative and the amount is greater than the tool radius (the length of the
resulting approach line is less than or equal to zero).
Retraction/approach with circles
Approach/retraction with circles DISR indicates always the radius of the tool center point
path. If tool radius compensation is activated, a circle is generated internally, the radius of
which is dimensioned such that the tool center path is derived, in this case also, from the
programmed radius.
An alarm is output on approach and retraction with circles:
● If the radius of the circle generated internally is zero or negative
● If DISR is not programmed
● If the radius value ≤ 0.

Basic Functions
1416 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

DISCL
DISCLspecifies the distance from point P2 from the machining plane.
If the position of point P2 is to be specified by an absolute reference on the axis perpendicular
to the circle plane, the value must be programmed in the form DISCL = AC(....).
If DISCL is not programmed, points P1, P2 and P3 are identical with G340 and the approach
contour is mapped from P1 to P4.
The system checks that the point defined by DISCL lies between P1 and P3, i.e. in all
movements, which have a component perpendicular to the machining plane (e.g. infeed
movements, approach movements from P3 to P4), this component must have the same
leading sign. It is not permitted to change direction. An alarm is output if this condition is
violated.
On detection of a direction reversal, a tolerance is permitted that is defined by the machine
data:
MD20204 $MC_WAB_CLEARANCE_TOLERANCE (direction reversal on SAR).
However, if P2 is outside the range defined by P1 and P3 and the deviation is less than or
equal to this tolerance, it is assumed that P2 is in the plane defined by P1 and/or P3.
Example:
An approach is made with G17 starting at position Z=20 of point P1. The SAR plane defined
by P3 is at Z=0. The point defined by DISCL must, therefore, lie between these two points.
MD20204=0.010. If P2 is between 20.000 and 20.010 or between 0 and -0.010, it is assumed
that the value 20.0 or 0.0 is programmed. The alarm is output if the Z position of P2 is greater
than 20.010 or less than -0.010.
Depending on the relative position of start point P0 and end point P4 with reference to the
machining plane, the infeed movements are performed in the negative (normal for approach)
or positive (normal for retraction) direction, i.e. with G17 it is possible for the Z component of
end point P4 to be greater than that of start point P0.

Programming the end point P4 (or P0 for retraction) generally with X.... Y... Z...
Possible ways of programming the end point P4for approach
End point P4 can be programmed in the actual SAR block.
P4 can be determined by the end point of the next traversing block.
Further blocks (dummy blocks) can be inserted between the SAR block and the next
traversing block without moving the geometry axes.
The end point is deemed to have been programmed in the actual SAR block for approach if
at least one geometry axis is programmed on the machining plane (X or Y with G17). If only
the position of the axis perpendicular to the machining plane (Z with G17) is programmed in
the SAR block, this component is taken from the SAR block, but the position in the plane is
taken from the following block. In this case, an alarm is output if the axis perpendicular to the
machining plane is also programmed in the following block.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1417
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Example:

0DFKLQLQJXSWRWKLV
SRLQWZLWK*WKHQZLWK
< *)
= 
] 
= 

      ;
&RQWRXU
3


',65 

$TC_DP1[1,1]=120 ; Milling tool T1/D1


$TC_DP6 [1,1] = 7 ; Tool with 7 mm radius

N10 G90 G0 X0 Y0 Z30 D1 T1


N20 X10
N30 G41 G147 DISCL=3 DISR=13 Z=0 F1000
N40 G1 X40 Y-10
N50 G1 X50
...
...

N30/N40 can be replaced by:


N30 G41 G147 DISCL=3 DISR=13 X40 Y-10 Z0 F1000
or:
N30 G41 G147 DISCL=3 DISR=13 F1000
N40 G1 X40 Y-10 Z0

Possible ways of programming the end point P0for retraction


The end position is always taken from the SAR block, no matter how many axes have been
programmed. We distinguish between the following situations:

Basic Functions
1418 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

1. No geometry axis is programmed in the SAR block.


In this case, the contour ends at point P2 (or at point P1, if P1 and P2 coincide). The
position in the axes, which describe the machining plane, is determined by the retraction
contour (end point of the straight line or arc). The axis component perpendicular to this is
defined by DISCL. If, in this case, DISCL = 0, the movement takes place completely
within the plane.
2. Only the axis perpendicular to the machining plane is programmed in the SAR block.
In this case, the contour ends at point P1. The position of the two other axes is
determined in the same way as in 1.

)ROORZLQJEORFN ZLWKRXWRIIVHW

3

7RROFHQWHUSDWK 3

7RRO

6$5EORFN
**

3

&RQWRXU SUHFHGLQJEORFN

Retraction with SAR with simultaneous deactivation of TRC


If the SAR retraction block is also used to deactivate tool radius compensation, in the
case of 1. and 2., an additional path from P1 to P0 is inserted such that no movement is
produced when tool radius compensation is deactivated at the end of the retraction
contour, i.e. this point defines the tool center point and not a position on a contour to be
corrected.
3. At least one axis of the machining plane is programmed.
The second axis of the machining plane can be determined modally from its last position
in the preceding block. The position of the axis perpendicular to the machining plane is
generated as described in 1. or 2., depending on whether this axis is programmed or not.
The position generated in this way defines the end point P0.
No special measures are required for deselection of tool radius compensation, because
the programmed point P0 already directly defines the position of the tool center point at
the end of the complete contour.
The start and end points of the SAR contour (P0 and P4) can coincide on approach and
retraction.

Velocity of the preceding block (typically G0).


All movements from point P0 to point P2 are performed at this velocity, i.e. the movement
parallel to the machining plane and the part of the infeed movement up to the safety
clearance.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1419
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Programming the feedrate with FAD

FAD programmed with ...


G340 Feedrate from P2 or P3 to P4.
G341 Feedrate of the infeed movement perpendicular to the machining
plane from P2 to P3.
If FAD is not programmed, this part of the contour is traversed at the velocity, which is active
modally from the preceding block, in the event that no F command defining the velocity is
programmed in the SAR block.
Programmed response:

FAD=0 or negative → Alarm output


FAD=... → Programmed value acts in accordance with the active G code
of group 15 (feed type; G93, G94, etc.)
FAD=PM(...) → Programmed value is interpreted as linear feed (like G94),
irrespective of the active G code of group 15
FAD=PR(...) → Programmed value is interpreted as revolutional feed (like
G95), irrespective of the active G code of group 15
Example:

<


;
     


=
*

3 3
*

3 )

3

3 ) ) ;

Basic Functions
1420 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

$TC_DP1[1,1]=120 ;Milling tool T1/D1


$TC_DP6 [1,1] = 7 ;Tool with 7mm radius

N10 G90 G0 X0 Y0 Z20 D1 T1


N20 G41 G341 G247 DISCL=AC(5) DISR=13FAD 500 X40 Y-10 Z=0 F2000
N30 X50
N40 X60
...

Programming feed F
This feed value is effective from point P3 (or from point P2, if FAD is not programmed).
If no F command is programmed in the SAR block, the speed of the preceding block is valid.
The velocity defined by FAD is not used for following blocks.

17.5.4.3 Velocities

Velocities at approach
In both approach diagrams below, it is assumed that no new velocity is programmed in the
block following the SAR block. If this is not the case, the new velocity comes into effect after
point P4.

3 3 33 3

1RYHORFLW\SURJUDPPHG

2QO\)SURJUDPPHG

2QO\)$'SURJUDPPHG

)DQG)$'SURJUDPPHG

5DSLGWUDYHUVHLI*LVDFWLYHRWKHUZLVHZLWKWKHROGRUQHZ)FRPPDQG
9HORFLW\RISUHFHGLQJEORFN ROG)FRPPDQG
,QIHHGYHORFLW\SURJUDPPHGZLWK)$'
1HZPRGDOYHORFLW\SURJUDPPHGZLWK)

Figure 17-18 Velocities in the SAR subblocks on approach with G340

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1421
Tool Offset (W1)
Tool radius compensation 2D (TRC)

3 3 3 3 3

1RYHORFLW\SURJUDPPHG

2QO\)SURJUDPPHG

2QO\)$'SURJUDPPHG

)DQG)$'SURJUDPPHG

5DSLGWUDYHUVHLI*LVDFWLYHRWKHUZLVHZLWKWKHROGRUQHZ)FRPPDQG
9HORFLW\RISUHFHGLQJEORFN ROG)FRPPDQG
,QIHHGYHORFLW\SURJUDPPHGZLWK)$'
1HZPRGDOYHORFLW\SURJUDPPHGZLWK)

Figure 17-19 Velocities in the SAR subblocks on approach with G341

Velocities at retraction
During retraction, the rolls of the modally active feedrate from the previous block and the
programmed feedrate value in the SAR block are interchanged, i.e. the actual retraction
contour (straight line, circle, helix) is traversed with the old feedrate value and a new velocity
programmed with the F word applies from point P2 up to P0.
If even retraction is active and FAD is programmed, the path from P3 to P2 is traversed with
FAD, otherwise it is traversed with the old velocity. The last F command programmed in a
preceding block always applies for the path from P4 to P2. G0 has no effect in these blocks.
Traversing from P2 to P0 takes place with the F command programmed in the SAR block or,
if no F command is programmed, with the modal F command from a preceding block. This
applies on the condition that G0 is not active.
If rapid traverse is to be used on retraction in the blocks from P2 to P0, G0 must be activated
before the SAR block or in the SAR block itself. If an additional F command is programmed
in the actual SAR blocks, it is then ineffective. However, it remains modally active for
following blocks.

Basic Functions
1422 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

3 3 3 3 3

1RYHORFLW\SURJUDPPHG

2QO\)SURJUDPPHG

2QO\)$'SURJUDPPHG

)DQG)$'SURJUDPPHG

5DSLGWUDYHUVHLI*LVDFWLYHRWKHUZLVHZLWKWKHROGRUQHZ)FRPPDQG

9HORFLW\RISUHFHGLQJEORFN ROG)FRPPDQG
5HWUDFWLRQYHORFLW\SURJUDPPHGZLWK)$'
1HZPRGDOYHORFLW\SURJUDPPHGZLWK)

Figure 17-20 Velocities in the SAR subblocks on retraction

17.5.4.4 System variables


Points P3 and P4 can be read in the WCS as system variables during approach.

$P_APR: Read P3 (start point) in WCS


$P_AEP: Read P4 (contour start point) in WCS
$P_APDV =1 If the content of $P_APR and $P_AEP is valid, i.e. if these contain the
position values belonging to the last SAR approach block programmed.
=0 The positions of an older SAR approach block are read.
Changing the WCS between the SAR block and the read operation has no effect on the
position values.

17.5.4.5 Supplementary conditions

Supplementary conditions
● Any further NC commands (e.g. auxiliary function outputs, synchronous axis movements,
positioning axis movements, etc.) can be programmed in a SAR block.
These are executed in the first subblock on approach and in the last subblock on
retraction.
● If the end point P4 is taken not from the SAR block but from a subsequent traversing
block, the actual SAR contour (straight line, quadrant or semicircle) is traversed in this
block.
The last subblock of the original SAR block does not then contain traversing information
for geometry axes. It is always output, however, because further actions (e.g. single
axes) may have to be executed in this block.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1423
Tool Offset (W1)
Tool radius compensation 2D (TRC)

● At least two blocks must always be taken into consideration:


– The SAR block itself
– The block, which defines the approach or retraction direction
Further blocks can be programmed between these two blocks.
The number of possible dummy blocks is limited with the machine data:
MD20202 $MC_WAB_MAXNUM_DUMMY_BLOCKS (Maximum number of blocks with no
traversing motions with SAR).
● If tool radius compensation is activated simultaneously in an approach block, the first
linear block of the SAR contour is the block, in which activation takes place.
The complete contour generated by the SAR function is treated by tool radius
compensation as if it has been programmed explicitly (collision detection, calculation of
intersection, approach behavior NORM/KONT).
● The direction of the infeed movement and the position of the circle plane or the helix axis
are defined exclusively by the active plane (G17 - G19) - rotated with an active frame
where appropriate.
● On approach, a preprocessor stop must not be inserted between the SAR block and the
following block, which defines the direction of the tangent.
Whether programmed explicitly or inserted automatically by the controller, a preprocessor
stop results, in this case, in an alarm.

Response with REPOS


If an SAR cycle is interrupted and repositioned, it resumes at the point of interruption on RMI.
With RME, the contact point is the end point of the last SAR block; with RMB, it is the start
point of the first SAR block.
If RMI is programmed together with DISPR (reapproach at distance DISPR in front of
interruption point), the reapproach point can appear in a subblock of the SAR cycle before
the interruption subblock.

17.5.4.6 Examples

Example 1
The following conditions must be true:
● Smooth approach is activated in block N20
● X=40 (end point); Y=0; Z=0
● Approach movement performed with quadrant (G247)
● Approach direction not programmed, G140 is valid, i.e. because TRC is active (G42) and
compensation value is positive (10), the contour is approached from the right
● Approach circle generated internally (SAR contour) has radius 20, so that the radius of
the tool center path is equal to the programmed value DISR=10

Basic Functions
1424 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

● Because of G341, the approach movement takes place with a circle in the plane, resulting
in a start point at (20, -20, 0)
● Because DISCL=5, point P2 is at position (20, -20, 5) and, because of Z30, point P1 is in
N10 at (20, -20, 30)

<
6$5FRQWRXU


     ;


7RRO

7RROFHQWHUSDWK
,QIHHG
 PRYHPHQWLQ=

Figure 17-21 Contour example 1

Part program:

$TC_DP1[1,1]=120 ; Tool definition T1/D1


$TC_DP6[1,1]=10 ; Radius
N10 G0 X0 Y0 Z30
N20 G247 G341 G42 NORM D1 T1 Z0 FAD=1000 F=2000 DISCL=5 DISR=10
N30 X40
N40 X100
N50 Y-30
...

Example 2
The following conditions must be true for approach:
● Smooth approach is activated in block N20
● Approach movement performed with quadrant (G247)
● Approach direction not programmed, G140 is valid, i.e. because TRC is active (G41), the
contour is approached from the left
● Contour offset OFFN=5 (N10)
● Current tool radius=10, and so the effective compensation radius for TRC=15; the radius
of the SAR contour is thus equal to 25, with the result that the radius of the tool center
path is equal to DISR=10

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1425
Tool Offset (W1)
Tool radius compensation 2D (TRC)

● The end point of the circle is obtained from N30, since only the Z position is programmed
in N20
● Infeed movement
– From Z20 to Z7 (DISCL=AC(7)) with rapid traverse
– Then on to Z0 with FAD=200
– Approach circle in X-Y-plane and following blocks with F1500
(In order that this velocity becomes effective in the following blocks, the active G-code
G0 in N30 must be overwritten with G1. Otherwise, the contour would continue to be
machined with G0.)
The following conditions must be true for retraction:
● Smooth retraction is activated in block N60
● Retraction movement performed with quadrant (G248) and helix (G340)
● FAD not programmed, since irrelevant for G340
● Z=2 in the start point; Z=8 in the end point, since DISCL=6
● When DISR=5, the radius of SAR contour=20; that of the tool center point path=5
● After the circle block, the retraction movement leads from Z8 to Z20 and the movement is
parallel to the X-Y plane up to the end point at X70 Y0.

< 7RROFHQWHUSDWK

7RRO

6HPLFLUFOH +HOL[

3DSS
3UHW

3DSS       ;
&RQWRXU 3UHW

3DSS 3UHW

Figure 17-22 Contour example 2

Basic Functions
1426 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Part program:

$TC_DP1[1,1]=120 ;Tool definition T1/D1


$TC_DP6[1,1]=10 ; Radius
N10 G0 X0 Y0 Z20 G64 D1 T1 OFFN = 5 (P0app)
N20 G41 G247 G341 Z0 DISCL = AC(7) DISR = 10 F1500 FAD=200 (P3app)
N30 G1 X30 Y-10 (P4app)
N40 X40 Z2
N50 X50 (P4ret)
N60 G248 G340 X70 Y0 Z20 DISCL = 6 DISR = 5 G40 F10000 (P3ret)
N70 X80 Y0 (P0ret)
N80 M 30

Note
The contour generated in this way is modified by tool radius compensation, which is
activated in the SAR approach block and deactivated in the SAR retraction block.
The tool radius compensation allows for an effective radius of 15, which is the sum of the
tool radius (10) and the contour offset (5). The resulting radius of the tool center path in the
approach block is therefore 10, and 5 in the retraction block.

17.5.5 Deselecting the TRC (G40)

G40 instruction
TRC is deselected with the G40 instruction.

Special points to be noted


● TRC can only be deselected in a program block with G0 (rapid traverse) or G1 (linear
interpolation).
● If D0 is programmed when tool radius compensation is active, compensation is not
deselected and error message 10750 is output.
● If a geometry axis is programmed in the block with the tool radius compensation
deselection, then the compensation is deselected even if it is not on the current plane.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1427
Tool Offset (W1)
Tool radius compensation 2D (TRC)

17.5.6 Compensation at outside corners

G450/G451
The G functions G450/G451 can be used to control the response with discontinuous block
transitions at outside corners:

Command Significance
G450 Discontinuous block transitions with transition circle
G451 Discontinuous block transitions with intersection of equidistant paths

3URJUDPPLQJ*WUDQVLWLRQFLUFOH 3URJUDPPLQJ*LQWHUVHFWLRQ

2XWVLGHFRUQHU 2XWVLGHFRUQHU
7UDQVLWLRQFLUFOH
UDGLXV WRROUDGLXV
,QWHUVHFWLRQ

Figure 17-23 Example of a 90 degree outside corner with G450 and G451

G450 (transition circle)


With the G function G450 active, on outside corners, the center point of the tool travels a
circular path along the tool radius. The circular path starts with the normal position
(perpendicular to the path tangent) at the end point of the previous path section (program
block) and ends in normal position at the start point of the new path section (program block).
Where outside corners are very flat, the response with G450 (transition circle) and G451
(intersection) becomes increasingly similar → refer to very flat outside corners.
If pointed outside corners are desired, the tool must be retracted from the contour (→ see
"DISC").

Basic Functions
1428 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

DISC
The G450 transition circle does not produce sharp outside contour corners because the path
of the tool center point through the transition circle is controlled so that the cutting edge
stops at the outside corner (programmed position). When sharp outside corners are to be
machined with G450, the DISC instruction can be used to program an overshoot. Thus, the
transition circle becomes a conic and the tool cutting edge retracts from the outside corner.
The range of values of the DISC instruction is 0 to 100, in increments of 1.

Value Significance
DISC = 0 Overshoot disabled, transition circle active
DISC = 100 Overshoot large enough to theoretically produce a response similar to
intersection (G451).

The programmable maximum value for DISC can be set via the machine data:
MD20220 $MC_CUTCOM_MAX_DISC (max. value for DISC).
Values greater than 50 are generally not advisable with DISC.

',6&  ',6& 


',6& 

&RQLFVHFWLRQ
&LUFOH
&RQWRXUDQJOH

Figure 17-24 Example: Overshoot with DISC= 25

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1429
Tool Offset (W1)
Tool radius compensation 2D (TRC)

65





',6& 
 ',6&

 

 


      
&RQWRXUDQJOH
5UDGLXV 6WUDYHUVHRYHUVKRRW >GHJUHHV@
65VFDOHGRYHUVKRRW ZLWKUHIHUHQFHWRWKHWRROUDGLXV

Figure 17-25 Overshoot with DISC depending on contour angle

G451 (intersection)
If G function G451 is active, the position (intersection) resulting from the path lines (straight
line, circle or helix only) located at a distance of the tool radius to the programmed contour
(center-point path of the tool), is approached. Spines and polynomials are never extended.

Very pointed outside corners


Where outside corners are very pointed, G451 can result in excessive idle paths. Therefore,
the system switches automatically from G451 (intersection) to G450 (transition circle, with
DISC where appropriate) when outside corners are very pointed.
The threshold angle (contour angle) for this automatic switchover (intersection point →
transition circle) can be specified in the machine data:
MD20210 $MC_CUTCOM_CORNER_LIMIT (Max. angle for compensation blocks with tool
radius compensation).

Basic Functions
1430 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

/RQJLGOHSDWKV

&RQWRXUDQJOH

Figure 17-26 Example of automatic switchover to transition circle

Very flat outside corners


Where outside corners are very flat, the response with G450 (transition circle) and G451
(intersection) becomes increasingly similar. In this case, it is no longer advisable to insert a
transition circle. One reason why it is not permitted to insert a transition circle at these
outside corners with 5-axis machining is that this would impose restrictions on speed in
contouring mode (G64). Therefore, the system switches automatically from G450 (transition
circle, with DISC where appropriate) to G451 (intersection) when outside corners are very
flat.
The threshold angle (contour angle) for this automatic switchover (transition circle →
intersection point) can be specified in the machine data:
MD20230 $MC_CUTCOM_CURVE_INSERT_LIMIT (Max. angle for intersection calculation
with tool radius compensation).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1431
Tool Offset (W1)
Tool radius compensation 2D (TRC)

%HORZFRQWRXUDQJOH
0'0&B&87&20B&859(B,16(57B/,0,7
QRWDWUDQVLWLRQFLUFOHEXWDQLQWHUVHFWLRQ

&RQWRXUDQJOH

Figure 17-27 Example of automatic switchover to intersection

17.5.7 Compensation at inside corners

Intersection
If two consecutive blocks form an inside corner, an attempt is made to find a point at which
the two equidistant paths intersect. If an intersection is found, the programmed contour is
shortened to the intersection (first block shortened at end, second block shortened at
beginning).

6KRUWHQHG
FRQWRXU

Figure 17-28 Example of a shortened contour

Basic Functions
1432 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

No intersection
In certain cases, no intersection is found between two consecutive blocks for inside corners
(see figure below).

Predictive contour calculation


If no intersection is found between two consecutive blocks, the control automatically checks
the next block and attempts to find an intersection with the equidistant paths of this block
(see figure below: intersection S). This automatic check of the next block (predictive contour
calculation) is always performed until a number of blocks defined via machine data has been
reached.
MD20240 $MC_CUTCOM_MAXNUM_CHECK_BLOCKS (blocks for predictive contour
calculation for TRC).
If no intersection is found within the number of blocks defined for the check, program
execution is interrupted and an alarm is output.

1 6

1

1

Figure 17-29 If there is no intersection between N30 and block N40, the intersection between block
N30 and block N50 is calculated.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1433
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Multiple intersections
→ see also "Collision detection"
It can be the case with inside corners that predictive contour calculation finds multiple
intersections of the equidistant paths in several consecutive blocks. In these cases, the last
intersection is always used as the valid intersection:

6
,QWHUVHFWLRQV
6DQG6DUH
6 6 QRWDSSURDFKHG

Figure 17-30 Example: Inside corner with TRC without contour violation (predicting 3 blocks)

Special points to be noted


Where multiple intersections with the next block are found, the intersection nearest the start
of the next block applies.

17.5.8 Collision detection and bottleneck detection

Collision detection
Collision detection (bottleneck detection) examines whether the equidistant paths of non-
consecutive blocks intersect. If an intersection is found, the response is the same as for
inside corners with multiple intersections: The last intersection to be found is valid:
The maximum number of blocks used for the predictive check can be entered in the machine
data:
MD20240 $MC_CUTCOM_MAXNUM_CHECK_BLOCKS (blocks for predictive contour
calculation for TRC).

Basic Functions
1434 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Programming
Collision detection can be activated or deactivated in the program:

Command Significance
CDON Collision detection ON
CDOF Collision detection OFF
CDOF2 Collision detection OFF
With CDOF, the search for an intersection initially examines two consecutive blocks. Other
blocks are not included in the search. If an intersection is found between adjacent blocks, no
further blocks are examined. With outside corners, an intersection can always be found
between two consecutive blocks.
Predictive examination of more than two adjacent blocks is thus possible with CDON and
CDOF.

Note
CDOF2 is only effective for 3D peripheral milling and has the same significance as CDOF for
all other types of machining (e.g. 3D face milling).

Omission of block
If an intersection is detected between two blocks, which are not consecutive, none of the
motions programmed between these blocks on the compensation plane are executed. All
other motions and executable instructions (M commands, traversal of positioning axes, etc.)
contained in the omitted blocks are executed at the intersection position in the sequence, in
which they are programmed in the NC program.

Warning 10763
If a block has been omitted as a result of the collision or bottleneck detection functions,
warning 10763 is output. The program is not interrupted.
This warning is suppressed if bit 1 is enabled in machine data:
MD11410 $MN_SUPPRES_ALARM_MASK (Mask for suppressing special alarm outputs).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1435
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Special points to be noted


When the intersections of non-consecutive blocks are checked, it is not the programmed
original contours that are examined, but the associated calculated equidistant paths. This
can result in a "bottleneck" being falsely detected at outside corners. The reason for this is
that the calculated tool path does not run equidistant to the programmed original contour
when DISC>0.

2IIVHWFXUYHZKHQ',6&!
FRQLFVHFWLRQ

2IIVHWFXUYHZKHQ
',6&  FLUFOH

Figure 17-31 Bottleneck detection and outside corners

Basic Functions
1436 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

17.5.9 Blocks with variable compensation value

Supplementary conditions
A variable compensation value is permissible for all types of interpolation (including circular
and spine interpolation).
It is also permitted to change the sign (and, therefore, the compensation side).

3URJUDPPHGFRQWRXU

1
1

1

1

7RROFHQWHUSDWK
1

Figure 17-32 Tool radius compensation with variable compensation value

Calculation of intersection
When the intersections in blocks with variable compensation value are calculated, the
intersection of the offset curves (tool paths) is always calculated based on the assumption
that the compensation value is constant.
If the block with the variable compensation value is the first of the two blocks to be examined
in the direction of travel, then the compensation value at the block end is used for the
calculation; the compensation value at the block start is used otherwise.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1437
Tool Offset (W1)
Tool radius compensation 2D (TRC)

' 3URJUDPPHGFRQWRXU

1
7RROFHQWHUSDWK
7KHRUHWLFDOWRROFHQWHU
SRLQWSDWK

&RPSHQVDWLRQ'DW
' HQGRIEORFN1

&RPSHQVDWLRQ'DW
VWDUWRIEORFN1
1 1

Figure 17-33 Intersection calculation with variable compensation value

Restrictions
If during machining on the inside of the circle the compensation radius becomes geater than
the programmed circle radius, then the machining is rejected with the following alarm:
Alarm 10758 "Curvature radius with variable compensation value too small"

Maintain stability of closed contour


If a radius of two circles is increased slightly, a third block may be necessary in order to
maintain the stability of the closed contour. This is the case if two adjacent blocks, which
represent two possible intersection points for a closed contour, are skipped due to the
compensation.
A stable closed contour can be achieved by choosing the first intersection point instead of
the second.
SD42496 $SC_CUTCOM_CLSD_CONT ≠ 0 (response of TRC for closed contour).
In that case, the second intersection point is always reached, even if the block is skipped. A
third block is then not required.

Basic Functions
1438 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

17.5.10 Keep tool radius compensation constant

Description
The "Keep tool radius compensation constant" function is used to suppress tool radius
compensation for a number of blocks, whereby a difference between the programmed and
the actual tool center path traveled set up by tool radius compensation in the previous blocks
is retained as the compensation.
It can be an advantage to use this method when several traversing blocks are required
during line milling in the reversal points, but the contours produced by the tool radius
compensation (follow strategies) are not wanted.

Activation
The "Keep tool radius compensation constant" function is activated with the G code
CUTCONON (CUTter compensation CONstant ON) and deactivated with the G code
CUTCONOF (CUTter compensation CONstant OFF).
CUTCONON and CUTCONOF form a modal G-code group.
The initial setting is CUTCONOF.
The function can be used independently of the type of tool radius compensation (21/2D, 3D
face milling, 3D circumferential milling).

Normal case
Tool radius compensation is normally active before the compensation suppression and is still
active when the compensation suppression is deactivated again.
In the last traversing block before CUTCONON, the offset point in the block end point is
approached. All following blocks, in which compensation suppression is active, are traversed
without compensation. However, they are offset by the vector from the end point of the last
offset block to its offset point. These blocks can have any type of interpolation (linear,
circular, polynomial).
The deactivation block of the compensation suppression, i.e. the block that contains
CUTCONOF, is compensated normally. It starts in the offset point of the start point. One linear
block is inserted between the end point of the previous block, i.e. the last programmed
traversing block with active CUTCONON, and this point.
Circular blocks, for which the circle plane is perpendicular to the compensation plane
(vertical circles), are treated as though they had CUTCONON programmed. This implicit
activation of compensation suppression is automatically canceled in the first traversing block
that contains a traversing motion in the compensation plane and is not such a circle. Vertical
circle in this sense can only occur during circumferential milling.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1439
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Example:

N10 ; Definition of tool d1


N20 $TC_DP1[1,1] = 110 ; Type
N30 $TC_DP6[1,1]= ; Radius
N40
N50 X0 Y0 Z0 G1 G17 T1 D1 F10000
N60
N70 X20 G42 NORM
N80 X30
N90 Y20
N100 X10 CUTCONON ; Activate compensation suppression
N110 Y30 KONT ; On deactivation of contour suppression,
insert bypass circle, if necessary
N120 X-10 CUTCONOF
N130 Y20 NORM ; No bypass circle on deactivation of TRC
N140 X0 Y0 G40
N150 M30

<

&RQWRXUZLWKRXW75&

1
1
&RQWRXUZLWK75& 1
1

1
1

1 1  ;



Figure 17-34 Sample program for contour suppression

Basic Functions
1440 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

Special cases
● If tool radius compensation is not active (G40), CUTCONON has no effect. No alarm is
produced. The G code remains active, however.
This is significant if tool radius compensation is to be activated in a later block with G41 or
G42.
● It is permissible to change the G code in the 7th G-code group (tool radius compensation;
G40/G41/G42) with CUTCONON active. A change to G40 is active immediately.
The offset used for traversing the previous blocks is traveled.
● If CUTCONON or CUTCONOF is programmed in a block without traversing in the active
compensation plane, activation is delayed until the next block that has such a traversing
motion.
● If CUTCONON is programmed with active tool radius compensation and not canceled
before the end of the program, the traversing blocks are traversed with the last valid
compensation.
The same applies for reprogramming of G41 or G42 in the last traversing block of a
program.
● If tool radius compensation is activated with G41 or G42 and CUTCONON is also already
active, activation of compensation is delayed until the next traversing block with
CUTCONOF.
● When reapproaching the contour with CUTCONOF, the 17th G-code group (approach and
retraction behavior with tool compensation; NORM/KONT) is evaluated, i.e. a bypass circle
is inserted if necessary for KONT. A bypass circle is inserted under the same conditions
as for activation of tool radius compensation with G41 or G42.
● The number of blocks with suppressed tool radius compensation is restricted:
MD20252 $MC_CUTCOM_MAXNUM_SUPPR_BLOCKS (Maximum number of blocks
with compensation suppression).
If it is exceeded, machining is aborted and an error message issued.
The restriction is necessary because the internal block processing in the last block before
CUTCONON must be resumed when repositioning.
● The response after reprogramming G41 or G42 when tool radius compensation is already
active is similar to compensation suppression.
The following deviations apply:
– Only linear blocks are permissible
– A single traversing block that contains G41 or G42 is modified so that it ends at the
offset point of the start point in the following block. Thus it is not necessary to insert a
dummy block. The same applies to the last block in a sequence of traversing blocks
where each contains G41 or G42.
– The contour is always reapproached with NORM, independent of the G code of the 17th
group (approach and retraction behavior with tool compensation; NORM/KONT).
● If G41/G42 is programmed several times in consecutive traversing blocks, all blocks are
machined as for CUTCONON, except for the last one.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1441
Tool Offset (W1)
Tool radius compensation 2D (TRC)

● The type of contour suppression is evaluated only in the first traversing block of a
sequence of consecutive traversing blocks.
If both CUTCONON and G41 or G42 are programmed in the first block, the response to
deactivating contour suppression is determined by CUTCONON.
Changing from G41 to G42 or vice versa makes sense in this case as a means of
changing the compensation side (left or right of the contour) when restarting.
A change of compensation side (G41/G42) can also be programmed in a later block, even
if contour suppression is active.
● Collision detection and bottleneck detection is deactivated for all blocks with active
contour suppression.

17.5.11 Alarm behavior

Alarm during preprocessing


If a tool radius compensation alarm is output during preprocessing, main-run machining
stops at the next block end reached, i.e. usually at the end of the block currently being
interpolated (if Look Ahead is active, once the axes have come to a stop).

Alarms for preprocessing stop and active tool radius compensation


Tool radius compensation generally requires at least one of the following traversing blocks
(even more for bottlenecks) to determine the end point of a block. Since the preprocessing
stop of such a block is not available, traversing continues to the offset point in the last block.
Correspondingly, the offset point in the start point is approached in the first block after a
preprocessing stop.
The contour obtained may deviate considerably from the one that would result without
preprocessing stop. Contour violations in particular are possible. Therefore the following
setting data was introduced:
SD42480 $MC_STOP_CUTCOM_STOPRE (alarm response for TRC and preprocessing
stop).
The response of the tool radius compensation remains unchanged compared to the previous
status, and/or an alarm is output for preprocessing stop during active tool radius
compensation and the program is halted, depending on the value.
The user can acknowledge this alarm and continue the NC program with NC start or abort it
with RESET.

Basic Functions
1442 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

17.5.12 Intersection procedure for polynomials

Function
If two curves with active tool radius compensation form an outside corner, depending on the
G code of the 18th group (corner behavior with tool compensation; G450/G451) and
regardless of the type of curves involved (straight lines, circles, polynomials):
● Either a conic is inserted to bypass the corner
Or
● The curves involved are extrapolated to form an intersection.
If no intersection is found with G451 activated, or if the angle formed by the two curves is too
steep, switchover to insert mode is automatic.
The intersection procedure for polynomials is released with the machine data:
MD20256 $MC_CUTCOM_INTERS_POLY_ENABLE (Intersection process possible for
polynomials)

Note
If this machine data is set to inactive, a block (can be very short) is always inserted (even if
transitions are almost tangential). These short blocks always produce unwanted drops in
speed during G64 operation.

17.5.13 G461/G462 Approach/retract strategy expansion

Function
In certain special geometrical situations, extended approach and retraction strategies,
compared with the previous implementation, are required in order to activate or deactivate
tool radius compensation (see figure below).

Note
The following example describes only the situation for deactivation of tool radius
compensation. The response for approach is virtually identical.

Example:

G42 D1 T1 ; Tool radius 20 mm


...
G1 X110 Y0
N10 X0
N20 Y10
N30 G40 X50 Y50

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1443
Tool Offset (W1)
Tool radius compensation 2D (TRC)

<
1
7RROUDGLXV
;

&HQWHUSRLQWSDWKZLWK
7RROUDGLXVFRPSHQVDWLRQ

3URJUDPPHG

FRQWRXU
1 1

   

Figure 17-35 Retraction behavior with G460

The last block with active tool radius compensation (N20) is so short that an intersection no
longer exists between the offset curve and the preceding block (or a previous block) for the
current tool radius. An intersection between the offset curves of the following and preceding
blocks is therefore sought, i.e. between N10 and N30 in this example. The curve used for the
retraction block is not a real offset curve, but a straight line from the offset point at the end of
block N20 to the programmed end point of N30. The intersection is approached if one is
found. The colored area in the figure is not machined, although the tool used would be
capable of this.

G460
With G460, the approach/retraction strategy is the same as before.

Basic Functions
1444 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

G461
If no intersection is possible between the last TRC block and a preceding block, the offset
curve of this block is extended with a circle whose center point lies at the end point of the
uncorrected block and whose radius is equal to the tool radius.

<
$X[LOLDU\FXUYH
1
;

&HQWHUSRLQWSDWKZLWK
WRROUDGLXVFRPSHQVDWLRQ

3URJUDPPHG
 FRQWRXU
1 1

   

Figure 17-36 Retraction behavior with G461

The control attempts to cut this circle with one of the preceding blocks. If CDOF is active, the
search is terminated when an intersection is found, i.e. the system does not check for more
intersections with even earlier blocks.
If CDON is active, the search for more intersections continues after the first intersection is
found.
An intersection point, which is found in this way, is the new end point of a preceding block
and the start point of the deactivation block. The inserted circle is used exclusively to
calculate the intersection and does not produce a traversing movement.

Note
If no intersection is found, the following alarm is output:
Alarm "10751 Collision danger"

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1445
Tool Offset (W1)
Tool radius compensation 2D (TRC)

G462
If no intersection is possible between the last TRC block and a preceding block, a straight
line is inserted, on retraction with G462 (initial setting), at the end point of the last block with
tool radius compensation (the block is extended by its end tangent).

<
$X[LOLDU\FXUYH
1

;
1
&HQWHUSDWK
FRUUHFWHGSDWK

 3URJUDPPHG
FRQWRXU
1 1

   

Figure 17-37 Retraction behavior with G462

The search for the intersection is then identical to the procedure for G461.
With G462, the corner generated by N10 and N20 in the sample program is not machined to
the full extent actually possible with the tool used. However, this behavior may be necessary
if the part contour (as distinct from the programmed contour), to the left of N20 in the
example, is not permitted to be violated even with y values greater than 10 mm.
If KONT is active (travel round contour at start or end point), behavior will differ according to
whether the end point is in front of or behind the contour.

End point in front of contour


If the end point is located in front of the contour, the retraction behavior is the same as for
NORM. This feature does not change, even if the last contour block with G451 is extended
with a straight line or a circle. Additional circumnavigation strategies to avoid a contour
violation in the vicinity of the contour end point are therefore not required.

Basic Functions
1446 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool radius compensation 2D (TRC)

End point behind contour


If the end point is behind the contour, a circle or straight line is always inserted depending on
G450/G451. In this case, G460-G462 has no effect.
If, in this situation, the last traversing block has no intersection with a preceding block, an
intersection with the inserted contour element or with the linear section from the end point of
the circumnavigation circle to the programmed end point can result.
If the inserted contour element is a circle (G450), and it intersects with the preceding block,
this is the same as the intersection, which would be produced with NORM and G461. In
general, however, a remaining section of the circle still has to be traversed. An intersection
calculation is no longer required for the linear section of the retraction block.
In the second case (if no intersection is found between the inserted contour element and the
preceding blocks), the intersection between the retraction straight line and a preceding block
is approached.
Therefore, when G461 or G462 is active, behavior deviating from G460 can only arise if
NORM is active or if behavior with KONT is identical to NORM due to the geometrical conditions.

Note
The approach behavior is symmetrical to the retraction behavior.
The approach/retraction behavior is determined by the state of the G command in the
approach/retraction block. The approach behavior can therefore be set independently of the
retraction behavior.

Example:
Program for using G461 during approach:

N10 $TC_DP1[1,1]=120 ; Tool type mill


N20 $TC_DP6[1,1]=10 ; Radius
N30 X0 Y0 F10000 T1 D1
N40 Y20
N50 G42 X50 Y5 G461
N60 Y0 F600
N70 X30
N80 X20 Y-5
N90 X0 Y0 G40
N100 M30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1447
Tool Offset (W1)
Toolholder with orientation capability

17.6 Toolholder with orientation capability

17.6.1 General

Introduction
The orientation of the tool can vary (e.g. due to retooling) for a single class of machine tools.
When the machine is operating, the orientation that has been set is permanent, however,
and cannot be changed during traversing. For this reason, kinematic orientation
transformation (3-, 4- or 5-axis transformations, TRAORI) is neither necessary nor does it
make sense for such machines. However, it is necessary to take account of the changes in
the tool length components caused by changing the orientation, without having to trouble the
user with mathematics involved. The control performs these calculations.

Required data
The following requirements must be met if the control is to take tool compensations into
account for toolholders with orientation capability:
● Tool data (geometry, wear, etc.)
● Toolholder data (data for the geometry of the toolholder with orientation capability)

Toolholder selection
A toolholder defined in the control must be specified for the "Toolholder with orientation
capability" function. The NC program command below is used for this purpose:
TCARR = m
m: Number of the toolholder
The toolholder has an associated toolholder data block, which describes its geometry.
Activating the toolholder and its block has an immediate effect, i.e. from the next traversing
block onwards.

Assignment tool/toolholder
The tool that was active previously is assigned to the new toolholder.
From the point of view of the control, toolholder number m and tool numbers T can be
combined freely. In the real application, however, certain combinations can be ruled out for
machining or mechanical reasons. The control does not check whether the combinations
make sense.

Basic Functions
1448 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Description of the kinematics of the toolholder


The kinematics of the toolholder with orientation capability is described with a total of 33
parameter sets.
The data of the data block can be edited by the user.

Toolholder with orientation capability


Example: Cardan toolholder with two axes for the tool orientation

˳ &

& $
$

] ˳

9DULDQW 9DULDQW
[

Figure 17-38 Cardan toolholder with two axes

Processing toolholder data blocks


Two options are available:
● Explicit entry in the toolholder data block from the part program
● Automatic acceptance of certain values (angles) from a frame
A requirement for this is that TCOFR (Tool Carrier Orientation FRame) is also specified
when the toolholder is selected.
The tool orientation used to calculate the tool length is determined again from the frame
active at this time when a toolholder is changed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1449
Tool Offset (W1)
Toolholder with orientation capability

Orientation in Z direction
The G function TOFRAME defines a frame such that the Z direction in this frame is the same
as the current tool orientation.
If no tool carrier or a tool carrier without change in orientation is active, then the Z direction is
in the new frame:
● The same as the old Z direction with G17
● The same as the old Y direction with G18
● The same as the old X direction with G19.

TCOABS for active frame


The absolute toolholder orientation is set using:
TCOABS (Tool Carrier Orientation ABSolute)
The orientation taken into account for the tool length compensation is independent of the
orientation of the active frame.
Only one of the instructions TCOABS or TCOFR can be valid.

Frame change
The user can change the frame following selection of the tool. This does not have any effect
on the tool length compensation components.
Angles in the toolholder data:
The programmed angles of rotation stored in the toolholder data are not affected by the
angle of rotation defined by the frames. When changing from TCOFR to TCOABS, the original
(programmed) angles of rotation in the toolholder data are reactivated.

Tool compensation types


TRC takes account of the current tool orientation when CUT2D or CUT3DFS is active.
All other tool compensation types
These are all the compensation types of G-code group 22, with the exception of CUT3DC and
CUT3DF. The response remains the same with respect to the plane used for compensation.
This is determined independent of the tool orientation from the active frame.
For CUT2DF and CUT3DFF, the compensation plane used for TRC is determined from the
frame independently of the current tool orientation. The active plane (G17/G18/G19) is
considered.
CUT3DC and CUT3DF
3D tool compensation for circumferential milling
3D tool compensations for face milling with active 5-axis transformation are not affected by
the "Toolholder with orientation capability" function.
The orientation information is determined by the active kinematic 5-axis transformation.

Basic Functions
1450 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Limited toolholder orientation


An alarm is output if an orientation that cannot be reached with the defined toolholder
kinematic is specified by the frame.
The following kinematics cannot achieve any orientation:
● If the two rotary axes, which are necessary to define the kinematic, are not perpendicular
to each other and if the tool axis, which defines the tool direction, does not stand
perpendicular to the second rotary axis
or
● Fewer than two axes have been defined.
Non-rotary toolholders
The tool orientation used internally is dependent only on the basic orientation of the tool and
the active plane (G17 - G19).

Ambiguities
With two axes, a particular tool orientation defined by the frame can generally be set with two
different rotary angle pairs. Of these two, the control selects the setting with which the rotary
angle is as close as possible to the programmed rotary angle.
Storing angles in the toolholder data
In virtually any case where ambiguities may arise, it is necessary to store the approximate
angle expected from the frame in the toolholder data.

Parameter sets
A complete set of parameters for a toolholder with orientation capability consists of 33
values.
The following system variables are available:
● $TC_CARR1 to $TC_CARR33
● In addition, $TC_CARR34 to $TC_CARR65 are freely available for the user and for fine
offsets.
The significance of the individual parameters is distinguished as follows:
Machine kinematics:
$TC_CARR1 to $TC_CARR20 and $TC_CARR23
$TC_CARR18 to $TC_CARR20 define a further vector l4, which is needed to describe the
machine with extended kinematics (both tool and workpiece can be rotated).
$TC_CARR21 and $TC_CARR22 contain the channel-axis identifiers of the rotary axes, the
positions of which can be used to determine the orientation of the toolholder with orientation
capability, if necessary.
Kinematic type:
$TC_CARR23 using letter T, P or M

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1451
Tool Offset (W1)
Toolholder with orientation capability

The following three options are available for the kinematic type, for which both upper and
lower case text are permissible:

T: Only the (Tool) can be rotated (basic value).


P: Only the workpiece (Part) can be rotated.
M: Both tool and workpiece can be rotated (Mixed mode).

Any character other than the three mentioned here will result in the alarm if it is tried to
activate the toolholder with orientation capability:
Alarm "14153 Channel %1 block %2 unknown tool carrier type: %3"
Rotary axis parameters:
$TC_CARR24 to $TC_CARR33
The system variables in $TC_CARR24 to $TC_CARR33 can be used to define offsets, angle
compensations, Hirth tooth system, and axis limits.

Note
The system variables are available with and without active tool management.

Components and presetting of the chain/data block


The values $TC_CARR1 to $TC_CARR20 and $TC_CARR24 to $TC_CARR33 in the
toolholder data block are of NC language format type REAL..
The values $TC_CARR21 and $TC_CARR22 for the axis identifier of the first rotary axis (v1)
and the second rotary axis (v2) are of NC language format type AXIS. They are all preset to
zero.
The value $TC_CARR23 is initialized with the uppercase letter "T" (only tool can be rotated).
$TC_CARRn[m]
$TC_CARR[0]= 0 has a special significance

Basic Functions
1452 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

System variables for toolholders with orientation capability


$TC_CARRn[m]

n: Parameters 1 to 33
m: Number of the tool carrier 1 that can be oriented...Value of the machine data:
MD18088 $MN_MM_NUM_TOOL_CARRIER (Maximum number of definable tool
carriers)

Description NCK variables Language Preassignment


format
x component of offset vector l1 $TC_CARR1 REAL 0
y component of offset vector l1 $TC_CARR2 REAL 0
z component of offset vector l1 $TC_CARR3 REAL 0
x component of offset vector l2 $TC_CARR4 REAL 0
y component of offset vector l2 $TC_CARR5 REAL 0
z component of offset vector l2 $TC_CARR6 REAL 0
x component of rotary axis v1 $TC_CARR7 REAL 0
y component of rotary axis v1 $TC_CARR8 REAL 0
z component of rotary axis v1 $TC_CARR9 REAL 0
x component of rotary axis v2 $TC_CARR10 REAL 0
y component of rotary axis v2 $TC_CARR11 REAL 0
z component of rotary axis v2 $TC_CARR12 REAL 0
Angle of rotation α1 (in degrees) $TC_CARR13 REAL 0
Angle of rotation α2 (in degrees) $TC_CARR14 REAL 0
x component of offset vector l3 $TC_CARR15 REAL 0
y component of offset vector l3 $TC_CARR16 REAL 0
z component of offset vector l3 $TC_CARR17 REAL 0
x component of offset vector l4 $TC_CARR18 REAL 0
y component of offset vector l4 $TC_CARR19 REAL 0
z component of offset vector l4 $TC_CARR20 REAL 0
Axis identifier of the rotary axis v1 $TC_CARR21 AXIS 0
Axis identifier of the rotary axis v2 $TC_CARR22 AXIS 0
Kinematic type $TC_CARR23 CHAR T
Offset of rotary axis v1 $TC_CARR24 REAL 0
Offset of rotary axis v2 $TC_CARR25 REAL 0
Angle offset of rotary axis v1 (Hirth tooth) $TC_CARR26 REAL 0
Angle offset of rotary axis v2 (Hirth tooth) $TC_CARR27 REAL 0
Angle increment of rotary axis v1 (Hirth tooth) $TC_CARR28 REAL 0
Angle increment of rotary axis v2 (Hirth tooth) $TC_CARR29 REAL 0
Minimum position of rotary axis v1 (SW limit) $TC_CARR30 REAL 0
Minimum position of rotary axis v2 (SW limit) $TC_CARR31 REAL 0
Maximum position of rotary axis v1 (SW limit) $TC_CARR32 REAL 0
Maximum position of rotary axis v2 (SW limit) $TC_CARR33 REAL 0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1453
Tool Offset (W1)
Toolholder with orientation capability

System variables for the user and for fine offsets


● $TC_CARR34 to $TC_CARR40
Contain parameters, which are freely available to the user.
● $TC_CARR41 to $TC_CARR65
Contain fine offset parameters that can be added to the values in the basic parameters.
The fine offset value assigned to a basic parameter is obtained when the value 40 is
added to the parameter number.
● $TC_CARR47 to $TC_CARR54 and $TC_CARR61 to $TC_CARR63
Not defined and produce an alarm if read or write access is attempted.

Description NCK variables Language Preassignment


format
Toolholder name * $TC_CARR34 String[32] ""
Axis name 1 ** $TC_CARR35 String[32] ""
Axis name 2 ** $TC_CARR36 String[32] ""
Identifier ** $TC_CARR37 INT 0
Position component X ** $TC_CARR38 REAL 0
Position component Y ** $TC_CARR39 REAL 0
Position component Z ** $TC_CARR40 REAL 0
x comp. fine offset of offset vector l1 $TC_CARR41 REAL 0
y comp. fine offset of offset vector l1 $TC_CARR42 REAL 0
z comp. fine offset of offset vector l1 $TC_CARR43 REAL 0
x comp. fine offset of offset vector l2 $TC_CARR44 REAL 0
y comp. fine offset of offset vector l2 $TC_CARR45 REAL 0
z comp. fine offset of offset vector l2 $TC_CARR46 REAL 0
x comp. fine offset of offset vector l3 $TC_CARR55 REAL 0
y comp. fine offset of offset vector l3 $TC_CARR56 REAL 0
z comp. fine offset of offset vector l3 $TC_CARR57 REAL 0
x comp. fine offset of offset vector l4 $TC_CARR58 REAL 0
y comp. fine offset of offset vector l4 $TC_CARR59 REAL 0
z comp. fine offset of offset vector l4 $TC_CARR60 REAL 0
Offset of fine offset of rotary axis v1 $TC_CARR64 REAL 0
Offset of fine offset of rotary axis v2 $TC_CARR65 REAL 0
Remarks:
* A toolholder with orientation capability cannot subsequently be assigned a number with system
variable $TC_CARR34, only a name.
** System variables $TC_CARR35 to $TC_CARR40 refer to the intended use of the toolholder with
orientation capability within the measuring cycles and can also be used for other purposes.

Basic Functions
1454 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

17.6.2 Kinematic interaction and machine design

Representation of the kinematic chain


The concept of the kinematic chain is used to describe the kinematic interaction between a
reference point and the tool tip.
The chain specifies all the data required for the toolholder data block in a schematic. To
describe the concrete case with a particular kinematic, the relevant components of the chain
must be assigned real vectors, lengths and angles. The chain represents the maximum
constellation. In simpler applications, individual components can be zero (e.g. kinematics
with one or no rotary axis).
The machine does not have to have axes that rotate the tool and/or workpiece table. The
function can be used even if the orientations are set manually by handwheels or
reconfiguration.
The machine design is described by the following parameters:
● Two rotary axes (v1 and v2), each with one angle of rotation (α1 or α2), which counts
positively for clockwise rotation facing the direction of the rotation vector.
● Up to four offset vectors (l1 to l4) for relevant machine dimensions (axis distances,
distances to machine or tool reference points).

Zero vectors
Vectors v1 and v2 can be zero. The associated angle of rotation (explicitly programmed or
calculated from the active frame) must then also be zero, since the direction of the rotating
axis is not defined. If this condition is not satisfied, an alarm is produced when the toolholder
is activated.

Less than two rotating axes


The option not to define a rotating axis makes sense when the toolholder to be described
can only rotate the tool in one plane. A sensible minimum data block may, therefore, contain
only one single entry not equal to 0 in the toolholder data; namely, a value in one of the
components of v1 or v2 for describing a rotating axis parallel to the axis where the angle of
rotation α1 or α2 is determined from one frame.

Further special cases


Vectors v1 and v2 can be colinear. However, the degree of freedom for orientation is lost, i.e.
this type of kinematic is the same as one where only one rotary axis is defined. All possible
orientations lie on one cone sheath. The conical sheath deforms to a straight line if tool
orientation t and v1 or v2 become colinear. Change of orientation is, therefore, not possible in
this special case. The cone sheath deforms to a circular surface (i.e. all orientations are
possible in one plane), if tool orientation t and v1 or v2 are perpendicular to each other.
It is permissible for the two vectors v1 and v2 to be zero. A change in orientation is then no
longer possible. In this special case, any lengths l1 and l2, which are not equal to zero, act as
additional tool length compensations, in which the components in the individual axes are not
affected by changing the plane (G17 - G19).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1455
Tool Offset (W1)
Toolholder with orientation capability

Kinematics data expansions


● Possibility of direct access to existing machine axes in order to define the toolholder
setting via the rotary axis positions.
● Extension of the kinematics with rotary workpiece and on kinematics with rotary tool and
rotary workpiece.
● Possibility to permit only discrete values in a grid for the rotary axis positions (Hirth tooth
system).
The extensions are compatible with earlier software versions and encompass the kinematic
data blocks from $TC_CARR18 to $TC_CARR23.

Machine with rotary tool


On machines with rotary tool there is no change in the definition of the kinematics compared
to older software versions. The newly introduced vector l4, in particular, has no significance.
Should the contents of l4 not be zero, this is ignored.
The term "Toolholder with orientation capability" is actually no longer really appropriate for
the new kinematic types, with which the table can also be rotated, either alone or additionally
to the tool. However, it has been kept for reasons of compatibility.
The kinematic chains used to describe the machine with rotary tool (general case) are shown
in the figure below:

7RROKROGHUUHIHUHQFHSRLQW
O 5HVXOWLQJWRROOHQJWKFRPSHQVDWLRQ

7RROUHIHUHQFH
SRLQW
Y˞
O 7RROOHQJWK
ZHDU
WRROEDVHGLPHQVLRQ
O Y˞

7RRORULHQWDWLRQ

Figure 17-39 Kinematic chain to describe a tool with orientation

Basic Functions
1456 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Vectors, which describe offsets in the rotary head, are positive in the direction from the tool
tip to the reference point of the toolholder.
The following kinematic type is defined for machines with a rotary tool:
$TC_CARR23 using letter T

Machine with rotary workpiece


On machines with rotary workpiece, the vector l1 has no significance. If it contains a value
other than zero, this is ignored.
The kinematic chain for machines with rotary workpiece is shown in the figure below.

5HIHUHQFHSRLQWRI
O WKHWRROWDEOH
O
Y˞

O Y˞

0DFKLQHUHIHUHQFHSRLQW

Figure 17-40 Kinematic chain to describe a rotary table

Vectors, which describe offsets in the rotary table, are positive in the direction from the
machine reference point to the table.
The following kinematic type is defined for machines with a rotary workpiece:
$TC_CARR23 using letter P

Note
On machines with rotary workpiece it is generally useful if the selected machine reference
point and the reference point of the table are identical. Selecting the reference points in this
way has the advantage that the position of the workpiece zero in the initial state (i.e. with
rotary axes not turned) does not change when the rotary table is activated. The (open)
kinematic chain (see figure) is then closed.
In this special case, therefore, the following formula applies: l2 = - (l3 + l4)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1457
Tool Offset (W1)
Toolholder with orientation capability

Machines with extended kinematics


On machines with extended kinematics (both tool and workpiece are rotary), it is only
possible to turn each of the components with one axis.
The kinematic of the rotary tool is described with the first rotary axis (v1) and the two vectors
l1 and l2, that of the rotary table with the second rotary axis (v2) and the two vectors l3 and l4.
The two kinematic chain components for machines with rotary tool and rotary workpiece are
shown in the figure below.

5HIHUHQFHSRLQWRIWKH
WRROKROGHU
O
5HVXOWLQJWRROOHQJWKFRPSHQVDWLRQ
5HIHUHQFHSRLQWRI
WKHWRRO
Y˞ 5HIHUHQFHSRLQWRI
WKHWRROWDEOH
7RROOHQJWK
ZHDU
O WRROEDVHGLPHQVLRQ

Y˞ O

O

7RRORULHQWDWLRQ 0DFKLQHUHIHUHQFHSRLQW

Figure 17-41 Kinematic sequence with extended kinematics

The following kinematic type is defined for machines with a rotary tool and rotary workpiece:
$TC_CARR23 using letter M (extended kinematics)

Note
On machines with extended kinematics it is generally useful, as with machines where only
the table can be rotated, for the machine reference point and the reference point of the table
to be identical. The (open) chain component to describe the table (see figure) is then closed.
In this special case, the following formula applies: l3 = - l4

Rotary tool types T and M


For machine kinematics with a rotary tool (types T and M), the toolholder component with
orientation capability, which describes the tool or head component (as opposed to the table
component), acts, in conjunction with the active tool, as a new overall tool.

Basic Functions
1458 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Fine offset
The offset vectors l1 to l4 and the offsets of the rotary axes v1 and v2 can be represented as
the sum of a basic value and a fine offset. The fine offset parameters assigned to the basic
values are achieved by adding a value of 40 to the index of the basic value.
Example:
The parameter $TC_CARR5 is assigned to the fine offset $TC_CARR45.

Note
For the significance of the system variables $TC_CARR41 to $TC_CARR65 available for the
fine offset see:
References:
/PGA/ Programming Manual Work Preparation; Tool Compensations

Activation
The following setting adds the fine offset values to the basic values:
SD42974 $SC_TOCARR_FINE_CORRECTION = 1 (fine offset TCARR on/off)
Supplementary conditions
The amount is limited to the permissible fine offset.
The maximum permissible value is defined:

For: With machine data:


• The components of vectors l1 to l4: MD20188 $MC_TOCARR_FINE_LIM_LIN
• The offsets of the two rotary axes v1 and v2: MD20190 $MC_TOCARR_FINE_LIM_ROT

An illegal fine offset value is only detected when:


● A toolholder with orientation capability, which contains such a value, is activated
and
● at the same time the following setting data is set:
SD42974 $SC_TOCARR_FINE_CORRECTION

Description of a rotation
A data block for describing a rotation comprises one vector v1 /v2 to describe the direction of
rotation of the rotary axis in its initial state and an angle α1/α2. The angle of rotation is
counted positively for clockwise rotation facing the direction of the rotation vector.
The two toolholder angles α1 and α2 are determined using a frame, independent of the
active plane currently selected (G17 - G19).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1459
Tool Offset (W1)
Toolholder with orientation capability

The tool orientation in the initial state (both angles α1 and α2 are zero) is (as in the default
case):
● G17: Parallel to Z
● G18: Parallel to Y
● for G19: Parallel to X

Assigning data to the toolholder


Example of a machine with rotary toolholder
The following settings are obtained at the mill head shown for a machine with toolholder with
orientation capability of kinematic type T:

Component of the offset vector l1 = (-200, 0, 0)


Component of the offset vector l2 = (0, 0, 0)
Component of offset vector l3 = (-100, 0, 0)
Component of rotary axis v1 = (1, 0, 0)
Component of rotary axis v2 = (-1, 0, 1)
Tool base dimension of tool (0, 0, 250)
reference point

Note
The tool reference point for the tool base dimension is defined by the reference point at the
machine.
For more information about the reference points in the working area, please refer to:
References:
/FB1/ Function Manual Basic Functions; Axes, Coordinate Systems, Frames (K2).

]
\
Y
$[LV

Y 7RROUHIHUHQFHSRLQW
O
O O
$[LV

7RROEDVHGLPHQVLRQ
7RROFDUULHUUHIHUHQFHSRLQW
PP

/HQJWK:HDU

5HVXOWLQJWRROOHQJWKFRPSHQVDWLRQ

Figure 17-42 Assignment of the toolholder data

Basic Functions
1460 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Suitable assumptions were made for the following values in the data block:
● The two rotary axes intersect at one point.
All components of l2 are therefore zero.
● The first rotary axis lies in the x/z plane, the second rotary axis is parallel to the x axis.
These conditions define the directions of v1 and v2 (the lengths are irrelevant, provided
that they are not equal to zero).
● The reference point of the toolholder lies 200 mm in the negative x direction viewed from
the intersection of the two rotary axes.
This condition defines l1.

Specify associated data block values


The following associated data block values are specified for the toolholder shown on a
machine with rotary toolholder:

Description NCK variables Value


x component of offset vector l1 $TC_CARR1 - 200
y component of offset vector l1 $TC_CARR2 0
z component of offset vector l1 $TC_CARR3 0
x component of offset vector l2 $TC_CARR4 0
y component of offset vector l2 $TC_CARR5 0
z component of offset vector l2 $TC_CARR6 0
x component of rotary axis v1 $TC_CARR7 1
y component of rotary axis v1 $TC_CARR8 0
z component of rotary axis v1 $TC_CARR9 0
x component of rotary axis v2 $TC_CARR10 -1
y component of rotary axis v2 $TC_CARR11 0
z component of rotary axis v2 $TC_CARR12 1
Angle of rotation α1 (in degrees) $TC_CARR13 0
Angle of rotation α2 (in degrees) $TC_CARR14 0
x component of offset vector l3 $TC_CARR15 -100
y component of offset vector l3 $TC_CARR16 0
z component of offset vector l3 $TC_CARR17 0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1461
Tool Offset (W1)
Toolholder with orientation capability

Explanation
The toolholder kinematic chosen in the example is such that the two rotary axes form an
angle of 45 degrees, which means that the orientation cannot take just any value. In
concrete terms, this example does not permit the display of orientations with negative X
components.

x component of the tool base dimension: 0


y component of the tool base dimension: 0
z component of the tool base dimension: 250

Note
The required data cannot be determined unequivocally from the geometry of the toolholder,
i.e. the user is free to a certain extent to decide the data to be stored. Thus, for the example,
it is possible to specify only one z component for the tool base dimension up to the second
axis. In this case, l2 would no longer be zero, but would contain the components of the
distance between this point on the second axis and a further point on the first axis. The point
on the first axis can also be selected freely. Depending on the point selected, l1 must be
selected such that the reference point (which can also be selected freely) is reached.
In general: vector components that are not changed by rotation of an axis can be distributed
over any vectors "before" and "after" rotation.

17.6.3 Oblique machining with 3 + 2 axes

Description of function
Inclined machining with 3 + 2 axes describes an extension of the concept of toolholders with
orientation capability and applies this concept to machines with a rotary table, on which the
orientation of tool and table can be changed simultaneously.
The "Inclined machining with 3 + 2 axes" function is used to machine surfaces with any
rotation with reference to the main planes X/Y (G17), Z/X (G18) and Y/Z (G19).
It is possible to produce any orientation of the tool relative to the workpiece by rotating either
the tool, the workpiece or both the tool and the workpiece.
The software automatically calculates the necessary compensating movements resulting
from the tool lengths, lever arms and the angle of the rotary axis. It is always assumed that
the required orientation is set first and not modified during a machining process such as
pocket milling on an inclined plane.

Basic Functions
1462 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Furthermore, the following 3 functions are described, which are required for oblique
machining:
● Position programming in the direction of the tool orientation independent of an active
frame
● Definition of a frame rotation by specifying the solid angle
● Definition of the component of rotation in tool direction in the programmed frame while
maintaining the remaining frame components

Demarcation to 5-axis transformation


If the required functionality specifies that the TCP (Tool Center Point) does not vary in the
event of reorientation with reference to the workpiece, even during interpolation, the 5-axis
software is required.
For more explanations on 5-axis transformations, see:
References:
/FB3/ Function Manual, Special Functions; 3- to 5-Axis Transformation (F2)

Specification of the toolholder with orientation capability


The toolholder with orientation capability is represented by a general 5-axis kinematic
sequence described by a data block in the tool compensation memory with a total of 33
REAL values. For toolholders that have two rotary axes for setting the orientation (e.g. a
millhead), 31 of these values are constant.
In the current SW version, a data block in the tool compensation memory is described with a
total of 47 REAL values. For toolholders that have two rotary axes for setting the orientation,
45 of these values are constant.
The remaining two values are variable and are used to specify the orientation. The constant
values describe offsets and directions and setting options for the rotary axes; the variable
values describe the angles of the rotary axes.

17.6.4 Machine with rotary work table

System variables
To date, the angles stored in $TC_CARR13 and $TC_CARR14 were used for the calculation
of the active tool length with TCOABS. This still applies if $TC_CARR21 and $TC_CARR22
do not refer to rotary axes. If $TC_CARR21 or $TC_CARR22 contains a reference to a rotary
axis in the channel, the axis position of the relevant axis at the start of the current block is
used as the angle, rather than the entry in $TC_CARR13 or $TC_CARR14.
A mixed operating mode is permissible, i.e. the angles can be determined from the entry in
the system variables $TC_CARR13 or $TC_CARR14 for one axis, and from the position of a
channel axis for the other.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1463
Tool Offset (W1)
Toolholder with orientation capability

This makes it possible for machines, on which the axes used to set the toolholder with
orientation capability are known within the NC, to access their position directly, whereas it
was previously necessary, for example, to read system variable $AA_IM[axis] and write the
result of the read operation to $TC_CARR13/14. In particular, this removes the implicit
preprocessing stop when reading the axis positions.

MD20180
The rotary axis position is used with its programmed or calculated value, when the machine
data:
MD20180 $MC_TOCARR_ROT_ANGLE_INCR[i] = 0 (Rotary axis increment of the tool
carrier that can be oriented)
If the machine data is not zero however, the position used is the nearest grid point obtained
for a suitable integer value n from the equation:
φ = $MC_TOCARR_ROT_ANGLE_OFFSET[i] + n * $MC_TOCARR_ROT_ANGLE_INCR[i]
This functionality is required if the rotary axes need to be indexed and cannot, therefore,
assume freely-defined positions (e.g. with Hirth tooth systems). System variable
$P_TCANG[i] delivers the approximated valued and system variable $P_TCDIFF[i] the
difference between the exact and the approximated value.

Frame orientation TCOFR


With TCOFR (determination of the angle from the orientation defined by an active frame), the
increments are scaled after determination of the angle from the active frame rotation. If the
requested orientation is not possible due to the machine kinematic, the machining is aborted
with an alarm. This also applies if the target orientation is very close to an achievable
orientation. In particular the alarm in such situations cannot be prevented through the angle
approximation.

TCARR frame offset


A frame offset as a result of a toolholder change becomes effective immediately on selection
of TCARR=.... A change in the tool length, on the other hand, only becomes effective
immediately if a tool is active.

TCOFR/TCOABS frame rotation


A frame rotation does not take place on activation and a rotation, which is already active, is
not changed. As in case T (only the tool can be rotated), the position of the rotary axes used
for the calculation is dependent on the G code TCOFR/TCOABS and determined from the
rotation component of an active frame or from the entries $TC_CARRn.

Basic Functions
1464 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Activation of a frame changes the position in the workpiece coordinate system accordingly,
without compensating movement by the machine itself. The ratios are shown in the figure
below:

2ULJLQDOSRVLWLRQRI
WKHFRRUGLQDWH
V\VWHP 2ULJLQDOSRVLWLRQRIWDEOH

= )UDPHRIIVHW
3RVLWLRQRIFRRUGLQDWHV\VWHP
=
DIWHU3$527
;
=
3RVLWLRQRIFRRUGLQDWHV\VWHP
DIWHU7&$55
;

3RVLWLRQRIWDEOHDIWHUURWDWLRQ

Figure 17-43 Zero offset on activation of a rotary table with TCARR

Example
On the machine in the figure, the rotary axis of the table is pointing in the positive Y direction.
The table is rotated by +45 degrees. PAROT defines a frame, which similarly describes a
rotation of 45 degrees about the Y axis. The coordinate system is not rotated relative to the
actual environment (marked in the figure with "Position of the coordinate system after
TCARR"), but is rotated by -45 degrees relative to the defined coordinate system (position
after PAROT). If this coordinate system is defined with ROT Y-45, for example, and if the
toolholder is then selected with active TCOFR, an angle of +45 degrees will be determined for
the rotary axis of the toolholder.

Rotary table
With rotary tables (kinematic types P and M), activation with TCARR similarly does not lead to
an immediate rotation of the coordinate system (see figure), i.e. even though the zero point
of the coordinate system is offset relative to the machine, while remaining fixed relative to
the zero point of the workpiece, the orientation remains unchanged in space.

Activation of kinematic types P and M


With kinematics of type P and M the selection of a toolholder activates an additive frame
(table offset of the toolholder with orientation capability), which takes into account the zero
point offset as a result of the rotation of the table.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1465
Tool Offset (W1)
Toolholder with orientation capability

The zero offset can be written to a dedicated system frame $P_PARTFR. For this, the bit 2
must be set in the machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK (System frames (SRAM))
The basic frame identified by following machine data is then no longer required for the zero
offset:
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER (Number of the basic frames for taking
the table offset)

Activation of kinematic type M


With kinematics of type M (tool and table are each rotary around one axis), the activation of
a toolholder with TCARR simultaneously produces a corresponding change in the effective
tool length (if a tool is active) and the zero offset.

Rotations
Depending on the machining task, it is necessary to take into account not only a zero offset
(whether as frame or as tool length) when using a rotary toolholder or table, but also a
rotation. However, the activation of a toolholder with orientation capability never leads
directly to a rotation of the coordinate system.

TOROT
If only the tool can be rotated, a frame whose Z axis points in the direction of the tool can be
defined with TOFRAME or TOROT.

PAROT
If the coordinate system needs to be fixed relative to the workpiece, i.e. not only offset
relative to the original position but also rotated according to the rotation of the table, then
PAROT can be used to activate such a rotation in a similar manner to the situation with a
rotary tool.
With PAROT, the translations, scalings and mirrorings in the active frame are retained, but
the rotation component is rotated by the rotation component of a toolholder with orientation
capability corresponding to the table.
PAROT and TOROT take into account the overall change in orientation in cases where the
table or the tool are oriented with two rotary axes. With mixed kinematics only the
corresponding component caused by a rotary axis is considered. It is thus possible, for
example, when using TOROT, to rotate a workpiece such that an oblique plane lies parallel to
the X-Y plane fixed in space, whereby rotation of the tool must be taken into account in
machining where any holes to be drilled, for example, are not perpendicular to this plane.

Basic Functions
1466 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Language command PAROT is not rejected if no toolholder with orientation capability is


active. This causes no changes in the programmed frame.

Note
For more information about the TCARR and TOROT functions, as well as PAROT in relation to
channel-specific system frames, please refer to:
References:
/FB1/ Function Manual, Basic Functions; Axes, Coordinate systems, Frames (K2).

17.6.5 Procedure when using toolholders with orientation capability

Creating a toolholder
The number of available toolholder data sets in the NCK is defined with machine data:
MD18088 $MN_MM_NUM_TOOL_CARRIER (Maximum number of definable tool carriers)
1. The value is calculated as follows:
MD18088 = "Number of TO units" * "Number of tool holder data sets of a TO unit"
MD18088/"number of TO units" is permanently allocated to each TO unit.

Note
For further explanations on the definition and assignment of a TO unit by machine data:
MD28085 $MC_MM_LINK_TOA_UNIT (Assignment of a TO unit to a channel (SRAM))
References:
/FB/ Function Manual for Extended Functions; Memory Configurations (S7)

2. Zero setting of toolholder data:


You can use the command$TC_CARR1[0] = 0 to zero all values of all data sets.
Individual toolholder data sets can be deleted selectively with the NC command DELTC or
the PI service _N_DELTCAR.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1467
Tool Offset (W1)
Toolholder with orientation capability

3. Accessing the data of a toolholder:


– Part program
→ $TC_CARRn[m] = value
This describes the previous value of the system variables n for toolholder m with the
new value "value".
→ value = $TC_CARRn[m]
With "def real value" - the parameters of a toolholder m can be read if they have
already been defined (e.g. set MD18088). Otherwise, an alarm is signaled.
– OPI interface
The parameters of a toolholder with orientation capability can be read and written with the
NCK-HMI (OPI) variable services using system variable $P_TCANG[<n>].
4. Data backup:
The system variables specified above are saved as part of the general NCK data backup.

Selecting the toolholder


A tool holder with number m is selected with the TCARR = m NC program command
(TCARRTool Carrier).
TCARR = 0 deselects an active toolholder.
New tool or new toolholder
When a new tool is activated, it is always treated as if it was mounted on the active
toolholder.
A new toolholder is activated immediately when it is programmed. It is not necessary to
change tools or reprogram the active tool. The toolholder (number) and tool (number) are
independent and can be used in any combination.

Toolholder from G code of group 42


Absolute tool orientation TCOABS (Tool Carrier Orientation ABSolute):
Tool orientation is determined explicitly if the corresponding values are entered in system
variable $TC_CARR13 or $TC_CARR14 and G code TCOABS is activated in G-code group 42.
Frame tool orientation TCOFR (Tool Carrier Orientation FRame):
Tool orientation can also be determined automatically from the current orientation of an
active frame when selecting a tool, if one of the following G codes is active in G-code group
42 when the toolholder is selected:
● TCOFR or TCOFRZ
The toolholder with orientation capability is set so that the tool points in the Z direction.
● TCOFRX
The toolholder with orientation capability is set so that the tool points in the X direction.
● TCOFRY
The toolholder with orientation capability is set so that the tool points in the Y direction.

Basic Functions
1468 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

The effect of TCOFR is such that, when machining on an inclined surface, tool
compensations are considered implicitly as if the tool were standing vertically on the surface.

Note
The tool orientation is not bound strictly to the frame orientation. When a frame is active and
G code TCOABS is active, you can select a tool, whereby the orientation of the tool is
independent of the orientation of the active frame.
Following tool selection, you can change the frame, which does not affect the components of
tool length compensation. It is then no longer certain that the tool is positioned perpendicular
to the machining plane. You should therefore first check that the intended tool orientation is
maintained on an inclined surface.
When TCOFR, etc., is active, the tool orientation used in the tool length calculation is always
determined from the active frame each time the toolholder is changed.

Toolholder from G code of group 53


The G codes of group 53 (TOFRAME, TOROT, etc.) can be used to define a frame such that
an axis direction (Z, Y or X) in this frame is equal to the current tool orientation.
The G code of group 6 (G17 - G19), which is active at the time TOFRAME is called,
determines the tool orientation.
If no toolholder is active, or if a toolholder is active but does not cause the tool orientation to
change, the Z direction in the new frame is:
● The same as the old Z direction with G17
● The same as the old Y direction with G18
● The same as the old X direction with G19.
These directions are modified accordingly for rotating toolholders. The same applies to the
new X and Y directions.
Instead of TOFRAME or TOROT, one of the G codes TOFRAMEX, TOFRAMEY, TOROTX, or
TOROTY can be used. The meanings of the axes are interchanged accordingly.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1469
Tool Offset (W1)
Toolholder with orientation capability

Group change
Changing the G code from group 42 (TCOABS, TCOFR, etc.) causes recalculation of the tool
length components.
The (programmed) angles of rotation stored in the toolholder data are not affected, with the
result that the angles originally stored in the toolholder data are reactivated on a change
from TCOFR to TCOABS.
Read rotary angle (α1 or α2):
The angles currently used to calculate the orientation can be read via system variable
$P_TCANG[n] where n = 1 or n = 2.
If two permissible solutions (i.e. a second valid pair of angles) are available for a particular
orientation, the values can be accessed with $P_TCANG[3] or $P_TCANG[4]. The number of
valid solutions 0 to 2 can be read with $P_TCSOL.
Tool radius compensation with CUT2D or CUT3DFS:
The current tool orientation is included in the tool radius compensation if either CUT2D or
CUT3DFS is active in G-code group 22 (tool compensation type).
For non-rotating toolholders, the behavior depends solely on the active plane of G code
group 6 (G17 - G19) and is, therefore, identical to the previous behavior.
All other tool compensation types:
The behavior for all other tool compensation types is unchanged.
For CUT2DF and CUT3DFF in particular, the compensation plane used for TRC is determined
from the active frame, independent of the current tool orientation. Allowance is made for the
active plane (G17 - G19) and the behavior is, therefore, the same as before.
The two remaining G codes of group 22, CUT3DC and CUT3DF, are not affected by the
toolholder functionality because the tool orientation information in these cases is made
available by the active kinematic transformation.

Two rotary axes


Two general solutions exist for two rotary axes. The control itself chooses these two solution
pairs such that the orientation angles resulting from the frame are as close as possible to the
specified angles.
The two following options are available for specifying the angles:
1. If $TC_CARR21 or $TC_CARR22 contains a reference to a rotary axis, the position of
this axis at the start of the block in which the toolholder is activated is used to specify the
angle.
2. If $TC_CARR21 or $TC_CARR22 does not contain a reference to a rotary axis, the
values contained in $TC_CARR13 or $TC_CARR14 are used.

Example
The control first calculates an angle of 10 degrees for one axis. The specified angle is
750 degrees. 720 degrees (= 2 * 360 degrees) are then added to the initial angle, yielding a
final angle of 730 degrees.

Basic Functions
1470 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Rotary axis offset


Rotary axis offsets can be specified with system variables $TC_CARR24 and $TC_CARR25.
A value not equal to zero in one of these parameters means that the initial state of the
associated rotary axis is the position specified by the parameter (and not position zero).
All angle specifications then refer to the coordinate system displaced by this value.
When the machining plane is changed (G17 - G19), only the tool length components of the
active tool are interchanged. The components of the toolholder are not interchanged.
The resulting tool length vector is then rotated in accordance with the current toolholder and,
if necessary, modified by the offsets belonging to the toolholder.
The two toolholder angles α1and α2 are determined using a frame, independent of the active
plane currently selected (G17 - G19).

Limit values
Limit angles (software limits) can be specified for each rotary axis in the system variable set
($TC_CARR30 to $TC_CARR33) used to describe the toolholder with orientation capability.
These limits are not evaluated if both the minimum and maximum value is zero.
If at least one of the two limits is not equal to zero, the system checks whether the previously
calculated solution is within the permissible limits. If this is not the case, an initial attempt is
made to reach a valid setting by adding or subtracting multiples of 360 degrees to or from
the invalid axis position. If this is impossible and two different solutions exist, the first solution
is discarded and the second solution is used. The second solution is treated the same as the
first with reference to the axis limits.
If the first solution is discarded and the second used instead, the contents of $P_TCANG[1/2]
and $P_TCANG[3/4] are swapped, hence the solution actually used is also stored in
$P_TCANG[1/2] in this case.
The axis limits are monitored even if the axis angle is specified instead of being calculated.
This is the case if TCOABS is active when a toolholder with orientation capability is activated.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1471
Tool Offset (W1)
Toolholder with orientation capability

17.6.6 Programming

Tool holder selection


A toolholder is selected with the number m of the toolholder with:
TCARR = m

Access to toolholder data blocks


The following access is possible from the part program:
The current value of the parameter n for the tool holder m is written with the new "value"
with:
$TC_CARRn[m] = value
The parameters of a tool holder m can, as far as the toolholder data set is already defined,
read with:
value = $TC_CARRn[m] (Value must be a REAL variable)
The toolholder dataset number must lie in the range, which is defined by the machine data:
MD18088 $MN_MM_NUM_TOOL_CARRIER (Total number of toolholder datasets that can
be defined)
This number of toolholder data sets, divided by the number of active channels, can be
defined for a channel.
Exception:
If settings, which deviate from the standard, are selected via the machine data:
MD28085 $MC_MM_LINK_TOA_UNIT (Assignment of TO unit to a channel).

Canceling all toolholder data blocks


All values of all toolholder data sets can be deleted from within the part program using one
command.
$TC_CARR1[0] = 0
Values not set by the user are preset to 0.

Basic Functions
1472 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Activation
A toolholder becomes active when both a toolholder and a tool have been activated. The
selection of the toolholder alone has no effect. The effect of selecting a toolholder depends
on the G code TCOABS/TCOFR (modal G-code group for toolholders).
Changing the G code in the TCOABS/TCOFR group causes recalculation of the tool length
components when the toolholder is active. With TCOABS, the values stored in the toolholder
data for both angles of rotation α1 and α2 are used to determine the tool orientation.
With TCOFR, the two angles are determined from the current frame. The values stored in the
toolholder data are not changed, however. These are also used to resolve the ambiguity that
can result when the angle of rotation is calculated from one frame. Here, the angle that
deviates least from the programmed angle is selected from the various possible angles.

Note
For more explanations on the programming of tool compensations with toolholder kinematic
and for the system variables see:
References:
/PGA/ Programming Manual Work Preparation

17.6.7 Supplementary conditions and control system response for orientation

Full orientation
For a given data set that describes a certain kinematic, all the conceivable special
orientations can only be displayed when the following conditions are satisfied:
● The two vectors v1 and v2, that describe the rotary axes, must be defined (i.e. must not be
equal to zero).
● The two vectors v1 and v2 must be perpendicular to each other.
● The tool orientation must be perpendicular to the second rotary axis.

Non-defined orientation
If these conditions are not satisfied and an orientation that cannot be achieved by an active
frame is requested with TCOFR, an alarm is output.
Vector/angle of rotation dependencies
If vector v1 or v2, which describes the direction of a rotary axis, is set to zero, the associated
angle of rotation α1 or α2 must also be set to zero. Otherwise, an alarm is produced. The
alarm is not output until the toolholder is activated, i.e. when the toolholder is changed.
Tool fine compensation combined with orientation
Tool fine compensations and toolholders cannot be combined. The activation of tool fine
compensation when a toolholder is active, and vice versa the activation of the toolholder
when tool fine compensation is active, produces an alarm.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1473
Tool Offset (W1)
Toolholder with orientation capability

Automatic toolholder selection, RESET


For RESET or at program start, a toolholder can be selected automatically via the machine
data:
MD20126 $MC_TOOL_CARRIER_RESET_VALUE (Active toolholder at RESET)
It is handled similar to the controlled selection of a tool via the machine data:
MD20120 $MC_TOOL_RESET_VALUE (Tool length compensation Power up
(RESET/TP end))
The behavior at RESET or at program start is controlled as in the case of tool selection via
the same bit 6 in the machine data:
MD20110 $MC_RESET_MODE_MASK (definition of initial control settings after
RESET/TP end)
Or:
MD20112 $MC_START_MODE_MASK (definition of initial control system settings at NC-
START)
References:
/FB1/ Function Manual Basic Functions; Mode Group, Channel, Program Operation, Reset
Response (K1)
SW 6.3 and higher
If TCOABS was active for the last selection before reset, the behavior is unchanged
compared to previous versions. A different active G code causes the toolholder with
orientation capability to be activated with the frame that was active before the last reset.
Modified toolholder data ($TC_CARR...) are also considered. If these data are unchanged,
the toolholder is activated in exactly the same state as before reset. If the toolholder data
were changed after the toolholder selection before reset, selection corresponding to the last
frame is not always possible. In this case, the toolholder with orientation capability is
selected according to the G-Code (group 42) values valid at this time and the active frame.

MD22530 output of auxiliary functions to PLC


That, optionally, a constant or an M code is output when the toolholder is selected, whose
number of the code is derived from the toolholder number. Can be set with the machine
data:
MD22530 $MC_TOCARR_CHANGE_M_CODE (M-Code at toolholder change)
References:
/FB1/ Function Manual Basic Functions; Output of Auxiliary Functions to PLC (H2)

Basic Functions
1474 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Toolholder with orientation capability

Toolholder kinematics
The following supplementary conditions must be met for toolholder kinematics:
● Tool orientation in initial state, both angles α1 and α2 zero, as per default setting, even if:
– G17 parallel to Z
– G18 Parallel to Y
– G19 parallel to Z
● A permissible position in terms of the axis limits must be achievable.
● For any possible orientation to be set, the two rotary axes must be perpendicular to each
other.
For machines, on which the table is rotated by both axes, the tool orientation must also
be perpendicular to the first rotary axis.
For machines with mixed kinematics, the tool orientation must be perpendicular to the
axis, which rotates the tool, i.e. also the first rotary axis.
The following applies to orientations specified in a frame:
● The orientation specified in a frame must be achievable with the defined toolholder
kinematics, otherwise an alarm is output.
This situation can occur if the two rotary axes required to define the kinematics are not
perpendicular to each other.
This applies if fewer than two rotary axes are defined and is the case:
– With kinematic type T with rotary tool, if the tool axis, which defines the tool direction,
is not perpendicular to the second axis.
– With kinematic types M and P with rotary workpiece, if the tool axis, which defines the
tool direction, is not perpendicular to the first axis.
● Rotary axes, which require a frame with a defined tool orientation in order to reach a
specific position, are only determined unambiguously in the case of one rotary axis. Two
general solutions exist for two rotary axes.
● In all cases where ambiguities may arise, it is particularly important that the approximate
angles expected from the frame are stored in the tool data, and that the rotary axes are in
the vicinity of the expected positions.

Response with ASUP, REPOS


The toolholder can be changed in an asynchronous subprogram (ASUB). When the
interrupted program is resumed with REPOS, the approach motion of the new toolholder is
taken into account and the program continues with this motion. The treatment here is
analogous to tool change in an ASUB.
References:
/FB1/ Function Manual Basic Functions; Mode Group, Channel, Program Operation, Reset
Response (K1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1475
Tool Offset (W1)
Cutting data modification for tools that can be rotated

17.7 Cutting data modification for tools that can be rotated

17.7.1 Function
Using the function "cutting data modification for rotatable tools", the changed geometrical
relationships, that are obtained relative to the workpiece being machined when rotating tools
(predominantly turning tools, but also drilling and milling tools) can be taken into account.

17.7.2 Determination of angle of rotation


The actual rotation of the tool is always determined from a currently active, orientable
toolholder (refer to Chapter "Tool Holder with Orientation Capacity").
The angle of rotation of the tool holder with orientation capacity is normally (but not
necessarily) defined with theTCOFR command from an active frame. This method can be
used to define the tool orientation independently of the actual kinematics with which the tool
is rotated, identically in each case with the help of two angles.
The two machine-independent orientation angles β (Beta) and γ (Gamma) are used to define
the tool rotation. β is the angle of rotation and the applicate (typically a B axis in G18) and γ a
rotation around the ordinate (Typically a C axis in G18). The rotation is first executed around
Y, finally around β, i.e. the y axis is rotated by the β axis:

Basic Functions
1476 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Cutting data modification for tools that can be rotated

ˠ
˟

17.7.3 Cutting edge position, cut direction and angle for rotary tools

Turning tools
Turning tools means the following tools whose tool type ($TC_DP1) has values in the range
of 500 to 599. Grinding tools (tool types 400 to 499) are equivalent to turning tools.
Tools are treated independently of tool type such as turning tools if:
SD42950 $SC_TOOL_LENGTH_TYPE = 2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1477
Tool Offset (W1)
Cutting data modification for tools that can be rotated

Cutting edge position and cut direction


Turning tools are limited by their main and secondary cutting edges. The tool parameter
"Cutting edge position" is defined via the position of these two cutting edges relative to the
coordinate axes. The ratios are displayed with diagram in the following figure:

/HQJWKRIFXWWLQJHGJH &XWGLUHFWLRQ

  

;   

  

  
=

Figure 17-44 Cutting edge position and cut direction for turning tools

The values 1 to 4 characterize the cases in which both cutting edges lie in the same
quadrant; the values 5 to 8 characterize the cases in which both cutting edges lie in
neighboring quadrants or there is a coordinate axis between the two cutting edges. The
cutting edge position is stored in the tool parameter $TC_DP2.
A cut direction can be defined for each turning tool. It is stored in the tool parameter
$TC_DP11. It has values between 1 and 4, and it characterizes a positive or negative
direction of the coordinate axes:

Value: Meaning:
1 Ordinate -
2 Ordinate +
3 Abscissa -
4 Abscissa +
Two different cut directions can be assigned to each cutting edge position:

Cutting edge position: 1 2 3 4 5 6 7 8


Cut direction: 2, 4 2, 3 1, 3 1, 4 1, 2 3, 4 1, 2 3, 4

Basic Functions
1478 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Cutting data modification for tools that can be rotated

Holder angle and clearance angle


The following figure depicts the two angles (holder angle and clearance angle) of a turning
tool with cutting edge position 3, that are necessary for describing the geometry of the tool
cutting edge. The cut direction in this example is 3, i.e. it denotes the negative Z direction
(abscissa direction for G18).

; 3ODWHDQJOH rKROGHUDQJOHIUHHDQJOH

+ROGHUDQJOH 7&B'3

)UHHDQJOH 7&B'3

&XWGLUHFWLRQ =

Figure 17-45 Angle and cut direction for a turning tool with cutting edge position 3

The cut direction specifies the reference direction of the holder angle. The clearance angle is
the angle measured between the inverse cut direction and the adjacent cutting edge
(positive). Holder angle and clearance angle are stored in the tool parameters $TC_DP10 or
$TC_DP24.

Note
Cut direction and tool angle are relevant only in the cutting edge positions 1 to 8.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1479
Tool Offset (W1)
Cutting data modification for tools that can be rotated

17.7.4 Modifications during the rotation of turning tools

Tool orientation
Unlike milling tools, turning tools are not rotation-symmetric. This means that normally 3
degrees of freedom or three rotary axes are required to describe the tool orientation. The
concrete kinematics therefore, is independent of the machine only to the extent the desired
orientation can be set. If necessary, the third degree of freedom can be substituted by a
rotation of the tool coordinate system.

Note
The division of the orientation into one portion created by the tool holder with orientation
capacity, and a second portion achieved via a rotation of the coordinate system is the
responsibility of the application. The control does not provide any further functionality in this
regard.

Shape of cutting edge


If a turning tool turns by an angle against the machining plane (i.e. around an axis in the
machining plane, typically a C axis) that is not a multiple of 180°, then the configuration of
the (circular) tool cutting edge in the machining plane becomes an ellipse. It is assumed that
the deviations from the circular form arising on account of such rotations is so insignificant
that they can be ignored (tilt angle < 5°), i.e. the control always ignores the tool orientation
and assumes a circular cutting edge.
This also means that with reference to the active plane, the control accepts only a rotation by
180° as a setting deviating from the initial position. This limitation is valid for the shape of
cutting edge only. The tool lengths are always considered correctly in random spatial
rotations.

Cutting edge position, cut direction and angle


A rotation by 180° around an axis in the machining plane means that while using the tool at
the same position, the spindle rotation direction with reference to the use of the unturned tool
must be inverted.
Cut direction and cutting edge position are also not modified like the cutting edge reference
point (see below) if the tool is rotated from the plane by +/- 90° (with a tolerance of app. 1°)
because then the configuration of the cutting edge is not defined in the current plane.
If the tool rotates in the plane (rotation around an axis vertical to the machining place or
around the Y axis for G18), the cutting edge position is determined from the resulting angle
for the clearance and holder angles. If these two angles are not specified for the tool (i.e.
$TC_DP10 and $TC_DP24 are both zero), then the new cutting edge position is determined
from the turning angle alone. The cutting edge position changes only in 90° steps, i.e. the
cutting edge position remains independent of the initial state either in the value range 1 to 4
or 5 to 8. The new cutting edge position is then determined exclusively from the angle of
rotation if the specified values for holder angle and clearance angle are not allowed
(negative values, resulting plate angle negative or more than 90°). Clearance angle and
holder angle are not modified in all these cases.

Basic Functions
1480 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Cutting data modification for tools that can be rotated

Depending on the rotation, the cut direction is modified in such a way that the resulting
clearance angle remains less than 90°. If the original cut direction and the original cutting
edge position do not fit together (refer to "Cutting edge position, cut direction and angle for
turning tools"), then the cut direction is not modified during rotation of the tool.
The angle of rotation in the plane, as it was determined from the tool holder with orientation
capacity, is available in the system variable $P_CUTMOD_ANG or $AC_CUTMOD_ANG.
This angle is the original angle without any final rounding to multiples of 45° or 90°.
Limit cases
If, for a turning tool, the cutting edge position, cut direction , clearance and holder angles
have valid values so that all cutting edge positions (1 to 8) are possible through suitable
rotations in the plane, then the cutting edge positions 1 to 4 are preferred to cutting edge
positions 5 to 8 in the cases in which one of the cutting edges (main or secondary cutting
edge) is away from the coordinate axis by less than half the input increment ((0.0005° for an
input specification of 3 decimal digits).
The following is applicable in all other cases (milling tools or turning tools without valid
cutting edge parameters) in which rotation is possible only in 90° steps: If the amount of the
rotation angle is smaller than 45° + 0.5 input increments (corresponds to 45.0005° for an
input specification of 3 decimal points), the cutting edge position and cut direction are not
changed, i.e. these cases are treated as rotations that are smaller than 45°. Rotations, the
amount of which deviates from 180° by less than 45° + 0.5 input increments are treated
identically as rotations in the range of 135° to 225°.

Cutting edge reference point


The cutting edge center point and the cutting edge reference point are defined for turning
tools. The position of these two points relative to each other is defined by the cutting edge
position.
The distance of the two points for cutting edge positions 1 to 4 is equal to √2 times the
cutting edge radius; for cutting edge positions 5 to 8 it is equal to 1 times the cutting edge
radius. In the first case, the cutting edge reference point relative to the cutting edge center
point lies in the machining plane on a bisecting line, while in the second case it lies on a
coordinate axis.
If your rotate the tool by a random angle around an axis vertical to the machining plane, the
the cutting edge reference point would also rotate if it had a fixed position relative to the tool.
The above-mentioned condition (position on an axis or a bisecting axis) is not fulfilled in most
cases. This is not desirable. Instead, the cutting edge reference point should always be
modified in such a way that the distance vector between cutting edge reference point and
cutting edge center point has one of the mentioned 8 directions. The cutting edge position
must be modified for this if necessary.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1481
Tool Offset (W1)
Cutting data modification for tools that can be rotated

The ratios are shown with examples in the figure below:

QHZFXWWLQJHGJHUHIHUHQFHSRLQW

6/

6/
FXWWLQJHGJHUHIHUHQFHSRLQW
6/

ROGFXWWLQJUHIHUHQFHSRLQW

Figure 17-46 Cutting edge reference point and cutting edge position (SL) for tool rotation

A tool with the cutting edge position 3, the clearance angle 22.5° and holder angle 112.5° is
rotated. For rotations up to 22.5°, the cutting edge position is maintained, the position of the
cutting edge reference point relative to the tool however, is compensated in such a way that
the relative position of both points are maintained in the machining plane. For bigger
rotations (up to 67.5°), the cutting edge position changes to value 8.

Note
As the cutting edge reference point is defined by the tool length vector, modifying the cutting
edge reference point changes the effective tool length.

17.7.5 Cutting edge position for milling and tapping tools

Milling and tapping tools


Milling and tapping tools means the following tools whose tool type ($TC_DP1) has values in
the range of 100 to 299.
Tools are treated independently of tool type such as milling and tapping tools if:
SD42950 $SC_TOOL_LENGTH_TYPE = 1

Length of cutting edge


A cutting edge position is also introduced for the so defined milling and tapping tools which is
modified according to the following description, in case of rotations.

Basic Functions
1482 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Cutting data modification for tools that can be rotated

Any specified cutting edge position for tools that are not milling and tapping tools or turning
tools according to the mentioned definitions, is not evaluated.
The cutting edge position of the tapping and milling tools is stored in tool parameter
$TC_DP2 as in the case of turning tools. Based on the definition of the cutting edge position
for turning tools, this parameter can assume the values 5 to 8. Here, the cutting edge
position specifies the orientation (the direction of the rotation axis) of the tool:

Length of cutting edge Direction of rotation axis of tool


5 Abscissa +
6 Ordinate +
7 Abscissa -
8 Ordinate -
Example:

Figure 17-47 Milling tool with cutting edge position 7

17.7.6 Modifications during rotation of milling and tapping tools


The cutting edge position is recalculated appropriately during a rotation of a milling or
tapping tool. Cut direction and tool angle (clearance angle or holder angle) are not defined
for milling and tapping tools so that the change in cutting edge position is derived exclusively
from the rotation. Thus, for milling and tapping tools, the cutting edge position always
changes when the amount of rotation with reference to the zero setting is more than 45°.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1483
Tool Offset (W1)
Cutting data modification for tools that can be rotated

17.7.7 Parameter assignment

Reaction to errors
Different fault conditions can occur during the activation of the "Cutting edge data
modification for rotary tools" function (via explicit call with CUTMOD or through a tool
selection).
For each of these possible fault conditions, one can define whether the error is to trigger an
alarm output, whether such an alarm is only to be displayed (warning), or whether
additionally the interpretation of the part program must be cancelled. The setting is done via
the following machine data:
MD20125 $MC_CUTMOD_ERR
Two bits of the machine data are assigned to each fault condition:

Fault condition Bit Description


No valid cut direction is defined for 0 Alarm output for error "Invalid cut direction"
the active tool. 1 Program stop for error "Invalid cut direction"
The cutting edge angle (clearance 2 Alarm output for error "Not defined cutting edge angle"
angle and holder angle) of the 3 Program stop for error "Not defined cutting edge angle"
active tool are both zero.
The clearance angle of the active 4 Alarm output for error "Invalid clearance angle"
tool has an impermissible value 5 Program stop for error "Invalid clearance angle"
(< 0° or > 180°).
The holder angle of the active tool 6 Alarm output for error "Invalid holder angle"
has an impermissible value (< 0° or 7 Program stop for error "Invalid holder angle"
> 90°).
The plate angle of the active tool 8 Alarm output for error "Invalid plate angle"
has an impermissible value (< 0° or 9 Program stop for error "Invalid plate angle"
> 90°).
The cutting edge position - holder 10 Alarm output for error "Invalid cutting edge position -
angle combination of the active tool holder angle combination"
is not permitted (the holder angle 11 Program stop for error "Invalid cutting edge position -
must be ≤ 90° for cutting edge holder angle combination"
position 1 to 4; for cutting edge
positions 5 to 8 it must be ≥ 90°).
Inadmissible rotation of the active 12 Alarm output for error "Invalid rotation"
tool (the tool was rotated from the 13 Program stop for error "Invalid rotation"
active machining plane by ± 90°
(with a tolerance of about 1°).
Hence the cutting edge position is
no longer defined in the machining
plane.

Basic Functions
1484 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Cutting data modification for tools that can be rotated

Response to POWER ON
The "cutting edge data modification for rotary tools" function (CUTMOD) is initialized
automatically during POWER ON with the value stored in machine data:
MD20127 $MC_CUTMOD_INIT
If the value of this machine data is "-2", CUTMOD is set to the value that is set in machine
data:
MD20126 $MC_TOOL_CARRIER_RESET_VALUE (Active toolholder at RESET)

17.7.8 Programming
The "Cutting edge data modification for rotary tools" function is activated with the CUTMOD
command.

Syntax
CUTMOD=<value>

Description

CUTMOD Command to switch-in the function "cutting data modification for tools that can
be rotated"
<value> The following values can be assigned to the CUTMOD command:
0 The function is deactivated.
The values supplied from system variables $P_AD... are the same as
the corresponding tool parameters.
>0 The function is activated if a toolholder that can be orientated with the
specified number is active, i.e. the activation is linked to a specific
toolholder that can be orientated.
The values supplied from system variables $P_AD... may be modified
with respect to the corresponding tool parameters depending on the
active rotation.
The deactivation of the designated toolholder that can be orientated
temporarily deactivates the function; the activation of another
toolholder that can be orientated permanently deactivates it. This is
the reason that in the first case, the function is re-activated when
again selecting the same toolholder that can be orientated; in the
second case, a new selection is required - even if at a subsequent
time, the toolholder that can be orientated is re-activated with the
specified number.
The function is not influenced by a reset.
-1 The function is always activated if a toolholder that can be orientated
is active.
When changing the toolholder or when de-selecting it and a
subsequent new selection, CUTMOD does not have to be set again.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1485
Tool Offset (W1)
Cutting data modification for tools that can be rotated

-2 The function is always activated if a toolholder that can be orientated


is active whose number is the same as the currently active toolholder
that can be orientated.
If a toolholder that can be orientated is not active, then this has the
same significance as CUTMOD=0.
If a toolholder that can be orientated is active, then this has the same
significance as when directly specifying the actual toolholder number.
< -2 Values less than 2 are ignored, i.e. this case is treated as if CUTMOD
was not programmed.
Note:
This value range should not be used as it is reserved for possible
subsequent expansions.

Note
SD42984 $SC_CUTDIRMOD
The function can be activated using the CUTMOD command replaces the function that can be
activated using the setting data SD42984 $SC_CUTDIRMOD. However, this function
remains available unchanged. However, as it doesn't make sense to use both functions in
parallel, it can only be activated if CUTMOD is equal to zero.

Effectiveness of the modified cutting data


The modified tool nose position and the modified tool nose reference point are immediately
effective when programming, even for a tool that is already active. A tool does not have to be
re-selected for this purpose.

Influence of the active machining plane


To determine modified tool nose position, cutting direction and holder or clearance angle, the
evaluation of the cutting edge in the active plane (G17 - G19) is decisive.
However, if setting data SD42940 $SC_TOOL_LENGTH_CONST (change of the tool length
component when selecting the plane), a valid value not equal to zero (plus or minus 17, 18
or 19), then its contents define the plane in which the relevant quantities are evaluated.

Basic Functions
1486 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Cutting data modification for tools that can be rotated

System variables
The following system variables are available:

System variables Description


$P_CUTMOD_ANG/ Supplies the (non-rounded) angle in the active machining plane, that was
$AC_CUTMOD_ANG used as basis for the modification of the cutting data (tool nose position,
cut direction, clearance angle and holder angle) for the functions
activated using CUTMOD and/or $SC_CUTDIRMOD.
$P_CUTMOD_ANG refers to the actual state in the preprocessing,
$AC_CUTMOD_ANG to the actual main run block.
$P_CUTMOD/ Reads the currently valid value that was last programmed using the
$AC_CUTMOD command CUTMOD (number of the toolholder that should be activated for
the cutting data modification).
If the last programmed CUTMOD value = -2 (activation with the currently
active toolholder that can be orientated), then the value -2 is not returned
in $P_CUTMOD, but the number of the active toolholder that can be
orientated at the time of programming.
$P_CUTMOD refers to the actual state in the preprocessing,
$AC_CUTMOD to the actual main run block.
$P_CUT_INV/ Supplies the value TRUE if the tool is rotated so that the spindle direction
$AC_CUT_INV of rotation must be inverted. To do this, the following four conditions must
be fulfilled in the block to which the read operations refer:
1. If a turning or grinding tool is active
(tool types 400 to 599 and/or
SD42950 $SC_TOOL_LENGTH_TYPE = 2).
2. The cutting influence was activated using the language command
CUTMOD.
3. A toolholder that can be orientated is active, which was designated
using the numerical value of CUTMOD. Check - I reformulated.
4. The toolholder that can be orientated rotates the tool around an axis
in the machining plane (this is typically the C axis) so that the
resulting perpendicular of the tool cutting edge is rotated with respect
to the initial position by more than 90° (typically 180°).
The contents of the variable is FALSE if at least one of the specified four
conditions is not fulfilled. For tools whose tool nose position is not
defined, the value of the variable is always FALSE.
$P_CUT_INV refers to the actual state in the preprocessing and
$AC_CUT_INV to the actual main run block.
All main run variables ($AC_CUTMOD_ANG, $AC_CUTMOD and $AC_CUT_INV) can be
read in synchronized actions. A read access operation from the preprocessing generates a
preprocessing stop.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1487
Tool Offset (W1)
Cutting data modification for tools that can be rotated

Modified cutting data


If a tool rotation is active, the modified data are made available in the following system
variables:

System variable Description


$P_AD[2] Length of cutting edge
$P_AD[10] Holder angle
$P_AD[11] Cut direction
$P_AD[24] Clearance angle

Note
The data are always modified with respect to the corresponding tool parameters
($TC_DP2[..., ...] etc.) if the function "cutting data modification for rotatable tools" was
activated using the command CUTMOD and a toolholder that can be orientated, which causes
a rotation, is activated.

17.7.9 Example
The following example refers to a tool with tool nose position 3 and a toolholder that can be
orientated, which can rotate the tool around the B axis.
The numerical values in the comments specify the end of block positions in the machine
coordinates (MCS) in the sequence X, Y, Z.

Program code Comment


N10 $TC_DP1[1,1]=500
N20 $TC_DP2[1,1]=3 ; Length of cutting edge
N30 $TC_DP3[1,1]=12
N40 $TC_DP4[1,1]=1
N50 $TC_DP6[1,1]=6
N60 $TC_DP10[1,1]=110 ; Holder angle
N70 $TC_DP11[1,1]=3 ; Cut direction
N80 $TC_DP24[1,1]=25 ; Clearance angle

N90 $TC_CARR7[2]=0 $TC_CARR8[2]=1 $TC_CARR9[2]=0 ; B axis


N100 $TC_CARR10[2]=0 $TC_CARR11[2]=0 $TC_CARR12[2]=1 ; C axis
N110 $TC_CARR13[2]=0
N120 $TC_CARR14[2]=0
N130 $TC_CARR21[2]=X
N140 $TC_CARR22[2]=X
N150 $TC_CARR23[2]="M"

N160 TCOABS CUTMOD=0

Basic Functions
1488 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Cutting data modification for tools that can be rotated

Program code Comment


N170 G18 T1 D1 TCARR=2 X Y Z
N180 X0 Y0 Z0 F10000 ; 12.000 0.000 1.000

N190 $TC_CARR13[2]=30
N200 TCARR=2
N210 X0 Y0 Z0 ; 10.892 0.000 -5.134
N220 G42 Z–10 ; 8.696 0.000 –17.330
N230 Z–20 ; 8.696 0.000 –21.330
N240 X10 ; 12.696 0.000 –21.330
N250 G40 X20 Z0 ; 30.892 0.000 –5.134

N260 CUTMOD=2 X0 Y0 Z0 ; 8.696 0.000 –7.330


N270 G42 Z–10 ; 8.696 0.000 –17.330
N280 Z–20 ; 8.696 0.000 –21.330
N290 X10 ; 12.696 0.000 –21.330
N300 G40 X20 Z0 ; 28.696 0.000 –7.330

N310 M30

Explanations:
In block N180, initially the tool is selected for CUTMOD=0 and non-rotated toolholders that
can be orientated. As all offset vectors of the toolholder that can be orientated are 0, the
position that corresponds to the tool lengths specified in $TC_DP3[1,1] and
$TC_DP4[1,1] is approached.
The toolholder that can be orientated with a rotation of 30° around the B axis is activated in
block N200. As the tool nose position is not modified due to CUTMOD=0, the old tool nose
reference point is decisive just as before. This is the reason that in block N210 the position is
approached, which keeps the old tool nose reference point at the zero (i.e. the vector (1, 12)
is rotated through 30° in the Z/X plane).
In block N260, contrary to block N200 CUTMOD=2 is effective. As a result of the rotation of
the toolholder that can be orientated, the modified tool nose position becomes 8. The
consequence of this is also the different axis positions.
The tool radius compensation (TRC) is activated in blocks N220 and/or N270. The different
tool nose positions in both program sections has no effect on the end positions of the blocks
in which the TRC is active; the corresponding positions are therefore identical. The different
tool nose positions only become effective again in the deselect blocks N260 and/or N300.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1489
Tool Offset (W1)
Incrementally programmed compensation values

17.8 Incrementally programmed compensation values

17.8.1 G91 extension

Prerequisites
Incremental programming with G91 is defined such that the compensation value is traversed
additively to the incrementally programmed value when a tool compensation is selected.

Applications
For applications such as scratching, it is necessary only to traverse the path programmed in
the incremental coordinates. The activated tool compensation is not traversed.

Sequence
Selection of a tool compensation with incremental programming
● Scratch workpiece with tool tip.
● Save the actual position in the basic frame (set actual value) after reducing it by the tool
compensation.
● Traverse incrementally from the zero position.

Activation
With setting data:
SD42442 $SC_TOOL_OFFSET_INCR_PROG,
it is possible to define whether a changed tool length is traversed with FRAME and
incremental programming of an axis, or whether only the programmed path is traversed.

Zero offset/frames G91


With setting data:
SD42440 $SC_FRAME_OFFSET_INCR_PROG,
it is possible to define whether a zero offset is traversed as standard with value = 1 with
FRAME and incremental programming of an axis, or whether only the programmed path is
traversed with value = 0.
References:
/FB1/ Function Manual, Basic Functions; Axes, Coordinate Systems, Frames (K2),
Chapter: "Frames"

Basic Functions
1490 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Incrementally programmed compensation values

Supplementary condition
If the behavior is set such that the offset remains active even after the end of the program
and RESET (MD20110 $MC_RESET_MODE_MASK, bit6=1), and if an incremental path is
programmed in the first part program block, the compensation is always traversed additively
to the programmed path.

Note
With this configuration, part programs must always begin with absolute programming.

17.8.2 Machining in direction of tool orientation

Typical application
On machines with toolholders with orientation capability, traversing should take place in the
tool direction (typically, when drilling) without activating a frame (e.g. using TOFRAME or
TOROT), on which one of the axes points in the direction of the tool.
This is also true of machines on which a frame defining the oblique plane is active during
oblique machining operations, but the tool cannot be set exactly perpendicular because an
indexed toolholder (Hirth tooth system) is restricting the setting of the tool orientation.
In these cases it is then necessary - contrary to the motion actually requested perpendicular
to the plane - to drill in the tool direction, as the drill would otherwise not be guided in the
direction of its longitudinal axis, which, among other things, would lead to breaking of the
drill.

MOVT
The end point of such a motion is programmed with MOVT= .... The programmed value is
effective incrementally in the tool direction as standard. The positive direction is defined from
the tool tip to the toolholder. The content of MOVT is thus generally negative for the infeed
motion (when drilling), and positive for the retraction motion. This corresponds to the
situation with normal paraxial machining, e.g. with G91Z ....
If the motion is programmed in the form MOVT=AC( ...), MOVT functions absolutely. In this
case a plane is defined, which runs through the current zero point, and whose surface
normal vector is parallel to the tool orientation. MOVT then gives the position relative to this
plane:

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1491
Tool Offset (W1)
Incrementally programmed compensation values

7RRO =

$X[LOLDU\SODQH

0297 $& 

Figure 17-48 Definition of the position for absolute programming of a motion in tool direction

The reference to this auxiliary plane serves only to calculate the end position. Active frames
are not affected by this internal calculation.
Instead of MOVT= ... it is also possible to write MOVT=IC( ...) if it is to be plainly visible
that MOVT is to function incrementally. There is no functional difference between the two
forms.

Supplementary conditions
The following supplementary conditions apply to programming with MOVT:
● It is independent of the existence of a toolholder with orientation capability. The direction
of the motion is dependent on the active plane. It runs in the direction of the vertical axes,
i.e. with G17 in Z direction, with G18 in Y direction and with G19 in X direction. This
applies both where no toolholder with orientation capability is active and for the case of a
toolholder with orientation capability without rotary tool or with a rotary tool in its basic
setting.
● MOVT acts similarly for active orientation transformation (3-4-5-axis transformation).
● If in a block with MOVT the tool orientation is changed simultaneously (e.g. active 5-axis
transformation by means of simultaneous interpolation of the rotary axes), the orientation
at the start of the block is decisive for the direction of movement of MOVT. The path of the
tool tip (TCP - Tool Center Point) is not affected by the change in orientation.
● Linear or spline interpolation (G0, G1, ASPLINE, BSPLINE, CSPLINE) must be active.
Otherwise, an alarm is produced. If a spline interpolation is active, the resultant path is
generally not a straight line, since the end point determined by MOVT is treated as if it had
been programmed explicitly with X, Y, Z.
● A block with MOVT must not contain any programming of geometry axes (alarm 14157).

Basic Functions
1492 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Basic tool orientation

17.9 Basic tool orientation

Application
Normally, the orientation assigned to the tool itself depends exclusively on the active
machining plane. For example, the tool orientation is parallel to Z with G17, parallel to Y with
G18 and parallel to X with G19.
Different tool orientations can only be programmed by activating a 5-axis transformation. The
following system variables have been introduced in order to assign a separate orientation to
each tool cutting edge:

System variable Description of tool orientation Format Preassignment


$TC_DPV[t, d] Tool cutting edge orientation INT 0
$TC_DPV3[t, d] L1 component of tool orientation REAL 0
$TC_DPV4[t, d] L2 component of tool orientation REAL 0
$TC_DPV5[t, d] L3 component of tool orientation REAL 0

Indexing: Same as tool system variable $TC_DPx[t, d]


t: T number of cutting edge
d: D number of cutting edge

Identifiers $TC_DPV3 to $TC_DPV5 are analogous to identifiers $TC_DP3 to $TC_DP5 of


the tool length components.

MD18114
The system variables for describing the tool orientation are only available if machine data is
not equal to zero:
MD18114 $MN_MM_ENABLE_TOOL_ORIENT (assign orientation to tool cutting)

MD18114 $MN_MM_ENABLE_TOOL_ORIENT
Value = 1 Only system variable $TC_DPV[t, d] is available.
Value = 2 All four system variables are available.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1493
Tool Offset (W1)
Basic tool orientation

Define direction vector


If all four system variables contain 0, the orientation is defined only by the active plane (as
before).
If system variable $TC_DPV[t, d] is equal to zero, the other three parameters - if available -
define a direction vector. The amount of the vector is insignificant.
Example:

$TC_DPV[1, 1] = 0
$TC_DPV3[1, 1] = 1.0
$TC_DPV4[1, 1] = 0.0
$TC_DPV5[1, 1] = 1.0

In this example, the basic orientation points in the direction of the bisector in the L1-L3 plane,
i.e. the basic orientation in the bisector for a milling tool and active plane G17 lies in the Z/X
plane.

Basic orientation of tools

Basic orientation of: With:


Turning and grinding tools G18
Milling tools G17

The active tool orientation is unchanged in these cases and is equivalent to the original
settings in $TC_DPVx[t, d].
The basic orientation is always the direction perpendicular to the plane in which tool radius
compensation is performed. With turning tools, in particular, the tool orientation generally
coincides with the longitudinal tool axis.
The setting data specified below are effective only if the basic orientation of the tool is
defined by an entry in at least one of the system variables $TC_DPVx[t, d].
They have no effect if the tool orientation is only determined by the plane selection G17 -
G19 and is compatible with previous behavior.
The plane of the basic orientation for a cutting edge is treated either like a milling tool or like
a turning tool, irrespective of the entry in $TC_DP1, if the following setting data is not equal
to zero:
SD42950 $SC_TOOL_LENGTH_TYPE (allocation of the tool length components
independent of tool type)

Basic Functions
1494 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Basic tool orientation

Plane change
A change of plane causes a change in orientation.
The following rotations are initiated:

When changing from: Rotations


G17 ⇒ G18: Rotation through -90 degrees about the Z axis
G18 ⇒ G19: followed by rotation through -90 degrees about the
X axis
G19 ⇒ G17:
G17 ⇒ G19: Rotation through 90 degrees about the X axis
G18 ⇒ G17: followed by rotation through 90 degrees about the
Z axis
G19 ⇒ G18:

These rotations are the same as those that have to be performed in order to interchange the
components of the tool length vector on a change of plane.
The basic orientation is also rotated when an adapter transformation is active.
If the following setting data is not equal to zero, the tool orientation is not rotated on a
change of plane:
SD42940 $SC_TOOL_LENGTH_CONST (change of tool length components on change of
planes).

Tool length components


The components of the tool orientation are treated the same as the components of the tool
length, with respect to setting data:
SD42910 $SC_MIRROR_TOOL_LENGTH (Sign change tool wear when mirroring).
SD42950 $SC_TOOL_LENGTH_TYPE (allocation of the tool length components
independent of tool type)
Therefore the components are changed respectively and assigned to the geometry axis.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1495
Tool Offset (W1)
Basic tool orientation

System variable $TC_DPV[t, d]


The purpose of system variable $TC_DPV[t, d] is to allow the simple specification of certain
basic orientations (parallel to coordinate axes) that are required frequently. The permissible
values are shown in the table below. The values in the first and second/third columns are
equivalent.

$TC_DPV[t, d] Basic orientation


Milling tools * Turning tools *
≤ 0 or > 6 ($TC_DPV5[t, d], ($TC_DPV3[t, d],
$TC_DPV4[t, d], $TC_DPV5[t, d],
$TC_DPV3[t, d],) ** $TC_DPV4[t, d],) **
1 (0, 0, V) (0, V, 0)
2 (0, V, 0) (0, 0, V)
3 (V, 0, 0) (V, 0, 0)
4 (0, 0, -V) (0, -V, 0)
5 (0, -V, 0) (0, 0, -V)
6 (-V, 0, 0) (-V, 0, 0)

* Turning tools in this context are any tools whose tool type ($TC_DP1[t, d]) is between 400 and
599. All other tool types refer to milling tools.
** If all three values $TC_DPV3[t, d], $TC_DPV4[t, d], $TC_DPV5[t, d] are equal to zero in this
case, the tool orientation is determined by the active machining plane (default).
V Stands for a positive value in the corresponding system variables.
Example:
For milling tools:
$TC_DPV[t, d] = 2 is equal to:
$TC_DPV3[t, d] = 0, $TC_DPV4[t, d] = 0, $TC_DPV5[t, d] = V.

Basic Functions
1496 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Basic tool orientation

Supplementary conditions
If the "Scratch" function is used in the RESET state, the following must be noted with respect
to the initial setting:
● The wear components are evaluated depending on the initial settings of the G-code
groups TOWSTD, TOWMCS and TOWWCS.
● If a value other than the initial setting is needed to ensure correct calculation, scratching
may be performed only in the STOP state.

Note
"Special handling of tool compensations" pays particular attention to tool compensations
with evaluation of sign for tool length with wear and temperature fluctuations.
The following are taken into account:
• Tool type
• Transformations for tool components
• Assignment of tool length components to geometry axes independently of tool type

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1497
Tool Offset (W1)
Special handling of tool compensations

17.10 Special handling of tool compensations

17.10.1 Relevant setting data

SD42900- 42960
Setting data SD42900 - SD42940 can be used to make the following settings with reference
to tool compensation:
● Sign of the tool length
● Sign of the wear
● Behavior of the wear components when mirroring geometry axes
● Behavior of the wear components when changing the machining plane via setting data
● Allocation of the tool length components independent of actual tool type
● Transformation of wear components into a suitable coordinate system for controlling the
effective tool length

Note
In the following description, the wear includes the total values of the following
components:
• Wear values: $TC_DP12 to $TC_DP20
• Sum offset, consisting of:
– Wear values: $SCPX3 to $SCPX11
– Setup values: $ECPX3 to $ECPX11

You will find detailed information about sum and tool offsets in:
References:
/FBW/ Function Manual Tool Management
/PG/ Programming Manual Fundamentals; Tool Compensations

Required setting data


● SD42900 $SC_MIRROR_TOOL_LENGTH (mirroring of tool length components and
components of the tool base dimension)
● SD42910 $SC_MIRROR_TOOL_WEAR (mirroring of wear values of tool length
components)
● SD42920 $SC_WEAR_SIGN_CUTPOS (sign evaluation of the wear components)
● SD42930 $SC_WEAR_SIGN (inverts the sign of the wear dimensions)
● SD42940 $SC_TOOL_LENGTH_CONST (allocation of the tool length components to the
geometry axes)

Basic Functions
1498 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Special handling of tool compensations

● SD42950 $SC_TOOL_LENGTH_TYPE (allocation of the tool length components


independent of tool type)
● SD42935 $SC_WEAR_TRANSFORM (transformation of wear values)
● SD42960 $SC_TOOL_TEMP_COMP (tool length offsets)

17.10.2 Mirror tool lengths (SD42900 $SC_MIRROR_TOOL_LENGTH)

Activation
Tool length mirroring is activated via the setting data:
SD42900 $SC_MIRROR_TOOL_LENGTH <> 0 (TRUE) (Sign change tool length when
mirroring)

Function
The following components are mirrored by inverting the sign:
● Tool lengths: $TC_DP3, $TC_DP4, $TC_DP5
● Tool base dimensions: $TC_DP21, $TC_DP22, $TC_DP23
Mirroring is performed for all tool base dimensions whose associated axes are mirrored.
Wear values are not mirrored.

Mirror wear values


The following setting data should be set in order to mirror the wear values:
SD42910 $SC_MIRROR_TOOL_WEAR <> 0 (Sign change tool wear when mirroring)
Inverting the sign mirrors the wear values of the tool length components whose associated
axes are mirrored.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1499
Tool Offset (W1)
Special handling of tool compensations

; ;

'

= =

0 : : 0

0DFKLQLQJVLWXDWLRQ 0DFKLQLQJVLWXDWLRQ
'LVZRUNLQJLQ:&6 'LVZRUNLQJLQ:&6

Figure 17-49 Application example: Double-spindle turning machine

17.10.3 Mirror wear lengths (SD42920 $SC_WEAR_SIGN_CUTPOS)

Activation
Wear length mirroring is activated by:
SD42920 $SC_WEAR_SIGN_CUTPOS <> 0 (TRUE) (Sign of wear for tools with cutting
edge systems)

Function

Length of cutting edge Length 1 Length 2


1 --- ---
2 --- Inverted
3 Inverted Inverted
4 Inverted ---
5 --- ---
6 --- ---
7 --- Inverted
8 Inverted ---
9 --- ---

Basic Functions
1500 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Special handling of tool compensations

In the case of tool types without a relevant cutting edge position, the wear length is not
mirrored.

Note
The mirroring (sign inversion) in one or more components can cancel itself through a
simultaneous activation of the functions:
Tool length-mirroring (SD42900 <> 0)
And:
Tool length-mirroring (SD42920 <> 0)

SD42930 $SC_WEAR_SIGN
Setting data not equal to zero:
Inverts the sign of all wear dimensions. This affects both the tool length and other variables
such as tool radius, rounding radius, etc.
Entering a positive wear dimension makes the tool "shorter" and "thinner".

Activation of modified setting data


When the setting data described above are modified, the tool components are not
reevaluated until the next time a tool edge is selected. If a tool is already active and the data
of this tool are to be reevaluated, the tool must be selected again.
Example:

N10 $SC_WEAR_SIGN = 0 ; No sign inversion of the wear values


N20 $TC_DP1[1,1] = 120 ; End mill
N30 $TC_DP6[1,1] = 100 ; Tool radius 100 mm
N40 $TC_DP15[1,1] = 1 ; Wear dimension of tool radius 1 mm, resulting
tool radius 101 mm
N100 T1 D1 G41 X150 Y20
....
N150 G40 X300N10
....
N200 $SC_WEAR_SIGN = 1 ; Sign inversion for all wear values; the new
radius of 99 mm is activated on a new
selection (D1). Without D1, the radius would
continue to be 101 mm.
N300 D1 G41 X350 Y-20
N310 ....

The same applies in the event that the resulting tool length is modified due to a change in
the mirroring status of an axis. The tool must be selected again after the mirror command, in
order to activate the modified tool-length components.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1501
Tool Offset (W1)
Special handling of tool compensations

17.10.4 Tool length and plane change (SD42940 $SC_TOOL_LENGTH_CONST)

Plane change
The assignment of tool length components (length, wear and tool base dimension) to
geometry axes does not change when the machining plane is changed (G17–G19).

Assignment of tools
The assignment of tool length components to geometry axes for turning and grinding tools
(tool types 400 to 599) is generated from the value of the following setting data in
accordance with the following table:
SD42940 $SC_TOOL_LENGTH_CONST (change of tool length components on change of
planes).

Layer Length 1 Length 2 Length 3


17 Y X Z
*) X Z Y
19 Z Y X
-17 X Y Z
-18 Z X Y
-19 Y Z X

*) Each value not equal to 0, which is not equal to one of the six listed values, is evaluated as value 18.

The following table shows the assignment of tool length components to geometry axes for all
other tools (tool types < 400 or > 599):

Layer Length 1 Length 2 Length 3


*) Z Y X
18 Y X Z
19 X Z Y
-17 Z X Y
-18 Y Z X
-19 X Y Z

*) Each value not equal to 0, which is not equal to one of the six listed values, is evaluated as value 17.

Note
For representation in tables, it is assumed that geometry axes 1 to 3 are named X, Y, Z. The
axis order and not the axis identifier determines the assignment between a compensation
and an axis.
Three tool length components can be arranged on the 6 different types above.

Basic Functions
1502 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Special handling of tool compensations

17.10.5 Tool type (SD42950 $SC_TOOL_LENGTH_TYPE)

Definition of the assignment between tool length components (length, wear and tool base
dimension) and geometry axes independent of tool type.
Setting data not equal to zero: (the default definition is applied)
A distinction is made between turning and grinding tools (tool types 400 to 599) and other
tools (milling tools).
The value range is from 0 to 2. Any other value is interpreted as 0.
The assignment of tool length components is always independent of the actual tool type.
● Value = 1: Always as for milling tools
● Value = 2: Always as for turning tools

Toolholder with orientation capability


Setting data SD42900 - SD42950
Setting data SD42900 - SD42950 have no effect on the components of an active toolholder
with orientation capability. The calculation with a toolholder with orientation capability always
allows for a tool with its total resulting length (tool length + wear + tool base dimension). The
calculation of the resulting total length allows for all modifications caused by the setting data.

Note
When toolholders with orientation capability are used, it is common to define all tools for a
non-mirrored basic system, even those, which are only used for mirrored machining. When
machining with mirrored axes, the toolholder is then rotated such that the actual position of
the tool is described correctly. All tool-length components then automatically act in the
correct direction, dispensing with the need for control of individual component evaluation via
setting data, depending on the mirroring status of individual axes.
The use of toolholders with orientation capability is also practical if the physical
characteristics of the machine type prevents tools, which are permanently installed with
different orientations, from being rotated. Tool dimensioning can then be performed uniformly
in a basic orientation, where the dimensions relevant for machining are calculated according
to the rotations of a virtual toolholder.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1503
Tool Offset (W1)
Special handling of tool compensations

17.10.6 Temperature offsets in tool direction (SD42960 $SC_TOOL_TEMP_COMP)

Note
Temperature offset in the tool direction is operative only as an option with generic 5-axis
transformation, types 24 and 56.

17.10.7 Tool lengths in the WCS, allowing for the orientation

Change tool or working plane


The values displayed for the tool correspond to the expansion in the WCS. If a toolholder
with an inclined clamping position is to be used, you should make sure that the
transformation used supports the toolholder. If this is not the case, incorrect tool dimensions
will be displayed. When changing the working plane from G17 to G18 or G19, you should
ensure that the transformation can also be used for these working planes. If the
transformation is only available for G17 machining, the dimensions continue to be displayed
for a tool in the Z direction after the plane change.
When transformation is deactivated, the basic tool is displayed in the x, y or z direction,
according to the working plane. Allowance is made for a programmed toolholder. These tool
dimensions are not altered when traversing without a transformation.

Basic Functions
1504 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Special handling of tool compensations

17.10.8 Tool length offsets in tool direction

Temperature compensation in real time


On 5-axis machines with a moving tool, temperature fluctuations can occur in the machining
heads. These can result directly in expansion fluctuations, which are transmitted to the tool
spindle in the form of linear expansion. A typical case on 5-axis heads, for example, is
thermal expansion in the direction of the longitudinal spindle axis.
It is possible to compensate this thermal expansion even when the tool is orientated by
assigning the temperature compensation values to the tool rather than to the machine axes.
In this way, linear expansion fluctuations can be compensated even when the tool orientation
changes.
Using the orientation transformation whose direction is determined by the current tool
orientation, it is possible to overlay motions in real time and rotate them simultaneously.
At the same time, the compensation values are adjusted continuously in the tool coordinate
system.
Compensation applies to the "Temperature compensation" option and is active only when
the axis to be compensated is really referenced.

Activation
Temperature compensation in the tool direction is an option, which must be enabled
beforehand.
It is activated by setting the following machine data to a value other than zero.
MD20390 $MC_TOOL_TEMP_COMP_ON (Activation of temperature compensation for tool
length)
In addition, the bit 2 must be set for each affected channel axis in the machine data:
MD32750 $MA_TEMP_COMP_TYPE [<axis index>] (temperature compensation type)
This can be more than three axes in cases where more than three channel axes in
succession can be temporarily assigned to geometry axes as a result of geometry axis
replacement of transformation switchover. If this bit is not set for a particular channel axis,
the compensation value cannot be applied in the axis. This does not have any effect on other
axes. In this case, an alarm is not output.

Applicability
Temperature compensation in the tool direction is operative only with generic 5-axis
transformations with:
● Transformation type 24
Two axes rotate the tool
● Transformation type 56
One axis rotates the tool, the other axis rotates the workpiece without temperature
compensation

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1505
Tool Offset (W1)
Special handling of tool compensations

In generic 5-axis transformation with:


● Transformation type 40
The tool orientation is constant with a rotary workpiece, which means that the movement
of the rotary axes on the machine does not affect the temperature compensation
direction.
Temperature compensation in the tool direction also works in conjunction with orientation
transformations (not generic 5-axis transformations) with:
● Transformation type 64 to 69
Rotating linear axis

Note
Temperature compensation can be activated with all other types of transformation. It is
not affected by a change in tool orientation. The axis move as if no orientation
transformation with temperature compensation were active.

Supplementary conditions
Temperature compensation in the tool direction is an option, which must be enabled in
advance and is available:
● For generic 5-axis transformation
● For transformation with rotated linear axis for transformation types 64 to 69

Limit values
The compensation values are restricted to the maximum values by the machine data:
MD20392 $MC_TOOL_TEMP_COMP_LIMIT[0] (Maximum temperature compensation for
tool length)
To:
MD20392 $MC_TOOL_TEMP_COMP_LIMIT[2]
The limit value default setting is 1 mm. If a temperature compensation value higher than this
limit is specified, it will be limited without an alarm.

SD42960
The three temperature compensation values together form a compensation vector and are
contained in setting data:
SD42960 $SC_TOOL_TEMP_COMP[0] (Temperature compensation with reference to tools)
To:
SD42960 $SC_TOOL_TEMP_COMP[2]
The setting data are user-defined, e.g. using synchronized actions or from the PLC.
The compensation values can, therefore, also be used for other compensation purposes.

Basic Functions
1506 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Special handling of tool compensations

In the initial state or when orientation transformation is deactivated, all three compensation
values apply in the direction of the three geometry axes (in the typical order X, Y, Z). The
assignment of components to geometry axes is independent of the tool type (turning, milling
or grinding tools) and the selected machining plane G17 to G19. Changes to the setting data
values take effect immediately.

Toolholder with orientation capability


If a toolholder with orientation capability is active, the temperature compensation vector is
rotated simultaneously to any change in orientation. This applies independently of any active
orientation transformation.
If a toolholder with orientation capability is active in conjunction with a generic 5-axis
transformation or a transformation with rotating linear axis, the temperature compensation
vector is subjected to both rotations.

Note
While transformations with rotating linear axes take changes in the tool vector (length) into
account, they ignore its change in orientation, which can be effected by a toolholder with
orientation capability.

Temperature compensation values immediately follow any applied change in orientation.


This applies in particular when an orientation transformation is activated or deactivated.
The same is true when the assignment between geometry axes and channel axes is
changed. The temperature compensation value for an axis is reduced to zero
(interpolatively), for example, when it ceases to be a geometry axis after a transformation
change. Conversely, any temperature compensation value for an axis, which changes over
to geometry axis status, is applied immediately.

Examples
Temperature compensation in tool direction
Example of a 5-axis machine with rotating tool, on which the tool can be rotated about the C
and B axes.
In its initial state, the tool is parallel to the Z axis. If the B axis is rotated through 90 degrees,
the tool points in the X direction.
Therefore, a temperature compensation value in the following setting data is also effective in
the direction of the machine X axis if transformation is active:
SD42960 $SC_TOOL_TEMP_COMP[2] (Temperature compensation with reference to tools)
If the transformation is deactivated with the tool in this direction, the tool orientation is, by
definition, parallel again to the Z axis and thus different to its actual orientation. The
temperature offset in the X axis direction is therefore reduced to zero and reapplied
simultaneously in the Z direction.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1507
Tool Offset (W1)
Special handling of tool compensations

Example of a 5-axis machine with rotating tool (transformation type 24). The relevant
machine data are listed below:
● The first rotary axis rotates about Z.C-axis
● The second rotary axis rotates about Y B-axis
The essential machine data are shown in the table below:

MD20390 TOOL_TEMP_COMP_ON = TRUE ; Temperature compensation active


Option ; Activate option
MD32750 TEMP_COMP_TYPE[ AX1 ] = 4 ; Compensation in tool direction
MD32750 TEMP_COMP_TYPE[ AX2 ] = 4 ; Compensation in tool direction
MD32750 TEMP_COMP_TYPE[ AX3 ] = 4 ; Compensation in tool direction

; Assignment of transformation type 24:


MD24100 TRAFO_TYPE_1 = 24 ; Transformer type 24 in first channel
MD24110 TRAFO_AXES_IN_1[0] = 1 ; First axis of the transformation
MD24110 TRAFO_AXES_IN_1[1] = 2 ; Second axis of the transformation
MD24110 TRAFO_AXES_IN_1[2] = 3 ; Third axis of the transformation
MD24110 TRAFO_AXES_IN_1[3] = 5 ; Fifth axis of the transformation
MD24110 TRAFO_AXES_IN_1[4] = 4 ; Fourth axis of the transformation

MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[0] = 1 ; Geo axis for channel axis 1


MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[1] = 2 ; Geo axis for channel axis 2
MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[2] = 3 ; Geo axis for channel axis 3

MD24570 TRAFO5_AXIS1_1[0] = 0.0 ;


MD24570 TRAFO5_AXIS1_1[1] = 0.0 ; Direction
MD24570 TRAFO5_AXIS1_1[2] = 1.0 ; First rotary axis is parallel to Z

MD24572 TRAFO5_AXIS1_2[0] = 0.0 ; Direction


MD24572 TRAFO5_AXIS1_2[1] = 1.0 ; Second rotary axis is parallel to Y
MD24572 TRAFO5_AXIS1_2[2] = 0.0 ;

MD25574 TRAFO5_BASE_ORIENT_1[0] = 0.0 ;


MD25574 TRAFO5_BASE_ORIENT_1[1] = 0.0 ; Basic tool orientation
MD25574 TRAFO5_BASE_ORIENT_1[2] = 1.0 ; In Z direction

Basic Functions
1508 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Special handling of tool compensations

NC program
Temperature compensation values in the NC program
The compensation values assigned to axes X and Z are not zero and are applied for
temperature compensation with respect to tool length. The machine axis positions reached in
each case are specified as comments in the program lines.

SD42960 TOOL_TEMP_COMP[0] = -0.3 ; First compensation value


SD42960 TOOL_TEMP_COMP[1] = 0.0 ;
SD42960 TOOL_TEMP_COMP[2] = -1.0 ; Second compensation value

; Position setpoints of the


machine axes
N10 g74 x0 y0 z0 a0 b0 ; X Y Z
N20 x20 y20 z20 f10000 ; 20.30 20.00 21.00
N30 traori() ; 20.30 20.00 21.00
N40 x10 y10 z10 b90 ; 11.00 10.00 9.70
N50 trafoof ; 10.30 10.00 11.00
N60 x0 y0 z0 b0 c0 ; 0.30 0.00 1.00
N70 m30

With the exception of block N40, temperature compensation always acts in the original
directions, as the tool is pointing in the basic orientation direction. This applies particularly in
block N50. The tool is actually still pointing in the direction of the X axis because the B axis is
still at 90 degrees. However, because the transformation is already deactivated, the applied
orientation is parallel to the Z axis again.

MD20390 TOOL_TEMP_COMP_ON = TRUE ; Temperature compensation active


Option ; Activate option
MD32750 TEMP_COMP_TYPE[ AX1 ] = 4 ; Compensation in tool direction
MD32750 TEMP_COMP_TYPE[ AX2 ] = 4 ; Compensation in tool direction
MD32750 TEMP_COMP_TYPE[ AX3 ] = 4 ; Compensation in tool direction

For more details on "Temperature compensation" see:


References:
/FB2/ Function Manual Extended Functions; Compensations (K3)
For information on "Generic 5-axis transformations" see:
References:
/FB3/ Function Manual Special Functions; 3- to 5-Axis Transformation (F2)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1509
Tool Offset (W1)
Sum offsets and setup offsets

17.11 Sum offsets and setup offsets

17.11.1 General

Sum offsets
Sum offsets can be treated as programmable process compensations during machining and
are composed of all the error sizes (including the wear), which cause the workpiece to
deviate from the specified dimensions.
Sum offsets are a generalized type of wear. They are part of the cutting edge data. The
parameters of the sum offset refer to the geometrical data of a cutting edge.
The compensation data of a sum offset are addressed by a DL number (DL: location-
dependent; compensations with reference to the location of use).
In contrast, the wear values of a D number describe the physical wear of the cutting edge,
i.e. in special situations, the sum offset can match the wear of the cutting edge.
Sum offsets are intended for general use, i.e. with active or inactive tool management or with
the flat D number function.
Machine data are used to classify the sum offsets into:
● Sum offset fine
● Sum offset coarse (setup offset)

Setup offset
The setup offset is the compensation to be entered by the setup engineer before machining.
These values are stored separately in the NCK. The operator subsequently only has access
to the "sum offset fine" via HMI.
The "sum offset fine" and "sum offset coarse" are added internally in the NCK. This value is
referred to below as the sum offset.

Note
The function is enabled via the machine data setting:
MD18080 $MN_MM_TOOL_MANAGEMENT_MASK, Bit 8=1 (Gradual memory reservation
for tool management).

If kinematic transformations (e.g. 5-axis transformations) are active, the tool length is
calculated first after allowing for the various wear components. ´The total tool length is then
used in the transformation. Unlike the case of a toolholder with orientation capability, the
wear values are thus always included in the transformation irrespective of the G code of
group 56.

Basic Functions
1510 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

17.11.2 Description of function

Sum offsets
Several sum offsets (DL numbers) can be defined per D number. This allows you to
determine, for example, workpiece-location-dependent compensation values and assign
them to a cutting edge. Sum offsets have the same effect as wear, i.e. they are added to the
compensation values of the D number. The data are permanently assigned to a D number.

Attitudes
You can define the following settings in machine data:
● Activate sum offset
● Define maximum quantity of DL data sets to be created in NCK memory
● Define maximum quantity of DL numbers to be assigned to a D number
● Define whether the sum offsets (fine/coarse) are to be saved during data backup
● Define the sum offset to be activated, if:
– A new cutting edge compensation is activated
– An operator panel front RESET is performed
– An operator panel front START is performed
– The end of the program has been reached
The name is oriented to the logic of the corresponding machine data for tools and cutting
edges.
The "setup offset" and "sum offset fine" can be read and written via system variables and
corresponding OPI services.

Note
When tool management is active, a machine data can be used to define whether the sum
offset of a tool activated during a programmed tool change remains unchanged or is set to
zero.

Summary of compensation parameters $TC_DPx


The following general system variables were previously defined for describing a cutting
edge:

$TC_DP1 Tool type


$TC_DP2 Length of cutting edge

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1511
Tool Offset (W1)
Sum offsets and setup offsets

Parameters for geometry and wear


Tool geometry compensations are assigned to system variables $TC_DP3 to $TC_DP11.
System variables $TC_DP12 to $TC_DP20 allow you to name a wear for each of these
parameters.

Geometry Wear Length compensations


$TC_DP3 $TC_DP12 Length 1
$TC_DP4 $TC_DP13 Length 2
$TC_DP5 $TC_DP14 Length 3
Geometry Wear Radius compensation
$TC_DP6 $TC_DP15 Radius
$TC_DP7 $TC_DP16 Corner radius (tool type 700; slotting saw)
Geometry Wear Further compensations
$TC_DP8 $TC_DP17 Length 4 (tool type 700; slotting saw)
$TC_DP9 $TC_DP18 Length 5
$TC_DP10 $TC_DP19 Angle 1 (angle between face of tool and torus surface)
$TC_DP11 $TC_DP20 Angle 2 (angle between tool longitudinal axis and upper
end of torus surface)

Tool base dimension/adapter dimension

$TC_DP21 Adapter length 1


$TC_DP22 Adapter length 2
$TC_DP23 Adapter length 3

Technology

System variable Clearance angle


$TC_DP24 • The clearance angle is stored here for ManualTurn; tool type 5xx.
Same significance as in standard cycles for turning tools.
• The tip angle of the drill is stored here for ShopMill; tool type 2xx.
• Used in standard cycles for turning tools; tool type 5xx. This is the
angle at the secondary cutting edge for these tools.
$TC_DP25 • The value for the cutting rate is stored here for ManualTurn.
• A bit-coded value for various states of tool types 1xx and 2xx is stored
here for ShopMill.

Basic Functions
1512 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

Parameters of the sum and setup offsets ($TC_SCPxy-, $TC_ECPxy)


The numbering of the parameters is oriented to the numbering of system variables $TC_DP3
to $TC_DP11.
The effect of the parameters is similar to the wear (additive to the tool geometry). Up to six
sum/setup parameters can be defined per cutting edge parameter.

Tool geometry Sum/setup parameters, length compensations Tool wear


parameter, to which the parameters
compensation is added.
$TC_DP3 Length 1 $TC_DP12
$TC_SCP13, $TC_SCP23,$TC_SCP33,
$TC_SCP43,$TC_SCP53,$TC_SCP63
$TC_ECP13, $TC_ECP23,$TC_ECP33,
$TC_ECP43,$TC_ECP53,$TC_ECP63
The numbers in bold, 1, 2, ... 6, designate the
parameters of a maximum of six (location-dependent
or similar) compensations that can be programmed
with DL =1 to 6 for the parameter specified in column
one.
$TC_DP4 Length 2 $TC_DP13
$TC_SCP14, $TC_SCP24,$TC_SCP34,
$TC_SCP44,$TC_SCP54,$TC_SCP64
$TC_ECP14, $TC_ECP24,$TC_ECP34,
$TC_ECP44,$TC_ECP54,$TC_ECP64
$TC_DP5 Length 3 $TC_DP14
etc.
Radius compensation
$TC_DP6 Radius $TC_DP15
$TC_DP7 Corner radius $TC_DP16
Further compensations
$TC_DP8 Length 4 $TC_DP17
$TC_DP9 Length 5 $TC_DP18
$TC_DP10 Angle 1, $TC_DP19
etc.
$TC_DP11 Angle 2 $TC_DP20
$TC_SCP21, $TC_SCP31,$TC_SCP41,
$TC_SCP51,$TC_SCP61,$TC_SCP71
$TC_ECP21, $TC_ECP31,$TC_ECP41,
$TC_ECP51,$TC_ECP61,$TC_ECP71
The numbers in bold, 2, 3, ... 7, designate the
parameters of a maximum of six (location-dependent
or similar) compensations that can be programmed
with DL =1 to 6 for the parameter specified in column
one.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1513
Tool Offset (W1)
Sum offsets and setup offsets

Supplementary conditions
The maximum number of DL data sets of a cutting edge and the total number of sum offsets
in the NCK are defined by machine data. The default value is zero, i.e. no sum offsets can
be programmed.
Activate the "monitoring function" to monitor a tool for wear or for "sum offset".
The additional sum/setup data sets use additional buffered memory. 8 bytes are required per
parameter.
A sum-offset data set requires: 8 bytes * 9 parameters = 72 bytes
A setup data set requires an equal amount of memory. A certain number of bytes is also
required for internal administration data.

17.11.3 Activation

Function
The function must be activated via the machine data:
MD18108 $MN_MM_NUM_SUMCORR (sum offsets in TO area).
System variables $TC_ECPx and $TC_SCPx and setup and sum offsets ("fine") defined via
the OPI interface can be activated in the part program.
This is done by programming the language command DL="number".
When a new D number is activated, either a new DL number is programmed, or the DL
number defined via the following machine data becomes active:
MD20272 $MC_SUMCORR_DEFAULT (basic setting of the additive offset without a
program)

DL programming
The sum offset is always programmed relative to the active D number with the command:
DL = "n"
The sum offset "n" is added to the wear of the active D number.

Note
If you use "setup offset" and "sum offset fine", both compensations are combined and added
to the tool wear.

Basic Functions
1514 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

The sum offset is deselected with the command:


DL = 0

Note
DL0 is not allowed. If compensation is deselected (D0 and T0), the sum offset also becomes
ineffective.
Programming a sum offset that does not exist triggers an alarm, similar to programming a D
compensation that does not exist.
Thus, only the defined wear remains part of the compensation (defined in system variables
$TC_DP12 to $TC_DP20).
Programming a sum offset when a D compensation is active (also applies to deselection)
has the same effect on the path as programming a D command. An active radius
compensation will, therefore, lose its reference to adjacent blocks.

Configuration
MD18112 $MN_MM_KIND_OF_SUMCORR, bit 4=0: (Properties of sum offset in the TO
area) default setting:
Only one set of sum offsets exists per DL number.
We refer in general to the sum offset.
This describes the data represented by $TC_SCPx.

6XPRIIVHW
7&B6&3>W@
7&B6&3>W@

'RIIVHW
6XPRIIVHW
7&B'3>W@ 7&B6&3>W@
7&B'3>W@ 7&B6&3>W@
7&B'3>W@
7&B'3>W@

Figure 17-50 MD18112 $MN_MM_KIND_OF_SUMCORR, bit 4 = 0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1515
Tool Offset (W1)
Sum offsets and setup offsets

Tool T = t is active. With the data in the figure, the following is programmed:

D2 ; Cutting edge offsets, i.e. $TC_DP3 to $TC_DP11 + wear


($TC_DP12 to $TC_DP20) + adapter dimension
...
DL=1 ; Sum offset 1 is added to the previous D2 compensations, i.e.
$TC_SCP13 to $TC_SCP21.
...
DL=2 ; Sum offset 2 is added to the D2 compensation instead of sum
offset 1, i.e. $TC_SCP23 to $TC_SCP31.
...
DL=0 ; Deselection of sum offset;
only the data of D2 remain active.

MD18112 $MN_MM_KIND_OF_SUMCORR, bit 4=1: Setup offsets are available


The sum offset is now composed of the "sum offset fine" (represented by $TC_SCPx) and
the setup offset (represented by $TC_ECPx). Two data sets therefore exist for one DL
number. The sum offset is calculated by adding the corresponding components ($TC_ECPx
+ $TC_SCPx).

6HWXSRIIVHW 6XPRIIVHW
ILQH
7&B(&3>W@ 7&B6&3>W@
7&B(&3>W@ 7&B6&3>W@

'RIIVHW
7&B'3>W@ 6HWXSRIIVHW 6XPRIIVHW
ILQH
7&B'3>W@
7&B(&3>W@ 7&B6&3>W@
7&B'3>W@
7&B(&3>W@ 7&B6&3>W@
7&B'3>W@
7&B'3&(>W@

Figure 17-51 MD18112 $MN_MM_KIND_OF_SUMCORR, bit 4 = 1 "setup offsets" + "sum offsets fine"

Basic Functions
1516 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

Tool T = t is active. With the data in the figure, the following is programmed:

D2 ; Cutting edge compensations, i.e. $TC_DP3 to $TC_DP11 + wear


($TC_DP12 to $TC_DP20) + adapter dimension
...
DL=1 ; Sum offset 1 is added to the previous D2 compensations, i.e.
$TC_ECP13 + $TC_SCP13 to $TC_ECP21 + $TC_SCP21.
...
DL=2 ; Sum offset 2 is added to the D2 compensation instead of sum
offset 1; i.e. $TC_ECP23 + $TC_SCP23,...$TC_ECP31 + $TC_SCP31
...
DL=0 ; Deselection of sum offset. Only the data of D2 remain active.

Reading/writing in the part program


The individual sets of sum offset parameters are differentiated according to the number
ranges of system variable $TC_SCP.
The significance of the individual variables is similar to geometry variables $TC_DP3 to
$TC_DP11. Only length 1, length 2 and length 3 are enabled for the basic functionality
(variables $TC_SCP13 to $TC_SCP15 for the first sum offset of the cutting edge).

R5 = $TC_SCP13[ t, d ] ; Sets the value of the R parameter to the value


of the first component of sum offset 1 for
cutting edge (d)
on tool (t).
R6 = $TC_SCP21[ t, d ] ; Sets the value of the R parameter to the value
of the last component of sum offset 1 for
cutting edge (d) on tool (t).
R50 = $TC_SCP23[ t, d ] ; Sets the value of the R parameter to the value
of the first component of sum offset 2 for
cutting edge (d) on tool (t).
$TC_SCP43[ t, d ] = 1.234 ; Sets the value of the first component of sum
offset 4 for cutting edge (d) on tool (t) to the
value 1.234.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1517
Tool Offset (W1)
Sum offsets and setup offsets

The above statements also apply to the setup offsets (if the NCK is configured with this
option), i.e.

R5 = $TC_ECP13[ t, d ] ; Sets the value of the R parameter to the value


of the first component of setup offset 1 for
cutting edge (d) on tool (t).
R6 = $TC_ECP21[ t, d ] ; Sets the value of the R parameter to the value
of the last component of setup offset 1 for
cutting edge (d) on tool (t).
Etc.

When working with setup offsets, "sum offsets fine" are written with the $TC_SCPx system
variables.

Creating a new sum offset


If the compensation data set (x) does not yet exist, it is created on the first write operation to
one of its parameters (y).

$TC_SCPxy[ t, d ] = r.r ; Parameter y of sum offset x is assigned the


value "r.r.". The other parameters of x have a
value of zero.

When working with setup offsets, "sum offsets fine" are written with the $TC_SCPx system
variables.

Note
When working with setup offsets, the data set for the setup offset is created when a data set
is created for "sum offset fine", if a data set did not already exist for [t, d].

Creating a new setup offset


If the compensation data set (x) does not yet exist, it is created on the first write operation to
one of its parameters (y).

$TC_ECPxy[ t, d ] = r.r ; The value "r.r" is assigned to the parameter y


of setup offset x. The other parameters of x
have the value zero.

Note
When working with setup offsets, the data set for the "sum offset fine" is created when a data
set is created for setup offsets, if a data set did not already exist for [t, d].

Basic Functions
1518 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

DELDL - Delete sum offset


Sum offsets are generally only relevant when machining with a cutting edge at a certain time
at a certain location of the workpiece. You can use the NC language command DELDLto
delete sum offsets from cutting edges (in order to release memory).

status = DELDL( t, d ) ; Deletes all sum offsets for cutting edge d on tool
t.
; t, d are optional parameters.

If d is not specified, all sum offsets of all cutting edges of tool t are deleted.
If d and t are not specified, all sum offsets for the cutting edges on all tools of the TO unit are
deleted (for the channel, in which the command is programmed).
When working with setup offsets, the DELDL command deletes both the setup offset and the
"sum offsets fine" of the specified cutting edge(s).

Note
The memory used for the data sets is released after deletion.
The deleted sum offsets can subsequently no longer be activated or programmed.

Sum offsets and setup offsets on active tools cannot be deleted (similar to the deletion of D
compensations or tool data).
The "status" return value indicates the result of the deletion command:

0: Deletion was successful


-1: Deletion was not (one cutting edge) or not completely (several cutting edges) successful

Data backup
The data are saved during a general tool-data backup (as a component of the D number
data sets).
It is advisable to save the sum offsets, in order to allow the current status to be restored in
the event of an acute problem. Machine data settings can be made to exclude sum offsets
from a data backup (settings can be made separately for "setup offsets" and "sum offsets
fine").

Note
Sum offsets behave in the same way as D compensations with reference to block search
and REPOS. The behavior on Reset and PowerOn can be defined by machine data.
If the setting of the following machine data indicates that the last active tool compensation
number (D) is to be activated after PowerOn, the last active DL number is then no longer
active:
MD20110 $MC_RESET_MODE_MASK (definition of initial control system settings after
RESET/TP end)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1519
Tool Offset (W1)
Sum offsets and setup offsets

17.11.4 Examples

Example 1
That no compensation and no sum offset will come into effect must be defined during tool
change via the machine data:
● MD20270 $MC_CUTTING_EDGE_DEFAULT=0 (Basic setting of tool cutting edge without
programming)
● MD20272 $MC_SUMCORR_DEFAULT=0 (default setting sum offset without program).

T5 M06 ; Tool number 5 is loaded - no compensation active.


D1 DL=3 ; Compensation D1 + sum offset 3 of D1 are activated.
X10
DL=2 ; Compensation D1 + sum offset 2 are activated.
X20
DL=0 ; Sum offset deselection, only compensation D1 is now active.
D2 ; Compensation D2 is activated - the sum offset is not included
in the compensation.
X1
DL=1 ; Compensation D2 + sum offset 1 are activated.
X2
D0 ; Compensation deselection
X3
DL=2 ; No effect - DL2 of D0 is zero (same as programming T0 D2).

Basic Functions
1520 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

Example 2
During tool change it has to be defined that offset D2 and sum offset DL=1 are activated via
the machine data:
MD20270 $MC_CUTTING_EDGE_DEFAULT=2 (Basic setting of tool cutting edge without
programming)
MD20272 $MC_SUMCORR_DEFAULT=1 (default setting sum offset without program)

T5 M06 ; Tool number 5 is loaded - D2 + DL=1 are active (= values of


machine data)
D1 DL=3 ; Compensation D1 + sum offset 3 of D1 are activated.
X10
DL=2 ; Compensation D1 + sum offset 2 are activated.
X20
DL=0 ; Sum offset deselection, only compensation D1 is now active.
D2 ; Compensation D2 is activated - sum offset DL=1 is activated.
X1
DL=2 ; Compensation D2 + sum offset 2 are activated.
D1 ; Compensation D1 + sum offset 1 are activated.

17.11.5 Upgrades for tool length determination

17.11.5.1 Taking the compensation values into account location-specifically and workpiece-
specifically

Composition of the effective tool length


For a tool compensation without active kinematic transformation, the effective tool length
consists of up to 8 vectors:

• Tool length (geometry) ($TC_DP3 - $TC_DP5)


• Wear ($TC_DP12 - $TC_DP14)
• Tool base dimension (see note) ($TC_DP21 - $TC_DP23)
• Adapter dimension (see note) ($TC_ADPT1 - $TC_ADPT3)
• Total offsets fine ($TC_SCPx3 - $TC_SCPx5)
• Sum offsets coarse or setup offsets ($TC_ECPx3 - $TC_ECPx5)
• Offset vector l1 of toolholder with orientation capability ($TC_CARR1 - $TC_CARR3)
• Offset vector l2 of toolholder with orientation capability ($TC_CARR4 - $TC_CARR6)
• Offset vector l3 of toolholder with orientation capability ($TC_CARR15 - $TC_CARR17)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1521
Tool Offset (W1)
Sum offsets and setup offsets

Note
The tool base dimension and adapter dimension can only be applied as alternatives.

Type of action of the individual vectors


The type of action of the individual vectors or groups of vectors depends on the following
further quantities:

Influencing quantity Operating principle


G codes Active processing level
Tool type Milling tool or turning/grinding tools
Machine data Tool management active/not active, toolholder with
orientation capability available/not available
Setting data Behavior of tool length components when mirroring or
when changing the plane
Toolholder with orientation capability Set values of toolholder with orientation capability
Adapter transformations Transformed tool compensation values

Distribution over the geometry-axis components


How the three vector components of partial totals of the vectors involved are distributed over
the three geometry-axis components is determined by the following quantities:

Influencing quantity Dependencies


Active processing level: Infeed plane:
G17 X/Y direction Z
G18 Z/X direction Y
G19 Y/Z direction X
Tool type: See:
Milling tools, drilling tools, grinding tools, turning tools Section "Tool type", Table "Minimum
number of required tool parameters"
SD42900 $SC_MIRROR_TOOL_LENGTH See:
SD42910 $SC_MIRROR_TOOL_WEAR Sections "Special handling of tool
SD42920 $SC_WEAR_SIGN_CUTPOS compensations" and "Setting data".
SD42930 $SC_WEAR_SIGN
SD42940 $SC_TOOL_LENGTH_CONST
SD42950 $SC_TOOL_LENGTH_TYPE
Adapter transformations See: "FB Tool management"

The resulting tool orientation always remains parallel to one of the three axis directions X, Y
or Z and exclusively depends on the active machining plane G17-G19, since it has not yet
been possible to assign the tool an orientation.

Basic Functions
1522 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

Stepless variation of the tool orientation


The toolholder with orientation capability also enables the tool orientation to be varied
steplessly, in addition to providing further offsets or linear expansion fluctuations with the aid
of offset vectors l1 - l3.
For more information, see:
References:
/FB1/ Function Manual Basic Functions; Tool Offset (W1),
Section: Toolholder with orientation capability

Minor operator compensations


Minor compensations, however, must also be modified during the normal production mode.
The reasons for this are e.g.:
● Tool wear
● Clamping errors
● Temperature sensitivity of the machine:
These compensations are defined as follows:

Definition Wear components


Wear $TC_DP12 - $TC_DP14,
Total offsets fine $TC_SCPx3 - $TC_SCPx5,
Sum offsets coarse or setup offsets $TC_ECPx3 - $TC_ECPx5

In particular, compensations, which affect the tool length calculation, should be entered in
the coordinates used for measurement.
These workpiece-specific compensations can be achieved more simply using the G-code
group 56 with the three values TOWSTD, TOWMCS and TOWWCS and the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformation of tool components)

SD42935
Which of the wear components:
● Wear ($TC_DP12 - $TC_DP14)
● Setup offsets or sum offsets coarse ($TC_ECPx3 - $TC_ECPx5)
● Sum offsets fine ($TC_SCPx3 - $TC_SCPx5)
are to be transformed in the transformations:
● Adapter transformation
● Toolholder with orientation capability
are to be or not to be transformed, can be defined via the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformation of wear values)
With the setting data in its initial state, all wear values are transformed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1523
Tool Offset (W1)
Sum offsets and setup offsets

The setting data is considered in the following functions:


● Wear values in the machine coordinate system
Part program instruction: TOWMCS
● Wear values in the workpiece coordinate system
Part program instruction: TOWWCS

$GDSWHUGLPHQVLRQ 7RROOHQJWK
7RROEDVH
GLPHQVLRQ

.LQHPDWLF 7RROFDUULHUZLWK $GDSWHU


WUDQVIRUPDWLRQ RULHQWDWLRQ WUDQVIRUPDWLRQ
FDSDELOLW\

 6XPRIIVHWILQH
 6HWXSRIIVHWRU
VXPRIIVHWFRDUVH
:HDU

6'6&B:($5B75$162)250
 %LW 758(
 %LW 758(
 %LW 758(

Figure 17-52 Transformation of wear data dependent on SD42935

Basic Functions
1524 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

Programming
G-code group 56 can be used to define the following values:

Syntax Corrections
TOWSTD Initial setting value for offsets in tool length
TOWMCS Wear data in the machine coordinate system (MCS)
TOWWCS Wear values in workpiece coordinate system (WCS)
TOWBCS Wear values in basic coordinate system (BCS)
TOWTCS Wear values in the TCS (Tool Coordinate System) at the toolholder (tool carrier
reference point T)
TOWKCS Wear values in tool coordinate system for kinematic transformation (KCS) of tool
head

Coordinate systems for offsets in tool length


G codes TOWMCS, TOWWCS, TOWBCS, TOWTCS and TOWKCS can be used, e.g. to measure the
wear tool length component in five different coordinate systems.

1. Machine coordinate system MCS


1. Basic coordinate system BCS
1. Workpiece coordinate system WCS
1. Tool coordinate system of kinematic transformation KCS
1. Tool coordinate system TCS

The calculated tool length or a tool length component can be represented and read out in
one of these coordinate systems using the GETTCOR function (predefined subprogram).
References:
/FB1/ Function Manual Basic Functions; Tool Offset (W1),
Section: Read tool lengths, tool length components

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1525
Tool Offset (W1)
Sum offsets and setup offsets

=
0&6
;
=
. .LQHPDWLFWUDQVIRUPDWLRQ
.&6 WRROFRPSRQHQW

;
7RROFDUULHU
7 WRROFRPSRQHQW

=
;
; =
= ;
:&6
%&6
7&6

3
7RRO
.LQHPDWLFWUDQVIRUPDWLRQ
ZRUNSLHFH WDEOHRUSDUWFRPSRQHQW

Figure 17-53 Coordinate system for the evaluation of tool lengths

17.11.5.2 Functionality of the individual wear values

TOWSTD
Initial setting (default behavior):
● The wear values are added to the other tool length components.
The resulting total tool length is then used in further calculations.
In the case of an active toolholder with orientation capability:
● The wear values are subjected to the appropriate rotation.

TOWMCS
Wear data in the MCS (machine coordinate system):
In the case of an active rotation by means of a toolholder with orientation capability:
● The toolholder only rotates the vector of the resultant tool length. Wear is ignored.
Then the tool length vector rotated in this way and the wear are added. The wear is not
subjected to the rotation.
If no toolholder with orientation capability is active or this does not result in a rotation,
TOWMCS and TOWSTD are identical.
Linear transformation
The tool length can be uniquely defined in the MCS only if the MCS is generated by linear
transformation from the BCS.

Basic Functions
1526 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

This would be the case when:


● no kinematic transformation is active
● or orientation transformations (3-axis, 4-axis and 5-axis transformations) are active.

TOWWCS
Wear values in WCS (workpiece coordinate system):
● If a toolholder with orientation capability is active, the tool vector is calculated as for
TOWMCS, without taking the wear into account.
● The wear data are interpreted in the workpiece coordinate system.
The wear vector in the workpiece coordinate system is converted to the machine coordinate
system and added to the tool vector.

TOWBCS
Wear values in BCS (basic coordinate system):
● If a toolholder with orientation capability is active, the tool vector is calculated as for
TOWMCS, without taking the wear into account.
● The wear data are interpreted in the workpiece coordinate system.
The wear vector in the basic coordinate system is converted to the workpiece coordinate
system and added to the tool vector.
Nonlinear transformation
If a nonlinear transformation is active, e.g. with TRANSMIT, and the MCS is specified as the
desired coordinate system, the BCS is automatically used instead of the MCS.
Toolholder with orientation capability
A table component of the toolholder with orientation capability, if available, is not applied
directly to the coordinate systems, unlike a table (or part) component of the kinematic
transformation. A rotation described by such a component is represented in a basic frame or
system frame and is thus included in the transition from WCS to BCS.
Kinematic transformation
The table (or part) component of the kinematic transformation is described by the transition
from BCS to MCS.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1527
Tool Offset (W1)
Sum offsets and setup offsets

TOWTCS
Wear values in TCS (tool coordinate system):
● If a toolholder with orientation capability is active, the tool vector is calculated as for
TOWMCS, without taking the wear into account.
● The wear data are interpreted in the tool coordinate system.
The wear vector in the TCS (Tool Coordinate System) is converted to the machine
coordinate system by way of the tool coordinate system of the kinematic transformation
(KCS) and added to the tool vector.

TOWKCS
The wear value specifications for the kinematic transformation are interpreted in the
associated TCS (Tool Coordinate System).
The wear vector is converted to the machine coordinate system by way of the tool coordinate
system of the kinematic transformation and added to the tool vector.

G code change when a tool is active


Changing the G code in the group TOWSTD, TOWMCS, TOWWCS, TOWBCS, TOWTCS, and
TOWKCS does not affect an already active tool, and does not become effective until the next
tool is selected.
A new G code of this group will also come into effect if it is programmed in the same block, in
which a tool is selected.

Evaluation of individual wear components


Evaluation of individual wear components (assignment to geometry axes, sign evaluation) is
influenced by:
● The active plane
● The adapter transformation
● The five setting data shown in the table below:

Setting data Wear components


SD42910 $SC_MIRROW_TOOL_WEAR TOWSTD TOWMCS TOWWCS
SD42920 $SC_WEAR_SIGN_CUTPOS X X —
SD42930 $SC_WEAR_SIGN X — —
SD42940 $SC_TOOL_LENGTH_CONST X X X
SD42950 $SC_TOOL_LENGTH_TYPE X X X

Note
Wear components, which are subjected to an active rotation by an adapter transformation or
a toolholder with orientation capability, are referred to as non-transformed wear components.

Basic Functions
1528 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Sum offsets and setup offsets

Special points to be noted


If TOWMCS or TOWWCS is active, the following setting data does not affect the non-transformed
wear components:
SD42920 $SC_WEAR_SIGN_CUTPOS (Sign of wear for tools with cutting edge systems)
The following setting data also does not affect the non-transformed wear components in
case of TOWWCS:
SD42910 $SC_MIRROR_TOOL_WEAR (Sign change tool wear when mirroring)
In this case, a possibly active mirroring is already contained in the frame, which is referred to
for evaluating the wear components.
On a plane change, the assignment between the non-transformed wear components and the
geometry axes is retained, i.e. these are not interchanged as with other length components.
The assignment of components depends on the active plane for tool selection.

Example
Let's assume a milling tool is used where only the wear value $TC_DP12 assigned to length
L1 is not equal to zero.
If G17 is active, this length is effective in the direction of the Z axis.
This measure always acts in the Z-direction also upon a plane change after the tool
selection, when TOWMCS or TOWWCS are active and the bit 1 is set in the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformations for tool components)
If, for example, G18 is active on tool selection, the component is always effective in the Y
direction instead.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1529
Tool Offset (W1)
Working with tool environments

17.12 Working with tool environments

17.12.1 General

Functions
The current states of tool data can be processed using the functions below, which are
generally available:
● Save
● Deletion
● Read
● Modify
A further function can be used to determine information about the assignment of the tool
lengths of the active tool to the abscissa, ordinate and applicate.

17.12.2 Saving with TOOLENV

Scope of a tool environment


The TOOLENV memory function is used to save any current states needed for the evaluation
of tool data stored in the memory.
The individual data are as follows:
● The active G code of group 6 (G17,G18,G19)
● The active G code of group 56 (TOWSTD, TOWMCS, TOWWCS, TOWBCS, TOWTCS, TOWKCS)
● The active transverse axis
● Machine data:
MD18112 $MN_MM_KIND_OF_SUMCORR (Properties of sum offsets in the TO area)
● Machine data:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK (definition of tool parameters).
● Setting data:
SD42900 $SC_MIRROR_TOOL_LENGTH (Sign change tool length when mirroring)
● Setting data:
SD42910 $SC_MIRROR_TOOL_WEAR (Sign change tool wear when mirroring)

Basic Functions
1530 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Working with tool environments

● Setting data:
SD42920 $SC_WEAR_SIGN_CUTPOS (Sign of wear for tools with cutting edge systems)
● Setting data:
SD42930 $SC_WEAR_SIGN (sign of wear)
● Setting data:
SD42935 $SC_WEAR_TRANSFORM (transformations for tool components)
● Setting data:
SD42940 $SC_LENGTH_CONST (change of tool components on change of planes)
● Setting data:
SD42950 $SC_TOOL_LENGTH_TYPE (allocation of the tool length components
independent of tool type)
● The orientation component of the current complete frame (rotation and mirroring, no work
offsets or scales)
● The orientation component and the resulting length of the active toolholder with
orientation capability
● The orientation component and the resulting length of an active transformation
● In addition to the data describing the environment of the tool, the T number, D number
and DL number of the active tool are also stored, so that the tool can be accessed later in
the same environment as the TOOLENV call, without having to name the tool again.

Not in the tool environment


The value of the machine data determines whether the adapter length or the tool base
dimension is included in the tool length calculation:
MD18104 $MN_MM_NUM_TOOL_ADAPTER (tool adapter in TO area).
Since a change to this machine data only takes effect after Power On, it is not saved in the
tool environment.

Note
Resulting length of toolholders with orientation capability and transformations:
Both toolholders with orientation capability and transformations can use system variables or
machine data, which act as additional tool length components, and which can be subjected
partially or completely to the rotations performed. The resulting additional tool length
components must also be stored when TOOLENV is called, because they represent part of
the environment, in which the tool is used.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1531
Tool Offset (W1)
Working with tool environments

Adapter transformation:
The adapter transformation is a property of the tool adapter and thus of the complete tool. It
is, therefore, not part of a tool environment, which can be applied to another tool.
By saving the complete data necessary to determine the overall tool length, it is possible to
calculate the effective length of the tool at a later point in time, even if the tool is no longer
active or if the conditions of the environment (e.g. G codes or setting data) have changed.
Similarly, the effective length of different tool can be calculated assuming that it would be
used under the same conditions as the tool, for which the status was saved.

TOOLENV function
Saving a tool environment
The TOOLENV function is a predefined subprogram. It must, therefore, be programmed in a
separate block.

Syntax:
Status = TOOLENV(_NAME)

Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: No more free memory locations for tool environments available.
-3: Null string illegal as name of a tool environment.
-4: No parameter (name) specified.

_NAME STRING
Name, under which the current data set is stored.
If a data set of the same name already exists, it is overwritten. In this case, the status
is 0.

Basic Functions
1532 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Working with tool environments

17.12.3 Delete tool environment

DELTOOLENV function
This function can be used to delete sets of data used to describe tool environments. Deletion
means that the set of data stored under a particular name can no longer be accessed (an
access attempt triggers an alarm).
The DELTOOLENV function is a predefined subprogram.
It must, therefore, be programmed in a separate block.

Syntax:
There are two call formats:
Status = DELTOOLENV()
Status = DELTOOLENV(_NAME)

Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in
TO area).
i.e. the "tool environments" functionality is not available.
-2: A tool environment with the specified name does not exist.

_NAME STRING
Name of data set to be deleted

The first call format deletes all data sets.


The second call format deletes the data set with the specified name.
Data sets can only be deleted using the DELTOOLENV command, by an INITIAL.INI
download or by a cold start (NCK powerup with default machine data). There are no further
automatic deletion operations (e.g. on RESET).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1533
Tool Offset (W1)
Working with tool environments

17.12.4 How many environments and which ones are saved?

$P_TOOLENVN
This system variable returns the number of available data sets for describing tool
environments. (Data sets defined by TOOLENV and not yet deleted.)
The value range is from 0 to machine data:
MD18116 $MN_MM_NUM_TOOL_ENV (number of tool environments in TO area).
This system variable can be accessed even if no tool environments are possible (MD18116
= 0). In this case, the return value is 0.

Syntax:
_N = $P_TOOLENVN

Data type:
_N INT
Number of defined TOOLENV

$P_TOOLENV
This system variable returns the number of the nth data set for describing a tool
environment.
The assignment of numbers to data sets is not fixed, but can be changed as a result of
deleting or creating data sets. The data sets are numbered internally. The range is from 1 to
$P_TOOLENVN.

Syntax:
_NAME = $P_TOOLENV[i]

Data type:
_NAME STRING
Name of the data set with number i
i INT
Number of the data set.
If an index is specified, which does not point to a defined data set, the following alarm is
output:
Alarm "17020 (inadmissible array-index1)"

Basic Functions
1534 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Working with tool environments

17.12.5 Read T, D, DL from a tool environment

GETTENV function
The GETTENV function is used to read the T, D and DL numbers stored in a tool
environment.
The GETTENV function is a predefined subprogram. It must, therefore, be programmed in a
separate block.

Syntax:
Status = GETTENV(_NAME, _TDDL)

Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: A tool environment with the name specified in _NAME does not exist.

_NAME STRING
Name of the tool environment, from which the T, D and DL numbers can be read

_TDDL[3] INT
This integer array contains:
- in "_TDDL[0]" the T number of the tool,
- in "_TDDL[1]" the D number of the tool,
- in "_TDDL[2]" the DL number of the tool,
whose tool environment in the data set is stored with the name "_NAME".

It is possible to omit the first parameter in the GETTENV function call (e.g. GETTENV(, _TDDL))
or to pass a null string as the first parameter (e.g. GETTENV("", _TDDL)). In both of these two
special cases, the T, D and DL numbers of the active tool are returned in _TDDL.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1535
Tool Offset (W1)
Working with tool environments

17.12.6 Read tool lengths, tool length components

GETTCOR function
The GETTCOR function is used to read out tool lengths or tool length components.
The parameters can be used to specify, which components are considered, and the
conditions, under which the tool is used.
The GETTCOR function is a predefined subprogram. It must, therefore, be programmed in a
separate block.

Syntax:
Status = GETTCOR(_LEN, _COMP, _STAT, _T, _D, _DL)
All parameters can be omitted with the exception of the first parameter (_LEN).

Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: A tool environment with the name specified in _STAT does not exist.
-3: Invalid string in parameter _COMP.
Causes of this error can be invalid characters or characters programmed twice.
-4: Invalid T number
-5: Invalid D number
-6: Invalid DL number
-7: Attempt to access non-existent memory module
-8: Attempt to access a non-existent option (programmable tool orientation, tool
management).
-9: The _COMP string contains a colon (identifier for the specification of a coordinate
system), but it is not followed by a valid character denoting the coordinate
system.

_LEN[11] REAL
Result vector
The vector components are arranged in the following order:
Tool type (LEN[0])
Length of cutting edge (LEN[1])

Basic Functions
1536 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Working with tool environments

Abscissa (LEN[2])
Ordinate (LEN[3])
Applicate (LEN[4])
Tool radius (LEN[5])
The coordinate system defined in _COMP and _STAT is used as the reference coordinate
system for the length components. If no coordinate system is defined in _COMP, the tool
lengths are represented in the machine coordinate system.
The assignment of the abscissa, ordinate and applicate to the geometry axes depends on
the active plane in the tool environment, i.e. with G17, the abscissa is parallel to X, with
G18 it is parallel to Z, etc.
Components LEN[6] to LEN[10] contain the additional parameters, which can be used to
specify the geometry description of a tool (e.g. $TC_DP7 to $TC_DP11 for the geometry
and the corresponding components for wear or sum and setup offsets).
These 5 additional elements and the tool radius are only defined for components E, G, S,
and W. Their evaluation does not depend on _STAT. The corresponding values in LEN[5]
to LEN[10] can thus only be not equal to zero if at least one of the four specified
components is involved in the tool length calculation. The remaining components do not
influence the result. The dimensions refer to the control's basic system (inch or metric).

_COMP STRING
This string consists of two substrings, which are separated from one another by a colon.
The individual characters (letters) of the first substring identify the tool length
components to be taken into account when calculating the tool length.
The second substring identifies the coordinate system, in which the tool length is to be
output. It consists of only one single relevant character.
The order of the characters in the strings, and their notation (upper or lower case), is
arbitrary. Any number of blanks or white spaces can be inserted between the
characters.
The letters in the substrings cannot be programmed twice. The meanings in the first
substring are as follows:
-: (Minus symbol, only allowed as first character): The complete tool length is
calculated, minus the components specified in the next string.
C: Adapter or tool base dimension (whichever of the two alternative components is
active for the tool in use)
E: Setup offsets
G: Geometry
K: Kinematic transformation (is only evaluated for generic 3, 4 and 5-axis
transformation)
S: Sum offsets
T: Toolholder with orientation capability
W: Wear

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1537
Tool Offset (W1)
Working with tool environments

If the first substring is empty (except for white spaces), the complete tool length is
calculated allowing for all components. This applies even if the _COMP parameter is not
specified.
An optional programmable colon must be followed by a single character specifying the
coordinate system, in which the tool length components are to be evaluated. If no
coordinate system is specified, the evaluation is performed in the MCS (machine
coordinate system). If any rotations are to be taken into account, they are specified in
the tool environment defined in _STAT.
The characters have the following significance:
B: Basic coordinate system (BCS)
K: Tool coordinate system of kinematic transformation (KCS)
M: Machine coordinate system (MCS)
T: Tool coordinate system (TCS)
W: Workpiece coordinate system (WCS)

_STAT STRING
Name of the data set for describing a tool environment.
If the value of this parameter is the null string ("") or is not specified, the current status is
used.

_T INT
Internal T number of tool
If this parameter is not specified, or if its value is 0, the tool stored in _STAT is used.
If the value of this parameter is -1, the T number of the active tool is used. It is also
possible to specify the number of the active tool explicitly.

Note
If _STAT is not specified, the current status is used as the tool environment. Since _T = 0
refers to the T number saved in the tool environment, the active tool is used in that
environment, i.e. parameters _T = 0 and _T = -1 have the same meaning in this special case.

_D INT
Cutting edge of the tool. If this parameter is not specified, or if its value is 0, the D
number used is based on the source of the T number. If the T number from the tool
environment is used, the D number of the tool environment is also read, otherwise the D
number of the currently active tool is read.

Basic Functions
1538 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Working with tool environments

_DL INT
Number of the local compensation. If this parameter is not specified, the DL number
used is based on the source of the T number. If the T number from the tool environment
is used, the D number of the tool environment is also read, otherwise the D number of
the currently active tool is read.

Any rotations and component exchanges initiated by the adapter transformation, toolholder
with orientation capability and kinematic transformation, are part of the tool environment.
They are thus always performed, even if the corresponding length component is not
supposed to be included. If this is undesirable, tool environments must be defined, in which
the corresponding transformations are not active. In many cases (i.e. any time a
transformation or toolholder with orientation capability is not used on a machine), the data
sets stored for the tool environments automatically fulfill these conditions, with the result that
the user does not need to make special provision.

MD20360 $MC_TOOL_PARAMETER_DEF_MASK
The two least significant bits of this machine data specify how the wear (bit 0) and tool length
(bit 1) are to be evaluated if a diameter axis is used for turning and grinding tools.
If the bits are set, the associated entry is weighted with the factor 0.5. This weighting is
reflected in the tool length returned by GETTCOR.
Example:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK = 3 (definition of tool parameters).
MD20100 $MC_DIAMETER_AX_DEF="X" (Geometry axis with face axis funtion)
X is diameter axis (standard turning machine configuration):

N30 $TC_DP1[1.1] = 500


N40 $TC_DP2[1.1] = 2
N50 $TC_DP3[1.1] = 3.0 ; Geometry L1
N60 $TC_DP4[1,1]= 4.0
N70 $TC_DP5[1,1]= 5.0
N80 $TC_DP12[1,1]= 12.0 ; Wear L1
N90 $TC_DP13[1,1]= 13.0
N100 $TC_DP14[1,1]= 14.0
N110 t1 d1 g18
N120 r1 = GETTCOR(_LEN, "GW")
N130 r3 = _LEN[2] ; 17.0 (= 4.0 + 13.0)
N140 r4 = _LEN[3] ; 7.5 (= 0.5 * 3.0 + 0.5 * 12.0)
N150 r5 = _LEN[4] ; 19.0 (= 5.0 + 14.0)
N160 m30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1539
Tool Offset (W1)
Working with tool environments

Kinematic transformation, toolholder with orientation capability


If a toolholder with orientation capability is taken account of during the tool length calculation,
the following vectors are included in that calculation:

Type Vectors
M l1 and l2
T l1, l2 and l3
P Tool length is not influenced by the toolholder with orientation capability.

In generic 5-axis transformation, the following machine data are included in the tool length
calculation for transformer types 24 and 56:

Transformer Machine data


type
24 MD24550/24650 $MC_TRAFO5_BASE_TOOL_1/2
MD24560/24660 $MC_TRAFO5_JOINT_OFFSET_1/2
MD24558/24658 $MC_TRAFO5_PART_OFFSET_1/2
56 MD24550/24650 $MC_TRAFO5_BASE_TOOL_1/2
MD24560/24660 $MC_TRAFO5_JOINT_OFFSET_1/2

Transformation type 56 corresponds to type M for a toolholder with orientation capability.


With this 5-axis transformation in the software versions used up to now, the following vector
is equivalent to the sum of the two vectors l1 and l3 for a toolholder with orientation capability
type M.
MD24560/24660 $MC_TRAFO5_JOINT_OFFSET_1/2 (vector of kinematic offset of the
first/second 5-axis transformation in the channel)
Only the sum is relevant for the transformation in both cases. The way, in which the two
individual components are composed, is insignificant. When calculating the tool length,
however, it is relevant which component is assigned to the tool and which is assigned to the
tool table.
This explains the introduction of new machine data:
MD24558/24658 $MC_TRAFO5_JOINT_OFFSET_PART_1/2 (vector kinematic offset in
table).
It is equivalent to the vector l3.
The following machine data no longer corresponds to the sum of l1 and l3, but only to vector l1.
MD24560/24660 $MC_TRAFO5_JOINT_OFFSET_1/2 (vector of kinematic offset of the first
5-axis transf. in the channel).
The new response is identical to the current response, if the following machine data equals
zero:
MD24558/24658 $MC_TRAFO5_JOINT_OFFSET_PART_1/2 (vector kinematic offset in
table).

Basic Functions
1540 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Working with tool environments

GETTCOR examples

GETTCOR(_LEN): Calculates the tool length of the currently active tool in the machine
coordinate system allowing for all components.
GETTCOR(_LEN; "CGW : Calculates the tool length for the active tool, consisting of the adapter
W" ): or tool base dimension, geometry and wear. Further components,
such as toolholder with orientation capability or kinematic
transformation, are not considered. The workpiece coordinate system
is used for the output.
GETTCOR(_LEN, "-K :B" ): Calculates the complete tool length of the active tool without allowing
for the length components of an active kinematic transformation.
Output in the basic coordinate system.
GETTCOR(_LEN, ":M", Calculates the complete tool length in the machine coordinate system
"Testenv1",,3): for the tool stored in the tool environment named "Testenv1". The
calculation is performed for cutting edge number D3, regardless of the
cutting edge number stored.

Compatibility
The GETTCOR function is used in conjunction with the TOOLENV and SETTCOR functions to
replace parts of the functionality, which were previously implemented externally in the
measuring cycles.
Only some of the parameters, which actually determine the effective tool length, were
implemented in the measuring cycles. The above functions can be configured to reproduce
the behavior of the measuring cycles in relation to the tool length calculation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1541
Tool Offset (W1)
Tool lengths L1, L2, L3 assignment: LENTOAX

17.13 Tool lengths L1, L2, L3 assignment: LENTOAX

LENTOAX function
The "LENTOAX" function provides information about the assignment of tool lengths L1, L2
and L3 of the active tool to the abscissa, ordinate and applicate. The assignment of
abscissa, ordinate and applicate to the geometry axes is affected by frames and the active
plane (G17 - G19).
Only the geometry component of a tool ($TC_DP3[x,y] to $TC_DP5[x,y]) is considered, i.e. a
different axis assignment for other components (e.g. wear) has no effect on the result.
The "LENTOAX" function is a predefined subprogram. It must, therefore, be programmed in
a separate block.

Syntax:
Status = LENTOAX(_AXIND, _MATRIX, _COORD)
The first two parameters must always be programmed; the last parameter can be
omitted.

Value/parameter:
Status INT
0: Function OK, information in _AXIND sufficient for description (all tool length
components are parallel to the geometry axes).
1: Function is OK, however, the content of _MATRIX must be evaluated for a correct
description (the tool length components are not parallel to the geometry axes).
-1: Invalid string in parameter _COORD.
-2: No tool active.

_AXIND[3] INT array


Indices 0 to 2 are assigned to the abscissa (0), ordinate (1) and applicate (2) (e.g.
_AXIND[0] contains the number of the tool length components, which are effective in
the direction of the abscissa).
The content has the following significance:
0: Assignment exists (axis does not exist)
1 to 3: Number of the length effective in the corresponding coordinate axis. The
or sign is negative if the tool length component is pointing in the negative
-1 to -3: coordinate direction.

Basic Functions
1542 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool lengths L1, L2, L3 assignment: LENTOAX

_MATRIX[3][3] REAL array


Matrix, which represents the vector of the tool lengths (L1=1, L2=1, L3=1) to the
vector of the coordinate axes (abscissa, ordinate, applicate), i.e. the tool length
components are assigned to the columns in the order L1, L2, L3 and the axes are
assigned to the lines in the order abscissa, ordinate, applicate.
All elements are always valid in the matrix, even if the geometry axis belonging to the
coordinate axis is not available, i.e. if the corresponding entry in _AXIND is 0.

_COORD STRING
Specifies the coordinate system used for the assignment.
MCS or M: The tool length is represented in the machine coordinate system.
BCS or B: The tool length is represented in the basic coordinate system.
WCS or W: The tool length is represented in the workpiece coordinate system
(default).
KCS or K: The tool length is represented in the tool coordinate system of the
kinematic transformation.
TCS or T: The tool length is represented in the tool coordinate system.
The notation of the characters in the string (upper or lower case) is arbitrary.

Further explanations
If the tool length components are parallel to the geometry axes, the axis indices assigned to
length components L1 to L3 are returned in the _AXIND array.
If a tool length component points in the negative axis direction, the associated axis index
contains a minus sign. In this case, the return value (status) is 0. If an axis does not exist,
the associated return value is 0. The assignment can also be read from the _MATRIX
parameter. Six of the nine matrix elements are then zero, and three elements contain the
value +1 or -1.

Note
In the TCS, all tool length components are always parallel or antiparallel to the axes.
The components can only be antiparallel when mirroring is active and the following setting
data is activated:
SD42900 $SC_MIRROR_TOOL_LENGTH (Sign change tool length when mirroring)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1543
Tool Offset (W1)
Tool lengths L1, L2, L3 assignment: LENTOAX

If not all length components are parallel or antiparallel to the geometry axes, the index of the
axis, which contains the largest part of a tool length component, is returned in _AXIND. In
this case (if the function does not return an error for a different reason), the return value is 1.
The mapping of tool length components L1 to L3 onto geometry axes 1 to 3 is then
described completely by the contents of the 3rd parameter _MATRIX.
The _COORD parameter can be used to specify, which coordinate system is to be used for
the geometry axes. If the _COORD parameter is not specified (notation LENTOAX(_AXIND,
_MATRIX)), the WCS is used (default).
Example:
Standard situation: milling tool with G17
L1 applies in Z (applicate), L2 applies in Y (ordinate), L3 applies in X (abscissa).
Function call in the form:
Status = LENTOAX(_AXIND, _MATRIX, "WCS")
The result parameter _AXIND contains the values:
_AXIND[0] = 3
_AXIND[1] = 2
_AXIND[2] = 1
Or, in short: ( 3, 2, 1)
In this case, the associated matrix _MATRIX is:


B0$75,;  


A change from G17 to G18 or G19 does not alter the result, because the assignment of the
length components to the geometry axes changes in the same way as the assignment of the
abscissa, ordinate and applicate.
A frame rotation of Z through 60 degrees is now programmed with G17 active, e.g. rot
Z60. The direction of the applicate (Z direction) remains unchanged; the main component of
L2 now lies in the direction of the new X axis; the main component of L1 now lies in the
direction of the negative Y axis. The return axis is thus 1, and _AXIND contains the values
(2, -3, 1).

Basic Functions
1544 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Tool lengths L1, L2, L3 assignment: LENTOAX

In this case, the associated matrix _MATRIX is:

VQ  V 


B0$75,;  V  VQ 


Note
For further information to the above mentioned coordinate systems, please refer to:
References:
/PGA/ Programming Manual Work Preparation; Tool Compensations

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1545
Tool Offset (W1)
Supplementary conditions

17.14 Supplementary conditions

17.14.1 Flat D number structure

Grinding tools
Grinding tools (tool types 400-499) cannot be defined using the simple tool management
structure (flat D numbers).

Block search
T number output to PLC triggers a synchronization process in the NCK: with absolute,
indirect D programming, the PLC returns the D values via VDI. The NCK waits until the
output of a T number is followed by a response from the PLC: "I have written the D number".
With block search without calculation, this process of synchronization must be deactivated
until the first valid T number has been output again. That means that the NCK must not wait
on D programming.

Note
At what point the auxiliary functions can be output to PLC after block search is complete, can
be controlled with the machine data:
$MC_AUXFU_AT_BLOCK_SEARCH_END (auxiliary function output after block search)
Automatic on end or on NC start.

REORG
The (only) writable variable $A_MONIFACT, which is defined here, is stored by main-run
data. Since the write process takes place synchronously to the main run, no special
measures are required for Reorg.

17.14.2 SD42935 expansions

SD42935
Which of the wear components are to be transformed and which are not to be transformed in
conjunction with the functions TOWMCS and TOWWCS can be defined via the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformation of wear values)

Basic Functions
1546 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Examples

17.15 Examples

17.15.1 Toolholder with orientation capability

17.15.1.1 Example: Toolholder with orientation capability

Requirement
The following example uses a toolholder, which is described fully by a rotation about the
Y axis. It is therefore sufficient to enter only one value to define the rotary axis (block N20).
Blocks N50 to N70 describe an end mill with radius 5 mm and length 20 mm.
Block N90 defines a rotation of 37 degrees about the Y axis.
Block N120 activates the tool radius compensation and all settings are made to describe the
compensation in the following blocks with a rotation of 37 degrees about the Y axis.

N10 ; Definition of toolholder 1


N20 $TC_CARR8[1] = 1 ; Component of the first rotary axis in
the Y direction
N30
N40 ; Definition of tool-compensation memory
T1/D1
N50 $TC_DP1[1,1] = 120 ; End mill
N60 $TC_DP3[1,1] = 20 ; Length 1
N70 $TC_DP6[1,1] = 5 ; Radius
N80
N90 ROT Y37 ; 37-degree rotation about y axis
N100
N110 X0 Y0 Z0 F10000
N120 G42 CUT2DF TCOFR TCARR = 1 T1 D1 X10
N130 X40
N140 Y40
N150 X0
N160 Y0
N170 M30

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1547
Tool Offset (W1)
Examples

17.15.1.2 Example of toolholder with orientation capability with rotary table

Use of the MOV command


For use of the MOVT command it is assumed that the program is running on a 5-axis
machine, on which the tool rotates about the Y axis in case of a rotation of the B axis:

N10 TRAORI()
N20 X0 X0 Z0 B45 F2000 ; Setting the tool orientation
N30 MOVT=-10 ; Infeed movement 10 mm in tool
direction
; (under 45 degrees in the Y-Z plane)
N40 MOVT=AC(20) ; Retraction in tool direction at
distance of
; 20 mm from the zero point

Machine with rotary table


Complete definition for the use of a toolholder with orientation capability with rotary table:

N10 $TC_DP1[1,1]=120
N20 $TC_DP3[1,1]= 13 ; Tool length 13 mm

; Definition of toolholder 1:

N30 $TC_CARR1[1] = 0 ; X component of 1st offset vector


N40 $TC_CARR2[1] = 0 ; Y component of 1st offset vector
N50 $TC_CARR3[1] = 0 ; Z component of 1st offset vector

N60 $TC_CARR4[1] = 0 ; X component of 2nd offset vector


N70 $TC_CARR5[1] = 0 ; Y component of 2nd offset vector
N80 $TC_CARR6[1] = -15 ; Z component of 2nd offset vector

N90 $TC_CARR7[1] = 1 ; X component of 1st axis


N100 $TC_CARR8[1] = 0 ; Y component of 1st axis
N110 $TC_CARR9[1] = 0 ; Z component of 1st axis

N120 $TC_CARR10[1] = 0 ; X component of 2nd axis


N130 $TC_CARR11[1] = 1 ; Y component of 2nd axis
N140 $TC_CARR12[1] = 0 ; Z component of 2nd axis

N150 $TC_CARR13[1] = 30 ; Angle of rotation of 1st axis


N160 $TC_CARR14[1] =-30 ; Angle of rotation of 2nd axis

Basic Functions
1548 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Examples

N170 $TC_CARR15[1] = 0 ; X components of 3rd offset vector


N180 $TC_CARR16[1] = 0 ; Y component of 3rd offset vector
N190 $TC_CARR17[1] = 0 ; Z component of 3rd offset vector

N200 $TC_CARR18[1] = 0 ; X component of 4th offset vector


N210 $TC_CARR19[1] = 0 ; Y component of 4th offset vector
N220 $TC_CARR20[1] = 15 ; Z component of 4th offset vector

N230 $TC_CARR21[1] = A ; Reference for 1st axis


N240 $TC_CARR22[1] = B ; Reference for 2nd axis
N250 $TC_CARR23[1] = "P" ; Toolholder type

N260 X0 Y0 Z0 A0 B45 F2000


N270 TCARR=1 X0 Y10 Z0 T1 TCOABS
N280 PAROT
N290 X0 Y0 Z0
N300 G18 MOVT=AC(20)
N310 G17 X10 Y0 Z0
N320 MOVT=-10
N330 PAROTOF
N340 TCOFR
N350 X10 Y10 Z-13 A0 B0
N360 ROTS X-45 Y45
N370 X20 Y0 Z0 D0
N380 Y20
N390 X0 Y0 Z20
N400 M30

The definition of the toolholder with orientation capability is given in full. The components
which contain the value 0 need not actually be given, as they are preset to zero in any case.
The toolholder is activated in N270.
As $TC_CARR21 and $TC_CARR22 refer to the machine axes A and B and TCOABS is
active, the values in $TC_CARR13 and $TC_CARR14 are ignored, i.e. the axis position A0
B45 is used for the rotation.
The rotation of the 4th offset vector (length 15 mm in Z direction) around the B axis causes
an offsetting of the zero point by X10.607 [= 15 * sin(45)] and Z-4.393 [= -15 * (1. - cos(45))].
This zero offset is taken into account by an automatically written basic or system frame so
that the position X10.607 Y10.000 Z8.607 is approached. In the Z direction the tool selection
leads to an additional offset of 13 mm; the Y component is not affected by the table rotation.
N280 defines a rotation in accordance with the rotation of the table of the toolholder with
orientation capability. The new X direction thus points in the direction of the bisecting line in
the 4th quadrant, the new Z axis in the direction of the bisecting line in the 1st quadrant.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1549
Tool Offset (W1)
Examples

The zero point is approached in N290, i.e. the machine position X10.607 Y0 Z-4.393, since
the position of the zero point is not changed by the rotation.
N300 traverses in Y to the position Y33.000, since G18 is active and the Y component is not
affected by the active frame. The X and Z positions remain unchanged.
The position X17.678 Y0 Z1.536 is approached in N310.
N320 changes only the Z position to the value -8.464 as a result of the MOVT command.
As only the table can be rotated, the tool orientation remains unchanged parallel to the
machine Z direction, even if the Z direction of the active frame is rotated by 45 degrees.
N330 deletes the basic or system frame; thus the frame definition from N280 is undone.
In N340, TCOFR specifies that the toolholder with orientation capability is to be aligned
according to the active frame. Since a rotation is no longer active in N330 due to the
PAROTOF command, the initial state is applied. The frame offset becomes zero.
N350 thus approaches the position X10 X10 Z0 (= Z-13 + tool length). Note: Through the
simultaneous programming of both rotary axes A and B the actual position of the toolholder
with orientation capability is made to match that used in N340. The position approached by
the three linear axes is dependent on this position, however.
In N360, solid angles are used to define a plane whose intersecting lines in the X-Z and in
the Y-Z plane each form an angle of +45 degrees or -45 degrees with the X or Y axis. The
plane defined in such a way therefore has the following position: the surface normal points
towards the solid diagonals.
N370 traverses to the position X20 Y0 Z0 in the new coordinate system. Since the tool is
deselected with D0 at the same time, there is no longer an additional offset in Z. Since the
new X axis lies in the old X-Z plane, this block reaches the machine position X14.142 Y0 Z-
14.142.
N380 only traverses on the Y axis in the rotated coordinate system. This leads to a motion
of all three machine axes. The machine position is X5.977 Y16.330 Z-22.307.
N390 approaches a point on the new Z axis. Relative to the machine axes this is thus on the
solid diagonal. All three axes thus reach the position 11.547.

Basic Functions
1550 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Examples

17.15.1.3 Basic tool orientation example

Basic orientation in the bisector


A milling tool is defined with length L1=10 whose basic orientation is in the bisector of the
X-Z plane.

N10 $TC_DP1[1,1]=120
N20 $TC_DP3[1,1]=10
N30 $TC_DPV [1,1] = 0
N40 $TC_DPV3[1,1] = 1
N50 $TC_DPV4[1,1] = 0
N60 $TC_DPV5[1,1] = 1
N70 g17 f1000 x0 y0 z0 t1 d1
N80 movt=10
N80 m30

Description of example:
In N10 to N60, a milling tool is defined with length L1=10 (N20). The basic orientation is in
the bisector of the X-Z plane N40 to N60.
In N70, the tool is activated and the zero position is approached. As a result of the tool length
the machine positions X0 Y0 Z10 are thus obtained in this block.
In N80 an incremental traversing motion is performed from 10 into tool direction. The
resulting axis positions are thus X7.071 Y0 Z17.071.

17.15.1.4 Calculation of compensation values on a location-specific and workpiece-specific basis

Tool with adapter


A tool with adapter and toolholder with orientation capability is defined in the following
program example. In order to simplify the overview, only length L1 is different to zero for the
additive and insert offsets and for the adapter in case of the tool itself. The offset vectors of
the toolholder with orientation capability are all zero.

N10 $TC_TP2[1] = "MillingTool" ; Name of identifier


N20 $TC_TP7[1]=9 ; Location types
N30 $TC_TP8[1]=2 ; Status: enabled and not blocked

; D corr. D=1

N40 $TC_DP1[1,1]=120 ; Tool type - milling


N50 $TC_DP3[1,1]=; tool length compensation
vector
N60 $TC_DP12[1,1]= ; wear

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1551
Tool Offset (W1)
Examples

N70 $TC_SCP13[1,1]=0.1 ; Sum offset DL=1


N80 $TC_ECP13[1,1]=0.01 ; Insert offset DL=1
N90 $TC_ADPTT[1]=5 ; Adapter transformation
N100 $TC_ADPT1[1]=0.001 ; Adapter dimension

; Magazine data
N110 $TC_MAP1[1]=3 ; Magazine type: Revolver
N120 $TC_MAP2[1]="Revolver" ; Magazine identifier
N130 $TC_MAP3[1]=17 ; Status of magazine
N140 $TC_MAP6[1]=1 ; Dimension - line
N150 $TC_MAP7[1]=2 ; Dimension - column -> 2 positions
N160 $TC_MPP1[1,1]=1 ; Location type
N170 $TC_MPP2[1,1]=9 ; Location types
N180 $TC_MPP4[1,1]=2 ; Location state
N190 $TC_MPP7[1,1]=1 ; Bring adapter into position
N200 $TC_MPP6[1,1]=1 ; T number "MillingTool"
N210 $TC_MAP1[9999]=7 ; Magazine type: buffer
N220 $TC_MAP2[9999]="buffer" ; Magazine identifier
N230 $TC_MAP3[9999]=17 ; Status of magazine
N240 $TC_MAP6[9999]=1 ; Dimension - line
N250 $TC_MAP7[9999]=1 ; Dimension - column -> 1 position
N260 $TC_MPP1[9999.1]=2 ; Location type
N270 $TC_MPP2[9999.1]=9 ; Location types
N280 $TC_MPP4[9999.1]=2 ; Location state
N290 $TC_MPP5[9999,1]=1 ; Spindle no. 1
N300 $TC_MDP2[1,1]=0 ; Distance from spindle to mag. 1

; Definition of toolholder 1
N310 $TC_CARR10[1] = 1 ; Component of 2nd rotary axis in X
direction
N320 $TC_CARR14[1] = 45 ; Angle of rotation of 2nd axis
N330 $TC_CARR23[1] = "T" ; Tool mode
N340 Stopre
N350 $SC_WEAR_TRANSFORM = 'B101'
N360 T0 D0 DL=0
N370 ROT X30
N380 G90 G1 G17 F10000 X0 Y0 Z0
N390 T="MillingTool" X0 Y0 Z0 TOWSTD ; X 0.000 Y11.110 Z 0.001
N400 T="MillingTool" X0 Y0 Z0 TOWMCS ; X 0.000 Y10.100 Z 1.011
N410 T="MillingTool" X0 Y0 Z0 TOWWCS ; X 0.000 Y 9.595 Z 0.876
N420 TCARR=1 X0 Y0 Z0 ; X 0.000 Y 6.636 Z 8.017
N430 G18 X0 Y0 Z0 ; X10.100 Y-0.504 Z 0.876
N440 m30

Basic Functions
1552 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Examples

Explanations regarding the example above


Starting at block N390, various methods are used to approach position X0 Y0 Z0.
The machine positions reached are specified in the blocks in comments. After the program a
description is given of how the positions were reached.
N390: The adapter transformation 5 (block N90) transforms length L1 into length L2.
Only the actual adapter dimension is not subject to this transformation. The Y value (L2 with
G17) results from the sum of the tool length (10), tool wear (1), sum offset (0.1), and insert
offset (0.01). The adapter dimension (0.001) is in Z (L1).
N400: In block N350, bits 0 and 2 are enabled in setting data:
SD42935 $SC_WEAR_TRANSFORM (transformations for tool components)
This means that the tool wear and the insert offset are not subject to the adapter
transformation because of TOWMCS in block N400. The sum of these two compensations is
1.01. The Z position is, therefore, increased by this amount and the Y position is reduced by
this amount compared with block N390.
TOWWCS is active in N410. The sum of the tool wear and the insert offset is thus effective in
the active workpiece coordinate system. In block N370, a rotation through 30 degrees is
activated about the X axis. The original compensation value of 1.01 in the Z direction thus
yields a new Z component of 0.875 ( = 1.01 * cos(30)) and a new Y component of -0.505 ( =
1.01 * sin(30)). This yields the dimension specified in the program comment when added to
the sum of the tool length, sum offset and adapter dimension produced in block N390.
In addition, a toolholder with orientation capability is activated in block N420. This executes a
rotation through 45 degrees about the X axis (see N310 - N330). Since all offset vectors of
the toolholder are zero, there is no additional zero offset. The toolholder with orientation
capability acts on the sum of the tool length, sum offset and adapter dimension. The
resulting vector component is X0 Y7.141 Z7.142. To this, as in block N410, the sum of
tool wear and insert offset evaluated in WCS is added.
G18 is activated in N430. The components of the sum of the tool length, sum offset and
adapter dimension are interchanged accordingly. The toolholder with orientation capability
continues to act on this new vector (rotation through 45 degrees about X axis). The resulting
vector component thereby is X10.100 Y0.0071 Z0.0071. The vector formed from tool
wear and insert offset (X0 Y-0.505 Z0.875) is not affected by the change of plane. The
sum of the two vectors yields the dimension specified in the comment in N430.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1553
Tool Offset (W1)
Examples

17.15.2 Examples 3-6: SETTCOR function for tool environments

Example 3

N10 def real _CORVAL[3]


N20 $TC_DP1[1,1] = 120 ; Milling tool
N30 $TC_DP3[1,1] = 10.0 ; Geometry L1
N40 $TC_DP12[1,1] = 1.0 ; Wear L1
N50 _CORVAL[0] = 0.333
N60 t1 d1 g17 g0
N70 r1 = settcor(_CORVAL, "GW", 0, 2, 2)
N80 t1 d1 x0 y0 z0 ; ==> MCS position X0.000 Y0.000
Z0.333
N90 M30

_CORCOMP is 2, therefore, the compensation effective in the Z direction is entered in the


geometry component (the old value is overwritten) and the wear value is deleted. The
resulting total tool length is thus:
L1 = 0.333 + 0.0 = 0.333.

Example 4

N10 def real _CORVAL[3]


N20 $TC_DP1[1,1] = 120 ; Milling tool
N30 $TC_DP3[1,1] = 10.0 ; Geometry L1
N40 $TC_DP12[1,1] = 1.0 ; Wear L1
N50 _CORVAL[0] = 0.333
N60 t1 d1 g17 g0
N70 r1 = settcor(_CORVAL, "GW", 0, 3, 2)
N80 t1 d1 x0 y0 z0 ;==> MCS position X0.000 Y0.000
Z11.333
N90 M30

_CORCOMP is 3, therefore, the wear value and compensation value are added to the
geometry component and the wear component is deleted. The resulting total tool length is
thus L1 = 11.333 + 0.0 = 11.333.

Example 5

N10 def real _CORVAL[3]


N20 $TC_DP1[1,1] = 120 ; Milling tool
N30 $TC_DP3[1,1] = 10.0 ; Geometry L1

Basic Functions
1554 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Examples

N40 $TC_DP12[1,1] = 1.0 ; Wear L1


N50 _CORVAL[0] = 0.333
N60 t1 d1 g17 g0
N70 r1 = settcor(_CORVAL, "GW", 0, 3, 0)
N80 t1 d1 x0 y0 z0 ;==> MCS position X0.333 Y0.000
Z11.000
N90 M30

_CORCOMP is 3, as in the previous example, but the compensation is now effective on the
geometry axis with index 0 (X axis). The tool components L3 are assigned to this geometry
axis due to G17 with a milling tool. Calling SETTCOR thus does not affect tool parameters
$TC_DP3 and $TC_DP12. Instead, the compensation value is entered in $TC_DP5.

Example 6

N10 def real _CORVAL[3]


N20 $TC_DP1[1,1] = 500 ; Turning tool
N30 $TC_DP3[1,1] = 10.0 ; Geometry L1
N40 $TC_DP4[1,1] = 15.0 ; Geometry L2
N50 $TC_DP12[1,1]= 10.0 ; Wear L1
N60 $TC_DP13[1,1] =0.0 ; Wear L2
N70 _CORVAL[0] = 5.0
N80 rot y 30
N90 t1 d1 g18 g0
N100 r1 = settcor(_CORVAL, "GW", 0, 3, 1)
N110 t1 d1 x0 y0 z0 ; ==> MCS position X24.330
Y0.000 Z17.500
N120 M30

The tool is a turning tool. A frame rotation is activated in N80, causing the basic coordinate
system (BCS) to be rotated in relation to the workpiece coordinate system (WCS). In the
WCS, the compensation value (N70) acts on the geometry axis with index 1, i.e. on the X
axis because G18 is active. Since "_CORRMODE = 3", the tool wear in the direction of the X
axis of the WCS must become zero once N100 has been executed. The contents of the
relevant tool parameters at the end of the program are thus:

$TC_DP3[1,1] : 21.830 ; Geometry L1


$TC_DP4[1,1] : 21.830 ; Geometry L2
$TC_DP12[1,1] : 2.500 ; Wear L1
$TC_DP13[1,1] : -4.330 ; Wear L2

The total wear including _CORVAL is mapped onto the X' direction in the WCS. This
produces point P2. The coordinates of this point (measured in X/Y coordinates) are entered
in the geometry component of the tool. The difference vector P2 - P1 remains in the wear.
The wear thus no longer has a component in the direction of _CORVAL.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1555
Tool Offset (W1)
Examples

; 3
; 3
 3
2ULJLQDO B&259$/ HIIHFWLYHLQ; GLUHFWLRQ
WRROOHQJWK
:HDU/ / 



*HRPHWU\/ / 

=
  

Figure 17-54 Tool length compensation, example 6

If the sample program is continued after N110 with the following instructions:

N120 _CORVAL[0] = 0.0


N130 r1 = settcor(_CORVAL, "GW", 0, 3, 0)
N140 t1 d1 x0 y0 z0 ; ==> MCS position X24.330 Y0.000
Z17.500

The remaining wear is included completely in the geometry because the compensation is
now effective in the Z' axis (parameter _GEOAX is 0). Since the new compensation value is
0, the total tool length and thus the position approached in N140 may not change. If
_CORVAL were not equal to 0 in N120, a new total tool length and thus a new position in
N140 would result, however, the wear component of the tool length would always be zero,
i.e. the total tool length is subsequently always contained in the geometry component of the
tool.
The same result as that achieved by calling the SETTCOR function with the _CORCOMP = 0
parameter twice can also be reached by calling _CORRCOMP = 1 (vectorial compensation)
just once:

N10 def real _CORVAL[3]


N20 $TC_DP1[1,1] = 500 ; Turning tool

Basic Functions
1556 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Examples

N30 $TC_DP3[1,1] = 10.0 ; Geometry L1


N40 $TC_DP4[1,1] = 15.0 ; Geometry L2
N50 $TC_DP12[1,1]= 10.0 ; Wear L1
N60 $TC_DP13[1,1] =0.0 ; Wear L2
N70 _CORVAL[0] = 0.0
N71 _CORVAL[1] = 5.0
N72 _CORVAL[2] = 0.0
N80 rot y 30
N90 t1 d1 g18 g0
N100 r1 = settcor(_CORVAL, "GW", 1, 3, 1)
N110 t1 d1 x0 y0 z0 ; ==> MCS position X24.330 Y0.000
Z17.500
N120 M30

In this case, all wear components of the tool are set to zero immediately after the first call of
SETTCOR in N100.

Example 7

N10 def real _CORVAL[3]


N20 $TC_DP1[1,1] = 500 ; Turning tool
N30 $TC_DP3[1,1] = 10.0 ; Geometry L1
N40 $TC_DP4[1,1] = 15.0 ; Geometry L2
N50 $TC_DP12[1,1]= 10.0 ; Wear L1
N60 $TC_DP13[1,1] =0.0 ; Wear L2
N70 _CORVAL[0] = 5.0
N80 rot y 30
N90 t1 d1 g18 g0
N100 r1 = settcor(_CORVAL, "GW", 3, 3)
N110 t1 d1 x0 y0 z0 ; ==> MCS position X25.000 Y0.000
Z15.000

As opposed to example 6, parameter _CORCOMP = 3, and so the _GEOAX parameter can


be omitted. The value contained in _CORVAL[0] now acts immediately on the tool length
component L1, the rotation in N80 has no effect on the result, the wear components in
$TC_DP12 are included in the geometry component together with _CORVAL[0], with the
result that the total tool length is stored in the geometry component of the tool, due to
$TC_DP13, after the first SETTCOR call in N100.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1557
Tool Offset (W1)
Examples

Example 8

N10 def real _CORVAL[3]


N20 $TC_DP1[1,1] = 500 ; Turning tool
N30 $TC_DP3[1,1] = 10.0 ; Geometry L1
N40 $TC_DP4[1,1] = 15.0 ; Geometry L2
N50 $TC_DP5[1,1] = 20.0 ; Geometry L3
N60 $TC_DP12[1,1]= 10.0 ; Wear L1
N70 $TC_DP13[1,1] =0.0 ; Wear L2
N80 $TC_DP14[1.1] =0.0 ; Wear L3
N90 $SC_WEAR_SIGN = TRUE
N100 _CORVAL[0] = 10.0
N110 _CORVAL[1] = 15.0
N120 _CORVAL[2] = 5.0
N130 rot y 30
N140 t1 d1 g18 g0
N150 r1 = settcor(_CORVAL, "W", 1, 1)
N160 t1 d1 x0 y0 z0 ; ==> MCS position X7.990 Y25.000
Z31.160

In N90 the setting data is enabled:


SD42930 $SC_WEAR_SIGN (sign of wear)
i.e. the wear must be valued with a negative sign.
The compensation is vectorial (_CORCOMP = 1), and the compensation vector must be
added to the wear (_CORMODE = 1). The geometric conditions in the Z/X plane are shown
in the figure below:

;
;
 5HVXOWLQJZHDUFRPSRQHQW

*HRPHWU\
/ / 
3

3
 B&259$/< ;  = 

 3   =
:HDU/ / 
QHJDWLYHHYDOXDWLRQ 2ULJLQDOWRROOHQJWK

Figure 17-55 Tool length compensation, example 8

Basic Functions
1558 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Examples

The geometry component of the tool remains unchanged due to _CORMODE = 1.


The compensation vector defined in the WCS (rotation about y axis) must be included in the
wear component such that the total tool length in the figure refers to point P2. Therefore, the
resulting wear component of the tool is given in relation to the distance between points P1
and P2.
However, since the wear is evaluated negatively, due to setting data SD42930, the
compensation determined in this way has to be entered in the compensation memory with a
negative sign. The contents of the relevant tool parameters at the end of the program are
thus:

$TC_DP3[1,1] : 10.000 ; Geometry L1 (unchanged)


$TC_DP4[1,1] : 15.000 ; Geometry L2 (unchanged)
$TC_DP5[1,1] : 10.000 ; Geometry L3 (unchanged)

$TC_DP12[1,1] : 2.010 ; Wear L1


;(= 10 -15*cos(30) + 10*sin(30))
$TC_DP13[1,1] : -16.160 ; Wear L2
;(= -15*sin(30) - 10*cos(30))
$TC_DP14[1,1] : -5.000 ; Wear L3

The effect of setting data SD42930 on the L3 component in the Y direction can be
recognized without the additional complication caused by the frame rotation.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1559
Tool Offset (W1)
Examples

Example 9
2 (tool length must be valued in the diameter axis with the factor 0.5) is the value of machine
data:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK (definition of tool parameters).
X is diameter axis:

N10 def real _LEN[11]


N20 def real _CORVAL[3]
N30 $TC_DP1[1,1]= 500
N40 $TC_DP2[1,1]= 2
N50 $TC_DP3[1,1]= 3.
N60 $TC_DP4[1,1]= 4.
N70 $TC_DP5[1,1]= 5.
N80 _CORVAL[0] = 1.
N90 _CORVAL[1] = 1.
N100 _CORVAL[2] = 1.
N110 t1 d1 g18 g0 x0 y0 z0 ; ==> MCS position X1.5 Y5 Z4
N120 r1 = settcor(_CORVAL, "g", 1, 1)
N130 t1 d1 x0 y0 z0 ; ==> MCS position X2.5 Y6 Z5
N140 r3 = $TC_DP3[1,1] ; = 5. = (3.000 + 2. * 1.000)
N150 r4 = $TC_DP4[1,1] ; = 5. = (4.000 + 1.000)
N160 r5 = $TC_DP5[1.1] ; = 6. = (5.000 + 1.000)
N170 m30

The compensation of the tool length is to be 1 mm in each axis (N80 to N100).


1 mm is thus added to the original length in lengths L2 and L3.
Twice the compensation value (2 mm) is added to the original tool length in L1, in order to
change the total length by 1 mm as required. If the positions approached in blocks N110 and
N130 are compared, it can be seen that each axis position has changed by 1 mm.

Basic Functions
1560 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Data lists

17.16 Data lists

17.16.1 Machine data

17.16.1.1 NC-specific machine data

Number Identifier: $MN_ Description


18082 MM_NUM_TOOL Number of tools that the NCK can manage (SRAM)
18088 MM_NUM_TOOL_CARRIER Number of toolholders
18094 MM_NUM_CC_TDA_PARAM Number of TOA data
18096 MM_NUM_CC_TOA_PARAM Number of TOA data, which can be set up per tool
and evaluated by the CC
18100 MM_NUM_CUTTING_EDGES_IN_TOA Tool compensations per TOA module
18102 MM_TYPE_OF_CUTTING_EDGE Activate flat D number management
18105 MM_MAX_CUTTING_EDGE_NO Address extension interpreted as spindle number
18106 MM_MAX_CUTTING_EDGE_PERTOOL Maximum number of cutting edges per tool
18108 MM_NUM_SUMCORR Number of all sum offsets in NCK
18110 MM_MAX_SUMCORR_PER_CUTTEDGE Maximum number of sum offsets per cutting edge
18112 MM_KIND_OF_SUMCORR Properties of sum offsets in the NCK
18114 MM_ENABLE_TOOL_ORIENT Assign orientation to cutting edges
18116 MM_NUM_TOOL_ENV Tool environments in TO area

17.16.1.2 Channel-specific machine data

Number Identifier: $MC_ Description


20096 T_M_ADDRESS_EXT_IS_SPINO Spindle number as address extension
20110 RESET_MODE_MASK Definition of control basic setting after power-up and
RESET part program end
20120 TOOL_RESET_VALUE Definition of tool, for which tool length compensation
is selected during powerup or on reset or part
program end as a function of machine data:
MD20110 RESET_MODE-MASK.

20121 TOOL_PRESEL_RESET_VALUE Definition of the preselected tool, for which the tool
length compensation is selected during powerup and
on reset or part program end as a function of
MD20110.
20125 CUTMOD_ERR Troubleshooting for the CUTMOD function
20126 TOOL_CARRIER_RESET_VALUE Active toolholder on RESET

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1561
Tool Offset (W1)
Data lists

Number Identifier: $MC_ Description


20127 CUTMOD_INIT Initialize CUTMOD for POWER ON
20130 CUTTING_EDGE_RESET_VALUE Definition of tool cutting edge, for which tool length
compensation is selected during powerup or on reset
or part program end as a function of machine data:
MD20110 RESET_MODE-MASK.

20132 SUMCORR_RESET_VALUE Number for selecting sum offset


20140 TRAFO_RESET_VALUE Definition of transformation set, which is selected
during powerup or on reset or part program end as a
function of machine data:
MD20110 RESET_MODE-MASK.

20180 TOCARR_ROT_ANGLE_INCR[i] Value of the minimum incremental step with toolholder


with orientation capability
20182 TOCARR_ROT_ANGLE_OFFSET[i] Offset of the rotary axis with toolholder with
orientation capability
20184 TOCARR_BASE_FRAME_NUMBER Base frame of the table offset for toolholder with
orientation capability with rotary table
20188 TOCARR_FINE_LIM_LIN Limit linear fine offset TCARR
20190 TOCARR_FINE_LIM_ROT Limit rotary fine offset TCARR
20202 WAB_MAXNUM_DUMMY_BLOCKS Maximum number of blocks with no traversing
motions with SAR
20204 WAB_CLEARANCE_TOLERANCE
20210 CUTCOM_CORNER_LIMIT Max. angle for intersection calculation with tool radius
compensation
20220 CUTCOM_MAX_DISC Maximum value for tool radius compensation
20230 CUTCOM_CURVE_INSERT_LIMIT Minimum value for intersection calculation with tool
radius compensation
20240 CUTCOM_MAXNUM_CHECK_BLOCKS Blocks for predictive contour calculation with tool
radius compensation
20250 CUTCOM_MAXNUM_DUMMY_BLOCKS Max. no. of dummy blocks with no traversing
movements
20252 CUTCOM_MAXNUM_SUPPR_BLOCKS Maximum number of blocks with compensation
suppression
20256 CUTCOM_INTERS_POLY_ENABLE Intersection process possible for polynomials
20270 CUTTING_EDGE_DEFAULT Selected cutting edge after tool change
20272 SUMCORR_DEFAULT Number for activating a new cutting edge
compensation
20360 TOOL_PARAMETER_DEF_MASK Defines the effect of tool parameters
20390 TOOL_TEMP_COMP_ON Activation of temperature compensation for tool length
20392 TOOL_TEMP_COMP_LIMIT Maximum temperature compensation for tool length
20610 ADD_MOVE_ACCEL_RESERVE Acceleration reserve for overlaid movements
21080 CUTCOM_PARALLEL_ORI_LIMIT Limit angle between path tangent and tool orientation
with
3D tool radius compensation
22530 TOCARR_CHANGE_M_CODE M code for change of toolholder

Basic Functions
1562 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Tool Offset (W1)
Data lists

Number Identifier: $MC_ Description


22550 TOOL_CHANGE_MODE New tool compensations with M function
22560 TOOL_CHANGE_M_CODE M function for tool change
22562 TOOL_CHANGE_ERROR_MODE Error response on programmed tool change
24558 TRAFO5_JOINT_OFFSET_PART_1 Vector of kinematic offset in table, transformation 1
24658 TRAFO5_JOINT_OFFSET_PART_2 Vector of kinematic offset in table, transformation 2
28085 MM_LINK_TOA_UNIT Assignment of TO unit to a channel

17.16.1.3 Axis/spindle-specific machine data

Number Identifier: $MA_ Description


32750 TEMP_COMP_TYPE Temperature compensation type

17.16.2 Setting data

17.16.2.1 Channel-specific setting data

Number Identifier: $SC_ Description


42442 TOOL_OFFSET_INCR_PROG Retraction of tool compensations on incremental
programming
42470 CRIT_SPLINE_ANGLE Corner limit angle for the compressor with COMPCAD
(changed in SW 7.1 and higher)
42480 STOP_CUTCOM_STOPRE Alarm response for tool radius compensation and
preprocessing stop
42494 CUTCOM_ACT_DEACT_CTRL Approach/retraction behavior for tool radius
compensation in blocks without travel information
42496 CUTCOM_CLSDT_CONT Maintain stability of approach/retraction behavior for
tool radius compensation in blocks
42900 MIRROR_TOOL_LENGTH Mirror tool length compensation
42910 MIRROR_TOOL_WEAR Mirror wear values of tool length compensation
42920 WEAR_SIGN_CUTPOS Mirror wear values of machining plane
42930 WEAR_SIGN Invert sign of all wear values
42935 WEAR_TRANSFORM Transformation of wear values
42940 TOOL_LENGTH_CONST Retain the assignment of the tool length
compensation dwhen changing the machining plane
(G17 - G19)
42950 TOOL_LENGTH_TYPE Assignment of the tool length offset independent of
tool type
42960 TOOL_TEMP_COMP Temperature compensation value in relation to tool
42974 TCARR_FINE_CORRECTION Fine offset TCARR on/off
42984 CUTDIRMOD Modification of $P_AD[2] or $P_AD[11]

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1563
Tool Offset (W1)
Data lists

17.16.3 Signals

17.16.3.1 Signals from channel

DB number Byte.Bit Name


21, ... 61.0 T function 1 change
21, ... 62.0 D function 1 change
21, ... 116-119 T function 1
21, ... 128-129 D function 1
21, ... 214 Active G function of group 7
21, ... 223 Active G function of group 16
21, ... 224 Active G function of group 17
21, ... 225 Active G function of group 18
21, ... 230 Active G function of group 23

Basic Functions
1564 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1) 18
18.1 Brief description
The section entitled "NC/PLC interface signals" includes a detailed description of NC/PLC
interface signals relevant to function:
● PLC messages (DB2)
● NC (DB10)
● Mode group (DB11)
● OP (DB19)
● NCK channel (DB21-DB30)
● Axis/spindle (DB31-DB61)
● Loading/unloading a magazine (DB71)
● Spindle as change point (DB72)
● Tool turret (DB73)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1565
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2 Various interface signals and functions (A2)

18.2.1 Signals from PLC to NC (DB10)

DB10
DBX56.4 - DBX56.7 Key-operated switch positions 0 to 3
Edge evaluation: no Signal(s) updated: cyclic
Significance of signal Access to certain data types can be disabled depending on the key-operated switch position.
Input, changing, deleting data as well as certain operations on the operator panel can be disabled
for certain user groups in this way.
Key-operated switch position 0 offers the fewest access rights and position 3 the most access
rights.
The signals "key-operated switch positions 1 to 3" can either be entered directly from the key-
operated switch on the machine control panel or from the PLC user program.
Only one interface signal may be set in each case. If several positions are set simultaneously
(interface signals), then they are no longer valid and key-operated switch position 3 is automatically
set by the control.
The allocation between the lockable data areas and the key operated switch positions is made by
HMI machine data for protection stages.
The following signal combinations apply:

The following signal combinations apply:

DB10, DBB56
Key-operated switch position Bit 7 Bit 6 Bit 5 Bit 4
0 0 0 0 1
1 0 0 1 0
2 0 1 0 0
3 1 0 0 0

Application Depending on the rights assigned to the operator, programmer or installation engineer, certain
example(s) functions will be disabled by the key-operated switch. Unintentional changes to data (e.g. zero
offsets) or activation of program conditions (e.g. selecting dry run feed rate) by the operator can
therefore be prevented.
Corresponding to .... Disabling using a password

Basic Functions
1566 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2.2 Selection/Status signals from HMI to PLC (DB10)

DB10
DBX103.0 Remote diagnosis active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Remote diagnosis (optional) is active, i.e. the control is operated via an external PC.
edge change 0 → 1
Signal state 0 or Remote diagnosis is not active.
edge change 1 → 0

DB10
DBX103.5 AT box ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The AT box for expansion modules is ready.
edge change 0 → 1
Signal state 0 or The AT box is not ready. An expansion module conforming to the AT specification has either no
edge change 1 → 0 functionality or restricted functionality.
Additional references /BH/ Operator Components Manual; PCU 50,
Chapter: Spare parts

DB10
DBX103.6 PCU Temperature limit
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The environment conditions of the limit value are in the permitted tolerance range of 5 to 55 degree
edge change 0 → 1 C.
Signal state 0 or The temperature range was either exceeded, or the temperature fell below the limit.
edge change 1 → 0 The temperature monitor has responded and the PCU is disabled.

DB10
DBX103.7 PCU Battery alarm
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The battery monitor has responded. Power failure can cause the loss of recently changed data and
edge change 0 → 1 a correct device configuration. A corresponding HMI alarm is reported. The PCU buffer battery is to
be tested. An insufficient battery voltage also affects the current time on the operator interface.
Signal state 0 or No PCU battery alarm is active.
edge change 1 → 0
Signal irrelevant for SINUMERIK 840/840Di with PCU 50, PCU 20 or PCU 70
...
Additional references /BH/ Operator Components Manual; PCU 50,
Chapter: Replacing the battery

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1567
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2.3 Signals from the NC to the PLC (DB10)

DB10
DBX104.7 NCK-CPU-Ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The NCK CPU is ready and registers itself cyclically with the PLC.
edge change 0 → 1 After a correct initial start and the first complete OB1 cycle (initial setting cycle) the PLC and NCK
continuously exchange sign of life signals.
The PLC basic program sets the interface signal "NCK CPU Ready" to 1.
Signal state 0 or The NCK CPU is not ready.
edge change 1 → 0 If a sign of life is not received from the NCK, the PLC/NCK interface is neutralized by the PLC basic
program and the interface signal "NCK CPU Ready" is set to 0.
The following measures are introduced by the PLC basic program:
• Status signals from NCK to PLC (user interface) are deleted (cleared)
• Change signals for help functions are deleted
• Cyclic processing of the user interface PLC to NCK is terminated.
Application Individual PLC outputs can, for example, be set to a defined state from the PLC user program.
example(s)
Additional references /DA/ Diagnostics Manual
/FB1/ Function Manual Basic Functions, PLC Basic Program (P3)

DB10
DBX108.1 HMI-CPU2-Ready (to BTSS or to MPI)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The CPU is ready and registers itself cyclically with the NCK.
edge change 0 → 1
Signal state 0 or The CPU is not ready.
edge change 1 → 0

DB10
DBX108.2 - HMI CPU1 Ready (HMI to MPI)/
DBX108.3 HMI CPU1 Ready (HMI to BTSS, standard connection)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The CPU is ready and registers itself cyclically with the NCK.
edge change 0 → 1
Signal state 0 or The CPU is not ready.
edge change 1 → 0
Application Appropriate measures can be introduced by the PLC user program, if "HMI-CPU1-Ready" = 0.
example(s)
Additional references /DA/ Diagnostics Manual

Basic Functions
1568 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB10
DBX108.6 611D-Ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or All existing drives signal the status drive ready (summary of axial interface signals "DRIVE ready").
edge change 0 → 1
Signal state 0 or As soon as the drive not ready status is signaled from a drive
edge change 1 → 0 (i.e. IS "DRIVE ready" = 0).
Signal irrelevant for SINUMERIK 840Di
...
Corresponding to .... DB31, ... DBX93.5 (DRIVE ready)

DB10
DBX108.7 NC Ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The control system is ready.
edge change 0 → 1 This interface signal is an image of the relay contact "NC Ready".
This signal is set if:
• Relay contact "NC Ready" is closed
• All the voltages in the control have been established
• The control is in the cyclic mode
Signal state 0 or The control is not ready. The relay contact "NC Ready" is open.
edge change 1 → 0 The following faults will cause NC Ready to be canceled:
• Undervoltage and overvoltage monitoring function has responded
• Individual components are not ready (NCK CPU Ready)
• NC CPU watchdog
If the signal "NC Ready" goes to 0 the following measures are introduced by the control if they are
still possible:
• The controller enable signals are withdrawn (this stops the drives)
• The following measures are introduced by the PLC basic program:
– Status signals from NCK to PLC (user interface) are deleted (cleared)
– Change signals for help functions are deleted
– Cyclic processing of the PLC to NCK user interface is terminated
For further information see References!
The control is not ready again until after POWER ON.
Corresponding to .... Relay contact "NC Ready"
Additional references /DA/ Diagnostics Manual
/FB1/ Function Manual Basic Functions, PLC Basic Program (P3)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1569
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB10
DBX109.0 NCK alarm is active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or At least one NCK alarm is present.
edge change 0 → 1 This is a group signal for the interface signals of all existing channels:
DB21, ... DBX36.6 (channel-specific NCK alarm is active).
Signal state 0 or No NCK alarm is active.
edge change 1 → 0
Corresponding to .... DB21, ... DBX36.6 (channel-specific NCK alarm is active)
DB21, ... DBX36.7 (NCK alarm with processing stop present)
Additional references /DA/ Diagnostics Manual

DB10
DBX109.5 Heatsink temperature alarm, NCU 573
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or In NCU 573, the limit values of the heat sink temperature was exceeded.
edge change 0 → 1 The heat sink temperature got activated and a steady operation of the operator panel is no longer
guaranteed.
Signal state 0 or The heatsink monitoring function of the NCU 573 has not responded.
edge change 1 → 0

Basic Functions
1570 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB10
DBX109.6 Air temperature alarm
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The ambient temperature or fan monitoring function has responded.
edge change 0 → 1 This may be due to the following causes:
• The temperature monitoring has identified an ambient temperature that is too high (approx. 60
°C). Alarm 2110 "NCK temperature alarm" is output.
• The speed monitoring of the 24 V DC fan used to cool the module has responded. Alarm 2120
"NCK fan alarm" is output.
Measures: Replace the fan and/or ensure that additional ventilation is provided.
When a temperature or fan error responds, a relay contact (terminal 5.1, 5.2 or 5.1, 5.3) in the
infeed/regenerative feedback unit is activated which can be evaluated by the customer.
Signal state 0 or Neither the temperature monitoring nor the fan monitoring has responded.
edge change 1 → 0
Application Appropriate measures can be initiated by the PLC user program if the temperature or fan
example(s) monitoring is activated.
Corresponding to .... When a temperature or fan error responds, a relay contact (terminal 5.1, 5.2 or 5.1, 5.3) in the
infeed/regenerative feedback unit is activated. This can be evaluated.
Additional references /DA/ Diagnostics Manual

DB10
DBX109.7 NCK battery alarm
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The NCK battery voltage monitoring function has responded.
edge change 0 → 1 This may be due to the following causes:
• The battery voltage is within the pre-warning limit range (approx. 2.7 to 2.9 V). Alarm 2100
"NCK battery warning threshold reached" has been triggered.
Refer to References for effects and measure.
• The battery voltage is below the pre-warning limit range (≤ 2.6 V).
Alarm 2101 "NCK battery alarm" is signaled in cyclic operation.
Effects: A supply voltage failure - e.g. when the control is switched off - would result in the loss
of battery-buffered data (e.g. part program memory, variables,machine data ...).
Measure: Refer to additional References.
• When the control ran-up, it was identified that the battery voltage was below the pre-warning
limit range (≤ 2.6 V).
Alarm 2102 "NCK battery alarm" is output; NC ready and mode group ready are not issued.
Effects: Some of the battery-buffered data may already have been lost!
Measure: Refer to additional References.
Signal state 0 or The battery voltage is above the lower limit value (normal condition).
edge change 1 → 0
Special cases, The NCK batteries should only be replaced while the NC is switched on to avoid data loss because
errors, ... of no memory backup.
Additional references /DA/ Diagnostics Manual
/IAD/ SINUMERIK 840D/611D, Installation and Startup Guide

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1571
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2.4 Signals to operator panel front (DB19)

DB19
DBX0.0 Screen bright
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The screen blanking is disabled.
edge change 0 → 1
Signal state 0 or The screen blanking remains in effect.
edge change 1 → 0
Corresponding to .... DB19 DBX0.1 (darken screen)

DB19
DBX0.1 Darken screen
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The screen is darkened by the PLC user program.
edge change 0 → 1 The automatic screen brightening/darkening is therefore ineffective:
i.e. the screen does not brighten up automatically on actuating the keyboard.
Signal state 0 or The screen is controlled by the PLC user program "bright".
edge change 1 → 0 In this signal state, the screen brightening/darkening setting can be derived by the control via the
keyboard automatically.
The screen is darkened if no key is pressed for a period defined via the following machine data on
the keyboard:
MD9006 $MM_DISPLAY_BLACK_TIME (time to darken the screen)
The screen is brightened the next time a key on the operator panel front is pressed.
Application Screen saver
example(s)
Special cases, Notice:
errors, .... The keyboard of the operator panel front continues to be effective if the interface signal:
DB19 DBX0.1 (darken screen) = 1
We therefore recommend that this is disabled using the interface signal:
DB19 DBX0.2 (key disable)
Corresponding to .... DB19 DBX0.2 (key disable)
MD9006 $MM_DISPLAY_BLACK_TIME (time to darken the screen)

Basic Functions
1572 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX0.2 Key disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The keyboard is disabled for the user.
edge change 0 → 1
Signal state 0 or The keyboard is enabled for the user.
edge change 1 → 0
Application If the screen is darkened with the interface signal: DB19 DBX0.1 (darken screen), the keyboard
example(s) should be actuated simultaneously with the interface signal: DB19 DBX0.2 (key disable) to avoid
an unintended operation.
Corresponding to .... DB19 DBX0.1 (darken screen)

DB19
DBX0.3 Clear cancel alarms
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Clear error key on the machine control panel is pressed.
edge change 0 → 1 All cancel alarms of the NCKs and the control panel are then acknowledged. The PLC application
acknowledges the PLC alarms itself.
PowerOn and Reset alarms remain active on the NCK until the cause of the error has been
removed.
Signal state 0 or Clear error key on the machine control panel is not pressed.
edge change 1 → 0
Functionality Only applicable to HMI Advanced or PCU 50.
Corresponding to .... DB19 DBX20.3 (Cancel alarm cleared)

DB19
DBX0.4 Clear recall alarms
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Clear error key on the machine control panel is pressed.
edge change 0 → 1 All cancel alarms of the NCKs and the control panel are then acknowledged. The PLC application
acknowledges the PLC alarms itself. POWER On and Reset alarms remain active on the NCK until
the cause of the error has been removed.
Signal state 0 or Clear error key on the machine control panel is not pressed.
edge change 1 → 0
Application Applies to HMI Advanced only
example(s)
Corresponding to .... DB19 DBX20.4 (Recall alarm cleared)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1573
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX0.7 Actual value in WCS
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The PLC selects the display of actual values in the workpiece coordinate system (WCS). This
edge change 0 → 1 means that when the machine area is selected, the WCS display is activated; i.e. the machine and
the supplementary axes as well as their actual positions and distances to go are displayed in the
WCS in the "Position" window.
The interface signal is only evaluated when it enters the basic machine screen; this means that the
operator, within the machine area, can toggle as required between the particular coordinate
systems using the softkeys "actual values MCS" and "actual values WCS".
Signal state 0 or This means that when the machine area is selected the coordinate system previously selected
edge change 1 → 0 (WCS or MCS) is reactivated and displayed.
Application Using the interface signal:DB19, DBX0.7 (actual value in WCS) = 1 each time that the machine
example(s) area is re-selected, the workpiece coordinate system display frequently required by the operator
(WCS), is selected.
Corresponding to .... DB19 DBX20.7 (changeover MCS/WCS)
Additional references Operating Manual HMI (corresponding to the used software)

DB19
DBB2 Higraph first error display
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBB4 Higraph first error display
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX6.0 - 6.7 Analog spindle 1, utilization in percent
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX7.0 - DBX7.7 Analog spindle 2, utilization in percent
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX8.0 - DBX8.7 Channel number of the machine control panel to HMI
Edge evaluation: No Signal(s) updated: Cyclically

Basic Functions
1574 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX10.0 Programming area selection
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Program area selection active
edge change 0 → 1
Signal state 0 or Program area selection inactive
edge change 1 → 0

DB19
DBX10.1 Alarm area selection
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Alarm area selection active
edge change 0 → 1
Signal state 0 or Alarm area selection inactive
edge change 1 → 0

DB19
DBX10.2 Tool offset selection
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Tool offset selection active
edge change 0 → 1
Signal state 0 or Tool offset selection inactive
edge change 1 → 0

DB19 ShopMill control signal


DBX10.7
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX12.2 COM2
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or COM2 active
edge change 0 → 1
Signal state 0 or COM2 inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated via RS-232-C.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1575
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX12.3 COM1
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or COM1 active
edge change 0 → 1
Signal state 0 or COM1 inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated via RS-232-C.

DB19
DBX12.4 RS-232-C Stop
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or V24 stop active
edge change 0 → 1
Signal state 0 or V24 stop inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated via RS-232-C.

DB19
DBX12.5 RS-232-C external
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or V24 externally active
edge change 0 → 1
Signal state 0 or V24 externally inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated via RS-232-C.

DB19
DBX12.6 RS-232-C off
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or RS-232-C off active
edge change 0 → 1
Signal state 0 or RS-232-C off inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated via RS-232-C.

Basic Functions
1576 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX12.7 RS-232-C on
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or RS-232-C on active
edge change 0 → 1
Signal state 0 or RS-232-C on inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated via RS-232-C.

DB19
DBX13.5 Unload
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Unload active
edge change 0 → 1
Signal state 0 or Unload inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated using the hard disk.

DB19
DBX13.6 Load part program
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Loading active
edge change 0 → 1
Signal state 0 or Loading inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated using the hard disk.

DB19
DBX13.7 Selection
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Selection active
edge change 0 → 1
Signal state 0 or Selection inactive
edge change 1 → 0
Application Valid for HMI Embedded;
example(s) a file transfer can be initiated using the hard disk.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1577
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX14.0 - DBX14.6 PLC index
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte for control of the V24 interface describes the PLC index for the standard control file,
which specifies the axis, channel or TO number. This file is handled according to the contract from
the PLC → HMI in the interface signal:
DB19 DBB12
Application Valid for HMI Embedded, with reference to DB19 DBB12
example(s) Dependent on:
DB19 DBX14.7=0 → Akt. FS: PLC index that specifies axis, channel or TO No.
DB19 DBX14.7=1 → Pas.FS: PLC index for the user control file

DB19
DBX14.7 Active or passive file system
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Passive file system
edge change 0 → 1
Signal state 0 or Active file system
edge change 1 → 0
Application Valid for HMI Embedded, with reference to DB19 DBB12
example(s)

DB19
DBX15.0 - DBX15.7 PLC line offset
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte to control the RS-232-C interface defines the line of the standard or user control file in
which the control file to be transferred is specified.
Application Valid for HMI Embedded, with reference to DB19 DBB12
example(s) Dependent on:
DB19 DBX14.7=0 → Akt. FS: PLC line offset in a standard control file
DB19 DBX14.7=1 → Pas. FS: PLC line offset in a user control file

Basic Functions
1578 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX16.0 - DBX16.6 PLC index for the user control file
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte for controlling file transfer via hard disk defines the index for the control file (job list). This
file is handled from the PLC → HMI correspondling to the contract which is in DB19 DBB13.
Application Valid for HMI advanced, with reference to the interface signal:
example(s) DB19 DBB13
Dependent on:
DB19 DBX14.7=0 → Akt. FS: PLC index for the standard control file
DB19 DBX14.7=1 → Pas.FS: PLC index for the user control file

DB19
DBX16.7 Active or passive file system
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Passive file system
edge change 0 → 1
Signal state 0 or Active file system
edge change 1 → 0
Application with HMI Advanced always 1
example(s)

DB19
DBX17.0 - DBX17.7 PLC line offset in the user control file
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte for controlling file transfer via the hard disk defines the line of the user control file in which
the control file to be transferred is located.
Application Valid for HMI Advanced, with reference to DB19 DBB13
example(s) Dependent on:
DB19 DBX14.7=0 → Akt. FS: PLC line offset in a standard control file
DB19 DBX14.7=1 → Pas. FS: PLC line offset in a user control file

DB19
DBX44.0 Mode change disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Mode change disable active
edge change 0 → 1
Signal state 0 or Mode change disable active
edge change 1 → 0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1579
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX45.0 FC9 Out: Active
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX45.1 FC9 Out: Done
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX45.2 FC9 Out: Error
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX45.3 FC9 Out: StartError
Edge evaluation: No Signal(s) updated: Cyclically

Basic Functions
1580 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2.5 Signals from operator panel front (DB19)

DB19
DBX20.1 Screen is dark
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The screen is darkened.
edge change 0 → 1
Signal state 0 or The screen is not darkened.
edge change 1 → 0
Application Using this IS, the PLC can identify whether the screen was switched dark using the interface
example(s) signal:
DB19, DBX0.1 (darken screen)
or using the machine data:
MD9006 $MM_DISPLAY_BLACK_TIME (screen blanking time).
Corresponding to .... MD9006 $MM_DISPLAY_BLACK_TIME (screen blanking time)

DB19
DBX20.3 Cancel alarm cleared
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Cancel alarm deleted active
edge change 0 → 1
Signal state 0 or Cancel alarm deleted inactive
edge change 1 → 0 Note: The signal is not reset automatically, it must be set by the user via the PLC user program.

DB19
DBX20.4 Recall alarm cleared
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Recall alarm deleted inactive
edge change 0 → 1
Signal state 0 or Recall alarm deleted inactive
edge change 1 → 0 Note: The signal is not reset automatically, it must be set by the user via the PLC user program.

DB19
DBX20.6 Simulation selected
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or On entry to simulation = 1
edge change 0 → 1
Signal state 0 or On exit from simulation = 0
edge change 1 → 0
Application Can be evaluated by machine manufacturer in order to activate the test on NC start.
example(s) The following must be set in the drive machine data:
MD1012 $MD_FUNC_SWITCH, bit 2 = 0.

Status "Ext. pulse disable active, terminal 663 open" is then not transmitted to the NC.
Corresponding to .... MD1012 $MD_FUNC_SWITCH, bit 2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1581
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX20.7 Switch over MCS/WCS
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The coordinate system is switched over from workpiece coordinate system (WCS) to machine
edge change 0 → 1 coordinate system (MCS) or from MCS to WCS.
After it has been set, the signal is active for 1 PLC cycle.
Signal state 0 or No effect
edge change 1 → 0
Application The interface signal:
example(s) DB19, DBX20.7 (change over MCS/WCS)
must be transferred to the interface signal:
DB19, DBX0.7 (actual value in WCS)
in order that the changeover becomes effective.
Corresponding to .... DB19, DBX0.7 (actual value in WCS)

DB19
DBX22.0 - DBX22.7 Displayed channel number from HMI
Edge evaluation: No Signal(s) updated: Cyclically

DB19
DBX24.0 Error (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Error status active
edge change 0 → 1
Signal state 0 or Error status inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s)
Corresponding to .... Applies to HMI Embedded

Basic Functions
1582 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX24.1 O.K. (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or O.K. status active
edge change 0 → 1
Signal state 0 or O.K. status inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s)
Corresponding to .... Applies to HMI Embedded

DB19
DBX24.2 COM2 (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or COM2 active
edge change 0 → 1
Signal state 0 or COM2 inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s)
Corresponding to .... Applies to HMI Embedded

DB19
DBX24.3 COM1 (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or COM1 active
edge change 0 → 1
Signal state 0 or COM1 inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s)
Corresponding to .... Applies to HMI Embedded

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1583
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX24.4 RS-232-C stop (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or V24 stop active
edge change 0 → 1
Signal state 0 or V24 stop inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s)
Corresponding to .... Applies to HMI Embedded

DB19
DBX24.5 RS-232-C external (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or V24 externally active
edge change 0 → 1
Signal state 0 or V24 externally inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s) The bit "RS-232-C external" is delayed until the transfer of the part program to be externally
executed has been started and the selection has been made. Only then is an "NC Start" possible.
Corresponding to .... Applies to HMI Embedded

DB19
DBX24.6 RS-232-C off (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or RS-232-C off active
edge change 0 → 1
Signal state 0 or RS-232-C off inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s)
Corresponding to .... Applies to HMI Embedded

Basic Functions
1584 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX24.7 RS-232-C on (status RS-232-C from PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or RS-232-C on active
edge change 0 → 1
Signal state 0 or RS-232-C on inactive
edge change 1 → 0
Application The actual status of the RS 232C is sent to the PLC in acknowledgment byte DB19.DBB24.
example(s)
Corresponding to .... Applies to HMI Embedded

DB19
DBX25.0 - DBX25.7 Error RS-232-C
Edge evaluation: No Signal(s) updated: Cyclically
Description 0 = no error
1 = invalid number for the control file
(value in DB19.DBB14<127 or invalid)
2 = DB19.DBB15 could not be read
3 = control file /BD.DIR/PLC_IN_OUT_xxx.TEA not found
(value in DB19.DBB14 invalid)
4 = invalid index in control file.
(value in DB19.DBB15 incorrect)
5 = selected job list in the control file could not be opened (only HMI Advanced)
6 = error in the job list (job list interpreter returns error) (only HMI Advanced)
7 = job list interpreter signals empty job list (only HMI Advanced)
8 = error during the RS-232-C transmission.
The error text is entered into the DIENSTE PROTOKOLL [SERVICES REPORT].
9 = error when executing job list (only HMI Advanced)
Corresponding to .... Applies to HMI Embedded

DB19
DBX26.1 OK (job list selection from PLC, status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Transfer correctly completed
edge change 0 → 1
Signal state 0 or Transfer completed with error
edge change 1 → 0
Corresponding to .... Valid for HMI Advanced

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1585
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX26.2 Error (job list selection from PLC, status) (previously bit 0)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Transfer completed with error
edge change 0 → 1
Signal state 0 or Transfer correctly completed
edge change 1 → 0
Corresponding to .... Valid for HMI Advanced

DB19
DBX26.3 Active (job list selection from PLC, status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Job in progress
edge change 0 → 1
Signal state 0 or No task in progress
edge change 1 → 0
Corresponding to .... Valid for HMI Advanced

DB19
DBX26.5 Unload (job list selection from PLC, status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Unload active
edge change 0 → 1
Signal state 0 or Unload inactive
edge change 1 → 0
Corresponding to .... Valid for HMI Advanced

DB19
DBX26.6 Load (job list selection from PLC, status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Loading active
edge change 0 → 1
Signal state 0 or Loading inactive
edge change 1 → 0
Corresponding to .... Valid for HMI Advanced

Basic Functions
1586 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX26.7 Selection (job list selection from PLC, status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Selection active
edge change 0 → 1
Signal state 0 or Selection inactive
edge change 1 → 0
Corresponding to .... Valid for HMI Advanced

DB19
DBX27.0 - DBX27.7 Data transfer error
Edge evaluation: No Signal(s) updated: Cyclically
Description • 0 = no error
• 1 = invalid number for control file
(value in DB19.DBB16<127 or invalid)
• 2 = DB19.DBB17 could not be read
• 3 = control file /BD.DIR/PLC_IN_OUT_xxx.TEA not found
(value in DB19.DBB16 invalid)
• 4 = invalid index in control file
(value in DB19.DBB17 incorrect)
• 5 = selected job list in control file could not be opened
• 6 = error in the job list (job list interpreter signals an error)
• 7 = job list interpreter signals an empty job list
• 8 = data transfer error
The error text is entered into the DIENSTE PROTOKOLL [SERVICES REPORT].
• 9 = error while executing the job list
Corresponding to .... Valid for HMI Advanced

DB19
DBX40.0 - DBX40.7 Mode group number
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte contains the mode group number.

DB19
DBX41.0 - DBX41.7 Channel number (FC9: ChanNo)
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte contains the channel number (FC9: ChanNo).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1587
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB19
DBX42.0 FC9: Start (measuring in Jog mode)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Start active
edge change 0 → 1
Signal state 0 or Start inactive
edge change 1 → 0

18.2.6 Signals to channel (DB21, ...)

DB21, ...
DBX6.2 Delete distance-to-go (channel-specific)
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Delete distance-to-go (channel-specific):
edge change 0 → 1 IS "Delete distance-to-go (channel-specific)" for path axes is only active in AUTOMATIC mode.
The rising edge of the interface signal is only effective for the axes involved in the geometry
grouping. These are also stopped with a ramp stop and their distance-to-go deleted (setpoint -
actual value difference). Any remaining following error is not removed. The next program block is
then started.
IS "Delete distance-to-go (channel-specific)" is therefore ignored by positioning axes.
Note:
IS "Delete distance-to-go" does not influence the running dwell time in a program block with dwell
time.
Signal state 0 or No effect
edge change 1 → 0
Signal irrelevant for Positioning axes
...
Application To terminate motion because of an external signal (e.g. measuring probe)
example(s)
Special cases, Delete distance-to-go (channel-specific)
errors, .... When the axes have been stopped with IS "Delete distance-to-go" the next program block is
prepared with the new positions. After a "Delete distance-to-go", geometry axes thus follow a
different contour to the one originally defined in the part program.
If G90 is programmed in the block after "Delete distance-to-go" it is at least possible to approach
the programmed absolute position. On the other hand, with G91, the position originally defined in
the part program is no longer reached in the following block.
Corresponding to .... DB21, ... DBX6.2 (delete distance-to-go (axis-specific))

Basic Functions
1588 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2.7 Signals from channel (DB21, ...)

DB21, ...
DBX36.6 Channel-specific NCK alarm is active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or At least one NCK alarm is present for this channel.
edge change 0 → 1 Thus the following group interface signal is also set:
DB10 DBX109.0 (NCK alarm is present)
The PLC user program can interrogate whether processing for the channel in question has been
interrupted because of an NCK channel:
DB21, ... DBX36.7 (NCK alarm with processing stop present).
Signal state 0 or No NCK alarm is active for this channel.
edge change 1 → 0
Corresponding to .... DB21, ... DBX36.6 (NCK alarm with processing stop present)
DB10 DBX109.0 (NCK alarm pending)
Additional references /DA/ Diagnostics Manual

DB21, ...
DBX36.7 NCK alarm with processing stop present
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or At least one NCK alarm - which is causing a processing stop of the part program running in this
edge change 0 → 1 channel - is active.
Signal state 0 or There is no alarm active in this channel that is causing a processing stop.
edge change 1 → 0
Application With this alarm a program interruption because of an NCK alarm can be recognized immediately by
example(s) the PLC user program and the necessary steps introduced.
Corresponding to .... DB21, ... DBX36.6 (channel-specific NCK alarm pending)
Additional references /DA/ Diagnostics Manual

DB21, ...
DBX318.7 Overstore active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The overstore function is enabled (with the channel-specific PI service "_N_OST_ON"). If the PI
edge change 0 → 1 service is denied, the signal will not change.
Signal state 0 or The overstore function is disabled (with the channel-specific PI service "_N_OST_OFF"). If the PI
edge change 1 → 0 service is denied, the signal will not change.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1589
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2.8 Signals to axis/spindle (DB31, ...)

DB31, ...
DBX1.0 Drive test travel enable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Safety handshake when the function generator is started by the NC.
edge change If an axis is to be traversed without further operator intervention, using:
0→1 DB31, ... DBX61.0 (drive test travel request) = 1 signal,
the NC requests a travel enable signal (permissive signal) from the PLC control.
If all axis travel conditions are fulfilled, PLC acknowledges this with:
DB31, ... DBX1.0 (drive test travel enable) = 1 signal
The PLC always has the master authority in deciding whether an axis can be traversed.
Signal state 0 or The NC does not request permission to move axis from the PLC with:
edge change DB31, ... DBX1.0 (drive test travel enable) = 0 signal
1→0
Additional references /IAD/ SINUMERIK 840D Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX1.3 Axis/spindle disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or (Test status)
edge change 0 → 1 If the interface signal "Axis disable" is output - for this axis - no more position partial setpoints are
- Axis disable output to the position controller; the axis travel is therefore disabled. The position control loop
- Spindle disable remains closed and the remaining following error is reduced to zero.
If an axis is moved with axis disable the actual value position display shows the setpoint position
and the actual velocity value display shows the setpoint velocity even though the machine axis is
not actually moving.
With a RESET the position actual value display is set to the real actual value of the machine.
Travel commands continue to be output to the PLC for this axis.
If the interface signal is canceled again the associated axis can again traverse normally.
If the interface signal "Axis disable" is set for a traversing axis, the axis is stopped with a ramp stop.
If the interface signal "Spindle disable" is set, as for axis disable, for this spindle no more speed
setpoints are output to the speed controller in the open-loop control mode and no more position
partial setpoints are output to the position controller in positioning mode. The movement of the
spindle is thus disabled. The speed actual value display displays the speed setpoint value.
Spindle disable can only be canceled per "Reset" or with M2 followed by a program restart.
If interface signal "Spindle disable" is set while a spindle is turning, the spindle is stopped according
to its acceleration characteristic.

Basic Functions
1590 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX1.3 Axis/spindle disable
Signal state 0 or (Normal conditions).
edge change 1 → 0 The position setpoint values are transferred to the position controller cyclically.
The speed setpoint values are transferred to the speed controller cyclically.
Cancellation of the "Axis/spindle disable" (edge change 1 → 0) does not take effect until the
axis/spindle is stationary (i.e. an interpolation setpoint is no longer ptresent).

3RVLWLRQ
VHWSRLQWIURP LVHW
WKHLQWHUSRODWRU 3RVLWLRQ 6SHHG &XUUHQW (QFRGHU
0RWRU
B FRQWUROOHU B FRQWUROOHU FRQWUROOHU 

LDFW

QDFW

$[LVLQKLELW
DFWLYH
$FWXDOSRVLWLRQYDOXH

Application The interface signal "Axis disable" and "Spindle disable" is used when running-in and testing a new
example(s) NC part program. In so doing, the machine axes and spindles should not execute any traversing or
rotational movement.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1591
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX1.3 Axis/spindle disable
Special cases, If, for an axis/spindle "axis/spindle disable" is present, then the interface signals:
errors, .... DB31, ... DBX2.1 (controller enable),
DB2 ... (feed/spindle stop)
and where relevant
DB31, ... DBX12.0-12.1 (hardware limit switch)
are not effective regarding braking the axis/spindle.
The axis/spindle can however be brought into the "follow up" or "hold" state
(refer to DB31, ... DBX1.4 (follow-up mode)).
Notes:
This signal inhibits setpoint output to the drive.
A brief pulse can bring a traversing axis to a standstill. The axis will not move again in this block,
but only when the next block is reached.
Re-synchronization takes place automatically on the next traversing command for this axis, i.e. the
axis traverses the remaining distance-to-go.

([DPSOH

*;<
*); IRU;WKHVLJQDOD[LVLQKLELWEULHIO\FRPHV
;ದD[LVUHPDLQVVWDWLRQDU\WKH1&FRQWLQXHVWRLQWHUSRODWH
<
; ;WUDYHOVIURPDSSUR[WR


For response together with synchronized operation, see:


References: /FB2/ Function Manual Extended functions; Synchronzed Spindle (S3)
This signal is no longer effective when the coupling for FS/FA is activated. → No. 6
If the signal for the LS/LA is set, it also applies to the FS/FA(s) → No. 7
A workpiece clamped between two spindles (workpiece transfer from front to rear-side machining)
cannot be destroyed.

1R VHW QRWVHW &RXSOLQJ 3URFHGXUH


/6/$ )6)$

   2II 6HWSRLQWVRID[HVDUHRXWSXW

   2II 1RVHWSRLQWRXWSXWIRU)6)$

   2II 1RVHWSRLQWRXWSXWIRU/6/$

   2II 1RVHWSRLQWRXWSXWIRU/6/$DQG)6)$

   21 6HWSRLQWVRID[HVDUHRXWSXW

   21 'LVDEOHQRWHIIHFWLYHIRU)6)$

   21 'LVDEOHDOVRHIIHFWLYHIRU)6)$

   21 1RVHWSRLQWRXWSXWIRU/6/$DQG)6)$

Corresponding to .... DB21, ... DBX33.7 (program test active)

Basic Functions
1592 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX1.4 Follow-up mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Follow-up mode is selected for the axis/spindle by the PLC.
The means that the position setpoint continually tracks the actual value if the controller enable for
the drive is withdrawn.
As soon as the follow-up mode is effective, the interface signal:
DB31, ... DBX61.3 (follow-up mode active)
is set to a 1 signal.
The actual value continues to be acquired and updated. If the axis/spindle is moved from its current
position by an external effect the zero speed and clamping monitoring do not issue an alarm.
When the closed-loop control system is reactivated, a control-internal repositioning operation is
performed (REPOSA: linear approach with all axes) to the last programmed position if a part
program is active.
Signal state 0 Follow-up mode is not selected (hold).
When "controller enable" is removed the previous position setpoint is kept in the control.
If the axis/spindle is moved out of position during this time a following error occurs between the
position setpoint and the position actual value. This position difference is reduced to zero
immediately by issuing "controller enable" so that the previous setpoint position is restored. Then,
all the other axis movements start from the setpoint position valid before "controller enable" was
removed.
When the position control is switched in again the axis may make a speed setpoint jump.
Zero speed monitoring or clamping monitoring is still active.
In order to disable (switch-out) the zero speed
monitoring, when clamping an axis, the interface signal:
DB31, ... DBX2.3 (clamping operation running)
should be set.
In the "holding state", the interface signal:
DB31, ... DBX61.3 (follow-up mode active)
is set to a 0 signal.
Special cases, If the drive controller enable is withdrawn inside the control due to faults, then the following
errors, .... should be carefully observed:
Before an NC start, after the queued alarms have been successfully deleted
(i.e. inside the control, the controller enable is re-issued), then "holding" should be activated:
DB31, ... DBX1.4 (follow-up mode) = 0
Otherwise, for an NC start and selected follow-up mode, the traversing distance of the previous NC
block would not be executed due to the internal delete distance to go.
Notice:
When changing over from the "follow-up" state to the "hold" state and in the control mode (a
controller enable is issued), a delete distance-to-go command is activated in the control. As a
consequence, for example, an NC block - in which only this axis is traversed - is ended directly.
Corresponding to .... DB31, ... DBX2.1 (controller enable)
DB31, ... DBX2.3 (clamping in progress)
DB31, ... DBX61.3 (follow-up mode active)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1593
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX1.5 - DBX1.6 Position measuring system 1 (PMS1)/Position measuring system 2 (PMS2)
Edge evaluation: No Signal(s) updated: Cyclically
PMS1: Position measuring system 1 is used for the axis/spindle (e.g. for position control, absolute value
Signal state 1 calculation, display). If a position measuring system 2 also exists
PMS2: (MD30200 $MA_NUM_ENCS = 2), this actual value is also acquired.
Signal state 0
PMS1: Position measuring system 2 is used for the axis/spindle (e.g. for position control, absolute value
Signal state 0 calculation, display). If a position measuring system 1 also exists, this actual value is also acquired.
PMS2:
Signal state 1
PMS1: As it is not possible to use both position measuring systems simultaneously for the position control
Signal state 1 of an axis/spindle, the control automatically selects position measuring system 1.
PMS2: If a position measuring system 2 also exists, this actual value is also acquired.
Signal state 1

Basic Functions
1594 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX1.5 - DBX1.6 Position measuring system 1 (PMS1)/Position measuring system 2 (PMS2)
PMS1: 1. The axis is in the park position.
Signal state 0
This means that the following features are valid:
PMS2: – Both position measuring systems are inactive.
Signal state 0
– There is no actual value acquisition.
– The position measuring system monitoring functions are disabled
(among others, cable connection of a measured value encoder).
The reference point has no effect:
DB31, ... DBX60.4/5 (referenced/synchronized) has the signal condition 0
As soon as an axis is parked, the interface signals:
DB31, ... DBX61.5 (position controller active),
DB31, ... DBX61.6 (speed controller active)
and
DB31, ... DBX61.7 (current controller active)
are set to a 0.
After parking has been completed the axis must be re-referenced (reference point
approach).
If interface signals PMS1 and PMS2 are set to 0 while the axis is moving, the axis is
stopped with a ramp stop without the controller enable being internally withdrawn.
This is appropriate for the following situations:
– Spindle encoder no longer outputs a signal above a certain speed (no longer supplies any
pulses).
– Spindle encoder is decoupled mechanically because it would not be able to cope with the
speed.
– The spindle can then continue to run in speed-controlled mode. In order to really bring the
axis/spindle to a stop, the controller enable must always be removed additionally by the
PLC.
2. The spindle does not have a position measuring system and is only speed controlled.
In this case, the interface signal:
DB31, ... DBX2.1 (controller enable)
should be set to a 1 signal.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1595
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX1.5 - DBX1.6 Position measuring system 1 (PMS1)/Position measuring system 2 (PMS2)
Application 1. Changing over from position measuring system 1 to positioning measuring system 2 (and vice
example(s) versa).
If the axis in both position measuring systems was referenced and the limit frequency of the
measured value encoder has not been exceeded in the meantime (i.e.
DB31, ... DBX60.4 and 60.5 (referenced/synchronized 1 and 2) has signal state 1,
then after the changeover, a reference point approach does not have to be repeated.
On switchover, the current difference between position measuring system 1 and 2 is traversed
immediately.
With the machine data:
MD36500 $MA_ENC_CHANGE_TOL (maximum tolerance on position actual value
changeover)
a tolerance bandwidth can be entered - the deviation between the two actual values may lie
within this bandwidth when changing over.
If the actual value difference is greater than the tolerance, a switchover between the two
systems does not take place and alarm 25100 "Measuring system switchover" not possible is
triggered.
2. Parking axis (i.e. no PMS is active):
If the encoder has to be removed - e.g. if a rotary table has to be removed from the machine -
the position measuring system monitoring is switched off in the parking position.
The mounted axis/spindle encoder turns so quickly in certain applications that it can no longer
maintain its electrical characteristics (edge rate-of-rise, etc.).
3. Switch-off measuring system:
When measuring system 1 or 2 is switched off the associated interface signal:
DB31, ... DBX60.4/60.5 (referenced/synchronized 1/2)
is reset.
4. Reference point approach:
Reference point approach of the axis is executed with the selected position measuring system.
Every PMS must be separately referenced.
Special cases, If the state "parking axis" is active, the interface signal:
errors, .... DB31, ... DBX60.4/60.5 (referenced/synchronized 1/2)
is ignored at NC start for this axis.
Corresponding to .... DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)
DB31, ... DBX61.6 (speed controller active)
DB31, ... DBX2.1 (controller enable)
MD36500 $MA_ENC_CHANGE_TOL (Max. tolerance on position actual value switchover)
MD30200 $MA_NUM_ENCS (number of encoders)
Additional references /FB1/ Function Manual Basic Functions; Speeds, Set-Actual Value System, Control (G2)

Basic Functions
1596 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX2.1 Controller enable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The position control loop of the axis/spindle is closed; the axis/spindle is in closed-loop control.
Signal state 1 or When "controller enable" is set by the PLC user program:
edge change • Position control loop of axis is closed.
0→1
• Position actual value is no longer switched to the position setpoint.
• The controller enable of the drive is output.
• The interface signal:
DB31, ... DBX61.5 (position controller active)
is set to 1.
When "controller enable" has been signaled no new actual value synchronization of the axis
(reference point approach) of the axis is necessary if the maximum permissible limit frequency of
the axis measuring system has not been exceeded during follow-up mode.
As a function of the interface signal:
DB31, ... DBX1.4 ( follow-up mode)
it is possible to select whether or not the axis first traverses back to the earlier setpoint position (i.e.
the positional deviation caused by the clamping process is moved through to eliminate the
deviation).
Edge change "Controller enable" will be/is removed:
1 → 0 or The procedure for removing "controller enable" depends on whether the axis/spindle or an axis of
signal state 0 the geometry grouping is stationary or traversing at this point in time.
• Axis/spindle stationary:
– Position control loop of axis is opened.
– When IS "Follow-up mode" = 1 the position actual value is switched to the position setpoint
(i.e. the setpoint position is corrected to the actual value position). The position actual value
of the axis/spindle continues to be acquired by the control.
– The controller enable of the drive is removed.
– The interface signals:
DB31, ... DBX61.5 (position controller active)
DB31, ... DBX61.6 (speed controller active)
DB31, ... DBX61.7 (current controller active)
are set to 0.
• Axis/spindle traverses:
– The axis is stopped with rapid stop.
– Alarm 21612 "VDI signal controller enable reset during movement" is triggered.
– The position control loop of the axis/spindle is opened.
– Independent of the interface signal:
DB31, ... DBX1.4 (follow-up mode)
At the end of braking the position actual value is switched to the position setpoint
(i.e. the setpoint position is corrected to track the actual value position).
The position actual value of the axis/spindle continues to be acquired by the control.
IS "Follow-up mode" is set.
– The interface signals:
DB31, ... DBX61.5 (position controller active)
DB31, ... DBX61.6 (speed controller active)
DB31, ... DBX61.7 (current controller active)
are set to 0.
The axis status cannot be changed again until after RESET.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1597
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX2.1 Controller enable
Application Using controller enable when clamping the axis:
example(s) The axis is positioned to the clamping position. As soon as it has stopped it is clamped and then
controller enable is removed. Controller enable is removed because the axis could be mechanically
pressed out of position slightly by clamping and the position controller would continuously have to
work against the clamping.
When clamping is to be stopped, a controller enable signal is first set again and then the axis is
freed from clamping.
Special cases, If an attempt is made to traverse the axis/spindle without controller enable, the axis/spindle remains
errors, .... stationary but sends a traversing/move command to the PLC (axis only). The traversing/move
command is kept and is executed when the controller enable is re-activated.
If the controller enable of a traversing geometry axis is removed the programmed contour cannot be
maintained.
Controller enable is automatically cancelled by the control when certain faults occur at the machine,
the position measuring system or the control.
Corresponding to .... DB31, ... DBX61.3 (follow-up mode active)
DB31, ... DBX1.4 (follow-up mode)
DB31, ... DBX61.5 (position controller active)
DB31, ... DBX61.6 (speed controller active)
DB31, ... DBX61.7 (current controller active)
MD36620 $MA_SERVO_DISABLE_DELAY_TIME (switch-off delay controller enable)
MD36610 $MA_AX_EMERGENCY_STOP_TIME (braking ramp time when errors occur)

DB31, ...
DBX2.2 Delete distance-to-go (axis-specific)/spindle reset
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or Delete distance-to-go (axis-specific):
edge change Depending on the operating mode, the following occurs for IS "delete distance-to-go axial":
0→1
• In the JOG mode:
If the interface signal is set for one axis (edge change 0 → 1), this axis is stopped with ramp stop
and its distance-to-go deleted (setpoint-actual value difference).
Any remaining following error is removed.
• for AUTOMATIC and MDA:
The rising edge of the interface signals only influences the axes which are not in the geometry
grouping. They are stopped with ramp stop and their distance-to-go deleted (setpoint-actual
value difference). The next program block can then be started. IS "delete distance-to-go axial" is
therefore ignored by geometry axes.
Note: IS "Delete distance-to-go" does not influence the running dwell time in a program block with
dwell time.
Signal state 0 or No effect
edge change
1→0
Application To terminate motion because of an external signal (e.g. measuring probe)
example(s)

Basic Functions
1598 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX2.2 Delete distance-to-go (axis-specific)/spindle reset
Special cases, "Delete distance-to-go (axial)"
errors, .... After the axes have been stopped with "Delete distance-to-go" the next program block is prepared
with the new positions. The axes thus follow a different contour to the one originally defined in the
part program after a "Delete distance-to-go".
If G90 is programmed in the block after "Delete distance-to-go" it is at least possible to approach
the programmed absolute position. On the other hand, with G91, the position originally defined in
the part program is not reached in the following block.
Corresponding to .... DB21, ... DBX6.2 (delete distance-to-go, channel-specific)
Additional references /FB1/ Function Manual Basic Functions; Spindles (S1)

DB31, ... Controller parameter set switchover (request)


DBX9.0 - DBX9.2 requested parameter set
Edge evaluation: No Signal(s) updated: On request
Signal state 1 or -
edge change
0→1
Signal state 0 or -
edge change
1→0
Signal irrelevant for MD35590 $MA_PARAMSET_CHANGE_ENABLE = 0
...
Application The binary-coded index of the parameter set to be activated is located in the 3 bits:
example(s) • 0 corresponds to the 1st parameter set
• 1 corresponds to the 2nd parameter set
• etc. (max. 6 parameter sets are possible)
Special cases, Indices 6-7 are mapped onto parameter set 6.
errors, ....
Corresponding to .... DB31, ...DBX69.0-69.2

DB 31, ... Disable parameter set switchover commands from NC


DBX9.3 Locks
Signal state 1 or NC should not initiate any parameter set switchovers.
edge change
0→1
Signal state 0 or Parameter set switchover by the NC is enabled.
edge change
1→0
Corresponding to .... DB31, ... DBX9.0 - DBX9.2

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1599
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX20.0 Ramp-up times
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or V/f operation operation is activated using machine data:
edge change MD1014 $MD_U/F_MODE_ENABLE.
0→1
The time entered in the machine data:
MD1126 $MD_U/F_MODE_RAMP_TIME_2
is effective.
Signal state 0 or V/f operation operation is activated using machine data:
edge change MD1014 $MD_U/F_MODE_ENABLE.
1→0
The time entered in the machine data:
MD1125 $MD_U/F_MODE_RAMP_TIME_1
is effective.
Signal irrelevant for SINUMERIK 840Di
...
Corresponding to .... MD1014 $MD_U/F_MODE_ENABLE (activate V/f operation)
MD1125 $MD_UF_MODE_RAMP_TIME_1 (ramp-up time 1 for V/f mode)
MD1126 $MD_UF_MODE_RAMP_TIME_2 (ramp-up time 2 for V/f mode)
Additional references /FBA/ SIMODRIVE 611D Function Manual Drive Functions

DB31, ...
DBX20.1 Ramp-function generator fast stop
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or A fast stop is triggered by the PLC for the drive (611D). Speed setpoint 0 is therefore entered. The
edge change drive is stopped without a ramp function (regenerative braking).
0→1 As soon as the fast stop is recognized by the drive module, the interface signal:
DB31, ... DBX92.1 (Ramp-function generator fast stop active) is returned to the PLC.
Signal state 0 or No rapid stop is requested by the PLC for the drive.
edge change
1→0
Signal irrelevant for SINUMERIK 840Di
...
Corresponding to .... DB31, ... DBX92.1 (ramp-function generator fast stop active)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
1600 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX20.2 Torque limit 2
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Torque limit 2 is requested by the PLC for the axis/spindle.
edge change For 611D two torque limit values can be set for each axis/spindle, whereby torque limit 2 refers to
0→1 torque limit 1 (reduction factor). Torque limit 2 is selected via the interface. The limit value is defined
using the drive parameters.
As soon as torque limit 2 is active for the drive, the drive signals this using the interface signal:
DB31, ... DBX92.2 (torque limit 2 active)
Signal state 0 or Only torque limit 1 has been selected by the PLC.
edge change
1→0
Signal irrelevant for SINUMERIKI 840Di
...
Application In order to reduce the stress on the mechanics and workpiece, the actual torque limit can be
example(s) reduced using torque limit 2 for certain machining operations.
Corresponding to .... DB31, ... DBX92.2 (torque limit 2 active)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX20.3 Speed setpoint smoothing
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The PLC requests a filter to smooth the speed setpoint value.
edge change In the drive module the interface signal is only effective under the following conditions:
0→1
• Speed setpoint filter 1 is active in the drive
• speed setpoint filter 1 has been configured as a low-pass filter (i.e. not as a band-stop filter)
As soon as these conditions exist whereby the smoothing of the speed setpoint is active, the 611D
or 611U signals this to the PLC using the interface signal:
DB31, ... DBX92.3 (speed setpoint smoothing active).
Signal state 0 or No smoothing of the speed setpoint value is requested by the PLC.
edge change
1→0
Application With this interface signal, speed setpoint smoothing can - for example - be activated from the PLC
example(s) user program for a spindle during speed control to achieve smooth torque output. Speed setpoint
smoothing can therefore be deactivated when the spindle is in positioning mode.
Special cases,
errors, ....
Corresponding to .... DB31, ... DBX92.3 (speed setpoint smoothing active)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1601
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX21.0 - DBX21.2 Drive parameter set selection A, B, C
Edge evaluation: No Signal(s) updated: Cyclically
Meaning With bit combinations A, B and C it is possible to select 8 different drive parameter sets for the
digital drives SIMODRIVE 611D/611U.
The following assignment applies:

'ULYHSDUDPHWHUVHW & % $

   
   
   
   
   
   
   
   

The switchable drive parameters are as follows:


• Current setpoint filters (low-pass, band-stop); for adaptation to the mechanics
• Motor speed normalization
• Speed controller parameters
• Speed setpoint filter
• Speed monitoring data
As soon as the new drive parameter becomes effective, the drive signals this to the PLC using the
interface signals:
DB31, ... DBX93.0, 1 and 2 (active parameter set).
Application Drive parameter switchover can be used for the following:
example(s) • Changing the gear stage
• Changing-over the measuring circuit
Special cases, In principle it is possible to switch over drive parameter sets at any time. However, as torque jumps
errors, .... can occur when switching over speed controller parameters and motor speed normalization,
parameters should only be switched over when in the zero speed state (especially when the axis is
stationary).
Corresponding to .... DB31, ... DBX93.0, 1 and 2 (active drive parameter set)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
1602 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX21.3 - DBX21.4 Motor selection A, B
Edge evaluation: No Signal(s) updated: Cyclically
Description The PLC can switch between 4 different motors or motor mode types using the motor selection
function.
The following assignment applies:

0RWRUVHOHFWLRQ $SSOLFDWLRQ % $
0RWRU 2SHUDWLQJPRGH  
0RWRU 2SHUDWLQJPRGH  

0RWRU UHVXSWR6:WKHQIRU  
0RWRU '3HUIRUPDQFHRU8FDQEH  
XVHGIRURSHUDWLQJPRGHRU

As soon as a new motor selection is detected, the drive cancels the pulse enable (feedback signal
using the interface signal DB31, ... DBX93.3 and 4 (active motor)).
Using the motor selection, it is possible, for example, to choose mode 1 as star-connected
operation and mode 2 as delta-connection operation for the main spindle drive (MSD).
The drive signals the currently selected motor back to the PLC using the interface signals:
DB31, ... DBX93.3 and 4 (active motor).

Application Timing for star-delta switchover


example(s)
Special cases, Caution:
errors, .... Before a new motor is selected, the interface signal:
DB31, ... DBX21.5 (motor selection carried out)
must be set to 0!
Corresponding to .... DB31, ... DBX93.3 and 4 (active motor)
DB31, ... DBX21.5 (motor selected)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX21.5 Motor selection in progress
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The PLC outputs the interface signal:
edge change DB31, ... DBX21.5 (motor selected)
0→1 to the 611D to confirm that the external contactor has been switched over to the new motor (e.g.
that motor contactor 2 has been energized as part of the star/delta switchover process).
The pulses are then enabled by the drive.
Signal state 0 or The interface signal:
edge change DB31, ... DBX21.5 (motor selected)
1→0 must be reset to 0 by the PLC user program before a new motor is selected! Otherwise the pulses
from the drive might be enabled too early.
Corresponding to .... DB31, ... DBX93.3 and 4 (active motor)
DB31, ... DBX21.3 and 4 (motor selection A, B)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1603
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX21.6 Speed controller integrator disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The interface signal is used by the 611D/611U to disable the integrator of the speed controller.
edge change The speed controller is thus changed over from a PI to a P controller.
0→1 Note:
If the speed controller integrator disable is activated, equalization processed might take place in
certain applications (e.g. if the integrator was already holding a load while stationary).
The 611D/611U acknowledges the integrator disable to the PLC using the interface signal:
DB31, ... DBX93.6 (speed controller integrator disabled).

Signal state 0 or The integrator of the speed controller is enabled.


edge change
1→0
Corresponding to .... DB31, ... DBX93.6 (integrator n-controller disabled)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX21.7 Pulse enable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Pulse enable is signaled by the PLC for this drive (axis/spindle).
edge change The pulses for the drive modules are only enabled if all enable signals (hardware and software) are
0→1 available (see figure for DB31, ... DBX93.5).
In this case, the interface signal:
DB31, ... DBX93.7 (pulses enabled)
is signaled to the PLC with a signal.
For additional information refer to DB31, ... DBX93.7 and references.
Signal state 0 or The pulses are disabled by the PLC for this drive.
edge change If pulse enable is canceled for a moving axis/spindle the axis/spindle is not longer braked in a
1→0 controlled fashion. The axis coasts to rest.
Application Signal relevant to safety
example(s)
Special cases, If pulse enable is canceled for a moving axis/spindle as a result of an Emergency Stop, the
errors, .... axis/spindle only coasts to rest.
Corresponding to .... DB31, ... DBX93.7 (pulses enabled)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
1604 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

18.2.9 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX61.0 Drive test travel request
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The control signals that all of the traversing conditions for the drives are fulfilled.
edge change Prerequisites for this are:
0→1
• The mechanical brake of the axis involved was previously released and all other axis traversing
conditions are fulfilled.
With:
DB31, ... DBX61.0 (drive test, travel request) = 1 signal
the appropriate axes can be moved.
• The axis disable:
DB31, ... DBX1.3 (axis/spindle disable) = 1 signal
is not active.
Signal state 0 or The control signals that the axes cannot be moved.
edge change Axes cannot be moved for:
1→0
• DB31, ... DBX61.0 (drive test, travel request) = 0 signal
• in the control when faults are present
This means that the prerequisites specified above are not fulfilled.
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX61.3 Follow-up mode active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The control signals that the follow-up mode for the axis/spindle is not active.
edge change Prerequisites for this are:
0→1
• The controller enable for the drive has been withdrawn (either by the PLC with "controller enable
" = 0 signal or inside the control for faults; refer to the references)
• Follow-up operation is selected (either by the PLC with IS "follow-up operation" = 1 signal or in
the control, e.g. when withdrawing the controller enable from an axis that is moving)
The position setpoint continually tracks the actual value while the follow-up mode is active.
Zero speed and clamping monitoring are not active.
Signal state 0 or The control signals that follow-up mode for the axis/spindle is not active.
edge change Zero speed and clamping monitoring are active.
1→0 This means that the above specified prerequisites are not fulfilled.
In the "hold" state, the interface signal:
DB31, ... DBX61.3 (follow-up mode active)
is 0.
Special cases, Notice:
errors, .... A delete distance-to-go is triggered internally in the control on transition from "Follow up" to "Hold"
(IS "Follow-up mode" = 0) or in the closed-loop control mode (IS "Controller enable" = 1).
Corresponding to .... DB31, ... DBX2.1 (controller enable)
DB31, ... DBX1.4 (follow-up mode!)
Additional references /DA/ Diagnostics Manual

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1605
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX61.4 Axis/spindle stops
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The current speed of the axis or the actual number of rotations of the spindle lies under the limit
edge change given by the machine data:
0→1 MD36060 $MA_STANDSTILL_VELO_TOL
(Maximum speed/number of rotations for signal "Axis/Spindle stationary").
Signal state 0 or The actual velocity of the axis or the actual spindle speed is greater than the value specified in the
edge change MD (standstill/zero speed range).
1→0 If a travel command is present, e.g. for a spindle, then the signal is always = 0 - even if the actual
speed lies below that specified in MD36060.
If the interface signal:
DB31, ... DBX61.4 (axis/ spindle stationary)
is signaled and there is no closed-loop position control active for the spindle, then at the MMC, an
actual speed of zero is displayed and with the system variable $AA_S[n] zero is read.
Application Enable signal for opening a protective device (e.g. open door).
example(s) The workpiece chuck or the tool clamping device is only opened when the spindle is stationary.
The oscillation mode can be switched-in during gear stage change after the spindle has been
braked down to standstill.
The tool clamping device must have been closed before the spindle can be accelerated.
Corresponding to .... MD36060 $MA_STANDSTILL_VELO_TOL
(maximum velocity/speed for signal "Axis/spindle stationary")

DB31, ...
DBX61.5 Position controller active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The control signals that the position controller for the axis or spindle is closed.
edge change
0→1
Signal state 0 or The control signals that the position controller for the axis or spindle is open.
edge change If "controller enable" is canceled because of a fault or from the PLC user program the position
1→0 controller is opened and therefore the interface signal
DB31, ... DBX61.5 (position controller active)
is set to 0.
Spindle without position control: Signal "Position controller active" is always "0".
See References for other effects.

Basic Functions
1606 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX61.5 Position controller active
Application If the position control is active the axis/spindle is kept in position by the position controller.
example(s) Any brakes or clamps can thus be opened.
The interface signal:
DB31, ... DBX61.5 (position controller active)
can be used as feedback signal for the interface signal:
DB31, ... DBX2.1 (controller enable).

The holding brake of a vertical axis must be activated as soon as the position control is no longer
active.
If a spindle has been technically designed/dimensioned for the purpose, in the part program, it can
be changed-over into the closed-loop position controlled mode as spindle or as axis (with SPCON or
M70).
In these cases, the interface signal "position controller active" is set.
Special cases, Special case for simulation axes (MD30350 $MA_SIMU_AX_VDI_OUTPUT = "1"):
errors, .... The IS "position controller active" is also set for simulation axes as soon as MD = "1".
Corresponding to .... DB31, ... DBX2.1 (controller enable)
DB31, ... DBX1.4 (follow-up mode)
DB31, ... DBX1.5 and 1.6 (position measuring system 1 and 2)
Additional references /DA/ Diagnostics Manual

DB31, ...
DBX61.6 Speed controller active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The control signals that the speed controller is closed for the axis or spindle.
edge change
0→1
Signal state 0 or The control signals that the speed controller is open for the axis or spindle.
edge change The speed controller output is cleared.
1→0
Application If the spindle is not under position control, the interface signal can be used as a feedback for the
example(s) interface signal:
DB31, ... DBX2.1 (controller enable).

Special cases, Special case for simulation axes (MD30350 = "1"):


errors, .... The interface signal:
DB31, ... DBX61.6 (speed controller active)
is also set for simulation axes as soon as:
MD30350 $MA_SIMU_AX_VDI_OUTPUT (output of the axis signals for simulation axes) = "1".
Corresponding to .... DB31, ... DBX61.5 (position controller active)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1607
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX61.7 Current controller active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The control signals that the current controller is closed for the axis or spindle.
edge change
0→1
Signal state 0 or The control signals that the current controller for the axis or spindle is open.
edge change The current controller output (including the feedforward quantities on the manipulated variable for
1→0 the voltage) is cleared.
Corresponding to .... DB31, ... DBX61.5 (position controller active)
DB31, ... DBX61.6 (speed controller active)

DB31, ...
DBX69.0 - DBX69.2 Controller parameter set switchover (A (checkback signal))
Active parameter set
Edge evaluation: no Signal(s) updated: After switchover
Signal state 1 or -
edge change
0→1
Signal state 0 or -
edge change
1→0
Signal irrelevant for MD35590 $MA_PARAMSET_CHANGE_ENABLE = 0
...
Application The binary-coded index of the activated parameter set is located in the 3 bits:
example(s) • 0 corresponds to the 1st parameter set
• 1 corresponds to the 2nd parameter set
• etc. (max. 6 parameter sets are possible)
Special cases, Index 0 is returned if the switchover function is disabled with:
errors, .... MD35590 $MA_PARASET_CHANGE_ENABLE = 0.

In this case, the 1st parameter set is always active.


Corresponding to .... DB31, ...DBX9.0 - DBX9.2 (controller parameter set switchover (request))

Basic Functions
1608 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX76.0 Lubrication pulse
Edge evaluation: yes Signal(s) updated: cyclic
Edge change As soon as the axis/spindle has covered the traversing distance set in the machine data:
0→1 MD33050 $MA_LUBRICATION_DIST (travel distance for lubrication from the PLC),
or the interface signal:
1→0 DB31, ...DBX76.0 (lubrication pulse)
is inverted and the lubrication is started.
The position measurement is restarted after each Power On.
Application The lubrication pump for the axis/spindle can be activated with IS "Lubrication pulse". Machine bed
example(s) lubrication therefore depends on the distance traveled.
Corresponding to .... MD33050 $MA_LUBRICATION_DIST (lubrication pulse distance)

DB31, ...
DBX92.0 Setting-up mode active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Setting-up mode is active for the drive (611D). The setting-up mode is selected using the terminals
edge change on the infeed/regenerative feedback module.
0→1 The setting-up mode is required for optimizing the machining process.
The following adaptations and additional functions are possible:
• Drive:
– Reducing the speed setpoint limits
– Reducing the current setpoint limits
• I/R:
– Disabling the closed-loop DC link voltage control
Signal state 0 or Normal operation is active for the drive. The following thus applies:
edge change • The maximum limit values for speed and current setpoint are active
1→0
• DC link voltage control is active
Signal irrelevant for SINUMERIK 840Di
...
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX92.1 Ramp-function generator fast stop active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or PLC receives the signal that the ramp function generator fast stop is active.
edge change The function has been activated by the interface signal:
0→1 DB31, ... DBX20.1 (ramp-function generator fast stop)
The drive is stopped without a ramp function with speed setpoint = 0 and without pulse
suppression.
Signal state 0 or Ramp function generator fast stop is not active for the drive.
edge change
1→0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1609
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX92.1 Ramp-function generator fast stop active
Application Bypassing the ramp function generator on the servo side
example(s)
Corresponding to .... DB31, ... DBX20.1 (ramp-function generator fast stop)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX92.2 Torque limit 2 active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Drive (611D) sends an acknowledgment to the PLC that torque limit 2 is active in addition to torque
edge change limit 1. The particular limit value is defined using the drive parameters.
0→1
Signal state 0 or Only torque limit 1 is active.
edge change
1→0
Signal irrelevant for SINUMERIK 840Di
...
Corresponding to .... DB31, ... DBX20.2 (torque limit 2)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX92.3 Speed setpoint smoothing active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The speed setpoint smoothing requested by the PLC with the interface signal:
edge change DB31, ... DBX20.3 (speed setpoint smoothing)
0→1 is active.
Signal state 0 or No speed setpoint smoothing is active.
edge change
1→0
Corresponding to .... DB31, ... DBX20.3 (speed setpoint smoothing)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
1610 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX93.0 - DBX93.2 Active drive parameter set A, B, C
Edge evaluation: no Signal(s) updated: cyclic
Meaning The drive module (611D/611U) signals back to the PLC which drive parameter set is currently
active.
With bit combinations A, B and C, 8 different drive parameter sets can be selected for the 611D.
The following assignment applies:

DFWLYHGULYHSDUDPHWHUVHW & % $

   
   
   
   
   
   
   
   

Application Drive parameter switchover can be used for the following:


example(s) • To change the gear stage
• To change over the measuring circuit
Corresponding to .... DB31, ... DBX21.0 - DBX21.2 (drive parameter set selection)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX93.3 - DBX93.4 Active motor A, B
Edge evaluation: no Signal(s) updated: cyclic
Meaning The drive module (611D) returns signals to PLC stating which motor selection is currently active.
Motor selection can be used with a main spindle drive (MSD) to switch between star and delta
operation and so reduce the starting current.
The following assignment applies:

$FWLYHPRWRU $SSOLFDWLRQ % $
0RWRU 06'6WDUPRGH  
0RWRU 06''HOWDPRGH  
0RWRU 5HVHUYHG  
0RWRU 5HVHUYHG  

Corresponding to .... DB31, ... DBX21.3 and DBX21.4 (motor selection)


DB31, ... DBX21.5 (motor selected)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1611
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX93.5 Drive Ready
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Feedback signal from the drive to the PLC that the drive is ready.
edge change
0→1
Signal state 0 or The drive is not ready.
edge change The drive might be disabled for the following reasons (refer to Fig.):
1→0
• Enable terminals not energized (e.g. terminal 63 "Controller and pulse enable"; terminal 663
"Safe operating stop", terminal 64 "Setpoint enable")
• Drive alarm active (e.g. motor temperature has reached switch-off threshold)
• DC link voltage is too low
• Drive has not yet reached cyclic operation
• Hardware fault
• No position measuring system is active ("parking axis" state)
• I/R is not switched on
As soon as the drive is ready for operation it is stopped (depending on the fault state either with
pulse disable or fast stop) or pulse disable is maintained during ramp up.
The interface signals:
DB10 DBX108.6 (611D ready)
DB31, ... DBX61.7 (current controller active)
DB31, ... DBX61.6 (speed controller active)
are also withdrawn.
IS "611D Ready" is not available for the 840Di when used in conjunction with the drive 611U.

Basic Functions
1612 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX93.5 Drive Ready

*DWLQJVHWHQDEOH

6HUYRDQGSXOVHHQDEOH WHUPLQDO

3XOVHHQDEOH VDIHRSHUDWLQJVWRS  WHUPLQDO

6WRUHGKDUGZDUHLQSXW
'ULYHUHDG\
6HWSRLQWHQDEOH WHUPLQDO
,6'ULYHUHDG\

QR'DODUP '&OLQNIDXOW

'&OLQNFRQQHFWHG

5DPSXSFRPSOHWHG
6WDWXVUHDG\IRU
WUDYHUVH WHUPLQDO


Corresponding to .... DB10 DBX108.6 (611D-Ready)


DB31, ... DBX61.7 (current controller active)
DB31, ... DBX61.6 (speed controller active)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX93.6 Speed controller integrator disabled
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The request from the PLC to disable the integrator of the speed controller using interface signal:
edge change DB31, ... DBX21.6 (integrator inhibit, speed controller)
0→1 is active for the drive module.
The speed controller has therefore switched from a PI to a P controller.
Signal state 0 or The integrator of the speed controller is enabled. The speed controller functions as a PI controller.
edge change
1→0
Corresponding to .... DB31, ... DBX21.6 (integrator disable, n-controller)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1613
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX93.7 Pulses enabled
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The pulse enable for the drive module is available. The axis/spindle can now be traversed.
edge change
0→1
Signal state 0 or The drive module pulses are suppressed. Therefore, the axis/spindle cannot be traversed.
edge change The pulses are suppressed as soon as there is no enable signal (refer to Fig.).
1→0
Also, if the "controller enable of drive" is withdrawn, the drive is stopped with setpoint 0
(regenerative braking).
A timer is started in the drive module and after the configured time has expired:
MD1404 $MD_PULSE_SUPPRESSION_DELAY (timer stage, pulse suppression),
the pulses are inhibited.
If, within this time, the actual speed reaches the shutdown speed:
MD1403 $MD_PULSE_SUPPRESSION_SPEED (pulse suppression),
then at this time, the pulses are inhibited.
If the speed is less than/equal to the speed threshold (MD1403), and if the controller enable of the
drive is withdrawn, then the pulses are immediately suppressed.
Pulse suppression is also triggered if there is no position measuring system ("parking axis" state).
As soon as the pulses are suppressed, then also the interface signals:
DB31, ... DBX61.7 (current controller active)
and
DB31, ... DBX61.6 (speed controller active)
are reset.

Basic Functions
1614 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX93.7 Pulses enabled

1& 3/&167 3/&167


SXOVHHQDEOH SXOVHVHQDEOHG

&HQWUDOSXOVHHQDEOH

WHUPLQDO 3XOVHHQDEOH
VRIWZDUH

3XOVHHQDEOH 3XOVHVHQDEOHG
KDUGZDUH

6DIHRSHUDWLQJVWRS '
,5
WHUPLQDO GULYHPRGXOH

3( 3XOVHHQDEOH
,5 ,QIHHGUHJHQHUDWLYH
IHHGEDFNPRGXOH

Pulse enable for 611D drive module


Corresponding to .... DB31, ... DBX21.7 (pulse enable)
MD1404 $MD_PULSE_SUPRESSION_DELAY
MD1403 $MD_PULSE_SUPRESSION_SPEED
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1615
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.0 Motor temperature prewarning
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The drive module signals a "Motor temperature prewarning" to the PLC.
edge change In this case, the motor temperature has exceeded the defined warning threshold:
0→1 MD1602 $MD_MOTOR_TEMP_WARN_LIMIT (maximum motor temperature; standard value
120 °C)
(② in the diagram).
If the motor temperature remains too high, after a defined time:
MD1603 $MD_MOTOR_TEMP_ALARM_TIME
(timer state, motor temperature alarm, standard value 240 s)
the drive is regeneratively braked and then the pulses are inhibited (③ in the diagram).
Alarm 300614 is output and the interface signal:
DB10 DBX108.6 (611D ready)
is withdrawn.
If the motor temperature rises still further and the shutdown threshold defined in:
MD1607 $MD_MOTOR_TEMP_SHUTDOWN_LIMIT
(motor temperature shutdown limit, default value 155 °C)
is reached, the drive is stopped immediately (refer to ④ in the diagram).
An alarm is also output and IS "Drive Ready" canceled.
However, if the motor temperature drops back down to below the warning threshold, the IS is reset
to 0 (refer to ② in the diagram).
Special case:
If no temperature sensor signal is measured, this is interpreted as a fault in the motor PTC
thermistor
In this case, the interface signal:
DB31, ... DBX94.0 (motor temperature prewarning)
is also set.
The procedure continues as described above.
Signal state 0 or The motor temperature is below the warning threshold.
edge change The actual motor temperature is displayed in the axis/spindle service display in the operating area
1→0 "diagnostics".
This display corresponds to the machine data:
MD1702 $MD_MOTOR_TEMPERATURE (motor temperature)

Basic Functions
1616 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.0 Motor temperature prewarning

0RWRUWHPSHUDWXUH $ODUP

0'0'B02725B7(03
6KXWGRZQOLPLW
B6+87'2:1B/,0,7 $ODUP



:DUQLQJ :DUQLQJ

0'0'B02725
:DUQLQJWKUHVKROG
B7(03B:$51B/,0,7


7LPH
7LPH
'80'
0'0'B02725B7(03
B$/$50B7,0(

:DUQLQJ :DUQLQJ
,60RWRU 
WHPSHUDWXUH
 
SUHZDUQLQJ

7LPH

$ODUP $ODUP


,6'ULYH
 
UHDG\


Application As soon as "Motor temperature prewarning" has been signaled, the PLC can, for example, initiate
example(s) controlled shutdown of the drives.
Corresponding to .... DB31, ... DBX93.5 (drive ready)
MD1602 $MD_MOTOR_TEMP_WARN_LIMIT
MD1603 $MD_MOTOR_TEMP_ALARM_TIME
MD1607 $MD_MOTOR_TEMP_SHUTDOWN_LIMIT
Additional references /DA/ Diagnostics Manual
/IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX94.1 Heatsink temperature prewarning
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The drive module sends the warning "heatsink temperature prewarning" to the PLC.
edge change This triggers the following:
0→1
• Terminal 5 on the infeed/regenerative feedback module is simultaneously activated.
• The drive module is switched off after 20 seconds. The drives are stopped when the impulse
enable is removed. Then alarm 300515 is triggered.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1617
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.1 Heatsink temperature prewarning
Signal state 0 or The drive module heatsink temperature pre-warning has not responded.
edge change
1→0
Application As soon as "heatsink temperature prewarning" has been signaled, the PLC can, for example,
example(s) initiate controlled shutdown of the drives.
Additional references /DA/ Diagnostics Manual

DB31, ...
DBX94.2 Ramp-up completed
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The PLC is signaled, that after a new speed setpoint has entered, the speed actual value has
edge change reached the speed tolerance bandwidth:
0→1 MD1426 $MD_SPEED_DES_EQ_ACT_TOL (tolerance bandwidth for nset = nact - signal)
and has remained within this tolerance bandwidth for at least the time defined using machine data:
MD1427 $MD_SPEED_DES_EQ_ACT_DELAY (delay time nset = nact - signal)
refer to the diagram).
Even if the speed actual value leaves the tolerance band (because of speed fluctuations resulting
from changes in load) the "ramp-up completed" signal remains (1 signal).
Signal state 0 or The conditions described above have not yet been fulfilled. The ramp-up has therefore not yet been
edge change completed.
1→0

Basic Functions
1618 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.2 Ramp-up completed

5DPSIXQFWLRQJHQHUDWRU
DFWLYH FRQWUROZRUGVHUYR

DFWLYH

LQDFWLYH
6SHHGVHWSRLQW 7LPH
6SHHGQ QVHW 0'
0'B63(('B'(6B(4B$&7B72/

6SHHGWROHUDQFH
EDQGZLGWK

6SHHGDFWXDOYDOXHQDFW

,65DPSXS
FRPSOHWHG 7LPH


77' 7!7'
WKHUHIRUH VLJQDO
QRVLJQDO WKDWLV
LQWHUORFNHG



,6QDFW 
QVHW 7LPH


77' 7!7' 7!7'
WKHUHIRUH 6LJQDO 6LJQDO
QRVLJQDO


7LPH
7' 0'0'B63(('B'(6B(4B$&7B'(/$<

Corresponding to .... DB31, ... DBX94.6 ("nact = nset")


DB31, ... DBX94.3 ("|MD| = Mdx")
MD1426 $MD_SPEED_DES_EQ_ACT_TOL
MD1427 $MD_SPEED_DES_EQ_ACT_DELAY
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1619
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.3 |Md| < Mdx
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or 611D signals to the PLC that the torque setpoint |Md| does not exceed the threshold torque Mdx in
edge change the steady-state condition (i.e. ramp-up completed) (refer to the diagram).
0→1 The threshold torque is set using the machine data:
MD1428 $MD_TORQUE_THRESHOLD_X (threshold torque)
as a % of the actual torque limit value.
The torque threshold characteristic is speed-dependent.
While ramping-up, the interface signal:
DB31, ... DBX94.2 (|Md|< Mdx)
remains at 1.
The signal |Md|< Mdx only becomes active after ramp-up has been completed:
DB31, ... DBX94.2 (ramp-up completed) = 1
and the signal interlocking time for the threshold torque:
MD1429 $MD_TORQUE_THRESHOLD_X_DELAY (delay time nd < ndx - signal)
has expired
Signal state 0 or The torque setpoint |Md| is larger than the threshold torque Mdx.
edge change If necessary, the PLC user program can initiate a response.
1→0

Basic Functions
1620 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.3 |Md| < Mdx

5DPSIXQFWLRQJHQHUDWRU
DFWLYH FRQWUROZRUGVHUYR

DFWLYH

LQDFWLYH
7LPH
6SHHG
6SHHGVHWSRLQWQVHW

6SHHG
WROHUDQFH
EDQG

6SHHGDFWXDOYDOXHQDFW

7LPH
7RUTXH
7KUHVKROGWRUTXH'
0'0'B72548(B7+5(6+2/'B;
IRU-0G-0G[

7RUTXHVHWSRLQW
0G

,65DPSXS 7LPH
FRPSOHWHG


77' 7!7'
WKHUHIRUH VLJQDO
QRVLJQDO WKDWLV
LQWHUORFNHG


,6 7LPH
,0G,0G[


5HPDLQVDFWLYHGXULQJUDPS"XS 7'
LQWHUORFNHGWRDFWLYH


7LPH
7' 0'0'B63(('B'(6B(4B$&7B'(/$<
7' 0'0'B72548(B7+5(6+2/'B;B'(/$<

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1621
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.3 |Md| < Mdx
Corresponding to .... DB31, ... DBX94.2 (ramp-up completed)
MD1428 $MD_TORQUE_THRESHOLD_X
MD1429 $MD_TORQUE_THRESHOLD_X_DELAY
MD1427 $MD_SPEED_DES_EQ_ACT_DELAY
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX94.4 |nact| < nmin
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The SIMODRIVE 611 D/ 611D signals the PLC that the speed actual value nact is less than the
edge change minimum speed (nmin).
0→1 The minimum speed is defined using the machine data:
MD1418 $MD_SPEED_THRESHOLD_MIN.
Signal state 0 or The speed actual value is higher than the minimum speed.
edge change
1→0
Corresponding to .... MD1418 $MD_SPEED_THRESHOLD_MIN (minimum speed (nmin for nact< nmin))
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX94.5 |nact| < nx
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The 611D/ 611U signals the PLC that the speed actual value nact is less than the threshold speed
edge change (nx).
0→1 The threshold speed is defined using the machine data:
MD1417 $MD_SPEED_THRESHOLD_X.
Signal state 0 or The speed actual value is higher than the threshold speed.
edge change
1→0
Corresponding to .... MD1417 $MD_SPEED_THRESHOLD_X (threshold speed (nx for nact < nx))
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
1622 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.6 nact = nset
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or SIMODRIVE 611D/611U signals the PLC that after a new speed setpoint has been entered, the
edge change speed actual value nact has reached the speed tolerance bandwidth:
0→1 MD1426 $MD_SPEED_DES_EQ_ACT_TOL (tolerance bandwidth for nset = nact signal)
and has remained within this tolerance bandwidth for at least the time defined using machine data:
MD1427 $MD_SPEED_DES_EQ_ACT_DELAY (delay time for nset = nact signal)
(refer to the diagram).
If the speed actual value then leaves the tolerance bandwidth, then contrary to the signal "ramp-up
completed", the interface signal:
DB31, ... DBX94.6 (nact = nset)
is set to 0.
Signal state 0 or The conditions described above have not yet been fulfilled. The speed actual value is outside the
edge change speed tolerance bandwidth.
1→0
Corresponding to .... DB31, ... DBX94.2 (ramp-up completed)
MD1426 $MD_SPEED_DES_EQ_ACT_TOL
MD1427 $MD_SPEED_DES_EQ_ACT_DELAY
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1623
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.7 Variable signaling function
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 The SIMODRIVE 611D/611U signals the PLC that the threshold value has exceeded the value
being monitored.
With the variable signaling function it is possible to monitor for each axis whether a defined
threshold - that can be entered - is exceeded for any programmable value of SIMODRIVE
611D/611U. A corresponding interface signal is then sent to the PLC.
The parameters for the variables being monitored are set in the following 611D machine data:
• MD1620 $MD_PROG_SIGNAL_FLAGS (bits variable signal function)
• MD1621 $MD_PROG_SIGNAL_NR (signal number variable signal function)
• MD1622 $MD_PROG_SIGNAL_ADDRESS (address variable signal function)
• MD1623 $MD_PROG_SIGNAL_THRESHOLD (threshold variable signal function)
• MD1624 $MD_PROG_SIGNAL_HYSTERESIS (hysteresis variable signal function)
• MD1625 $MD_PROG_SIGNAL_ON_DELAY (on delay variable signal function)
• MD1626 $MD_PROG_SIGNAL_OFF_DELAY (off delay variable signal function)
Monitoring:
The parameterized variable is monitored to check whether it exceeds a defined threshold. In
addition, a tolerance band (hysteresis) can be defined which is considered when scanning for
violation of the threshold value. Further, the "threshold exceeded" signal can be also be logically
combined with an on delay and off delay time (refer to the diagram).
Selection:
The variable to be monitored can be selected by entering a signal number or by entering a symbolic
address.
The machine data:
MD1620 $MD_PROG_SIGNAL_FLAGS (bits, variable signaling function)
can be used to enable and disable the variable signaling function on an axis-for-axis basis.
This machine data can also be used to determined whether the threshold value comparison is to be
signed or unsigned.
For further information see References.
Signal state 0 SIMODRIVE 611D signals the PLC that the threshold value of the variable being monitored has not
been exceeded or that the conditions defined in the above 611D-MD are not fulfilled.
If the variable signaling function is disabled (MD1620), signal state "0" is output to the PLC.

Basic Functions
1624 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX94.7 Variable signaling function

7KUHVKROG 7ROHUDQFHEDQG
0' 0'
0'B352*B 0'B352*B6,*1$/
6,*1$/B B+<67(5(6,6
7+5(6+2/'

6LJQDO7KUHVKROGYDOXHH[FHHGHG

3XOOLQGHOD\WLPH 'URSRXWGHOD\WLPH
0'0'B352*B6,*1$/B21B'(/$< 0'0'B352*B6,*1$/B2))B'(/$<

Application With the variable signal function the machine tool manufacturer can monitor one additional
example(s) threshold value for specific applications for each axis/spindle and evaluate the result in the PLC
user program.
Example:
The interface signal:
DB31, ... DBX94.7 (variable signaling function)
should be set to a 1 if the motor torque exceeds 50 % of the rated torque.
Corresponding to .... MD1620 $MD_PROG_SIGNAL_FLAGS (bits variable signal function)
MD1621 $MD_PROG_SIGNAL_NR (signal number variable signal function)
MD1622 $MD_PROG_SIGNAL_ADDRESS (address variable signal function)
MD1623 $MD_PROG_SIGNAL_THRESHOLD (threshold variable signal function)
MD1624 $MD_PROG_SIGNAL_HYSTERESIS (hysteresis variable signal function)
MD1625 $MD_PROG_SIGNAL_ON_DELAY (on delay variable signal function)
MD1626 $MD_PROG_SIGNAL_OFF_DELAY (off delay variable signal function)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611D

DB31, ...
DBX95.0 VDC link < warning threshold
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The drive signals the PLC that the DC link voltage VDC link has dropped below the DC link
edge change undervoltage warning threshold.
0→1 The DC link undervoltage warning threshold is defined using:
MD1604 $MD_LINK_VOLTAGE_WARN_LIMIT.
The DC link undervoltage warning threshold should be defined to be greater than 400 V, depending
on the application case. If the DC link voltage drops below 280 V, the unit is powered-down by the
hardware.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1625
NC/PLC Interface Signals (Z1)
Various interface signals and functions (A2)

DB31, ...
DBX95.0 VDC link < warning threshold
Signal state 0 or The DC link voltage VDClink is greater than the DC link undervoltage warning threshold.
edge change
1→0
Application If a warning signal is given, measures can be taken by the PLC user program, for example, to stop
example(s) machining (e.g. start tool retraction) or to buffer the DC link voltage.
Corresponding to .... MD1604 $MD_LINK_VOLTAGE_WARN_LIMIT (DC link undervoltage warning threshold)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611 digital

DB31, ...
DBX95.7 i2t monitoring
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The drive signals the PLC that the power unit monitoring has responded.
edge change The rated current limit of this i2t monitoring function is defined in drive machine data
0→1 MD1261 $MD_I2T_NOMINAL_REDUCTION.

It is also possible to set the time for which the power unit may be at its limit in machine data:
MD1262 $MD_DIAGNOSIS_I2T

The i2t monitoring function can be used to protect the power unit of digital drives against continuous
overloads.
Signal state 0 or The i2t monitoring function has not responded.
edge change
1→0
Application Further measures can be initiated by the PLC user program, if necessary, when the warning signal
example(s) is activated.
Corresponding to .... MD1261 $MD_I2T_NOMINAL_REDUCTION (i2t limiting, rated power unit current)
MD1262 $MD_DIAGNOSIS_I2T (i2t time at the limit)
MD1263 $MD_LIMIT_I2T (i2t actual limit factor)
MD1264 $MD_LOAD_I2T (i2t actual utilization factor)
Additional references /IAD/ SINUMERIK 840D Installation and Startup Guide; Chapter: SIMODRIVE 611digital

Basic Functions
1626 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Axis monitoring, protection zones (A3)

18.3 Axis monitoring, protection zones (A3)

18.3.1 Signals to channel (DB21, ...)

DB21, ...
DBX1.1 Enable protection zones
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or When a positive edge of this signal appears, a protection zone is enabled and the active alarm
edge change cleared. Then, motion can start in the same protection zone. As a result of the start of motion, the
0→1 protection zone is enabled, the IS "machine or channel-specific protection zone violated" is set, and
the axis starts to move.
The enabling signal is canceled if motion is started that does not lead into the enabled protection
zone.
Signal state 0 or No effect
edge change
1→0
Application This allows protection zones to be released:
example(s) • if the current position is within a protection zone (alarm 2 present)
• if motion is to be started towards the protection zone limit
(alarm 1 or 2 present)

DB21, ...
DBX8.0 - DBX9.1 Activate machine-specific protection zone 1 ( ...10)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The pre-activated, machine-related protection zone 1 ( ...10) is activated by the PLC user program.
edge change The protection zone is immediately activated.
0→1
Only protection zones that have been pre-activated in the part program can be activated.
Signal state 0 or The pre-activated, machine-related protection zone 1 ( ...10) is de-activated by the PLC user
edge change program.
1→0 The protection zone is immediately de-activated.
Only protection zones that have been activated via the PLC and have been pre-activated in the NC
part program can be de-activated.
Application Before a sensor, for example, is moved into the working range, the relevant machine-related
example(s) protection zone can be activated.

DB21, ...
DBX10.0 - DBX11.1 Activate channel-specific protection zone 1 ( ...10)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The preactivated, channel-specific protection zone 1 ( ...10) is activated by the PLC user program.
edge change The protection zone is immediately activated.
0→1
Only protection zones that have been pre-activated in the part program can be activated.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1627
NC/PLC Interface Signals (Z1)
Axis monitoring, protection zones (A3)

DB21, ...
DBX10.0 - DBX11.1 Activate channel-specific protection zone 1 ( ...10)
Signal state 0 or The pre-activated, channel-specific protection zone 1 ( ...10) is de-activated by the PLC user
edge change program.
1→0 The protection zone is immediately de-activated.
Only protection zones that have been activated via the PLC and have been pre-activated in the NC
part program can be de-activated.
Application Before a synchronous spindle, for example, is moved into the working range, the relevant machine-
example(s) related protection zone can be activated.

18.3.2 Signals from channel (DB21, ...)

DB21, ...
DBX272.0 – Machine-related protection zone 1 ( ...10) pre-activated
DBX273.1
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The machine-related protection zone 1 ( ...10) is preactivated in the current block.
edge change (Pre-activated in the part program).
0→1 The protection zone can therefore be activated or de-activated in the PLC user program using the
interface signal:
DB21, ... DBX8.0 - DBX9.1 (machine-related protection zone 1 (...10))

Signal state 0 or The machine-related protection zone 1 ( ...10) is deactivated in the current block.
edge change (De-activated in the part program).
1→0 The protection zone can therefore not be activated or de-activated in the PLC user program using
the interface signal:
DB21, ... DBX8.0 to DBX9.1 (activate machine-related protection zone 1 (...10))

Corresponding DB21, ... DBX8.0 - DBX9.1 (activate machine-related protection zone 1 (...10))
to ....

DB21, ...
DBX274.0 – Channel-specific protection zone 1 (...10) pre-activated
DBX275.1
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The channel-specific protection zone 1 ( ...10) is preactivated in the current block.
edge change (Pre-activated in the part program).
0→1 The protection zone can therefore be activated or de-activated in the PLC user program using the
interface signal:
DB21, ... DBX10.0 - DBX11.1 channel-specific protection zone 1 (...10))
Signal state 0 or The channel-specific protection zone 1 ( ...10) is deactivated in the current block.
edge change (De-activated in the part program.)
1→0 The protection zone can therefore not be activated or de-activated in the PLC user program using
the interface signal:
DB21, ... DBX10.0 - DBX11.1 (channel-specific protection zone 1 (...10))
Corresponding DB21, ... DBX10.0 - DBX11.1 (activate channel-specific protection zone 1 (...10))
to ....

Basic Functions
1628 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Axis monitoring, protection zones (A3)

DB21, ...
DBX276.0 – Machine-related protection zone 1 (...10) violated
DBX277.1
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The activated, machine-related protection zone 1 ( ...10) is violated in the current block or in the
edge change current JOG movement.
0→1 The pre-activated, machine-related protection zone 1 ( ...10) would be violated in the current block
if it would be activated by the PLC.
Signal state 0 The activated, machine-related protection zone 1 (...10) is not violated in the current block.
or edge change The pre-activated, machine-related protection zone 1 (...10) would not be violated in the current
1→0 block if it would be activated by the PLC.
Application Before parts are moved into the working zone - this IS can be used to check as to whether the tool
example(s) or workpiece is located in the machine-related protection zone of the part to be moved in.

DB21, ...
DBX278.0 - Channel-specific protection zone 1 (...10) violated
DBX279.1
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The activated, channel-specific protection zone 1 ( ...10) is violated in the current block.
edge change The pre-activated, channel-specific protection zone 1 ( ...10) would be violated in the current block
0→1 if it would be activated by the PLC.
Signal state 0 or The activated, channel-specific protection zone 1 ( ...10) is not violated in the current block.
edge change The pre-activated, channel-specific protection zone 1 (...10) would not be violated in the current
1→0 block if it would be activated by the PLC.
Application Before parts are moved into the working zone - this IS can be used to check whether the tool or
example(s) workpiece is located in the channel-specific protection zone of the part to be moved-in.

18.3.3 Signals to axis/spindle (DB31, ...)

DB31, ...
DBX2.3 Clamping in progress
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Clamping in progress.
edge change The clamping monitoring function is activated.
0→1
Signal state 0 or Clamping completed.
edge change The clamping monitoring function is replaced by the standstill (zero speed) monitoring.
1→0
Corresponding to .... MD36050 $MA_CLAMP_POS_TOL (Clamping tolerance)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1629
NC/PLC Interface Signals (Z1)
Axis monitoring, protection zones (A3)

DB31, ...
DBX3.6 Velocity/spindle speed limitation
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The NCK limits the velocity/spindle speed to the limit value set in the machine data:
edge change MD35160 $MA_SPIND_EXTERN_VELO_LIMIT
0→1
Signal state 0 or No limitation active.
edge change
1→0
Corresponding to .... MD35100 $MA_SPIND_VELO_LIMIT (max. spindle speed)
SD43220 $SA_SPIND_MAX_VELO_G26 (prog. spindle speed limiting G26)
MD43230 $SA_SPIND_MAX_VELO_LIMIT (prog. spindle speed limiting G96/G961)

DB31, ...
DBX12.0 - DBX12.1 Hardware limit switches plus and minus
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or A switch can be mounted at each end of the travel range of a machine axis which will cause a
edge change signal "hardware limit switch plus or minus" to be signaled to the NC via the PLC if it is actuated.
0→1 If the signal is recognized as set, alarm 021614 "hardware limit switch + or -" is output and the axis
is decelerated immediately.
The braking/deceleration type is defined using the machine data:
MD36600 $MA_BRAKE_MODE_CHOICE (braking behavior at the hardware limit switch)
If the controller enable is withdrawn at the same time as the "hardware limit switch" signal, then the
axis responds as described in Chapter A2 ("various interface signals").
Signal state 0 or Normal condition - a hardware limit switch has not been actuated.
edge change
1→0
Corresponding to .... MD36600 $MA_BRAKE_MODE_CHOICE (deceleration behavior when the hardware limit switch
responds)

DB31, ...
DBX12.2 - DBX12.3 2nd software limit switch plus or minus
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or 2nd software limit switch for the plus and minus directions is effective.
edge change 1st software limit switch for the plus and minus directions is not effective.
0→1
In addition to the 1st software limit switches (plus and minus), the 2nd software limit switches (plus
and minus) can be activated using these interface signals.
The position is defined using machine data:
MD36130 $MA_POS_LIMIT_PLUS2 (2nd software limit switch plus)
and
MD36120 $MA_POS_LIMIT_MINUS2 (2nd software limit switch minus).

Basic Functions
1630 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Axis monitoring, protection zones (A3)

DB31, ...
DBX12.2 - DBX12.3 2nd software limit switch plus or minus
Signal state 0 or 1st software limit switch for the plus and minus directions is effective.
edge change 2nd software limit switch for the plus and minus directions is not effective.
1→0
Corresponding to .... MD36110 $MA_POS_LIMIT_PLUS (1st software limit switch plus)
MD36130 $MA_POS_LIMIT_PLUS2 (2nd software limit switch plus)
MD36100 $MA_POS_LIMIT_MINUS (1st software limit switch minus)
MD36120 $MA_POS_LIMIT_MINUS2 (2nd software limit switch minus)

18.3.4 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX60.2 - DBX60.3 Encoder limit frequency exceeded 1
Encoder limit frequency exceeded 2
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The limit frequency set in the machine data:
edge change MD36300 $MA_ENC_FREQ_LIMIT (encoder limit frequency)
0→1 has been exceeded.
The reference point for the position measuring system involved has been lost (IS:
Referenced/synchronized has a signal state 0). Closed loop position control is no longer possible.
Spindles continue to run with closed-loop speed control. Axes are stopped with a fast stop (with
open-circuit position control loop) along a speed setpoint ramp.
Signal state 0 or The limit frequency set in machine data:
edge change MD36300 $MA_ENC_FREQ_LIMIT
1→0 is no longer exceeded
(encoder frequency < ENC_FREQ_LIMIT_LOW).
For the edge change 1 → 0, the encoder frequency must have fallen below the value of machine
data:
MD36302 $MA_ENC_FREQ_LIMIT_LOW

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1631
NC/PLC Interface Signals (Z1)
Continuous-path mode, exact stop and LookAhead (B1)

18.4 Continuous-path mode, exact stop and LookAhead (B1)

18.4.1 Signals from channel (DB21, ...)

DB21, ...
DBX36.3 All axes stationary
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or All axes assigned to the channel are stationary with interpolator end.
edge change No other traversing movements are active.
0→1

18.4.2 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX60.6 Position reached with exact stop coarse
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The axis is in the appropriate exact stop and no interpolator is active for the axis and:
edge change • the control is in the reset mode (reset key or end of program)
0→1
• the axis was last programmed as a positioning axis or positioning spindle (initial setting of
supplementary axis: Positioning axis)
• the path movement was stopped with NC Stop
• the spindle is in the closed-loop position-controlled mode (SPCON/SPOS instruction) and is
stationary
• the axis is switched from closed-loop speed-controlled to closed-loop position-controlled mode
with IS "position measuring system"
Signal state 0 or The axis is not in the appropriate exact stop or the interpolator is active for the axis or:
edge change • the path movement was stopped with NC Stop
1→0
• the spindle is in the closed-loop speed-controlled mode (SPCOF/SPOSA instruction)
• the "follow-up" mode is active for the axis
• the "parking" mode is active for the axis
• the axis is switched from closed-loop position-controlled to closed-loop speed-controlled mode
with IS "position measuring system"
Signal irrelevant for Rotary axes that are programmed as rounding axes.
...
Corresponding to .... MD36000 $MA_STOP_LIMIT_COARSE (exact stop coarse)

Basic Functions
1632 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Continuous-path mode, exact stop and LookAhead (B1)

DB31, ...
DBX60.7 Position reached with exact stop fine
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Refer to DB31, ... DBX60.6 (position reached with exact stop coarse).
edge change
0→1
Signal state 0 or Refer to DB31, ... DBX60.6 (position reached with exact stop coarse).
edge change
1→0
Signal irrelevant for Rotary axes that are programmed as rounding axes.
...
Corresponding to .... MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1633
NC/PLC Interface Signals (Z1)
Travel to fixed stop (F1)

18.5 Travel to fixed stop (F1)

18.5.1 Signals to axis/spindle (DB31, ...)

DB31, ...
DBX1.1 Acknowledge fixed stop reached
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Significance after the fixed stop has been reached:
edge change DB31, ... DBX62.5 (fixed stop reached) = 1
0→1 → The axis presses against the fixed stop with the clamping torque:
→ The fixed stop monitoring window is activated.
→ A block change is executed.
Signal state 0 Significance after the fixed stop has been reached:
DB31, ... DBX62.5 (fixed stop reached) = 1
→ The axis presses against the fixed stop with the clamping torque.
→ The fixed stop monitoring window is activated.
→ A block change is not executed and the channel message
"Wait: Auxiliary function acknowledgment missing" is displayed.
Edge change Meaning after the fixed stop has been reached:
1→0 IS "Fixed stop reached" DB31, ... DBX62.5 = 1
→ The function is aborted, the alarm "20094 axis %1 Function aborted" is output.
Significance when de-selecting the function FXS=0 via the part program:
→ The torque limiting and the monitoring of the fixed stop monitoring window are canceled.
IS irrelevant MD37060 $MA_FIXED_STOP_ACKN_MASK
for ... (monitoring PLC acknowledgments for travel to fixed stop)
= 0 or 1
Corresponding to .... MD37060 $MA_FIXED_STOP_ACKN_MASK
(monitoring PLC acknowledgments for travel to fixed stop)
DB31, ... DBX62.5 (fixed stop reached)

DB31, ...
DBX1.2 Sensor for fixed stop
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Fixed stop is reached.
edge change
0→1
Signal state 0 or Fixed stop is not reached.
edge change
1→0
Corresponding to .... The signal is only active if:
MD37040 $MA_FIXED_STOP_BY_SENSOR = 1

Basic Functions
1634 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Travel to fixed stop (F1)

DB31, ...
DBX3.1 Enable travel to fixed stop
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Meaning when FXS function is selected using the part program
edge change (IS "Activate travel to fixed stop" = 1):
0→1 → Travel to fixed stop is enabled and the axis traverses from the start position at the programmed
velocity to the programmed target position.
Signal state 0 Meaning when FXS function is selected using the part program
(IS "Activate travel to fixed stop" = 1):
→ Travel to fixed stop is inhibited.
→ The axis is stationary at the start position with reduced torque.
→ The channel message "wait": Auxiliary function acknowledgment missing" is displayed.
Edge change Meaning before the fixed stop has been reached
1→0 (IS "fixed stop reached" = 0):
→ Travel to fixed stop is aborted.
→ The alarm "20094: Axis%1 Function aborted" is displayed.
Meaning after the fixed stop has been reached
IS "fixed stop reached" = 1):
→ The torque limiting and monitoring of the fixed stop monitoring window are canceled.
Deselection: DB31, ...DBX1.1 (acknowledge fixed stop reached)
IS irrelevant MD37060 $MA_FIXED_STOP_ACKN_MASK
for ... (monitoring PLC acknowledgments for travel to fixed stop)
= 0 or 2
Corresponding to .... MD37060 $MA_FIXED_STOP_ACKN_MASK
(monitoring PLC acknowledgments for travel to fixed stop)
DB31, ... DBX62.4 (activate travel to fixed stop)

18.5.2 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX62.4 Activate travel to fixed stop
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The "Travel to fixed stop" function is active.
edge change This signal is used for analog drives in order, for example, to activate the current or torque limitation
0→1 parameterized in the actuator.
Signal state 0 or The "Travel to fixed stop function" is not active.
edge change
1→0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1635
NC/PLC Interface Signals (Z1)
Travel to fixed stop (F1)

DB31, ...
DBX62.5 Fixed stop reached
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The fixed stop was reached after selecting the FXS function.
edge change This signal is used by analog drives, e.g. to switch the actuator from speed-controlled to current or
0→1 torque-controlled mode so that a programmable clamping torque can be set.
Signal state 0 or The fixed stop has still not been reached after selecting the FXS function.
edge change
1→0

Basic Functions
1636 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Help function output to PLC (H2)

18.6 Help function output to PLC (H2)

18.6.1 Signals to channel (DB21, ...)

DB21, ...
DBX30.5 Activate associated M01
Edge evaluation: no Signal(s) updated:
Signal state 1 or PLC signals the NCK that the associated M01 (help function) should be activated.
edge change
0→1
Signal state 0 or De-activate the associated M01 (help function).
edge change
1→0
Corresponding to .... DB21, ... DBX 318.5 (associated M01 active)

18.6.2 Signals from channel (DB21, ...)

DB21, ...
DBB58, M, S, T, D, H, F functions modification
DBB60 - DBB65
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or One M, S, T, An D, H, or F function has been output to the interface with a new value together with
edge change the associated change signal at the beginning of an OB1 cycle.
0→1 In this case, the change signal indicates that the appropriate value is valid.
Signal state 0 or The change signals are reset by the PLC basic program at the start of the next OB1 cycle.
edge change The value of the data involved is not valid.
1→0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1637
NC/PLC Interface Signals (Z1)
Help function output to PLC (H2)

DB21, ...
DBX59.0 - DBX59.4 M function 1-5 not included in list
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or M function is greater than 99 (for extended address = 0) or for extended address > 0, not included
edge change in the decoding list.
0→1 This signal is available - together with the associated M change signal - for one OB1 cycle.
Cause:
• Incorrect M function programmed
• M function not configured in the decoding list of the PLC
Remedy, e.g.:
• PLC sets read-in disable
• Output of a PLC alarm
Signal state 0 or M function less than 99 (for extended address = 0) or for extended address > 0 included in the
edge change decoding list.
1→0

DB21, ...
DBB60 - DBB64, M, S, T, D, H, F functions Additional info "Quick" (fast acknowledgment)
DBB66 - DBB67
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or One M, S, T, An D, H, or F function has been output to the interface with a new value together with
edge change the associated change signal at the beginning of an OB1 cycle.
0→1 In this case, the additional info "Quick" indicates the quick help function.
Signal state 0 or The change signals are reset by the PLC basic program at the start of the next OB1 cycle.
edge change The value of the data involved is not valid.
1→0

DB21, ... M functions 1 to 5


DBB68 - DBB97 Extended address M functions 1 to 5
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or Up to 5 M functions programmed in an NC block are simultaneously made available here as soon
edge change as the M change signals are available.
0→1 Value range of M functions: 0 to 9999 9999; integer number
Value range of the extended address: 0 to 99; integer number
The M functions remain valid until they are overwritten by new M functions.
Signal state 0 or • After the PLC has ramped-up.
edge change • All help functions are deleted before a new function is entered.
1→0
Application Decoding and evaluation of M functions that are not decoded as standard or via a list.
example(s) Using the extended address, the M function can be assigned to another channel that does not
correspond to that channel in which the program is running.
Special cases, For M00 to M99 the extended address = 0.
errors, ......

Basic Functions
1638 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Help function output to PLC (H2)

DB21, ... S functions 1 to 3


DBB98 - DBB115 Extended address S functions 1 to 3
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or Up to 3 S functions programmed in an NC block are simultaneously made available here as soon
edge change as the S change signals are available.
0→1 Value range of the spindle speed: 0 to 999 999; integer number
Value range of the extended address: 0 to 6; integer number
The S functions remain valid until they are overwritten by new S functions.
Signal state 0 or • After the PLC has ramped-up.
edge change • All help functions are deleted before a new function is entered.
1→0
Application Spindle speed control by the PLC.
example(s) The extended address is used to program for which spindle the S word is valid.
E.g.: S2=500

DB21, ...
DBB118, DBB119 T function 1
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or The T function programmed in an NC block is made available here
edge change as soon as the T change signal is available.
0→1 Value range of T functions: 0 to 99 999 999; integer number
The T function remains valid until it is overwritten by a new T function.
Signal state 0 or • After the PLC has ramped-up.
edge change • All help functions are deleted before a new function is entered.
1→0
Application Control of automatic tool selection.
example(s)
Special cases, With T0, the current tool is removed from the tool holder but not replaced by a new tool (default
errors, ...... configuration of the machine manufacturer).

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1639
NC/PLC Interface Signals (Z1)
Help function output to PLC (H2)

DB21, ...
DBB129 D function 1
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or The D function programmed in an NC block is made available here
edge change as soon as the D change signal is available.
0→1 Value range of D functions: 0 to 999; integer number
The D function remains valid until it is overwritten by a new D function.
Signal state 0 or • After the PLC has ramped-up.
edge change • All help functions are deleted before a new function is entered.
1→0
Application Implementation of protective functions.
example(s)
Special cases, D0 is reserved for deselecting the current tool offset.
errors, ......

DB21, ... H functions 1 to 3


DBB140 - DBB157 Extended address H functions 1 to 3
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or Up to 3 H functions programmed in an NC block are made available here simultaneously as soon
edge change as the H change signals are available.
0→1 Value range of the H function: Floating point (corresponding to the MC5+format)
Value range of the extended address: 0 to 99; integer number
The H functions remain valid until they are overwritten by new H functions.
Signal state 0 or • After the PLC has ramped-up.
edge change • All help functions are deleted before a new function is entered.
1→0
Application Switching functions on the machine.
example(s)

Basic Functions
1640 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Help function output to PLC (H2)

DB21, ... F functions 1 to 6


DBB158 - DBB193 Extended address F functions 1 to 6
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or Up to 6 F functions (one path feed and up to 5 axis-specific feeds for
edge change positioning axes) are made available here simultaneously as soon as the F change
0→1 signals are available.
Value range of F function: Floating point (corresponding to the MC5+format)
Value range of the extended address: 0 to 18; integer number
The extended address of the F function is generated from the feed type (path feed or axis-specific
feed) and the axis names.
It is coded as follows:

 3DWKIHHGHJ)  HJ) 


WR 0DFKLQHD[LVQXPEHURIWKHSRVLWLRQLQJD[LV HJ)$>;@ 
IRUDQD[LVVSHFLILFIHHG

The F functions remain until they are overwritten by new F functions.


Signal state 0 or • After the PLC has ramped-up.
edge change • All help functions are deleted before a new function is entered.
1→0
Application Control of programmed F word by the PLC, e.g. through overwriting of the set feed rate override.
example(s)
Corresponding to .... MD22240 $MC_AUXFU_F_SYNC_TYPE (output time of F functions)

DB21, ...
DBB194 - DBB206 Dynamic M functions: M0 - M99
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or The dynamic M signal bits are set by decoded M functions.
edge change
0→1
Signal state 0 or For a general help function output, the dynamic M signal bits are acknowledged by the PLC basic
edge change program after the OB1 has been completely run-through (executed once).
1→0 For a fast help function output, after the PLC identifies the help functions, they are acknowledged in
the same OB40 cycle.
Application Spindle clockwise/counterclockwise rotation, switch coolant ON/OFF
example(s)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1641
NC/PLC Interface Signals (Z1)
Help function output to PLC (H2)

DB21, ...
DBX318.5 Associated M01/M00 active
Edge evaluation: No Signal(s) updated:
Signal state 1 or This bit indicates that an M00 or M01 help function is active if the appropriate associated M00 and
edge change M01 (help functions) were enabled/activated beforehand.
0→1
Signal state 0 or No associated M00/M01 help functions active.
edge change
1→0
Corresponding to .... DB21, ... DBX30.5 (activate associated M01)

18.6.3 Signals from axis/spindle (DB31, ...)

DB31, ...
DBD78 Value of F help function
Edge evaluation: no Signal(s) updated: Job-controlled
The values of the F help functions for positioning axes are stored here. The axis to which each
value applies is determined by the extended address.

DB31, ...
DBD86 Value of M help function
Edge evaluation: no Signal(s) updated: Job-controlled
The values for the M3, M4, M5 help functions are sent to the associated interface for the addressed
spindle.

DB31, ...
DBD88 Value of S help function
Edge evaluation: no Signal(s) updated: Job-controlled
The values for the S help functions are sent to the associated interface for the addressed spindle.

Basic Functions
1642 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

18.7 Mode group, channel, program operation, reset response (K1)

18.7.1 Signals to mode group (DB11)

DB11
DBX0.0 AUTOMATIC mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or AUTOMATIK mode is selected by the PLC program.
edge change
0→1
Signal state 0 or AUTOMATIK mode is not selected by the PLC program.
edge change
1→0
Signal irrelevant for DB11 DBX0.4 (operating mode, changeover inhibit) = 1
...
Corresponding to .... DB11 DBX6.0 (active AUTOMATIC mode)

DB11
DBX0.1 MDA mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or MDA mode is selected by the PLC program.
edge change
0→1
Signal state 0 or MDA mode is not selected by the PLC program.
edge change
1→0
Signal irrelevant for DB11 DBX0.4 (operating mode, changeover inhibit) = 1
...
Corresponding to .... DB11 DBX6.1 (active MDA mode)

DB11
DBX0.2 JOG mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or JOG mode is selected by the PLC program.
edge change
0→1
Signal state 0 or JOG mode is not selected by the PLC program.
edge change
1→0
Signal irrelevant for DB11 DBX0.4 (operating mode, changeover inhibit) = 1
...
Corresponding to .... DB11 DBX6.2 (active JOG mode)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1643
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX0.4 Mode changeover inhibit
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The currently active mode (JOG, MDA or AUTOMATIC) of the mode group cannot be changed. The
edge change machine functions that can be selected within a mode group can be changed.
0→1
Signal state 0 or The mode of the mode group can be changed.
edge change
1→0

0RGHVHOHFWLRQ

$8720$7,&
PRGH
0RGHVZLWFKRYHU
GLVDEOH

0'$RSHUDWLQJ 1&
PRGH
'%; 

-2*PRGH

DB11
DBX0.5 Mode group stop
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or An NC stop is activated for all the channels of the mode group. The channel status of all the active
edge change channels changes to the channel status "interrupted". All of the channels in channel status "reset"
0→1 remain in the channel status "reset". Programs that are running at this point are immediately
interrupted (at the earliest possible point, even within a block) and the program status changes to
"stopped". All the moving axes of the mode group are decelerated according to their acceleration
characteristics without contour violation. The program can be restarted with NC start. None of the
spindles of that mode group are affected.
Signal state 0 or Channel status and program execution are not influenced.
edge change
1→0
Special cases, All the axes of a mode group that are not triggered by a program or a program block (e.g. axes
errors, ... ... traverse because traverse keys are being pressed on the machine control panel) decelerate to rest
with mode group stop.

Basic Functions
1644 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX0.6 Mode group stop axes plus spindles
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or An NC stop is activated for all the channels of the mode group. The channel status of all of the
edge change active channels changes to the channel status "interrupted". All of the channels in channel status
0→1 "reset" remain in the channel status "reset". Programs that are running at this point are immediately
interrupted (at the earliest possible point, even within a block) and the program status changes to
"stopped". All the moving axes and spindles of the mode group are decelerated according to their
acceleration characteristics without contour violation. The program can be restarted with NC start.
Signal state 0 or Channel status and program execution are not influenced.
edge change
1→0
Special cases, All the axes and spindles of a mode group that are not triggered by a program or a program block
errors, ...... (e.g. axes traverse because traverse keys are pressed on the machine control panel, spindles are
controlled by the PLC) decelerate to rest with "mode group stop plus spindles".

DB11
DBX0.7 Mode group reset
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or A reset is activated for all the channels of the mode group. All of the channels are then in the
edge change channel status "reset". All of the current programs are then in the program status "aborted". All
0→1 moving axes and spindles are decelerated to zero speed according to their acceleration ramp
without contour violation. The initial settings are set (e.g. for G functions). The alarms for the mode
group are cleared if they are not POWER ON alarms.
Signal state 0 or Channel status and program execution are not influenced by this signal.
edge change
1→0
Corresponding to .... DB21, ... DBX7.7 (channel reset)
DB11 DBX6.7 (all channels in the reset state)
Special cases, An alarm that withdraws the interface signal
errors, ...... DB11 DBX6.3 (mode group ready)
ensures that all channels of the mode group are no longer in the reset state.
In order to switch to another operating mode, a mode group reset (DB11 DBX0.7) must then be
initiated.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1645
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX1.0 Machine function TEACH IN
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function TEACH IN is activated in JOG mode for the mode group.
edge change
0→1
Signal state 0 or Machine function TEACH IN is not activated.
edge change
1→0
Signal irrelevant for If JOG mode is not active.
...
Additional references /BA/ Operating Manual HMI (corresponding to the used software)

DB11
DBX1.1 Machine function REPOS
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REPOS is activated in JOG mode for the mode group.
edge change
0→1
Signal state 0 or Machine function REPOS is not activated.
edge change
1→0
Signal irrelevant for JOG mode is not active.
...
Application When a fault occurs when executing a part program (e.g. tool breakage), the axis is manually
example(s) moved away from the fault location in the JOG mode in order to be able to replace the tool.
The axis can then be manually returned to the exact previous position using the REPOS machine
function so that the program can be continued in the automatic mode.
Additional references /BA/ Operating Manual HMI (corresponding to the used software)

DB11
DBX1.2 Machine function REF
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REF is activated in the JOG mode for the mode group.
edge change
0→1
Signal state 0 or Machine function REF is not activated.
edge change
1→0
Signal irrelevant for If JOG mode is not active.
...
Additional references /FB1/ Function Manual Basic Functions; Reference Point Travel (R1)

Basic Functions
1646 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX1.6 Single block type B
Edge evaluation: No Signal(s) updated:
Signal state 1 or Bit set and DB11 DBX1.7 not set: Response across modes
edge change • All channels are stopped.
0→1
• All channels receive a start command.
• Channel KS stops at the end of the block.
• The channels KA receive a STOPATEND.
(comparable with DB21, ... DBX7.2 (NC stop at the block limit).)
• All channels are stopped at a block limit (at some point in time).
(If DB11 DBX1.6 and DB11 DBX1.7 are set simultaneously, it is impossible to determine which
single block type is required. In this case, the control assumes: No single block across mode
groups).
Signal state 0 or If Bit DB11 DBX1.6 is not set and Bit DB11 DBX1.7 is set, then it is single block type A.
edge change (If DB11 DBX1.6 and DB11 DBX1.7 are not set, it is impossible to determine which single block
1→0 type is required. The control then assumes: No single block across mode groups).
Corresponding to .... Single block type A

DB11
DBX1.7 Single block type A
Edge evaluation: No Signal(s) updated:
Signal state 1 or DB11 DBX1.7 set and DB11 DBX1.6 not set: Response across modes
edge change • All channels are stopped.
0→1
• All channels receive a start (start key).
• Channel KS stops at the end of the block (due to single-block)
• Channels KA receive a STOP command. (comparable to the STOP KEY).
• All channels are stopped. (deceleration phase of all KAs)
(If DB11 DBX1.6 and DB11 DBX1.7 are set simultaneously, it is impossible to determine which
single block type is required. The control then assumes: No single block across mode groups).
Signal state 0 or If DB11 DBX1.7 is not set and DB11 DBX1.6 is set, then it is single block type B.
edge change (If DB11 DBX1.6 and DB11 DBX1.7 are not set, it is impossible to determine which single block
1→0 type is required. The control then assumes: No single block across mode groups).
Corresponding to .... Single block type B

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1647
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

18.7.2 Signals from the mode group (DB11)

DB11
DBX4.0 Selected mode AUTOMATIC
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or AUTOMATIC mode is selected by HMI.
edge change
0→1
Signal state 0 or AUTOMATIC mode is not selected by HMI.
edge change
1→0

DB11
DBX4.1 Selected mode MDA
Edge evaluation: Signal(s) updated: Cyclically
Signal state 1 or MDA mode is selected by HMI.
edge change
0→1
Signal state 0 or MDA mode is not selected by HMI.
edge change
1→0

DB11
DBX4.2 Selected JOG mode
Data block Signal(s) from BAG (HMI → PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or JOG mode is selected by HMI.
edge change
0→1
Signal state 0 or JOG mode is not selected by HMI.
edge change
1→0

DB11
DBX5.0 Selected machine function TEACH IN
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The machine function TEACH IN is selected by HMI within BAG.
edge change
0→1
Signal state 0 or The machine function TEACH IN is not selected by HMI.
edge change
1→0
Additional references /BA/ Operating Manual HMI (corresponding to the used software)

Basic Functions
1648 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX5.1 Selected REPOS machine function
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The machine function REPOS is selected by HMI within BAG.
edge change
0→1
Signal state 0 or The machine function REPOS is not selected by HMI.
edge change
1→0
Application When a fault occurs when executing a part program (e.g. tool breakage), the axis is manually
example(s) moved away from the fault location in the JOG mode in order to be able to replace the tool.
The axis can then be manually returned to the exact previous position using the REPOS machine
function so that the program can be continued in the automatic mode.
Additional references /BA/ Operating Manual HMI (corresponding to the used software)

DB11
DBX5.2 Selected machine function REF
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The machine function REF is selected by HMI within BAG.
edge change
0→1
Signal state 0 or The machine function REF is not selected by HMI.
edge change
1→0
Additional references /FB1/ Function Manual Basic Functions; Reference Point Travel (R1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1649
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX6.0 Active mode AUTOMATIC
Data block Signal(s) from the mode group (NCK → PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or AUTOMATIK mode is active.
edge change
0→1
Signal state 0 or AUTOMATIK mode is not active.
edge change
1→0

DB11
DBX6.1 Active mode MDA
Edge evaluation: Signal(s) updated: Cyclically
Signal state 1 or MDA mode is active.
edge change
0→1
Signal state 0 or MDA mode is not active.
edge change
1→0

DB11
DBX6.2 Active JOG mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or JOG mode is active.
edge change
0→1
Signal state 0 or JOG mode is not active.
edge change
1→0

DB11
DBX6.3 Mode group ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or This signal is set after power on and all of the voltage have been established. The mode group is
edge change now ready and part programs can be executed and axes traversed in the individual channels.
0→1

Basic Functions
1650 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX6.3 Mode group ready
Signal state 0 or The mode group is not ready. Possible causes for this are:
edge change • A critical axis or spindle alarm is present
1→0
• Hardware faults
• The mode group has been incorrectly configured (machine data)
If the mode group ready changes to signal state "0", then:
• the axis and spindle drives are braked down to standstill with the max. braking current.
• the signals from the PLC to the NCk are brought into an inactive state (cleared state).
Special cases, An alarm that withdraws the interface signal
errors, ...... DB11 DBX6.3 (mode group ready)
ensures that all channels of the mode group are no longer in the reset state.
In order to switch to another operating mode, a mode group reset (DB11 DBX0.7) must be made.

DB11
DBX6.7 All channels in the reset state
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or All the channels that belong to this mode group are in the "channel status reset" state (DB21, ...
edge change DBX7.7).
0→1
Signal state 0 or At least one of the channels in the mode group is not in "channel status reset" (DB21, ... DBX7.7).
edge change
1→0
Corresponding to .... DB21, ... DBX7.7 (channel state, reset)

DB11
DBX7.0 Active machine function TEACH IN
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function TEACH IN is active in the mode group.
edge change
0→1
Signal state 0 or Machine function TEACH IN is not active.
edge change
1→0
Additional references /BA/ Operating Manual HMI (corresponding to the used software)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1651
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB11
DBX7.1 Active REPOS machine function
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REPOS is active in the mode group.
edge change
0→1
Signal state 0 or Machine function REPOS is not active.
edge change
1→0
Application When a fault occurs when executing a part program (e.g. tool breakage), the axis is manually
example(s) moved away from the fault location in the JOG mode in order to be able to replace the tool.
The axis can then be manually returned to the exact previous position using the REPOS machine
function so that the program can be continued in the automatic mode.
Further references /BA/ Operating Manual HMI (corresponding to the used software)

DB11
DBX7.2 Active machine function REF
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REF is active in the mode group.
edge change
0→1
Signal state 0 or Machine function REF is not active.
edge change
1→0
Further references /FB1/ Function Manual Basic Functions; Reference Point Travel (R1)

18.7.3 Signals to channel (DB21, ...)

DB21, ...
DBX0.4 Activate single block
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or In AUTOMATIC and MDA modes, the operator must enable processing of each individual part
edge change program block of the part program selected in the channel by reactivating NC START.
0→1
Signal state 0 or No effect.
edge change
1→0
Special cases, • In the case of active tool offset, intermediate blocks are inserted, when necessary. These blocks
errors, ...... must also be enabled using NC START.
• In a series of G33 blocks, a single block is only operative if "dry run feed" is selected.
• In the case of a decoding single block, calculation blocks are not processed in the single step.
Corresponds to .... DB21, ... DBX35.3 (program status interrupted)

Basic Functions
1652 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX0.5 Activate M01
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Activation of program control "Conditional stop"M01 is requested.
edge change
0→1
Signal state 0 or Activation of program control "Conditional stop" M01 is not requested.
edge change
1→0
Corresponds to .... DB21, ... DBX24.5 (M01 selected)
DB21, ... DBX32.5 (M0/M01 active)

DB21, ...
DBX1.6 PLC action completed
Edge evaluation: no Signal(s) updated: cyclic
At the end of the block search, concluding action blocks are executed:
DB21, ... DBX32.3 (action block active) == 1 AND
DB21, ... DBX32.6 (last action block active) == 1
Alarm "10208 Channel <Channel Number> Issue NC START to continue program" notifies the user
that he must reactivate NC START to resume the part program starting from the target block.
If other actions are to be executed by the PLC user program prior to the NC START (e.g. tool
change), Search mode can be parameterized as follows:
MD11450 $MN_SEARCH_RUN_MODE = 1
Output of alarm delayed until the existing signal is reset.
Signal state 1 or PLC action is completed.
edge change
0→1
Signal state 0 or PLC action is not yet completed.
edge change
1→0
Corresponds to .... DB21, ... DBX32.3 (action block active)
DB21, ... DBX32.6 (last action block active)
DB21, ... DBX33.4 (block search active)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1653
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX1.7 Activate program test
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Activation of the program test is requested.
edge change During the program test, all motion commands of axes (not spindles) take place under "Axis
0→1 disable."
Notice!
Due to the axis disable, the assignment of a tool magazine is not changed for the program test. The
user/machine manufacturer must utilize a suitable PLC user program to ensure that the NCK-
internal tool management and the actual assignment of the tool magazine remain consistent. Refer
to the program example included in the PLC Toolbox.
Signal state 0 or Activation of the program test is not requested.
edge change
1→0
Corresponds to .... DB21, ... DBX25.7 (program test selected)
DB21, ...DBX33.7 (program test active)

DB21, ...
DBX2.0 Skip block
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Skip blocks marked in the part program with an slash (/) are not processed. If there is a series of
edge change skip blocks, the signal is only active if it is present before the first skip block of the series is
0→1 decoded.
Note
The signal should be available prior to the start of the part program.
Signal state 0 or Skip blocks marked in the part program with an slash (/) are processed.
edge change
1→0
Corresponds to .... DB21, ... DBX26.0 (Skip block selected)
DB21, ... DBX35.2 (Program status stopped)

DB21, ...
DBX6.1 Read-in disable
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The main run reads in no more preprocessed part program blocks.
edge change Note
0→1 The signal is only active in AUTOMATIC and MDA modes.
Signal state 0 or The main run reads in preprocessed part program blocks.
edge change
1→0
Corresponds to .... DB21, ... DBX35.0 (program status running)

Basic Functions
1654 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX6.4 Program level abort
Edge evaluation: yes Signal(s) updated: cyclic
Signal state 1 or At each edge change 0 → 1 the current program level being processed (subroutine level, ASUB
edge change level, save routine) is immediately aborted. Processing of the part program continues at the next
0→1 higher program level from the exit point.
Signal state 0 or No effect.
edge change
1→0
Special cases, The main program level cannot be aborted with this IS, only with IS "Reset".
errors, ......

DB21, ...
DBX7.0 NC START disable
Edge evaluation: no Signal(s) updated: cyclic

Signal state 1 or The NC START disable prevents a part program from being started with NC START signal DB21, ...
edge change DBX7.1 (NC START) == 1.
0→1
Signal state 0 or NC START disable is not active.
edge change
1→0
Special cases, The start of a part program selected in the channel by part program command START in another
errors, ...... channel (program coordination) is not prevented by the interface signal:
DB21, ... DBX7.0 (NC start disable) == 1.

Corresponds to .... DB21, ... DBX7.1 (NC START)

DB21, ...
DBX7.1 NC START
Edge evaluation: yes Signal(s) updated: cyclic
Signal state 1 or AUTOMATIC mode: The selected NC program is started or continued, or the auxiliary functions that
edge change were saved during the program interruption are output.
0→1 If data are transferred from the PLC to the NC during program status "Program interrupted," then
these data are immediately cleared at NC start.
Operating mode MDA:
The entered block information or part program blocks are released for execution.
Signal state 0 or No effect.
edge change
1→0
Corresponds to .... DB21, ... DBX7.0 (NC start disable)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1655
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX7.2 NC STOP at block limit
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The current NC program is stopped after the current part program block has been completely
edge change processed. Otherwise, as for DB21, ... DBX7.3 (NC stop).
0→1
Signal state 0 or No effect.
edge change
1→0
Corresponds to .... DB21, ... DBX7.3 (NC stop)
DB21, ... DBX7.4 (NC stop, axes plus spindles)
DB21, ... DBX35.2 (program status stopped)
DB21, ... DBX35.6 (channel status interrupted)

DB21, ...
DBX7.3 NC STOP
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or AUTOMATIC or MDA mode:
edge change Processing of the part program active in the channel is stopped.
0→1 The axes (not spindles) are brought to a standstill within the assigned acceleration parameters.
• Program status: stopped
• Channel status: interrupted
JOG mode:
In JOG mode, incompletely traversed incremental paths (INC...) are retracted at the next NC
START.
Note
The signal must be present for at least one PLC cycle (OB1).
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for • Program status: aborted
... • Channel status: Reset
Special cases, • If data are transferred to the NCK after NC STOP (e.g. tool offset), the data are cleared at the
errors, ...... next NC START.
Corresponds to .... DB21, ... DBX7.2 (NC STOP at block limit)
DB21, ... DBX7.4 (NC STOP axes plus spindles)
DB21, ... DBX35.2 (program status stopped)
DB21, ... DBX35.6 (channel status interrupted)

Basic Functions
1656 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX7.4 NC STOP axes plus spindles
Edge evaluation: no Signal(s) updated: cyclic
See DB21, ... DBX7.3 (NC STOP).
In addition, the spindles of the channel are stopped.

DB21, ...
DBX7.7 Reset
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The channel is reset. The initial settings are set (e.g. G functions).
edge change The alarms for the channel are cleared if they are not POWER ON alarms.
0→1 The reset signal must be issued by the PLC (e.g. using a logic operation with the reset key on the
MCP). The signal is only evaluated by the selected channel.
The program status changes to "Aborted", and the channel status changes to "Channel status
reset".
Signal state 0 or No effect.
edge change
1→0
Corresponds to .... DB11, ... DBX0.7 (mode group reset)
DB21, ... DBX35.7 (channel status reset)

DB21, ...
DBX31.0 - DBX31.2 REPOS mode (REPOSPATHMODE)
Edge evaluation: no Signal(s) updated: cyclic
REPOS mode specified by HMI:
Bit:2 1 0
0 0 0 = 0: no REPOS mode active
0 0 1 = 1: Re-approach to block start RMB
0 1 0 = 2: Re-approach to interruption point RMI
0 1 1 = 3: Re-approach to block end point RME
1 0 0 = 4: Re-approach to nearest path point RMN
Corresponds to .... DB21, ...DBX25.0 - DBX25.2 (REPOS mode (REPOSPATHMODE))
DB31, ... DBX10.0 (REPOSDELAY)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1657
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX31.4 REPOS mode change (REPOSMODEEDGE)
Edge evaluation: yes Signal(s) updated: cyclic
Signal state 1 or The REPOS mode has changed:
edge change DB21, ... DBX31.0 - DBX31.2 (REPOS mode (REPOSPATHMODE))
0→1
Signal state 0 or REPOS mode has not changed.
edge change
1→0
Corresponds to .... DB21, ... DBX31.0 - DBX31.2 (REPOS mode (REPOSPATHMODE))
DB21, ... DBX319.0 (REPOSMODEEDGEACKN)
DB21, ...DBX31.0 - DBX31.2 (REPOS mode (REPOSPATHMODE))

18.7.4 Signals from channel (DB21, ...)

DB21, ...
DBX32.3 Action block active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The action block is being executed.
edge change
0→1
Signal state 0 or No action block active.
edge change
1→0
Additional references /BA/ Operating Manual HMI (corresponding to the used software)

DB21, ...
DBX32.4 Approach block active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The approach block for the progress of the program with "Block search with computation on
edge change contour" is active, as with "Block search with computation on block end point" no approach block is
0→1 created of its own. The axes are automatically positioned on the collected search position if ASUP
exits with REPOSA during "Block search with computation on contour".
Signal state 0 or The search target is found during "Block search with computation on contour".
edge change
1→0
Further references /PGA/ Programming Manual Advanced

Basic Functions
1658 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX32.5 M00/M01 active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The part program block is processed, the auxiliary functions are output, and:
edge change • M00 is in the RAM
0→1
• M01 is in the RAM and IS "Activate M01" is active
The program status changes to "Stopped".
Signal state 0 or • With DB21, ... DBX7.1 (NC start)
edge change • For a program abort as a result of a reset
1→0
Screen

 0

 'DWDWUDQVIHUWRZRUNLQJPHPRU\  0FKDQJHVLJQDO 3/&F\FOHWLPH


 %ORFNSURFHVVHG  ,600DFWLYH
 1&EORFNZLWK0  ,6&KDQQHOVWDWHDFWLYH HYHQZKHQ
D[HVDUHPRYHGLQ-2*PRGH

Corresponding to .... DB21, ... DBX0.5 (activate M01)


DB21, ... DBX24.5 (M01 selected)

DB21, ...
DBX32.6 Last action block active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The last action block is being executed.
edge change This means, that all the action blocks on the side of NC have been processed and the actions on
0→1 the side of PLC (ASUP, FC) or the operator such as overstore, mode change according to
JOG/REPOS are possible. In this way the PLC for example can still perform a tool change before
the start of movement.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1659
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX32.6 Last action block active
Signal state 0 or The last action block is not being executed. Action blocks contain the actions collected during
edge change "block search with computation" such as
1→0 • outputting help function H, M00, M01, M..
• Tool programming T, D, DL
• Spindle programming S-Value, M3/M4/M5/M19, SPOS
• Feed programming, F
Further references /FB1/ Function Manual Basic Functions; K1 Channel, Program Operation, Reset Response

DB21, ...
DBX33.4 Block search active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The block search function is active.
edge change It was selected from the operator interface screen and started using the interface signal:
0→1 DB21, ... DBX7.1 (NC start)

Signal state 0 or Search target found.


edge change
1→0
Application The block search function makes it possible to jump to a certain block within a part program and to
example(s) start processing the part program from this block.
Additional references /FB1/ Function Manual Basic Functions; K1 Channel, Program Operation, Reset Response

DB21, ...
DBX33.5 M02/M30 active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or • NC block with M02 or M30 (or M17 if a subroutine was started) is completely processed; if
edge change traversing motions are also programmed in this block, the signal is only output when the target
0→1 position is reached.
• The program was interrupted as a result of a reset, and the program status changes to
"Aborted".
• When MDA mode or machine functions REF or PRESET are selected
• After DB10 DBX56.2 (acknowledge EMERGENCY STOP)
Signal state 0 or • No program end or program abort
edge change • Status after activation of control
1→0 • Start of an NC Program

Basic Functions
1660 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX33.5 M02/M30 active
Screen

 0

 'DWDWUDQVIHUWRZRUNLQJPHPRU\  0FKDQJHVLJQDO 3/&F\FOHWLPH


 %ORFNSURFHVVHG  ,600DFWLYH
 1&EORFNZLWK0

Application The PLC can detect the end of program processing with this signal and react appropriately.
example(s)
Special cases, • The M02 and M30 functions have equal priority.
errors, ...... • The interface signal:
DB21, ... DBX33.5 (M02/M30 active)
is available as steady-state signal after the end of the program.
• Not suitable for automatic follow-on functions such as workpiece counting, bar feed, etc.
M02/M30 must be written in a separate block and the word M02/M30 or the decoded M signal
used for these functions.
• Auxiliary functions that could result in a read-in operation being stopped and any S values that
are to be operative beyond M02/M30 must not be written in the last block of a program.

DB21, ...
DBX33.6 Transformation active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The NC command TRAORI (activate transformation) is programmed in the NC part program. This
edge change block has been processed by the NC and the transformation is now activated.
0→1
Signal state 0 or No transformation active.
edge change
1→0
Additional references /PGA/ Programming Manual Advanced

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1661
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX33.7 Program test active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Program control program test is active. Axis disable is set internally for all axes (not spindles).
edge change Therefore the machine axes do not move when a part program block or a part program is being
0→1 processed. The axis movements are simulated on the operator interface with changing axis position
values.
The axis position values for the display are generated from the calculated setpoints.
The part program is processed in the normal way.
Signal state 0 or Program control "Program test" is not active.
edge change
1→0
Corresponding to .... DB21, ... DBX1.7 (activate program test)
DB21, ... DBX25.7 (program test selected)

DB21, ...
DBX35.0 Program status running
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The part program was started with the interface signal:
edge change DB21, ... DBX7.1 (NC start)
0→1 and is running.
The running program was stopped with the interface signal:
DB21, ... DBX6.1 (read-in disable)

Signal state 0 or • Program stopped by M00/M01 or NC stop or operating mode change.


edge change • If single block mode, the block is processed.
1→0 • End of program reached (M02/M30).
• Program aborted due to a reset.
• No actual block in the memory (e.g. for MDA).
• The actual block cannot be executed.
Signal irrelevant for The part program was started with the interface signal:
... DB21, ... DBX7.1 (NC start)
and is running.
Special cases, The interface signal:
errors, ...... DB21, ... DBX35.0 (program status running)
does not change to 0 if workpiece machining is stopped due to the following events:
• A feed disable or spindle disable was output
• DB21, ... DBX6.1 (read-in disable)
• Feed correction to 0%
• The spindle and axis monitoring functions respond
• Position setpoints are entered in the NC program for axes in "follow-up mode," for axes without
"servo enable," or for "parking axes"
Corresponding to .... DB21, ... DBX6.1 (read-in disable)

Basic Functions
1662 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX35.1 Program status wait
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The running program is waiting for the program command WAIT_M or WAIT_E in an NC block. The
edge change wait condition specified in the WAIT command for the channel or channels has not yet been fulfilled.
0→1
Signal state 0 or Program status wait is not active.
edge change
1→0
Further references /PG/ Programming Manual Fundamentals

DB21, ...
DBX35.2 Program status stopped
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The NC part program has been stopped by:
edge change • DB21, ... DBX7.3 (NC stop)
0→1
• DB21, ... DBX7.4 (NC stop, axes plus spindles)
• DB21, ... DBX7.2 (NC stop at the block limit)
• Programmed M00 or M01
or
• Single block mode
Signal state 0 or "Program status stopped" is not present.
edge change
1→0
Corresponding to .... DB21, ... DBX7.3 (NC stop)
DB21, ... DBX7.4 (NC stop, axes plus spindles)
DB21, ... DBX7.2 (NC stop at the block limit)

DB21, ...
DBX35.3 Program status interrupted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or When the operating mode changes from AUTOMATIC or MDA (in stopped program status) to JOG,
edge change the program status changes to "Interrupted". The program can be continued at the point of
0→1 interruption in AUTOMATIC or MDA mode when NC start is issued.
Signal state 0 or "Program status interrupted" not available.
edge change
1→0
Special cases, The interface signal:
errors, ...... DB21, ... DBX35.3 (program status interrupted)
indicates that the part program can continue to be processed by restarting it.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1663
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX35.4 Program status aborted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The program has been selected but not started, or the current program was aborted with a reset.
edge change
0→1
Signal state 0 or Program status interrupted is not active.
edge change
1→0
Corresponding to .... DB21, ... DBX7.7 (reset)

DB21, ...
DBX35.5 Channel status active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or In this channel:
edge change • A part program is presently being executed in Automatic or MDA mode
0→1
or
• At least one axis is being traversed in JOG mode.
Signal state 0 or DB21, ... DBX35.3 (channel status interrupted) or DB21, ... DB35.7 (channel status reset) is
edge change present.
1→0

DB21, ...
DBX35.6 Channel status interrupted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The NC part program in AUTOMATIC or MDA mode or a traversing motion in JOG mode can be
edge change interrupted by:
0→1 • DB21, ... DBX7.3 (NC stop)
• DB21, ... DBX7.4 (NC stop, axes plus spindles)
• DB21, ... DBX7.2 (NC stop at the block limit)
• Programmed M00 or M01
or
• Single block mode
After an NC start the part program or the interrupted traversing movement can be continued.
Signal state 0 or DB21, ... DBX35.5 (channel status active) or DB21, ... DB35.7 (channel status reset) is present.
edge change
1→0

Basic Functions
1664 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX35.7 Channel status reset
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal changes to 1 as soon as the channel goes into the reset state, i.e. no processing taking
edge change place.
0→1
Signal state 0 or The signal is set to 0 as soon as processing takes place in the channel, e.g.:
edge change • Execution of a part program
1→0
• Block search
• TEACH IN active
• Overstore active

DB21, ...
DBX36.4 Interrupt processing active
Edge evaluation: Signal(s) updated: Cyclically
Signal state 1 or One or several channels in the mode group are not in the required operating state as the result of
edge change an active interrupt routine. The signal is not set if an interrupt routine is running in a program mode.
0→1
Signal state 0 or All channels are operating in the required mode.
edge change
1→0
Corresponding to .... MD11600 $MN_BAG_MASK

DB21, ...
DBX36.5 Channel is ready
Edge evaluation: Signal(s) updated: Cyclically
Signal state 1 or A channel is ready for a part program processing of machine axes, geometry axes and positioning
edge change axes. These are already allocated corresponding to machine configuration and the current program
0→1 status of the concerned channels.
Signal state 0 or The concerned channel is not ready for a part program processing of machine axes, geometry axes
edge change and positioning axes.
1→0
Corresponding to .... MD11600 $MN_BAG_MASK

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1665
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX37.6 Read-in disable is ignored
Edge evaluation: Signal(s) updated:
The following machine data are used to specify that the read-in disable (DB21, ... DBX6.1) is to be
ignored:
• MD11602 $MN_ASUP_START_MASK, Bit 2 = 1 (start also permitted if read-in disable is active)
• MD20116 $MC_IGNORE_INHIBIT_ASUP (execute interrupt program in spite of read-in disable)
• MD20107 $MC_ PROG_EVENT_IGN_INHIBIT (Prog events ignore read-in disable)
Part program blocks for which read-in disable is ignored are designated as read-in disable-
inoperative.
Signal state 1 Read-in disable is active (DB21, ... DBX6.1==1) AND part program block is read-in disable-
inoperative.
Signal state 0 Read-in disable is not active (DB21, ... DBB6.1 == 0) OR
(read-in disable is active (DB21, ... DBX6.1 == 1) AND part program block is read-in disable-
operative)
Corresponding to .... DB21, ... DBX37.7 (Stop at block end is ignored during single block (SBL))

DB21, ...
DBX37.7 Stop at block end is ignored during single block (SBL)
Edge evaluation: Signal(s) updated:
The following machine data and part program commands are used to specify that the stop at block
end during single block (DB21, ... DBX0.4 == 1) is to be ignored:
• MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (Prevent single block stop)
• MD20117 $MC_IGNORE_SINGLEBLOCK_ASUP (Execute interrupt program completely in
spite of single block)
• MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK (Prog events ignore single block)
• SBLOF (suppress single block), SBLON (cancel single block suppression)
Part program blocks for which stop at block end during single block is ignored are designated as
single block-inoperative.
Signal state 1 Single block is active (DB21, ... DBX0.4==1) AND part program block is single block-inoperative.
Signal state 0 Single block is not active (DB21, ... DBB0.4 == 0) OR
(single block is active (DB21, ... DBX0.4 == 1) AND part program block is single block-operative)
Corresponding to .... Read-in disable is ignored. DB21, ... DBX37.6 (read-in disable is ignored)

Basic Functions
1666 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBB208 - DBB271 Active G function of groups 1 to 60
Edge evaluation: No Signal(s) updated: Cyclically
Signal state <> 0 A G function or mnemonic identifier of the G group is active.
The active G function can be determined from the value (starting with 1):
1 = First G function of the G group
2 = Second G function of the G group
3 = Third G function of the G group

Please refer to a listing of the possible G-groups with the relevant functions in the Programming
Fundamentals Manual.
Signal state = 0 No G function or G group mnemonic identifier is active.
Application The active G group is stored in binary code in the relevant byte.
example(s) The following evaluation applies:

%LW        
(YDOXDWLRQ        

([DPSOH *        

Special cases, In contrast to auxiliary functions, G functions are not output to the PLC subject to
errors, ...... acknowledgement, i.e. processing of the part program is continued immediately after the G function
output.
Additional references Programming Manual, Fundamentals

DB21, ...
DBX318.0 ASUB is stopped
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal is set to 1 if the control stops automatically prior to the end of the ASUB.
edge change The IS DB21, ... DBX318.0 (ASUB is stopped) is only supplied in the case "Interrupt in a program
0→1 mode and channel status stopped".
Signal state 0 or The IS DB21, ... DBX318.0 (ASUB is stopped) is set to 0 with start and reset.
edge change
1→0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1667
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX318.0 ASUB is stopped
Typical sequence of an ASUB with REPOSA:

3DWKPRWLRQRIDQ &RQWUROKDVVWRSSHG
$68%ZLWK5(326$ $68%ZLWK5(326$ DXWRPDWLFDOO\
(YHQWWKDWEULQJVWKHFRQWURO
LQWRWKHVWRSSHGVWDWXV ,6$68%VWRSSHGLV
RFFXUV VHW
([DPSOH6WRSNH\

)&EORFNVLJQDOV$68%'RQH

&RQWUROV\VWHPVWRSSHG
$68%LVWKHQVWDUWHGE\WKH
)& 3DWKRIWKHSDUWVSURJUDP

ASUB with REPOSA If the interrupt routine is ended with REPOSA, then the following sequence is typical:
is triggered in the • The part program is stopped using the stop key, stop-all key or as a result of an alarm.
status AUTOMATIC
• The controller assumes program status "Stopped".
mode stopped
• The PLC initiates an ASUB via block FC9.
• Before the re-approach to the contour, the controller stops and goes to program status
"Stopped". IS DB21, ... DBX318.0 (ASUB is stopped) is set.
• The user presses Start. The IS DB21, ... DBX318.0 (ASUB is stopped) is reset, the re-approach
motion is started.
• At the end of the re-approach motion, the FC9 signal "ASUB done" is set and the path of the
interrupted part program is continued.

DB21, ...
DBX318.1 Block search via program test is active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or During the processing of the part program block in context of block search (internal channel status:
edge change "Program test"), up to the change of the target block in the main execution (Program status:
0→1 "Stopped").
Signal state 0 or With the change of the target block in the main execution (internal channel status: "Program test" is
edge change de-selected; Stop condition: "Search target found" is displayed).
1→0
Special cases, The block search (SERUPRO) can only be activated in AUTOMATIC mode in program status
errors, ...... "Aborted".

Basic Functions
1668 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX319.0 REPOSMODEEDGEACKN
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The interface signal detected by the NCK:
edge change DB21, ... DBX31.4 (REPOSMODEEDGE)
0→1 is with the interface signal:
DB21, ... DBX319.0 (REPOSMODEEDGEACKN)
acknowledged, if level signals from:
DB21, ... DBX31.0 - DBX31.2 (REPOSMODE0-2)
and from:
DB31, ... DBX10.0 (REPOSDELAY)
are taken over in the NC.
The levels relate to the current block in the main run.
Signal state 0 or SERUPRO-ASUB stops automatically before REPOS and IS DB21, ... DBX319
edge change (REPOSMODEEDGE) does not influence the SERUPRO approach.
1→0
Corresponding to .... DB21, ... DBX31.4 (REPOSMODEEDGE)

DB21, ...
DBX319.1 - Repos Path Mode Ackn 0 - 2
DBX319.3
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Using the interface signal:
DB21, ... DBX319.1 - DBX319.3 (Repos Path Mode Ackn 0-2)
with the 3 bits, one of the functions for the re-approach point RMB, RMI, RME or RMN can be
acknowledged according to the following coding to the PLC:
DB21, ... DBX319.1 - DBX319.3 = 1 → RMB: Re-approach at the start of the block
DB21, ... DBX319.1 - DBX319.3 = 2 → RMI: Re-approach at the point of interruption
DB21, ... DBX319.1 - DBX319.3 = 3 → RME: Re-approach at the end of the block
DB21, ... DBX319.1 - DBX319.3 = 4 → RMN: Re-approach at the nearest path point
Signal state 0 DB21, ... DBX319.1 - DBX319.3 = 0
→ RMNOTDEF: The ReposMode that is not re-defined is acknowledged to the PLC.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1669
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX319.1 - Repos Path Mode Ackn 0 - 2
DBX319.3
Example of the sequence of REPOS acknowledgments in the part program and signal timing of the
acknowledgement process from the NCK:

 

1

1  1






5(3263$7+02'(


5(32602'(('*(

5(32602'(('*($&.1

5HSRV3DWK0RGH$FNQ
 

W    

 6WDUWSDUWSURJUDP  5HDSSURDFKIURP5(326KDVEHHQ
FRPSOHWHG7KHUHPDLQLQJEORFNVWDUWV
 6WRSSDUWSURJUDP
 7KHUHPDLQLQJEORFNLVILQLVKHG
 3UHVHOHFW501

 2XWSXW$68%
 &RPPDQGLVVWDUWHGZLWK$683

Corresponding to .... DB21, ... DBX31.0 - DBX31.2 (REPOSPATHMODE0-2)


DB21, ... DBX31.4 (REPOSMODEEGGE)
DB21, ... DBX319.0 (REPOSMODEEGGEACKN)
DB31, ... DBX70.2 (Repos Delay Ackn)
Additional references /FB1/ Function Manual Basic Functions;
BAG, Channel, Program Operation, Reset Response (K1),
Section: " Block search, type 5 SERUPRO for block search"

Basic Functions
1670 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX319.5 Repos DEFERAL Chan
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or All axes currently controlled by this channel have either no REPOS offset or their REPOS offsets
edge change are invalid.
0→1
Signal state 0 or Miscellaneous.
edge change
1→0
Corresponding to .... DB31, ... DBX70.0 (Repos offset)

DB21, ...
DBB376 PROG-EVENT-DISPLAY
Edge evaluation: No Signal(s) updated: Event-driven
Signal state 1 or The event assigned to the bit has activated the "Event-driven program call" function.
edge change
0→1
Signal state 0 or • The event assigned to the bit has not activated the "Event-driven program call" function.
edge change or
1→0
• The event-driven user program has expired or was cancelled with RESET.
Bit assignments Bit 0 → part program start from channel status RESET
Bit 1 → end of part program
Bit 2 → operator panel reset
Bit 3 → run-up
Bit 4 → 1st start after the search run
Bit 5 - 7 → reserved, currently always 0
All bits 0 → No event-driven program call is active
Signal duration: at least one complete PLC cycle

DB21, ...
DBX378.0 ASUB is active
Edge evaluation: No Signal(s) updated: Event-driven
Signal state 1 or One ASUB is active.
edge change Note:
0→1 The user gets a feedback on a running ASUB through DB21, … DBX378.0 even outside FC9 block.
Signal state 0 or No ASUB is active.
edge change
1→0

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1671
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB21, ...
DBX378.1 Still ASUB is active
Edge evaluation: No Signal(s) updated: Event-driven
Signal state 1 or An ASUB with suppressed display updating (refer to MD20191 $MC_IGN_PROG_STATE_ASUP) is
edge change active.
0→1
Signal state 0 or No ASUB with suppressed display updating is active.
edge change
1→0

DB21, ...
DBX384.0 Control program branching
Edge evaluation: No Signal(s) updated:
Signal state 1 or GOTOS in the part program initiates a return to the program start. The program is then processed
edge change again.
0→1
Signal state 0 or GOTOS initiates no return. Program execution is continued with the next part program block after
edge change GOTOS.
1→0
Corresponding to .... MD27860 $MC_PROCESSTIMER_MODE (Activation of the program runtime measurement)
MD27880 $MC_PART_COUNTER (activation of workpiece counters)

18.7.5 Signals to axis/spindle (DB31, ...)

DB31, ...
DBX10.0 REPOSDELAY
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The REPOS offset of the axis is first applied with its next programming.
edge change
0→1
Signal state 0 or There is no REPOS offset.
edge change
1→0
Special cases, The signal is not relevant for path axes.
errors, ......
Corresponds to .... DB21, ... DBX31.0 - DBX31.2 (REPOSPATHMODE0-2)
DB31, ... DBX70.2 (REPOS Delay Ackn)
DB31, ... DBX72.0 (REPOSDELAY)

Basic Functions
1672 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

18.7.6 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX70.0 REPOS offset
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or A REPOS offset must be applied for the appropriate axis.
edge change
0→1
Signal state 0 or No REPOS offset need be applied for the appropriate axis.
edge change
1→0
Corresponds to .... DB31, ... DBX70.1 (REPOS offset valid)

DB31, ...
DBX70.1 REPOS offset valid
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The range of validity of the REPOS offset is indicated with the value 1.
edge change The REPOS offset was calculated to be valid.
0→1
Signal state 0 or A value of zero indicates that the REPOS offset was calculated to be invalid.
edge change
1→0
Application Updating the REPOS offset in the range of validity:
example(s) Between SERUPRO end and start, the axis can be moved in JOG mode with a mode change. The
user moves the REPOS offset to the zero value.
Corresponds to .... DB31, ... DBX70.0 (REPOS offset)

DB31, ...
DBX70.2 REPOS Delay Ackn
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The axis was programmed within a traversing block, and the REPOS offset was applied.
edge change Note
0→1 A REPOS offset was available for the axis, and REPOSDELAY was active:
DB31, ... DBX10.0 (REPOSDELAY) == 1
This signal behaves the same as:
DB21, ... DBX319.1 - DBX319.3 (Repos Path Mode Ackn)
Signal state 0 or The value zero is used to acknowledge that the REPOS offset is not active for this axis. This signal
edge change is cancelled on activation of the remaining block.
1→0
Corresponds to .... DB31, ... DBX10.0 (REPOSDELAY)
DB31, ... DBX72.0 (REPOSDELAY)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1673
NC/PLC Interface Signals (Z1)
Mode group, channel, program operation, reset response (K1)

DB31, ...
DBX72.0 REPOSDELAY
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or After a block search, a REPOS offset is applied for this axis. However it is not applied using the
edge change approach block, but rather using the next traversing block in which the axis is programmed.
0→1
Signal state 0 or The REPOS offset for this axis is not active.
edge change
1→0
Special cases, The signal is not relevant for path axes.
errors, ......
Corresponds to .... DB21, ... DBX31.0 - DBX31.2 (REPOSPATHMODE)
DB31, ... DBX10.0 (REPOSDELAY)
DB31, ... DBX70.2 (REPOS Delay Ackn)

DB31, ...
DBX76.4 Path axis
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The axis is involved in the path (path axis).
edge change Note
0→1 In conjunction with SERUPRO in status "Target block found", the signal refers to the status of the
axis in the target block.
Signal state 0 or The axis is not involved in the path.
edge change
1→0

Basic Functions
1674 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Axis types, coordinate systems, frames (K2)

18.8 Axis types, coordinate systems, frames (K2)

18.8.1 Signals to axis/spindle (DB31, ...)

DB 31, ...
DBX3.0 External zero offset
Edge evaluation: no Signal(s) updated:
Signal state 1 or The preselected value of the external work offest of an axis is used as the new value for calculating
edge change the total work offset between the basic and the workpiece coordinate systems.
0→1
Signal state 0 or The preselected value of the external work offset of an axis is not used as the new value for
edge change calculating the total work offset between the basic and workpiece coordinate systems. The previous
1→0 value is still valid.
Signal irrelevant for $AA_ETRANS[axis] equals zero for all axes.
...
Special cases, Signal zero after ramp-up (power ON).
errors, ......
Corresponding to .... $AA_ETRANS[axis]

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1675
NC/PLC Interface Signals (Z1)
Emergency Stop (N2)

18.9 Emergency Stop (N2)

18.9.1 Signals to NC (DB10)

DB10
DBX56.1 EMERGENCY STOP
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The NC is switched to the EMERGENCY STOP state and the EMERGENCY STOP procedure is
edge change started on the NC.
0→1
Signal state 0 or The NC is not in the EMERGENCY STOP state.
edge change The EMERGENCY STOP status is (still) active but can be reset using the interface signals:
1→0 DB10 DBX56.2 (acknowledge EMERGENCY STOP)
and
DB11 DBX0.7 (mode group reset)

Corresponding to .... DB10 DBX56.2 (acknowledge EMERGENCY STOP)


DB10 DBX106.1 (acknowledge EMERGENCY STOP)

DB10
DBX56.2 Acknowledge EMERGENCY STOP
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The EMERGENCY STOP state is only reset if the interface signal:
edge change DB10 DBX56.2 (acknowledge EMERGENCY STOP)
0→1 is set followed by the interface signal:
DB11, ... DBX0.7 (mode group reset).

It must be noted that IS "Acknowledge EMERGENCY STOP" and IS "Reset" must be set (together)
for a long enough period so that the interface signal:
DB10 DBX106.1 (EMERGENCY STOP active)
was reset.
Resetting the EMERGENCY STOP state has the following effects:
• the controller enable is switched in
• Follow-up mode is canceled for all axes and position control mode resumed
• DB31, ... DBX61.5 set (position controller active)
• DB11, ... DBX6.3 set (mode group ready)
• DB10 DBX106.1 reset (EMERGENCY STOP active)
• Alarm 3000 is canceled
• Part program processing is interrupted for all channels

Basic Functions
1676 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Emergency Stop (N2)

DB10
DBX56.2 Acknowledge EMERGENCY STOP

,6(0(5*(1&<6723

,6DNQRZOHGJH(0(5*(1&<6723

,6(0(5*(1&<6723DFWLYH"


,65(6(7


 ,6$FNQRZOHGJH(0(5*(1&<6723KDVQRHIIHFW
 ,65HVHWKDVQRHIIHFW
 ,6$FNQRZOHGJH(0(5*(1&<6723DQG5(6(7UHVHW(0(5*(1&<6723DFWLYH

Special cases, The EMERGENCY STOP state cannot be reset using the interface signal:
errors, ...... DB21, ... DBX7.7 (reset).

Corresponding to .... DB10 DBX56.1 (EMERGENCY STOP)


DB10 DBX106.1 (acknowledge EMERGENCY STOP)
DB11 DBX0.7 (mode group reset)

18.9.2 Signals from NC (DB10)

DB10
DBX106.1 EMERGENCY STOP active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The NC is in the EMERGENCY STOP state.
edge change
0→1
Corresponding to .... DB10 DBX56.1 (EMERGENCY STOP)
DB10 DBX56.2 (acknowledge EMERGENCY STOP)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1677
NC/PLC Interface Signals (Z1)
PLC basic program (P3)

18.10 PLC basic program (P3)


To describe the NC/PLC interface signals, refer to:
References:
Function Manual, Basic Functions; PLC Basic Program (P3)
Chapter: "Signal/Data Specifications"

Basic Functions
1678 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Reference point approach (R1)

18.11 Reference point approach (R1)

18.11.1 Signals to channel (DB21, ...)

DB21, ...
DBX1.0 Activate referencing
Edge evaluation: yes Signal(s) updated: cyclic
Signal state 1 or The channel-specific referencing is started with the interafce signal:
edge change DB21, ... DBX1.0 (Activate referencing).
0→1 The control acknowledges the successful start with the interface signal:
DB21, ... DBX33.0 (Referencing active)
With the channel-specific referencing each machine axis, which is allocated to a channel, can be
referenced (control internals are simulated by traversing keys plus/minus).
Using the axis-specific machine data:
MD34110 $MA_REFP_CYCLE_NR (axis sequence for channel-specific Referencing)
can determine in which sequence the machine axes are referenced.
If all the axes entered in REFP_CYCLE_NR have reached their reference point,
the interface signal:
DB21, ... DBX36.3 (all axes present)
is set.
Application If the machine axes are to be referenced in a particular sequence, there are the following
example(s) possibilities:
• The operator must observe the correct sequence when starting.
• The PLC must check the sequence when starting or define it itself.
• The function channel-specific referencing will be used.
Corresponding to .... DB21, ... DBX33.0 (Referencing active)
DB21, ... DBX36.2 (all reference point required axes are referenced)

DB21, ...
DBX33.0 Referencing active
Edge evaluation: yes Signal(s) updated: cyclic
Signal state 1 or The channel-specific referencing was started with the interface signal:
edge change DB21, ... DBX1.0 (activate referencing)
0→1 and the successful start was acknowledged with the interface signal:
DB21, ... DBX33.0 (referencing active).
The channel-specific referencing is operational.
Signal state 0 or • channel-specific referencing is completed.
edge change • axis-specific referencing is operational
1→0 • no referencing active
Signal irrelevant for Spindles
...
Corresponding to .... DB21, ... DBX1.0 (activate referencing)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1679
NC/PLC Interface Signals (Z1)
Reference point approach (R1)

18.11.2 Signals from channel (DB21, ...)

DB21, ...
DBX36.2 All axes that have to be referenced are referenced
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or All axes that must be referenced (linear axes and rotary axes) of the channel are referenced.
edge change The machine data:
0→1 MD20700 $MC_REFP_NC_START_LOCK (NC start inhibit without reference point)
is zero.
If two position measuring systems are connected to an axis, that would prevent an NC start, then
the active one must be referenced so that the axis is considered to have been referenced.
An NC Start command for part program processing is only accepted when this signal is present.
Axes that have to be referenced are axes, if:
MD34110 $MA_REFP_CYCLE_NR _ = -1
and the axis is not in the parked position (position measuring system inactive and the controller
enable withdrawn).
Signal state 0 or One or more axes of the channel have not been referenced.
edge change
1→0
Special cases, The spindles of the channel have no effect on this interface signal.
errors, ......
Corresponding to .... DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

18.11.3 Signals to axis/spindle (DB31, ...)

DB31, ...
DBX2.4 - DBX2.7 Reference point value 1 to 4
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or When the reference cam is reached, the NCK is signaled which coded reference cam is actuated.
edge change The interface signal:
0→1 DB31, ... DBX2.4 - DBX2.7 (reference point values 1 to 4)
must remain set until the reference point is reached,
or until a new coded reference cam is actuated.
If the machine axis has reached the reference point (axis stationary) then using the reference point
value pre-selected using
IS "reference point values 1 to 4" from the machine data:
MD34100 $MA_REFP_SET_POS (reference point value)
is transferred into the control as the new reference position.
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for Linear measurement systems with distance-coded reference marks
...

Basic Functions
1680 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Reference point approach (R1)

DB31, ...
DBX2.4 - DBX2.7 Reference point value 1 to 4
Application On a machine tool with large traversing distances, four coded reference cams can be distributed
example(s) over the entire distance traveled by the axis, four different reference points approached and the
time required to reach a valid referenced point reduced.
Special cases, If the machine axis has arrived at the reference point and none of the four "reference point value 1
errors, ...... to 4" interface signals has been set, the value of the reference point is automatically set to 1.
Corresponding to .... MD34100 $MA_REFP_SET_POS (reference point value)

DB31, ...
DBX12.7 Reference point approach delay
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The machine axis is positioned on the reference cam.
edge change
0→1
Signal state 0 or The machine axis is positioned in front of the reference cam. An appropriately long reference cam
edge change (up to the end of the traversing range) should be used to prevent the machine axis from being
1→0 located behind (after) the referencing cam.
Corresponding to .... DB31, ... DBX2.4 - DBX2.7 (reference point values 1 to 4)

18.11.4 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX60.4 Referenced/synchronized 1
Edge evaluation: Signal(s) updated:
Signal state 1 or Axes:
edge change When being referenced, if the machine axis has reached the reference point (incremental
0→1 measuring systems) or the target point (for length measuring system with distance-coded reference
marks), then the machine axis is referenced and the following interface signal is set:
DB31, ... DBX60.4 (referenced/synchronized 1)
(depending on which position measuring system is active when referencing).
Spindles:
After power-on, a spindle is synchronized the latest after one spindle revolution (260 degrees) (the
zero mark passed or the Bero responded).
Signal state 0 or The machine axis/spindle with position measuring system 1 is not referenced/synchronized.
edge change
1→0
corresponding to .... DB31, ... DBX1.5 (position measuring system 1)
Additional references /FB1/ Function Manual, Basic Functions; Spindles (S1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1681
NC/PLC Interface Signals (Z1)
Reference point approach (R1)

DB31, ...
DBX60.5 Referenced/synchronized 2
Edge evaluation: Signal(s) updated:
Signal state 1 or Axes:
edge change When being referenced, if the machine axis has reached the reference point (incremental
0→1 measuring systems) or the target point (for length measuring system with distance-coded reference
marks), then the machine axis is referenced and the following interface signal is set:
DB31, ... DBX60.5 (referenced/synchronized 2)
(depending on which position measuring system is active when referencing).
Spindles:
After power-on, a spindle is synchronized the latest after one spindle revolution (260 degrees) (the
zero mark passed or the Bero responded).
Signal state 0 or The machine axis/spindle with position measuring system 2 is not referenced/synchronized.
edge change Axes:
1→0 Alarm 21610 was output.
Spindles:
Encoder limit frequency exceeded.
corresponding to .... DB31, ... DBX1.6 (position measuring system 2)
MD34102 $MA_REFP_SYNC_ENCS (measuring system calibration) = 0
Additional references /FB1/ Function Manual, Basic Functions; Spindles (S1)

DB31, ...
DBX71.4 Restored 1
Edge evaluation: Signal(s) updated:
Signal state 1 or If MD34210 $MA_ENC_REFP_STATE is set to a value of 3, the last axis position buffered before
edge change switch off is restored in distance-coded, incremental measuring systems. Referencing does not take
0→1 place automatically. Position measuring system 1 is in "Position restored" state.
Signal state 0 or The machine axis/spindle with position measuring system 1 is not restored.
edge change
1→0
corresponding to .... DB31, ... DBX60.4 (referenced/synchronized 1)
Additional references /FB1/ Function Manual, Basic Functions; Spindles (R1)

Basic Functions
1682 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Reference point approach (R1)

DB31, ...
DBX71.5 Restored 2
Edge evaluation: Signal(s) updated:
Signal state 1 or If MD34210 $MA_ENC_REFP_STATE is set to a value of 3, the last axis position buffered before
edge change switch off is restored in distance-coded, incremental measuring systems. Referencing does not take
0→1 place automatically. Position measuring system 2 is in "Position restored" state.
Signal state 0 or The machine axis/spindle with position measuring system 2 is not restored.
edge change
1→0
corresponding to .... DB31, ... DBX60.5 (referenced/synchronized 2)
Additional references /FB1/ Function Manual, Basic Functions; Spindles (R1)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1683
NC/PLC Interface Signals (Z1)
Spindles (S1)

18.12 Spindles (S1)

18.12.1 Signals to axis/spindle (DB31, ...)

DB31, ...
DBX2.2 Spindle reset/delete distance-to-go
Edge evaluation: yes Signal(s) updated: cyclic
Edge change Independent of the machine data:
0→1 MD35040 $MA_SPIND_ACTIVE_AFTER_RESET
selects a spindle reset for the various spindle operating modes in the following fashion:
• Control mode:
– Spindle stops
– Program continues to run
– Spindle continues to run with subsequent M and S program commands
• Oscillating mode:
– Oscillation is interrupted
– Axes continue to run
– Program continues with the actual gearbox stage
– With the following M value and higher S value, it is possible that the IS:
DB31, ... DBX83.1 (programmed speed high)
is set.
• Positioning mode:
– Is stopped
• Axis operation:
– Is stopped
Signal state 0 or No effect.
edge change
1→0
Corresponding to .... MD35040 $MA_SPIND_ACTIVE_AFTER_RESET (own spindle reset)
DB21, ... DBX7.7 (reset)
DB31, ... DBX2.2 (delete distance to go): is a different name for the same signal

Basic Functions
1684 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX16.0 - DBX16.2 Actual gear stage A to C
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 If the new gear stage is engaged, the PLC user program sets the interface signals:
(status-controlled) DB31, ... DBX16.2 - DBX16.0 (actual gear stage A to C)
and
DB31, ... DBX16.3 (gear is changed over).
This signals the NCK that the correct gear stage has been successfully engaged.
The gear change is considered to have been completed (spindle oscillation mode is deselected),
the spindle accelerates in the new gear stage to the last programmed spindle speed and the next
block in the part program can be executed.
The actual gear stage is output in coded format.
For each of the 5 gear stages, there is one set of parameters assigned as follows:

3DUDPHWHUVHW1R 1&3/&LQWHUIDFH 0HDQLQJ

 ದ 'DWDIRUD[LVPRGH
  'DWDIRUVWJHDUVWDJH

  'DWDIRUQGJHDUVWDJH
  'DWDIRUUGJHDUVWDJH
  'DWDIRUWKJHDUVWDJH
  'DWDIRUWKJHDUVWDJH



Special cases, If the PLC user reports back to the NCK with a different actual gear stage than issued by the NCK
errors, ...... as the setpoint gear stage, the gear change is still considered to have been successfully completed
and the actual gear stage A to C is activated.
Corresponding to .... DB31, ... DBX82.0 - DBX82.2 (setpoint gear stage A to C)
DB31, ... DBX82.3 (change over gear stage)
DB31, ... DBX16.3 (gear is changed)
DB31, ... DBX18.5 (oscillation speed)
Parameter sets for gear stages

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1685
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX16.3 Gear is changed over
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or When the new gear stage is engaged, the PLC user sets the interface signals:
edge change DB31, ... DBX16.0 - DBX16.2 (actual gear stages A to C)
0→1 and
DB31, ... DBX16.3 (gear is changed over).
This signals the NCK that the correct gear stage has been successfully engaged.
The gear stage change is complete (spindle oscillation mode is deselected), the spindle accelerates
in the new gear stage to the last programmed spindle speed and the next block in the part program
can be executed.
The interface signal:
DB31, ... DBX82.3 (change over gear)
is reset by the NCK - the PLC user then resets the interface signal:
(gear is changed over).
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for ... spindle modes other than the oscillation mode
...
Special cases, If the PLC user reports back to the NCK with a different actual gear stage than issued by the NCK
errors, ...... as the setpoint gear stage, the gear change is still considered to have been successfully completed
and the actual gear stage A to C is activated.
Corresponding to .... DB31, ... DBX16.2 - DBX16.0 (actual gear stage A to C)
DB31, ... DBX82.2 - DBX82.0 (setpoint gear stage A to C)
DB31, ... DBX82.3 (change over gear stage)
DB31, ... DBX18.5 (oscillation speed)

DB31, ...
DBX16.4 - DBX16.5 Resynchronizing spindles 2 and 1
Edge evaluation: yes Signal(s) updated: Cyclically
Edge change The spindle should be resynchronized, as the synchronization between the position measuring
0→1 system of the spindle and the 0 degree position has been lost.
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for ... spindle modes other than the control mode.
...
Application The machine has a selector switch to changeover between a vertical and a horizontal spindle. Two
example(s) different position encoders are used (one for the vertical spindle and one for the horizontal spindle),
but only one actual value input is used on the control. When the system switches from the vertical
to the horizontal spindle, the spindle must be resynchronized.
This synchronization is triggered by the IS "re-synchronize spindle 1 or 2".
Corresponding to .... DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

Basic Functions
1686 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX16.7 Delete S value
Edge evaluation: yes Signal(s) updated: Cyclically
Edge change Control mode:
0→1 • Spindle stops
• Program continues to run
• Spindle continues to run with the following S value, if M3 or M4 were active
Oscillation mode, axis mode, positioning mode:
• Signal has no effect for the corresponding function. However, if the open-loop control mode is
selected again, a new S value must be programmed.
Signal state 0 or No effect.
edge change
1→0
Application Terminating traversing motion on account of an external signal (e.g. sensing probe).
example(s)

DB31, ...
DBX17.4 - DBX17.5 Re-synchronize spindle when positioning 2 and 1

Edge evaluation: yes Signal(s) updated: Cyclically


Signal state 1 When positioning, the spindle must be re-synchronized.
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for ... spindle modes other than the positioning mode.
...
Application The spindle has an indirect measuring system and slippage may occur between the motor and the
example(s) clamp. If the signal=1 - when positioning is started, the old reference is deleted and the zero mark is
searched for again before the end position is approached.
Corresponding to .... DB31, ... DBX60.4 (referenced/synchronized 1)
DB31, ... DBX60.5 (referenced/synchronized 2)

DB31, ...
DBX17.6 Invert M3/M4
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The direction of rotation of the spindle motor changes for the following functions:
edge change • M3
0→1 • M4
• M5
• SPOS/M19/SPOSA from the motion; not effective for SPOS/M19/SPOSA from zero speed
(stationary).
Application The machine has a selector switch to changeover between a vertical and a horizontal spindle. The
example(s) mechanical design is implemented so that for the horizontal spindle, one more gearwheel is
engaged than for the vertical spindle. The direction of rotation must therefore be changed for the
vertical spindle if the spindle is always to rotate clockwise with M3.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1687
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX18.4 Oscillation controlled by the PLC
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or If the interface signal:
edge change DB31, ... DBX18.4 (oscillation controlled by the PLC)
0→1 is not set, then automatic oscillation in the NCK is carried-out using the interface signal:
DB31, ... DBX18.5 (oscillation speed).
The two times for the directions of rotation are entered in the machine data:
MD35440 $MA_SPIND_OSCILL_TIME_CW (oscillation time for the M3 direction)
and
MD35450 $MA_SPIND_OSCILL_TIME_CCW (oscillation time for the M4 direction).
If the IS "oscillation via PLC" is set, then with the IS "oscillation speed" a speed is only output in
conjunction with the interface signals:
DB31, ... DBX18.6 - DBX18.7 (setpoint direction of rotation, counter-clockwise and clockwise).
The oscillation, i.e. the continuous change of the direction of rotation, is performed by the PLC user
program using the interface signal "setpoint direction of rotation, counter-clockwise and clockwise"
(oscillation via the PLC).
Application If the new gear stage cannot be engaged in spite of several attempts by the NCK, the system can
example(s) be switched to oscillation via PLC. Both of the times for the directions of rotation can then be
altered by the PLC user program as required. This ensures that the gear satge is reliably changed -
even with unfavorable gear wheel positions.
Corresponding to .... MD35440 $MA_SPIND_OSCILL_TIME_CW (oscillation time for the M3 direction)
MD35450 $MA_SPIND_OSCILL_TIME_CCW (oscillation time for the M4 direction)
DB31, ... DBX18.5 (oscillation speed)
DB31, ... DBX18.7 (setpoint direction of rotation, counter-clockwise)
DB31, ... DBX18.6 (setpoint direction of rotation, clockwise)

Basic Functions
1688 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX18.5 Oscillation speed
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 or If the gear stage is to be changed (DB31, ... DBX82.3 (change over gear) is set), then the spindle
edge change operating mode changes to the oscillation mode.
0→1 Depending on the instant in time that the interface signal:
DB31, ... DBX18.5 (oscillation speed)
is set, the spindle decelerates down to standstill with different deceleration levels:
The IS "Oscillation speed" is set before the interface signal:
DB31, ... DBX82.3 (change over gear)
is set by the NCK.
When oscillating, the spindle is decelerated down to standstill with the deceleration:
MD35410 $MA_SPIND_OSCILL_ACCEL.
Once the spindle is stationary, oscillation is immediately initiated.
The IS "Oscillation speed" is enabled after the IS "Change gear" is set by the NCK and when the
spindle is stationary. The position controller is disabled. The spindle decelerates with the specified
deceleration rate in the speed controlled mode.
After the IS "oscillation speed" is set, the spindle starts to oscillate with the oscillation acceleration
(MD35410).
if the interface signal:
DB31, ... DBX18.4 (oscillation via the PLC)
is not set, then automatic oscillation is executed in the NCK using the IS "Oscillation speed".
The two times for the directions of rotation are entered in the machine data:
MD35440 $MA_SPIND_OSCILL_TIME_CW (oscillation time for the M3 direction)
and
MD35450 $MA_SPIND_OSCILL_TIME_CCW (oscillation time for the M4 direction).
If the IS "oscillation via PLC" is set, then with the IS "oscillation speed" a speed is only output in
conjunction with the interface signals:
DB31, ... DBX18.6 - DBX18.7 (setpoint direction of rotation, counter-clockwise and clockwise).
The oscillation, i.e. the continuous change of the direction of rotation, is performed by the PLC user
program using the interface signal "setpoint direction of rotation, counter-clockwise and clockwise"
(oscillation via the PLC).
Signal state 0 or The spindle does not oscillate.
edge change
1→0
Signal irrelevant for ... All spindle modes except the oscillation mode.
...
Application The oscillation speed is used to make it easier to engage a new gear stage.
example(s)
Corresponding to .... DB31, ... DBX18.4 (oscillation controlled by the PLC)
DB31, ... DBX18.7 (setpoint direction of rotation, counter-clockwise)
DB31, ... DBX18.6 (setpoint direction of rotation, clockwise)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1689
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX18.6 - DBX18.7 Setpoint direction of rotation, counter-clockwise/setpoint direction of rotation, clockwise
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or If the interface signal:
edge change DB31, ... DBX18.4 (oscillation by the PLC)
0→1 is set, then the direction of rotation for the oscillation speed
can be entered using the two interface signals:
DB31, ... DBX18.6 - DBX18.7 (setpoint direction of rotation counter-clockwise and clockwise).
The times for the oscillation movement of the spindle motor are defined by setting the interface
signals "direction of rotation setpoint counter-clockwise and clockwise" for a corresponding length of
time.
Signal irrelevant for ... spindle modes other than the oscillation mode
...
Application Refer to DB31, ... DBX18.4 (oscillation controlled by the PLC)
example(s)
Special cases, If both of the interface signals are set simultaneously enabled, no oscillation speed is output.
errors, ...... If an interface signal is not set, then an oscillation speed is not output.
Corresponding to .... DB31, ... DBX18.4 (oscillation controlled by the PLC
DB31, ... DBX18.5 (oscillation speed)

18.12.2 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX60.0 Spindle/no axis
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The machine axis is operated in one of the following spindle modes:
edge change • Control mode
0→1
• Oscillation mode
• Positioning mode
• Rigid tapping
• Synchronous mode
The interface signals to the axis (DB31, ... DBB12 - DBB15) and from the axis
(DB31, ... DBB74 - DBB81) are invalid.
The interface signals to the spindle (DB31, ... DBB16 - DBB19) and from the spindle
(DB31, ... DBB82 - DBB91) are valid.
Signal state 0 or The machine axis is operated as an axis
edge change The interface signals to the axis (DB31, ... DBB12 - DBB15) and from the axis
1→0 (DB31, ... DBB74 - DBB81) are valid.
The interface signals to the spindle (DB31, ... DBB16 - DBB19) and from the spindle
(DB31, ... DBB82 - DBB91) are invalid.
Application If a machine axis operates alternatively as a spindle or rotary axis:
example(s) • Turning machine: Spindle/C axis
• Milling machine: Spindle/rotary axis for rigid tapping
The currently active operating mode
can be identified from interface signal:
DB31, ... DBX60.0 (spindle/no axis).

Basic Functions
1690 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX82.0 - 82.2 Setpoint gear stage A to C
Edge evaluation: yes Signal(s) updated: Cyclically
See DB31, ... DB82.3 (change gear).
Signal state 1 or The set gear stage is output in coded format:
edge change
0→1
VWJHDUVWDJH  &%$
VWJHDUVWDJH 
QGJHDUVWDJH 
UGJHDUVWDJH 
WKJHDUVWDJH 
WKJHDUVWDJH 
LQYDOLGYDOXH 
LQYDOLGYDOXH 

Signal irrelevant for ... Other spindle modes except oscillation mode
...
Corresponding to .... DB31, ... DBX82.3 (Change gear)
DB31, ... DBX16.0 - DBX16.2 (Actual gear stage A to C)
DB31, ... DBX16.3 (gear is changed)

DB31, ...
DBX82.3 Change gear stage
Edge evaluation: yes Signal(s) updated: Cyclically
Specification of gear stage:
• Manual specification using M function M41 - M45 corresponding to gear stage 1 - 5
If set gear stage <> actual gear stage =>
DB31, ... DBX82.3 (change gear) = 1
DB31, ... DBX82.0 - DBX82.2 (set gear stage) = set gear stage
• Automatic gear step selection depending on the progr. Spindle speed via M-function M40
at specified setpoint speed requires gear stage change =>
DB31, ... DBX82.3 (change gear) = 1
DB31, ... DBX82.0 - DBX82.2 (setpoint gear stage) = setpoint gear stage
Signal state 1 or New set gear stage was specified AND
edge change set gear stage <> actual gear stage
0→1
Special cases, Signal is not output if: Set gear stage == actual gear stage
errors, ......
Corresponding to .... DB31, ... DBX82.0 - DBX82.2 (Set gear stage A to C)
DB31, ... DBX16.0 - 16.2 (Actual gear stage A to C)
DB31, ... DBX16.3 (gear is changed)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1691
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX83.0 Speed limit exceeded
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The actual speed exceeds the maximum spindle speed:
edge change MD35100 $MA_SPIND_VELO_ LIMIT
0→1 by more than the spindle speed tolerance:
MD35150 $MA_SPIND_DES_VELO_TOL
Corresponding to .... MD35150 $MA_SPIND_DES_VELO_TOL (spindle speed tolerance)
MD35100 $MA_SPIND_VELO_LIMIT (maximum spindle speed)

DB31, ...
DBX83.1 Set speed limited (programmed speed too high)
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The set speed of the spindle that is specified directly (programmed spindle speed) or indirectly
edge change (constant cutting speed) would violate the current maximum limit value. The set speed is therefore
0→1 defined at the maximum limit value.
Limit values:
• Maximum speed of specified gear stage
• Maximum spindle speed
• Speed limited by VDI
• programmed spindle speed limit G26
• programmed spindle speed limitation for G96
Signal state 0 or The set speed of the spindle is outside the maximum limit value.
edge change
1→0
Application The interface signal:
example(s) DB31, ... DBX83.1 (set speed limited)
can be used to determine if the programmed speed is unattainable.
The PLC user can accept this state as permissible and enable the path feed, or he can disable the
path feed or the complete channel, IS:
DB31, ... DBX83.5 (spindle in set range)
is processed.

DB31, ...
DBX83.2 Setpoint speed increased (programmed speed too low)
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The set speed of the spindle that is specified directly (programmed spindle speed) or indirectly
edge change (constant cutting speed) would violate the current minimum limit value. The set speed is therefore
0→1 defined at the minimum limit value.
Limit values:
• Minimum speed of the specified gear stage
• Minimum spindle speed
• Speed limiting by means of NC/PLC interface
• programmed spindle speed limitation G25
• programmed spindle speed limitation for G96

Basic Functions
1692 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX83.2 Setpoint speed increased (programmed speed too low)
Signal state 0 or The set speed of the spindle is outside the minimum limit value.
edge change
1→0
Application The interface signal indicates if the programmed set speed is unattainable. The feed can be
example(s) enabled nonetheless by means of the PLC user program.
The PLC user can accept this state as permissible and enable the path feed, or he can disable the
path feed or the complete channel, IS:
DB31, ... DBX83.5 (spindle in set range)
is processed.
Corresponding to .... DB21, ... DBX6.0 (feed disable)
DB31, ... DBX4.3 (feed/spindle stop)
DB31, ... DBX83.5 (spindle in set range)

DB31, ...
DBX83.5 Spindle in the set range
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The actual speed of the spindle deviates from the set speed by less than the spindle speed
edge change tolerance:
0→1 MD35150 $MA_SPIND_DES_VELO_TOL.

Signal state 0 or The actual speed of the spindle deviates from the set speed by more than the spindle speed
edge change tolerance:
1→0 MD35150 $MA_SPIND_DES_VELO_TOL.

Normal status during the acceleration/deceleration phase of the spindle.


Signal irrelevant for ... All spindle modes except for control mode (speed mode).
...
Application Feed enable in the channel only at the end of the acceleration phase of the spindle:
example(s) IF ( DB31, ... DBX83.5 (spindle in set range) == 1 )
THEN ( DB21, ... DBX6.0 (feed disable) = 0 )
ELSE ( DB21, ... DBX6.0 (feed disable) = 1)
Note: Axes positioning will also be stopped.
Corresponding to .... MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START
MD35500 $MA_SPIND_DES_VELO_TOL (spindle speed tolerance)

DB31, ...
DBX83.7 Actual direction of rotation clockwise
Edge evaluation: yes Signal(s) updated: Cyclically
Interface signal is only valid if the spindle is rotating:
DB31, ... DBX61.4 (axis/spindle stationary) == 0
The actual direction of rotation is derived from the position measuring encoder.
Signal state 1 or Actual direction of rotation: Right
edge change
0→1

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1693
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX83.7 Actual direction of rotation clockwise
Signal state 0 or Actual direction of rotation: Left
edge change
1→0
Signal irrelevant for • Spindle is stationary: DB31, ... DBX61.4 (axis/spindle stationary) == 1
... • Spindles without position measuring encoder
Corresponding to .... DB31, ... DBX61.4 (axis/spindle stationary)

DB31, ...
DBX84.3 Rigid tapping active
Edge evaluation: yes Signal(s) updated: Cyclically
The spindle is internally switched to axis mode by the "Rigid tapping" function (G331/G332). This
results in a reaction to or updating of the spindle-specific interface signals:
• DB31, ... DBX2.2 (spindle reset)
• DB31, ... DBX16.4 - DBX16.5 (synchronize spindle)
• DB31, ... DBX17.6 (invert M3/M4)
• DB31, ... DBX83.5 (spindle in set range)
• DB31, ... DBX83.1 (programmable speed too high)
Signal state 1 or • Rigid tapping is active.
edge change
0→1
Application Notice!
example(s) If the following signals are set during rigid tapping, the thread will be destroyed:
• DB11, … DBX0.7 (mode group reset) = 1
• DB21, ... DBX7.7 (channel reset) = 1
• DB31, ... DBX2.1 (servo enable) = 0
• DB31, ... DBX8.3 (feed stop) = 1

DB31, ...
DBX84.5 Active spindle mode: Positioning mode
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or Positioning mode (SPOS or SPOSA) is active.
edge change
0→1
Corresponding to .... DB31, ... DBX84.7 (spindle mode control mode)
DB31, ... DBX84.6 (spindle mode oscillation mode)

Basic Functions
1694 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBX84.6 Active spindle mode: Oscillation mode
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or Oscillation mode is active.
edge change Note: The spindle changes automatically to oscillation mode if there is a gear change.
0→1
Corresponding to .... DB31, ... DBX84.7 (spindle mode control mode)
DB31, ... DBX84.5 (spindle mode positioning mode)
DB31, ... DBX82.3 (change gear)

DB31, ...
DBX84.7 Active spindle mode: Control mode
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The spindle is in control mode with the following functions:
edge change • Spindle direction of rotation specification M3/M4 or spindle stop M5
0→1
• M41...M45, or automatic gear stage change M40
Corresponding to .... DB31, ... DBX84.6 (spindle mode oscillation mode)
DB31, ... DBX84.5 (spindle mode positioning mode)

DB31, ...
DBX85.5 Spindle in position
Edge evaluation: yes Signal(s) updated: Cyclically
The interface signal is processed exclusively with the function spindle positioning. This includes:
• SPOS, SPOSA and M19 in the part program
• SPOS and M19 in synchronized actions
• Start positioning during use of the functions block FC18
If the spindle is traversed after a positioning for already set signal DB31, ... DBX85.5 (Spindle in
position), e.g. in the JOG mode, then this signal is deleted. If the spindle returns to its original
position in JOG mode, then the signal DB31, ... DBX85.5 (spindle in position) is set again. The last
position selection is maintained.
Signal state 1 or Precondition for the output of the NST DB31, ... DBX85.5 (spindle in position) is reaching the NST
edge change DB31, ... DBX60.7 (exact stop fine). Additionally the last programmed spindle position must have
0→1 arrived at the desired value.
If the spindle is already at the programmed position after a positioning, then signal DB31,...
DBX85.5 (spindle in position) is set.
Signal state 0 or On the cancellation of the NC/PLC interface signal:
edge change DB31, ... DBX60.7 (Exact stop fine),
1→0 DB31, ... DBX85.5 is always reset.
Application Spindle in position for the tool change
example(s) If the tool change cycle is interrupted by the machine operator e.g. with NC stop, NC stop axis plus
splindle, mode group stop etc., then the correct position to which the spindle is to travel in the tool
changer can be queried via DB31, ... DBX85.5.
Corresponding to .... DB31, ... DBX60.7 (Exact stop fine)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1695
NC/PLC Interface Signals (Z1)
Spindles (S1)

DB31, ...
DBB86 - DBB87 M function for spindle
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or From the NCK one of the following M-Funktions: M3, M4, M5, M70 is output to the PLC.
edge change The output occurs by means of: See "Corresponds to ...." below
0→1
Corresponding to .... DB31, ... DBB86 - DBB87 (M function for spindle), axis-specific
DB21, ... DBB58, DBB68 - DBB97 (M function for spindle), channel-specific

DB31, ...
DBB88 - DBB91 S function for spindle
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or An S function was output from the NCK to the PLC.
edge change The output occurs by means of: See "Corresponds to ...." below
0→1 The following S functions are output here:
• S.... as spindle speed in rpm (programmed value)
• S .... as constant cutting speed in m/min or ft/min
The following S functions are not output here:
• S.... as the programmed Spindle speed limiting G25
• S.... as the programmed Spindle speed limiting G26
• S .... as spindle speed in rpm if a spindle was not defined in the controller
• S.... as the dwell time in spindle revolutions
Corresponding to .... DB31, ... DBB88 - DBB91 (S function for spindle), axis-specific
DB21, ... DBB60, DBB98 - DBB115 (S function for spindle), channel-specific

Basic Functions
1696 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Feeds (V1)

18.13 Feeds (V1)

18.13.1 Signals to channel (DB21, ...)

DB21, ...
DBX0.6 Activate dry run feed
Edge evaluation: yes Signal(s) updated: Cyclically
Signal state 1 or The dry run feed rate defined using the setting data:
edge change SD42100 $SC_DRY_RUN_FEED
0→1 is used instead of the programmed feed (for G01, G02, G03) if the dry run feed rate is greater than
that programmed.
The dry run feed rate is effective after the reset state.
This interface signal is evaluated at NC start when the channel is in the "reset" state.
The dry run feed can be activated from the PLC or operator panel.
When selected from the operator panel front, the PLC interface signal:
DB21, ... DBX24.6 (dry run feed selected)
is set and transferred from the PLC basic program to the interface signal:
DB21, ... DBX0.6 (activate dry run feed).

When selected using the PLC, the IS "activate dry run feed" should be set from the PLC user
program.
Signal state 0 or The programmed feed is used.
edge change Effective after the reset state.
1→0
Application Testing a workpiece program with an increased feed rate.
example(s)
Special cases, If the signal changes to "0" within a G33 block, the programmed feed is not activated until the end of
errors, ...... the block is reached, since an NC stop was not triggered.
Corresponding to .... DB21, ... DBX24.6 (dry run feed rate selected)
SD42100 $SC_DRY_RUN_FEED (dry run feed rate)

DB21, ...
DBB4 Feedrate override
Edge evaluation: No Signal(s) updated: Cyclically

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1697
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB21, ...
DBB4 Feedrate override
Signal state 1 or The feedrate override can be defined via the PLC in binary or Gray coding.
edge change With binary coding, the feed value is interpreted in %.
0→1 0% to 200% feed changes are possible, in accordance with the binary value in the byte.
The following permanent assignment applies:

&RGH )HHGUDWHRYHUULGHIDFWRU

 ฬ
 ฬ
 ฬ
 ฬ
 
 ฬ

Binary values > 200 are limited to 200%.


The machine data:
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary-coded override switch)
can be used to additionally limit the maximum feedrate override.
With Gray coding, the individual switch settings are assigned to the following codes:

7DEOH*UD\FRGLQJIRUIHHGUDWHRYHUULGH

6ZLWFK &RGH )HHGUDWH


SRVLWLRQ RYHUULGHIDFWRU
VWDQGDUGYDOXHV

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

The factors listed in the table for the feedrate override are stored in the machine data:
MD12030 $MN_OVR_FACTOR_FEEDRATE [n].
The table contains the default settings.
The number of possible switch settings for standard machine panels is described in the
Configuration Manuals for SINUMERIK 840D.

Basic Functions
1698 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB21, ...
DBB4 Feedrate override
Corresponding to .... DB21, ... DBX6.7 (feed rateoverride active)
MD12030 $MN_OVR_FACTOR_FEEDRATE [n] (evaluation of the path feed rate override switch)
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary coded override switch)

DB21, ...
DBB5 Rapid traverse override
Edge evaluation: No Signal(s) updated: Cyclically

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1699
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB21, ...
DBB5 Rapid traverse override
Signal state 1 or The rapid traverse override can be entered via the PLC in either the binary or Gray code.
edge change For binary coding, the rapid traverse override is interpreted as a %.
0→1 0% to 100% feed changes are possible, in accordance with the binary value in the byte.
The following permanent assignment applies:

&RGH 5DSLGWUDYHUVHRYHUULGHIDFWRU

 ฬ
 ฬ
 ฬ
 ฬ
 
 ฬ

Binary values > 100 are limited to 100%.


Using the machine data:
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary-coded override switch),
the maximum rapid traverse override can be additionally limited.
In gray coding, the following codes are assigned to the individual switch settings:

7DEOH*UD\FRGLQJIRUUDSLGWUDYHUVHRYHUULGH

6ZLWFK &RGH 5DSLGWUDYHUVH


SRVLWLRQ RYHUULGHIDFWRU
VWDQGDUGYDOXHV

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

The factors listed in the table for the rapid traverse override are stored in the machine data:
MD12050 $MN_OVR_FACTOR_RAPID_TRA[n].
The table contains the default settings.
The number of possible switch settings for standard machine panels is described in the
Configuration Manuals for SINUMERIK 840D.

Basic Functions
1700 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB21, ...
DBB5 Rapid traverse override
Corresponding to .... DB21, ... DBX6.6 (rapid traverse override active)
MD12050 $MN_OVR_FACTOR_RAPID_TRA[n] (evaluation of the path feed rate override switch)
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary coded override switch)

DB21, ...
DBX6.0 Feed disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal is active in one channel in all operating modes.
edge change The signal disables the feed for all of the axes (geometry and synchronized) that interpolate relative
0→1 to one another as long as G33 (thread) is not active.
All axes are brought to a standstill but still maintaining the path contour. When the feed disable is
canceled (0 signal), the interrupted part program is continued.
The signal triggers a feed disable for all positioning axes. This signal brings all traversing axes to a
standstill with controlled braking (ramp stop). No alarm is output.
The position control is retained, i.e. the following error is eliminated.
If a travel request is issued for an axis with an active "Feed disable", then this is kept. The queued
travel request is executed immediately when the "Feed disable" is canceled.
If the axis is interpolating in relation to others, this also applies to these axes.
Signal state 0 or The feed rate is enabled for all axes of the channel.
edge change If a travel request ("travel command") exists for an axis or group of axes when the "feed disable" is
1→0 canceled, then this is executed immediately.
Application Stopping machining by selecting FEED OFF on the machine control panel.
example(s)
Special cases, The feed disable is inactive when G33 is active.
errors, ......

DB21, ...
DBX6.6 Rapid traverse override active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The rapid traverse override between 0 and a maximum of 100% entered in the PLC interface is
edge change channel-specific. The override factor is defined using the machine data:
0→1 MD12040 $MN_OVR_RAPID_IS_GRAY_CODE (rapid traverse override switch gray coded)
and
MD12050 $MN_OVR_FACTOR_RAPID_TRA [n] (evaluation of the rapid traverse override switch).
Signal state 0 or The rapid traverse override entered at the PLC interface is ignored.
edge change When the rapid traverse override is inactive, the NC always uses 100% as the internal override
1→0 factor.
Exceptions are the zero setting for a binary interface and the 1st switch setting for a Gray-coded
interface. In these cases, the override factors entered at the PLC interface are used. With a binary
interface, the override factor = 0. With a Gray-coded interface, the value entered in the machine
data for the 1st switch setting is output as the override value.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1701
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB21, ...
DBX6.6 Rapid traverse override active
Application The override value is generally selected using the rapid traverse override switch on the machine
example(s) control panel.
Using the interface signal:
DB21, ... DBX6.6 (rapid traverse override active),
the rapid traverse override switch can be enabled from the PLC user program while commissioning
a new NC program, e.g. using the key-operated switch.
Special cases, The rapid traverse override is inactive when G33, G63, G331, G332 are active.
errors, ......
Corresponding to .... DB21, ... DBB5 (rapid traverse override)

DB21, ...
DBX6.7 Feedrate override active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The feed rate override between 0 and a maximum of 200% entered at the PLC interface is active
edge change for the path feed rate and therefore automatically for the related axes.
0→1 In JOG mode, the feed rate override acts directly on the axes.
The override factor is entered using the machine data:
MD12020 $MN_OVR_FEED_IS_GRAY_CODE (path feed rate override factor, gray-coded)
and
MD12030 $MN_OVR_FACTOR_FEEDRATE [n] (evaluation of the path feed rate override switch)
Signal state 0 or The feed rate override entered at the PLC interface is ignored.
edge change When the feed rate override is inactive, the NC always uses 100% as the internal override factor.
1→0
Exceptions are the zero setting for a binary interface and the 1st switch setting for a Gray-coded
interface. In these cases, the override factors entered in the PLC interface are used. With a binary
interface, the override factor = 0. With a Gray-coded interface, the value entered in the machine
data for the 1st switch setting is output as the override value.
Application The override value is generally selected using the feed rate override switch on the machine control
example(s) panel.
Using the interface signal:
DB21, ... DBX6.7 (feed rate override active),
the feed rate override switch can be enabled from the PLC user program while commissioning a
new NC program, e.g. using the key-operated switch.
Special cases, The feed rate override is inactive when G33, G63, G331, G332 are active.
errors, ......
Corresponding to .... DB21, ... DBB4 (feed rate override)

Basic Functions
1702 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB21, ...
DBX12.3, DBX16.3, Feed stop (Geometry axis 1 to 3)
DBX20.3
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal is only active in JOG mode.
edge change The signal stops the feed of the geometry axis. This signal brings all traversing axes to a standstill
0→1 with controlled braking (ramp stop). No alarm is output.
The position control is retained, i.e. the following error is eliminated.
If - for a geometry axis - a travel request is issued with an active "feed stop", the request is kept.
This queued travel request is executed immediately after the "feed stop" is canceled.
Signal state 0 or The feed is enabled for the geometry axis.
edge change If, for the geometry axis, a travel request ("travel command") is active when the "feed stop" is
1→0 cancelled, this is executed immediately.

DB21, ...
DBX24.6 Dry run feed rate selected
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Dry run feed rate is selected.
edge change Instead of the programmed feed rate, the dry run feed rate entered in setting data:
0→1 SD42100 $SC_DRY_RUN_FEED
is active.
When activated from the operator panel, the dry run feed signal is automatically entered in the PLC
interface and transmitted by the PLC basic program to the PLC interface signal:
DB21, ... DBX0.6 (active dry run feed).

Signal state 0 or Dry run feed rate is not selected.


edge change The programmed feed rate is active.
1→0
Corresponding to .... DB21, ... DBX0.6 (activate dry run feed)
SD42100 $SC_DRY_RUN_FEED (dry run feed rate)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1703
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB21, ...
DBX25.3 Feed rate override selected for rapid traverse
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The feed rate override switch should also be active as rapid traverse override switch.
edge change Override values above 100% are limited to the maximum value for 100% rapid traverse override.
0→1
The interface signal:
DB21, ... DBX25.3 (feed rate override for rapid traverse selected)
is automatically entered into the PLC interface from the operator panel
and transferred from the PLC basic program to the PLC interface signal:
DB21, ... DBX6.6 (rapid traverse override active).

Further, the interface signal:


DB21, ... DBB4 (feed rate override)
is copied from the PLC basic program to the interface signal:
DB21, ... DBB5 (rapid traverse override).
Signal state 0 or The feed rate override switch should not be activated as rapid traverse override switch.
edge change
1→0
Application The signal is used when no separate rapid traverse override switch is available.
example(s)

DB 21, ...
DBX29.0 - DBX29.3 Activate fixed feed rate 1 - 4 for path/geometry axes
Edge evaluation: No Signal(s) updated: Cyclically
Description These signals are used to select/de-select the function "fixed feed" and define which fixed feed
should be effective for path/geometry axes.

%LW %LW %LW %LW 0HDQLQJ

    )L[HGIHHGLVGHVHOHFWHG
    )L[HGIHHGLVVHOHFWHG
    )L[HGIHHGLVVHOHFWHG
    )L[HGIHHGLVVHOHFWHG
    )L[HGIHHGLVVHOHFWHG

Corresponding to .... MD12202 $MN_PERMANENT_FEED[n]


MD12200 $MN_RUN_OVERRIDE_0

18.13.2 Signals to axis/spindle (DB31, ...)

DB31, ...
DBB0 Feed rate override (axis-specific)
Edge evaluation: No Signal(s) updated: Cyclically

Basic Functions
1704 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB31, ...
DBB0 Feed rate override (axis-specific)
Signal state 1 or The axis-specific feed rate override can be defined via the PLC in binary or Gray coding.
With binary coding, the feed value is interpreted in %. 0% to 200% feed changes are possible, in
edge change accordance with the binary value in the byte.
0→1 The following permanent assignment applies:

$[LVVSHFLILFIHHGUDWH
&RGH RYHUULGHIDFWRU

 ฬ
 ฬ
 ฬ
 ฬ
 
 
 
 ฬ
 
 
 
 ฬ

Binary values > 200 are limited to 200%.


Using the machine data:
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary-coded override switch)
the maximum axis-specific feed rate override can be additionally limited.
In gray coding, the following codes are assigned to the individual switch settings:
7DEOH*UD\FRGLQJIRUD[LV"VSHFLILFIHHGUDWHRYHUULGH

6ZLWFK &RGH $[LDOIHHGUDWH


SRVLWLRQ RYHUULGHIDFWRU
VWDQGDUGYDOXHV

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

The factors listed in the table for the axial feed rate override
are stored in the NC-specific machine data: MD12010 $MN_OVR_FACTOR_AX_SPEED [n]
The table contains the default settings.
The number of possible switch settings for standard machine panels is described in the
Configuration Manuals for SINUMERIK 840D.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1705
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB31, ...
DBB0 Feed rate override (axis-specific)
Corresponding to .... DB31, ... DBX1.7 (override effective
MD12010 $MN_OVR_FACTOR_AX_SPEED [n] (evaluation of the axis feed rate override switch)
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary coded override switch)

DB31, ...
DBX1.7 Override active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Feed rate override active:
edge change The axis-specific feed rate override between 0 and a maximum of 200% entered in the PLC
0→1 interface is used.
The override factor is defined using the machine data:
MD12000 $MN_OVR_AX_IS_GRAY_CODE (axis feed rate override switch gray coded)
and
MD12010 $MN_OVR_FACTOR_AX_SPEED [n] (evaluation of the axis feed rate override switch).
Spindle override active:
The spindle override - input at the PLC interface - of 0 to a maximum of 200% is taken into account.
The override factor is entered using the machine data:
MD12060 $MN_OVR_SPIND_IS_GRAY_CODE (spindle override switch, Gray coded)
and
MD12070 $MN_OVR_FACTOR_SPIND_SPEED [n] (evaluation of the spindle override switch).
Signal state 0 or The existing axis-specific feed rate override or spindle override is not active.
edge change If the feed rate override is inactive, "100%" is used as the internal override factor.
1→0
Exceptions are the zero setting for a binary interface and the 1st switch setting for a Gray-coded
interface. In these cases, the override factors entered at the PLC interface are used.
For a binary interface, the override factor = 0. For a gray-coded interface, the value entered in the
machine data for the 1st switch setting is output as the override value.
Application The override value is generally specified using the axis-specific feed rate override switch or the
example(s) spindle override switch on the machine control panel.
The "feed rate override active" signal can be used to enable the feed rate override switch from the
PLC user program, e.g. using the key-operated switch when commissioning a new NC program.
Special cases, The spindle override is always accepted with 100% in the spindle "Oscillation mode".
errors, ...... The spindle override acts on the programmed values before the limits (e.g. G26, LIMS...) intervene.
The feed rate override is ineffective for:
• active G33
• active G63 (the override is defined in the NC at 100%)
• active G331, G332 (the override is defined in the NC at 100%)
The spindle override is inactive for:
• active G63 (the override is defined in the NC at 100%)
Corresponding to .... DB31, ... DBB0 (feed/spindle override)

Basic Functions
1706 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB31, ...
DBX3.2 - DBX3.5 Activate fixed feed rate 1 - 4 for machine axes
Edge evaluation: No Signal(s) updated: Cyclically
Description These signals are used to select/de-select the function "fixed feed" and define which fixed feed
should be effective for machine axes.

%LW %LW %LW %LW 0HDQLQJ

    )L[HGIHHGLVGHVHOHFWHG
    )L[HGIHHGLVVHOHFWHG
    )L[HGIHHGLVVHOHFWHG
    )L[HGIHHGLVVHOHFWHG
    )L[HGIHHGLVVHOHFWHG

Corresponding to .... MD12202 $MN_PERMANENT_FEED[n]


MD12200 $MN_RUN_OVERRIDE_0

DB31, ...
DBX4.3 Feed stop/spindle stop (axis-specific)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal is active in all modes.
edge change Feed stop:
0→1
The signal triggers a "feed stop" for the axis. This signal brings all traversing axes to a standstill
with controlled braking (ramp stop). No alarm is output.
The signal triggers a "feed stop" for all path axes interpolating relative to each other when the "feed
stop" is activated for any one of these path axes. In this case, all the axes are brought to a stop with
adherence to the path contour. When the "feed stop" signal is canceled, execution of the interrupted
part program is resumed.
The position control is retained, i.e. the following error is eliminated.
If a travel request is issued for an axis with an active "feed stop", this is kept. This queued travel
request is executed immediately after the "feed stop" is canceled.
If the axis is interpolating in relation to others, this also applies to these axes.
Spindle stop:
The spindle is brought to a standstill along the acceleration characteristic.
In the positioning mode, when the "Spindle stop" signal is set positioning is interrupted. The above
response applies with respect to individual axes.
Signal state 0 or Feed stop:
edge change The feed rate is enabled for the axis.
1→0
If a travel request ("travel command") is active when the "feed stop" is canceled, this is executed
immediately.
Spindle stop:
The speed is enabled for the spindle.
The spindle is accelerated to the previous speed setpoint with the acceleration characteristic or, in
positioning mode, positioning is resumed.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1707
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB31, ...
DBX4.3 Feed stop/spindle stop (axis-specific)
Application Feed stop:
example(s) The traversing motion of the machine axes is not started with "feed stop", if, for example, certain
operating states exist at the machine that do not permit the axes to be moved (e.g. a door is not
closed).
Spindle stop:
In order to change a tool
To enter help functions (M, S, H, T, D and F functions) during setup.
Special cases, Spindle stop is inactive when G331, G332 are active.
errors, ......

DB31, ...
DBB19 Spindle override
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The spindle override can be defined via the PLC in binary or Gray coding.
edge change The override value determines the percentage of the programmed speed setpoint that is issued to
0→1 the spindle.
With binary coding, the override is interpreted in %. 0% to 200% feed changes are possible, in
accordance with the binary value in the byte.
The following permanent assignment applies:

&RGH 6SLQGOHRYHUULGHIDFWRU

 ฬ
 ฬ
 ฬ
 ฬ
 
 
 
 ฬ
 
 
 
 ฬ

Binary values > 200 are limited to 200%.


The machine data:
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary-coded override switch)
can be used to additionally limit the maximum spindle override.

Basic Functions
1708 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
NC/PLC Interface Signals (Z1)
Feeds (V1)

DB31, ...
DBB19 Spindle override
Signal state 1 or In gray coding, the following codes are assigned to the individual switch settings:
edge change
0→1
7DEOH*UD\FRGLQJIRUVSLQGOHRYHUULGH

6ZLWFK &RGH 6SLQGOHRYHUULGH


SRVLWLRQ IDFWRU
VWDQGDUGYDOXHV

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

The factors listed in the table for spindle override are stored in the machine data:
MD12070 $MN_OVR_FACTOR_SPIND_SPEED [n]

The table contains the default settings.


The number of possible switch settings for standard machine panels is described in the
Configuration Manuals for SINUMERIK 840D.
Corresponding to .... DB31, ... DBX1.7 (override active)
MD12070 $MN_OVR_FACTOR_SPIND_SPEED [n] (evaluation of the spindle override switch)
MD12100 $MN_FACTOR_LIMIT_BIN (limit for binary-coded override switch)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1709
NC/PLC Interface Signals (Z1)
Feeds (V1)

18.13.3 Signals from axis/spindle (DB31, ...)

DB31, ...
DBX62.2 Revolutional feed rate active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or For programming of G95 (revolutional feed rate) in JOG mode or automatic mode.
edge change
0→1
Corresponding to .... SD41100 $SN_JOG_REV_IS_ACTIVE (revolutional feed rate for JOG active)
SD42600 $SC_JOG_FEED_PER_REV_SOURCE
(in the JOG mode revolutional feed rate for geometry axes, on which the frame with rotation acts)
SD43300 $SA_ASSIGN_FEED_PER_REV_SOURCE
(revolutional feed rate for position axes/spindles)
MD32040 $MA_JOG_REV_VELO_RAPID (revolutional feed rate for JOG with rapid traverse
override)
MD32050 $MA_JOG_REV_VELO (revolutional feed rate for JOG mode)

DB31, ...
DBB78 - DBB81 F function for positioning axis
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The F value of a positioning axis programmed in the current block is entered in the axis-specific
edge change PLC interface signal.
0→1 The assignment between the DB number and machine axis number is established using the axis
name.
The value is retained until it is overwritten by another.
Format: Binary number in real format.
Application Modification of the programmed F value by the PLC, e.g. by overwriting the selected axis-specific
example(s) feed rate override.
Corresponding to .... MD22240 $MC_AUXFU_F_SYNC_TYPE (output time F functions)

Basic Functions
1710 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Appendix A
A.1 List of abbreviations

A
AC Adaptive Control
ADI4 Analog Drive Interface for 4 Axes
ALM Active Line Module
ARM Rotating induction motor
AS Automation System
ASCII American Standard Code for Information Interchange
ASUB Asynchronous subprogram
AuxF Auxiliary function
AUXFU Auxiliary Function

B
BA Mode
BP Basic Program (PLC)
BCD Binary Coded Decimals: Decimal numbers encoded in binary code
BCS Basic Coordinate System
BERO Proximity limit switch
BI Binector Input
BICO Binector Connector
BIN BINary files Binary files
BO Binector Output
BOT Boot file (SIMODRIVE 611D)

C
CAD Computer-Aided Design
CAM Computer-Aided Manufacturing
CC Compile Cycle
CF card Compact Flash Card
CI Connector Input
CNC Computerized Numerical Control
CO Connector Output
CoL Certificate of License
COM Communication
Compact I/O module Compact I/O module (PLC I/O module)

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1711
Appendix
List of abbreviations

CP Communication Processor
CPA Compiler Projecting dAta: Compiler configuring data
CPU Central Processing Unit
CR Carriage Return
CRC Cutter Radius Compensation
CTS Clear To Send: Signal from serial data interfaces
CU Control Unit
CUTCOM CUTter radius COMpensation: Tool radius compensation

D
DAU Digital-to-Analog Converter
DB Data block (PLC)
DBB Data block byte (PLC)
DBD Data block double word (PLC)
DBW Data block word (PLC)
DBX Data block bit (PLC)
DIN Deutsche Industrie Norm (German Industry Standard)
DIO Data Input/Output: Data transfer display
DIR DIRectory
DO Drive Object
DPM Dual-Port Memory
DPR Dual-Port RAM
DRAM Dynamic memory (non-buffered)
DRF Differential Resolver Function (handwheel)
DRIVE-CliQ Drive Component Link with IQ
DRY DRY run: Dry run feedrate
DSB Decoding Single Block
DSC Dynamic Servo Control/Dynamic Stiffness Control
DW Data word
DWORD Double word (currently 32 bits)

E
EMC Electro-Magnetic Compatibility
EN European Standard
ENC Encoder: Actual value encoder
EnDat Encoder interface
EPROM Erasable Programmable Read Only Memory
EQN Designation for an absolute encoder with 2048 sine signals per revolution
ES Engineering System
ESD Electrostatic Sensitive Devices

Basic Functions
1712 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Appendix
List of abbreviations

ESR Extended stop and retract


ETC ETC key ">": Softkey bar extension in the same menu

F
FB Function block (PLC)
FC Function Call: Function block (PLC)
FD Feed Drive
FEPROM Flash EPROM: Read and write memory
FIFO First In First Out: memory which works without address specification and whose data
are read in the order in which they were stored.
FIPO Fine InterPOlator
FRAME Coordinate transformation
FST Feed STop
FW Firmware

G
GC Global Control (Profibus: Broadcast telegram)
GEO Geometry, e.g. geometry axis
GIA Gear Interpolation dAta
GND Signal GrouND
GS Gearbox stage
GSD Device master file for desribing a Profibus slave
GSDML Generic Station Description Markup Language: XML-based description language for
creating a GSD file
GUD Global User Data
GWPS Grinding Wheel Peripheral Speed

H
HEX Abbreviation for hexadecimal number
HHU Handheld unit
HMI Human Machine Interface, SINUMERIK operator interface
HW Hardware
HW Config SIMATIC S7 tool for configuration and parameterization of hardware components
within an S7 project
HW limit switch Hardware limit switch

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1713
Appendix
List of abbreviations

I
I/R Infeed/regenerative feedback unit of SIMODRIVE 611(D)
IBN Commissioning
ICA Interpolatory compensation
INC Increment
IPO Interpolator
IS Interface signal

J
JOG JOGging: Setup mode

K
Kp Proportional gain
KÜ Transmission ratio
KV Gain factor of control loop

L
LAN Local Area Network
LEC Leadscrew error compensation
LED Light-emitting diode
LF Line Feed
LR Position controller
LSB Least Significant Bit
LUD Local User Data: User data (local)

M
MAC Media Access Control
MB Megabyte
MCI Motion Control Interface
MCIS Motion Control Information System
MCP Machine control panel
MCS Machine coordinate system
MD Machine Data
MDA Manual Data Automatic: Manual input
MLFB Machine-readable product designation
MM Motor module
MMC Man-Machine Communication
Mode group Mode group

Basic Functions
1714 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Appendix
List of abbreviations

MPF Main Program File: NC part program (main program)


MPI Multi-Point Interface: Multiport Interface
MSD Main Spindle Drive
MSGW Message word
MSTT Machine Control Panel

N
NC Numerical Control
NCK Numerical Control Kernel
NCU Numerical Control Unit
NRK Name of operating system of the NCK
NX Numerical eXtension (axis extension module)

O
OB Organization block in the PLC
OEM Original Equipment Manufacturer
OLP Optical Link Plug: Fiber-optic bus connector
OP Operator Panel: Operating equipment
OPI Operator Panel Interface: Interface for connection to the operator panel
OPT Options

P
PC Personal Computer
PCMCIA Personal Computer Memory Card International Association
PCU PC Unit
PCW Program control word
PG Programming device
PID Parameter identification: Part of a PIV
PII Process image of inputs
PIO Process image of outputs
PIV Parameter identification: Value: Parameterizing part of a PPO
PLC Programmable Logic Control: Adaptive controller
PMS Position Measuring System
PNO PROFIBUS User Organization
PO Power On
POS Positioning: e.g. POS axis = positioning axis = channel axis which traverses non-
interpolatory channel axes to their programmed positions, i.e. independently of other
channel axes
POSMO A Positioning Motor Actuator: positioning motor

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1715
Appendix
List of abbreviations

POSMO CA Positioning Motor Compact AC: Complete drive unit with integrated power and
control module as well as positioning unit and program memory; AC infeed
POSMO DC Positioning Motor Compact DC: Like CA but with DC infeed
POSMO SI Positioning Motor Servo Integrated: Positioning motor, DC infeed
PPO Parameter Process data Object; Cyclic data message frame for Profibus DP
transmission and "Variable speed drives" profile
PROFIBUS Process Field Bus: Serial data bus
PRT Program test
PTP Point-To-Point
PUD Program global User Data: Global program variable
PZD Process Data: Process data part of a PPO

Q
QEC Quadrant error compensation

R
RAM Random Access Memory: Read/write memory
REF REFerence point approach function
REPOS REPOSition function
RISC Reduced Instruction Set Computer: Type of processor with small instruction set and
ability to process instructions at high speed
ROV Rapid Override: Input correction
RP R parameter, arithmetic parameter, predefined user variable
RPY Roll Pitch Yaw: Rotation type of a coordinate system
RTCP Real Time Control Protocol
RTLI Rapid Traverse Linear Interpolation: Linear interpolation during rapid traverse motion

S
SBC Safe Brake Control
SBL Single Block
SD Setting Data
SEA Setting Data Active: Identifier (file type) for setting data
SERUPRO SEarch RUn by PROgram test
SGA Safety-related output
SGE Safety-related input
SH Safe stop
SIM Single Inline Module
SK Softkey
SKP SKiP: Function for skipping a part program block
SLM Synchronous Linear Motor

Basic Functions
1716 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Appendix
List of abbreviations

SM Stepper Motor
SMC Cabinet-mounted sensor module
SME Sensor Module Externally-mounted
SPF SubProgram File: Subprogram
SRAM Static RAM (non-volatile)
SRM Synchronous Rotary Motor
SSI Synchronous Serial Interface (interface type)
SSL Block search
STW Control word
SW Software
SW limit switch Software limit switch
SYF SYstem Files
SYNACT SYNchronized ACTion

T
T Tool
TB Terminal Board (SINAMICS)
TC Tool change
TCP Tool Center Point: Tool tip
TCP/IP Transport Control Protocol/Internet Protocol
TCU Thin Client Unit
TEA Testing Data Active: Identifier for machine data
TIA Totally Integrated Automation
TLC Tool Length Compensation
TM Tool management
TM Terminal Module (SINAMICS)
TNRC Tool Nose Radius Compensation
TO Tool Offset
TOA Tool Offset Active: Identifier (file type) for tool offsets
TRANSMIT TRANSform Milling Into Turning: Coordination transformation for milling operations
on a lathe
TRC Tool Radius Compensation
TTL Transistor-Transistor Logic (interface type)

U
UPS Uninterruptible power supply (UPS)
USB Universal Serial Bus

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1717
Appendix
List of abbreviations

V
VDE Verband Deutscher Elektrotechniker [Association of German Electrical Engineers]
VDI Internal communication interface between NCK and PLC
VDI Verein Deutscher Ingenieure [Association of German Engineers]
VI Voltage input
VO Voltage output

W
WCS Workpiece Coordinate System
WOP Workshop-Oriented Programming
WPD Workpiece Directory
WZ Tool

X
XML Extensible Markup Language

Z
ZO Zero offset
ZOA Zero Offset Active: Identifier for zero offsets
ZSW Status word (of drive)

Basic Functions
1718 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Appendix
Feedback on the documentation

A.2 Feedback on the documentation

This document will be continuously improved with regard to its quality and ease of use.
Please help us with this task by sending your comments and suggestions for improvement
via e-mail or fax to:

E-mail: mailto:[email protected]

Fax: +49 9131 - 98 2176


Please use the fax form on the back of this page.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1719
Appendix
Feedback on the documentation

7R )URP
6,(0(16$*
1DPH
,'70&06
32%R[ $GGUHVVRI\RXUFRPSDQ\GHSDUWPHQW

6WUHHW
'(UODQJHQ*HUPDQ\
=LSFRGH &LW\

3KRQH

)D[ 'RFXPHQWDWLRQ )D[

6XJJHVWLRQVDQGRUFRUUHFWLRQV

Basic Functions
1720 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Appendix
Overview

A.3 Overview
'RFXPHQW2YHUYLHZ6,180(5,.'VO'LVO
*HQHUDO'RFXPHQWDWLRQ

6,180(5,. 6,180(5,. 6,1$0,&6


'VO 6
'LVO

6DOHV%URFKXUH &DWDORJ1& &DWDORJ


'&RQYHUWHUFKDVVLVXQLWV

8VHU'RFXPHQWDWLRQ

6,180(5,. 6,180(5,. 6,180(5,. 6,180(5,. 6,180(5,.


'VO 'VO 'VO 'VO 'VO
' 'LVO ' 'LVO
'LVO 'LVO

2SHUDWLQJ0DQXDO 2SHUDWLQJ0DQXDO 3URJUDPPLQJ0DQXDO 3URJUDPPLQJ0DQXDO 'LDJQRVWLFV0DQXDO


+0,VO8QLYHUVDO ದ+0,$GYDQFHG ದ)XQGDPHQWDOV ದ&\FOHV
7XUQLQJPLOOLQJ ದ2SHUDWLRQ FRPSDFW ದ-RESODQQLQJ ದ0HDVXULQJF\FOHV
ದ+0,(PEHGGHG ದ3URJUDPPLQJ FRPSDFW
ದ6KRS0LOO ದ6\VWHP9DULDEOH/LVWV
ದ6KRS7XUQ ದ,627XUQLQJ0LOOLQJ

0DQXIDFWXUHUVHUYLFHGRFXPHQWDWLRQ

6,180(5,. 6,180(5,. 6,180(5,. 6,180(5,. 6,180(5,.


'VO 'VO 'VO 'LVO 'VO
'LVO 'LVO

0DQXDO 0DQXDO &RPPLVVLRQLQJ ದ&RPPLVVLRQLQJ 3DUDPHWHU0DQXDO


ದ1&8 2SHUDWRU&RPSRQHQWV 0DQXDO&1& 0DQXDO
ದ0DFKLQH DQG1HWZRUNLQJ ದ1&.3/&'ULYH ದ$', ದ3DUW
FRQILJXUDWLRQ ದ+0,VO ದ3DUW
ದ+0,(PEHGGHG
ದ+0,$GYDQFHG
ದ6KRS0LOO6KRS7XUQ

0DQXIDFWXUHUVHUYLFHGRFXPHQWDWLRQ

6,180(5,. 6,180(5,. 6,1$0,&6 6,180(5,.


6,180(5,.
'VO 'VO 6 'VO
'LVO 'LVO

)XQFWLRQ0DQXDO )XQFWLRQ0DQXDO )XQFWLRQ0DQXDO )XQFWLRQ0DQXDO (0&*XLGHOLQHV


ದ%DVLF)XQFWLRQV ದ7RROPDQDJHPHQW 'ULYHIXQFWLRQV 6DIHW\,QWHJUDWHG
ದ([WHQGHG)XQFWLRQV ದ,62'LDOHFWV
ದ6SHFLDOIXQFWLRQV ದ6LQX&20
ದ6\QFKURQRXV$FWLRQV

(OHFWURQLFGRFXPHQWDWLRQ

6,180(5,.
6,1$0,&6
0RWRUV

'2&21&'
'2&21:(% 5HFRPPHQGHGPLQLPXPVFRSHRIGRFXPHQWDWLRQ

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1721
Appendix
Overview

Basic Functions
1722 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Absolute dimensions
A destination for an axis movement is defined by a dimension that refers to the origin of the
currently active coordinate system. See → Incremental dimension

Acceleration with jerk limitation


In order to optimize the acceleration response of the machine whilst simultaneously
protecting the mechanical components, it is possible to switch over in the machining program
between abrupt acceleration and continuous (jerk-free) acceleration.

Address
An address is the identifier for a certain operand or operand range, e.g. input, output etc.

Alarms
All → messages and alarms are displayed on the operator panel in plain text with date and
time and the corresponding symbol for the cancel criterion. Alarms and messages are
displayed separately.
1. Alarms and messages in the part program:
Alarms and messages can be displayed in plain text directly from the part program.
2. Alarms and messages from PLC
Alarms and messages for the machine can be displayed in plain text from the PLC
program. No additional function block packages are required for this purpose.

Archive
Reading out of files and/or directories on an external memory device.

Asynchronous subroutine
Part program that can be started asynchronously to (independently of) the current program
status using an interrupt signal (e.g. "Rapid NC input" signal).

Automatic
Operating mode of the control (block sequence operation according to DIN): Operating mode
for NC systems in which a → subprogram is selected and executed continuously.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1723
Glossary

Auxiliary functions
Auxiliary functions enable → part programs to transfer → parameters to the → PLC, which
then trigger reactions defined by the machine manufacturer.

Axes
In accordance with their functional scope, the CNC axes are subdivided into:
● Axes: interpolating path axes
● Auxiliary axes: non-interpolating feed and positioning axes with an axis-specific feed rate.
Auxiliary axes are not involved in actual machining, e.g. tool feeder, tool magazine.

Axis address
See → Axis identifier

Axis identifier
Axes are identifed using X, Y, and Z as defined in DIN 66217 for a dextrorotatory, right-
angled → coordinate system.
Rotary axes rotating around X, Y, and Z are identified using A, B, and C. Additional axes
situated parallel to the specified axes can be designated using other letters.

Axis name
See → Axis identifier

Backlash compensation
Compensation for a mechanical machine backlash, e.g. backlash on reversal for ball screws.
Backlash compensation can be entered separately for each axis.

Backup battery
The backup battery ensures that the → user program in the → CPU is stored so that it is safe
from power failure and so that specified data areas and bit memory, timers and counters are
stored retentively.

Base axis
Axis whose setpoint or actual value position forms the basis of the calculation of a
compensation value.

Basic Functions
1724 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Basic coordinate system


Cartesian coordinate system which is mapped by transformation onto the machine
coordinate system.
The programmer uses axis names of the basic coordinate system in the → part program.
The basic coordinate system exists parallel to the → machine coordinate system if no
→ transformation is active. The difference between the two coordinate systems lies in the
→ axis identifiers.

Baud rate
Rate of data transfer (Bit/s).

Blank
Workpiece as it is before it is machined.

Block
"Block" is the term given to any files required for creating and processing programs.

Block search
For debugging purposes or following a program abort, the "Block search" function can be
used to select any location in the part program at which the program is to be started or
resumed.

Booting
Loading the system program after power ON.

C axis
Axis around which the tool spindle describes a controlled rotational and positioning
movement.

Channel
A channel is characterized by the fact that it can process a → part program independently of
other channels. A channel exclusively controls the axes and spindles assigned to it.
Part program runs of different channels can be coordinated through → synchronization.

Circular interpolation
The → tool moves on a circle between specified points on the contour at a given feed rate,
and the workpiece is thereby machined.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1725
Glossary

CNC
See → NC

COM
Component of the NC for the implementation and coordination of communication.

Compensation axis
Axis with a setpoint or actual value modified by the compensation value

Compensation memory
Data range in the control, in which the tool offset data are stored.

Compensation table
Table containing interpolation points. It provides the compensation values of the
compensation axis for selected positions on the basic axis.

Compensation value
Difference between the axis position measured by the encoder and the desired, programmed
axis position.

Connecting cables
Connecting cables are pre-assembled or user-assembled 2-wire cables with a connector at
each end. This connecting cable connects the → CPU to a → programming device or to other
CPUs by means of a → multi-point interface (MPI).

Continuous-path mode
The objective of continuous-path mode is to avoid substantial deceleration of the → path
axes at the part program block boundaries and to change to the next block at as close to the
same path velocity as possible.

Contour
Contour of the → workpiece

Contour monitoring
The following error is monitored within a definable tolerance band as a measure of contour
accuracy. An unacceptably high following error can cause the drive to become overloaded,
for example. In such cases, an alarm is output and the axes are stopped.

Basic Functions
1726 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Coordinate system
See → Machine coordinate system, → Workpiece coordinate system

CPU
Central processing unit, see → PLC

C-Spline
The C-Spline is the most well-known and widely used spline. The transitions at the
interpolation points are continuous, both tangentially and in terms of curvature. 3rd order
polynomials are used.

Curvature
The curvature k of a contour is the inverse of radius r of the nestling circle in a contour point
(k = 1/r).

Cycles
Protected subroutines for execution of repetitive machining operations on the → workpiece.

Data block
1. Data unit of the → PLC that → HIGHSTEP programs can access.
2. Data unit of the → NC: Data modules contain data definitions for global user data.
These data can be initialized directly when they are defined.

Data word
Two-byte data unit within a → data block.

Diagnosis
1. Operating area of the control.
2. The control has both a self-diagnostics program as well as test functions for servicing
purposes: status, alarm, and service displays

Dimensions specification, metric and inches


Position and lead values can be programmed in inches in the machining program.
Irrespective of the programmable dimensions (G70/G71), the controller is set to a basic
system.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1727
Glossary

DRF
Differential Resolver Function: NC function which generates an incremental zero offset in
Automatic mode in conjunction with an electronic handwheel.

Drive
The drive is the unit of the CNC that performs the speed and torque control based on the
settings of the NC.

Dynamic feedforward control


Inaccuracies in the → contour due to following errors can be practically eliminated using
dynamic, acceleration-dependent feedforward control. This results in excellent machining
accuracy even at high → path velocities. Feedforward control can be selected and
deselected on an axis-specific basis via the → part program.

Editor
The editor makes it possible to create, edit, extend, join, and import programs/texts/program
blocks.

Exact stop
When an exact stop statement is programmed, the position specified in a block is
approached exactly and, if necessary, very slowly. To reduce the approach time, → exact
stop limits are defined for rapid traverse and feed.

Exact stop limit


When all path axes reach their exact stop limits, the control responds as if it had reached its
precise destination point. A block advance of the → part program occurs.

External zero offset


Zero offset specified by the → PLC.

Basic Functions
1728 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Fast retraction from contour


When an interrupt occurs, a motion can be initiated via the CNC machining program,
enabling the tool to be quickly retracted from the workpiece contour that is currently being
machined. The retraction angle and the distance retracted can also be parameterized.
After fast retraction, an interrupt routine can also be executed (SINUMERIK 840D).

Feed override
The programmed velocity is overriden by the current velocity setting made via the → machine
control panel or from the → PLC (0 to 200%). The feedrate can also be corrected by a
programmable percentage factor (1-200%) in the machining program.

Finished-part contour
Contour of the finished workpiece. See → Raw part.

Fixed machine point


Point that is uniquely defined by the machine tool, e.g. machine reference point.

Fixed-point approach
Machine tools can approach fixed points such as a tool change point, loading point, pallet
change point, etc. in a defined way. The coordinates of these points are stored in the control.
The control moves the relevant axes in → rapid traverse, whenever possible.

Frame
A frame is an arithmetic rule that transforms one Cartesian coordinate system into another
Cartesian coordinate system. A frame contains the following components: → zero offset,
→ rotation, → scaling, → mirroring.

Functionality
The path-jerk limitation can be activated/deactivated by programming the setting data.
Parameter: Value
● Value range: TRUE, FALSE
Application:
● Part program
● Static synchronized action

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1729
Glossary

Geometry
Description of a → workpiece in the → workpiece coordinate system.

Geometry axis
Geometry axes are used to describe a 2- or 3-dimensional area in the workpiece coordinate
system.

Ground
Ground is taken as the total of all linked inactive parts of a device which will not become live
with a dangerous contact voltage even in the event of a malfunction.

Helical interpolation
The helical interpolation function is ideal for machining internal and external threads using
form milling cutters and for milling lubrication grooves.
The helix comprises two movements:
● Circular movement in one plane
● A linear movement perpendicular to this plane

High-level CNC language


The high-level language offers: → user-defined variables, → system variables, → macro
techniques.

High-speed digital inputs/outputs


The digital inputs can be used for example to start fast CNC program routines (interrupt
routines). The digital CNC outputs can be used to trigger fast, program-controlled switching
functions (SINUMERIK 840D).

HIGHSTEP
Summary of programming options for → PLCs of the AS300/AS400 system.

Basic Functions
1730 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Identifier
In accordance with DIN 66025, words are supplemented using identifiers (names) for
variables (arithmetic variables, system variables, user variables), subroutines, key words,
and words with multiple address letters. These supplements have the same meaning as the
words with respect to block format. Identifiers must be unique. It is not permissible to use the
same identifier for different objects.

Inch measuring system


Measuring system, which defines distances in inches and fractions of inches.

Inclined surface machining


Drilling and milling operations on workpiece surfaces that do not lie in the coordinate planes
of the machine can be performed easily using the function "inclined-surface machining".

Increment
Travel path length specification based on number of increments. The number of increments
can be stored as → setting data or be selected by means of a suitably labeled key (i.e. 10,
100, 1000, 10000).

Incremental dimension
Also incremental dimension: A destination for axis traversal is defined by a distance to be
covered and a direction referenced to a point already reached. See → Absolute dimension.

Intermediate blocks
Motions with selected → tool offset (G41/G42) may be interrupted by a limited number of
intermediate blocks (blocks without axis motions in the offset plane), whereby the tool offset
can still be correctly compensated for. The permissible number of intermediate blocks which
the control reads ahead can be set in system parameters.

Interpolator
Logic unit of the → NCK that defines intermediate values for the motions to be carried out in
individual axes based on information on the end positions specified in the part program.

Interpolatory compensation
Interpolatory compensation is a tool that enables manufacturing-related leadscrew error and
measuring system error compensations (SSFK, MSFK).

Interrupt routine
Interrupt routines are special → subroutines that can be started by events (external signals)
in the machining process. A part program block which is currently being worked through is
interrupted and the position of the axes at the point of interruption is automatically saved.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1731
Glossary

Inverse-time feedrate
With SINUMERIK 840D, the time required for the path of a block to be traversed can be
programmed for the axis motion instead of the feed velocity (G93).

JOG
Control operating mode (setup mode): In JOG mode, the machine can be set up. Individual
axes and spindles can be traversed in JOG mode by means of the direction keys. Additional
functions in JOG mode include: → Reference point approach, → Repos, and → Preset (set
actual value).

Key switch
The key switch on the → machine control panel has four positions that are assigned functions
by the operating system of the control. The key switch has three different colored keys that
can be removed in the specified positions.

Keywords
Words with specified notation that have a defined meaning in the programming language for
→ part programs.

KV
Servo gain factor, a control variable in a control loop.

Leading axis
The leading axis is the → gantry axis that exists from the point of view of the operator and
programmer and, thus, can be influenced like a standard NC axis.

Leadscrew error compensation


Compensation for the mechanical inaccuracies of a leadscrew participating in the feed. The
control uses stored deviation values for the compensation.

Limit speed
Maximum/minimum (spindle) speed: The maximum speed of a spindle can be limited by
specifying machine data, the → PLC or → setting data.

Linear axis
In contrast to a rotary axis, a linear axis describes a straight line.

Linear interpolation
The tool travels along a straight line to the destination point while machining the workpiece.

Basic Functions
1732 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Load memory
The load memory is the same as → RAM for the CPU 314 of the → PLC.

Look Ahead
The Look Ahead function is used to achieve an optimal machining speed by looking ahead
over an assignable number of traversing blocks.

Machine axes
Physically existent axes on the machine tool.

Machine control panel


An operator panel on a machine tool with operating elements such as keys, rotary switches,
etc., and simple indicators such as LEDs. It is used to directly influence the machine tool via
the PLC.

Machine coordinate system


A coordinate system, which is related to the axes of the machine tool.

Machine zero
Fixed point of the machine tool to which all (derived) measuring systems can be traced back.

Machining channel
A channel structure can be used to shorten idle times by means of parallel motion
sequences, e.g. moving a loading gantry simultaneously with machining. Here, a CNC
channel must be regarded as a separate CNC control system with decoding, block
preparation and interpolation.

Macro techniques
Grouping of a set of statements under a single identifier. The identifier represents the set of
consolidated statements in the program.

Main block
A block prefixed by ":" introductory block, containing all the parameters required to start
execution of a -> part program.

Main program
The → part program designated by a number or an identifer in which additional main
programs, subroutines, or → cycles can be called.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1733
Glossary

MDA
Control operating mode: Manual Data Automatic. In the MDA mode, individual program
blocks or block sequences with no reference to a main program or subroutine can be input
and executed immediately afterwards through actuation of the NC start key.

Messages
All messages programmed in the part program and → alarms detected by the system are
displayed on the operator panel in plain text with date and time and the corresponding
symbol for the cancel criterion. Alarms and messages are displayed separately.

Metric measuring system


Standardized system of units: For length, e.g. mm (millimeters), m (meters).

Mirroring
Mirroring reverses the signs of the coordinate values of a contour, with respect to an axis. It
is possible to mirror with respect to more than one axis at a time.

Mode group
Axes and spindles that are technologically related can be combined into one mode group.
Axes/spindles of a BAG can be controlled by one or more → channels. The same → mode
type is always assigned to the channels of the mode group.

Mode of operation
An operating concept on a SINUMERIK control. The following modes are defined: → Jog,
→ MDA, → Automatic.

NC
Numerical Control: Numerical control (NC) includes all components of machine tool control:
→ NCK, → PLC, HMI, → COM.

Note
A more correct term for SINUMERIK 840D controls would be: Computerized Numerical
Control

NCK
Numerical Control Kernel: Component of NC that executes the → part programs and
basically coordinates the motion operations for the machine tool.

Basic Functions
1734 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Network
A network is the connection of multiple S7-300 and other end devices, e.g. a programming
device via a → connecting cable. A data exchange takes place over the network between the
connected devices.

NRK
Numeric robotic kernel (operating system of → NCK)

NURBS
The motion control and path interpolation that occurs within the control is performed based
on NURBS (Non Uniform Rational B-Splines). As a result, a uniform process is available
within the control for all interpolations for SINUMERIK 840D.

OEM
The scope for implementing individual solutions (OEM applications) for the SINUMERIK
840D has been provided for machine manufacturers, who wish to create their own operator
interface or integrate process-oriented functions in the control.

Operator interface
The user interface (UI) is the display medium for a CNC in the form of a screen. It features
horizontal and vertical softkeys.

Oriented spindle stop


Stops the workpiece spindle in a specified angular position, e.g. in order to perform
additional machining at a particular location.

Oriented tool retraction


RETTOOL: If machining is interrupted (e.g. when a tool breaks), a program command can be
used to retract the tool in a user-specified orientation by a defined distance.

Overall reset
In the event of an overall reset, the following memories of the → CPU are deleted:
● → Work memory
● Read/write area of → load memory
● → System memory
● → Backup memory

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1735
Glossary

Override
Manual or programmable control feature, which enables the user to override programmed
feedrates or speeds in order to adapt them to a specific workpiece or material.

Part program block


Part of a → part program that is demarcated by a line feed. There are two types: → main
blocks and → subblocks.

Part program management


Part program management can be organized by → workpieces. The size of the user memory
determines the number of programs and the amount of data that can be managed. Each file
(programs and data) can be given a name consisting of a maximum of 24 alphanumeric
characters.

Path axis
Path axes include all machining axes of the → channel that are controlled by the
→ interpolator in such a way that they start, accelerate, stop, and reach their end point
simultaneously.

Path feedrate
Path feed affects → path axes. It represents the geometric sum of the feed rates of the
→ geometry axes involved.

Path velocity
The maximum programmable path velocity depends on the input resolution. For example,
with a resolution of 0.1 mm the maximum programmable path velocity is 1000 m/min.

PCIN data transfer program


PCIN is an auxiliary program for sending and receiving CNC user data (e.g. part programs,
tool offsets, etc.) via a serial interface. The PCIN program can run in MS-DOS on standard
industrial PCs.

Peripheral module
I/O modules represent the link between the CPU and the process.
I/O modules are:
● → Digital input/output modules
● → Analog input/output modules
● → Simulator modules

Basic Functions
1736 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

PLC
Programmable Logic Control: → Programmable logic controller. Component of → NC:
Programmable controller for processing the control logic of the machine tool.

PLC program memory


SINUMERIK 840D: The PLC user program, the user data and the basic PLC program are
stored together in the PLC user memory.

PLC programming
The PLC is programmed using the STEP 7 software. The STEP 7 programming software is
based on the WINDOWS standard operating system and contains the STEP 5 programming
functions with innovative enhancements.

Polar coordinates
A coordinate system, which defines the position of a point on a plane in terms of its distance
from the origin and the angle formed by the radius vector with a defined axis.

Polynomial interpolation
Polynomial interpolation enables a wide variety of curve characteristics to be generated,
such as straight line, parabolic, exponential functions (SINUMERIK 840D).

Positioning axis
Axis that performs an auxiliary movement on a machine tool (e.g. tool magazine, pallet
transport). Positioning axes are axes that do not interpolate with → path axes.

Pre-coincidence
Block change occurs already when the path distance approaches an amount equal to a
specifiable delta of the end position.

Program block
Program blocks contain the main program and subroutines of → part programs.

Programmable frames
Programmable → frames enable dynamic definition of new coordinate system output points
while the part program is being executed. A distinction is made between absolute definition
using a new frame and additive definition with reference to an existing starting point.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1737
Glossary

Programmable Logic Control


Programmable logic controllers (PLC) are electronic controls, the function of which is stored
as a program in the control unit. This means that the layout and wiring of the device do not
depend on the function of the control. The programmable logic controller has the same
structure as a computer; it consists of a CPU (central module) with memory, input/output
modules and an internal bus system. The peripherals and the programming language are
matched to the requirements of the control technology.

Programmable working area limitation


Limitation of the motion space of the tool to a space defined by programmed limitations.

Programming key
Character and character strings that have a defined meaning in the programming language
for → part programs.

Protection zone
Three-dimensional zone within the → working area into which the tool tip must not pass.

Quadrant error compensation


Contour errors at quadrant transitions, which arise as a result of changing friction conditions
on the guideways, can be virtually entirely eliminated with the quadrant error compensation.
Parameterization of the quadrant error compensation is performed by means of a circuit test.

R parameters
Arithmetic parameter that can be set or queried by the programmer of the → part program for
any purpose in the program.

Rapid traverse
The highest traverse rate of an axis. For example, rapid traverse is used when the tool
approaches the → workpiece contour from a resting position or when the tool is retracted
from the workpiece contour. The rapid traverse velocity is set on a machine-specific basis
using a machine data element.

Reference point
Machine tool position that the measuring system of the → machine axes references.

Rotary axis
Rotary axes apply a workpiece or tool rotation to a defined angular position.

Basic Functions
1738 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Rotation
Component of a → frame that defines a rotation of the coordinate system around a particular
angle.

Rounding axis
Rounding axes rotate a workpiece or tool to an angular position corresponding to an
indexing grid. When a grid index is reached, the rounding axis is "in position".

Safety functions
The control is equipped with permanently active montoring functions that detect faults in the
→ CNC, the → PLC, and the machine in a timely manner so that damage to the workpiece,
tool, or machine is largely prevented. In the event of a fault, the machining operation is
interrupted and the drives stopped. The cause of the malfunction is logged and output as an
alarm. At the same time, the PLC is notified that a CNC alarm has been triggered.

Scaling
Component of a → frame that implements axis-specific scale modifications.

Selecting
Series of statements to the NC that act in concert to produce a particular → workpiece.
Likewise, this term applies to execution of a particular machining operation on a given → raw
part.

Serial RS-232-C interface


For data input/output, the PCU 20 has one serial V.24 interface (RS232) while the
PCU 50/70 has two V.24 interfaces. Machining programs and manufacturer and user data
can be loaded and saved via these interfaces.

Setting data
Data, which communicates the properties of the machine tool to the NC, as defined by the
system software.

Softkey
A key, whose name appears on an area of the screen. The choice of soft keys displayed is
dynamically adapted to the operating situation. The freely assignable function keys (soft
keys) are assigned defined functions in the software.

Software limit switch


Software limit switches limit the traversing range of an axis and prevent an abrupt stop of the
slide at the hardware limit switch. Two value pairs can be specified for each axis and
activated separately by means of the → PLC.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1739
Glossary

Spline interpolation
With spline interpolation, the controller can generate a smooth curve characteristic from only
a few specified interpolation points of a set contour.

SRT
Transformation ratio

Standard cycles
Standard cycles are provided for machining operations, which are frequently repeated:
● for drilling/milling applications
● for turning technology
The available cycles are listed in the "Cycle support" menu in the "Program" operating area.
Once the desired machining cycle has been selected, the parameters required for assigning
values are displayed in plain text.

Subblock
Block preceded by "N" containing information for a sequence, e.g. positional data.

Subroutine
Sequence of statements of a → part program that can be called repeatedly with different
defining parameters. The subroutine is called from a main program. Every subroutine can be
protected against unauthorized read-out and display. → Cycles are a form of subroutines.

Synchronization
Statements in → part programs for coordination of sequences in different → channels at
certain machining points.

Synchronized actions
1. Auxiliary function output
During workpiece machining, technological functions (→ auxiliary functions) can be output
from the CNC program to the PLC. For example, these auxiliary functions are used to
control additional equipment for the machine tool, such as quills, grabbers, clamping
chucks, etc.
2. Fast auxiliary function output
For time-critical switching functions, the acknowledgement times for the → auxiliary
functions can be minimized and unnecessary hold points in the machining process can
be avoided.

Basic Functions
1740 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

Synchronized axes
Synchronized axes take the same time to traverse their path as the geometry axes take for
their path.

Synchronized axis
A synchronized axis is the → gantry axis whose set position is continuously derived from the
motion of the → leading axis and is, thus, moved synchronously with the leading axis.
From the point of view of the programmer and operator, the synchronized axis "does not
exist".

Syntax
$SC_IS_SD_MAX_PATH_JERK = value

System memory
The system memory is a memory in the CPU in which the following data is stored:
● Data required by the operating system
● The operands times, counters, markers

System variables
A variable that exists without any input from the programmer of a → part program. It is
defined by a data type and the variable name preceded by the character $. See → User-
defined variable.

Tapping without compensating chuck


This function allows threads to be tapped without a compensating chuck. By using the
interpolating method of the spindle as a rotary axis and the drilling axis, threads can be cut to
a precise final drilling depth, e.g. for blind hole threads (requirement: spindles in axis
operation).

Text editor
See → Editor

TOA area
The TOA area includes all tool and magazine data. By default, this area coincides with the
→ channel area with regard to the reach of the data. However, machine data can be used to
specify that multiple channels share one → TOA unit so that common tool management data
is then available to these channels.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1741
Glossary

TOA unit
Each → TOA area can have more than one TOA unit. The number of possible TOA units is
limited by the maximum number of active → channels. A TOA unit includes exactly one tool
data block and one magazine data block. In addition, a TOA unit can also contain a
toolholder data block (optional).

Tool
Active part on the machine tool that implements machining (e.g. turning tool, milling tool, drill,
LASER beam, etc.).

Tool nose radius compensation


Contour programming assumes that the tool is pointed. Because this is not actually the case
in practice, the curvature radius of the tool used must be communicated to the control which
then takes it into account. The curvature center is maintained equidistantly around the
contour, offset by the curvature radius.

Tool offset
Consideration of the tool dimensions in calculating the path.

Tool radius compensation


To directly program a desired → workpiece contour, the control must traverse an equistant
path to the programmed contour taking into account the radius of the tool that is being used
(G41/G42).

Transformation
Additive or absolute zero offset of an axis.

Traversing range
The maximum permissible travel range for linear axes is ± 9 decades. The absolute value
depends on the selected input and position control resolution and the unit of measurement
(inch or metric).

User memory
All programs and data, such as part programs, subroutines, comments, tool offsets, and zero
offsets/frames, as well as channel and program user data, can be stored in the shared CNC
user memory.

Basic Functions
1742 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Glossary

User program
User programs for the S7-300 automation systems are created using the programming
language STEP 7. The user program has a modular layout and consists of individual blocks.
The basic block types are:
● Code blocks
These blocks contain the STEP 7 commands.
● Data blocks
These blocks contain constants and variables for the STEP 7 program.

User-defined variable
Users can declare their own variables for any purpose in the → part program or data block
(global user data). A definition contains a data type specification and the variable name. See
→ System variable.

Variable definition
A variable definition includes the specification of a data type and a variable name. The
variable names can be used to access the value of the variables.

Velocity control
In order to achieve an acceptable traverse rate in the case of very slight motions per block,
an anticipatory evaluation over several blocks (→ Look Ahead) can be specified.

WinSCP
WinSCP is a freely available open source program for Windows for the transfer of files.

Working area
Three-dimensional zone into which the tool tip can be moved on account of the physical
design of the machine tool. See → Protection zone.

Working area limitation


With the aid of the working area limitation, the traversing range of the axes can be further
restricted in addition to the limit switches. One value pair per axis may be used to describe
the protected working area.

Working memory
RAM is a work memory in the → CPU that the processor accesses when processing the
application program.

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1743
Glossary

Workpiece
Part to be made/machined by the machine tool.

Workpiece contour
Set contour of the → workpiece to be created or machined.

Workpiece coordinate system


The workpiece coordinate system has its starting point in the → workpiece zero-point. In
machining operations programmed in the workpiece coordinate system, the dimensions and
directions refer to this system.

Workpiece zero
The workpiece zero is the starting point for the → workpiece coordinate system. It is defined
in terms of distances to the → machine zero.

Zero offset
Specifies a new reference point for a coordinate system through reference to an existing
zero point and a → frame.
1. Settable
SINUMERIK 840D: A configurable number of settable zero offsets are available for each
CNC axis. The offsets - which are selected by means of G functions - take effect
alternately.
2. External
In addition to all the offsets which define the position of the workpiece zero, an external
zero offset can be overridden by means of the handwheel (DRF offset) or from the PLC.
3. Programmable
Zero offsets can be programmed for all path and positioning axes using the TRANS
statement.

Basic Functions
1744 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

$AN_AUXFU_LIST_ENDINDEX, 487
$AN_AUXFU_LIST_GROUPINDEX, 484
$ $AN_POWERON_TIME, 712
$AN_SETUP_TIME, 712
$A_MONIFACT, 1546
$C_AUX_EXT, 685
$AA_ATOL, 218
$C_AUX_IS_QUICK, 685
$AA_ETRANS, 836
$C_AUX_VALUE, 685
$AA_FGREF, 380
$C_D, 691
$AA_FGROUP, 381
$C_D_PROG, 691
$AA_S, 1214
$C_DL, 691
$AC_ACT_PROG_NET_TIME, 713
$C_DL_PROG, 691
$AC_ACTUAL_PARTS, 718
$C_M, 685, 691
$AC_ASUP, 649
$C_M_PROG, 685, 691
$AC_AUXFU_EXT, 497
$C_ME, 685, 691
$AC_AUXFU_M_EXT, 497
$C_T, 691
$AC_AUXFU_M_STATE, 497
$C_T_PROG, 691
$AC_AUXFU_M_TICK, 477
$C_TE, 691
$AC_AUXFU_M_VALUE, 497
$C_TS, 691
$AC_AUXFU_PREDEF_INDEX, 482, 496
$C_TS_PROG, 691
$AC_AUXFU_SPEC, 494, 497
$P_AD[10], 1488
$AC_AUXFU_STATE, 497
$P_AD[11], 1488
$AC_AUXFU_TICK, 483
$P_AD[2], 1488
$AC_AUXFU_TYPE, 497
$P_AD[24], 1488
$AC_AUXFU_VALUE, 497
$P_CHANNO, 626
$AC_CTOL, 218
$P_CTOL, 219
$AC_CUT_INV, 1487
$P_CUT_INV, 1487
$AC_CUTMOD, 1487
$P_CUTMOD, 1487
$AC_CUTMOD_ANG, 1481, 1487
$P_CUTMOD_ANG, 1481, 1487
$AC_CUTTING_TIME, 715
$P_FGROUP_MASK, 381
$AC_CYCLE_TIME, 715
$P_GEAR, 1282
$AC_FGROUP_MASK, 381
$P_OTOL, 219
$AC_OLD_PROG_NET_TIME, 713
$P_PROG_EVENT, 626
$AC_OLD_PROG_NET_TIME_COUNT, 713
$P_REPINF, 644
$AC_OPERATING_TIME, 715
$P_SEARCH_S, 480, 545
$AC_OTOL, 218
$P_SEARCH_SDIR, 480, 545
$AC_PATHACC, 238, 250
$P_SEARCH_SGEAR, 480, 545
$AC_PATHJERK, 249, 250, 251
$P_SEARCH_SPOS, 480, 545
$AC_PROG_NET_TIME_TRIGGER, 713
$P_SEARCH_SPOSMODE, 480, 545
$AC_REQUIRED_PARTS, 718
$P_SUB_AUTOGEAR, 700
$AC_SGEAR, 1282
$P_SUB_AXFCT, 700, 704
$AC_SPECIAL_PARTS, 718
$P_SUB_CA, 700, 704
$AC_TOTAL_PARTS, 718
$P_SUB_GEAR, 700
$AC_WORKAREA_CS_COORD_SYSTEM, 111
$P_SUB_LA, 700, 704
$AC_WORKAREA_CS_LIMIT_MINUS, 111
$P_SUB_M19, 704
$AC_WORKAREA_CS_LIMIT_PLUS, 111
$P_SUB_SPOS, 704
$AC_WORKAREA_CS_MINUS_ENABLE, 111
$P_SUB_SPOSA, 704
$AC_WORKAREA_CS_PLUS_ENABLE, 111
$P_SUB_SPOSIT, 704
$AN_AUXFU_LIST_CHANNO, 484

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1745
Index

$P_SUB_SPOSMODE, 704 A
$P_SUB_STAT, 688
ACC, 1278
$P_TOOLENV, 1534
ACC[axis], 234
$P_TOOLENVN, 1534
Acceleration correction
$PA_ATOL, 219
in the part program/synchronized action, 1349
$PA_FGREF, 380
Access authorization, 61
$PA_FGROUP, 381
Access features, 62
$SC_IS_SD_MAX_PATH_ACCEL, 236
Access security, 61
$SC_IS_SD_MAX_PATH_JERK, 249
Acknowledgment
$SC_SD_MAX_PATH_ACCEL, 236
Normal, 450
$SC_SD_MAX_PATH_JERK, 248
Quick, 451
$TC_DP1, 1477
ACN, 1277
$TC_DP10, 1479
ACP, 1277
$TC_DP11, 1478
Action blocks, 542
$TC_DP2, 1478, 1482
Action single block, 535
$TC_DP24, 1479
Activating
$TC_DPCE[t,d], 1373
from machine control panel, hand-held unit, 953
$TC_DPNT, 1307
Actual value synchronization, 44
$VA_ABSOLUTE_ENC_ERR_CNT, 98
Actual value in workpiece coordinate system, 35
$VA_ABSOLUTE_ENC_STATE, 98
Actual-value acquisition, 382
$VA_ABSOLUTE_ENC_ZERO_MON_MAX, 98
Actual-value correction, 384
$VA_DPE, 430
Actual-value processing, 393, 412, 416
$VA_ENC_ZERO_MON_ACT, 98
Actual-value resolution, 396
$VA_ENC_ZERO_MON_ERR_CNT, 98
Actual-value routing, 384
Actual-value system
Workpiece-related, 856
_ Adaptation factor
_N_PROG_EVENT_SPF, 546, 621 Dynamic path response, 195
Adapter dimension, 1402
Adapting the motor/load ratios, 390
3 ADDFRAME, 834
Adjustments to actual-value resolution, 399
3D-face milling, 1400
AG_SEND, AG_RECV, 942
Air temperature alarm, 33
Alarm for preprocessing stop, 1442
6 ALF, 644
611D commissioning tool, 308 Angle
611D Ready, 32 Clearance, 1479
Holder, 1479
ANY, 1135
8 ANY in FB, 1136
ANY in FC, 1135
840D sl
AS, 915
Ethernet connection, 954
Assignment tool/toolholder, 1448
840D with integrated PLC
ASUB
Data exchange with the control panel, 915
Activating, 635
Interface HMI/PLC, 917
after block search with calculation, 543
Interface MCP/PLC and HHU/PLC, 917
At the end of the SERUPRO, 487
NCK/PLC interface, 916
Internal, 647
Priority, 644
Reorganization, 635
ASUBs, 940

Basic Functions
1746 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

At the end of the SERUPRO Cascaded, 541


ASUB, 487 Time sequence of types 1, 2 and 4, 541
ATOL, 217 with calculation at block end point (type 4), 540
ATRANS, 735 with calculation at the contour (type 2), 540
Autonomous single-axis operations, 590 with calculation in program test mode, SERUPRO
AUXFUDEL, 488 (type 5), 540
AUXFUDELG, 488 without calculation (type 1), 540
AUXFUMSEQ, 478 Block search SERUPRO, 554
AUXFUSYNC, 487 Automatic interrupt pointer, 581
Auxiliary function Conditions for axis functions, 589
Associated, 461 Control REPOS with VDI interface signals, 566
Counter, 483 Coupled axes, 588
Group, 448 Definition SERUPRO ASUB, 556
Output behavior, 450 Definition SERUPRO operation, 556
Auxiliary Function Delayed approach of axis with REPOS offset, 563
Address extension, 449 Gear stage change, 591
Definition, 438 Initial setting, 592
Predefined, 437 Master-slave, 587
Type, 448 Overlaid movements, 591
User-defined, 437 Path axes, 564
Value, 449 Prefer or ignore REPOS, 563
Auxiliary function output, 597 Programmable interrupt pointer, 577
Auxiliary functions REPOS acknowledgments, 566
Pre-defined, 445 REPOS offset after an axis replacement, 569
User-specific, 458 REPOS offset with synchronous spindle
Axis clamping, 84 coupling, 569
Axis configuration, 751 REPOS operation, 560
Axis disable, 37 Reposition positioning axes, 563
Axis monitoring, 77 Repositioning with controlled REPOS, 561
Axis monitoring functions Set REPOS response, 561
Actual velocity, 93 Setpoint and actual value couplings, 586
Axis/spindle-specific setting data, 150 Supported functions, 554, 584
Constraints, 134 System variable for recognition, 593
Following error, 79 Time sequence, 555
Speed setpoint, 92 Updating the REPOS offset within the scope, 568
Zero speed, 83 Block search with calculation
Axis/spindle disable DB31, ... DBX1.3, 1330 Accumulated spindle functions, 545
Axis/spindle stops, 47 Collected actual position, 543
Current actual position, 543
Block-related limit (FOC), 337
B BLSYNC, 644
BRISK, 231
BAG, 935
BRISKA, 231
Basic block display
Activating, 663
Configure, 663
Basic coordinate system (BCS), 733, 765
C
Basic display Cancel alarms, 35
Size of display buffer, 663 Cascaded block search, 548
Basic orientation of tool, example, 1551 CFC, 1305
Basic orientation of tools, 1494 CFCIN, 1305
Basic tool orientation, 1493 CFINE, 735
Block search CFTCP, 1305

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1747
Index

Channel at the start of the part program, 674


Configuration, 529 during power-up, 674
Current, 626 when resetting:, 674
Display status, 605 Controller parameter set switchover, 66
Initial setting, 596 Conversion of basic system, 374
Path interpolator, 528 Counter pulse, 720
Properties, 528 CTOL, 217
Statuses, 605 CTRANS, 735
Channel axes, 741 Current controller active, 48
Channel axis identifiers with FXS, 316 Curvature, 206
Channel status Cut direction, 1478
Channel active, 523 Cutting edge
Channel interrupted, 523 Center point, 1481
Channel reset, 523 Position, 1478, 1482
Channel-specific basic position after power up, Reference point, 1481
RESET, 884 Shape, 1480
Channel-specific diameter programming, 885 Cutting edge number, 1373
Channel-specific NCK alarm is active, 33 Cutting edge position, 1396
Clamping monitoring, 84 Relevant, 1405
Clearance angle, 1479 Cyclic operation, 934
Closed-loop control, 407 Cyclic signal exchange, 30
CLRINT, 645
Collision detection, 1434
Communication log, 306 D
COMPCAD, 210
D functions, 442, 1367
COMPCURV, 210
D number structure
Compensation number, 1373
flat (without tool management), 1383
COMPOF, 213
D numbers
COMPON, 210
Allocation of free ..., 1372
Compression mode, 211
D/DL function replacement, 686
Computational resolution, 363
Darken screen, 34
Concurrent axes, 940
Data channel, faster, 58
Configuration of drives, 389
Data interface, 918
Constant curvature, 1408
DB 31, ...
Constant cutting rate, 883
DBB16-19, 1231
Constant cutting rate (G96), 1308
DBB82-91, 1231
Constant cutting rate G96, G961, G962
DBX1.1, 340, 346, 348
Geometry axis as transverse axis, 1310
DBX1.2, 348
Interrupts, 1312
DBX1.3, 1290
Constant speed G97, G971, 1310
DBX1.5, 94
Constant tangent, 1408
DBX1.6, 94
Continuous-path mode, 162
DBX12.0, 103
Implicit, 165
DBX12.1, 103
Contour
DBX12.2, 104
Sampling factor, 208
DBX12.3, 104
Sampling time, 208
DBX16.0-16.2, 1246, 1251, 1252, 1253, 1254,
Tolerance, 216
1262, 1265
Contour error, 78
DBX16.3, 1246, 1251, 1253, 1260, 1262, 1265
Contrast, 53
DBX16.7, 1290
Control direction, 393
DBX17.0, 1268
Control system response
DBX17.4/17.5, 1264
at the end of the part program, 674
DBX18.4, 1259, 1260, 1265

Basic Functions
1748 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

DBX18.5, 1246, 1259, 1260, 1261, 1265, 1290 DBX109.6, 33, 1571
DBX18.6, 1260 DBX109.7, 33, 1571
DBX18.7, 1260 DBX180.2, 1568
DBX2.1, 1265, 1290 DBX56.1, 43, 600, 875, 877, 879, 1676
DBX2.2, 1214, 1290 DBX56.2, 875, 878, 1676
DBX3.1, 340, 346, 347 DBX56.4, 64
DBX4.3, 1260, 1290 DBX56.4 - DBX56.7, 1566
DBX60.0, 1231 DBX56.5, 64
DBX60.2, 1291 DBX56.6, 64
DBX60.3, 1291 DBX56.7, 64
DBX60.4, 102, 1170, 1291 DBX92.0, 937
DBX60.4/60.5, 1255, 1261, 1262, 1264, 1265 DBX92.1, 937
DBX60.5, 102, 1170, 1291 DB11
DBX60.6, 83, 1293 DBX0.0, 521, 524, 1643
DBX60.7, 83, 1293 DBX0.1, 521, 1149, 1152, 1643
DBX61.4, 1214, 1286 DBX0.2, 521, 1149, 1152, 1643
DBX61.5, 1261, 1265 DBX0.4, 527, 1644
DBX62.4, 322, 328, 347, 349 DBX0.5, 519, 1644
DBX62.5, 322, 328, 345 DBX0.6, 519, 1645
DBX64.6, 83 DBX0.7, 519, 603, 878, 1151, 1153, 1154, 1645
DBX64.7, 83 DBX07.7, 600
DBX7.7, 1290 DBX1.0, 1646
DBX70.0, 592 DBX1.0-1.2, 522
DBX70.1, 592 DBX1.1, 1646
DBX82.0-82.2, 1245, 1248, 1249, 1251, 1258, 1261 DBX1.2, 1149, 1152, 1646
DBX82.3, 1246, 1248, 1249, 1258, 1261, 1262 DBX1.6, 657, 1647
DBX83.1, 1214, 1226, 1248, 1250, 1287, 1290 DBX1.7, 656, 1647
DBX83.2, 1287, 1290 DBX26.4, 525
DBX83.5, 1214, 1219, 1287 DBX26.5, 525
DBX84.5, 1264 DBX4.0, 1648
DBX84.6, 1261 DBX4.0-4.2, 521
DBX84.7, 1246, 1265 DBX4.1, 1648
DB10 DBX4.2, 1648
DBB4-7, 877 DBX4.4, 600
DBB71, 376 DBX46.4, 525
DBX103.0, 1567 DBX46.5, 525
DBX103.0, 33 DBX5.0, 1648
DBX103.5, 1567 DBX5.0-5.2, 522
DBX103.6, 1567 DBX5.1, 1649
DBX103.7, 1567 DBX5.2, 1649
DBX104.3, 955 DBX6.0, 521, 525, 1650
DBX104.4, 955 DBX6.1, 521, 525, 1650
DBX104.7, 32, 938, 1568 DBX6.2, 521, 525, 1650
DBX106.1, 876, 878, 879, 1677 DBX6.3, 519, 876, 879, 1650
DBX107.7, 376 DBX6.4, 525
DBX108.1, 32, 1568 DBX6.5, 525
DBX108.2, 32 DBX6.7, 519, 1651
DBX108.3, 32, 1568 DBX7.0, 525, 1651
DBX108.6, 32, 1569 DBX7.0-7.2, 522
DBX108.7, 32, 1569 DBX7.1, 525, 1652
DBX109.0, 33, 1570 DBX7.2, 525, 1652
DBX109.5, 1570 DB19

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1749
Index

DBB12, 35, 1578 DBX16.3, 1579


DBB13, 35, 1579 DBX16.4, 1579
DBB14, 35 DBX16.5, 1579
DBB15, 35 DBX16.6, 1579
DBB16, 35 DBX16.7, 1579
DBB17, 35, 36 DBX17.0, 1579
DBB2, 1574 DBX17.1, 1579
DBB24, 36 DBX17.2, 1579
DBB25, 36 DBX17.3, 1579
DBB26, 36 DBX17.4, 1579
DBB27, 36 DBX17.5, 1579
DBB4, 1574 DBX17.6, 1579
DBX 0.3, 35 DBX17.7, 1579
DBX 0.4, 35 DBX20.1, 1581
DBX0.0, 34, 1572 DBX20.3, 35, 1573, 1581
DBX0.1, 34, 1572 DBX20.4, 35, 1573, 1581
DBX0.2, 34, 1573 DBX20.6, 1581
DBX0.3, 1573 DBX20.7, 1574, 1582
DBX0.4, 1573 DBX22.0 - DBX22.7, 1582
DBX0.7, 35, 1574 DBX24.0, 1582
DBX10.0, 1575 DBX24.1, 1583
DBX10.1, 1575 DBX24.2, 1583
DBX10.2, 1575 DBX24.3, 1583
DBX10.7, 1575 DBX24.4, 1584
DBX12.2, 1575 DBX24.5, 1584
DBX12.3, 1576 DBX24.6, 1584
DBX12.4, 1576 DBX24.7, 1585
DBX12.5, 1576 DBX25.0 - DBX25.7, 1585
DBX12.6, 1576 DBX26.1, 1585
DBX12.7, 1577 DBX26.2, 1586
DBX13.5, 1577 DBX26.3, 1586
DBX13.6, 1577 DBX26.5, 1586
DBX13.7, 1577 DBX26.6, 1586
DBX14.0, 1578 DBX26.7, 1587
DBX14.1, 1578 DBX27.0 - DBX27.7, 1587
DBX14.2, 1578 DBX40.0 - DBX40.7, 1587
DBX14.3, 1578 DBX41.0 - DBX41.7, 1587
DBX14.4, 1578 DBX42.0, 1588
DBX14.5, 1578 DBX44.0, 1579
DBX14.6, 1578 DBX45.0, 1580
DBX14.7, 1578 DBX45.1, 1580
DBX15.0, 1578 DBX45.2, 1580
DBX15.1, 1578 DBX45.3, 1580
DBX15.2, 1578 DBX6.0, 1574
DBX15.3, 1578 DBX6.1, 1574
DBX15.4, 1578 DBX6.2, 1574
DBX15.5, 1578 DBX6.3, 1574
DBX15.6, 1578 DBX6.4, 1574
DBX15.7, 1578 DBX6.5, 1574
DBX16.0, 1579 DBX6.6, 1574
DBX16.1, 1579 DBX6.7, 1574
DBX16.2, 1579 DBX7.0, 1574

Basic Functions
1750 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

DBX7.1, 1574 DBX2.1, 659


DBX7.2, 1574 DBX2.2, 659
DBX7.3, 1574 DBX2.3, 659
DBX7.4, 1574 DBX2.4, 659
DBX7.5, 1574 DBX2.5, 659
DBX7.6, 1574 DBX2.6, 659
DBX7.7, 1574 DBX2.7, 659
DBX8.0, 1574 DBX20.3, 1703
DBX8.1, 1574 DBX24.6, 538, 1703
DBX8.2, 1574 DBX25.3, 1704
DBX8.3, 1574 DBX25.7, 533
DBX8.4, 1574 DBX26.0, 539
DBX8.5, 1574 DBX272.0 - DBX273.1, 1628
DBX8.6, 1574 DBX272.0 to 273.1, 125
DBX8.7, 1574 DBX274.0 - DBX275.1, 1628
DB21, ... DBX274.0 to 275.1, 125
D35.5, 601 DBX276.0 - DBX277.1, 1629
DBB116 - DBB136, 470 DBX276.0 to DBX277.1, 126
DBB118 - DBB119, 1639 DBX278.0 - DBX279.1, 1629
DBB129, 1640 DBX278.0 to DBX279.1, 126
DBB140 - DBB157, 1640 DBX29.0 - DBX29.3, 1704
DBB140 - DBB190, 470 DBX30.5, 462, 1637
DBB158 - DBB193, 1641 DBX31.0 - DBX31.2, 1657
DBB194, 1279 DBX31.0-31.2, 564, 566, 571
DBB194 - DBB206, 470, 1641 DBX31.4, 563, 564, 565, 566, 1658
DBB202, 1279 DBX31.6, 659
DBB208 - DBB271, 1667 DBX31.7, 659
DBB35, 555 DBX310.1-319.3, 566, 568
DBB376, 620, 1671 DBX318.0, 637, 1667
DBB4, 1697 DBX318.1, 558, 1668
DBB5, 1699 DBX318.5, 462, 1642
DBB58, 1637 DBX318.7, 1589
DBB58 - DBB67, 470 DBX319.0, 565, 566, 1669
DBB60 - DBB64, 1638 DBX319.1- DBX319.3, 1669
DBB60 - DBB65, 1637 DBX319.1-319.3, 565
DBB66 - DBB67, 1638 DBX319.5, 566, 569, 1671
DBB68 - DBB112, 470 DBX32.3, 542, 1658
DBB68 - DBB97, 1638 DBX32.4, 542, 543, 1658
DBB68ff., 1279 DBX32.5, 1659
DBB98 - DBB115, 1639 DBX32.6, 480, 542, 1659
DBX0.4, 536, 1652 DBX33.0, 1152, 1679
DBX0.5, 1653 DBX33.4, 542, 1660
DBX0.6, 538, 1697 DBX33.5, 1660
DBX1.0, 1152, 1679 DBX33.6, 1661
DBX1.1, 1627 DBX33.7, 534, 1662
DBX1.6, 542, 544, 1653 DBX35.0, 601, 604, 1662
DBX1.7, 533, 600, 1654 DBX35.1, 604, 1663
DBX10.0 - DBX11.1, 1627 DBX35.2, 604, 1663
DBX10.0 to DBX11.1, 126 DBX35.3, 536, 602, 604, 1663
DBX12.3, 1703 DBX35.4, 604, 620, 1664
DBX16.3, 1703 DBX35.5, 601, 605, 1664
DBX2.0, 539, 601, 659, 1654 DBX35.6, 600, 605, 1664

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1751
Index

DBX35.7, 600, 603, 605, 620, 1665 DBX1.5, 42, 94, 383, 1154, 1168, 1241
DBX36.2, 1150, 1153, 1680 DBX1.5 - DBX1.6, 1594
DBX36.3, 1632 DBX1.6, 42, 94, 383, 1154, 1168, 1241
DBX36.4, 1665 DBX1.7, 1706
DBX36.5, 1665 DBX10.0, 561, 563, 564, 565, 566, 567, 571, 1672
DBX36.6, 33, 544, 1570, 1589 DBX12.0 - DBX12.1, 1630
DBX36.7, 33, 544, 1570, 1589 DBX12.2 - DBX12.3, 1630
DBX37.6, 1666 DBX12.7, 1158, 1159, 1160, 1161, 1681
DBX37.7, 1666 DBX16.0, 285
DBX378.0, 1671 DBX16.0 - 16.2, 412
DBX378.1, 1672 DBX16.0 - DBX16.2, 1685
DBX384.0, 609, 1672 DBX16.0-16.2, 1215
DBX59.0 - DBX59.4, 1638 DBX16.1, 285
DBX6.0, 1701 DBX16.2, 285
DBX6.1, 1219, 1250, 1654 DBX16.3, 1211, 1215, 1252, 1269, 1686
DBX6.2, 36, 1588 DBX16.4, 1241
DBX6.4, 1655 DBX16.4 - DBX16.5, 1686
DBX6.6, 1701 DBX16.5, 1241
DBX6.7, 1702 DBX16.7, 1687
DBX7.0, 600, 1655 DBX17.4 - DBX17.5, 1687
DBX7.1, 534, 542, 602, 1655 DBX17.6, 1687
DBX7.2, 600, 601, 1656 DBX18.4, 1688
DBX7.3, 600, 601, 1656 DBX18.5, 1215, 1689
DBX7.4, 600, 601, 1252, 1290, 1657 DBX18.6 - DBX18.7, 1690
DBX7.5, 532 DBX2.1, 37, 38, 40, 41, 43, 1154, 1168, 1186, 1597
DBX7.7, 600, 603, 878, 1151, 1153, 1154, 1231, DBX2.2, 45, 85, 542, 562, 1222, 1252, 1598, 1684
1657 DBX2.3, 84, 91, 1629
DBX8.0 - DBX9.1, 1627 DBX2.4 - DBX2.7, 1680
DBX8.0 to DBX9.1, 126 DBX2.4/ .5/ .6/ .7, 1166
DB21, … DBX20.0, 1600
DBX378.0, 635 DBX20.1, 48, 1253, 1600
DBX378.1, 642 DBX20.2, 48, 1601
DB31, ... DBX20.3, 48, 296, 1601
DBB0, 1704 DBX21.0, 48, 297
DBB1.5, 1200 DBX21.0 - DBX21.2, 1602
DBB1.6, 1200 DBX21.1, 48, 297
DBB19, 1708 DBX21.2, 48, 297
DBB2.1, 1200 DBX21.3, 49, 297
DBB60.4, 1181, 1192, 1195 DBX21.3 - DBX21.4, 1603
DBB60.5, 1181, 1192, 1195 DBX21.4, 49, 297
DBB68ff., 1279 DBX21.5, 49, 1603
DBB78 - DBB81, 1710 DBX21.6, 49, 1604
DBB86 - DBB87, 1696 DBX21.7, 43, 49, 293, 1604
DBB88 - DBB91, 1696 DBX28.7, 531
DBD 78, 1642 DBX3.0, 836, 872, 1675
DBD86, 1642 DBX3.1, 1635
DBD88, 1642 DBX3.2 - DBX3.5, 1707
DBX1.0, 36, 47, 1590 DBX3.6, 1630
DBX1.1, 1634 DBX3.7, 589
DBX1.2, 1634 DBX39.0, 127, 128, 129, 130
DBX1.3, 37, 1590 DBX4.3, 1707
DBX1.4, 37, 38, 40, 41, 44, 84, 91, 1186, 1593 DBX4.6, 1149

Basic Functions
1752 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

DBX4.7, 1149 DBX9.1, 46, 48, 66


DBX60.0, 1690 DBX9.2, 46, 48, 66
DBX60.2, 95 DBX9.3, 47, 1599
DBX60.2 - DBX60.3, 1631 DBX92.0, 50, 296, 1609
DBX60.3, 95 DBX92.1, 50, 293, 1609
DBX60.4, 41, 286, 1150, 1151, 1153, 1154, 1166, DBX92.2, 50, 296, 1610
1170, 1178, 1183, 1186, 1187, 1681 DBX92.3, 50, 296, 1610
DBX60.5, 41, 286, 879, 1150, 1151, 1153, 1154, DBX93.0, 48, 50, 297
1166, 1170, 1178, 1183, 1186, 1187, 1682 DBX93.0 - DBX93.2, 1611
DBX60.6, 41, 91, 534, 1219, 1226, 1229, 1230, DBX93.1, 48, 50, 297
1632 DBX93.2, 48, 50, 297
DBX60.7, 41, 91, 534, 1169, 1226, 1229, 1230, DBX93.3, 50, 298
1269, 1633 DBX93.3 - DBX93.4, 1611
DBX61.0, 36, 47, 1605 DBX93.4, 50, 298
DBX61.3, 38, 47, 1185, 1186, 1605 DBX93.5, 32, 43, 51, 294, 1569, 1612
DBX61.4, 46, 47, 1186, 1215, 1221, 1246, 1606 DBX93.6, 49, 51, 296, 1613
DBX61.5, 43, 44, 47, 1213, 1606 DBX93.7, 50, 51, 294, 1614
DBX61.6, 44, 47, 1607 DBX94.0, 51, 299, 1616
DBX61.7, 48, 1608 DBX94.1, 51, 299, 1617
DBX62.2, 1308, 1710 DBX94.2, 51, 299, 1618
DBX62.4, 1635 DBX94.3, 51, 300, 1620
DBX62.5, 286, 1636 DBX94.4, 52, 300, 1622
DBX64.6, 475 DBX94.5, 52, 300, 1622
DBX64.7, 475 DBX94.6, 52, 300, 1623
DBX69.0, 48, 67 DBX94.7, 52, 1624
DBX69.0 - DBX69.2, 1608 DBX95.0, 52, 1625
DBX69.0-69.2, 1254 DBX95.7, 52, 298, 1626
DBX69.1, 48, 67 DC, 1277
DBX69.2, 48, 67 DC link undervoltage warning threshold, 52
DBX70.0, 566, 568, 1673 DC link voltage, 52
DBX70.1, 566, 568, 1673 DClink, 52
DBX70.2, 566, 567, 568, 1673 Decoding single block, 535
DBX71.4, 1682 Default passwords, 63
DBX71.5, 1683 Delete distance-to-go, 36, 1339
DBX72.0, 566, 1674 DELTOOLENV, 1533
DBX76.0, 48, 1609 Description of a rotation, 1459
DBX76.4, 566, 569, 1674 DIACYCOFA[axis], 886
DBX82.0 - DBX82.2, 1691 Diagnostic tools (D1), 275
DBX82.0-82.2, 1265, 1267, 1281 Interrupts, 277
DBX82.3, 1258, 1265, 1267, 1282, 1691 Diagnostics, 281
DBX83.0, 1692 DIAM90, 885
DBX83.1, 1281, 1692 DIAM90/DIAM90A[AX], 887
DBX83.2, 1248, 1250, 1281, 1692 DIAM90A[axis], 886
DBX83.5, 1215, 1221, 1693 DIAMCHAN, 886
DBX83.7, 1693 DIAMCHANA[axis], 886
DBX84.3, 1694 DIAMCYCOF, 885
DBX84.5, 1269, 1694 DIAMCYCOF/DIACYCOFA[AX], 887
DBX84.6, 1211, 1258, 1265, 1267, 1269, 1695 DIAMOF, 885
DBX84.7, 1213, 1695 DIAMOFA[axis], 886
DBX85.5, 1695 DIAMON, 885
DBX9.0, 46, 48, 66 DIAMON/DIAMONA[AX], 887
DBX9.0 - DBX9.2, 1599 DIAMONA[axis], 886

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1753
Index

Direct control key Implicit, 162


Address, 955 Exact-stop criteria, 158, 159
Interrupts, 955 Execute external subroutine, 669
OPs at Ethernet Bus, 955 External program memory, 669
Direction vector, 1494
Dirt deposits, 101
DISABLE, 645 F
DISC, 1429
F functions, 443
Display block, structure (DIN), 665
FA, 1278
Display of actual values as a diameter, 889
FA functions, 443
Display of remaining path in WCS always as a
FB1 RUN_UP (Basic program, start-up section), 984
radius, 888
FB10 Safety relay, 1044
Display resolution, 53, 363
FB11 Brake test, 1047
Displaying position values in the diameter, 889
FB2 GET (Read NC Variable), 992
DL functions, 442
FB29 Signal recorder and data trigger
DRF-traveling with handwheel, 888
diagnostics, 1052
DRIVE, 263
FB3 PUT (write NC variables), 999
Drive configuration, 389
FB4 PI_SERV (PI services), 1006
DRIVEA, 263
Available PI services, 1009
Drive-test travel enable, 36
General PI services, 1010
Drive-test travel request, 47
PI services tool management, 1014
Dry run feedrate, 537, 1336
FB5 GETGUD (read GUD variable), 1028
Dynamic response
FB7 PI_SERV2 (PI services), 1035
Adaptation, 194
FB9 MzuN (control units switchover), 1039
Dynamic response adaptation, 409
FC10 AL_MSG, 1074
Dynamic response of an axis/spindle, 1347
FC12 AUXFU, 1076
DYNFINISH, 203
FC13 BHGDisp, 1077
DYNNORM, 203
FC17 YDelta, 1082
DYNPOS, 203
FC18 SpinCtrl, 1085
DYNROUGH, 203
FC19/MCP_IFM, 1096
DYNSEMIFIN, 203
FC2 GP_HP (Basic program, cyclic section), 1056
FC21 Transfer, 1103
FC22 TM_DIR, 1111
E FC24 MCP_IFM2, 1113
EMERGENCY STOP FC25/MCP_IFT, 1117
Acknowledgment, 878 FC3 GP_PRAL (Basic program, diagnostics), 1060
Interface, 875 FC3 GP_PRAL (Basic program, interrupt-driven
Sequence, 876 section), 1057
Emergency stop control elements, 875 FC7 TM_REV, 1061
ENABLE, 645 FC8 TM_TRANS, 1065
Encoder coding, 398 FC9 ASUP, 1072
Encoder directly on tool, 392 Feed
Encoder monitoring functions, 94 for chamfer/rounding, 1345
Encoder frequency, 94 Non-modal, 1346
Encoder type, 95 Override switch, 1330
Zero marks, 95, 96 Types, 1301
End-of-motion criterion Feedrate
Programmable in program/synchronized Inverse-time (G93), 1306
action, 1351 Linear (G94), 1306
Evaluation of individual wear components, 1528 Path feedrate F, 1304
Event-controlled program sequences, 616 Revolutional (G95), 1307
Exact stop, 157 Tooth, 1307

Basic Functions
1754 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

Types (G93, G94, G95), 1306 G451, 1430


Feedrates G460, 1444
Dry run feedrate, 1336 G461, 1365, 1445
Feed disable, 1329 G462, 1365, 1446
Feed override, 1335 G58, 735
Feedrate control, 1328 G59, 735
Feedrate override, 1330 G60, 157
Feedrate/spindle stop, 1329 G601, 159
Feedrates in one block, 1338 G602, 159
Rigid tapping G331/G332, 1324 G603, 159
Spindle override, 1333 G64, 165
Thread cutting G33, 1313 G642, 171
FGROUP, 747, 749 G643, 171
FIFO Buffer, 670 G644, 175
Fine Interpolation, 408 G645, 179
Fine offset, 735 G9, 157
FIPO, 408 G91 extension, 1490
Fixed feedrate values, 1343 Zero point offset, 1491
FL, 1305 G93, 1306
Flat D number structure, 1383 G94, 1306
Follow-up mode active, 47 G95, 1307
Foreground language, 53 G96, G961, G97, G971, 1308
FPRAOF, 1277 Gap, 518
FPRAON, 1277 Gear step
FRAME, 741 in M70, 1270
Frame change, 1450 Manual entry, 1251
Frame rotations, 736 Specification by PLC, 1250
in the direction of the tool, 842 Gear steps, 1242
with solid angles, 841 Geometry axes, 741, 746, 765
Free-form surface Geometry axes during handwheel traveling, 889
Mode, 154 GETTCOR, 1536
Free-form surfaces, 207 Compatibility, 1541
Mode, 206 Orientable toolholder, 1540
Function interface, 919 GETTENV, 1535
Function overview of inch/metric switchover GOTOS, 610
Data backup, 378 Grouping together auxiliary functions, 449
Rounding machine data, 378
Synchronized actions, 372
Function selection (via operator panel front or H
PLC), 658
H functions, 441
FXS REPOS, 329
Hardware faults, 101
FZ, 1307
Hardware interrupt, 937
Hardware limit switches, 103
Helical interpolation, 750
G Helix interpolation, 750
G groups, 597 High-speed data channel, 58
G25, 108, 1278 HMI CPU1 Ready, 32
G26, 108, 1278 HMI CPU2 Ready, 32
G40, 1406 Hold block, 578
G41, 1406 Holder angle, 1479
G42, 1406 Homing
G450/G451, 1428 in rotary absolute encoders, 1197

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1755
Index

with incremental measurement system, 1156 Alarm area selection, 1575


All axes stationary, 1632
All axes that have to be referenced are
I referenced, 1680
All channels in the reset state, 1651
IC, 1277
Analog spindle 1, utilization in percent, 1574
ID check, 720
Analog spindle 2, utilization in percent, 1574
Implicit continuous-path mode, 165
Approach block active, 1658
Implicit exact stop, 162
Associated M01/M00 active, 1642
Implicit preprocessing stop, 583
ASUB is stopped, 1667
Incrementally programmed compensation values, 1490
ASUP active, 1671
Input resolution, 363
AT box ready, 1567
Interface
AUTOMATIC mode, 1643
PLC/HMI, 924
Axis/spindle disable, 1590
PLC/HMI-Messages, 925
Axis/spindle stops, 1606
PLC/MCP, 929
Block search active, 1660
PLC/NCK, 918
Block search via program test is active, 1668
Interface signals
Cancel alarm cleared, 1581
611D Ready, 1569
Change gear stage, 1691
Acknowledge EMERGENCY STOP, 1676
Channel is ready, 1665
Acknowledge fixed stop reached, 1634
Channel No. (FC9\ ChanNo), 1587
Action block active, 1658
Channel number of the machine control panel to
Activate associated M1, 1637
HMI, 1574
Activate channel-specific protection zone, 1627
Channel status active, 1664
Activate dry run feed, 1697
Channel status interrupted, 1664
Activate fixed feed rate 1 - 4 for machine
Channel status reset, 1665
axes, 1707
Channel-specific NCK alarm is active, 1589
Activate fixed feed rate 1 - 4 for path/geometry
Channel-specific protection zone preactivated, 1628
axes, 1704
Channel-specific protection zone violated, 1629
Activate M01, 1653
Clamping in progress, 1629
Activate machine-specific protection zone, 1627
Clear cancel alarms, 1573
Activate program test, 1654
Clear recall alarms, 1573
Activate referencing, 1679
COM1, 1576, 1583
Activate single block, 1652
COM2, 1575, 1583
Activate travel to fixed stop, 1635
Control program branching, 1672
Active, 1586
Controller enable, 1597
Active drive parameter set A, B, C, 1611
Controller parameter set switchover (checkback
Active G function of groups 1 to 60, 1667
signal), 1608
Active JOG mode, 1650
Controller parameter set switchover (request), 1599
Active machine function REF, 1652
Current controller active, 1608
Active machine function TEACH IN, 1651
D function 1, 1640
Active mode AUTOMATIC, 1650
Darken screen, 1572
Active mode MDA, 1650
Data transfer error, 1587
Active motor A, B, 1611
Delete distance-to-go (axis-specific)/Spindle
Active or passive file system, 1578, 1579
reset, 1598
Active REPOS machine function, 1652
Delete distance-to-go (channel-specific), 1588
Active spindle control mode, 1695
Delete S value, 1687
Active spindle mode oscillation mode, 1695
Disable parameter set switchover commands from
Active spindle positioning mode, 1694
NC, 1599
Actual direction of rotation clockwise, 1693
Displayed channel number from HMI, 1582
Actual gear stage A to C, 1685
Drive parameter set selection A, B, C, 1602
Actual value in WCS, 1574
Drive Ready, 1612
Air temperature alarm, 1571

Basic Functions
1756 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

Drive test travel enable, 1590 M, S, T, D, H, F functions Modification, 1637


Drive test travel request, 1605 M00/M01 active, 1659
Dry run feed rate selected, 1703 M02/M30 active, 1660
EMERGENCY STOP, 1676 Machine function REF, 1646
EMERGENCY STOP active, 1677 Machine function REPOS, 1646
Enable protection zones, 1627 Machine function TEACH IN, 1646
Enable travel to fixed stop, 1635 Machine-related protection zone preactivated, 1628
Encoder limit frequency exceeded, 1631 Machine-related protection zone violated, 1629
Error, 1582, 1586 MDA mode, 1643
Error RS-232-C, 1585 Mode change disable, 1579
Extended address F functions 1 to 6, 1641 Mode changeover inhibit, 1644
Extended address H functions 1 to 3, 1640 Mode group number, 1587
Extended address M functions 1 to 5, 1638 Mode group ready, 1650
Extended address S functions 1 to 3, 1639 Mode group reset, 1645
External zero offset, 1675 Mode group stop, 1644
F function for positioning axis, 1710 Mode group stop axes plus spindles, 1645
FC9 Out\ Active, 1580 Motor selection A, B, 1603
FC9 Out\ Done, 1580 Motor selection in progress, 1603
FC9 Out\ Error, 1580 Motor temperature prewarning, 1616
FC9 Out\ StartError, 1580 n(act) equals n(set), 1623
FC9\ Start (measuring in Jog), 1588 n(act) less than n(min), 1622
Feed disable, 1701 n(act) less than n(x), 1622
Feed rate override (axis-specific), 1704 NC Ready, 1569
Feed rate override selected for rapid traverse, 1704 NC start, 1655
Feed stop (Geometry axis 1 to 3), 1703 NC start disable, 1655
Feed stop/spindle stop (axis-specific), 1707 NC stop, 1656
Feedrate override, 1697 NC Stop at block limit, 1656
Feedrate override active, 1702 NC Stop axes plus spindles, 1657
Fixed stop reached, 1636 NCK alarm is active, 1570
Follow up operation, 1593 NCK alarm with processing stop present, 1589
Follow-up mode active, 1605 NCK battery alarm, 1571
Gear is changed over, 1686 NCK CPU Ready, 1568
Hardware limit switches plus and minus, 1630 NCU 573 heatsink temperature alarm, 1570
Heatsink temperature prewarning, 1617 OK, 1583, 1585
Higraph first error display, 1574 Oscillation controlled by the PLC, 1688
HMI CPU1 Ready, 1568 Oscillation speed, 1689
HMI-CPU2-Ready (to BTSS or to MPI), 1568 Override active, 1706
i2t monitoring, 1626 Overstore active, 1589
Interrupt processing active, 1665 Path axis, 1674
Invert M3/M4, 1687 PCU Battery alarm, 1567
JOG mode, 1643 PCU temperature limit, 1567
Key disable, 1573 PLC action completed, 1653
Key-operated switch position, 1566 PLC index, 1578, 1579
Last action block active, 1659 PLC line offset, 1578, 1579
Load, 1586 Position controller active, 1606
Load part program, 1577 Position measuring systems 1 and 2, 1594
Lubrication pulse, 1609 Position reached with exact stop coarse, 1632
M fct. 1-5 not included in list, 1638 Position reached with exact stop fine, 1633
M function for spindle, 1696 PROG-EVENT-DISPLAY, 1671
M(d) less than M(dx), 1620 Program level abort, 1655
M, S, T, D, H, F functions Additional info "Quick" Program status aborted, 1664
(quick acknowledgment), 1638 Program status interrupted, 1663

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1757
Index

Program status running, 1662 Selected JOG mode, 1648


Program status stopped, 1663 Selected machine function REF, 1649
Program status wait, 1663 Selected mode AUTOMATIC, 1648
Program test active, 1662 Selected mode MDA, 1648
Programming area selection, 1575 Selected mode TEACH IN, 1648, 1649
Pulse enable, 1604 Selection, 1577, 1587
Pulses enabled, 1614 Sensor for fixed stop, 1634
Ramp-function generator fast stop, 1600 Set gear stage A to C, 1691
Ramp-function generator fast stop active, 1609 Setpoint direction of rotation,
Ramp-up completed, 1618 counter.clockwise/setpoint direction of rotation,
Ramp-up times, 1600 clockwise, 1690
Rapid traverse override, 1699 Setpoint speed increased, 1692
Rapid traverse override active, 1701 Setpoint speed limited, 1692
Read-in disable, 1654 Setting-up mode active, 1609
Read-in enable is ignored, 1666 ShopMill control signal, 1575
Recall alarm cleared, 1581 Simulation selected, 1581
Reference point approach delay, 1681 Single block type A, 1647
Reference point value 1 to 4, 1680 Single block type B, 1647
Referenced/synchronized 1, 1681 Skip block, 1654
Referenced/synchronized 2, 1682 Speed controller active, 1607
Referencing active, 1679 Speed controller integrator disable, 1604
Remote diagnosis active, 1567 Speed controller integrator disabled, 1613
Repos DEFERAL Chan, 1671 Speed limit exceeded, 1692
REPOS Delay Ackn, 1673 Speed setpoint smoothing, 1601
REPOS offset, 1673 Speed setpoint smoothing active, 1610
REPOS offset valid, 1673 Spindle in position, 1695
Repos Path Mode Ackn0-2, 1669 Spindle in set range, 1693
REPOSDELAY, 1672, 1674 Spindle override, 1708
REPOSMODEEDGE, 1658 Spindle reset/Delete distance-to-go, 1684
REPOSMODEEDGEACKN, 1669 Spindle/no axis, 1690
Reset, 1657 Still ASUB is active, 1672
Restored 1, 1682 Stop at the end of block with SBL is
Restored 2, 1683 suppressed, 1666
Re-synchronize spindle when positioning 2 and Switch over MCS/WCS, 1582
1, 1687 Synchronized Actions (S5, H2)|Signals for dynamic
Resynchronizing spindles 2 and 1, 1686 M functions: M0 - M99, 1641
Revolutional feed rate active, 1710 T function 1, 1639
Rigid tapping is active, 1694 Tool offset selection, 1575
RMB, 1657 Torque limit 2, 1601
RME, 1657 Torque limit 2 active, 1610
RMI, 1657 Transformation active, 1661
RMN, 1657 Unload, 1577, 1586
RMNOTDEF, 1657 Value of F help function, 1642
RS-232-C external, 1576, 1584 Value of M help function, 1642
RS-232-C off, 1576, 1584 Value of S help function, 1642
RS-232-C on, 1577, 1585 Variable signaling function, 1624
RS-232-C stop, 1584 VDClink lower than warning threshold, 1625
RS-232-C Stop, 1576 Velocity/spindle speed limitation, 1630
S function for spindle, 1696 Intermediate gear, 391, 1256
Screen bright, 1572 Interpolation parameter sets, 412
Screen is dark, 1581 Interpolator end, 158
Second software limit switch plus or minus, 1630 Interpolatory axis grouping, 43

Basic Functions
1758 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

Interrupt M
DISABLE, 645
M decoding acc. to list, 945
Routine, 632
M function, 439
Signal, 633
M function replacement, 684
Interrupt routine
M1, 501
End, 636
M17, 500
Inverse-time feedrate (G93), 1306
M19, 1217, 1277
IPTRLOCK, 578
M2, 500
IPTRUNLOCK, 578
M3, 1276
M30, 500
M4, 1276
J M40, 1279
Jerk limitation, 177 M41, 1279
Jerk limiting M42, 1279
Smoothing method, 255 M43, 1279
Jogging M44, 1279
during interruption of a JOG ASUB, 640 M45, 1279
in the mode type AUTOMATIC, 523 M5, 1276
M70, 1231, 1277
Machine axes, 740
K Machine coordinate system (MCS), 35, 733, 764
Machine kinematics, 1451
Key disable, 34
Machine tool axes, 746
Key switch, 64
Machine with rotary tool, 1456
Kinematic transformation, 765
Machine with rotary workpiece, 1457
Kinematic type, 1451
Machine zero, 1147
KONT, 1407
Machine zero M, 758
KONTC, 1407
Machines with extended kinematics, 1458
KONTT, 1407
Machining in direction of tool orientation, 1491
Main axes, 748
Manual switchover of the basic system
L General, 374
LENTOAX, 1542 Input resolution and computational resolution, 377
LIFTFAST, 644 JOG and handwheel factor, 377
Limit Reference point, 376
Velocity, for path axes, 1305 System data, 375
Limit switches-monitoring, 103 Tool data, 376
Limited toolholder orientation, 1451 Master-slave switchover with G96, G961, 1312
LIMS, 1278 MCP identification, 956
Linear axis MCS, 35
With linear scale, 399 Md < Mdx, 51
with rotary encoder on motor, 400 MD10000, 317, 385, 732, 752
with rotary encoder on the machine, 402 MD10002, 752, 757
Linear feedrate (G94), 1307 MD10010, 516, 518
Linear signal distortions, 78 MD10050, 1201
Loader axes, 746 MD10070, 1201
Lockable data areas, 65 MD1012, 333, 334
Logbook, 306 MD10131, 54
LookAhead, 180 MD10192, 1257
Selection and deselection, 182 MD10200, 359, 360, 364, 377, 401
Lubrication pulse, 48 MD10210, 359, 360, 364, 404
MD10220, 363, 366

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1759
Index

MD10230, 363, 366 MD11717, 686


MD10240, 369, 370, 371, 375, 376, 377, 378 MD12000, 1332
MD10260, 369, 374, 375, 378 MD12010, 1333
MD10270, 369 MD12020, 1331
MD10290, 376 MD12030, 182, 184, 1331
MD10292, 376 MD12040, 1331
MD10600, 778, 841, 842 MD12050, 1331
MD10602, 808, 809, 811, 819, 824 MD12060, 1333
MD10610, 736, 802 MD12070, 1334
MD10612, 802 MD12080, 1334
MD10613, 853 MD12082, 1332
MD10615, 850 MD12090, 1324
MD10618, 127 MD12100, 182, 184, 1334
MD10680, 208 MD12200, 1344
MD10682, 208 MD12202, 1343, 1344
MD10702, 537, 542, 651, 655, 710 MD12204, 1343, 1344
MD10704, 1336, 1337 MD12240, 1354
MD10707, 557 MD1230/1231, 331
MD10708, 556, 557 MD13000, 389, 390
MD10710, 110, 1311 MD13010, 386, 387, 389, 390
MD10712, 205 MD13020, 389, 390
MD10713, 472 MD13030, 309, 310, 389, 390
MD10714, 448 MD13040, 389, 390
MD10715, 684, 689 MD13050, 390
MD10716, 684, 689 MD13060, 390
MD10717, 686 MD13070, 390
MD10718, 689 MD13080, 390
MD10719, 687 MD1401, 284, 395
MD10735, 524 MD1405, 396
MD1103, 331 MD1417, 52, 300
MD1104, 331 MD1418, 52, 300
MD1105, 331 MD1426, 51, 52, 299, 300
MD11100, 458 MD1428, 51, 300
MD11110, 465 MD14504, 949
MD1118, 316 MD14506, 949
MD11220, 378 MD14508, 949
MD11270, 57 MD15700, 698
MD1130:, 316 MD15702, 699
MD11300, 1149 MD1604, 52, 293
MD11346, 1381 MD1620, 301
MD11410, 1246, 1314, 1318, 1435 MD1621, 301
MD11411, 532 MD1622, 301
MD11412, 278 MD1623, 301
MD11450, 479, 544, 545, 546, 548, 559, 588 MD1624, 301
MD11470, 560, 561, 562, 563, 590 MD1625, 301
MD11550, 1325 MD1626, 301
MD11600, 638 MD1700, 292, 293
MD11602, 588, 638, 639, 640 MD1702, 295
MD11604, 588, 638, 640 MD1706, 295
MD11610, 647 MD1707, 295
MD11620, 621 MD1708, 295
MD11640, 752 MD17200, 663

Basic Functions
1760 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

MD18080, 1510 MD20150, 110, 220, 231, 246, 263, 264, 370, 375,
MD18088, 1453, 1467, 1472 422, 529, 597, 674, 679, 787, 852, 854, 884, 886,
MD18094, 376 1320, 1322, 1323, 1354
MD18096, 376 MD20152, 674, 679, 852, 884, 886
MD18100, 1368, 1384 MD20170, 211
MD18102, 1375, 1383, 1384 MD20172, 211, 1302
MD18104, 1531 MD20180, 1464
MD18105, 1373, 1374, 1375, 1376 MD20184, 837, 839, 846, 1466
MD18106, 1373, 1374, 1376 MD20188, 1459
MD18108, 1514 MD20190, 1459
MD18112, 1515, 1530 MD20191, 642
MD18114, 1493 MD20192, 624
MD18116, 1532, 1533, 1534, 1535, 1536 MD20193, 625
MD18150, 57 MD20200, 1345
MD18190, 116, 124 MD20201, 1345, 1356
MD18360, 670 MD20202, 1424
MD18362, 670 MD20204, 1417
MD18600, 776, 777 MD20210, 1430
MD18601, 788, 797, 849 MD20220, 1429
MD18602, 788, 799, 849 MD20230, 1431
MD20000, 529 MD20240, 1433, 1434
MD20050, 680, 732, 754, 830 MD20250, 1407
MD20060, 732 MD20252, 1441
MD20070, 732, 752, 753, 754, 1274 MD20256, 1443
MD20080, 732, 750, 752 MD20270, 442, 1367, 1378, 1384, 1386, 1520, 1521
MD20090, 499, 1276, 1387 MD20272, 443, 1514, 1520, 1521
MD20092, 1273, 1274 MD20360, 1381, 1530, 1539, 1560
MD20094, 447, 1231 MD20390, 1505, 1508, 1509
MD20095, 447 MD20392, 1506
MD20096, 1370, 1371, 1372 MD20400, 183
MD20100, 883, 889, 1310, 1313, 1539 MD20430, 184
MD20106, 546, 622 MD20440, 184
MD20107, 546, 623 MD20443, 187
MD20108, 621 MD20450, 185
MD20109, 622 MD20460, 191, 192
MD20110, 637, 674, 743, 850, 851, 852, 859, 884, MD20462, 191
886, 1366, 1386, 1388, 1474, 1491, 1519 MD20465, 195, 196
MD20112, 558, 637, 674, 744, 854, 859, 884, 1386, MD20480, 172, 175, 216
1474 MD20482, 211, 216
MD20114, 649 MD20488, 214
MD20116, 641 MD20490, 165
MD20117, 641, 653, 655 MD20500, 232, 233
MD20118, 680, 744 MD20550, 160
MD20120, 679, 1386, 1474 MD20552, 161
MD20121, 679, 1366, 1386 MD20600, 204, 245
MD20124, 499 MD20602, 204, 242, 243
MD20125, 1484 MD20603, 204
MD20126, 1474, 1485 MD20606, 207
MD20127, 1485 MD20610, 235
MD20130, 679, 1386 MD20650, 1316
MD20140, 679 MD20700, 286, 1194
MD20750, 1310

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1761
Index

MD20800, 439, 500, 501 MD24007, 854


MD20850, 1217 MD24008, 769, 850
MD21015, 55 MD2401, 395
MD21016, 56 MD24010, 802
MD21020, 107 MD24020, 796
MD21110, 843 MD24030, 793
MD21200, 643, 1321 MD24040, 830
MD21202, 643 MD2405, 396
MD21220, 1339 MD24050, 787
MD21230, 1339 MD24100, 1508
MD21330, 680 MD24110, 754, 1508
MD22000, 458, 1217 MD24120, 754, 1508
MD22010, 459, 1217 MD24550, 1540
MD22020, 459, 1217 MD24558, 1540
MD22030, 459, 1217 MD24560, 1540
MD22035, 460 MD24570, 1508
MD22040, 448 MD24572, 1508
MD22050, 448 MD24650, 1540
MD22060, 449 MD24658, 1540
MD22070, 449 MD24660, 1540
MD22080, 450, 700, 703 MD24805, 819
MD22100, 471 MD24855, 819
MD22110, 441, 444 MD24905, 812
MD22140, 1354 MD25574, 1508
MD22200, 463 MD26008, 448
MD22210, 440, 463 MD27100, 889
MD22220, 442, 463 MD27800, 530
MD22230, 441, 463 MD27860, 609, 715
MD22240, 443, 444, 463 MD27880, 610, 718
MD22250, 442, 463 MD27882, 719
MD22252, 443, 463 MD28060, 660, 663
MD22254, 447, 461 MD28070, 215
MD22256, 447, 461 MD28080, 788, 797
MD22410, 1335 MD28081, 788, 798
MD22510, 597, 1131 MD28082, 768, 787, 804, 836, 837, 839, 843, 846,
MD22530, 493, 1474 849, 1466
MD22532, 493, 744 MD28085, 1368, 1467, 1472
MD22534, 493 MD28150, 60
MD22550, 687, 689, 1366, 1378, 1379, 1384, 1386, MD28200, 116, 124
1387 MD28210, 124
MD22560, 447, 689, 1366, 1386, 1387 MD28212, 124
MD22560, 499 MD28400, 663
MD22562, 1380, 1381 MD28530, 57, 174
MD22600, 572 MD28533, 187
MD22601, 572, 588 MD28560, 855
MD22620, 558, 592 MD28600, 111
MD22621, 558 MD28610, 207
MD22680, 581 MD30100, 385
MD24000, 803 MD30110, 386, 389
MD24002, 853 MD30120, 386
MD24004, 850 MD30130, 383, 386
MD24006, 769, 770, 787, 851 MD30134, 386

Basic Functions
1762 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

MD30200, 382, 398, 417 MD32430, 246, 247


MD30210, 387 MD32431, 204, 245, 251
MD30220, 387, 389 MD32432, 204, 252
MD30230, 387 MD32433, 204, 240
MD30240, 95, 383, 384, 387 MD32434, 239, 240, 251
MD30242, 384, 387, 1183 MD32435, 251
MD30250, 1189 MD32440, 192, 195
MD30300, 397, 398, 401, 404, 1354 MD32450, 413, 415
MD30310, 105 MD32452, 411, 413, 414, 415, 1232
MD30330, 1180 MD32610, 79, 411, 413, 414, 1232
MD30340, 1180 MD32620, 418, 1233
MD30350, 384 MD32630, 418
MD30455, 1180 MD32640, 423, 432
MD30460, 883, 885, 886, 889 MD32711, 369
MD30465, 698 MD32750, 1505, 1508, 1509
MD30550, 1150 MD32800, 66, 79, 411, 413, 419, 422, 1232
MD31000, 397, 398, 401, 404 MD32810, 66, 79, 134, 411, 413, 419, 1232
MD31010, 397, 398 MD32900, 409
MD31020, 397, 398, 401, 404, 1201 MD32900:, 410
MD31030, 134, 397, 398, 401 MD32910, 66, 409, 411, 413, 421, 1232
MD31040, 397, 398, 401, 404, 416, 1227, 1265 MD32930, 431
MD31044, 392, 397, 398, 1256 MD32940, 431
MD31050, 66, 134, 391, 397, 398, 401, 404, 411, 413, MD32950, 416, 417
1232, 1255, 1261 MD32960, 432, 433
MD31060, 66, 134, 391, 397, 398, 401, 404, 411, 413, MD33000, 408
1232, 1255 MD33050, 48
MD31064, 391, 398, 1256 MD33100, 172, 208, 211, 216
MD31066, 391, 398, 1256 MD33120, 179, 216
MD31070, 134, 397, 398, 401, 404 MD34000, 1159, 1162, 1179
MD31080, 134, 397, 398, 401, 404 MD34010, 1149, 1157, 1160, 1161, 1176, 1191
MD31090, 377 MD34020, 1158, 1161
MD31122, 1195, 1240 MD34030, 1159
MD31123, 1196, 1240 MD34040, 1158, 1160, 1161, 1162, 1176, 1177, 1196,
MD32000, 79, 262, 358, 395, 398, 1291, 1305, 1322 1240
MD32040, 1308 MD34050, 1160
MD32050, 1308 MD34060, 1164, 1177, 1179, 1228
MD32060, 590, 1347 MD34070, 1166, 1167, 1178
MD32074, 851 MD34080, 393, 398, 1166, 1167, 1182
MD32100, 393 MD34090, 393, 398, 1166, 1167, 1173, 1174, 1190,
MD32200, 46, 66, 79, 288, 408, 411, 428, 1232 1192, 1193, 1194
MD32200, 82 MD34092, 1162
MD32210, 428 MD34093, 1164
MD32220, 428 MD34100, 1166, 1178, 1191, 1194, 1195
MD32250, 134, 394 MD34102, 1181, 1183
MD32260, 134 MD34104, 1185
MD32300, 79, 204, 230, 239, 240, 241, 242, 262, 643, MD34110, 286, 1152
1158, 1322, 1347, 1349 MD34120, 1155, 1185
MD32310, 164, 204, 241 MD34200, 1155, 1174, 1182, 1183, 1185, 1191, 1195,
MD32400, 254, 256, 425 1196, 1240
MD32402, 256, 425 MD34210, 1169, 1188, 1189, 1190, 1191, 1192, 1193,
MD32410, 254, 425, 426 1199
MD32420, 232, 246, 247 MD34220, 1204

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1763
Index

MD34230, 1199 MD36020, 82, 427, 428


MD34232, 1200 MD36030, 83, 84, 411, 413, 427, 428, 432
MD34300, 1177 MD36030, 289
MD34320, 397, 398, 1173 MD36040, 83
MD34330, 1196 MD36040:, 338, 427, 428
MD34990, 1323 MD36042, 338
MD35000, 732, 783, 1272, 1274, 1279 MD36050, 84, 91, 289
MD35010, 1243, 1247, 1258, 1261, 1264, 1269 MD36052, 85, 87, 88, 90
MD35012, 1242, 1264, 1265, 1267 MD36060, 46, 47, 1214, 1221, 1286
MD35014, 1270 MD36100, 104
MD35020, 1237 MD36110, 104, 363
MD35030, 1237 MD36120, 104
MD35035, 1218, 1281 MD36130, 104
MD35040, 1214 MD36200, 93, 411, 413, 1232
MD35090, 1242 MD36210, 92, 289, 395, 396
MD35092, 1247 MD36220, 93
MD3510, 1269 MD36300, 94, 290, 1200, 1201
MD35100, 358 MD36302, 95, 1223
MD35110, 1242 MD36310, 96, 97
MD35112, 1247 MD36312, 98
MD35120, 1242 MD36400, 79, 289, 427, 428, 432
MD35122, 1247 MD36500, 289, 383
MD35130, 66, 1242, 1248, 1250, 1290 MD36510, 383
MD35135, 1242 MD36600, 103
MD35140, 1242, 1248, 1250, 1289, 1311, 1313 MD36610, 44, 80, 83, 85, 93, 94, 95, 97, 99, 101, 876
MD35150, 1160, 1220, 1221, 1287 MD36620, 44, 876
MD35200, 1213, 1222, 1224, 1228, 1242, 1268 MD37002, 323, 324, 333, 334, 341
MD35210, 1213, 1222, 1224, 1225, 1228, 1229, 1242, MD37010, 286, 330, 337
1268 MD37012, 324, 330, 335
MD35212, 1247 MD37020, 320, 330
MD35220, 259, 262 MD37030, 319, 339, 348
MD35230, 259, 262 MD37040, 319
MD35240, 174, 262 MD37050, 320, 321, 339, 340
MD35242, 257 MD37052, 321, 332
MD35300, 1201, 1222, 1223, 1224, 1228, 1229, 1242, MD37060, 318, 319, 322, 334, 335, 339, 340, 345,
1268, 1278 346, 347, 348, 349
MD35310, 1242, 1265, 1267 MD37070, 345, 346, 348, 349
MD35350, 1228, 1267 MD37080, 336
MD35400, 1088, 1259, 1260 MD9000, 53
MD35410, 1258, 1261 MD9001, 53
MD35430, 1259 MD9003, 53
MD35440, 1259 MD9004, 53, 363, 665
MD35450, 1259 MD9006, 34, 1572
MD35500, 1215, 1220, 1287 MD9010, 665
MD35510, 1220, 1286 MD9011, 363, 665
MD35550, 1242, 1248 MD9423, 659
MD35590, 46, 66, 1243, 1253 MD9424, 666, 773
MD36000, 84, 158, 411, 413, 433, 1226, 1229, 1230, MD9440, 787, 858
1292, 1293 Measuring systems, 383, 1147
MD36010, 82, 84, 158, 289, 411, 413, 1226, 1229, Memory requirements
1230, 1292, 1293 of basic PLC program, 966
MD36012, 84, 159, 411, 413, 414, 1232 Memory requirements of basic PLC program

Basic Functions
1764 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

Maximum, 968 Non-modal feedrate FB, 1346


Minimum, 968 NORM, 1407
Message signals in DB2, 1133
Mirroring
Frames, 782 O
Retraction direction (lift fast), 643
of defective drive modules
Modal activation (FOCON/FOCOF), 336
Identification, 309
Mode, 520
Operating modes
AUTOMATIC, 520
Interlocks, 526
JOG, 520
Monitoring functions, 526
JOG in Automatic, 520
Operating statuses, 523
MDA, 520
Orientation, 115
Mode change
Tolerance, 216
from/to the AUTOMATIC, JOG, MDA modes, 527
OTOL, 217
Mode group
Output
Change in configuration of the mode group, 518
Behavior of an auxiliary function, 450
Channel-specific assignments, 516
Counter, 483
Number, 518
Sequence, 483
User interface, 517
Overload factor, 164
Mode group (MG), 516
Override
Mode groups
in G331/332, 1324
Change, 520
OVRA, 1278
Modes
Change, 526
Cross-mode synchronous actions, 521
of the mode group, 520
P
Priorities, 521 Package
Submode TEACH IN, 522 Counter, 483
Monitor type, 53 Parameter set
Motor/load gear, 391 For axes, 411
Multi-instance DB, 1140 Position controller, 411
Multiple feedrate values in one block, 1338 Servo, 1348
Switchover, 411
Toolholder, with orientation capability, 1451
N Part program
Channel enable, 600
nact, 52
Interruption, 601
NC
Selection, 600
Block compressor, 210
Skipping of specific part program blocks, 539
Failure, 938
Starting, 607
Languages, 597
Password, 63
NC Start, 600
Resetting, 63
Read/write variables, 941
Setting, 63
NC VAR selector, 972
Path
Input options, 975
Feedrate F, 1304
Start-up, installation, 983
Velocity, maximum, 1305
NCK alarm handler, 277
Path axes, 747
NCK alarm is active, 33
Path criterion, 169
NCK alarm with processing stop, 33
Path feedrate, 360
NCK battery alarm, 33
Path interpolator, 528
NCK CPU Ready, 32
PCIN, 308
Non-acknowledged gear step change, 1257
PCOF, 1277
Nonlinear signal distortions, 78

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1765
Index

Physical quantities, 365 for user ASUB, 648


PLC, 915 Protection levels, 61
Axes, 747, 888 Programmable, 65
Functions of basic program, 899 Protection zones, 77, 114
Read/write variable, 58 Activate, 123
Status, 307 Data storage, 122
Technical data, 895 Deactivation, 123
Versions, 898 Definition as per partprogram, 118
PLC interface Definition with system variables, 121
For SINUMERIK 840D, 915 Enable, 127
PLC-controlled axis, 531 Example, activation, 146
POINTER, 1135 Example, definition, 137
POINTER in FB, 1136 Restrictions, 133
POINTER in FC, 1135 Protection-zone violation, 127
Polynomials, intersection process, 1443 Pulse multiplication factor, 399
POS, 747
POSA, 747
Position control, 411 R
Position control loop, 407
Radius-related data, 888
Position controller active, 47
Ramp-up function completed, 51
Position measuring system, 42
Rapid traverse override switch, 1330
Position of coordinate systems and reference
Reaching simulated target point for LEAD with
points, 760
JOG, 587
Position of the transverse axis in the machine
Recall alarms, 35
coordinate system, 883
Reference axis
Positioning accuracy, 361
Assign via SCC[AX] for G96/G961/G962, 884
Positioning axes, 360, 747
for G96/G961/G962, 881
Processing time, 715
for RESET, end of part program or start of part
PROFIBUS connection, 958
program retained, 884
PROFIBUS Diagnosis, 937
Reference point R, 758
PROFIBUS-DP, 390
Reference points, 758
Program
Referencing methods, 1147
Display status, 604
Relevant standards, 874
Program action, 606
Remote diagnostics, 33
Program test, 533
Replaceable geometry axes, 741
Runtimes, 712
Replacement subroutine
Statuses, 604
for tool change, 689
Program control, interface signals, 658
Replacement zero mark, 1197
Program display modes, 662
REPOS Offset, 328
Program execution without setpoint outputs, 533
Repositioning
Program operation, 596
at the beginning of the block, 570
Initial setting, 596
at the interruption point, 570
Program section repetition, 611
Repositioning neutral axes after SERUPRO, 563
Programmable end-of-motion criterion, 1351
Repositioning on contour
Programmable run-in and run-out paths, 1314
Repositioning point, 571
Programmable servo parameter set
Reset
In the part program/synchronized action, 1352
Behavior, 674
Programmable single-axis dynamic response, 1303,
RESET
1347
Command, 603
Programming device
Residual time
Hardware requirements, 969
For a workpiece, 714
Protection level
Resolutions, 362

Basic Functions
1766 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

Revolutional feedrate (G95), 1307 SD42960, 1364, 1499, 1506, 1507


Rotary axes, 746 SD42974, 1459
Rotary axis SD42980, 843, 845, 846
with rotary encoder on motor, 403 SD42984, 1486
with rotary encoder on the machine, 405 SD42990, 660
Rotary axis parameters, 1452 SD43210, 1311, 1313
Rotation component, 838 SD43220, 1311
Rough offset, 735 SD43240, 1217, 1277
Rounding, 166 SD43250, 1217
Run times SD43300, 1283, 1308
Program, 712 SD43400, 109
Run-in and run-out paths, programmable, 1314 SD43410, 109
Run-up axes, 1349 SD43420, 108
SD43430, 108
SD43500, 330
S SD43510, 330, 331
SD43520, 330
S functions, 440
Secant error, 208
S..., 1276
Selection of the cutting edge when changing tool, 1367
SAVE, 645
Self-acting SERUPRO, 576
SBLOF, 652
SERUPRO, 325
SBLON, 655
SPEED factor for channel axes during ramp-up, 572
Scaling, 362
SERUPRO approach, 556, 560
Screen bright, 34
Control from the PLC, 565
SD41100, 1308
Influence path axes individually, 569
SD42010, 1315, 1316
Repositioning to next point, 570
SD42100, 537, 1336, 1337
SERUPRO ASUP, 328
SD42101, 537, 1337
Special features, 573
SD42200, 652
SerurpoMasterChan, 576
SD42440, 737
Service display
SD42442, 1490
Axis/spindle, 281
SD42444, 542
Drive, 291
SD42465, 172, 216
PROFIBUS-DP, 302
SD42466, 172, 216
Servo enable, 43
SD42470, 212
Servo gain factor, 408, 409
SD42480, 1442
Servo gain factor Kv, 283
SD42496, 1438
Servo parameter set, 1348
SD42500, 235, 236
Programmable, 1352
SD42502, 235, 236
SETINT, 633, 643
SD42510, 248
SETMS, 1276
SD42512, 248
Setpoint output, 382
SD42600, 1283, 1308
Setpoint system, 382
SD42676, 216
Several transverse axes
SD42678, 216
Acceptance of the additional transverse axis, 886
SD42700, 671
Axis identifier, 881
SD42800, 1272, 1273, 1274
Axis replacement in synchronized actions, 886
SD42900, 1364, 1498, 1499, 1522, 1530, 1543
Axis replacement via axis container rotation, 886
SD42910, 1495, 1498, 1499, 1522, 1528, 1529, 1530
Axis-specific diameter programming, 886
SD42920, 1498, 1500, 1522, 1528, 1529, 1531
Definition of several transversing axes in the
SD42930, 1498, 1501, 1522, 1528, 1531, 1558
channel, 883
SD42935, 1499, 1523, 1529, 1531, 1546, 1553
Dimension can be activated as a diameter, 889
SD42940, 1486, 1495, 1498, 1502, 1522, 1528, 1531
Signal distortions, 78
SD42950, 1477, 1494, 1495, 1499, 1522, 1528, 1531

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1767
Index

Signal exchange Speed setpoint routing, 384


Cyclic, 893 SPI, 1279
Signal exchange Spindle
Event-controlled, 893 Modes, 1210
Signals Spindle disable, 37
Alarm signals, 33 Spindle functions using a PLC, 530
Axis/spindle-specific (DB31, ...), 31 Spindle override factor, 1333
Channel-specific (DB21, ...), 31 Spindle speed, 360
Compile cycles, 920 Spindle speed limitation with G96, G961, 1311
NCK/PLC, 921 Spindle speed limitations, 1288
PLC/axes, spindles, 923 Spline, 155
PLC/Mode group, 921 SPOS, 1216, 1276
PLC/NCK, 920 SPOSA, 1277
PLC/NCK channels, 922 Star/delta switchover with FC17, 1253
Ready signals, 32 Start-up and synchronization of NCK PLC, 934
Simulation axes, 383 Stop Delay Area, 629
Single axes, 1347 Stop event, 629
Single block Storing angles in the toolholder data, 1451
Channel classification, 656 Strings, 1141
Do not stop, depending on the situation, 655 Subprograms, 683
Program operation mode, 535 SVC, 1276
Reactivate suppression in the ASUB, 655 Symbolic programming, 943
SBL1, 651 Synchronized axes, 168, 749
SBL2, 651
SBL2 with implicit preprocessing stop, 652
SBL3, 651 T
Stop suppression, 652
T function, 441, 1366
Suppression in the program SBLOF, 653
T function replacement, 686
Suppression with started ASUB, 653
TCARR, 1464
Single-axis dynamic response, 1347
TCOABS, 1464
Single-axis dynamic response?, 1303
TCOFR, 1464
Slotting saw, 1394
TCP Tool Center Position, 758
Smooth approach and retraction
TEACH IN, 520
Significance, 1413
Tick, 483
Sub-movements, 1413
TOA
Smoothing
Data, 1394
Path velocity, 190
Unit, 1368
SOFT, 246
Tolerance range for setpoint speed, 1287
SOFTA, 247
Tool, 1366
Software limit switch, 104
Change, 1366
SPCOF, 1277
Change tool with M06, 1366
SPCON, 1277
Cutting edge, 1390
Special axes, 746
DISC, 1429
Special points in the target block
Length, 1398
STOPRRE block, 582
Management, 515
Specify gear step, 1244
Offset data, 1394
Speed
Parameters, 1390
Feedforward control, 417
Select, 1366
Speed control loop, 407
Shape, 1399
Speed control loop active, 47
Shape, active, 1401
Speed setpoint adjustment, 394
Size, active, 1401
Speed setpoint output, 393, 412, 416
T function, 1366

Basic Functions
1768 Function Manual, 03/2009, 6FC5397-0BP10-4BA0
Index

Tool base dimension/adapter dimension, 1402 Tooth feedrate, 1307


Tool cutting edge, 1367 Torsion, 206
Tool radius compensation 2D (TRC), 1405 TOWBCS, 1527
Type, 1392 TOWKCS, 1528
Wear, 1401 TOWMCS, 1526
Tool base dimension, 1402 TOWSTD, 1526
Tool change TOWTCS, 1528
D function, 1367 TOWWCS, 1527
Offset memory, 1368 TRANS, 735
Program, 689 TRANSMIT, 765
Tool environments, 1530 Transverse axis
Tool length compensation Definition, 881
Calculate tool-specifically, example, 1551 Definition of a transversing axis in the channel, 883
Geometry, 1398 Dimensions, 885
Wear, 1401 Functions, 881
Workpiece-specific calculation, 1521 Initial setting, 886
Tool offset Position and designation, 883
Offset in the NC, 1370 Programming the transversing commands, 882
Types, 1450 Travel to fixed stop
Tool radius compensation Analog drives, 344
Keep constant, 1439 Analog drives, diagrams, 350
Wear, 1401 Analog drives, FXS deselection, 352
Tool radius compensation, 2D, 1405 Analog drives, FXS selection, 350
Approach and retraction behavior, 1407 Analog drives, SIMODRIVE 611A (FDD), 344
Collision detection, 1434 Analog drives, SIMODRIVE 611A (MSD), 347
Compensation and inner corners, 1432 Block search, 325
Compensation at outside corners, 1428 Contour monitoring, 332
Deselection, 1427 Customer benefit, 315
Geometry, 1399 Deselection, 322
Modified alarm response, 1442 Function abort, 324
Point of intersection G451, 1430 Functional sequence, 318
Selection, 1406 Monitoring window, 320
Smooth approach and retraction, 1413 Positioning axes, 332
Transition circle, 1428 Programming, 316
Variable compensation value, 1437 RESET, 324
Tool revolver axes, 746 Selection, 318
TOOLENV, 1530 Setting data, 330, 340
Toolholder reference point T, 758 Status query, 331
Toolholder selection, 1448 Travel to fixed stop (F1)
Toolholder with orientation capability, 1364, 1448 Interrupts, 321
Calculation of active tool length, 1463 Setting data, 320
Create new, 1467 Traversing movement release, 1196
Examples, 1547 Traversing ranges, 360
Kinematic chain, 1455
Toolholder, with orientation capability, 1448
Control system response on Reset, program start, U
REPOS, 1473
UDT assignments, 943
Create new, 1467
Undercut angle, 1403
Inclined machining, 1462
Undervoltage threshold, 52
Programming, 1472
User-defined ASUB
Supplementary conditions, 1473
after SERUPRO operation, 559
Swiveling working table, 1463
UTD blocks, 943

Basic Functions
Function Manual, 03/2009, 6FC5397-0BP10-4BA0 1769
Index

V in BCS, 108
in WCS/SZS, 110
Variable signaling function, 52
Working area limitation group, 111
Velocities, 358
Workpiece
Version, 306
Counter, 718
Vertical axes, 332
Workpiece coordinate system (WCS), 35, 734, 774
Workpiece zero W, 758
W
WAITS, 1278 Z
WALIMOF, 109
Zero points, 758
WALIMON, 109
Zero vectors, 1455
WCS, 35
Work offset $P_EXTFRAME, 889
Work offset external, 889
Working area limitation, 106

Basic Functions
1770 Function Manual, 03/2009, 6FC5397-0BP10-4BA0

You might also like